UNPKG

@arcblock/ipfs-only-hash

Version:

Just enough code to calculate the IPFS hash for some data

20 lines (13 loc) 358 B
# @arcblock/ipfs-only-hash Just enough code to calculate the IPFS hash for some data ## Install ```sh npm install @arcblock/ipfs-only-hash ``` ## Usage ```js const { onlyHash } = require('@arcblock/ipfs-only-hash') const data = 'hello world!'; const hash = await onlyHash(data); console.log(hash); // QmTp2hEo8eXRp6wg7jXv1BLCMh5a4F3B7buAUZNZUu772j ```