mint algorand NFTs from node.js following ARC-69
You will need node (https://nodejs.org/en/). After cloning the repo, npm install
or yarn install
should install all dependencies.
- Make an https://nft.storage/ account and put the key in
.env
as theNFTSTORAGE_KEY
. - Specify your Algorand Node Environment:
ALGO_NODE_ENV
should be 'MainNet' or 'TestNet'- Depending on what
ALGO_NODE_ENV
is set to the system will use the TESTNET_ or regular server, token, and port settings.
- Make a testnet account using your wallet of choice, fund it and put the mnemonic in the
.env
asMNEMONIC
. The format should be space-delimited, not comma-delimited.
.env
ALGO_NODE_ENV="TestNet"
NFTSTORAGE_KEY=""
MNEMONIC="your mnemonic keyphrase is probably twenty five words"
TESTNET_ALGO_SERVER=https://testnet-api.algonode.cloud
TESTNET_ALGO_PORT=443
TESTNET_ALGO_TOKEN=
ALGO_SERVER=https://mainnet-api.algonode.cloud
ALGO_PORT=443
ALGO_TOKEN=
In server.js
, change the following variables for your project:
const UNIT_PREFIX = "BUB-"; // Prefix before identifying number in unit name. eg. "BUB-1", "BUB-2",...
const ASSET_PREFIX = "Algobubble #"; // Prefix before identifying number in asset name
const DESCRIPTION = "generative bubbles";
const MIME_TYPE = "image/png"; // if .jpg, use image/jpg etc.
const EXTERNAL_URL = ""; // external URL, NOT the image URL (could be project URL, etc)
Put your images to be minted in the /images
directory.
Edit properties.csv
to contain the appropriate data for your project. Each row must contain filename
, but you can leave columns empty and they won't be populated. eg.
filename | a | b | c | d | e |
---|---|---|---|---|---|
1641042139996.png | testA | testB | testC | testD | testE |
1641042143236.png | testF | testG | testH | testI | testJ |
1641042146100 | testK | testL | testN | testO |
To run, simply execute node server.js
. If all goes well, you should see some messages being logged relating to your transactions.
The system keeps track of what it has minted so users do not have to start from scratch every time the script is run. If you wish to start from scratch ensure no state.json
file exists at the project root. If one does, delete it. It is safe to do so.
This tool is completely free to use, but if you want to send me an NFT or a few ALGO in thanks you can hit me up on Twitter (https://twitter.com/AlgofishExe) or send to FISHEXEW6C4H6PRREM4OLBQ3EOMI2ETUBM2C3UCNHSV33LA5RTM6A577T4
:)
If my updates have helped you, feel free to send me a nice tweet. My Twitter handle is @CryptoRUSH_Gav, or buy me a coffee. My NFD address is cryptorush.algo
.
v1.1.0 (by @CryptoRUSH_Gav):
- Added ability for script to start where it left off. If you wish to start over, make sure to delete the
state.json
file. - Updated
algosdk
,nft.storage
dependencies - Updated
.env
file. You can now control which environment you are running on straight from the.env
file. - Added an
.env.example
file. When starting a new project, just copy it to.env
and update the configuration as necessary.