ethereumjs-monorepo

@ethereumjs/binarytree


@ethereumjs/binarytree / verifyBinaryProof

Function: verifyBinaryProof()

verifyBinaryProof(rootHash, key, proof): Promise<Uint8Array<ArrayBufferLike> | null>

Defined in: proof.ts:36

Verify a binary tree proof for key against rootHash.

Parameters

rootHash

Uint8Array

Expected tree root

key

Uint8Array

Full 32-byte key (stem + suffix)

proof

Uint8Array<ArrayBufferLike>[]

Serialized nodes along the key path

Returns

Promise<Uint8Array<ArrayBufferLike> | null>

Proven value, or null for a valid non-existence proof

Throws

If the proof is invalid