Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKeyNotFoundInProofTrie = errors.New("key not found in proof trie") ErrValueMismatchProofTrie = errors.New("value found in proof trie does not match") )
View Source
var ( ErrEmptyProof = errors.New("proof slice empty") ErrRootNodeNotFound = errors.New("root node not found in proof") )
View Source
var (
ErrKeyNotFound = errors.New("key not found")
)
Functions ¶
func Generate ¶
func Generate(rootHash []byte, fullKeys [][]byte, database db.DBGetter) ( encodedProofNodes [][]byte, err error)
Generate generates and deduplicates the encoded proof nodes for the trie corresponding to the root hash given, and for the slice of (Little Endian) full keys given. The database given is used to load the trie using the root hash given.
func Verify ¶
Verify verifies a given key and value belongs to the trie by creating a proof trie based on the encoded proof nodes given. The order of proofs is ignored. A nil error is returned on success. Note this is exported because it is imported and used by: https://github.com/ComposableFi/ibc-go/blob/6d62edaa1a3cb0768c430dab81bb195e0b0c72db/modules/light-clients/11-beefy/types/client_state.go#L78
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.