JSON API that servers ERC-721 compatible metadata for an NFT collection on the blockchain.
Feature | Supported |
---|---|
MIT License | ✔ |
Hide non minted NFTs | ✔ |
Shuffle | ✔ |
Reveal | ✔ |
Handle none traits | ✔ |
IPFS | ✔ |
Google Cloud Storage | ✔ |
npm install
npm start
npm i -g pm2
pm2 start scripts/start.js
pm2 kill
pm2 list
pm2 restart
pm2 stop [ID]
npm run shuffle
: randomizes the metadata to make the minting process excitingnpm run upload_images_update
: uploads images to IPFSnpm run upload_images_ipfs
: uploads images to IPFSnpm run upload_images_gcs
: uploads images to Google Cloud Storage. Just make sure you have yourgcs.json
keyfile on the project directorynpm run remove_none_traits
: removes all traits marked as "none" to make the metadata rarity.tools friendly
Make sure you follow all these steps when launching this API:
- Upload this project to a linux virtual machine on the cloud (digital ocean, amazon web services etc..)
- Replace your contract ABI
./Contract.json
- Replace your un revealed image on
./unrevealed/image.png
- Set the variables on the top of
scripts/start.js
, keep theIS_REVEALED
variable set tofalse
to start the server with unrevealed mode - Start the server with
npm start
- Put all your images and metadata on
./images/
and./metadata/
respectively
- Consider using FTP or scp, for example:
scp -r [email protected]:/path/to/remote/source /path/to/local/destination
- run
npm run shuffle
- run
npm run remove_none_traits
if needed - Upload your images, choose between CGS or IPFS
- IPFS
- Run
npm run upload_images_ipfs
- Run
- Google Cloud Services
- Put your
gcs.json
keyfile on this project directory - Run
npm run upload_images_gcs
- Install the google cloud console and run this to open the files in the browser instead of downloading them by downloading the Google Cloud SDK and running this:
gsutil -m setmeta -h "Content-Type: image/png" -h "Content-Disposition: inline;" gs://YOURBUCKETNAME/*
. Remember to setYOURBUCKETNAME
.
- Put your
- Once you want to reveal the Images and Metadata set the
IS_REVEALED
totrue
onscripts/start.js
, stop and restart the server