Skip to content

0x-esh/cardano-minter-collection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to make a NFT collection on Cardano using javascript.

Prerequisites

If you haven't already, watch the previous video tutorial here: https://youtu.be/OeOliguGn7Y

Clone the cardano-minter repo if you haven't already...

git clone https://github.com/ADA-Pi/cardano-minter
cd cardano-minter

Install additional dependencies

npm install form-data dotenv axios lodash sharp promise-parallel-throttle --save

Tutorial Overview

1. Create our initial assets

  • Create a script that will generate our assets in a nicely formatted json file called "assets.json".
node src/create-initial-assets-json.js

2. Download random images for testing

node src/download-test-images.js

3. Extend metadata.json with thumbnails (optional)

  • 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

4. Create our pinata.cloud account to get our API keys

  1. Create an account
  2. Create api keys

5. Need to safely store our API keys

  • create .env file and paste in our keys

6. upload and pin our data to ipfs

  • 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

7. Create an "open" or "unlocked" minting policy and script

  • We will create a open minting policy script and export it in a JSON and TXT format.
node src/create-mint-policy.js

8. Create an "time-locked" minting policy and script

  • Create a "time-locked" minting policy script and export it in a JSON and TXT format.
node src/create-time-locked-mint-policy.js

9. Create a a script to get our policy ID

  • 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

9. Define the mint transaction

  1. build mint transaction with metadata.json
  2. calc fee
  3. rebuild
  4. sign
  5. submit
node src/mint-multiple-assets.js

10. Send assets back to wallet

-Make a script to send multiple assets back to a wallet in a single transaction.

node src/send-multiple-assets-back-to-wallet.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.1%
  • Shell 0.9%