fix: update imports for major dependency upgrades (bech32 v2, @noble/hashes v2, bs58 v6, @noble/curves v2, chain-registry v2)#197
Open
pyramation wants to merge 2 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:
|
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
Fixes type and import errors caused by major dependency version bumps on the
feat/upgradesbranch. No logic changes — only import paths, export styles, and property name casing were updated to match new library APIs.bech32v2packages/encoding/src/bech32.ts@noble/hashesv2sha256/sha512moved tosha2;ripemd160moved tolegacypackages/crypto/src/sha.ts,pbkdf2.ts,ripemd.ts,packages/auth/src/utils.ts,built-in.tsbs58v6networks/solana/@noble/curvesv2Signature.fromCompact()→fromBytes(_, 'compact');toRawBytes()→toBytes()networks/ethereum/src/signers/base-signer.ts@chain-registryv2bech32_prefix,chain_name,chain_1/chain_2,port_id,channel_id)Review & Testing Checklist for Human
@noble/curvesv2 API: Thesecp256k1.Signature.fromBytes(bytes, 'compact')andpoint.toBytes(false)calls innetworks/ethereum/src/signers/base-signer.tsare the highest-risk change — confirm these match the actual v2 type signatures (runtime failure in ETH signing if wrong)base-signer.ts(lines 212-213, 268-269) and the IBC test blocks intoken.test.tspicked up extra indentation during editing — verify these don't cause linting issues or are acceptablebech32Prefix,chainName,chain1/chain2,portId,channelId) can't be validated without a starship environment — spot-check against@chain-registry/types@2type definitionspnpm buildto confirm all packages compile (injective has a pre-existing unrelated error)Notes
@typescript-eslintversion incompatibility — pre-existing, not introduced herenetworks/injectivebuild error (src/signers/config.tstype mismatch) also pre-exists onmain