2016-09-08 21:13:10 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Copyright (c) 2014 - 2016. *)
|
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
|
|
|
open Tezos_hash
|
|
|
|
|
|
|
|
type t = private
|
2016-11-14 18:54:21 +04:00
|
|
|
| Default of Ed25519.Public_key_hash.t
|
2016-09-08 21:13:10 +04:00
|
|
|
| Hash of Contract_hash.t
|
|
|
|
type contract = t
|
|
|
|
|
|
|
|
type descr = {
|
2016-11-14 18:54:21 +04:00
|
|
|
manager: Ed25519.Public_key_hash.t ;
|
|
|
|
delegate: Ed25519.Public_key_hash.t option ;
|
2016-09-08 21:13:10 +04:00
|
|
|
spendable: bool ;
|
|
|
|
delegatable: bool ;
|
|
|
|
script: Script_repr.t ;
|
|
|
|
}
|
|
|
|
|
|
|
|
include Compare.S with type t := contract
|
|
|
|
|
2016-11-14 18:54:21 +04:00
|
|
|
val default_contract : Ed25519.Public_key_hash.t -> contract
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2016-11-14 18:54:21 +04:00
|
|
|
val is_default : contract -> Ed25519.Public_key_hash.t option
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
val generic_contract :
|
2016-11-14 18:54:21 +04:00
|
|
|
manager:Ed25519.Public_key_hash.t ->
|
|
|
|
delegate:Ed25519.Public_key_hash.t option ->
|
2016-09-08 21:13:10 +04:00
|
|
|
spendable:bool ->
|
|
|
|
delegatable:bool ->
|
|
|
|
script:Script_repr.t ->
|
|
|
|
contract
|
|
|
|
|
|
|
|
(** {2 Human readable notation} ***********************************************)
|
|
|
|
|
|
|
|
type error += Invalid_contract_notation of string
|
|
|
|
|
|
|
|
val to_b48check: contract -> string
|
|
|
|
|
|
|
|
val of_b48check: string -> contract tzresult
|
|
|
|
|
|
|
|
(** {2 Serializers} ***********************************************************)
|
|
|
|
|
|
|
|
val encoding : contract Data_encoding.t
|
|
|
|
val descr_encoding : descr Data_encoding.t
|
|
|
|
|
|
|
|
val arg : contract RPC.Arg.arg
|