# Functions
New creates the trie instance with provided trie id and the read-only database.
NewDatabase initializes the trie database with default settings, namely the legacy hash-based scheme is used by default.
NewDatabaseWithConfig initializes the trie database with provided configs.
NewDifferenceIterator constructs a NodeIterator that iterates over elements in b that are not in a.
NewEmpty is a shortcut to create empty tree.
NewFromBinary initialises a serialized stacktrie with the given db.
NewIterator creates a new key-value iterator from a node iterator.
NewSecure creates a new StateTrie.
NewStackTrie allocates and initializes an empty trie.
NewStackTrieWithOwner allocates and initializes an empty trie, but with the additional owner field.
NewStateTrie creates a trie with an existing root node from a backing database.
NewUnionIterator constructs a NodeIterator that iterates over elements in the union of the provided NodeIterators.
StateTrieID constructs an identifier for state trie with the provided state root.
StorageTrieID constructs an identifier for storage trie which belongs to a certain state and contract specified by the stateRoot and owner.
TrieID constructs an identifier for a standard trie(not a second-layer trie) with provided root.
VerifyProof checks merkle proofs.
VerifyRangeProof checks whether the given leaf nodes and edge proof can prove the given trie leaves range is matched with the specific root.
# Variables
No description provided by the author
ErrCommitted is returned when a already committed trie is requested for usage.
# Structs
Config defines all necessary options for database.
Database is the wrapper of the underlying backend which is shared by different types of node backend as an entrypoint.
ID is the identifier for uniquely identifying a trie.
Iterator is a key-value trie iterator that traverses a Trie.
MissingNodeError is returned by the trie functions (Get, Update, Delete) in the case where a trie node is not present in the local database.
StackTrie is a trie implementation that expects keys to be inserted in order.
StateTrie wraps a trie with key hashing.
Trie is a Merkle Patricia Trie.
# Interfaces
NodeIterator is an iterator to traverse the trie pre-order.
Reader wraps the Node method of a backing trie store.
# Type aliases
NodeResolver is used for looking up trie nodes before reaching into the real persistent layer.
NodeWriteFunc is used to provide all information of a dirty node for committing so that callers can flush nodes into database with desired scheme.
SecureTrie is the old name of StateTrie.