GitHunt
ST

steppsr/nftstorage-proofofconcept

proof of concept to upload file to nft.storage

nftstorage-proofofconcept

This script is a proof of concept. The goal is to build a script to be able to upload a file to
nft.storage and get the CID back.

Goals

  • script upload to nft.storage
  • verify local hash of file matches the hash of the file after being uploaded
  • output the CID returned from nft.storage
  • ouput the local file hash
  • ouput the remote file hash (by downloading the remote file and then hashing)

Prerequisites

You will need to install jq in order to parse the CID out of the JSON response from NFT.storage.
Here is how to do that install:

sudo apt install jq

Preparing to run

You will need to edit the script and add in your file name.
You will also need an API key from nft.storage. You can create an account here: Create NFT Storage Account

Running the script

bash poc.sh

References
NFT.Storage HTTP API

Languages

Shell100.0%

Contributors

Latest Release

v0.1July 25, 2022
Apache License 2.0
Created July 25, 2022
Updated December 12, 2023