package archetype

  1. Overview
  2. Docs
module M = Model
type type_ = {
  1. node : string;
  2. name : string option;
  3. 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 expr_node =
  1. | String of string
val expr_node_to_yojson : expr_node -> Yojson.Safe.t
val pp_expr_node : Ppx_deriving_runtime.Format.formatter -> expr_node -> Ppx_deriving_runtime.unit
val show_expr_node : expr_node -> Ppx_deriving_runtime.string
type expression = {
  1. node : expr_node;
}
val expression_to_yojson : expression -> Yojson.Safe.t
val pp_expression : Ppx_deriving_runtime.Format.formatter -> expression -> Ppx_deriving_runtime.unit
val show_expression : expression -> Ppx_deriving_runtime.string
type parameter = {
  1. name : string;
  2. type_ : type_;
  3. const : bool;
  4. default : expression option;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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 decl_getter = {
  1. name : string;
  2. args : argument list;
  3. return : type_;
}
val decl_getter_to_yojson : decl_getter -> Yojson.Safe.t
val pp_decl_getter : Ppx_deriving_runtime.Format.formatter -> decl_getter -> Ppx_deriving_runtime.unit
val show_decl_getter : decl_getter -> 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_getter list;
  7. errors : expression 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 -> 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 -> decl_asset
val mk_decl_record : string -> decl_record_field list -> decl_record
val mk_decl_constructor : string -> type_ list -> decl_constructor
val mk_decl_enum : string -> decl_constructor list -> 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_getter : string -> argument list -> type_ -> decl_getter
val mk_parameter : string -> type_ -> bool -> expression option -> parameter
val mk_contract_interface : string -> parameter list -> decl_type -> decl_storage list -> decl_entrypoint list -> decl_getter list -> expression list -> contract_interface
val for_type : M.type_ -> type_
val for_parameter : M.parameter -> parameter
val for_argument : M.argument -> argument
val for_decl_type : 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_getter
val model_to_contract_interface : M.model -> contract_interface
val model_to_contract_interface_json : M.model -> string