Convert a BlockCodec from the multiformats module into an IPLD Format for use with the IPLD module.
$ npm i blockcodec-to-ipld-format
const { convert } = require('blockcodec-to-ipld-format')
const dagCbor = require('@ipld/dag-cbor')
const format = convert(dagCbor)
// use interface-ipld-format methods
console.info(format.codec)
console.info(format.defaultHashAlg)
console.info(format.util.serialize({ foo: 'bar' }))
// etc..
https://ipld.github.io/js-blockcodec-to-ipld-format/
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct.
This project is dual-licensed under Apache 2.0 and MIT terms: