fix: dependency upgrades (bech32 v2, @noble/hashes v2, bs58 v6, @noble/curves v2, chain-registry v2)#198
Open
pyramation wants to merge 3 commits intomainfrom
Open
fix: dependency upgrades (bech32 v2, @noble/hashes v2, bs58 v6, @noble/curves v2, chain-registry v2)#198pyramation wants to merge 3 commits intomainfrom
pyramation wants to merge 3 commits intomainfrom
Conversation
- bech32 v2: change import * to named import { bech32 }
- @noble/hashes v2: sha256/sha512 -> sha2, ripemd160 -> legacy
- @noble/curves v2: fromCompact -> fromBytes('compact'), toRawBytes -> toBytes
- bs58 v6: change import * to default import
- @chain-registry/client v2: snake_case -> camelCase (bech32_prefix, chain_name, chain_1/2, port_id, channel_id)
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…ports for v2 exports map compatibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps multiple dependencies to their latest major versions and fixes all resulting breaking import/API changes across the monorepo.
bech32packages/encoding/src/bech32.ts@noble/hashessha256/sha512moved tosha2module;ripemd160moved tolegacy; v2exportsmap requires.jsextensions on subpath importspackages/crypto,packages/auth@noble/curvesSignature.fromCompact()→fromBytes(_, 'compact');Point.toRawBytes()→toBytes(); v2exportsmap requires.jsextensionnetworks/ethereum/src/signers/base-signer.tsbs58networks/solana/@chain-registry/clientbignumber.jsdeepmergeUpdates since last revision
.jsextensions to all@noble/hashesand@noble/curvessubpath imports (7 files). The v2exportsmaps in these packages only expose.jssubpaths (e.g../sha2.js,./legacy.js,./secp256k1.js), which caused Jest's CJS resolver to fail withCannot find moduleerrors. This fix ensures both TypeScript compilation and Jest test resolution work correctly.Review & Testing Checklist for Human
@noble/curvesv2 API in ETH signer — The changes at <ref_snippet file="/home/ubuntu/repos/interchainjs/networks/ethereum/src/signers/base-signer.ts" lines="211-215" /> and <ref_snippet file="/home/ubuntu/repos/interchainjs/networks/ethereum/src/signers/base-signer.ts" lines="267-271" /> modify cryptographic signature recovery logic. Wrong API usage will cause silent failures or incorrect signatures. Manually verify against@noble/curves@2type definitions thatfromBytes(bytes, 'compact')andtoBytes(false)are correct..jsextension imports don't break downstream bundlers — All@noble/hashesand@noble/curvesimports now use.jsextensions (e.g.@noble/hashes/sha2.js). This is required by v2'sexportsmap and fixes Jest resolution. Confirm this doesn't break any bundler or consumer of these packages.bech32Prefix,chainName,chain1/chain2,portId/channelId) can't be validated without running starship integration tests. Spot-check against@chain-registry/types@2.0.163type definitions.bignumber.jsv10 breaking changes — This major bump has no corresponding source code changes. Verify the library is only used in ways compatible with v10 (or that it's actually backwards compatible).@noble/curvesandbs58are runtime-critical. Create test transactions for both networks.Test Plan
pnpm build— PASSES (injective has pre-existing error unrelated to this PR)networks/cosmos,networks/injective, andlibs/interchainjsto verify chain-registry v2 types@noble/curvesv2 APIbs58v6 default exportpnpm testto verify.jsextension imports work with JestNotes
src/signers/config.tstype mismatch). PR is marked mergeable.src/signers/config.ts(also fails on main branch)