1.1.0 • Published 2 years ago

@capsulesocial/ipfs-wrapper v1.1.0

Weekly downloads
-
License
GPL-3.0-only
Repository
github
Last release
2 years ago

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