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 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. int_value : int option;
  4. args : type_ list;
}
val type__to_yojson : type_ -> Yojson.Safe.t
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;
  5. path : int list;
}
val parameter_to_yojson : parameter -> Yojson.Safe.t
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 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 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 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 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 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 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 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;
  3. type_michelson : micheline;
}
val decl_event_to_yojson : decl_event -> Yojson.Safe.t
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 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;
  4. path : int list;
}
val decl_storage_to_yojson : decl_storage -> Yojson.Safe.t
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 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 type_micheline = {
  1. value : micheline;
  2. is_storable : bool;
}
val type_micheline_to_yojson : type_micheline -> Yojson.Safe.t
val pp_type_micheline : Ppx_deriving_runtime.Format.formatter -> type_micheline -> Ppx_deriving_runtime.unit
val show_type_micheline : type_micheline -> Ppx_deriving_runtime.string
type decl_fun_ret = {
  1. name : string;
  2. args : argument list;
  3. return : type_;
  4. return_michelson : type_micheline;
}
val decl_fun_ret_to_yojson : decl_fun_ret -> Yojson.Safe.t
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 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. storage_type : type_micheline;
  6. entrypoints : decl_entrypoint list;
  7. getters : decl_fun_ret list;
  8. views : decl_fun_ret list;
  9. errors : error_struct list;
}
val contract_interface_to_yojson : contract_interface -> Yojson.Safe.t
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 -> int 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 -> micheline -> 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 -> int list -> decl_storage
val mk_argument : string -> type_ -> argument
val mk_entrypoint : string -> argument list -> decl_entrypoint
val mk_type_micheline : micheline -> bool -> type_micheline
val mk_decl_fun_ret : string -> argument list -> type_ -> type_micheline -> decl_fun_ret
val mk_parameter : string -> type_ -> int list -> 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 -> type_micheline -> decl_entrypoint list -> decl_fun_ret list -> decl_fun_ret list -> error_struct list -> contract_interface
val for_type : M.type_ -> type_
type preprocess_obj = {
  1. params : M.parameter list;
  2. var_decls : M.decl_node list;
  3. size : int;
  4. with_state : bool;
}
val get_var_decls_size : M.model -> preprocess_obj
val compute_path : int -> int -> int list
val for_parameters : preprocess_obj -> M.parameter list -> parameter list
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_decl_node : M.decl_node -> int list -> decl_storage list -> decl_storage list
val for_storage : M.model -> preprocess_obj -> decl_storage list
val for_entrypoint : M.function_struct -> decl_entrypoint
val tz_type_to_type_micheline : Archetype__Michelson.type_node Archetype__Michelson.with_annot -> type_micheline
val for_errors : M.model -> error_struct list
val model_to_contract_interface : M.model -> M.model -> T.michelson -> contract_interface
val model_to_contract_interface_json : M.model -> M.model -> T.michelson -> string
val tz_type_to_type_ : T.type_ -> type_
val tz_type_to_args : T.type_ -> argument list
val remove_percent : string -> string
val extract_storage : T.type_ -> decl_storage list
val extract_entypoint : T.type_ -> decl_entrypoint list
val tz_to_contract_interface : (T.michelson * Gen_decompile.env) -> contract_interface
val tz_to_contract_interface_json : (T.michelson * Gen_decompile.env) -> string