Skip to main content
import { StateProof } from 'voltaire-effect'
import { Effect } from 'effect'

const proof = yield* StateProof.from({
  address: '0x...',
  accountProof: ['0xf90211...'],
  balance: 100n,
  codeHash: '0x...',
  nonce: 1n,
  storageHash: '0x...',
  storageProof: [...]
})

console.log(proof.balance, proof.nonce)

Structure

{
  address: Address,
  accountProof: Hex[],      // Merkle proof nodes
  balance: bigint,
  codeHash: Bytes32,
  nonce: bigint,
  storageHash: Bytes32,
  storageProof: StorageProof[]
}

API

FunctionSignature
from(input) => Effect<StateProofType, Error>
equals(a, b) => Effect<boolean>
SchemaEffect Schema for validation