3.0.4 • Published 8 months ago

@dcl/hashing v3.0.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

@dcl/hashing

Hashing functions to calculate Decentraland Content Identifiers

  • hashV1(arg): Promise<string>: ba prefixed hashes are IPFSv1 hashes. Calculating hashes for files should generate the same result as an IPFS node.
  • DEPRECATED hashV0(arg): Promise<string>: Qm prefixed hashes are not IPFSv0 hashes, although it uses the same encoding (Qm...). These

npm i @dcl/hashing

import { hashV1 } from '@dcl/hashing'

// use with Node.js Buffers or Uint8Array
cid = await hashV1(fs.readFileSync('file'))

// use with fs.ReadStream
cid = await hashV1(fs.createReadStream('file'))

// => bafybeibdik2ihfpcdi7aaaguptwcoc5msav7uhn5hu54xlq2pdwkh5arzy
3.0.4

9 months ago

3.0.3

10 months ago

3.0.2

10 months ago

3.0.1

10 months ago

3.0.0

10 months ago

2.0.0

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago