lnmap
v2.0.0
Published
Typed Map of IPLD links (CIDs) and values.
Downloads
133
Readme
lnmap
Typed Map of IPLD links (CIDs) and values.
Install
npm i lnmap
Usage
import { Map } from 'lnmap'
import { sha256 } from 'multiformats/hashes/sha2'
import * as raw from 'multiformats/codecs/raw'
import { CID } from 'multiformats/cid'
const key = CID.create(1, raw.code, sha256.digest(new Uint8Array()))
const value = 'any data'
const map = new Map()
map.set(key, value)
console.log(map.get(key)) // prints: "any data"
Contributing
Feel free to join in. All welcome. Please open an issue!
License
Dual-licensed under MIT + Apache 2.0