interface MerkleTrie<in K, V> (source)
A Merkle Trie.
abstract suspend fun get(key: K): V?
Returns the value that corresponds to the specified key, or an empty byte array if no such value exists. |
|
open fun getAsync(key: K): AsyncResult<Optional<V>>
Returns the value that corresponds to the specified key, or an empty byte array if no such value exists. |
|
abstract suspend fun put(key: K, value: V?): Unit
Updates the value that corresponds to the specified key, creating the value if one does not already exist. |
|
open fun putAsync(key: K, value: V?): AsyncCompletion
Updates the value that corresponds to the specified key, creating the value if one does not already exist. |
|
abstract suspend fun remove(key: K): Unit
Deletes the value that corresponds to the specified key, if such a value exists. |
|
open fun removeAsync(key: K): AsyncCompletion
Deletes the value that corresponds to the specified key, if such a value exists. |
|
abstract fun rootHash(): Bytes32
Returns the KECCAK256 hash of the root node of the trie. |
val EMPTY_TRIE_ROOT_HASH: Bytes32
The root hash of an empty tree. |
class MerklePatriciaTrie<V> : MerkleTrie<Bytes, V>
An in-memory MerkleTrie. |
|
class StoredMerklePatriciaTrie<V> : MerkleTrie<Bytes, V>
A MerkleTrie that persists trie nodes to a MerkleStorage key/value store. |