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. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
2016-12-01 21:27:53 +04:00
|
|
|
module Error : sig
|
|
|
|
val service: (unit, unit, unit, Json_schema.schema) RPC.service
|
|
|
|
val encoding: error list Data_encoding.t
|
|
|
|
val wrap: 'a Data_encoding.t -> 'a tzresult Data_encoding.encoding
|
|
|
|
end
|
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
module Blocks : sig
|
|
|
|
|
|
|
|
type block = [
|
|
|
|
| `Genesis
|
|
|
|
| `Head of int | `Prevalidation
|
|
|
|
| `Test_head of int | `Test_prevalidation
|
|
|
|
| `Hash of Block_hash.t
|
2017-11-13 19:34:00 +04:00
|
|
|
]
|
2016-12-01 21:27:53 +04:00
|
|
|
val blocks_arg : block RPC.Arg.arg
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
val parse_block: string -> (block, string) result
|
2017-03-15 04:17:20 +04:00
|
|
|
val to_string: block -> string
|
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
type block_info = {
|
|
|
|
hash: Block_hash.t ;
|
2017-04-10 19:06:11 +04:00
|
|
|
net_id: Net_id.t ;
|
2017-04-10 15:01:22 +04:00
|
|
|
level: Int32.t ;
|
2017-04-12 20:22:40 +04:00
|
|
|
proto_level: int ; (* uint8 *)
|
2016-09-08 21:13:10 +04:00
|
|
|
predecessor: Block_hash.t ;
|
|
|
|
timestamp: Time.t ;
|
2017-09-29 20:43:13 +04:00
|
|
|
validation_passes: int ; (* uint8 *)
|
2017-03-30 15:16:21 +04:00
|
|
|
operations_hash: Operation_list_list_hash.t ;
|
2017-04-10 19:06:11 +04:00
|
|
|
fitness: MBytes.t list ;
|
|
|
|
data: MBytes.t ;
|
2017-11-14 02:27:19 +04:00
|
|
|
operations: (Operation_hash.t * Operation.t) list list option ;
|
2017-04-10 19:06:11 +04:00
|
|
|
protocol: Protocol_hash.t ;
|
2017-11-27 09:13:12 +04:00
|
|
|
test_network: Test_network_status.t ;
|
2016-09-08 21:13:10 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
val info:
|
2017-04-10 19:06:11 +04:00
|
|
|
(unit, unit * block, bool, block_info) RPC.service
|
2017-04-20 10:26:43 +04:00
|
|
|
val net_id:
|
2017-03-31 15:04:05 +04:00
|
|
|
(unit, unit * block, unit, Net_id.t) RPC.service
|
2017-04-10 15:01:22 +04:00
|
|
|
val level:
|
|
|
|
(unit, unit * block, unit, Int32.t) RPC.service
|
2016-09-08 21:13:10 +04:00
|
|
|
val predecessor:
|
|
|
|
(unit, unit * block, unit, Block_hash.t) RPC.service
|
2017-02-15 23:38:00 +04:00
|
|
|
val predecessors:
|
|
|
|
(unit, unit * block , int, Block_hash.t list) RPC.service
|
2016-09-08 21:13:10 +04:00
|
|
|
val hash:
|
|
|
|
(unit, unit * block, unit, Block_hash.t) RPC.service
|
|
|
|
val timestamp:
|
|
|
|
(unit, unit * block, unit, Time.t) RPC.service
|
|
|
|
val fitness:
|
|
|
|
(unit, unit * block, unit, MBytes.t list) RPC.service
|
2017-04-19 23:46:10 +04:00
|
|
|
|
|
|
|
type operations_param = {
|
|
|
|
contents: bool ;
|
|
|
|
monitor: bool ;
|
|
|
|
}
|
2016-09-08 21:13:10 +04:00
|
|
|
val operations:
|
2017-04-19 23:46:10 +04:00
|
|
|
(unit, unit * block, operations_param,
|
|
|
|
(Operation_hash.t * Operation.t option) list list) RPC.service
|
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
val protocol:
|
|
|
|
(unit, unit * block, unit, Protocol_hash.t) RPC.service
|
|
|
|
val test_network:
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit * block, unit, Test_network_status.t) RPC.service
|
2016-09-08 21:13:10 +04:00
|
|
|
val pending_operations:
|
|
|
|
(unit, unit * block, unit,
|
2017-11-27 09:13:12 +04:00
|
|
|
error Preapply_result.t * Operation.t Operation_hash.Map.t) RPC.service
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
type list_param = {
|
2017-04-10 19:06:11 +04:00
|
|
|
include_ops: bool ;
|
2016-09-08 21:13:10 +04:00
|
|
|
length: int option ;
|
|
|
|
heads: Block_hash.t list option ;
|
|
|
|
monitor: bool option ;
|
|
|
|
delay: int option ;
|
2016-09-21 18:22:43 +04:00
|
|
|
min_date: Time.t option;
|
|
|
|
min_heads: int option;
|
2016-09-08 21:13:10 +04:00
|
|
|
}
|
|
|
|
val list:
|
|
|
|
(unit, unit, list_param, block_info list list) RPC.service
|
|
|
|
|
2017-11-27 01:21:56 +04:00
|
|
|
val list_invalid:
|
|
|
|
(unit, unit, unit, (Block_hash.t * int32 * error list) list) RPC.service
|
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
type preapply_param = {
|
2017-04-27 03:01:05 +04:00
|
|
|
timestamp: Time.t ;
|
|
|
|
proto_header: MBytes.t ;
|
2017-11-14 02:27:19 +04:00
|
|
|
operations: Operation.t list ;
|
2017-04-27 03:01:05 +04:00
|
|
|
sort_operations: bool ;
|
2016-09-08 21:13:10 +04:00
|
|
|
}
|
2017-04-27 03:01:05 +04:00
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
type preapply_result = {
|
2017-04-27 03:01:05 +04:00
|
|
|
shell_header: Block_header.shell_header ;
|
2017-11-27 09:13:12 +04:00
|
|
|
operations: error Preapply_result.t ;
|
2016-09-08 21:13:10 +04:00
|
|
|
}
|
|
|
|
val preapply:
|
|
|
|
(unit, unit * block, preapply_param, preapply_result tzresult) RPC.service
|
|
|
|
|
2016-11-14 19:26:34 +04:00
|
|
|
val complete: (unit, (unit * block) * string, unit, string list) RPC.service
|
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
val proto_path: (unit, unit * block) RPC.Path.path
|
|
|
|
|
2017-04-27 03:01:05 +04:00
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
end
|
|
|
|
|
2016-10-21 16:01:20 +04:00
|
|
|
module Protocols : sig
|
2017-03-30 16:31:16 +04:00
|
|
|
|
|
|
|
val contents:
|
2017-04-19 21:21:23 +04:00
|
|
|
(unit, unit * Protocol_hash.t, unit, Protocol.t) RPC.service
|
2017-03-30 16:31:16 +04:00
|
|
|
|
2016-10-21 16:01:20 +04:00
|
|
|
type list_param = {
|
|
|
|
contents: bool option ;
|
|
|
|
monitor: bool option ;
|
|
|
|
}
|
2017-03-30 16:31:16 +04:00
|
|
|
|
2016-10-21 16:01:20 +04:00
|
|
|
val list:
|
|
|
|
(unit, unit,
|
2017-02-24 20:17:53 +04:00
|
|
|
list_param,
|
2017-04-19 21:21:23 +04:00
|
|
|
(Protocol_hash.t * Protocol.t option) list) RPC.service
|
2017-03-30 16:31:16 +04:00
|
|
|
|
2016-10-21 16:01:20 +04:00
|
|
|
end
|
|
|
|
|
2017-02-17 22:12:06 +04:00
|
|
|
module Network : sig
|
2017-04-19 23:46:10 +04:00
|
|
|
|
2017-02-17 22:12:06 +04:00
|
|
|
val stat :
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit, unit, P2p_types.Stat.t) RPC.service
|
2017-02-17 22:12:06 +04:00
|
|
|
|
2017-03-13 21:08:45 +04:00
|
|
|
val versions :
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit, unit, P2p_types.Version.t list) RPC.service
|
2017-03-13 21:08:45 +04:00
|
|
|
|
2017-02-17 22:12:06 +04:00
|
|
|
val events :
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit, unit, P2p_types.Connection_pool_log_event.t) RPC.service
|
2017-02-17 22:12:06 +04:00
|
|
|
|
|
|
|
val connect :
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit * P2p_types.Point.t, float, unit tzresult) RPC.service
|
2017-02-17 22:12:06 +04:00
|
|
|
|
|
|
|
module Connection : sig
|
2017-11-27 09:13:12 +04:00
|
|
|
|
2017-02-17 22:12:06 +04:00
|
|
|
val list :
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit, unit, P2p_types.Connection_info.t list) RPC.service
|
|
|
|
|
2017-02-17 22:12:06 +04:00
|
|
|
val info :
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit * P2p_types.Peer_id.t, unit,
|
|
|
|
P2p_types.Connection_info.t option) RPC.service
|
|
|
|
|
2017-02-17 22:12:06 +04:00
|
|
|
val kick :
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit * P2p_types.Peer_id.t, bool, unit) RPC.service
|
|
|
|
|
2017-02-17 22:12:06 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
module Point : sig
|
2017-03-02 18:39:36 +04:00
|
|
|
val list :
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit, P2p_types.Point_state.t list,
|
|
|
|
(P2p_types.Point.t * P2p_types.Point_info.t) list) RPC.service
|
2017-02-17 22:12:06 +04:00
|
|
|
val info :
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit * P2p_types.Point.t, unit, P2p_types.Point_info.t option) RPC.service
|
2017-02-17 22:12:06 +04:00
|
|
|
val events :
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit * P2p_types.Point.t, bool,
|
|
|
|
P2p_connection_pool_types.Point_info.Event.t list) RPC.service
|
2017-02-17 22:12:06 +04:00
|
|
|
end
|
|
|
|
|
2017-02-24 06:50:33 +04:00
|
|
|
module Peer_id : sig
|
2017-11-27 09:13:12 +04:00
|
|
|
|
2017-03-02 18:39:36 +04:00
|
|
|
val list :
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit, P2p_types.Peer_state.t list,
|
|
|
|
(P2p_types.Peer_id.t * P2p_types.Peer_info.t) list) RPC.service
|
|
|
|
|
2017-02-17 22:12:06 +04:00
|
|
|
val info :
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit * P2p_types.Peer_id.t, unit,
|
|
|
|
P2p_types.Peer_info.t option) RPC.service
|
|
|
|
|
2017-02-17 22:12:06 +04:00
|
|
|
val events :
|
2017-11-27 09:13:12 +04:00
|
|
|
(unit, unit * P2p_types.Peer_id.t, bool,
|
|
|
|
P2p_connection_pool_types.Peer_info.Event.t list) RPC.service
|
|
|
|
|
2017-02-17 22:12:06 +04:00
|
|
|
end
|
2017-04-19 23:46:10 +04:00
|
|
|
|
2017-02-17 22:12:06 +04:00
|
|
|
end
|
|
|
|
|
2017-04-27 03:01:05 +04:00
|
|
|
val forge_block_header:
|
|
|
|
(unit, unit, Block_header.t, MBytes.t) RPC.service
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-03-30 15:16:21 +04:00
|
|
|
type inject_block_param = {
|
|
|
|
raw: MBytes.t ;
|
|
|
|
blocking: bool ;
|
|
|
|
force: bool ;
|
2017-11-14 06:14:26 +04:00
|
|
|
net_id: Net_id.t option ;
|
2017-11-14 02:27:19 +04:00
|
|
|
operations: Operation.t list list ;
|
2017-03-30 15:16:21 +04:00
|
|
|
}
|
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
val inject_block:
|
2017-03-30 15:16:21 +04:00
|
|
|
(unit, unit, inject_block_param, Block_hash.t tzresult) RPC.service
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
val inject_operation:
|
|
|
|
(unit, unit,
|
2017-11-14 05:41:37 +04:00
|
|
|
(MBytes.t * bool * Net_id.t option * bool option),
|
|
|
|
Operation_hash.t tzresult) RPC.service
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2016-10-21 16:01:20 +04:00
|
|
|
val inject_protocol:
|
|
|
|
(unit, unit,
|
2017-04-19 21:21:23 +04:00
|
|
|
(Protocol.t * bool * bool option),
|
2017-02-24 20:17:53 +04:00
|
|
|
Protocol_hash.t tzresult) RPC.service
|
2016-10-21 16:01:20 +04:00
|
|
|
|
2017-02-28 03:48:22 +04:00
|
|
|
val bootstrapped: (unit, unit, unit, Block_hash.t * Time.t) RPC.service
|
|
|
|
|
2016-10-16 23:57:56 +04:00
|
|
|
val complete: (unit, unit * string, unit, string list) RPC.service
|
|
|
|
|
2017-11-27 09:13:12 +04:00
|
|
|
val describe: (unit, unit) RPC.Service.description_service
|