package octez-protocol-alpha-libs

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Sapling_helpers.Interpreter_helpersSource

include module type of struct include Common end
Sourceval memo_size_of_int : int -> Tezos_protocol_alpha.Protocol.Alpha_context.Sapling.Memo_size.t
Sourceval int_of_memo_size : Tezos_protocol_alpha.Protocol.Alpha_context.Sapling.Memo_size.t -> int
Sourceval assert_true : (bool, 'a) result Lwt.t -> (unit, 'a) result Lwt.t
Sourceval assert_false : (bool, 'a) result Lwt.t -> (unit, 'a) result Lwt.t
Sourceval assert_some : ('a option, 'b) result Lwt.t -> ('a, 'b) result Lwt.t
Sourceval assert_none : ('a option, 'b) result Lwt.t -> (unit, 'b) result Lwt.t
Sourceval assert_error : ('a, 'b) result Lwt.t -> (unit, 'c) result Lwt.t
Sourceval print : ?prefix:string -> 'a Data_encoding__V1.Encoding.t -> 'a -> unit
Sourceval to_hex : 'a -> 'a Data_encoding__V1.Encoding.t -> string
Sourceval randomized_byte : ?pos:int -> 'a -> 'a Data_encoding__V1.Encoding.t -> 'a
Sourcetype wallet = Common.wallet = {
  1. sk : Tezos_sapling.Core.Wallet.Spending_key.t;
  2. vk : Tezos_sapling.Core.Wallet.Viewing_key.t;
}
Sourceval wallet_gen : unit -> wallet
Sourceval gen_addr : int -> Tezos_sapling.Core.Client.Viewing_key.t -> Tezos_sapling.Core.Client.Viewing_key.address list
Sourceval gen_nf : unit -> Tezos_sapling.Core.Client.Nullifier.t
Sourceval gen_cm_cipher : memo_size:int -> unit -> Tezos_sapling.Core.Client.Commitment.t * Tezos_sapling.Core.Client.Ciphertext.t
Sourceval client_state_of_diff : memo_size:int -> (Tezos_sapling.Core.Validator.Hash.t * Tezos_protocol_alpha.Protocol.Alpha_context.Sapling.diff) -> Tezos_sapling.Storage.state
include module type of struct include Contract_helpers end
Sourceval init : unit -> (Block.t * Tezos_raw_protocol_alpha__Alpha_context.public_key_hash * Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t * Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t, Tezos_base.TzPervasives.tztrace) result Lwt.t

Initializes 2 addresses to do only operations plus one that will be used to bake.

Sourceval read_file : string -> string

Return contents of a given file as string.

Sourceval load_script : storage:string -> string -> Tezos_protocol_alpha.Protocol.Alpha_context.Script.t

Loads a script from file.

Sourceval originate_contract : string -> string -> Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t -> Block.t -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> (Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t * Block.t, Tezos_base.TzPervasives.tztrace) result Lwt.t
Sourceval fake_KT1 : Tezos_protocol_alpha.Protocol.Contract_hash.t
Sourceval default_self : Tezos_protocol_alpha.Protocol.Contract_hash.t
Sourceval default_payer : Tezos_base.TzPervasives.Signature.Public_key_hash.t
Sourceval default_sender : Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t
Sourceval default_step_constants : Tezos_protocol_alpha.Protocol.Script_interpreter.step_constants
Sourceval run_script : Tezos_raw_protocol_alpha.Alpha_context.t -> ?logger:Tezos_raw_protocol_alpha.Script_typed_ir.logger -> ?step_constants: Tezos_protocol_alpha.Protocol.Script_interpreter.step_constants -> ?internal:bool -> string -> ?entrypoint:Tezos_protocol_alpha.Protocol.Alpha_context.Entrypoint.t -> storage:string -> parameter:string -> unit -> (Tezos_protocol_alpha.Protocol.Script_interpreter.execution_result * Tezos_raw_protocol_alpha.Alpha_context.context) Tezos_base.TzPervasives.tzresult Lwt.t

Helper function that parses and typechecks a script, its initial storage and parameters from strings. It then executes the typed script with the storage and parameters and returns the result.

The step_constants argument passes in some data which remains constant throughout script's execution, hence the name. This includes addresses of the sender and payer, the address of the smart contract, the amount of Tez transferred to it and so on.

An internal operation is an operation generated by smart contract's execution rather than by an implicit account.

Sourceval originate_contract_from_string_hash : script:string -> storage:string -> source_contract:Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t -> baker:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> Block.t -> (Tezos_protocol_alpha.Protocol.Contract_hash.t * Tezos_protocol_alpha.Protocol.Alpha_context.Script.t * Block.t, Tezos_base.TzPervasives.tztrace) result Lwt.t
Sourceval originate_contract_from_string : script:string -> storage:string -> source_contract:Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t -> baker:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> Block.t -> (Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t * Tezos_protocol_alpha.Protocol.Alpha_context.Script.t * Block.t, Tezos_base.TzPervasives.tztrace) result Lwt.t
Sourceval originate_contract_hash : string -> string -> Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t -> Block.t -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> (Tezos_protocol_alpha.Protocol.Contract_hash.t * Block.t * string, Tezos_base.TzPervasives.tztrace) result Lwt.t

Returns a block in which the contract is originated. Also returns the associated anti-replay string and KT1 address.

Sourceval hex_shield : memo_size:int -> wallet -> string -> string
Sourceval transac_and_sync : memo_size:int -> Block.t -> Tezos_protocol_alpha.Protocol.Alpha_context.Script.lazy_expr -> int -> Tezos_protocol_alpha.Protocol.Alpha_context.Contract.t -> Tezos_raw_protocol_alpha.Contract_hash.t -> Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> (Block.t * Tezos_sapling.Storage.state, Tezos_base.TzPervasives.tztrace) result Lwt.t
Sourceval shield : memo_size:int -> Tezos_sapling.Forge.Core.Spending_key.t -> int -> Tezos_sapling.Core.Wallet.Viewing_key.t -> (string -> 'a) -> string -> 'a list * int
Sourceval next_block : Block.t -> Tezos_protocol_alpha.Protocol.Alpha_context.Operation.packed -> (Block.t, Tezos_base.TzPervasives.tztrace) result Lwt.t
OCaml

Innovation. Community. Security.