package octez-l2-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-l2-libs.scoru-wasm/Tezos_scoru_wasm/Durable/index.html
Module Tezos_scoru_wasm.DurableSource
t allows a wrapped_tree to be manipulated as a tree of chunked_byte_vector
key was too long, or contained invalid steps.
Invalid index for a subkey
A value was not found in the durable store.
A tree does not exists under key in the durable store.
Attempted to write/read to/from a value at offset, beyond the limit.
Durable_storage.t was empty.
Cannot modify a readonly value.
Cannot read from or write to more than 2,048 bytes
encoding is a Tezos_tree_encoding for t.
Type describing the behavior of generic functions:
Valueindicates the operation should work on the value onlyDirectoryindicates the operation should work on the value and all subkeys under the given key.
See hash, for example.
key is the type that indexes t. It enforces several constraints:
- a key's length is bounded.
- a key is a series of non-empty steps, where
- a step is preceded by '/'
- a step only contains alphanumeric ascii, or dots ('.')
max_key_length is the maximum length of a key in bytes.
exists tree key returns true iff there exists a value or a directory under key in tree, and false otherwise.
find_value durable key optionally looks for the value encoded at key in durable.
copy_tree_exn tree ?edit_readonly from_key to_key produces a new tree in which a copy of the entire subtree at from_key is copied to to_key.
~edit_readonly:true allows a a tree to be copied into a readonly location.
move_tree_exn tree from_key to_key produces a new tree in which the entire subtree at from_key is moved to to_key.
count_subtrees durable key returns the number of subtrees under key.
subtree_name_at durable key n returns the name of the n_th subtree under key.
delete ?edit_readonly ~kind durable key deletes the value of key if kind = `Value, and subtrees and/or values of key if kind = `All.
hash ~kind durable key retrieves the tree hash of the value (if kind = Value) or the complete directory (kind = Directory) at the given key. This is not the same as the hash of the value.
hash_exn ~kind durable key retrieves the tree hash of the value (if kind = Value) or the complete directory (kind = Directory) at the given key. This is not the same as the hash of the value.
set_value_exn durable key str installs the value str in durable under key, replacing any previous contents under this key without fetching it.
create_value_exn ?edit_readonly durable key size allocates a new value of size at the given key. Returns Some durable if the value didn't exist, and None if there was already a value at the given key
write_value_exn ?edit_readonly durable key offset bytes writes bytes to key, starting at the given offset.
If no value at key exists, it is created.
~edit_readonly:true allows a value to be written into a readonly location.
read_value durable key offset max_bytes reads up to max_bytes bytes from the value at key, starting at the given offset.