Mina_ledger.Ledgermodule Location : Merkle_ledger.Location_intf.Smodule Db : 
  Merkle_ledger.Database_intf.S
    with module Location = Location
    with module Addr = Location.Addr
    with type root_hash := Mina_base.Ledger_hash.t
     and type hash := Mina_base.Ledger_hash.t
     and type account := Mina_base.Account.t
     and type key := Signature_lib.Public_key.Compressed.t
     and type token_id := Mina_base.Token_id.t
     and type token_id_set := Mina_base.Token_id.Set.t
     and type account_id := Mina_base.Account_id.t
     and type account_id_set := Mina_base.Account_id.Set.tmodule Any_ledger : 
  Merkle_ledger.Any_ledger.S
    with module Location = Location
    with type account := Mina_base.Account.t
     and type key := Signature_lib.Public_key.Compressed.t
     and type token_id := Mina_base.Token_id.t
     and type token_id_set := Mina_base.Token_id.Set.t
     and type account_id := Mina_base.Account_id.t
     and type account_id_set := Mina_base.Account_id.Set.t
     and type hash := Mina_base.Ledger_hash.tmodule Mask : 
  Merkle_mask.Masking_merkle_tree_intf.S
    with module Location = Location
     and module Attached.Addr = Location.Addr
    with type account := Mina_base.Account.t
     and type key := Signature_lib.Public_key.Compressed.t
     and type token_id := Mina_base.Token_id.t
     and type token_id_set := Mina_base.Token_id.Set.t
     and type account_id := Mina_base.Account_id.t
     and type account_id_set := Mina_base.Account_id.Set.t
     and type hash := Mina_base.Ledger_hash.t
     and type location := Location.t
     and type parent := Any_ledger.M.tmodule Maskable : 
  Merkle_mask.Maskable_merkle_tree_intf.S
    with module Location = Location
    with module Addr = Location.Addr
    with type account := Mina_base.Account.t
     and type key := Signature_lib.Public_key.Compressed.t
     and type token_id := Mina_base.Token_id.t
     and type token_id_set := Mina_base.Token_id.Set.t
     and type account_id := Mina_base.Account_id.t
     and type account_id_set := Mina_base.Account_id.Set.t
     and type hash := Mina_base.Ledger_hash.t
     and type root_hash := Mina_base.Ledger_hash.t
     and type unattached_mask := Mask.t
     and type attached_mask := Mask.Attached.t
     and type t := Any_ledger.M.tinclude Merkle_mask.Maskable_merkle_tree_intf.S
  with module Location := Location
  with module Addr = Location.Addr
  with type root_hash := Mina_base.Ledger_hash.t
   and type hash := Mina_base.Ledger_hash.t
   and type account := Mina_base.Account.t
   and type key := Signature_lib.Public_key.Compressed.t
   and type token_id := Mina_base.Token_id.t
   and type token_id_set := Mina_base.Token_id.Set.t
   and type account_id := Mina_base.Account_id.t
   and type account_id_set := Mina_base.Account_id.Set.t
   and type t = Mask.Attached.t
   and type attached_mask = Mask.Attached.t
   and type unattached_mask = Mask.tinclude Merkle_mask.Base_merkle_tree_intf.S
  with module Location := Location
  with module Addr = Location.Addr
  with type root_hash := Mina_base.Ledger_hash.t
  with type hash := Mina_base.Ledger_hash.t
  with type account := Mina_base.Account.t
  with type key := Signature_lib.Public_key.Compressed.t
  with type token_id := Mina_base.Token_id.t
  with type token_id_set := Mina_base.Token_id.Set.t
  with type account_id := Mina_base.Account_id.t
  with type account_id_set := Mina_base.Account_id.Set.t
  with type t = Mask.Attached.ttype t = Mask.Attached.tno deriving, purposely; signatures that include this one may add deriving
