AviaryChildProofs extension

Proofs against a dynamic registry, and the anchor a parent takes next.

on

Methods

decodeChildRecord(Uint8List record) → ChildRecord

Available on Aviary, provided by the AviaryChildProofs extension

Parses the fixed 230 byte record layout.
encodeSubchainProofV2(List<Uint8List> hops, Uint8List stateProof) → Uint8List

Available on Aviary, provided by the AviaryChildProofs extension

A cross chain proof through any mixture of parents, from tagged hops (see ChainRegistry.subchainHopV2), top parent first, and the state proof of the last chain.
pendingAnchor(Chain parent, Chain child, {int limit = 0}) → Uint8List?

Available on Aviary, provided by the AviaryChildProofs extension

The next anchor parent can take for child, built from the child's archive and the parent's recorded tip, at most limit headers where 0 is the policy bound. Null when nothing is pending.
verifyChildProof(Uint8List subchainRoot, Uint8List proof) → ChildRecord

Available on Aviary, provided by the AviaryChildProofs extension

Checks a child proof against a 32 byte version 4 subchain root taken from a parent header the caller trusts, and returns the proven record. Read it: its tip, and whether the child is open. Throws when the proof does not hold.
verifySubchainProofV2(Uint8List parentSubchainRoot, Uint8List proof) → bool

Available on Aviary, provided by the AviaryChildProofs extension

Whether proof is committed under a parent's 32 byte subchain root all the way down and its state proof holds.