package archetype

  1. Overview
  2. Docs
module M = Model
module T = Michelson
type micheline = {
  1. prim : string option;
  2. int : string option;
  3. bytes : string option;
  4. string : string option;
  5. args : micheline list;
  6. annots : string list;
  7. array : micheline list;
  8. var_id : string option;
  9. var_type : micheline option;
}
val micheline_to_yojson : micheline -> Yojson.Safe.t
val micheline_of_yojson : Yojson.Safe.t -> micheline Ppx_deriving_yojson_runtime.error_or
val pp_micheline : Ppx_deriving_runtime.Format.formatter -> micheline -> Ppx_deriving_runtime.unit
val show_micheline : micheline -> Ppx_deriving_runtime.string
type type_ = {
  1. node : string;
  2. name : string option;
  3. args : type_ list;
}
val type__to_yojson : type_ -> Yojson.Safe.t
val type__of_yojson : Yojson.Safe.t -> type_ Ppx_deriving_yojson_runtime.error_or
val pp_type_ : Ppx_deriving_runtime.Format.formatter -> type_ -> Ppx_deriving_runtime.unit
type parameter = {
  1. name : string;
  2. type_ : type_;
  3. const : bool;
  4. default : micheline option;
}
val parameter_to_yojson : parameter -> Yojson.Safe.t
val parameter_of_yojson : Yojson.Safe.t -> parameter Ppx_deriving_yojson_runtime.error_or
val pp_parameter : Ppx_deriving_runtime.Format.formatter -> parameter -> Ppx_deriving_runtime.unit
val show_parameter : parameter -> Ppx_deriving_runtime.string
type argument = {
  1. name : string;
  2. type_ : type_;
}
val argument_to_yojson : argument -> Yojson.Safe.t
val argument_of_yojson : Yojson.Safe.t -> argument Ppx_deriving_yojson_runtime.error_or
val pp_argument : Ppx_deriving_runtime.Format.formatter -> argument -> Ppx_deriving_runtime.unit
val show_argument : argument -> Ppx_deriving_runtime.string
type decl_asset_field = {
  1. name : string;
  2. type_ : type_;
  3. is_key : bool;
}
val decl_asset_field_to_yojson : decl_asset_field -> Yojson.Safe.t
val decl_asset_field_of_yojson : Yojson.Safe.t -> decl_asset_field Ppx_deriving_yojson_runtime.error_or
val pp_decl_asset_field : Ppx_deriving_runtime.Format.formatter -> decl_asset_field -> Ppx_deriving_runtime.unit
val show_decl_asset_field : decl_asset_field -> Ppx_deriving_runtime.string
type decl_record_field = {
  1. name : string;
  2. type_ : type_;
}
val decl_record_field_to_yojson : decl_record_field -> Yojson.Safe.t
val decl_record_field_of_yojson : Yojson.Safe.t -> decl_record_field Ppx_deriving_yojson_runtime.error_or
val pp_decl_record_field : Ppx_deriving_runtime.Format.formatter -> decl_record_field -> Ppx_deriving_runtime.unit
val show_decl_record_field : decl_record_field -> Ppx_deriving_runtime.string
type decl_asset = {
  1. name : string;
  2. container_kind : string;
  3. fields : decl_asset_field list;
  4. container_type_michelson : micheline;
  5. key_type_michelson : micheline;
  6. value_type_michelson : micheline;
}
val decl_asset_to_yojson : decl_asset -> Yojson.Safe.t
val decl_asset_of_yojson : Yojson.Safe.t -> decl_asset Ppx_deriving_yojson_runtime.error_or
val pp_decl_asset : Ppx_deriving_runtime.Format.formatter -> decl_asset -> Ppx_deriving_runtime.unit
val show_decl_asset : decl_asset -> Ppx_deriving_runtime.string
type decl_record = {
  1. name : string;
  2. fields : decl_record_field list;
  3. type_michelson : micheline;
}
val decl_record_to_yojson : decl_record -> Yojson.Safe.t
val decl_record_of_yojson : Yojson.Safe.t -> decl_record Ppx_deriving_yojson_runtime.error_or
val pp_decl_record : Ppx_deriving_runtime.Format.formatter -> decl_record -> Ppx_deriving_runtime.unit
val show_decl_record : decl_record -> Ppx_deriving_runtime.string
type decl_constructor = {
  1. name : string;
  2. types : type_ list;
}
val decl_constructor_to_yojson : decl_constructor -> Yojson.Safe.t
val decl_constructor_of_yojson : Yojson.Safe.t -> decl_constructor Ppx_deriving_yojson_runtime.error_or
val pp_decl_constructor : Ppx_deriving_runtime.Format.formatter -> decl_constructor -> Ppx_deriving_runtime.unit
val show_decl_constructor : decl_constructor -> Ppx_deriving_runtime.string
type decl_enum = {
  1. name : string;
  2. constructors : decl_constructor list;
  3. type_michelson : micheline;
}
val decl_enum_to_yojson : decl_enum -> Yojson.Safe.t
val decl_enum_of_yojson : Yojson.Safe.t -> decl_enum Ppx_deriving_yojson_runtime.error_or
val pp_decl_enum : Ppx_deriving_runtime.Format.formatter -> decl_enum -> Ppx_deriving_runtime.unit
val show_decl_enum : decl_enum -> Ppx_deriving_runtime.string
type decl_event = {
  1. name : string;
  2. fields : decl_record_field list;
}
val decl_event_to_yojson : decl_event -> Yojson.Safe.t
val decl_event_of_yojson : Yojson.Safe.t -> decl_event Ppx_deriving_yojson_runtime.error_or
val pp_decl_event : Ppx_deriving_runtime.Format.formatter -> decl_event -> Ppx_deriving_runtime.unit
val show_decl_event : decl_event -> Ppx_deriving_runtime.string
type decl_type = {
  1. assets : decl_asset list;
  2. enums : decl_enum list;
  3. records : decl_record list;
  4. events : decl_event list;
}
val decl_type_to_yojson : decl_type -> Yojson.Safe.t
val decl_type_of_yojson : Yojson.Safe.t -> decl_type Ppx_deriving_yojson_runtime.error_or
val pp_decl_type : Ppx_deriving_runtime.Format.formatter -> decl_type -> Ppx_deriving_runtime.unit
val show_decl_type : decl_type -> Ppx_deriving_runtime.string
type decl_storage = {
  1. name : string;
  2. type_ : type_;
  3. const : bool;
}
val decl_storage_to_yojson : decl_storage -> Yojson.Safe.t
val decl_storage_of_yojson : Yojson.Safe.t -> decl_storage Ppx_deriving_yojson_runtime.error_or
val pp_decl_storage : Ppx_deriving_runtime.Format.formatter -> decl_storage -> Ppx_deriving_runtime.unit
val show_decl_storage : decl_storage -> Ppx_deriving_runtime.string
type decl_entrypoint = {
  1. name : string;
  2. args : argument list;
}
val decl_entrypoint_to_yojson : decl_entrypoint -> Yojson.Safe.t
val decl_entrypoint_of_yojson : Yojson.Safe.t -> decl_entrypoint Ppx_deriving_yojson_runtime.error_or
val pp_decl_entrypoint : Ppx_deriving_runtime.Format.formatter -> decl_entrypoint -> Ppx_deriving_runtime.unit
val show_decl_entrypoint : decl_entrypoint -> Ppx_deriving_runtime.string
type decl_fun_ret = {
  1. name : string;
  2. args : argument list;
  3. return : type_;
}
val decl_fun_ret_to_yojson : decl_fun_ret -> Yojson.Safe.t
val decl_fun_ret_of_yojson : Yojson.Safe.t -> decl_fun_ret Ppx_deriving_yojson_runtime.error_or
val pp_decl_fun_ret : Ppx_deriving_runtime.Format.formatter -> decl_fun_ret -> Ppx_deriving_runtime.unit
val show_decl_fun_ret : decl_fun_ret -> Ppx_deriving_runtime.string
type error_struct = {
  1. kind : string;
  2. args : string list;
  3. expr : micheline;
}
val error_struct_to_yojson : error_struct -> Yojson.Safe.t
val error_struct_of_yojson : Yojson.Safe.t -> error_struct Ppx_deriving_yojson_runtime.error_or
val pp_error_struct : Ppx_deriving_runtime.Format.formatter -> error_struct -> Ppx_deriving_runtime.unit
val show_error_struct : error_struct -> Ppx_deriving_runtime.string
type contract_interface = {
  1. name : string;
  2. parameters : parameter list;
  3. types : decl_type;
  4. storage : decl_storage list;
  5. entrypoints : decl_entrypoint list;
  6. getters : decl_fun_ret list;
  7. views : decl_fun_ret list;
  8. errors : error_struct list;
}
val contract_interface_to_yojson : contract_interface -> Yojson.Safe.t
val contract_interface_of_yojson : Yojson.Safe.t -> contract_interface Ppx_deriving_yojson_runtime.error_or
val pp_contract_interface : Ppx_deriving_runtime.Format.formatter -> contract_interface -> Ppx_deriving_runtime.unit
val show_contract_interface : contract_interface -> Ppx_deriving_runtime.string
val mk_type : string -> string option -> type_ list -> type_
val decl_type : decl_asset list -> decl_record list -> decl_enum list -> decl_event list -> decl_type
val mk_decl_asset_field : string -> type_ -> bool -> decl_asset_field
val mk_decl_record_field : string -> type_ -> decl_record_field
val mk_decl_asset : string -> string -> decl_asset_field list -> micheline -> micheline -> micheline -> decl_asset
val mk_decl_record : string -> decl_record_field list -> micheline -> decl_record
val mk_decl_constructor : string -> type_ list -> decl_constructor
val mk_decl_enum : string -> decl_constructor list -> micheline -> decl_enum
val mk_decl_event : string -> decl_record_field list -> decl_event
val mk_decl_type : decl_asset list -> decl_enum list -> decl_record list -> decl_event list -> decl_type
val mk_storage : string -> type_ -> bool -> decl_storage
val mk_argument : string -> type_ -> argument
val mk_entrypoint : string -> argument list -> decl_entrypoint
val mk_decl_fun_ret : string -> argument list -> type_ -> decl_fun_ret
val mk_parameter : string -> type_ -> bool -> micheline option -> parameter
val mk_error_struct : ?args:string list -> string -> micheline -> error_struct
val mk_contract_interface : string -> parameter list -> decl_type -> decl_storage list -> decl_entrypoint list -> decl_fun_ret list -> decl_fun_ret list -> error_struct list -> contract_interface
val for_type : M.type_ -> type_
val for_parameter : M.parameter -> parameter
val for_argument : M.argument -> argument
val mk_prim : string -> micheline list -> string list -> micheline
val mk_string : string -> micheline
val mk_bytes : string -> micheline
val mk_int : string -> micheline
val mk_array : micheline list -> micheline
val mk_var : 'a -> micheline
val to_micheline : T.obj_micheline -> micheline
val to_michelson_type : M.model -> M.type_ -> micheline
val for_decl_type : M.model -> M.model -> M.decl_node list -> decl_type
val for_storage : M.decl_node -> decl_storage list -> decl_storage list
val for_entrypoint : M.function_struct -> decl_entrypoint
val for_getter : (M.function_struct * M.type_) -> decl_fun_ret
val for_view : (M.function_struct * M.type_) -> decl_fun_ret
val for_errors : M.model -> error_struct list
val model_to_contract_interface : M.model -> M.model -> contract_interface
val model_to_contract_interface_json : M.model -> M.model -> string
OCaml

Innovation. Community. Security.