ligo/lib_client_base/client_node_rpcs.mli

182 lines
5.0 KiB
OCaml
Raw Normal View History

2016-09-08 21:13:10 +04:00
(**************************************************************************)
(* *)
2017-11-14 03:36:14 +04:00
(* Copyright (c) 2014 - 2017. *)
2016-09-08 21:13:10 +04:00
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
val errors:
#Client_rpcs.ctxt -> Json_schema.schema tzresult Lwt.t
val forge_block_header:
#Client_rpcs.ctxt ->
Block_header.t ->
MBytes.t tzresult Lwt.t
2016-09-08 21:13:10 +04:00
val inject_block:
#Client_rpcs.ctxt ->
?async:bool -> ?force:bool -> ?net_id:Net_id.t ->
MBytes.t -> Operation.t list list ->
2016-09-08 21:13:10 +04:00
Block_hash.t tzresult Lwt.t
2017-03-30 15:08:33 +04:00
(** [inject_block cctxt ?async ?force raw_block] tries to inject
[raw_block] inside the node. If [?async] is [true], [raw_block]
2017-03-08 21:47:01 +04:00
will be validated before the result is returned. If [?force] is
true, the block will be injected even on non strictly increasing
fitness. *)
2016-09-08 21:13:10 +04:00
val inject_operation:
#Client_rpcs.ctxt ->
?async:bool -> ?force:bool -> ?net_id:Net_id.t ->
MBytes.t ->
Operation_hash.t tzresult Lwt.t
2016-10-21 16:01:20 +04:00
val inject_protocol:
#Client_rpcs.ctxt ->
2017-03-30 15:08:33 +04:00
?async:bool -> ?force:bool ->
Protocol.t ->
Protocol_hash.t tzresult Lwt.t
2016-09-08 21:13:10 +04:00
module Blocks : sig
type block = Node_rpc_services.Blocks.block
2016-09-08 21:13:10 +04:00
2017-04-20 10:26:43 +04:00
val net_id:
#Client_rpcs.ctxt ->
block -> Net_id.t tzresult Lwt.t
val level:
#Client_rpcs.ctxt ->
block -> Int32.t tzresult Lwt.t
val predecessor:
#Client_rpcs.ctxt ->
block -> Block_hash.t tzresult Lwt.t
val predecessors:
#Client_rpcs.ctxt ->
block -> int -> Block_hash.t list tzresult Lwt.t
val hash:
#Client_rpcs.ctxt ->
block -> Block_hash.t tzresult Lwt.t
val timestamp:
#Client_rpcs.ctxt ->
block -> Time.t tzresult Lwt.t
val fitness:
#Client_rpcs.ctxt ->
block -> MBytes.t list tzresult Lwt.t
val operations:
#Client_rpcs.ctxt ->
?contents:bool ->
block -> (Operation_hash.t * Operation.t option) list list tzresult Lwt.t
val protocol:
#Client_rpcs.ctxt ->
block -> Protocol_hash.t tzresult Lwt.t
val test_network:
#Client_rpcs.ctxt ->
block -> Test_network_status.t tzresult Lwt.t
2016-09-08 21:13:10 +04:00
val pending_operations:
#Client_rpcs.ctxt ->
block ->
(error Preapply_result.t * Operation.t Operation_hash.Map.t) tzresult Lwt.t
2016-09-08 21:13:10 +04:00
type block_info = {
hash: Block_hash.t ;
net_id: Net_id.t ;
level: Int32.t ;
proto_level: int ; (* uint8 *)
2016-09-08 21:13:10 +04:00
predecessor: Block_hash.t ;
timestamp: Time.t ;
validation_passes: int ; (* uint8 *)
operations_hash: Operation_list_list_hash.t ;
fitness: MBytes.t list ;
2017-12-05 18:19:22 +04:00
context: Context_hash.t ;
data: MBytes.t ;
operations: (Operation_hash.t * Operation.t) list list option ;
protocol: Protocol_hash.t ;
test_network: Test_network_status.t ;
2016-09-08 21:13:10 +04:00
}
val info:
#Client_rpcs.ctxt ->
?include_ops:bool -> block -> block_info tzresult Lwt.t
2016-09-08 21:13:10 +04:00
val list:
#Client_rpcs.ctxt ->
?include_ops:bool -> ?length:int -> ?heads:Block_hash.t list ->
2016-09-21 18:22:43 +04:00
?delay:int -> ?min_date:Time.t -> ?min_heads:int ->
unit -> block_info list list tzresult Lwt.t
2016-09-08 21:13:10 +04:00
val monitor:
#Client_rpcs.ctxt ->
?include_ops:bool -> ?length:int -> ?heads:Block_hash.t list ->
2016-09-21 18:22:43 +04:00
?delay:int -> ?min_date:Time.t -> ?min_heads:int ->
unit -> block_info list list Lwt_stream.t tzresult Lwt.t
2016-09-08 21:13:10 +04:00
type preapply_result = {
shell_header: Block_header.shell_header ;
operations: error Preapply_result.t list ;
2016-09-08 21:13:10 +04:00
}
val preapply:
#Client_rpcs.ctxt ->
2016-09-08 21:13:10 +04:00
block ->
?timestamp:Time.t ->
?sort:bool ->
proto_header:MBytes.t ->
Operation.t list list -> preapply_result tzresult Lwt.t
2016-09-08 21:13:10 +04:00
end
module Operations : sig
2017-03-30 16:31:16 +04:00
2016-09-08 21:13:10 +04:00
val monitor:
#Client_rpcs.ctxt ->
?contents:bool ->
unit ->
(Operation_hash.t * Operation.t option) list list Lwt_stream.t tzresult Lwt.t
2017-03-30 16:31:16 +04:00
2016-09-08 21:13:10 +04:00
end
2016-10-25 21:00:03 +04:00
module Protocols : sig
2017-03-30 16:31:16 +04:00
val contents:
#Client_rpcs.ctxt ->
Protocol_hash.t -> Protocol.t tzresult Lwt.t
2016-10-25 21:00:03 +04:00
val list:
#Client_rpcs.ctxt ->
2016-10-25 21:00:03 +04:00
?contents:bool -> unit ->
(Protocol_hash.t * Protocol.t option) list tzresult Lwt.t
2017-03-30 16:31:16 +04:00
2016-10-25 21:00:03 +04:00
end
val bootstrapped:
#Client_rpcs.ctxt -> (Block_hash.t * Time.t) Lwt_stream.t tzresult Lwt.t
2017-03-02 18:39:36 +04:00
module Network : sig
open P2p_types
2017-03-02 18:39:36 +04:00
val stat:
#Client_rpcs.ctxt -> Stat.t tzresult Lwt.t
2017-03-02 18:39:36 +04:00
val connections:
#Client_rpcs.ctxt -> Connection_info.t list tzresult Lwt.t
2017-03-02 18:39:36 +04:00
val peers:
#Client_rpcs.ctxt -> (Peer_id.t * P2p_types.Peer_info.t) list tzresult Lwt.t
2017-03-02 18:39:36 +04:00
val points:
#Client_rpcs.ctxt -> (Point.t * P2p_types.Point_info.t) list tzresult Lwt.t
2017-03-02 18:39:36 +04:00
end
val complete:
#Client_rpcs.ctxt ->
?block:Blocks.block -> string -> string list tzresult Lwt.t
2016-10-16 23:57:56 +04:00
val describe:
#Client_rpcs.ctxt ->
?recurse:bool -> string list ->
2017-12-09 06:51:58 +04:00
Data_encoding.json_schema RPC_description.directory tzresult Lwt.t