@ethereumjs/mpt / verifyMPTWithMerkleProof
verifyMPTWithMerkleProof(
trie
,rootHash
,key
,proof
):Promise
<null
|Uint8Array
<ArrayBufferLike
>>
Defined in: packages/mpt/src/proof/proof.ts:96
Verifies a proof by putting all of its nodes into a trie and attempting to get the proven key. An (EIP-1186)[https://eips.ethereum.org/EIPS/eip-1186] proof contains the encoded trie nodes from the root node to the leaf node storing state data.
The trie to verify the proof against
Uint8Array
Root hash of the trie that this proof was created from and is being verified for
Uint8Array
Key that is being verified and that the proof is created for
an EIP-1186 proof to verify the key against
Promise
<null
| Uint8Array
<ArrayBufferLike
>>
The value from the key, or null if valid proof of non-existence.
If proof is found to be invalid.