package octez-protocol-alpha-libs

  1. Overview
  2. Docs
Octez protocol alpha libraries

Install

Dune Dependency

Authors

Maintainers

Sources

octez-19.0.tar.gz
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13

doc/octez-protocol-alpha-libs.test-helpers/Tezos_alpha_test_helpers/Account/index.html

Module Tezos_alpha_test_helpers.AccountSource

Sourcetype t = {
  1. pkh : Tezos_base.TzPervasives.Signature.Public_key_hash.t;
  2. pk : Tezos_base.TzPervasives.Signature.Public_key.t;
  3. sk : Tezos_base.TzPervasives.Signature.Secret_key.t;
}
Sourcetype account = t
Sourceval known_accounts : t Tezos_base.TzPervasives.Signature.Public_key_hash.Table.t
Sourceval activator_account : account
Sourceval dummy_account : account
Sourceval new_account : ?rng_state:Random.State.t -> ?seed:Tezos_base.TzPervasives.Bytes.t -> ?algo:Tezos_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.

Sourceval add_account : t -> unit
Sourceval find : Tezos_base.TzPervasives.Signature.Public_key_hash.t -> t Tezos_base.TzPervasives.tzresult Lwt.t
Sourceval find_alternate : Tezos_base.TzPervasives.Signature.Public_key_hash.t -> t
Sourceval default_initial_balance : Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t

4.000.000.000 tez

Sourceval generate_accounts : ?rng_state:Random.State.t -> int -> t list Tezos_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.

Sourceval commitment_secret : Tezos_protocol_alpha.Protocol.Blinded_public_key_hash.activation_code
Sourceval new_commitment : ?seed:Tezos_base.TzPervasives.Bytes.t -> unit -> (account * Tezos_protocol_alpha.Protocol.Alpha_context.Commitment.t) Tezos_base.TzPervasives.tzresult Lwt.t
Sourceval pkh_of_contract_exn : Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t -> Tezos_base.TzPervasives.Signature.Public_key_hash.t

Fails if the contract is not an implicit one

Sourceval make_bootstrap_account : ?balance:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t -> ?delegate_to:Tezos_base.TzPervasives.Signature.public_key_hash option -> ?consensus_key:Tezos_base.TzPervasives.Signature.public_key option -> t -> Tezos_protocol_alpha.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.

Sourceval make_bootstrap_accounts : ?bootstrap_balances:int64 list -> ?bootstrap_delegations: Tezos_base.TzPervasives.Signature.public_key_hash option list -> ?bootstrap_consensus_keys: Tezos_base.TzPervasives.Signature.public_key option list -> t list -> Tezos_protocol_alpha.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.

OCaml

Innovation. Community. Security.