module Addr = Location.Addrmodule Path : 
  Merkle_ledger.Merkle_path.S with type hash := Mina_base.Ledger_hash.tinclude Merkle_ledger.Syncable_intf.S
  with type root_hash := Mina_base.Ledger_hash.t
   and type hash := Mina_base.Ledger_hash.t
   and type account := Mina_base.Account.t
   and type addr := Addr.t
   and type path = Path.t
   and type t := ttype path = Path.tval depth : t -> intval get_inner_hash_at_addr_exn : t -> Addr.t -> Mina_base.Ledger_hash.tval set_inner_hash_at_addr_exn : t -> Addr.t -> Mina_base.Ledger_hash.t -> unitval set_all_accounts_rooted_at_exn : 
  t ->
  Addr.t ->
  Mina_base.Account.t list ->
  unitval set_batch_accounts : t -> (Addr.t * Mina_base.Account.t) list -> unitval get_all_accounts_rooted_at_exn : 
  t ->
  Addr.t ->
  (Addr.t * Mina_base.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 : t -> int -> unitval to_list : t -> Mina_base.Account.t listlist of accounts in the ledger
val iteri : t -> f:( index -> Mina_base.Account.t -> unit ) -> unititerate over all indexes and accounts
val foldi : 
  t ->
  init:'accum ->
  f:( Addr.t -> 'accum -> Mina_base.Account.t -> 'accum ) ->
  'accumfold over accounts in the ledger, passing the Merkle address
val foldi_with_ignored_accounts : 
  t ->
  Mina_base.Account_id.Set.t ->
  init:'accum ->
  f:( Addr.t -> 'accum -> Mina_base.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 : 
  t ->
  init:'accum ->
  f:
    ( 'accum ->
      Mina_base.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 : t -> Mina_base.Account_id.Set.tset of account ids associated with accounts
val token_owner : t -> Mina_base.Token_id.t -> Mina_base.Account_id.t optionGet the account id that owns a token.
val token_owners : t -> Mina_base.Account_id.Set.tGet the set of all accounts which own a token.
val tokens : 
  t ->
  Signature_lib.Public_key.Compressed.t ->
  Mina_base.Token_id.Set.tGet all of the tokens for which a public key has accounts.
val location_of_account : t -> Mina_base.Account_id.t -> Location.t optionval location_of_account_batch : 
  t ->
  Mina_base.Account_id.t list ->
  (Mina_base.Account_id.t * Location.t option) listval get_or_create_account : 
  t ->
  Mina_base.Account_id.t ->
  Mina_base.Account.t ->
  ([ `Added | `Existed ] * Location.t) Core.Or_error.tThis may return an error if the ledger is full.
val close : t -> unitthe ledger should not be used after calling close
val last_filled : t -> Location.t optionfor account locations in the ledger, the last (rightmost) filled location
val get_uuid : t -> Uuid.tval get_directory : t -> string optionreturn Some directory for ledgers that use a file system, else None
val get : t -> Location.t -> Mina_base.Account.t optionval get_batch : 
  t ->
  Location.t list ->
  (Location.t * Mina_base.Account.t option) listval set : t -> Location.t -> Mina_base.Account.t -> unitval set_batch : t -> (Location.t * Mina_base.Account.t) list -> unitval get_at_index_exn : t -> int -> Mina_base.Account.tval set_at_index_exn : t -> int -> Mina_base.Account.t -> unitval index_of_account_exn : t -> Mina_base.Account_id.t -> intval merkle_root : t -> Mina_base.Ledger_hash.tmeant to be a fast operation: the root hash is stored, rather than calculated dynamically
val merkle_path : t -> Location.t -> Path.tval remove_accounts_exn : t -> Mina_base.Account_id.t list -> unitval detached_signal : t -> unit Async_kernel.Deferred.tTriggers when the ledger has been detached and should no longer be accessed.
type unattached_mask = Mask.ttype attached_mask = Mask.Attached.tval remove_and_reparent_exn : t -> attached_mask -> 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 ... endval unregister_mask_exn : loc:string -> Mask.Attached.t -> Mask.ttype maskable_ledger = tval with_ledger : depth:int -> f:( t -> 'a ) -> 'aval with_ephemeral_ledger : depth:int -> f:( t -> 'a ) -> 'aval create : ?directory_name:string -> depth:int -> unit -> tval create_ephemeral : depth:int -> unit -> tThis is not _really_ copy, merely a stop-gap until we remove usages of copy in our codebase. What this actually does is creates a new empty mask on top of the current ledger
val register_mask : t -> Mask.t -> Mask.Attached.tval commit : Mask.Attached.t -> unitmodule Transaction_applied : sig ... endval create_new_account_exn : 
  t ->
  Mina_base.Account_id.t ->
  Mina_base.Account.t ->
  unitRaises if the ledger is full, or if an account already exists for the given Account_id.t.
val apply_user_command : 
  constraint_constants:Genesis_constants.Constraint_constants.t ->
  txn_global_slot:Mina_numbers.Global_slot.t ->
  t ->
  Mina_base.Signed_command.With_valid_signature.t ->
  Transaction_applied.Signed_command_applied.t Core.Or_error.tval apply_fee_transfer : 
  constraint_constants:Genesis_constants.Constraint_constants.t ->
  txn_global_slot:Mina_numbers.Global_slot.t ->
  t ->
  Mina_base.Fee_transfer.t ->
  Transaction_applied.Fee_transfer_applied.t Core.Or_error.tval apply_coinbase : 
  constraint_constants:Genesis_constants.Constraint_constants.t ->
  txn_global_slot:Mina_numbers.Global_slot.t ->
  t ->
  Mina_base.Coinbase.t ->
  Transaction_applied.Coinbase_applied.t Core.Or_error.tval apply_transaction : 
  constraint_constants:Genesis_constants.Constraint_constants.t ->
  txn_state_view:Mina_base.Zkapp_precondition.Protocol_state.View.t ->
  t ->
  Mina_transaction.Transaction.t ->
  Transaction_applied.t Core.Or_error.tval update_sequence_state : 
  Snark_params.Tick.Field.t Pickles_types.Vector.Vector_5.t ->
  Mina_base.Zkapp_account.Sequence_events.t ->
  txn_global_slot:Mina_numbers.Global_slot.t ->
  last_sequence_slot:Mina_numbers.Global_slot.t ->
  Snark_params.Tick.Field.t Pickles_types.Vector.Vector_5.t
  * Mina_numbers.Global_slot.tupdate sequence state, returned slot is new last sequence slot made available here so we can use this logic in the Zkapp_command generators
val apply_zkapp_command_unchecked : 
  constraint_constants:Genesis_constants.Constraint_constants.t ->
  state_view:Mina_base.Zkapp_precondition.Protocol_state.View.t ->
  t ->
  Mina_base.Zkapp_command.t ->
  (Transaction_applied.Zkapp_command_applied.t
   * (( Mina_base.Stack_frame.value,
        Mina_base.Stack_frame.value list,
        Mina_base.Token_id.t,
        Currency.Amount.Signed.t,
        t,
        bool,
        Mina_base.Zkapp_command.Transaction_commitment.t,
        Mina_numbers.Index.t,
        Mina_base.Transaction_status.Failure.Collection.t )
        Mina_transaction_logic.Zkapp_command_logic.Local_state.t
      * Currency.Amount.Signed.t))
    Core.Or_error.tval has_locked_tokens : 
  global_slot:Mina_numbers.Global_slot.t ->
  account_id:Mina_base.Account_id.t ->
  t ->
  bool Core.Or_error.tval merkle_root_after_zkapp_command_exn : 
  constraint_constants:Genesis_constants.Constraint_constants.t ->
  txn_state_view:Mina_base.Zkapp_precondition.Protocol_state.View.t ->
  t ->
  Mina_base.Zkapp_command.Valid.t ->
  Mina_base.Ledger_hash.tval merkle_root_after_user_command_exn : 
  constraint_constants:Genesis_constants.Constraint_constants.t ->
  txn_global_slot:Mina_numbers.Global_slot.t ->
  t ->
  Mina_base.Signed_command.With_valid_signature.t ->
  Mina_base.Ledger_hash.tval create_empty_exn : 
  t ->
  Mina_base.Account_id.t ->
  Path.t * Mina_base.Account.tRaises if the ledger is full.
val num_accounts : t -> inttype init_state =
  (Signature_lib.Keypair.t
   * Currency.Amount.t
   * Mina_numbers.Account_nonce.t
   * Mina_base.Account_timing.t)
    arrayval sexp_of_init_state : init_state -> Ppx_sexp_conv_lib.Sexp.tval gen_initial_ledger_state : init_state Core.Quickcheck.Generator.tGenerate an initial ledger state. There can't be a regular Quickcheck generator for this type because you need to detach a mask from its parent when you're done with it - the GC doesn't take care of that.
val apply_initial_ledger_state : t -> init_state -> unitApply a generated state to a blank, concrete ledger.
module Ledger_inner : Mina_base.Ledger_intf.S with type t = t