Versions in this module Expand all Collapse all v0 v0.34.24 Mar 7, 2023 Changes in this version + const KeyEncodingHex + const KeyEncodingMax + const KeyEncodingURL + const MaxAunts + const ProofOpValue + func HashFromByteSlices(items [][]byte) []byte + func HashFromByteSlicesIterative(input [][]byte) []byte + func KeyPathToKeys(path string) (keys [][]byte, err error) + type Key struct + type KeyPath []Key + func (pth KeyPath) AppendKey(key []byte, enc keyEncoding) KeyPath + func (pth KeyPath) String() string + type OpDecoder func(tmcrypto.ProofOp) (ProofOperator, error) + type Proof struct + Aunts [][]byte + Index int64 + LeafHash []byte + Total int64 + func ProofFromProto(pb *tmcrypto.Proof) (*Proof, error) + func ProofsFromByteSlices(items [][]byte) (rootHash []byte, proofs []*Proof) + func (sp *Proof) ComputeRootHash() []byte + func (sp *Proof) String() string + func (sp *Proof) StringIndented(indent string) string + func (sp *Proof) ToProto() *tmcrypto.Proof + func (sp *Proof) ValidateBasic() error + func (sp *Proof) Verify(rootHash []byte, leaf []byte) error + type ProofNode struct + Hash []byte + Left *ProofNode + Parent *ProofNode + Right *ProofNode + func (spn *ProofNode) FlattenAunts() [][]byte + type ProofOperator interface + GetKey func() []byte + ProofOp func() tmcrypto.ProofOp + Run func([][]byte) ([][]byte, error) + func ValueOpDecoder(pop tmcrypto.ProofOp) (ProofOperator, error) + type ProofOperators []ProofOperator + func (poz ProofOperators) Verify(root []byte, keypath string, args [][]byte) (err error) + func (poz ProofOperators) VerifyValue(root []byte, keypath string, value []byte) (err error) + type ProofRuntime struct + func DefaultProofRuntime() (prt *ProofRuntime) + func NewProofRuntime() *ProofRuntime + func (prt *ProofRuntime) Decode(pop tmcrypto.ProofOp) (ProofOperator, error) + func (prt *ProofRuntime) DecodeProof(proof *tmcrypto.ProofOps) (ProofOperators, error) + func (prt *ProofRuntime) RegisterOpDecoder(typ string, dec OpDecoder) + func (prt *ProofRuntime) Verify(proof *tmcrypto.ProofOps, root []byte, keypath string, args [][]byte) (err error) + func (prt *ProofRuntime) VerifyAbsence(proof *tmcrypto.ProofOps, root []byte, keypath string) (err error) + func (prt *ProofRuntime) VerifyValue(proof *tmcrypto.ProofOps, root []byte, keypath string, value []byte) (err error) + type Tree interface + Copy func() Tree + Get func(key []byte) (index int, value []byte, exists bool) + GetByIndex func(index int) (key []byte, value []byte) + Has func(key []byte) (has bool) + Hash func() (hash []byte) + HashWithCount func() (hash []byte, count int) + Height func() (height int8) + Iterate func(func(key []byte, value []byte) (stop bool)) (stopped bool) + IterateRange func(start []byte, end []byte, ascending bool, ...) (stopped bool) + Load func(hash []byte) + Proof func(key []byte) (value []byte, proof []byte, exists bool) + Remove func(key []byte) (value []byte, removed bool) + Save func() (hash []byte) + Set func(key []byte, value []byte) (updated bool) + Size func() (size int) + type ValueOp struct + Proof *Proof + func NewValueOp(key []byte, proof *Proof) ValueOp + func (op ValueOp) GetKey() []byte + func (op ValueOp) ProofOp() tmcrypto.ProofOp + func (op ValueOp) Run(args [][]byte) ([][]byte, error) + func (op ValueOp) String() string