Details and Options
nftSpec is an association with the following keys:
"AssetName" | asset name |
"Name" | NFT metadata name |
"Thumbnail" | thumbnail image of the NFT |
"ThumbnailMIMEType" | thumbnail image MIME type |
"Source" | source data of the NFT |
"SourceMIMEType" | source data MIME type |
"Description" | description of the NFT |
"Expression" | Wolfram Language expression associated with the NFT |
"Notebook" | Wolfram Notebook associated with the NFT |
"NFTID" | whether to create an autogenerated ID for the NFT |
"NFTQuantity" | number of NFTs to mint |
"OwnerAddress" | recipient address that will own this particular NFT |
"AdditionalMetadata" | association containing custom "other properties" as specified by the CIP 25 NFT Metadata Standard |
The maximum string length of "AssetName" is 32 characters.
The maximum string length of "Name" is 64 characters.
The maximum string length of "Description" is 64 characters.
The maximum string length of "Expression" is 64 characters.
"Thumbnail" can be a
File containing the path to an image file, or an expression such as
Image,
Graphics or
Graphics3D. Ideally, the image size should be less than 1 MB.
ResourceFunction["MintNFT"] will automatically use
ExternalStorageUpload to upload the contents to
IPFS.
"Thumbnail" can also be a
String with a custom URI. In this last case, MintNFT will not upload the file to IPFS and, instead, use the provided
String. You need to specify the file MIME type using the
"ThumbnailMIMEType" key when providing a
String as
"Thumbnail".
"Source" can be a
File containing the path to the source file associated with the NFT, or an expression such as
Image,
Graphics or
Graphics3D.
ResourceFunction["MintNFT"] will automatically use
ExternalStorageUpload to upload the contents to
IPFS.
"Source" can also be a
String with a custom URI. In this last case, MintNFT will not upload the file to IPFS and, instead, use the provided
String. You need to specify the file MIME type using the
"SourceMIMEType" key when providing a
String as
"Thumbnail".
"Notebook" is a
File containing the path to a notebook associated with the NFT.
With
"NFTID"→True, an ID will be autogenerated using the current
UnixTime and a random integer. Note that this is an accessory metadata ID used for readability when sharing the NFT details. This ID does not identify the NFT on the blockchain.
"NFTQuantity" has a default value of 1. With "NFTQuantity"→n, n copies of the NFT will be minted under the same transaction.
Files associated with the NFT, such as the ones specified by "Thumbnail", "Source" and "Notebook", will be automatically uploaded to
IPFS and their content identifiers (CIDs) will be added to the NFT's on-chain metadata.
transactionSpec is an association with the following keys:
"OwnerAddress" | recipient address that will own the NFT |
"PrivateKey" | private key used to sign the minting transaction |
"Fee" | transaction fee |
"OutputAmount" | amount of cryptocurrency to include in the new transaction output |
"TimeLock" | minting policy time-lock slot number |
"OwnerAddress" can be any valid address, including the address associated with "PrivateKey". If used in the transactionSpec association, all assets in nftSpec will be owned by the specified address. For multiple different owners, specify "OwnerAddress" in each nftSpec association and omit it in transactionSpec.
"PrivateKey" should be a
PrivateKey associated with the address with enough balance to mint the NFT.
If "Fee" is not included, it will be automatically computed.
If "OutputAmount" is not included, it will be automatically computed.
If the "OwnerAddress" is the same address associated with the "PrivateKey", "OutputAmount" will not be used.
"TimeLock" can be used to specify a slot number for the time-lock mint policy. Assets under the policy ID can only be minted before the specified slot. Possible values include:
None | no time-lock |
n | number of slots after the current one |
{n} | specific slot number |
Default value is "TimeLock"→4000.
ResourceFunction["MintNFT"] has the following options:
"Preview" | True | whether to preview a transaction instead of submitting to the blockchain |
BlockchainBase | {"Cardano","Testnet"} | blockchain to use |
The
BlockchainBase option for this function currently supports only
"Cardano" (Cardano mainnet) and
{"Cardano","Testnet"} (Cardano testnet) as values.
$BlockchainBase can also be used to set the default
BlockchainBase value.