@capsulesocial/ipfs-wrapper
v1.1.0
Published
Blogchain's IPFS wrapper
Downloads
5
Readme
ipfs-wrapper
A wrapper around ipfs-core for speeding up the loading of web3 frontend applications.
Used on Blogchain.
Requirements
- NodeJS v14.5.0 or higher.
Usage
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);
})();