Documentation ¶
Index ¶
- func CommitmentToTheTerminalNode(p *trie_blake2b.Proof) []byte
- func IsProofOfAbsence(p *trie_blake2b.Proof) bool
- func MustKeyWithTerminal(p *trie_blake2b.Proof) ([]byte, []byte)
- func Validate(p *trie_blake2b.Proof, rootBytes []byte) error
- func ValidateWithValue(p *trie_blake2b.Proof, rootBytes []byte, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommitmentToTheTerminalNode ¶
func CommitmentToTheTerminalNode(p *trie_blake2b.Proof) []byte
CommitmentToTheTerminalNode returns hash of the last node in the proof If it is a valid proof, it s always contains terminal commitment It is useful to get commitment to the sub-state. It must contain some value at its nil postfix
func IsProofOfAbsence ¶
func IsProofOfAbsence(p *trie_blake2b.Proof) bool
IsProofOfAbsence checks if it is proof of absence. Proof that the trie commits to something else in the place where it would commit to the key if it would be present
func MustKeyWithTerminal ¶
func MustKeyWithTerminal(p *trie_blake2b.Proof) ([]byte, []byte)
MustKeyWithTerminal returns key and terminal commitment the proof is about. It returns: - key - commitment slice of up to hashSize bytes long. If it is nil, the proof is a proof of absence It does not verify the proof, so this function should be used only after Validate()
func Validate ¶
func Validate(p *trie_blake2b.Proof, rootBytes []byte) error
Validate check the proof against the provided root commitments
func ValidateWithValue ¶
func ValidateWithValue(p *trie_blake2b.Proof, rootBytes []byte, value []byte) error
ValidateWithValue checks the proof and checks if the proof commits to the specific value
Types ¶
This section is empty.