A wrapper around ipfs-core for speeding up the loading of web3 frontend applications.
Used on Blogchain.
- NodeJS v14.5.0 or higher.
import ipfs, { initIPFS } from '@capsulesocial/capsule-ipfs'
initIPFS();
(async () => {
const data = { foo: "random json data" };
const cid = await ipfs().sendJSONData(data);
const receivedData = await ipfs().getJSONData(cid);
console.log(receivedData);
})();