0.0.2 • Published 4 months ago

@arcblock/ipfs-only-hash v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@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