2.1.8 • Published 4 months ago

@multiformats/murmur3 v2.1.8

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

@multiformats/murmur3

multiformats.io codecov CI

Multiformats Murmur3 implementations

Table of contents

Install

$ npm i @multiformats/murmur3

MultihashHasherss are exported from this library, they produce MultihashDigests. Details about these can be found in the multiformats multihash interface definitions.

import * as Block from 'multiformats/block'
import * as codec from '@ipld/dag-cbor'
import { murmur3128 as hasher } from '@multiformats/murmur3'

async function run () {
  const value = { hello: 'world' }
  const block = await Block.encode({ value, hasher, codec })
  console.log(block.cid)
  // -> CID(bafyseebn7ksk6khsn4an2lzmae6wm4qk)
}

run().catch(console.error)

Usage

The @multiformats/murmur3 package exports murmur332 and murmur3128 MultihashHashers. The Multicodecs table defines these multihashes.

The murmur3-32, multicodec code 0x23, may be imported as:

import { murmur332 } from '@multiformats/murmur3'

The murmur3-128, multicodec code 0x22, may be imported as:

import { murmur3128 } from '@multiformats/murmur3'

The murmur3-x64-64 (which is first 64-bits of murmur3-128 used in UnixFS directory sharding), multicodec code 0x22, may be imported as:

import { murmur364 } from '@multiformats/murmur3'

License

Licensed under either of

Contribute

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

2.1.8

4 months ago

2.1.6

9 months ago

2.1.7

7 months ago

2.1.4

12 months ago

2.1.5

11 months ago

2.1.3

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.0

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago