1.0.5 • Published 1 year ago

ipfs-web3storage-cid v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

ipfs-web3storage-cid

Takes a file buffer and returns the IPFS CID v1 (Same as that generated by Web3.Storage)

A better way to name files and have it compatible with IPFS / Web3.Storage CIDs. Generally prefer this method over generating random UUIDs.

Install

# install it as a dependency
$ npm i ipfs-web3storage-cid

Usage

import fs from 'fs';
import { getCID } from 'ipfs-web3storage-cid';

const buffer = fs.readFileSync('./demo.jpg');

const cid = await getCID(buffer);

console.log(cid);
1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago