⛏️uploadToIPFS
Last updated
Last updated
The uploadToIPFS
function uploads JSON data to the IPFS using the Pinata API and returns the IPFS hash of the uploaded data.
Parameter | Type | Description |
---|---|---|
Property | Type | Description |
---|---|---|
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:
Here is an example of how to make a uploadToIPFS
request using the Nest SDK:
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.
pinataApiKey
string
Pinata API key
pinataSecretApiKey
string
Pinata API secret key
data
object
Data to be uploaded to IPFS
ipfsHash
string
IPFS hash of the uploaded data