Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/capsulesocial/ipfs-wrapper

A wrapper around IPFS for speeding up the loading of web3 frontend applications.
https://github.com/capsulesocial/ipfs-wrapper

blogchain capsulesocial frontend ipfs ipfs-core js-ipfs web3

Last synced: 21 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# ipfs-wrapper

![npm (scoped)](https://img.shields.io/npm/v/@capsulesocial/ipfs-wrapper)

A wrapper around [ipfs-core](https://www.npmjs.com/package/ipfs-core) for speeding up the loading of web3 frontend applications.

Used on [Blogchain](https://blogchain.app).

## Requirements

- NodeJS v14.5.0 or higher.

## Usage

```typescript
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](./LICENSE)