Skip to content

A wrapper around IPFS for speeding up the loading of web3 frontend applications.

License

Notifications You must be signed in to change notification settings

capsulesocial/ipfs-wrapper

Repository files navigation

ipfs-wrapper

npm (scoped)

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);
})();

License

GNU AFFERO GENERAL PUBLIC LICENSE 3