Skip to content

Cip68Config

Extends: Resource

Description

Property Descriptions

minting_policy

@export var minting_policy: ScriptResource

minting_policy_source

var minting_policy_source: PlutusScriptSource

token_name

@export var token_name: PackedByteArray
  • Setter: @token_name_setter

The token name [b]body[/b] (i.e: the part of the token name that is not the CIP67 header).

token_name_as_hex

@export var token_name_as_hex: String
  • Setter: @token_name_as_hex_setter
  • Getter: @token_name_as_hex_getter

The token name, hex-encoded.

token_name_as_utf8

@export var token_name_as_utf8: String
  • Setter: @token_name_as_utf8_setter
  • Getter: @token_name_as_utf8_getter

The token name, UTF-8 encoded.

name

@export var name: String

The standard "name" field.

image

@export var image: String

The standard "image" field. This should be a valid URI.

media_type

@export var media_type: String = "image/webp"

description

@export var description: String = ""

The standard "description" field.

file_details

@export var file_details: Array[FileDetails]

An array of FileDetails.

non_standard_metadata

@export var non_standard_metadata: Dictionary
  • Setter: @non_standard_metadata_setter

This is [i]non-standard[/i], [i]optional[/i] CIP-25 metadata.[br][br]Use this for any additional fields you want to provide that are not required by the CIP25 standard. Any field names overlapping with standard field names (like "name" and "image") will be ignored. Keys of the dictionary should be [String]s, while values may be:[br][br]1. [String] (which will be converted [PackedByteArray])[br]2. [PackedByteArray][br]3. [int] (which will be converted to BigInt)[br]4. BigInt[br]5. [Array], [b]but only if its elements are valid values[/b].[br]6. [Dictionary], [b]but only if its keys and values are valid[/b].[br][br]Notably, you may not use neither [bool] nor [Constr]. If these conditions are too restrictive, take a look at [member Cip68ConfigPair.extra_plutus_data].

extra_plutus_data

@export var extra_plutus_data: PlutusDataResource

fungible

@export var fungible: bool = false
  • Setter: @fungible_setter

initial_quantity

@export var initial_quantity: int = 1
  • Setter: @initial_quantity_setter
  • Getter: @initial_quantity_getter

big_int_script

var big_int_script: Script = "<GDScript#-9223370951654056035>"

file_details_script

var file_details_script: Script = "<GDScript#-9223370945530372171>"

Method Descriptions

get_user_token_name

func get_user_token_name() -> AssetName

Get the CIP68 user token name

get_ref_token_name

func get_ref_token_name() -> AssetName

Get the CIP68 reference token name

get_quantity

func get_quantity() -> BigInt

to_data

func to_data() -> Variant

The flag only applies for serializing the [member Cip68ConfigPair.extra_plutus_data]. The CIP25 metadata follows its own rules for serialization.

make_user_asset_class

func make_user_asset_class(script_source: PlutusScriptSource = null) -> AssetClass

make_ref_asset_class

func make_ref_asset_class(script_source: PlutusScriptSource = null) -> AssetClass

init_script

func init_script(provider: Provider) -> void

Load the minting policy from file or by querying the Provider. This must be performed in before most actions with this config will be possible.