cd banano-nft-node
npm install
Make sure postgres service is running and start it if it's not:
sudo systemctl status postgresql.service
sudo systemctl start postgresql.service
sudo systemctl restartstart postgresql.service
Run psql:
psql postgres
Drop the database if you're doing a hard reset:
DROP DATABASE bananonfts;
Create database and add pgcrypto extension:
CREATE DATABASE bananonfts;
\q
psql bananonfts
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
DATABASE_URL=postgres://user:password@localhost:5432 npm run migrate up
Copy and rename .env_example
to .env
.
Set PGPASSWORD and BANANODE_RPC_URL.
When the Banano node is synced, to bootstrap, run:
npm run bootstrap
If you start with npm start
it will also automatically bootstrap issuers that have not been bootstrap yet in the scheduler.
Once the node has bootstrapped the NFT ledger, start the server with:
npm start
Add addresses to ./src/get-issuers.ts
and restart the server to enable new issuers.
npm install pm2 -g
pm2 start --name bananonftnode "npm start"
curl -X GET https://cwispy.app/nft_api/owner/ban_1airtunes8qctdtjhnfu5tpegk337rgcgnbtktozg6ttz3hordo6chf5c31r/nfts
curl -X GET https://cwispy.app/nft_api/issuer/ban_1bdaynbz85gw3tzzqh991kjegcetsjakjjg7wefee8r9jciiihk3gy76fpim/supply_blocks
curl -X GET https://cwispy.app/nft_api/supply_block/035F30B48459AF8EC086E7E6194A05940189E03BA5ACE6DB8B5CE22F3DE00A67/nfts
curl -X GET https://cwispy.app/nft_api/nft/ban_3ra3j9abpxidodetmwbe3sc5dsbn7mekh9duu7j4wnk7aznwxezy7e3g6dne/history