Module Tzfunc.Node

type config = {
  1. mutable silent : bool;
  2. mutable node : EzAPI.base_url;
  3. mutable constants : Proto.constants option;
  4. mutable chain_id : Proto.A.chain_id option;
}
type forge = < branch : Proto.A.block_hash ; contents : Proto.script_expr Proto.manager_operation list >
type preapply = < branch : Proto.A.block_hash option ; contents : Proto.script_expr Proto.manager_operation list ; protocol : Proto.A.protocol_hash option ; signature : Proto.A.signature option > list
type run_input = < operation : < branch : Proto.A.block_hash ; contents : Proto.script_expr Proto.manager_operation list ; signature : Proto.A.signature > ; chain_id : Proto.A.chain_id >
type run_output = < contents : Proto.micheline Proto.manager_operation list ; signature : Proto.A.signature option >
val run_output_enc : run_output Proto.Encoding.encoding
type run_view_input = < contract : Proto.A.contract ; entrypoint : Proto.entrypoint ; input : Proto.micheline ; chain_id : Proto.A.chain_id ; unparsing_mode : [ `Readable | `Optimized | `Optimized_legacy ] ; source : Proto.A.contract option ; payer : Proto.A.contract option ; now : Proto.A.timestamp option ; level : int32 option >
val run_view_input_enc : run_view_input Proto.Encoding.encoding
type run_view_output = Proto.micheline
val run_view_output_enc : run_view_output Proto.Encoding.encoding
type run_code_input = < script : Proto.micheline ; storage : Proto.micheline ; input : Proto.micheline ; amount : Proto.A.uint64 ; balance : Proto.A.uint64 ; chain_id : Proto.A.chain_id ; entrypoint : Proto.entrypoint option ; source : Proto.A.contract option ; payer : Proto.A.contract option ; now : Proto.A.timestamp option ; level : int32 option >
val run_code_input_enc : run_code_input Proto.Encoding.encoding
type run_code_output = < storage : Proto.micheline ; operations : Proto.micheline Proto.manager_operation list ; lazy_storage_diff : Proto.storage_diff_item list option >
val run_code_output_enc : run_code_output Proto.Encoding.encoding
type entrypoints = (string * Proto.micheline) list
val entrypoints_enc : entrypoints Proto.Encoding.encoding
type header_block = < hash : Proto.A.block_hash ; protocol : Proto.A.protocol_hash ; chain_id : Proto.A.chain_id >
val header_block_enc : header_block Proto.Encoding.encoding
type forge_method = [
  1. | `remote
  2. | `local
  3. | `both
]
val config : config
val set_silent : bool -> unit
val set_node : string -> unit
module Services : sig ... end
val wrap_http : 'a -> 'b -> ('c, [> `http_error of 'a * 'b ]) Stdlib.result
val wrap_raw : ('a, int * string option) Stdlib.result -> ('b, [> `http_error of int * string option | `node_error of Proto.node_error list ]) Stdlib.result
val wrap : ('a, [> `http_error of int * string option ] as 'b EzReq_lwt_S.api_error) Stdlib.result -> ('c, 'd) Stdlib.result
val rmap : ('a -> ('b, 'c) Stdlib.result) -> 'd list -> ('e list, 'f) Stdlib.result
val unmacro : Proto.micheline -> (Proto.micheline, [> `unknown_primitive of string option | `unmacro_error ]) Stdlib.result
val unmacro_ops : Proto.script_expr Proto.manager_operation_kind Proto.manager_operation_gen list -> (Proto.script_expr Proto.manager_operation_kind Proto.manager_operation_gen list, [> `unknown_primitive of string option | `unmacro_error ]) Stdlib.result
val get : ?msg:string -> ?base:EzAPI.base_url -> string -> (string, [> `http_error of int * string option | `node_error of Proto.node_error list ]) Stdlib.result Lwt.t
val get0 : ?msg:string -> ?base:EzAPI.base_url -> ('a, [> `http_error of int * string option ] as 'b, [< EzAPI__.Security.scheme ]) EzAPI.service0 -> ('c, 'd) Stdlib.result Lwt.t
val get1 : ?msg:string -> ?base:EzAPI.base_url -> ('a, 'b, [> `http_error of int * string option ] as 'c, [< EzAPI__.Security.scheme ]) EzAPI.service1 -> 'd -> ('e, 'f) Stdlib.result Lwt.t
val get2 : ?msg:string -> ?base:EzAPI.base_url -> ('a, 'b, 'c, [> `http_error of int * string option ] as 'd, [< EzAPI__.Security.scheme ]) EzAPI.service2 -> 'e -> 'f -> ('g, 'h) Stdlib.result Lwt.t
val get_account_info : ?base:EzAPI.base_url -> ?block:Proto.A.block_hash -> Proto.A.contract -> (Proto.account, Rp.error) Stdlib.result Lwt.t
val get_header : ?base:EzAPI.base_url -> ?block:Proto.A.block_hash -> unit -> (header_block, Rp.error) Stdlib.result Lwt.t
val get_head_hash : ?base:EzAPI.base_url -> unit -> (Proto.A.block_hash, Rp.error) Stdlib.result Lwt.t
val get_raw_rpc : ?base:EzAPI.base_url -> string -> (string, [> `http_error of int * string option | `node_error of Proto.node_error list ]) Stdlib.result Lwt.t
val get_enc_rpc : ?base:EzAPI.base_url -> 'a Json_encoding.encoding -> string -> ('b, [> `destruct_exn of exn | `http_error of int * string option | `node_error of Proto.node_error list ]) Stdlib.result Lwt.t
val get_constants : ?base:EzAPI.base_url -> ?block:Proto.A.block_hash -> unit -> (Proto.constants, Rp.error) Stdlib.result Lwt.t
val get_manager_key : ?base:EzAPI.base_url -> ?block:Proto.A.block_hash -> Proto.A.contract -> (Proto.A.pk option, Rp.error) Stdlib.result Lwt.t
val get_entrypoints : ?base:EzAPI.base_url -> string -> (entrypoints, Rp.error) Stdlib.result Lwt.t
val get_entrypoint_type : ?base:EzAPI.base_url -> Proto.A.contract -> string -> (Proto.micheline, Rp.error) Stdlib.result Lwt.t
val get_storage : ?base:EzAPI.base_url -> ?block:Proto.A.block_hash -> Proto.A.contract -> (Proto.micheline, Rp.error) Stdlib.result Lwt.t
val get_bigmap_value_raw : ?base:EzAPI.base_url -> ?block:string -> Proto.A.zarith -> Proto.A.contract -> (Proto.micheline option, Rp.error) Stdlib.result Lwt.t
val get_bigmap_value : ?base:EzAPI.base_url -> ?block:string -> typ:Proto.micheline -> Proto.A.zarith -> Proto.micheline -> (Proto.micheline option, Rp.error) Stdlib.result Lwt.t
val post : ?content:string -> ?content_type:string -> ?msg:string -> ?base:EzAPI.base_url -> string -> (string, [> `http_error of int * string option | `node_error of Proto.node_error list ]) Stdlib.result Lwt.t
val post0 : ?msg:string -> input:'a -> ?base:EzAPI.base_url -> ('b, 'c, [> `http_error of int * string option ] as 'd, [< EzAPI__.Security.scheme ]) EzAPI.post_service0 -> ('e, 'f) Stdlib.result Lwt.t
val post1 : ?msg:string -> input:'a -> ?base:EzAPI.base_url -> ('b, 'c, 'd, [> `http_error of int * string option ] as 'e, [< EzAPI__.Security.scheme ]) EzAPI.post_service1 -> 'f -> ('g, 'h) Stdlib.result Lwt.t
val set_constants : ?base:EzAPI.base_url -> ?block:Proto.A.block_hash -> unit -> (unit, Rp.error) Stdlib.result Lwt.t
val set_chain_id : ?base:EzAPI.base_url -> ?block:Proto.A.block_hash -> unit -> (unit, Rp.error) Stdlib.result Lwt.t
val preapply : ?base:EzAPI.base_url -> branch:Proto.A.block_hash -> protocol:Proto.A.protocol_hash -> signature:Proto.A.signature -> Proto.script_expr Proto.manager_operation list -> (preapply, Rp.error) Stdlib.result Lwt.t
val dummy_sign : string
val run_operation : ?base:EzAPI.base_url -> branch:Proto.A.block_hash -> chain_id:Proto.A.chain_id -> Proto.script_expr Proto.manager_operation list -> (Proto.micheline Proto.manager_operation list, Rp.error) Stdlib.result Lwt.t
val silent_inject : ?base:EzAPI.base_url -> Crypto.Raw.t -> (string, Rp.error) Stdlib.result Lwt.t
val check_status : 'a Proto.manager_operation_gen -> (Proto.manager_metadata, [> `no_metadata | `node_error of Proto.node_error list ]) Stdlib.result
val sign : ?watermark:Crypto.Raw.t -> edsk:string -> Crypto.Raw.t -> (Crypto.Raw.t, [> `empty_bytes | `invalid_b58 of exn | `sign_exn of exn | `string_too_short | `unknown_curve | `unknown_prefix ]) Stdlib.result Lwt.t
val inject : ?base:EzAPI.base_url -> sign:(Crypto.Raw.t -> (Crypto.Raw.t, Rp.error) Stdlib.result Lwt.t) -> bytes:Crypto.Raw.t -> branch:Proto.A.block_hash -> protocol:Proto.A.protocol_hash -> Proto.script_expr Proto.manager_operation list -> (string, Rp.error) Stdlib.result Lwt.t
val remote_forge : ?base:EzAPI.base_url -> branch:Proto.A.block_hash -> Proto.script_expr Proto.manager_operation list -> (Crypto.Raw.t, Rp.error) Stdlib.result Lwt.t
type 'p op_more = {
  1. op : 'p Proto.manager_operation;
  2. bytes : Crypto.Raw.t;
  3. size : int;
  4. size_limits : int;
  5. limits0 : int64 option * Z.t option * Z.t option;
}
type forge_kind =
  1. | LForge of Proto.script_expr op_more list
  2. | RForge of Proto.script_expr op_more list * Crypto.Raw.t
val make_op_more : 'a Proto.manager_operation -> (int64 option * Z.t option * Z.t option) -> 'a op_more
val update_limits : ?fee:Proto.A.uint64 -> ?gas_limit:Proto.A.zarith -> ?storage_limit:Proto.A.zarith -> 'a Proto.manager_operation_gen -> 'b Proto.manager_operation_gen * int
val update_op_more_limits : ?fee:Proto.A.uint64 -> ?gas_limit:Proto.A.zarith -> ?storage_limit:Proto.A.zarith -> 'a op_more -> 'b op_more
val update_op_more_counters : Z.t -> 'a op_more list -> 'b op_more list
val update_op_more_bytes : Crypto.Raw.t -> 'a op_more -> 'b op_more
val get_op_more : 'a op_more -> 'a Proto.manager_operation
val get_size_more : 'a op_more -> int
val get_op_bytes_more : 'a op_more -> Crypto.Raw.t
val get_ops_more : 'a op_more list -> 'a Proto.manager_operation list
val get_sizes_more : 'a op_more list -> int list
val get_ops_bytes_more : 'a op_more list -> Crypto.Raw.t list
val compare_with_remote : ?base:EzAPI.base_url -> branch:Proto.A.block_hash -> Proto.script_expr Proto.manager_operation list -> Crypto.Raw.t -> (Crypto.Raw.t, Rp.error) Stdlib.result Lwt.t
val sign_operation : sign: ((Crypto.Raw.t, 'a) Stdlib.result -> ((Crypto.Raw.t, 'a) Stdlib.result, 'b) Stdlib.result Lwt.t) -> (Crypto.Raw.t, 'a) Stdlib.result -> ((Crypto.Raw.t, 'a) Stdlib.result, 'b) Stdlib.result Lwt.t
val sign_zero_operation : (Crypto.Raw.t, 'a) Stdlib.result -> (Crypto.Raw.t, 'a) Stdlib.result Lwt.t
val forge_activation : ?base:EzAPI.base_url -> pkh:string -> Crypto.H.t -> ((Crypto.Raw.t, [> `forge_error of string ]) Stdlib.result, Rp.error) Stdlib.result Lwt.t
val minimal_fees : Z.t
val nanotz_per_gas_unit : Z.t
val nanotz_per_byte : Z.t
val to_nanotz : Z.t -> Z.t
val of_nanotz : Z.t -> Z.t
val compute_fees : gas_limit:Z.t -> size:int -> Z.t
val iter_compute_fees : ?first:bool -> 'a op_more -> int -> 'a op_more
val check_original_limits : ?gas_limit:Z.t -> ?storage_limit:Z.t -> 'a op_more -> ('a op_more, [> `node_error of 'b list | `prepare_operation_error of string ]) Stdlib.result
val check_original_fees : 'a op_more -> ('a op_more, [> `prepare_operation_error of string ]) Stdlib.result
val update_gas_storage_fee : ?first:bool -> 'a op_more -> 'b Proto.manager_operation_kind Proto.manager_operation_gen -> ('c op_more, [> `no_metadata | `node_error of Proto.node_error list | `prepare_operation_error of string ]) Stdlib.result
val run_operations : ?remove_failed:bool -> ?base:EzAPI.base_url -> branch:Proto.A.block_hash -> chain_id:Proto.A.chain_id -> Proto.script_expr Proto.manager_operation list -> (Proto.micheline Proto.manager_operation list * int list, Rp.error) Stdlib.result Lwt.t
val forge_auto_fees : ?remove_failed:bool -> ?local_forge:bool -> ?base:EzAPI.base_url -> branch:Proto.A.block_hash -> chain_id:Proto.A.chain_id -> Proto.script_expr op_more list -> (forge_kind * int list, Rp.error) Stdlib.result Lwt.t
val prepare_ops : ?base:EzAPI.base_url -> src:Proto.A.contract -> ?block:Proto.A.block_hash -> Proto.script_expr op_more list -> (Proto.script_expr op_more list, Rp.error) Stdlib.result Lwt.t
val make_reveal : ?base:EzAPI.base_url -> ?get_pk:(unit -> (Proto.A.pk, Rp.error) Stdlib.result Lwt.t) -> ('a option * Z.t option * Z.t option) list -> Proto.A.contract -> 'b Proto.manager_operation_kind Proto.manager_operation_gen list -> ('b Proto.manager_operation_kind Proto.manager_operation_gen list * ('a option * Z.t option * Z.t option) list, Rp.error) Stdlib.result Lwt.t
val get_source : 'a Proto.manager_operation_gen list -> (Proto.A.contract, [> `empty_operation_list ]) Stdlib.result
val forge_manager_operations_base : ?remove_failed:bool -> ?local_forge:bool -> ?base:EzAPI.base_url -> ?get_pk:(unit -> (Proto.A.pk, Rp.error) Stdlib.result Lwt.t) -> ?block:Proto.A.block_hash -> ?counter_block:Proto.A.block_hash -> Proto.script_expr Proto.manager_operation list -> (forge_kind * Proto.A.block_hash * Proto.A.protocol_hash * int list, Rp.error) Stdlib.result Lwt.t
val forge_manager_operations_select : ?remove_failed:bool -> ?forge_method:forge_method -> ?base:EzAPI.base_url -> ?get_pk:(unit -> (Proto.A.pk, Rp.error) Stdlib.result Lwt.t) -> ?block:Proto.A.block_hash -> ?counter_block:Proto.A.block_hash -> Proto.script_expr Proto.manager_operation list -> (Crypto.Raw.t * Proto.A.protocol_hash * Proto.A.block_hash * Proto.script_expr Proto.manager_operation list * int list, Rp.error) Stdlib.result Lwt.t
val forge_manager_operations : ?remove_failed:bool -> ?forge_method:forge_method -> ?base:EzAPI.base_url -> ?get_pk:(unit -> (Proto.A.pk, Rp.error) Stdlib.result Lwt.t) -> ?block:Proto.A.block_hash -> ?counter_block:Proto.A.block_hash -> Proto.script_expr Proto.manager_operation list -> (Crypto.Raw.t * Proto.A.protocol_hash * Proto.A.block_hash * Proto.script_expr Proto.manager_operation list, Rp.error) Stdlib.result Lwt.t
val forge_empty_account : ?base:EzAPI.base_url -> get_pk:(unit -> (Proto.A.pk, Rp.error) Stdlib.result Lwt.t) -> src:Proto.A.contract -> Proto.A.contract -> (Crypto.Raw.t * Proto.script_expr Proto.manager_operation list * Proto.A.block_hash * Proto.A.protocol_hash, Rp.error) Stdlib.result Lwt.t