Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

storage source pure

Variables 2

Functions 9

func CheckValue

1func CheckValue(proof Proof, expected []byte) error
source

CheckValue verifies only the value reported by the proof object. This is useful when a caller receives an expected 32-byte commitment separately.

func EncodeStorageValue

1func EncodeStorageValue(word []byte) ([]byte, error)
source

EncodeStorageValue returns the leaf payload expected by the storage trie.

func StoragePath

1func StoragePath(slot []byte) ([32]byte, error)
source

StoragePath returns the MPT path used for an EVM storage slot.

func VerifyAbsence

1func VerifyAbsence(storageRoot []byte, proof Proof) error
source

VerifyAbsence verifies that proof.Key is absent under storageRoot. The Value field is intentionally ignored for absence proofs because eth_getProof returns zero for missing slots.

func VerifyProof

1func VerifyProof(storageRoot []byte, proof Proof) error
source

VerifyProof verifies that proof.Key stores proof.Value under storageRoot. Ethereum storage tries are keyed by keccak256(slot), and the leaf payload is the RLP encoding of the storage value with leading zero bytes removed.

func DecodeProof

1func DecodeProof(buf []byte) (Proof, error)
source

DecodeProof decodes Union's ethereum_light_client_types::StorageProof bincode wire form into the normalized Proof shape used by this package.

Wire layout with fixed-int/little-endian bincode:

  • key: U256 as 32 little-endian bytes
  • value: U256 as 32 little-endian bytes
  • proof: Vec<Bytes> as u64 length followed by repeated byte vectors

Types 1

Imports 6

Source Files 3