Checks if an entry with key key
exists in this tree using proof proof
.
Checks if an entry with key key
exists in this tree using proof proof
.
Throws exception if proof is incorrect
a key of an element of this authenticated dictionary.
CAUTION! Does not support multiple keys check, use getMany instead.
Return true
if a leaf with the key key
exists
Return false
if leaf with provided key does not exist.
Returns digest of the state represented by this tree.
Returns digest of the state represented by this tree. Authenticated tree digest = root hash bytes ++ tree height
2.0
Flags of enabled operations packed in single byte.
Flags of enabled operations packed in single byte. isInsertAllowed == (enabledOperations & 0x01) != 0 isUpdateAllowed == (enabledOperations & 0x02) != 0 isRemoveAllowed == (enabledOperations & 0x04) != 0
Perform a lookup of key key
in this tree using proof proof
.
Perform a lookup of key key
in this tree using proof proof
.
Throws exception if proof is incorrect
a key of an element of this authenticated dictionary.
CAUTION! Does not support multiple keys check, use getMany instead.
Return Some(bytes) of leaf with key key
if it exists
Return None if leaf with provided key does not exist.
Perform a lookup of many keys keys
in this tree using proof proof
.
Perform a lookup of many keys keys
in this tree using proof proof
.
keys of elements of this authenticated dictionary.
CAUTION! Keys must be ordered the same way they were in lookup before proof was generated. For each key return Some(bytes) of leaf if it exists and None if is doesn't.
Perform insertions of key-value entries into this tree using proof proof
.
Perform insertions of key-value entries into this tree using proof proof
.
Throws exception if proof is incorrect
collection of key-value pairs to insert in this authenticated dictionary.
CAUTION! Pairs must be ordered the same way they were in insert ops before proof was generated. Return Some(newTree) if successful Return None if operations were not performed.
Checks if Insert operation is allowed for this tree instance.
Checks if Remove operation is allowed for this tree instance.
Checks if Update operation is allowed for this tree instance.
All the elements under the tree have the same length of the keys
Perform removal of entries into this tree using proof proof
.
Perform removal of entries into this tree using proof proof
.
Throws exception if proof is incorrect
Return Some(newTree) if successful
Return None if operations were not performed.
collection of keys to remove from this authenticated dictionary.
CAUTION! Keys must be ordered the same way they were in remove ops before proof was generated.
Perform updates of key-value entries into this tree using proof proof
.
Perform updates of key-value entries into this tree using proof proof
.
Throws exception if proof is incorrect
collection of key-value pairs to update in this authenticated dictionary.
CAUTION! Pairs must be ordered the same way they were in update ops before proof was generated. Return Some(newTree) if successful Return None if operations were not performed.
Replace digest of this tree producing a new tree.
Replace digest of this tree producing a new tree. Since AvlTree is immutable, this tree instance remains unchanged.
a new digest
a copy of this AvlTree instance where this.digest
replaced by newDigest
Enable/disable operations of this tree producing a new tree.
Enable/disable operations of this tree producing a new tree.
Since AvlTree is immutable, this
tree instance remains unchanged.
a new flags which specify available operations on a new tree.
a copy of this AvlTree instance where this.enabledOperations
replaced by newOperations
If non-empty, all the values under the tree are of the same length.
(Since version ) see corresponding Javadoc for more information.
Type of data which efficiently authenticates potentially huge dataset having key-value dictionary interface. Only root hash of dynamic AVL+ tree, tree height, key length, optional value length, and access flags are stored in an instance of the datatype.
Please note that standard hash function from
scorex.crypto.hash
is used, and height is stored along with root hash of the tree, thusdigest
size is always CryptoConstants.hashLength + 1 bytes.This interface is used as runtime representation of the AvlTree type of ErgoTree.