Skip to content

fix!: identity hash is SyncMultihashHasher<0>#337

Merged
achingbrain merged 1 commit into
masterfrom
fix/identity-as-multihash-hasher
May 7, 2026
Merged

fix!: identity hash is SyncMultihashHasher<0>#337
achingbrain merged 1 commit into
masterfrom
fix/identity-as-multihash-hasher

Conversation

@achingbrain
Copy link
Copy Markdown
Member

@achingbrain achingbrain commented May 5, 2026

Updates the type of the identity hash to SyncMultihashHasher<0x00> to enable passing it where MultihashHasher<Code> instances are expected.

It was also necessary to update the returned type of from to be MultihashHasher<Code> instead of the concrete Hasher type which has extra properties that are not part of hashing.

Fixes #313
Supersedes #314

BREAKING CHANGE: all Hashers are now MultihashHasher<Code>s

@achingbrain achingbrain requested review from lidel and rvagg May 5, 2026 12:42
@achingbrain achingbrain changed the base branch from master to fix/update-import-paths May 5, 2026 14:58
@achingbrain
Copy link
Copy Markdown
Member Author

This PR targets #335 to reduce exposure to merge conflicts - it should be merged into master shortly after that one goes in.

Base automatically changed from fix/update-import-paths to master May 7, 2026 05:49
@achingbrain achingbrain force-pushed the fix/identity-as-multihash-hasher branch 3 times, most recently from f570ca1 to 465b8a6 Compare May 7, 2026 06:06
Updates the type of the identity hash to `SyncMultihashHasher<0x00>` to enable passing it where `MultihashHasher<Code>` instances are expected.

It was also necessary to update the returned type of `from` to be `MultihashHasher<Code>` instead of the concrete `Hasher` type which has extra properties that are not part of hashing.

Fixes #313
Supersedes #314

BREAKING CHANGE: all `Hasher`s are now `MultihashHasher<Code>`s
@achingbrain achingbrain force-pushed the fix/identity-as-multihash-hasher branch from 465b8a6 to 96e2da3 Compare May 7, 2026 06:06
@achingbrain achingbrain merged commit 9b5b12b into master May 7, 2026
20 checks passed
@achingbrain achingbrain deleted the fix/identity-as-multihash-hasher branch May 7, 2026 06:11
github-actions Bot pushed a commit that referenced this pull request May 7, 2026
## [14.0.0](v13.4.2...v14.0.0) (2026-05-07)

### ⚠ BREAKING CHANGES

* all `Hasher`s are now `MultihashHasher<Code>`s
* Returned `Uint8Array`s are now `Uint8Array<ArrayBuffer>`

### Bug Fixes

* identity hash is SyncMultihashHasher<0> ([#337](#337)) ([9b5b12b](9b5b12b)), closes [#313](#313) [#314](#314)
* specify type of backing buffer when Uint8Arrays are returned ([#335](#335)) ([bac2da5](bac2da5))
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

🎉 This PR is included in version 14.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: identity hash doesn't export proper type of Hasher<Name, Code>

2 participants