Versions in this module Expand all Collapse all v0 v0.31.12 Oct 9, 2022 Changes in this version + type ProofOpVerifier func(ProofOperator) error v0.31.11 Oct 29, 2019 Changes in this version + const KeyEncodingHex + const KeyEncodingMax + const KeyEncodingURL + const ProofOpSimpleValue + var ErrIntOverflowMerkle = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthMerkle = fmt.Errorf("proto: negative length found during unmarshaling") + func KeyPathToKeys(path string) (keys [][]byte, err error) + func SimpleHashFromByteSlices(items [][]byte) []byte + func SimpleHashFromByteSlicesIterative(input [][]byte) []byte + func SimpleHashFromMap(m map[string][]byte) []byte + func SimpleProofsFromMap(m map[string][]byte) (rootHash []byte, proofs map[string]*SimpleProof, keys []string) + type KVPair cmn.KVPair + func (kv KVPair) Bytes() []byte + type Key struct + type KeyPath []Key + func (pth KeyPath) AppendKey(key []byte, enc keyEncoding) KeyPath + func (pth KeyPath) String() string + type OpDecoder func(ProofOp) (ProofOperator, error) + type Proof struct + Ops []ProofOp + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func NewPopulatedProof(r randyMerkle, easy bool) *Proof + func (*Proof) Descriptor() ([]byte, []int) + func (*Proof) ProtoMessage() + func (dst *Proof) XXX_Merge(src proto.Message) + func (m *Proof) GetOps() []ProofOp + func (m *Proof) Marshal() (dAtA []byte, err error) + func (m *Proof) MarshalTo(dAtA []byte) (int, error) + func (m *Proof) Reset() + func (m *Proof) Size() (n int) + func (m *Proof) String() string + func (m *Proof) Unmarshal(dAtA []byte) error + func (m *Proof) XXX_DiscardUnknown() + func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Proof) XXX_Size() int + func (m *Proof) XXX_Unmarshal(b []byte) error + func (this *Proof) Equal(that interface{}) bool + type ProofOp struct + Data []byte + Key []byte + Type string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func NewPopulatedProofOp(r randyMerkle, easy bool) *ProofOp + func (*ProofOp) Descriptor() ([]byte, []int) + func (*ProofOp) ProtoMessage() + func (dst *ProofOp) XXX_Merge(src proto.Message) + func (m *ProofOp) GetData() []byte + func (m *ProofOp) GetKey() []byte + func (m *ProofOp) GetType() string + func (m *ProofOp) Marshal() (dAtA []byte, err error) + func (m *ProofOp) MarshalTo(dAtA []byte) (int, error) + func (m *ProofOp) Reset() + func (m *ProofOp) Size() (n int) + func (m *ProofOp) String() string + func (m *ProofOp) Unmarshal(dAtA []byte) error + func (m *ProofOp) XXX_DiscardUnknown() + func (m *ProofOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ProofOp) XXX_Size() int + func (m *ProofOp) XXX_Unmarshal(b []byte) error + func (this *ProofOp) Equal(that interface{}) bool + type ProofOperator interface + GetKey func() []byte + ProofOp func() ProofOp + Run func([][]byte) ([][]byte, error) + func SimpleValueOpDecoder(pop 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 ProofOp) (ProofOperator, error) + func (prt *ProofRuntime) DecodeProof(proof *Proof) (ProofOperators, error) + func (prt *ProofRuntime) RegisterOpDecoder(typ string, dec OpDecoder) + func (prt *ProofRuntime) Verify(proof *Proof, root []byte, keypath string, args [][]byte) (err error) + func (prt *ProofRuntime) VerifyAbsence(proof *Proof, root []byte, keypath string) (err error) + func (prt *ProofRuntime) VerifyValue(proof *Proof, root []byte, keypath string, value []byte) (err error) + type SimpleProof struct + Aunts [][]byte + Index int + LeafHash []byte + Total int + func SimpleProofsFromByteSlices(items [][]byte) (rootHash []byte, proofs []*SimpleProof) + func (sp *SimpleProof) ComputeRootHash() []byte + func (sp *SimpleProof) String() string + func (sp *SimpleProof) StringIndented(indent string) string + func (sp *SimpleProof) ValidateBasic() error + func (sp *SimpleProof) Verify(rootHash []byte, leaf []byte) error + type SimpleProofNode struct + Hash []byte + Left *SimpleProofNode + Parent *SimpleProofNode + Right *SimpleProofNode + func (spn *SimpleProofNode) FlattenAunts() [][]byte + type SimpleValueOp struct + Proof *SimpleProof + func NewSimpleValueOp(key []byte, proof *SimpleProof) SimpleValueOp + func (op SimpleValueOp) GetKey() []byte + func (op SimpleValueOp) ProofOp() ProofOp + func (op SimpleValueOp) Run(args [][]byte) ([][]byte, error) + func (op SimpleValueOp) String() string + 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)