đ¨Create Non-Fungible Token
Used to create a new non-fungible token.
Planning a three step process for command line minting scripts:
token create (set royalties / name / supply etc.) -> returns supply key / token ID
pin images and resulting metadata on IPFS
mint the NFTs using the pinned metadata
Step 1: Create the Token ID on Hedera
Start of a set of minting tools. This is 'step 1' of creating the token ID with 0 serials but ready to mint.
The script will read in the information and present you with a summary asking for confirmation to attempt the token create. once complete the script will ask if you wish to have the details & keys saved to file (highly recommended) - if not / on failure it will print to console.
Usage
Edit your .env file (rename .env.example to .env) with the following items:
Per the usage pattern you can override NFT details on the command line if needed otherwise it will use values from the .env
We recommend to remove the private key from the .env file after use. Extra precaution.
Then, in your Node.js command prompt terminal, you can use
Arguments
-wipe - optional - to add a wipe key
-royalty - optional - to add royalties to the token, pass in the royalty .json file with -royalty (optional) -> see royalties_example.json for an example. Format of the json file expected:
-freeze - optional - add a freeze key
-admin - optional - add a pause key
-save - optional - save supply key and NFT info into a file
-name - optional - name of the NFT
-symbol - optional - symbol of the NFT
-desc '' - optional - max 100 characters description
-max - optional - max supply of the NFT
-feecap - optional - to cap the total of fees to spend on this operation
Step 2: Pin Metadata to IPFS
First, be sure to have your NFT.storage API KEY. See this documentation to know how to get one:
You can also use NFTUp software to pin your metadata and files to IPFS.
Step 3: Mint Supply from the Pinned Metadata
NFT minting script if you have already pinned the metatdata.json file into IPFS (see step 2) and created the token (see step 1).
Designed to track status and be replayable in case of failure during the minting process.
Usage
Edit your .env file (rename .env.example to .env) with the following items:
We recommend to remove the private key from the .env file after use. Extra precaution.
Then, in your Node.js command prompt terminal, you can use
Arguments
-process json file to read in and process
File formatting for this json:
or (output format of this script that includes tracking)
Last updated