package octez-protocol-alpha-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val list_contract_labels : Protocol_client_context.full -> chain:Tezos_shell_services.Shell_services.chain -> block:Tezos_shell_services.Shell_services.block -> (string * string * string) list Tezos_base.TzPervasives.tzresult Lwt.t
val register_global_constant : Protocol_client_context.full -> chain:Tezos_shell_services.Shell_services.chain -> block:Tezos_shell_services.Shell_services.block -> ?confirmations:int -> ?dry_run:bool -> ?verbose_signing:bool -> ?simulation:bool -> ?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t -> ?gas_limit:Tezos_protocol_alpha.Protocol.Alpha_context.Gas.Arith.integral -> ?storage_limit:Z.t -> ?counter:Tezos_protocol_alpha.Protocol.Alpha_context.Manager_counter.t -> source:Tezos_base.TzPervasives.Signature.public_key_hash -> src_pk:Tezos_base.TzPervasives.Signature.public_key -> src_sk:Tezos_client_base.Client_keys.sk_uri -> fee_parameter:Injection.fee_parameter -> constant:string -> unit -> (Tezos_protocol_alpha.Protocol.Alpha_context.Kind.register_global_constant Tezos_protocol_alpha.Protocol.Alpha_context.Kind.manager Injection.result, Tezos_base.TzPervasives.tztrace) result Lwt.t

Calls Injection.prepare_manager_operation with Register_global_constant constant as operation.

val ticket_balances_encoding : (Tezos_protocol_alpha.Protocol.Ticket_token.unparsed_token * Z.t) list Tezos_base.TzPervasives.Data_encoding.t
val update_consensus_key : Protocol_client_context.full -> chain:Tezos_shell_services.Shell_services.chain -> block:Tezos_shell_services.Shell_services.block -> ?confirmations:int -> ?dry_run:bool -> ?verbose_signing:bool -> ?simulation:bool -> ?fee:Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t -> consensus_pk:Tezos_base.TzPervasives.Signature.public_key -> manager_sk:Tezos_client_base.Client_keys.sk_uri -> fee_parameter:Injection.fee_parameter -> Tezos_base.TzPervasives.Signature.public_key -> Tezos_protocol_alpha.Protocol.Alpha_context.Kind.update_consensus_key Tezos_protocol_alpha.Protocol.Alpha_context.Kind.manager Injection.result Tezos_base.TzPervasives.tzresult Lwt.t
val drain_delegate : Protocol_client_context.full -> chain:Tezos_shell_services.Shell_services.chain -> block:Tezos_shell_services.Shell_services.block -> ?confirmations:int -> ?dry_run:bool -> ?verbose_signing:bool -> ?simulation:bool -> consensus_sk:Tezos_client_base.Client_keys.sk_uri -> consensus_pkh:Tezos_base.TzPervasives.Signature.public_key_hash -> ?destination:Tezos_base.TzPervasives.Signature.public_key_hash -> delegate:Tezos_base.TzPervasives.Signature.public_key_hash -> unit -> Tezos_protocol_alpha.Protocol.Alpha_context.Kind.drain_delegate Injection.result Tezos_base.TzPervasives.tzresult Lwt.t
val save_contract : force:bool -> Protocol_client_context.full -> string -> Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t -> unit Tezos_base.TzPervasives.tzresult Lwt.t

Calls Raw_contract_alias.add.

val parse_arg_transfer : string option -> Tezos_protocol_alpha.Protocol.Alpha_context.Script.lazy_expr Tezos_base.TzPervasives.tzresult Lwt.t

Calls Michelson_v1_parser.parse_expressionarg.

Same as transfer, but takes parameters as Script.lazy_expr instead of a raw string. This can be useful for commands that elaborate Micheline parameters, such as Multisigs or FA1.2 operations.

