Mina_ledger.Sparse_ledger
include module type of struct include Mina_base.Sparse_ledger_base end
module Stable : sig ... end
type t = Stable.Latest.t
val to_yojson : t -> Yojson.Safe.t
type sparse_ledger = t
module Global_state : sig ... end
module L :
Mina_base.Ledger_intf.S
with type t = t Core_kernel.ref
and type location = int
val merkle_root : t -> Mina_base.Ledger_hash.t
val depth : t -> int
val get_exn : t -> int -> Mina_base.Account.t
val set_exn : t -> int -> Mina_base.Account.t -> t
val path_exn :
t ->
int ->
[ `Left of Mina_base.Ledger_hash.t | `Right of Mina_base.Ledger_hash.t ] list
val find_index_exn : t -> Mina_base.Account_id.t -> int
val of_root : depth:int -> Mina_base.Ledger_hash.t -> t
val empty : depth:int -> unit -> t
Create a new 'empty' ledger. This ledger has an invalid root hash, and cannot be used except as a placeholder.
val add_path :
t ->
[ `Left of Snark_params.Tick.Field.t | `Right of Snark_params.Tick.Field.t ]
list ->
Mina_base.Account_id.t ->
Mina_base.Account.t ->
t
val iteri :
t ->
f:( Mina_base.Account.Index.t -> Mina_base.Account.t -> unit ) ->
unit
val handler : t -> Snark_params.Tick.Handler.t Core_kernel.Staged.t
val has_locked_tokens_exn :
global_slot:Mina_numbers.Global_slot.t ->
account_id:Mina_base.Account_id.t ->
t ->
bool
module GS = Global_state
val of_any_ledger : Ledger.Any_ledger.witness -> t
val of_ledger_subset_exn : Ledger.t -> Mina_base.Account_id.t list -> t
val of_ledger_index_subset_exn : Ledger.Any_ledger.witness -> int list -> t
module T : sig ... end
val apply_zkapp_command_unchecked_with_states :
constraint_constants:Genesis_constants.Constraint_constants.t ->
state_view:Mina_base.Zkapp_precondition.Protocol_state.View.t ->
fee_excess:Currency.Amount.Signed.t ->
supply_increase:Currency.Amount.Signed.t ->
( Mina_base.Ledger_hash.Stable.V1.t,
Mina_base.Account_id.Stable.V2.t,
Mina_base.Account.Stable.V2.t )
Sparse_ledger_lib.Sparse_ledger.T.Stable.V2.t ->
Mina_base.Zkapp_command.t ->
( T.Transaction_applied.Zkapp_command_applied.t
* (GS.t
* ( Mina_base.Stack_frame.value,
Mina_base.Stack_frame.value list,
Mina_base.Token_id.t,
Currency.Amount.Signed.t,
( Mina_base.Ledger_hash.Stable.V1.t,
Mina_base.Account_id.Stable.V2.t,
Mina_base.Account.Stable.V2.t )
Sparse_ledger_lib.Sparse_ledger.T.Stable.V2.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)
list,
Core_kernel__.Error.t )
Core_kernel.Result.t
val apply_user_command :
constraint_constants:Genesis_constants.Constraint_constants.t ->
txn_global_slot:Mina_transaction_logic.Global_slot.t ->
( Mina_base.Ledger_hash.Stable.V1.t,
Mina_base.Account_id.Stable.V2.t,
Mina_base.Account.Stable.V2.t )
Sparse_ledger_lib.Sparse_ledger.T.Stable.V2.t ->
Mina_base.Signed_command.With_valid_signature.t ->
(( Mina_base.Ledger_hash.Stable.V1.t,
Mina_base.Account_id.Stable.V2.t,
Mina_base.Account.Stable.V2.t )
Sparse_ledger_lib.Sparse_ledger.T.Stable.V2.t
* T.Transaction_applied.Signed_command_applied.t)
Base__Or_error.t
val apply_transaction' :
constraint_constants:Genesis_constants.Constraint_constants.t ->
txn_state_view:Mina_base.Zkapp_precondition.Protocol_state.View.t ->
L.t ->
Mina_transaction.Transaction.t ->
T.Transaction_applied.t Core_kernel.Or_error.t
val apply_transaction :
constraint_constants:Genesis_constants.Constraint_constants.t ->
txn_state_view:Mina_base.Zkapp_precondition.Protocol_state.View.t ->
( Mina_base.Ledger_hash.Stable.V1.t,
Mina_base.Account_id.Stable.V2.t,
Mina_base.Account.Stable.V2.t )
Sparse_ledger_lib.Sparse_ledger.T.Stable.V2.t ->
Mina_transaction.Transaction.t ->
(( Mina_base.Ledger_hash.Stable.V1.t,
Mina_base.Account_id.Stable.V2.t,
Mina_base.Account.Stable.V2.t )
Sparse_ledger_lib.Sparse_ledger.T.Stable.V2.t
* T.Transaction_applied.t)
Base__Or_error.t