Mavryk_001_PtAtLas_test_helpers.Account
type account = t
val known_accounts :
t Mavryk_base.TzPervasives.Signature.Public_key_hash.Table.t
val activator_account : account
val dummy_account : account
val new_account :
?rng_state:Stdlib.Random.State.t ->
?seed:Mavryk_base.TzPervasives.Bytes.t ->
?algo:Mavryk_base.TzPervasives.Signature.algo ->
unit ->
account
new_account ?rng_state ?seed ?algo ()
creates a new account with curve algo
with the given seed
(or rng_state
to generate the seed) and add it to the global account state.
val add_account : t -> unit
val find :
Mavryk_base.TzPervasives.Signature.Public_key_hash.t ->
t Mavryk_base.TzPervasives.tzresult Lwt.t
val find_alternate : Mavryk_base.TzPervasives.Signature.Public_key_hash.t -> t
val default_initial_balance :
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t
4.000.000.000 mav
val generate_accounts :
?rng_state:Stdlib.Random.State.t ->
int ->
t list Mavryk_base.TzPervasives.tzresult
generate_accounts ?rng_state n
first frees the global account state then generates n
random accounts with rng_state
to generate the seed and adds them to the global account state.
val commitment_secret :
Mavryk_protocol_001_PtAtLas.Protocol.Blinded_public_key_hash.activation_code
val new_commitment :
?seed:Mavryk_base.TzPervasives.Bytes.t ->
unit ->
(account * Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Commitment.t)
Mavryk_base.TzPervasives.tzresult
Lwt.t
val pkh_of_contract_exn :
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Contract.t ->
Mavryk_base.TzPervasives.Signature.Public_key_hash.t
Fails if the contract is not an implicit one
val make_bootstrap_account :
?balance:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t ->
?delegate_to:Mavryk_base.TzPervasives.Signature.public_key_hash option ->
?consensus_key:Mavryk_base.TzPervasives.Signature.public_key option ->
t ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Parameters.bootstrap_account
make_bootstrap_account ~initial_balance ~delegate_to account
creates a Parameters
.bootstrap_account from an account with the default or set values. default initial_balance
is default_initial_balance
, delegate_to
is None
and consensus_key
is None
.
val make_bootstrap_accounts :
?bootstrap_balances:int64 list ->
?bootstrap_delegations:
Mavryk_base.TzPervasives.Signature.public_key_hash option list ->
?bootstrap_consensus_keys:
Mavryk_base.TzPervasives.Signature.public_key option list ->
t list ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Parameters.bootstrap_account
list
make_bootstrap_accounts ~bootstrap_balances ~bootstrap_delegations
~bootstrap_consensus_keys accounts
combines the lists accounts
, bootstrap_balances
, bootstrap_delegations
and bootstrap_consensus_keys
to create a list of Parameters
.bootstrap_account using make_bootstrap_account
.