Categorygithub.com/cosmos/ics23/go
modulepackage
0.11.0
Repository: https://github.com/cosmos/ics23.git
Documentation: pkg.go.dev

# Functions

BatchVerifyMembership will ensure all items are also proven by the CommitmentProof (which should be a BatchProof, unless there is one item, when a ExistenceProof may work).
BatchVerifyNonMembership will ensure all items are also proven to not be in the Commitment by the CommitmentProof (which should be a BatchProof, unless there is one item, when a NonExistenceProof may work).
CombineProofs takes a number of commitment proofs (simple or batch) and converts them into a batch and compresses them.
Compress will return a CompressedBatchProof if the input is BatchProof Otherwise it will return the input.
Decompress will return a BatchProof if the input is CompressedBatchProof Otherwise it will return the input.
IsCompressed returns true if the proof was compressed.
IsLeftMost returns true if this is the left-most path in the tree, excluding placeholder (empty child) nodes.
IsLeftNeighbor returns true if `right` is the next possible path right of `left` Find the common suffix from the Left.Path and Right.Path and remove it.
IsRightMost returns true if this is the right-most path in the tree, excluding placeholder (empty child) nodes.
VerifyMembership returns true iff proof is (contains) an ExistenceProof for the given key and value AND calculating the root for the ExistenceProof matches the provided CommitmentRoot.
VerifyNonMembership returns true iff proof is (contains) a NonExistenceProof both left and right sub-proofs are valid existence proofs (see above) or nil left and right proofs are neighbors (or left/right most if one is nil) provided key is between the keys of the two proofs.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NO_HASH is the default if no data passed.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer.
FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer.
FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer.
FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer.
NO_PREFIX don't include any length info.
REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output).
REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output).
VAR_PROTO uses protobuf (and go-amino) varint encoding of the length.
VAR_RLP uses rlp int encoding of the length.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IavlSpec constrains the format from proofs-iavl (iavl merkle proofs).
No description provided by the author
No description provided by the author
SmtSpec constrains the format for SMT proofs (as implemented by github.com/celestiaorg/smt).
TendermintSpec constrains the format from proofs-tendermint (crypto/merkle SimpleProof).

# Structs

Use BatchEntry not CommitmentProof, to avoid recursion.
No description provided by the author
No description provided by the author
BatchProof is a group of multiple proof types than can be compressed.
CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Use BatchEntry not CommitmentProof, to avoid recursion.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ExistenceProof takes a key and a value and a set of steps to perform on it.
InnerOp represents a merkle-proof step that is not a leaf.
InnerSpec contains all store-specific structure info to determine if two proofs from a given store are neighbors.
LeafOp represents the raw key-value data we wish to prove, and must be flexible to represent the internal transformation from the original key-value pairs into the basis hash, for many existing merkle trees.
NonExistenceProof takes a proof of two neighbors, one left of the desired key, one right of the desired key.
ProofSpec defines what the expected parameters are for a given proof type.

# Type aliases

CommitmentRoot is a byte slice that represents the merkle root of a tree that can be used to validate proofs.
No description provided by the author
LengthOp defines how to process the key and value of the LeafOp to include length information.