ligo/src/proto_alpha/lib_client/client_proto_context.mli

229 lines
6.9 KiB
OCaml
Raw Normal View History

2018-06-29 16:08:08 +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. *)
(* *)
(*****************************************************************************)
2016-09-08 21:13:10 +04:00
open Proto_alpha
open Alpha_context
val list_contract_labels:
#Proto_alpha.full ->
chain:Shell_services.chain ->
block:Shell_services.block ->
2017-11-07 20:38:11 +04:00
(string * string * string) list tzresult Lwt.t
val get_storage:
#Proto_alpha.rpc_context ->
chain:Shell_services.chain ->
block:Shell_services.block ->
2017-11-07 20:38:11 +04:00
Contract.t ->
Script.expr option tzresult Lwt.t
val get_big_map_value:
#Proto_alpha.rpc_context ->
chain:Shell_services.chain ->
block:Shell_services.block ->
Contract.t ->
(Script.expr * Script.expr) ->
Script.expr option tzresult Lwt.t
2017-11-07 20:38:11 +04:00
2018-06-28 00:05:38 +04:00
val get_script:
#Proto_alpha.rpc_context ->
chain:Shell_services.chain ->
block:Shell_services.block ->
Contract.t ->
Script.t option tzresult Lwt.t
val get_manager:
#Proto_alpha.full ->
chain:Shell_services.chain ->
block:Shell_services.block ->
2017-11-07 20:38:11 +04:00
Contract.t ->
2018-02-01 20:31:08 +04:00
(string * public_key_hash *
public_key * Client_keys.sk_uri) tzresult Lwt.t
2017-11-07 20:38:11 +04:00
val get_balance:
#Proto_alpha.rpc_context ->
chain:Shell_services.chain ->
block:Shell_services.block ->
Contract.t ->
Tez.t tzresult Lwt.t
val set_delegate:
#Proto_alpha.full ->
chain:Shell_services.chain ->
block:Shell_services.block ->
?confirmations:int ->
?dry_run:bool ->
?fee:Tez.tez ->
2017-11-07 20:38:11 +04:00
Contract.t ->
2016-09-08 21:13:10 +04:00
src_pk:public_key ->
manager_sk:Client_keys.sk_uri ->
fee_parameter:Injection.fee_parameter ->
2017-11-07 20:38:11 +04:00
public_key_hash option ->
2018-04-30 21:06:06 +04:00
Kind.delegation Kind.manager Injection.result tzresult Lwt.t
2017-11-07 20:38:11 +04:00
val register_as_delegate:
#Proto_alpha.full ->
chain:Shell_services.chain ->
block:Shell_services.block ->
?confirmations:int ->
?dry_run:bool ->
?fee:Tez.tez ->
manager_sk:Client_keys.sk_uri ->
fee_parameter:Injection.fee_parameter ->
public_key ->
2018-04-30 21:06:06 +04:00
Kind.delegation Kind.manager Injection.result tzresult Lwt.t
2017-11-07 20:38:11 +04:00
val source_to_keys:
#Proto_alpha.full ->
chain:Shell_services.chain ->
block:Shell_services.block ->
2017-11-07 20:38:11 +04:00
Contract.t ->
(public_key * Client_keys.sk_uri) tzresult Lwt.t
2017-11-07 20:38:11 +04:00
val originate_account :
#Proto_alpha.full ->
chain:Shell_services.chain ->
block:Shell_services.block ->
?confirmations:int ->
?dry_run:bool ->
?branch:int ->
2016-09-08 21:13:10 +04:00
source:Contract.t ->
src_pk:public_key ->
src_sk:Client_keys.sk_uri ->
2016-09-08 21:13:10 +04:00
manager_pkh:public_key_hash ->
?delegatable:bool ->
?delegate:public_key_hash ->
2017-11-07 20:38:11 +04:00
balance:Tez.tez ->
?fee:Tez.tez ->
fee_parameter:Injection.fee_parameter ->
2018-04-30 21:06:06 +04:00
unit -> (Kind.origination Kind.manager Injection.result * Contract.t) tzresult Lwt.t
2017-11-07 20:38:11 +04:00
val save_contract :
force:bool ->
#Proto_alpha.full ->
2017-11-07 20:38:11 +04:00
string ->
Contract.t ->
unit tzresult Lwt.t
2016-09-08 21:13:10 +04:00
val originate_contract:
#Proto_alpha.full ->
chain:Shell_services.chain ->
block:Shell_services.block ->
?confirmations:int ->
?dry_run:bool ->
?branch:int ->
?fee:Tez.t ->
?gas_limit:Z.t ->
?storage_limit:Z.t ->
2017-11-07 20:38:11 +04:00
delegate:public_key_hash option ->
?delegatable:bool ->
?spendable:bool ->
initial_storage:string ->
manager:public_key_hash ->
balance:Tez.t ->
2016-09-08 21:13:10 +04:00
source:Contract.t ->
src_pk:public_key ->
src_sk:Client_keys.sk_uri ->
code:Script.expr ->
fee_parameter:Injection.fee_parameter ->
2018-04-30 21:06:06 +04:00
unit -> (Kind.origination Kind.manager Injection.result * Contract.t) tzresult Lwt.t
2016-09-08 21:13:10 +04:00
2017-11-07 20:38:11 +04:00
val transfer :
#Proto_alpha.full ->
chain:Shell_services.chain ->
block:Shell_services.block ->
?confirmations:int ->
?dry_run:bool ->
?branch:int ->
source:Contract.t ->
2017-11-07 20:38:11 +04:00
src_pk:public_key ->
src_sk:Client_keys.sk_uri ->
2017-11-07 20:38:11 +04:00
destination:Contract.t ->
?arg:string ->
amount:Tez.t ->
?fee:Tez.t ->
?gas_limit:Z.t ->
?storage_limit:Z.t ->
?counter:Z.t ->
fee_parameter:Injection.fee_parameter ->
2017-11-07 20:38:11 +04:00
unit ->
2018-04-30 21:06:06 +04:00
(Kind.transaction Kind.manager Injection.result * Contract.t list) tzresult Lwt.t
val reveal :
#Proto_alpha.full ->
chain:Shell_services.chain ->
block:Shell_services.block ->
?confirmations:int ->
?dry_run:bool ->
?branch:int ->
source:Contract.t ->
src_pk:public_key ->
src_sk:Client_keys.sk_uri ->
?fee:Tez.t ->
fee_parameter:Injection.fee_parameter ->
2018-04-30 21:06:06 +04:00
unit -> Kind.reveal Kind.manager Injection.result tzresult Lwt.t
type activation_key =
{ pkh : Ed25519.Public_key_hash.t ;
amount : Tez.t ;
activation_code : Blinded_public_key_hash.activation_code ;
mnemonic : string list ;
password : string ;
email : string ;
}
val activation_key_encoding: activation_key Data_encoding.t
2018-04-30 21:06:06 +04:00
val activate_account:
#Proto_alpha.full ->
chain:Shell_services.chain ->
block:Shell_services.block ->
?confirmations:int ->
?dry_run:bool ->
?encrypted:bool ->
?force:bool ->
activation_key ->
string ->
2018-04-30 21:06:06 +04:00
Kind.activate_account Injection.result tzresult Lwt.t
val activate_existing_account:
#Proto_alpha.full ->
chain:Shell_services.chain ->
block:Shell_services.block ->
?confirmations:int ->
?dry_run:bool ->
string ->
Blinded_public_key_hash.activation_code ->
Kind.activate_account Injection.result tzresult Lwt.t
(** lookup an operation in [predecessors] previous blocks, and print the
receipt if found *)
val display_receipt_for_operation:
#Proto_alpha.full ->
chain:Block_services.chain ->
?predecessors:int ->
Operation_list_hash.elt ->
unit tzresult Lwt.t