Storage Endpoints

In addition to blockchain endpoints, KrypCore Web3 also supports storage endpoints, specifically for distributed storage protocols like IPFS (InterPlanetary File System). Storage endpoints provide a convenient way to store and retrieve decentralized data, including NFT metadata, documents, media files, and more. By utilizing storage endpoints in KrypCore Web3, developers can leverage the benefits of distributed storage and ensure the availability and permanence of their data.

  • IPFS: KrypCore Web3 offers storage endpoints for IPFS, a peer-to-peer distributed file system. Developers can store files on IPFS and retrieve them through the provided endpoints, enabling seamless integration of decentralized file storage into their Dapps.

These storage endpoints enable developers to store and retrieve data in a decentralized manner, ensuring redundancy, censorship resistance, and data availability for their Dapps.

Uploading Images with IPFS

To upload images using storage endpoints in KrypCore Web3, developers can use the following curl command:

curl --location 'https://ipfs-client.node.krypcore.io/api/v0/ipfs/{API_KEY}/api/v0/add?recursive=false&pin=true' \
--header 'Authorization: xxxxxxxxxxxxxxxxxxx' \
--form 'file=@"file.png"'

Replace "file.png" with the actual file path you want to upload.

Retrieving an IPFS File

To retrieve a file from IPFS, you can use the following curl command:

curl --location 'https://ipfs-gateway.node.krypcore.io/api/v0/ipfs/{API_KEY}/ipfs/{IPFS HASH}' \
     --header 'Authorization: xxxxxxxxxxxxxxxxx'

Replace {IPFS HASH} with the specific hash (CID) of the file you want to retrieve.

Last updated