npm.io
0.0.2 • Published 2 years ago

@arcblock/ipfs-only-hash

Licence
MIT
Version
0.0.2
Deps
2
Size
5 kB
Vulns
0
Weekly
0

@arcblock/ipfs-only-hash

Just enough code to calculate the IPFS hash for some data

Install

npm install @arcblock/ipfs-only-hash

Usage

const { onlyHash } = require('@arcblock/ipfs-only-hash')
const data = 'hello world!';
const hash = await onlyHash(data);
console.log(hash); // QmTp2hEo8eXRp6wg7jXv1BLCMh5a4F3B7buAUZNZUu772j

Keywords