Tzfunc.Node
type config = {
mutable silent : bool;
mutable node : EzAPI.base_url;
mutable constants : Proto.constants option;
mutable chain_id : Proto.A.chain_id option;
}
type forge =
< branch : Proto.A.block_hash
; contents : Proto.script_expr Proto.manager_operation list >
val forge_enc : forge Proto.Encoding.encoding
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
val preapply_enc : preapply Proto.Encoding.encoding
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 >
val run_input_enc : run_input Proto.Encoding.encoding
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
val config : config
module Services : sig ... end
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 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 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 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 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 = {
op : 'p Proto.manager_operation;
bytes : Crypto.Raw.t;
size : int;
size_limits : int;
limits0 : int64 option * Z.t option * Z.t option;
}
type forge_kind =
| LForge of Proto.script_expr op_more list
| 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_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 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