A simple node script for pinning FA2 tokens to Pinata or a local IPFS node. You can pin your created or collected tokens.
Some tokens only support pinning your collected tokens. This is due to how some tokens store their metadata (see comments in ./src/tzkt.js for more info). I hope to improve this in the future, but for now, all tokens that you have collected should work.
I know that the following tokens support pinning for both created and collected:
- Teia / Hic et Nunc
- Objkt.com
- Versum
- Install IPFS: https://ipfs.io/#install (only for local pinning)
- Install Node.js: https://nodejs.com
- Download or clone repo
cd
into directory from the terminalcp .env.sample .env
- Replace values in
.env
with your Pinata keys and your Tezos addresses npm i
to install dependencies- Run one of the pinning commands:
npm run pinata created
,npm run pinata collected
,npm run local created
, ornpm run local collected
Note: pinning locally can take a long time and is prone to failure due to failed discovery in the IPFS network. If you try enough times, it will usually succeed. :)