⛏️uploadToIPFS
Description
The uploadToIPFS
function uploads JSON data to the IPFS using the Pinata API and returns the IPFS hash of the uploaded data.
Parameters
pinataApiKey
string
Pinata API key
pinataSecretApiKey
string
Pinata API secret key
data
object
Data to be uploaded to IPFS
Response
ipfsHash
string
IPFS hash of the uploaded data
Example Request and Response
Prerequisites
Before making requests with Nest SDK, you must have it installed.
You can install Nest SDK using either npm
or yarn
. Use the following commands to install Nest SDK:
Request
Here is an example of how to make a uploadToIPFS
request using the Nest SDK:
Response
Use Cases
NFT Marketplaces: The function can be used by NFT marketplaces to upload NFT metadata to IPFS.
Decentralized Applications (DApps): The function can be used by DApps to store data, such as user profiles or transaction records, on the IPFS network.
Digital Asset Management: The function can be used by digital asset management systems to store and retrieve digital files, such as images or videos, on IPFS.
Last updated