cardano-node / cardano-cli set up on local machine (https://docs.cardano.org/projects/cardano-node/en/latest) Node.js installed version 14 cardano-cli-js package installed cardano-minter repo from the previous tutorial If you haven't already, watch the previous video tutorial here: https://youtu.be/OeOliguGn7Y
Clone the repo if you haven't already... git clone https://github.com/armada-alliance/cardano-minter-collection.git cd cardano-minter-collection Install additional dependencies npm install form-data dotenv axios lodash sharp promise-parallel-throttle prompt-sync --save After that, make sure to use the newest cardanocli-js repo by directly cloning it into the modules folder with the command:
git clone https://github.com/Berry-Pool/cardanocli-js.git temp_mod cp -r temp_mod/* node_modules/cardanocli-js/ rm -rf temp_mod
Create a script that will generate our assets in a nicely formatted json file called "assets.json".
node src/create-initial-assets-json.js
node src/download-test-images.js
generate thumbnails based on images from the metadata.json and give them same name with _thumbnail tag added to the name
node src/generate-thumbnails.js
Create an account Create api keys
create .env file and paste in our keys
create pin-to-ipfs.js iterate over each item in metadata.json and: pin the original image to ipfs pin the thumbnail to ipfs store the reference to both src and image on ipfs in metadata.json create pin-images-to-ipfs.js
node src/pin-to-ipfs.js
node src/pin-images-to-ipfs.js
Before you mint transaction Speak about the various minting policies. https://docs.cardano.org/projects/cardano-node/en/latest/reference/simple-scripts.html#Step-1---construct-the-tx-body
We will create a open minting policy script and export it in a JSON and TXT format.
node src/create-mint-policy.js
Create a "time-locked" minting policy script and export it in a JSON and TXT format.
node src/create-time-locked-mint-policy.js
We want to make a script that can get our Policy ID to be used in other parts of our program
node src/get-policy-id.js
build mint transaction with metadata.json calc fee rebuild sign submit
node src/mint-multiple-assets.js
node src/send-multiple-assets-back-to-wallet.js
If there are any errors with the metadata, this script is able to burn the entire wallet content:
bash node src/burn-all-assets.js
WARNING: All assets will be burned. Use with caution.