type activation_key = {
  1. pkh : Tezos_base.TzPervasives.Signature.Ed25519.Public_key_hash.t;
  2. amount : Tezos_protocol_alpha.Protocol.Alpha_context.Tez.t;
  3. activation_code : Tezos_protocol_alpha.Protocol.Blinded_public_key_hash.activation_code;
  4. mnemonic : string list;
  5. password : string;
  6. email : string;
}
val activation_key_encoding : activation_key Tezos_base.TzPervasives.Data_encoding.t
type batch_transfer_operation = {
  1. destination : string;
  2. fee : string option;
  3. gas_limit : Tezos_protocol_alpha.Protocol.Alpha_context.Gas.Arith.integral option;
  4. storage_limit : Z.t option;
  5. amount : string;
  6. arg : string option;
  7. entrypoint : Tezos_protocol_alpha.Protocol.Alpha_context.Entrypoint.t option;
}
val batch_transfer_operation_encoding : batch_transfer_operation Tezos_base.TzPervasives.Data_encoding.t
val activate_account : Protocol_client_context.full -> chain:Tezos_shell_services.Shell_services.chain -> block:Tezos_shell_services.Shell_services.block -> ?confirmations:int -> ?dry_run:bool -> ?encrypted:bool -> ?force:bool -> activation_key -> string -> Tezos_protocol_alpha.Protocol.Alpha_context.Kind.activate_account Injection.result Tezos_base.TzPervasives.tzresult Lwt.t

Activate an account, by calling Injection.inject_operation.

Activate an existing account, by calling Injection.inject_operation with activation code. It fails if the account is unknown or if the account is not Signature.Ed25519.

type period_info = {
  1. current_period_kind : Tezos_protocol_alpha.Protocol.Alpha_context.Voting_period.kind;
  2. position : Int32.t;
  3. remaining : Int32.t;
  4. current_proposal : Tezos_base.TzPervasives.Protocol_hash.t option;
}
type ballots_info = {
  1. current_quorum : Int32.t;
  2. participation : Int32.t;
  3. supermajority : Int64.t;
  4. ballots : Tezos_protocol_alpha.Protocol.Alpha_context.Vote.ballots;
}
val get_period_info : ?successor:bool -> Protocol_client_context.full -> chain:Tezos_shell_services.Shell_services.chain -> block:Tezos_shell_services.Shell_services.block -> period_info Tezos_base.TzPervasives.tzresult Lwt.t

get_period_info ~successor cctx ~chain ~block returns the successor period_info if successor, it returns the current period_info otherwise. This function uses Tezos_protocol_alpha.Protocol.Voting_services.successor_period if successor, otherwise it calls Tezos_protocol_alpha.Protocol.Voting_services.current_period. In any case, it also uses Tezos_protocol_alpha.Protocol.Voting_services.current_proposal

val submit_proposals : ?dry_run:bool -> ?verbose_signing:bool -> Protocol_client_context.full -> chain:Tezos_shell_services.Shell_services.chain -> block:Tezos_shell_services.Shell_services.block -> ?confirmations:int -> src_sk:Tezos_client_base.Client_keys.sk_uri -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> Tezos_base.TzPervasives.Protocol_hash.t list -> Tezos_protocol_alpha.Protocol.Alpha_context.Kind.proposals Injection.result_list Tezos_base.TzPervasives.tzresult Lwt.t

Calls Injection.inject_operation where contents is Alpha_context.Single (Proposals {source; period = index; proposals}) with index the result of Alpha_services.Voting.successor_period

Calls Injection.inject_operation where contents is Alpha_context.Single (Ballot {source; period = index; proposals}) with index the result of Alpha_services.Voting.successor_period

val display_receipt_for_operation : Protocol_client_context.full -> chain:Tezos_shell_services.Block_services.chain -> ?predecessors:int -> Tezos_base.TzPervasives.Operation_list_hash.elt -> unit Tezos_base.TzPervasives.tzresult Lwt.t

lookup an operation in predecessors previous blocks, and print the receipt if found

Injects a smart-contract rollup origination operation using Injection.inject_operation.

Originates a smart rollup of kind with the boot_sector using paramaters_ty. Generates a unique smart rollup address returned in the operation's receipt.

This is the only entry-point to create a smart rollup.

Injects a smart-contract rollup publish commitment operation using Injection.inject_operation.

Publishes a commitment to announces the PVM state at the end of a commitment period and the number of ticks executed. If it is the first time src_pk publishes a commitment, a bond is frozen.

Injects a smart-contract rollup execute outbox message operation using Injection.inject_operation.

Executes output_proof on the PVM commited state from the cemented_commitment. Allows to perform L2->L1 communication.

Injects a smart-contract rollup recover bond operation using Injection.inject_operation.

Allows to recover the bond frozen by the operation sc_rollup_publish of src_pk, if the commitment is no longer subject to refutations.

Injects a smart-contract rollup refutation operation using Injection.inject_operation.

Either start a refutation game between src_pk and oppononent or plays a move in an existing refutation game.

Injects a smart-contract rollup timeout operation using Injection.inject_operation.

Timeouts the absent player from the refutation game between alice and bob.

OCaml

Innovation. Community. Security.