2018-02-14 18:20:03 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Copyright (c) 2014 - 2018. *)
|
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
|
|
|
type ('a, 'b) lwt_format =
|
|
|
|
('a, Format.formatter, unit, 'b Lwt.t) format4
|
|
|
|
|
2018-02-16 21:10:18 +04:00
|
|
|
class type printer = object
|
2018-02-14 18:20:03 +04:00
|
|
|
method error : ('a, 'b) lwt_format -> 'a
|
|
|
|
method warning : ('a, unit) lwt_format -> 'a
|
|
|
|
method message : ('a, unit) lwt_format -> 'a
|
|
|
|
method answer : ('a, unit) lwt_format -> 'a
|
|
|
|
method log : string -> ('a, unit) lwt_format -> 'a
|
|
|
|
end
|
|
|
|
|
2018-02-16 21:10:18 +04:00
|
|
|
class type prompter = object
|
2018-02-16 14:08:04 +04:00
|
|
|
method prompt : ('a, string) lwt_format -> 'a
|
|
|
|
method prompt_password : ('a, string) lwt_format -> 'a
|
|
|
|
end
|
|
|
|
|
2018-02-16 21:10:18 +04:00
|
|
|
class type io = object
|
|
|
|
inherit printer
|
|
|
|
inherit prompter
|
|
|
|
end
|
2018-02-14 18:20:03 +04:00
|
|
|
|
|
|
|
class type wallet = object
|
|
|
|
method load : string -> default:'a -> 'a Data_encoding.encoding -> 'a tzresult Lwt.t
|
|
|
|
method write : string -> 'a -> 'a Data_encoding.encoding -> unit tzresult Lwt.t
|
|
|
|
end
|
|
|
|
|
|
|
|
class type block = object
|
|
|
|
method block : Block_services.block
|
|
|
|
end
|
|
|
|
|
2018-02-16 14:08:04 +04:00
|
|
|
class type io_wallet = object
|
2018-02-16 21:10:18 +04:00
|
|
|
inherit printer
|
|
|
|
inherit prompter
|
2018-02-16 14:08:04 +04:00
|
|
|
inherit wallet
|
|
|
|
end
|
|
|
|
|
2018-02-16 21:10:18 +04:00
|
|
|
class type io_rpcs = object
|
|
|
|
inherit printer
|
|
|
|
inherit prompter
|
2018-02-14 18:20:03 +04:00
|
|
|
inherit RPC_context.json
|
|
|
|
end
|
|
|
|
|
2018-02-16 21:10:18 +04:00
|
|
|
class type full = object
|
|
|
|
inherit printer
|
|
|
|
inherit prompter
|
2018-02-14 18:20:03 +04:00
|
|
|
inherit wallet
|
|
|
|
inherit RPC_context.json
|
|
|
|
inherit block
|
|
|
|
end
|
|
|
|
|
2018-02-16 21:10:18 +04:00
|
|
|
class simple_printer : (string -> string -> unit Lwt.t) -> printer
|
|
|
|
class proxy_context : full -> full
|