Package Exports
- @arcblock/ipfs-only-hash
- @arcblock/ipfs-only-hash/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@arcblock/ipfs-only-hash) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@arcblock/ipfs-only-hash
Just enough code to calculate the IPFS hash for some data
Install
npm install @arcblock/ipfs-only-hashUsage
const { onlyHash } = require('@arcblock/ipfs-only-hash')
const data = 'hello world!';
const hash = await onlyHash(data);
console.log(hash); // QmTp2hEo8eXRp6wg7jXv1BLCMh5a4F3B7buAUZNZUu772j