Proof is a Merkle proof for a subtree.

interface StorageProof {
    entries: Uint8Array[];
    untrusted_root: Uint8Array;
    v?: number;


entries: Uint8Array[]

Entries are the proof entries in pre-order traversal.

untrusted_root: Uint8Array

UntrustedRoot is the root hash this proof is for. This should only be used as a quick sanity check and proof verification MUST use an independently obtained root hash as the prover can provide any root.

v?: number

V is the proof version.

Similar to cbor.Versioned but the version is omitted if it is 0. We don't use cbor.Versioned since we want version 0 proofs to be backwards compatible with the old structure which was not versioned.

Version 0: Initial format.

Version 1 change: Leaf nodes are included separately, as children. In version 0 the leaf node was serialized within the internal node. The rationale behind this change is to eliminate the need to serialize all leaf nodes on the path when proving the existence of a specific value.