1-Test.Maskableinclude Merkle_mask.Base_merkle_tree_intf.S
with module Location = Location
with module Addr = Location.Addr
with type account := Test_stubs.Account.t
with type root_hash := Test_stubs.Hash.t
with type hash := Test_stubs.Hash.t
with type t := Base.t
with type key := Test_stubs.Key.t
with type token_id := Test_stubs.Token_id.t
with type token_id_set := Test_stubs.Token_id.Set.t
with type account_id := Test_stubs.Account_id.t
with type account_id_set := Test_stubs.Account_id.Set.tmodule Addr = Location.Addrmodule Path : Merkle_ledger.Merkle_path.S with type hash := Test_stubs.Hash.tmodule Location = Locationinclude Merkle_ledger.Syncable_intf.S
with type root_hash := Test_stubs.Hash.t
and type hash := Test_stubs.Hash.t
and type account := Test_stubs.Account.t
and type addr := Addr.t
and type path = Path.t
and type t := Base.ttype path = Path.tval depth : Base.t -> intval num_accounts : Base.t -> intval get_inner_hash_at_addr_exn : Base.t -> Addr.t -> Test_stubs.Hash.tval set_inner_hash_at_addr_exn : Base.t -> Addr.t -> Test_stubs.Hash.t -> unitval set_all_accounts_rooted_at_exn :
Base.t ->
Addr.t ->
Test_stubs.Account.t list ->
unitval set_batch_accounts : Base.t -> (Addr.t * Test_stubs.Account.t) list -> unitval get_all_accounts_rooted_at_exn :
Base.t ->
Addr.t ->
(Addr.t * Test_stubs.Account.t) listGet all of the accounts that are in a subtree of the underlying Merkle tree rooted at `address`. The accounts are ordered by their addresses.
val make_space_for : Base.t -> int -> unitval to_list : Base.t -> Test_stubs.Account.t listlist of accounts in the ledger
val iteri : Base.t -> f:( index -> Test_stubs.Account.t -> unit ) -> unititerate over all indexes and accounts
val foldi :
Base.t ->
init:'accum ->
f:( Addr.t -> 'accum -> Test_stubs.Account.t -> 'accum ) ->
'accumfold over accounts in the ledger, passing the Merkle address
val foldi_with_ignored_accounts :
Base.t ->
Test_stubs.Account_id.Set.t ->
init:'accum ->
f:( Addr.t -> 'accum -> Test_stubs.Account.t -> 'accum ) ->
'accumthe set of account_ids are ledger elements to skip during the fold, because they're in a mask
val fold_until :
Base.t ->
init:'accum ->
f:
( 'accum ->
Test_stubs.Account.t ->
( 'accum, 'stop ) Base.Continue_or_stop.t ) ->
finish:( 'accum -> 'stop ) ->
'stopfold over accounts until stop condition reached when calling f; calls finish for result
val accounts : Base.t -> Test_stubs.Account_id.Set.tset of account ids associated with accounts
val token_owner :
Base.t ->
Test_stubs.Token_id.t ->
Test_stubs.Account_id.t optionGet the account id that owns a token.
val token_owners : Base.t -> Test_stubs.Account_id.Set.tGet the set of all accounts which own a token.
val tokens : Base.t -> Test_stubs.Key.t -> Test_stubs.Token_id.Set.tGet all of the tokens for which a public key has accounts.
val location_of_account :
Base.t ->
Test_stubs.Account_id.t ->
Location.t optionval location_of_account_batch :
Base.t ->
Test_stubs.Account_id.t list ->
(Test_stubs.Account_id.t * Location.t option) listval get_or_create_account :
Base.t ->
Test_stubs.Account_id.t ->
Test_stubs.Account.t ->
([ `Added | `Existed ] * Location.t) Core.Or_error.tThis may return an error if the ledger is full.
val close : Base.t -> unitthe ledger should not be used after calling close
val last_filled : Base.t -> Location.t optionfor account locations in the ledger, the last (rightmost) filled location
val get_uuid : Base.t -> Uuid.tval get_directory : Base.t -> string optionreturn Some directory for ledgers that use a file system, else None
val get : Base.t -> Location.t -> Test_stubs.Account.t optionval get_batch :
Base.t ->
Location.t list ->
(Location.t * Test_stubs.Account.t option) listval set : Base.t -> Location.t -> Test_stubs.Account.t -> unitval set_batch : Base.t -> (Location.t * Test_stubs.Account.t) list -> unitval get_at_index_exn : Base.t -> int -> Test_stubs.Account.tval set_at_index_exn : Base.t -> int -> Test_stubs.Account.t -> unitval index_of_account_exn : Base.t -> Test_stubs.Account_id.t -> intval merkle_root : Base.t -> Test_stubs.Hash.tmeant to be a fast operation: the root hash is stored, rather than calculated dynamically
val merkle_path : Base.t -> Location.t -> Path.tval remove_accounts_exn : Base.t -> Test_stubs.Account_id.t list -> unitval detached_signal : Base.t -> unit Async_kernel.Deferred.tTriggers when the ledger has been detached and should no longer be accessed.
val register_mask : Base.t -> Mask.t -> Mask.Attached.tval unregister_mask_exn :
?grandchildren:
[ `Check | `Recursive | `I_promise_I_am_reparenting_this_mask ] ->
loc:string ->
Mask.Attached.t ->
Mask.traises an exception if mask is not registered
val remove_and_reparent_exn : Base.t -> Mask.Attached.t -> unit* o * / * / * o --- o - * ^ ^ \ * parent | \ * mask o * children * * Removes the attached mask from its parent and attaches the children to the * parent instead. Raises an exception if the merkle roots of the mask and the * parent are not the same.
module Debug : sig ... end