Nourishing Pear Medley

    @multiformats/murmur3
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.3 • Public • Published

    @multiformats/murmur3

    Murmur3-32 (x86 32-bit) and Murmur3-128 (x64 128-bit) multihash hashers for multiformats.

    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'

    License

    Licensed under either of

    Contribution

    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.

    Install

    npm i @multiformats/murmur3

    DownloadsWeekly Downloads

    24,850

    Version

    1.1.3

    License

    (Apache-2.0 AND MIT)

    Unpacked Size

    17.2 kB

    Total Files

    17

    Last publish

    Collaborators

    • npm-service-account-multiformats
    • alanshaw
    • vascosantos
    • achingbrain
    • lidel
    • rvagg
    • daviddias
    • vmx
    • mikeal
    • hugomrdias