Pinata-Rust is a command-line tool that allows you to interact with the Pinata IPFS API. It provides functionality to pin files, pin IPFS content by hash, pin JSON data, and unpin content from Pinata's IPFS nodes.
-
Clone the repository:
git clone https://github.com/microdapps/pinata-rust.git
-
Environment variables:
You will need to create a Pinata account and generate API keys. You can do so here: https://pinata.cloud/keys. Once you have your API keys, you will need to set the following environment variables in a .env
file on the root of the project:
export PINATA_API_KEY=<your-pinata-api-key>
export PINATA_API_SECRET=<your-pinata-secret-api-key>
-
Build the project:
cargo build
-
Run the project:
cargo run
This option allows you to pin a file to Pinata's IPFS nodes. You can pin a file by providing a path to the file.
This option allows you to pin IPFS content by hash. You can pin content by hash by providing a hash.
This option allows you to pin JSON data to Pinata's IPFS nodes. You can pin JSON data by providing the JSON data.
This option allows you to unpin content from Pinata's IPFS nodes. You can unpin content by providing a hash.