Deep Dive on Filecoin & IPFS use cases in the Solana ecosystem

  • What are Filecoin and IPFS, and what problems it's solving in the blockchain ecosystem?
  • Use cases
    – Using IPFS to store NFTs and metadata of Candy Machine V2
    – Using the various IPFS libraries for storage in your dapps
    – Deploying and hosting dapps on IPFS
  • Awesome Developer Tools
    – Pinata
    – Fleek
    – Web3.Storage
    – NFT.Storage

Filecoin and IPFS

Interplanetary File System (IPFS)

Filecoin

Use cases

Using IPFS in Candy Machine V2

{
"price": 1.0,
"number": 10,
"gatekeeper": null,
"solTreasuryAccount": "<YOUR WALLET ADDRESS>",
"splTokenAccount": null,
"splToken": null,
"goLiveDate": "25 Dec 2021 00:00:00 GMT",
"endSettings": null,
"whitelistMintSettings": null,
"hiddenSettings": null,
"storage": "ipfs",
"ipfsInfuraProjectId": <ADD_PROJECT_ID>,
"ipfsInfuraSecret": <ADD_SECRET_KEY>,

"nftStorageKey": null,
"awsS3Bucket": null,
"noRetainAuthority": false,
"noMutable": false
}

IPFS Libraries for your Dapps

const node = await IPFS.create()const data = 'Hello, Buildooor'const results = node.add(data)for await (const { cid } of results) {
// CID (Content IDentifier) uniquely addresses the data
// and can be used to get it again.
console.log(cid.toString())
}
const node = await IPFS.create()const stream = node.cat('QmQHXWBEM4xGySEcxf7MdaeKb453zAvkF8oRXRVQ9tqN9E')
let data = ''
for await (const chunk of stream) {
// chunks of data are returned as a Buffer, convert it to string
data += chunk.toString()
}
console.log(data)

Deploying and Hosting dapps on IPFS

  1. Sign up on https://fleek.co/
  2. Click on Add New Site on the top right.

Awesome Developer Tools

Pinata

  1. Go to their website https://www.pinata.cloud/

Fleek

  • Fully Private file upload via encrypted textile buckets.
  • Peer to Peer file sharing selectively with other people and/or within teams.
  • Identity solution to enable users to be anywhere from fully anonymous to having as many identity associations as they want.
  • More….

Web3.Storage

import { Web3Storage } from 'web3.storage';

// Construct with token and endpoint
const client = new Web3Storage({ token: apiToken });

NFT.Storage

Conclusion

Resources to study further

References

--

--

--

Coding Enthusiast | Machine Learning | Competitive Coder | Data Analyst | Full time Transponster

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Make WordPress and WPML respect different sub-folders for languages using Nginx

Diagram of servers on Amazon AWS

Pulumi…a look at the new kid on the IaC block…

Master all different types of Binary Search and their Sample Code

Stored Procedure Support coming soon to dotnet Report

Serverless “Hello World” in AWS

Go: Variables

EdenLoop ELT Listing Events on DigiFinex

Why I implemented a Serverless Function in COBOL.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Harsh Ghodkar

Harsh Ghodkar

Coding Enthusiast | Machine Learning | Competitive Coder | Data Analyst | Full time Transponster

More from Medium

Switchboard: A community-driven, decentralized oracle network on Solana

SevenX Ventures & Meson Network 「Founders Forum」 Twitter Space Transcript: Decentralized Networks

What the Heck is Web3 Anyways?

Globaldce reinvents eBay in decentralized way with its own native cryptocurrency