2018-01-29 04:06:47 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2018-02-06 00:17:03 +04:00
|
|
|
(* Copyright (c) 2014 - 2018. *)
|
2018-01-29 04:06:47 +04:00
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
|
|
|
module Name = struct let name = "alpha" end
|
2018-02-11 22:17:39 +04:00
|
|
|
module Alpha_environment = Tezos_protocol_environment_client.Fake.Make(Name)()
|
|
|
|
include Tezos_protocol_alpha.Functor.Make(Alpha_environment)
|
2018-02-11 22:17:40 +04:00
|
|
|
|
2018-02-15 20:07:08 +04:00
|
|
|
let hash =
|
|
|
|
Protocol_hash.of_b58check_exn
|
|
|
|
"ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK"
|
|
|
|
|
2018-02-11 22:17:40 +04:00
|
|
|
class type rpc_context = object
|
2018-02-14 03:54:33 +04:00
|
|
|
inherit RPC_context.json
|
2018-02-11 22:17:40 +04:00
|
|
|
inherit [Block_services.block] Alpha_environment.RPC_context.simple
|
|
|
|
end
|
|
|
|
|
2018-02-14 03:54:33 +04:00
|
|
|
class wrap_proto_context (t : RPC_context.json) : rpc_context = object
|
2018-02-11 22:17:40 +04:00
|
|
|
method generic_json_call = t#generic_json_call
|
|
|
|
method call_service : 'm 'p 'q 'i 'o.
|
|
|
|
([< Resto.meth ] as 'm, unit, 'p, 'q, 'i, 'o) RPC_service.t ->
|
|
|
|
'p -> 'q -> 'i -> 'o tzresult Lwt.t= t#call_service
|
|
|
|
method call_streamed_service : 'm 'p 'q 'i 'o.
|
|
|
|
([< Resto.meth ] as 'm, unit, 'p, 'q, 'i, 'o) RPC_service.t ->
|
|
|
|
on_chunk: ('o -> unit) ->
|
|
|
|
on_close: (unit -> unit) ->
|
|
|
|
'p -> 'q -> 'i -> (unit -> unit) tzresult Lwt.t = t#call_streamed_service
|
|
|
|
inherit [Block_services.block] Alpha_environment.proto_rpc_context
|
|
|
|
(t :> RPC_context.t) (Block_services.S.proto_path ())
|
|
|
|
end
|
|
|
|
|
2018-02-16 21:10:18 +04:00
|
|
|
class type full = object
|
|
|
|
inherit Client_context.full
|
2018-02-11 22:17:40 +04:00
|
|
|
inherit [Block_services.block] Alpha_environment.RPC_context.simple
|
|
|
|
end
|
|
|
|
|
2018-02-16 21:10:18 +04:00
|
|
|
class wrap_full (t : Client_context.full) : full = object
|
2018-02-14 18:20:03 +04:00
|
|
|
inherit Client_context.proxy_context t
|
2018-02-11 22:17:40 +04:00
|
|
|
inherit [Block_services.block] Alpha_environment.proto_rpc_context
|
|
|
|
(t :> RPC_context.t) (Block_services.S.proto_path ())
|
|
|
|
end
|