A H=N IPFS pinning tool.
Hic et Nunc (like most NFT platforms) stored the NFT data on IPFS. This is a network of decentralized file hosts. Every computer running an IPFS node is an edge caching server for the network as well as a host for specific (pinned) files. You can run your own website from IPFS if you like :)
There's a caveat with IPFS: If nobody is pinning a piece of content, it can expire from the network and be lost.
You can backup the Hic et Nunc platform (or just your own creations and collection, or that of your friends) by running an IPFS node and pinning the associated content.
This is a tool for pinning all of the creations and collections of a given tezos wallet.
- Install and run IPFS: https://ipfs.io/#install
- Git Clone this repository or download the release zip file
- Make sure you have Node.js installed: http://nodejs.org
- run
npm i
to install node modules - Pin collection/creations by wallet address:
node pin.js tz1iyFi4WjSttoja7Vi1EJYMEKKSebQyMkF9
or edit pin.sh
to add your own addresses and run like so:
./pin.sh
There is a default timeout on IPFS pin set to 60 seconds in ./config.js
. You can override this value by setting the IPFS_PIN_TIMEOUT
env var to an arbitrary value like so:
Example setting timeout to 1 second:
IPFS_PIN_TIMEOUT=1s node pin.js tz1iyFi4WjSttoja7Vi1EJYMEKKSebQyMkF9
# OR
IPFS_PIN_TIMEOUT=1s ./pin.sh
You can fun a full node of all H=N published assets by running
node henode.js
This will keep track of which files have already succesfully pinnned in a local state file (.state.json
) and will resume from there on restarts.
To use a remote pining service, change the defaults in the ./config.js
and
- set the value of
local
tofalse
- set the value of
remoteservice
to the nickname of your ipfs remote service
If you want to use the free 1GB pinning service from Pinata follow this guide https://docs.ipfs.io/how-to/work-with-pinning-services/#use-an-existing-pinning-service to get the API key and set it up in your IPFS instance.
You can reset
your ipfs pins (unpin everything) like so:
ipfs pin ls --type recursive | cut -d' ' -f1 | xargs -n1 ipfs pin rm
ipfs repo gc
this repo created by Adam Eivy @antic - https://tryshowtime.com/antic
Much thanks, very wow goes to https://hicdex.com/ (the underlying query api) by @marchingsquare - https://www.hicetnunc.xyz/marchingsquare