Client: rename Client_rpcs.rpc_sig
into Client_rpcs.ctxt
This commit is contained in:
parent
4aa1b14ba6
commit
80b0e8d67a
@ -54,13 +54,13 @@ end
|
||||
|
||||
class type logging_rpcs = object
|
||||
inherit logger
|
||||
inherit Client_rpcs.rpc_sig
|
||||
inherit Client_rpcs.ctxt
|
||||
end
|
||||
|
||||
class type full_context = object
|
||||
inherit logger
|
||||
inherit wallet
|
||||
inherit Client_rpcs.rpc_sig
|
||||
inherit Client_rpcs.ctxt
|
||||
inherit block
|
||||
end
|
||||
|
||||
|
@ -38,13 +38,13 @@ end
|
||||
|
||||
class type logging_rpcs = object
|
||||
inherit logger_sig
|
||||
inherit Client_rpcs.rpc_sig
|
||||
inherit Client_rpcs.ctxt
|
||||
end
|
||||
|
||||
class type full_context = object
|
||||
inherit logger_sig
|
||||
inherit wallet
|
||||
inherit Client_rpcs.rpc_sig
|
||||
inherit Client_rpcs.ctxt
|
||||
inherit block
|
||||
end
|
||||
(** The [full_context] allows the client {!command} handlers to work in
|
||||
|
@ -12,7 +12,7 @@
|
||||
open Client_rpcs
|
||||
module Services = Node_rpc_services
|
||||
|
||||
let errors (rpc : #rpc_sig) =
|
||||
let errors (rpc : #Client_rpcs.ctxt) =
|
||||
call_service0 rpc Services.Error.service ()
|
||||
|
||||
let forge_block_header rpc header =
|
||||
|
@ -7,18 +7,16 @@
|
||||
(* *)
|
||||
(**************************************************************************)
|
||||
|
||||
open Client_rpcs
|
||||
|
||||
val errors:
|
||||
#rpc_sig -> Json_schema.schema tzresult Lwt.t
|
||||
#Client_rpcs.ctxt -> Json_schema.schema tzresult Lwt.t
|
||||
|
||||
val forge_block_header:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Block_header.t ->
|
||||
MBytes.t tzresult Lwt.t
|
||||
|
||||
val inject_block:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?async:bool -> ?force:bool -> ?net_id:Net_id.t ->
|
||||
MBytes.t -> Operation.t list list ->
|
||||
Block_hash.t tzresult Lwt.t
|
||||
@ -29,13 +27,13 @@ val inject_block:
|
||||
fitness. *)
|
||||
|
||||
val inject_operation:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?async:bool -> ?force:bool -> ?net_id:Net_id.t ->
|
||||
MBytes.t ->
|
||||
Operation_hash.t tzresult Lwt.t
|
||||
|
||||
val inject_protocol:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?async:bool -> ?force:bool ->
|
||||
Protocol.t ->
|
||||
Protocol_hash.t tzresult Lwt.t
|
||||
@ -45,39 +43,39 @@ module Blocks : sig
|
||||
type block = Node_rpc_services.Blocks.block
|
||||
|
||||
val net_id:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Net_id.t tzresult Lwt.t
|
||||
val level:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Int32.t tzresult Lwt.t
|
||||
val predecessor:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Block_hash.t tzresult Lwt.t
|
||||
val predecessors:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> int -> Block_hash.t list tzresult Lwt.t
|
||||
val hash:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Block_hash.t tzresult Lwt.t
|
||||
val timestamp:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Time.t tzresult Lwt.t
|
||||
val fitness:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> MBytes.t list tzresult Lwt.t
|
||||
val operations:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?contents:bool ->
|
||||
block -> (Operation_hash.t * Operation.t option) list list tzresult Lwt.t
|
||||
val protocol:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Protocol_hash.t tzresult Lwt.t
|
||||
val test_network:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Test_network_status.t tzresult Lwt.t
|
||||
|
||||
val pending_operations:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
(error Preapply_result.t * Operation.t Operation_hash.Map.t) tzresult Lwt.t
|
||||
|
||||
@ -98,17 +96,17 @@ module Blocks : sig
|
||||
}
|
||||
|
||||
val info:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?include_ops:bool -> block -> block_info tzresult Lwt.t
|
||||
|
||||
val list:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?include_ops:bool -> ?length:int -> ?heads:Block_hash.t list ->
|
||||
?delay:int -> ?min_date:Time.t -> ?min_heads:int ->
|
||||
unit -> block_info list list tzresult Lwt.t
|
||||
|
||||
val monitor:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?include_ops:bool -> ?length:int -> ?heads:Block_hash.t list ->
|
||||
?delay:int -> ?min_date:Time.t -> ?min_heads:int ->
|
||||
unit -> block_info list list tzresult Lwt_stream.t tzresult Lwt.t
|
||||
@ -119,7 +117,7 @@ module Blocks : sig
|
||||
}
|
||||
|
||||
val preapply:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
?timestamp:Time.t ->
|
||||
?sort:bool ->
|
||||
@ -131,7 +129,7 @@ end
|
||||
module Operations : sig
|
||||
|
||||
val monitor:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?contents:bool ->
|
||||
unit ->
|
||||
(Operation_hash.t * Operation.t option) list list tzresult Lwt_stream.t tzresult Lwt.t
|
||||
@ -141,42 +139,42 @@ end
|
||||
module Protocols : sig
|
||||
|
||||
val contents:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Protocol_hash.t -> Protocol.t tzresult Lwt.t
|
||||
|
||||
val list:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?contents:bool -> unit ->
|
||||
(Protocol_hash.t * Protocol.t option) list tzresult Lwt.t
|
||||
|
||||
end
|
||||
|
||||
val bootstrapped:
|
||||
#rpc_sig -> (Block_hash.t * Time.t) tzresult Lwt_stream.t tzresult Lwt.t
|
||||
#Client_rpcs.ctxt -> (Block_hash.t * Time.t) tzresult Lwt_stream.t tzresult Lwt.t
|
||||
|
||||
module Network : sig
|
||||
|
||||
open P2p_types
|
||||
|
||||
val stat:
|
||||
#rpc_sig -> Stat.t tzresult Lwt.t
|
||||
#Client_rpcs.ctxt -> Stat.t tzresult Lwt.t
|
||||
|
||||
val connections:
|
||||
#rpc_sig -> Connection_info.t list tzresult Lwt.t
|
||||
#Client_rpcs.ctxt -> Connection_info.t list tzresult Lwt.t
|
||||
|
||||
val peers:
|
||||
#rpc_sig -> (Peer_id.t * P2p_types.Peer_info.t) list tzresult Lwt.t
|
||||
#Client_rpcs.ctxt -> (Peer_id.t * P2p_types.Peer_info.t) list tzresult Lwt.t
|
||||
|
||||
val points:
|
||||
#rpc_sig -> (Point.t * P2p_types.Point_info.t) list tzresult Lwt.t
|
||||
#Client_rpcs.ctxt -> (Point.t * P2p_types.Point_info.t) list tzresult Lwt.t
|
||||
|
||||
end
|
||||
|
||||
val complete:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?block:Blocks.block -> string -> string list tzresult Lwt.t
|
||||
|
||||
val describe:
|
||||
#rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?recurse:bool -> string list ->
|
||||
Data_encoding.json_schema RPC.Description.directory tzresult Lwt.t
|
||||
|
@ -186,7 +186,7 @@ let () =
|
||||
|
||||
let fail config err = fail (RPC_error (config, err))
|
||||
|
||||
class type rpc_sig = object
|
||||
class type ctxt = object
|
||||
method get_json :
|
||||
RPC.meth ->
|
||||
string list -> Data_encoding.json -> Data_encoding.json tzresult Lwt.t
|
||||
@ -213,7 +213,7 @@ class type rpc_sig = object
|
||||
Data_encoding.json -> 'output tzresult Lwt.t
|
||||
end
|
||||
|
||||
class rpc config : rpc_sig = object (self)
|
||||
class rpc config : ctxt = object (self)
|
||||
val config = config
|
||||
method make_request :
|
||||
type a. (Uri.t -> Data_encoding.json -> a Lwt.t) ->
|
||||
@ -356,22 +356,22 @@ let forge_request (type i) (service: (_,_,_,_,i,_,_) RPC.Service.t) params body
|
||||
let path = String.split_path (Uri.path uri) in (* Temporary *)
|
||||
meth, path, json
|
||||
|
||||
let call_service0 (rpc : #rpc_sig) service arg =
|
||||
let call_service0 (rpc : #ctxt) service arg =
|
||||
let meth, path, arg = forge_request service () arg in
|
||||
rpc#get_json meth path arg >>=? fun json ->
|
||||
rpc#parse_answer service path json
|
||||
|
||||
let call_service1 (rpc : #rpc_sig) service a1 arg =
|
||||
let call_service1 (rpc : #ctxt) service a1 arg =
|
||||
let meth, path, arg = forge_request service ((), a1) arg in
|
||||
rpc#get_json meth path arg >>=? fun json ->
|
||||
rpc#parse_answer service path json
|
||||
|
||||
let call_service2 (rpc : #rpc_sig) service a1 a2 arg =
|
||||
let call_service2 (rpc : #ctxt) service a1 a2 arg =
|
||||
let meth, path, arg = forge_request service (((), a1), a2) arg in
|
||||
rpc#get_json meth path arg >>=? fun json ->
|
||||
rpc#parse_answer service path json
|
||||
|
||||
let call_streamed (rpc : #rpc_sig) service (meth, path, arg) =
|
||||
let call_streamed (rpc : #ctxt) service (meth, path, arg) =
|
||||
rpc#get_streamed_json meth path arg >>=? fun json_st ->
|
||||
let parsed_st, push = Lwt_stream.create () in
|
||||
let rec loop () =
|
||||
@ -389,23 +389,23 @@ let call_streamed (rpc : #rpc_sig) service (meth, path, arg) =
|
||||
Lwt.async loop ;
|
||||
return parsed_st
|
||||
|
||||
let call_streamed_service0 (rpc : #rpc_sig) service arg =
|
||||
let call_streamed_service0 (rpc : #ctxt) service arg =
|
||||
call_streamed rpc service (forge_request service () arg)
|
||||
|
||||
let call_streamed_service1 cctxt service arg1 arg2 =
|
||||
call_streamed cctxt service (forge_request service ((), arg1) arg2)
|
||||
|
||||
let call_err_service0 (rpc : #rpc_sig) service arg =
|
||||
let call_err_service0 (rpc : #ctxt) service arg =
|
||||
let meth, path, arg = forge_request service () arg in
|
||||
rpc#get_json meth path arg >>=? fun json ->
|
||||
rpc#parse_err_answer service path json
|
||||
|
||||
let call_err_service1 (rpc : #rpc_sig) service a1 arg =
|
||||
let call_err_service1 (rpc : #ctxt) service a1 arg =
|
||||
let meth, path, arg = forge_request service ((), a1) arg in
|
||||
rpc#get_json meth path arg >>=? fun json ->
|
||||
rpc#parse_err_answer service path json
|
||||
|
||||
let call_err_service2 (rpc : #rpc_sig) service a1 a2 arg =
|
||||
let call_err_service2 (rpc : #ctxt) service a1 a2 arg =
|
||||
let meth, path, arg = forge_request service (((), a1), a2) arg in
|
||||
rpc#get_json meth path arg >>=? fun json ->
|
||||
rpc#parse_err_answer service path json
|
||||
|
@ -23,7 +23,7 @@ and logger =
|
||||
'a -> Cohttp.Code.status_code -> string -> unit Lwt.t ;
|
||||
} -> logger
|
||||
|
||||
class type rpc_sig = object
|
||||
class type ctxt = object
|
||||
method get_json :
|
||||
RPC.meth ->
|
||||
string list -> Data_encoding.json ->
|
||||
@ -51,7 +51,7 @@ class type rpc_sig = object
|
||||
Data_encoding.json -> 'output tzresult Lwt.t
|
||||
end
|
||||
|
||||
class rpc : config -> rpc_sig
|
||||
class rpc : config -> ctxt
|
||||
|
||||
val default_config: config
|
||||
val null_logger: logger
|
||||
@ -59,56 +59,56 @@ val timings_logger: Format.formatter -> logger
|
||||
val full_logger: Format.formatter -> logger
|
||||
|
||||
val call_service0:
|
||||
#rpc_sig ->
|
||||
#ctxt ->
|
||||
([ `POST ], unit,
|
||||
unit, unit, 'i,
|
||||
'o, unit) RPC.Service.t ->
|
||||
'i -> 'o tzresult Lwt.t
|
||||
|
||||
val call_service1:
|
||||
#rpc_sig ->
|
||||
#ctxt ->
|
||||
([ `POST ], unit,
|
||||
unit * 'a, unit, 'i,
|
||||
'o, unit) RPC.Service.t ->
|
||||
'a -> 'i -> 'o tzresult Lwt.t
|
||||
|
||||
val call_service2:
|
||||
#rpc_sig ->
|
||||
#ctxt ->
|
||||
([ `POST ], unit,
|
||||
(unit * 'a) * 'b, unit, 'i,
|
||||
'o, unit) RPC.Service.t ->
|
||||
'a -> 'b -> 'i -> 'o tzresult Lwt.t
|
||||
|
||||
val call_streamed_service0:
|
||||
#rpc_sig ->
|
||||
#ctxt ->
|
||||
([ `POST ], unit,
|
||||
unit, unit, 'a,
|
||||
'b, unit) RPC.Service.t ->
|
||||
'a -> 'b tzresult Lwt_stream.t tzresult Lwt.t
|
||||
|
||||
val call_streamed_service1:
|
||||
#rpc_sig ->
|
||||
#ctxt ->
|
||||
([ `POST ], unit,
|
||||
unit * 'a, unit, 'b,
|
||||
'c, unit) RPC.Service.t ->
|
||||
'a -> 'b -> 'c tzresult Lwt_stream.t tzresult Lwt.t
|
||||
|
||||
val call_err_service0:
|
||||
#rpc_sig ->
|
||||
#ctxt ->
|
||||
([ `POST ], unit,
|
||||
unit, unit, 'i,
|
||||
'o tzresult, unit) RPC.Service.t ->
|
||||
'i -> 'o tzresult Lwt.t
|
||||
|
||||
val call_err_service1:
|
||||
#rpc_sig ->
|
||||
#ctxt ->
|
||||
([ `POST ], unit,
|
||||
unit * 'a, unit, 'i,
|
||||
'o tzresult, unit) RPC.Service.t ->
|
||||
'a -> 'i -> 'o tzresult Lwt.t
|
||||
|
||||
val call_err_service2:
|
||||
#rpc_sig ->
|
||||
#ctxt ->
|
||||
([ `POST ], unit,
|
||||
(unit * 'a) * 'b, unit, 'i,
|
||||
'o tzresult, unit) RPC.Service.t ->
|
||||
|
@ -18,21 +18,21 @@ type block_info = {
|
||||
}
|
||||
|
||||
val info:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?include_ops:bool -> Client_node_rpcs.Blocks.block -> block_info tzresult Lwt.t
|
||||
|
||||
val compare:
|
||||
block_info -> block_info -> int
|
||||
|
||||
val monitor:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?include_ops:bool -> ?length:int -> ?heads:Block_hash.t list ->
|
||||
?delay:int -> ?min_date:Time.t -> ?min_heads:int ->
|
||||
?compare:(block_info -> block_info -> int) ->
|
||||
unit -> block_info list tzresult Lwt_stream.t tzresult Lwt.t
|
||||
|
||||
val blocks_from_cycle:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Client_node_rpcs.Blocks.block ->
|
||||
Cycle.t ->
|
||||
Block_hash.t list tzresult Lwt.t
|
||||
|
@ -14,7 +14,7 @@ val generate_seed_nonce: unit -> Nonce.t
|
||||
reveal the aforementionned nonce during the next cycle. *)
|
||||
|
||||
val inject_block:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?force:bool ->
|
||||
?net_id:Net_id.t ->
|
||||
shell_header:Block_header.shell_header ->
|
||||
@ -33,7 +33,7 @@ type error +=
|
||||
| Failed_to_preapply of Tezos_base.Operation.t * error list
|
||||
|
||||
val forge_block:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Client_proto_rpcs.block ->
|
||||
?force:bool ->
|
||||
?operations:Tezos_base.Operation.t list ->
|
||||
|
@ -13,7 +13,7 @@ type operation = {
|
||||
}
|
||||
|
||||
val monitor:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?contents:bool -> ?check:bool -> unit ->
|
||||
operation list tzresult Lwt_stream.t tzresult Lwt.t
|
||||
|
||||
@ -25,6 +25,6 @@ type valid_endorsement = {
|
||||
}
|
||||
|
||||
val monitor_endorsement:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
valid_endorsement tzresult Lwt_stream.t tzresult Lwt.t
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
(**************************************************************************)
|
||||
|
||||
val inject_seed_nonce_revelation:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Client_proto_rpcs.block ->
|
||||
?force:bool ->
|
||||
?async:bool ->
|
||||
|
@ -11,10 +11,10 @@ open Tezos_micheline
|
||||
open Client_proto_contracts
|
||||
open Client_keys
|
||||
|
||||
let get_balance (rpc : #Client_rpcs.rpc_sig) block contract =
|
||||
let get_balance (rpc : #Client_rpcs.ctxt) block contract =
|
||||
Client_proto_rpcs.Context.Contract.balance rpc block contract
|
||||
|
||||
let get_storage (rpc : #Client_rpcs.rpc_sig) block contract =
|
||||
let get_storage (rpc : #Client_rpcs.ctxt) block contract =
|
||||
Client_proto_rpcs.Context.Contract.storage rpc block contract
|
||||
|
||||
let rec find_predecessor rpc_config h n =
|
||||
@ -192,7 +192,7 @@ let dictate rpc_config block command seckey =
|
||||
assert (Operation_hash.equal oph injected_oph) ;
|
||||
return oph
|
||||
|
||||
let set_delegate (cctxt : #Client_rpcs.rpc_sig) block ~fee contract ~src_pk ~manager_sk opt_delegate =
|
||||
let set_delegate (cctxt : #Client_rpcs.ctxt) block ~fee contract ~src_pk ~manager_sk opt_delegate =
|
||||
delegate_contract
|
||||
cctxt block ~source:contract
|
||||
~src_pk ~manager_sk ~fee opt_delegate
|
||||
|
@ -15,7 +15,7 @@ val list_contract_labels :
|
||||
(string * string * string) list tzresult Lwt.t
|
||||
|
||||
val get_storage :
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Client_proto_rpcs.block ->
|
||||
Contract.t ->
|
||||
Script.expr option tzresult Lwt.t
|
||||
@ -27,13 +27,13 @@ val get_manager :
|
||||
(string * public_key_hash * public_key * secret_key) tzresult Lwt.t
|
||||
|
||||
val get_balance:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Client_proto_rpcs.block ->
|
||||
Contract.t ->
|
||||
Tez.t tzresult Lwt.t
|
||||
|
||||
val set_delegate :
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Client_proto_rpcs.block ->
|
||||
fee:Tez.tez ->
|
||||
Contract.t ->
|
||||
@ -66,7 +66,7 @@ val originate_account :
|
||||
balance:Tez.tez ->
|
||||
fee:Tez.tez ->
|
||||
Client_rpcs.block ->
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
unit -> (Operation_list_hash.elt * Contract.t) tzresult Lwt.t
|
||||
|
||||
val save_contract :
|
||||
@ -104,11 +104,11 @@ val faucet :
|
||||
?branch:int ->
|
||||
manager_pkh:public_key_hash ->
|
||||
Client_rpcs.block ->
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
unit -> (Operation_list_hash.elt * Contract.t) tzresult Lwt.t
|
||||
|
||||
val transfer :
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Client_proto_rpcs.block ->
|
||||
?force:bool ->
|
||||
?branch:int ->
|
||||
@ -123,7 +123,7 @@ val transfer :
|
||||
(Operation_hash.t * Contract.t list) tzresult Lwt.t
|
||||
|
||||
val dictate :
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Client_proto_rpcs.block ->
|
||||
dictator_operation ->
|
||||
secret_key ->
|
||||
|
@ -38,19 +38,19 @@ val list_contracts:
|
||||
(string * string * RawContractAlias.t) list tzresult Lwt.t
|
||||
|
||||
val get_manager:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Client_proto_rpcs.block ->
|
||||
Contract.t ->
|
||||
public_key_hash tzresult Lwt.t
|
||||
|
||||
val get_delegate:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Client_proto_rpcs.block ->
|
||||
Contract.t ->
|
||||
public_key_hash tzresult Lwt.t
|
||||
|
||||
val check_public_key :
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Client_proto_rpcs.block ->
|
||||
?src_pk:public_key ->
|
||||
public_key_hash ->
|
||||
|
@ -69,7 +69,7 @@ let run
|
||||
~(storage : Michelson_v1_parser.parsed)
|
||||
~(input : Michelson_v1_parser.parsed)
|
||||
block
|
||||
(cctxt : #Client_rpcs.rpc_sig) =
|
||||
(cctxt : #Client_rpcs.ctxt) =
|
||||
Client_proto_rpcs.Helpers.run_code cctxt
|
||||
block program.expanded (storage.expanded, input.expanded, amount)
|
||||
|
||||
@ -79,7 +79,7 @@ let trace
|
||||
~(storage : Michelson_v1_parser.parsed)
|
||||
~(input : Michelson_v1_parser.parsed)
|
||||
block
|
||||
(cctxt : #Client_rpcs.rpc_sig) =
|
||||
(cctxt : #Client_rpcs.ctxt) =
|
||||
Client_proto_rpcs.Helpers.trace_code cctxt
|
||||
block program.expanded (storage.expanded, input.expanded, amount)
|
||||
|
||||
|
@ -18,7 +18,7 @@ val run :
|
||||
storage:Michelson_v1_parser.parsed ->
|
||||
input:Michelson_v1_parser.parsed ->
|
||||
Client_rpcs.block ->
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
(Script.expr * Script.expr) tzresult Lwt.t
|
||||
|
||||
val trace :
|
||||
@ -27,7 +27,7 @@ val trace :
|
||||
storage:Michelson_v1_parser.parsed ->
|
||||
input:Michelson_v1_parser.parsed ->
|
||||
Client_rpcs.block ->
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
(Script.expr * Script.expr * (int * int * Script.expr list) list) tzresult Lwt.t
|
||||
|
||||
val print_trace_result :
|
||||
@ -49,20 +49,20 @@ val hash_and_sign :
|
||||
Michelson_v1_parser.parsed ->
|
||||
Ed25519.Secret_key.t ->
|
||||
Client_proto_rpcs.block ->
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
(string * string) tzresult Lwt.t
|
||||
|
||||
val typecheck_data :
|
||||
data:Michelson_v1_parser.parsed ->
|
||||
ty:Michelson_v1_parser.parsed ->
|
||||
Client_proto_rpcs.block ->
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
unit tzresult Lwt.t
|
||||
|
||||
val typecheck_program :
|
||||
Michelson_v1_parser.parsed ->
|
||||
Client_proto_rpcs.block ->
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
Script_ir_translator.type_map tzresult Lwt.t
|
||||
|
||||
val print_typecheck_result :
|
||||
|
@ -24,78 +24,78 @@ end
|
||||
|
||||
module Constants : sig
|
||||
val errors:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Json_schema.schema tzresult Lwt.t
|
||||
val cycle_length:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> int32 tzresult Lwt.t
|
||||
val voting_period_length:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> int32 tzresult Lwt.t
|
||||
val time_before_reward:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Period.t tzresult Lwt.t
|
||||
val slot_durations:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> (Period.t list) tzresult Lwt.t
|
||||
val first_free_baking_slot:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> int tzresult Lwt.t
|
||||
val max_signing_slot:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> int tzresult Lwt.t
|
||||
val instructions_per_transaction:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> int tzresult Lwt.t
|
||||
val stamp_threshold:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> int64 tzresult Lwt.t
|
||||
end
|
||||
|
||||
module Context : sig
|
||||
val level:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Level.t tzresult Lwt.t
|
||||
(** [level cctxt blk] returns the (protocol view of the) level of
|
||||
[blk]. *)
|
||||
|
||||
val next_level:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Level.t tzresult Lwt.t
|
||||
(** [next_level cctxt blk] returns the (protocol view of the) level
|
||||
of the successor of [blk]. *)
|
||||
|
||||
val voting_period_kind:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Voting_period.kind tzresult Lwt.t
|
||||
(** [voting_period_kind cctxt blk] returns the voting period kind
|
||||
of [blk]. *)
|
||||
|
||||
module Nonce : sig
|
||||
val hash:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Nonce_hash.t tzresult Lwt.t
|
||||
type nonce_info =
|
||||
| Revealed of Nonce.t
|
||||
| Missing of Nonce_hash.t
|
||||
| Forgotten
|
||||
val get:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Raw_level.t -> nonce_info tzresult Lwt.t
|
||||
end
|
||||
module Key : sig
|
||||
val get :
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
public_key_hash -> (public_key_hash * public_key) tzresult Lwt.t
|
||||
val list :
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
((public_key_hash * public_key) list) tzresult Lwt.t
|
||||
end
|
||||
module Contract : sig
|
||||
val list:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Contract.t list tzresult Lwt.t
|
||||
type info = {
|
||||
manager: public_key_hash ;
|
||||
@ -106,91 +106,91 @@ module Context : sig
|
||||
counter: int32 ;
|
||||
}
|
||||
val get:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Contract.t -> info tzresult Lwt.t
|
||||
val balance:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Contract.t ->
|
||||
Tez.t tzresult Lwt.t
|
||||
val manager:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Contract.t ->
|
||||
public_key_hash tzresult Lwt.t
|
||||
val delegate:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Contract.t ->
|
||||
public_key_hash option tzresult Lwt.t
|
||||
val counter:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Contract.t ->
|
||||
int32 tzresult Lwt.t
|
||||
val spendable:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Contract.t ->
|
||||
bool tzresult Lwt.t
|
||||
val delegatable:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Contract.t ->
|
||||
bool tzresult Lwt.t
|
||||
val script:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Contract.t -> Script.t option tzresult Lwt.t
|
||||
val storage:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Contract.t -> Script.expr option tzresult Lwt.t
|
||||
end
|
||||
end
|
||||
|
||||
module Helpers : sig
|
||||
val minimal_time:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> ?prio:int -> unit -> Time.t tzresult Lwt.t
|
||||
(** [minimal_time cctxt blk ?prio ()] is the minimal acceptable
|
||||
timestamp for the successor of [blk]. [?prio] defaults to
|
||||
[0]. *)
|
||||
|
||||
val apply_operation:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Block_hash.t -> Operation_hash.t -> MBytes.t -> Ed25519.Signature.t option ->
|
||||
(Contract.t list) tzresult Lwt.t
|
||||
val run_code:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Script.expr ->
|
||||
(Script.expr * Script.expr * Tez.t) ->
|
||||
(Script.expr * Script.expr) tzresult Lwt.t
|
||||
val trace_code:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Script.expr ->
|
||||
(Script.expr * Script.expr * Tez.t) ->
|
||||
(Script.expr * Script.expr *
|
||||
(Script.location * int * Script.expr list) list) tzresult Lwt.t
|
||||
val typecheck_code:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Script.expr -> Script_ir_translator.type_map tzresult Lwt.t
|
||||
val typecheck_data:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Script.expr * Script.expr -> unit tzresult Lwt.t
|
||||
val hash_data:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Script.expr -> string tzresult Lwt.t
|
||||
val level:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> ?offset:int32 -> Raw_level.t -> Level.t tzresult Lwt.t
|
||||
val levels:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Cycle.t -> (Raw_level.t * Raw_level.t) tzresult Lwt.t
|
||||
|
||||
module Rights : sig
|
||||
type baking_slot = Raw_level.t * int * Time.t
|
||||
type endorsement_slot = Raw_level.t * int
|
||||
val baking_rights_for_delegate:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> public_key_hash ->
|
||||
?max_priority:int -> ?first_level:Raw_level.t ->
|
||||
?last_level:Raw_level.t -> unit ->
|
||||
(baking_slot list) tzresult Lwt.t
|
||||
val endorsement_rights_for_delegate:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> public_key_hash ->
|
||||
?max_priority:int -> ?first_level:Raw_level.t -> ?last_level:Raw_level.t -> unit ->
|
||||
(endorsement_slot list) tzresult Lwt.t
|
||||
@ -199,7 +199,7 @@ module Helpers : sig
|
||||
module Forge : sig
|
||||
module Manager : sig
|
||||
val operations:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
source:Contract.t ->
|
||||
@ -209,7 +209,7 @@ module Helpers : sig
|
||||
manager_operation list ->
|
||||
MBytes.t tzresult Lwt.t
|
||||
val transaction:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
source:Contract.t ->
|
||||
@ -221,7 +221,7 @@ module Helpers : sig
|
||||
fee:Tez.t ->
|
||||
unit -> MBytes.t tzresult Lwt.t
|
||||
val origination:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
source:Contract.t ->
|
||||
@ -237,7 +237,7 @@ module Helpers : sig
|
||||
unit ->
|
||||
MBytes.t tzresult Lwt.t
|
||||
val delegation:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
source:Contract.t ->
|
||||
@ -249,19 +249,19 @@ module Helpers : sig
|
||||
end
|
||||
module Dictator : sig
|
||||
val operation:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
dictator_operation ->
|
||||
MBytes.t tzresult Lwt.t
|
||||
val activate:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
Protocol_hash.t ->
|
||||
MBytes.t tzresult Lwt.t
|
||||
val activate_testnet:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
Protocol_hash.t ->
|
||||
@ -269,14 +269,14 @@ module Helpers : sig
|
||||
end
|
||||
module Delegate : sig
|
||||
val operations:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
source:public_key ->
|
||||
delegate_operation list ->
|
||||
MBytes.t tzresult Lwt.t
|
||||
val endorsement:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
source:public_key ->
|
||||
@ -284,7 +284,7 @@ module Helpers : sig
|
||||
slot:int ->
|
||||
unit -> MBytes.t tzresult Lwt.t
|
||||
val proposals:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
source:public_key ->
|
||||
@ -292,7 +292,7 @@ module Helpers : sig
|
||||
proposals:Protocol_hash.t list ->
|
||||
unit -> MBytes.t tzresult Lwt.t
|
||||
val ballot:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
source:public_key ->
|
||||
@ -303,27 +303,27 @@ module Helpers : sig
|
||||
end
|
||||
module Anonymous : sig
|
||||
val operations:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
anonymous_operation list ->
|
||||
MBytes.t tzresult Lwt.t
|
||||
val seed_nonce_revelation:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
level:Raw_level.t ->
|
||||
nonce:Nonce.t ->
|
||||
unit -> MBytes.t tzresult Lwt.t
|
||||
val faucet:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
branch:Block_hash.t ->
|
||||
id:public_key_hash ->
|
||||
unit -> MBytes.t tzresult Lwt.t
|
||||
end
|
||||
val block_proto_header:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block ->
|
||||
priority: int ->
|
||||
seed_nonce_hash: Nonce_hash.t ->
|
||||
@ -333,11 +333,11 @@ module Helpers : sig
|
||||
|
||||
module Parse : sig
|
||||
val operations:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> ?check:bool -> Operation.raw list ->
|
||||
Operation.t list tzresult Lwt.t
|
||||
val block:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
block -> Block_header.shell_header -> MBytes.t ->
|
||||
Block_header.proto_header tzresult Lwt.t
|
||||
end
|
||||
|
@ -10,7 +10,7 @@
|
||||
open Tezos_embedded_raw_protocol_genesis
|
||||
|
||||
val bake:
|
||||
#Client_rpcs.rpc_sig ->
|
||||
#Client_rpcs.ctxt ->
|
||||
?timestamp: Time.t ->
|
||||
Client_node_rpcs.Blocks.block ->
|
||||
Data.Command.t ->
|
||||
|
Loading…
Reference in New Issue
Block a user