Versions in this module Expand all Collapse all v1 v1.0.2 Mar 31, 2020 v1.0.1 Mar 31, 2020 Changes in this version + const Version + func PrintIAVLNode(node *IAVLNode) + func SimpleHashFromBinaries(items []interface{}) []byte + func SimpleHashFromBinary(item interface{}) []byte + func SimpleHashFromHashables(items []Hashable) []byte + func SimpleHashFromHashes(hashes [][]byte) []byte + func SimpleHashFromMap(m map[string]interface{}) []byte + func SimpleHashFromTwoHashes(left []byte, right []byte) []byte + type Hashable interface + Hash func() []byte + func MakeSortedKVPairs(m map[string]interface{}) []Hashable + type IAVLNode struct + func MakeIAVLNode(buf []byte, t *IAVLTree) (node *IAVLNode, err error) + func NewIAVLNode(key []byte, value []byte) *IAVLNode + type IAVLProof struct + InnerNodes []IAVLProofInnerNode + LeafHash []byte + RootHash []byte + func ReadProof(data []byte) (*IAVLProof, error) + func (proof *IAVLProof) Root() []byte + func (proof *IAVLProof) Verify(key []byte, value []byte, root []byte) bool + type IAVLProofInnerNode struct + Height int8 + Left []byte + Right []byte + Size int + func (branch IAVLProofInnerNode) Hash(childHash []byte) []byte + type IAVLProofLeafNode struct + KeyBytes []byte + ValueBytes []byte + func (leaf IAVLProofLeafNode) Hash() []byte + type IAVLTree struct + func NewIAVLTree(cacheSize int, db dbm.DB) *IAVLTree + func (t *IAVLTree) ConstructProof(key []byte) (value []byte, proof *IAVLProof) + func (t *IAVLTree) Copy() Tree + func (t *IAVLTree) Get(key []byte) (index int, value []byte, exists bool) + func (t *IAVLTree) GetByIndex(index int) (key []byte, value []byte) + func (t *IAVLTree) Has(key []byte) bool + func (t *IAVLTree) Hash() []byte + func (t *IAVLTree) HashWithCount() ([]byte, int) + func (t *IAVLTree) Height() int8 + func (t *IAVLTree) Iterate(fn func(key []byte, value []byte) bool) (stopped bool) + func (t *IAVLTree) IterateRange(start, end []byte, ascending bool, fn func(key []byte, value []byte) bool) (stopped bool) + func (t *IAVLTree) Load(hash []byte) + func (t *IAVLTree) Proof(key []byte) (value []byte, proofBytes []byte, exists bool) + func (t *IAVLTree) Remove(key []byte) (value []byte, removed bool) + func (t *IAVLTree) Save() []byte + func (t *IAVLTree) Set(key []byte, value []byte) (updated bool) + func (t *IAVLTree) Size() int + type KVPair struct + Key string + Value interface{} + func (kv KVPair) Hash() []byte + type KVPairs []KVPair + func (kvps KVPairs) Len() int + func (kvps KVPairs) Less(i, j int) bool + func (kvps KVPairs) Sort() + func (kvps KVPairs) Swap(i, j int) + type SimpleProof struct + Aunts [][]byte + func SimpleProofsFromHashables(items []Hashable) (rootHash []byte, proofs []*SimpleProof) + func (sp *SimpleProof) String() string + func (sp *SimpleProof) StringIndented(indent string) string + func (sp *SimpleProof) Verify(index int, total int, leafHash []byte, rootHash []byte) bool + type SimpleProofNode struct + Hash []byte + Left *SimpleProofNode + Parent *SimpleProofNode + Right *SimpleProofNode + func (spn *SimpleProofNode) FlattenAunts() [][]byte + 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)