ligo/vendors/ligo-utils/tezos-protocol-alpha/helpers_services.mli

272 lines
7.3 KiB
OCaml
Raw Permalink Normal View History

2019-09-05 17:21:01 +04:00
(*****************************************************************************)
(* *)
(* Open Source License *)
(* Copyright (c) 2018 Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* Permission is hereby granted, free of charge, to any person obtaining a *)
(* copy of this software and associated documentation files (the "Software"),*)
(* to deal in the Software without restriction, including without limitation *)
(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *)
(* and/or sell copies of the Software, and to permit persons to whom the *)
(* Software is furnished to do so, subject to the following conditions: *)
(* *)
(* The above copyright notice and this permission notice shall be included *)
(* in all copies or substantial portions of the Software. *)
(* *)
(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*)
(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *)
(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *)
(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*)
(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *)
(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *)
(* DEALINGS IN THE SOFTWARE. *)
(* *)
(*****************************************************************************)
open Alpha_context
type error += Cannot_parse_operation (* `Branch *)
val current_level :
'a #RPC_context.simple -> ?offset:int32 -> 'a -> Level.t shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
val levels_in_current_cycle :
2019-09-05 17:21:01 +04:00
'a #RPC_context.simple ->
?offset:int32 ->
'a ->
(Raw_level.t * Raw_level.t) shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
module Scripts : sig
val run_code :
2019-09-05 17:21:01 +04:00
'a #RPC_context.simple ->
'a ->
Script.expr ->
Script.expr
* Script.expr
* Tez.t
* Chain_id.t
* Contract.t option
* Contract.t option
* Z.t option
* string ->
( Script.expr
* packed_internal_operation list
* Contract.big_map_diff option )
shell_tzresult
Lwt.t
val trace_code :
2019-09-05 17:21:01 +04:00
'a #RPC_context.simple ->
'a ->
Script.expr ->
Script.expr
* Script.expr
* Tez.t
* Chain_id.t
* Contract.t option
* Contract.t option
* Z.t option
* string ->
( Script.expr
* packed_internal_operation list
* Script_interpreter.execution_trace
* Contract.big_map_diff option )
shell_tzresult
Lwt.t
val typecheck_code :
2019-09-05 17:21:01 +04:00
'a #RPC_context.simple ->
'a ->
Script.expr * Z.t option ->
2019-09-05 17:21:01 +04:00
(Script_tc_errors.type_map * Gas.t) shell_tzresult Lwt.t
val typecheck_data :
2019-09-05 17:21:01 +04:00
'a #RPC_context.simple ->
'a ->
Script.expr * Script.expr * Z.t option ->
Gas.t shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
val pack_data :
2019-09-05 17:21:01 +04:00
'a #RPC_context.simple ->
'a ->
Script.expr * Script.expr * Z.t option ->
(MBytes.t * Gas.t) shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
val run_operation :
2019-09-05 17:21:01 +04:00
'a #RPC_context.simple ->
'a ->
packed_operation * Chain_id.t ->
(packed_protocol_data * Apply_results.packed_operation_metadata)
shell_tzresult
Lwt.t
2019-09-05 17:21:01 +04:00
val entrypoint_type :
2019-10-17 13:45:27 +04:00
'a #RPC_context.simple ->
'a ->
Script.expr * string ->
Script.expr shell_tzresult Lwt.t
2019-10-17 13:45:27 +04:00
val list_entrypoints :
2019-10-17 13:45:27 +04:00
'a #RPC_context.simple ->
'a ->
Script.expr ->
(Michelson_v1_primitives.prim list list * (string * Script.expr) list)
shell_tzresult
Lwt.t
2019-09-05 17:21:01 +04:00
end
module Forge : sig
module Manager : sig
val operations :
'a #RPC_context.simple ->
'a ->
2019-09-05 17:21:01 +04:00
branch:Block_hash.t ->
2019-10-17 13:45:27 +04:00
source:public_key_hash ->
2019-09-05 17:21:01 +04:00
?sourcePubKey:public_key ->
counter:counter ->
fee:Tez.t ->
gas_limit:Z.t ->
storage_limit:Z.t ->
packed_manager_operation list ->
MBytes.t shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
val reveal :
'a #RPC_context.simple ->
'a ->
2019-09-05 17:21:01 +04:00
branch:Block_hash.t ->
2019-10-17 13:45:27 +04:00
source:public_key_hash ->
2019-09-05 17:21:01 +04:00
sourcePubKey:public_key ->
counter:counter ->
fee:Tez.t ->
unit ->
MBytes.t shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
val transaction :
'a #RPC_context.simple ->
'a ->
2019-09-05 17:21:01 +04:00
branch:Block_hash.t ->
2019-10-17 13:45:27 +04:00
source:public_key_hash ->
2019-09-05 17:21:01 +04:00
?sourcePubKey:public_key ->
counter:counter ->
amount:Tez.t ->
destination:Contract.t ->
2019-10-17 13:45:27 +04:00
?entrypoint:string ->
2019-09-05 17:21:01 +04:00
?parameters:Script.expr ->
gas_limit:Z.t ->
storage_limit:Z.t ->
fee:Tez.t ->
unit ->
MBytes.t shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
val origination :
'a #RPC_context.simple ->
'a ->
2019-09-05 17:21:01 +04:00
branch:Block_hash.t ->
2019-10-17 13:45:27 +04:00
source:public_key_hash ->
2019-09-05 17:21:01 +04:00
?sourcePubKey:public_key ->
counter:counter ->
balance:Tez.t ->
?delegatePubKey:public_key_hash ->
2019-10-17 13:45:27 +04:00
script:Script.t ->
2019-09-05 17:21:01 +04:00
gas_limit:Z.t ->
storage_limit:Z.t ->
fee:Tez.t ->
unit ->
MBytes.t shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
val delegation :
'a #RPC_context.simple ->
'a ->
2019-09-05 17:21:01 +04:00
branch:Block_hash.t ->
2019-10-17 13:45:27 +04:00
source:public_key_hash ->
2019-09-05 17:21:01 +04:00
?sourcePubKey:public_key ->
counter:counter ->
fee:Tez.t ->
public_key_hash option ->
MBytes.t shell_tzresult Lwt.t
end
val endorsement :
'a #RPC_context.simple ->
'a ->
2019-09-05 17:21:01 +04:00
branch:Block_hash.t ->
level:Raw_level.t ->
unit ->
MBytes.t shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
val proposals :
'a #RPC_context.simple ->
'a ->
2019-09-05 17:21:01 +04:00
branch:Block_hash.t ->
source:public_key_hash ->
period:Voting_period.t ->
proposals:Protocol_hash.t list ->
unit ->
MBytes.t shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
val ballot :
'a #RPC_context.simple ->
'a ->
2019-09-05 17:21:01 +04:00
branch:Block_hash.t ->
source:public_key_hash ->
period:Voting_period.t ->
proposal:Protocol_hash.t ->
ballot:Vote.ballot ->
unit ->
MBytes.t shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
val seed_nonce_revelation :
'a #RPC_context.simple ->
'a ->
2019-09-05 17:21:01 +04:00
branch:Block_hash.t ->
level:Raw_level.t ->
nonce:Nonce.t ->
unit ->
MBytes.t shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
val double_baking_evidence :
'a #RPC_context.simple ->
'a ->
2019-09-05 17:21:01 +04:00
branch:Block_hash.t ->
bh1:Block_header.t ->
bh2:Block_header.t ->
unit ->
MBytes.t shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
val double_endorsement_evidence :
'a #RPC_context.simple ->
'a ->
2019-09-05 17:21:01 +04:00
branch:Block_hash.t ->
op1:Kind.endorsement operation ->
op2:Kind.endorsement operation ->
unit ->
MBytes.t shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
val protocol_data :
'a #RPC_context.simple ->
'a ->
priority:int ->
?seed_nonce_hash:Nonce_hash.t ->
?proof_of_work_nonce:MBytes.t ->
unit ->
MBytes.t shell_tzresult Lwt.t
2019-09-05 17:21:01 +04:00
end
module Parse : sig
val operations :
'a #RPC_context.simple ->
'a ->
?check:bool ->
Operation.raw list ->
2019-09-05 17:21:01 +04:00
Operation.packed list shell_tzresult Lwt.t
val block :
'a #RPC_context.simple ->
'a ->
Block_header.shell_header ->
MBytes.t ->
2019-09-05 17:21:01 +04:00
Block_header.protocol_data shell_tzresult Lwt.t
end
val register : unit -> unit