js-multiformats
js-multiformats copied to clipboard
Multiformats interface (multihash, multicodec, multibase and CID)
I just ran into an issue where I was using an older version of Node (12.16.1) and getting a `"Cannot find module 'multiformats'"` error after installation. This seems to be...
https://github.com/multiformats/js-multiformats/pull/29 repurposed former `buffer: Buffer` property to `buffer: ArrayBuffer` property that as @mikeal points out can lead to issues in node land that would happily accept either and mutate it....
I suggest that the `version` is removed from the constructor and that it is always v1 automatically. There could be a dedicated `v0` constructor, or we just allow constructing it...
For security purposes we should allow hash implementations to come with hash size requirements, either a single integer or a range tuple. This would be used in the `validate` function...
Enable the BlockEncoder to use promise API in encode/decode methods. Why we need that: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto To enable the promise to encode/decode a breaking change to createUnsafe is required. The existing...
Bumps [aegir](https://github.com/ipfs/aegir) from 43.0.3 to 44.1.0. Release notes Sourced from aegir's releases. v44.1.0 44.1.0 (2024-07-29) Features move tsc linter rules to eslint (#1513) (f78c9ac) v44.0.3 44.0.3 (2024-07-29) Bug Fixes unpin...
Minimal sample with import: ``` import { CID } from 'multiformats'; async function main() { console.log(CID.parse('QmaozNR7DZHQK1ZcU9p7QdrshMvXqWK6gpu5rmrkPdT3L4')); } main().catch((error) => { console.error(error); process.exitCode = 1; }); ``` Getting: ``` Error: No...
I have this in my file ``` import { base64url } from 'multiformats/bases/base64'; ``` I run jest for testing and get this error ``` ● Test suite failed to run...
Ref: https://datatracker.ietf.org/doc/html/rfc9285 Ref: https://github.com/multiformats/multibase/pull/123 Ref: https://github.com/multiformats/multibase/pull/125 @ben221199
I've got fairly low confidence in this, but I had fun doing it. From what I can see, reference implementations depend on being able to read inputs as 8-bit pairs...