@tevm/voltaire / primitives/StorageProof
primitives/StorageProof
Type Aliases
StorageProofLike
StorageProofLike =Defined in: src/primitives/StorageProof/StorageProofType.ts:42 Inputs that can be converted to StorageProofStorageProofType| {key:StorageKeyType;proof: readonlyUint8Array[];value:StorageValueType; }
StorageProofType
StorageProofType = object
Defined in: src/primitives/StorageProof/StorageProofType.ts:18
StorageProof represents an EIP-1186 storage proof for a single storage slot.
Each storage proof demonstrates that a specific storage key-value pair exists
(or doesn’t exist) in a contract’s storage trie at a given block. The proof
consists of RLP-encoded Merkle Patricia Trie nodes forming a path from the
storage root to the leaf containing the value.
Storage proofs are part of the StateProof structure and enable trustless
verification of contract storage without executing transactions or trusting
external data providers.
See
EIP-1186: https://eips.ethereum.org/EIPS/eip-1186Properties
key
Defined in: src/primitives/StorageProof/StorageProofType.ts:23 The storage slot being proven. Combines contract address and 256-bit slot number.readonlykey:StorageKeyType
proof
Defined in: src/primitives/StorageProof/StorageProofType.ts:36 Array of RLP-encoded Merkle Patricia Trie nodes. Forms the path from the storage root hash to this storage slot. Nodes are ordered from root to leaf.readonlyproof: readonlyUint8Array[]
value
Defined in: src/primitives/StorageProof/StorageProofType.ts:29 The value stored at this slot. Zero if the slot is uninitialized or was cleared.readonlyvalue:StorageValueType
Functions
equals()
equals(Defined in: src/primitives/StorageProof/equals.js:22 Compares two StorageProofs for equality. All fields (key, value, and proof elements) must match.a,b):boolean
Parameters
a
StorageProofType
First StorageProof
b
StorageProofType
Second StorageProof
Returns
boolean
- True if equal
Example
from()
from(Defined in: src/primitives/StorageProof/from.js:23 Creates a StorageProof from an object with key, value, and proof array.storageProof):StorageProofType
Parameters
storageProof
StorageProofLike
Object containing key, value, and proof
Returns
StorageProofType
- A validated StorageProof

