-
Notifications
You must be signed in to change notification settings - Fork 300
feat(utxo-lib): standardize secp256k1 cryptography implementation #7209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(utxo-lib): standardize secp256k1 cryptography implementation #7209
Conversation
37712be
to
3384814
Compare
Export ECPairFactory and BIP32Factory to support reuse of factories with different ecc implementations. Issue: BTC-2668 Co-authored-by: llm-git <llm-git@ttll.de>
Replace uses of `utxo-lib` bip32 functionality with direct imports from `@bitgo/secp256k1`. This change maintains compatibility while using the preferred library for BIP32 operations. Issue: BTC-2668 Co-authored-by: llm-git <llm-git@ttll.de>
62b259f
to
824cc9a
Compare
Replace internal noble_ecc wrapper with direct imports from @bitgo/secp256k1. This removes redundant code while maintaining the same functionality. Deprecated exports are preserved for backward compatibility. Issue: BTC-2668 Co-authored-by: llm-git <llm-git@ttll.de>
99255c0
to
ceed183
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR standardizes cryptographic implementations by replacing various secp256k1 libraries with the official @bitgo/secp256k1 library. The changes consolidate cryptographic operations on a single library while maintaining backward compatibility.
- Replaces imports from bip32, ecpair, and @noble/secp256k1 with @bitgo/secp256k1
- Removes the internal noble_ecc wrapper module completely
- Updates package dependencies to use @bitgo/secp256k1 across modules
Reviewed Changes
Copilot reviewed 49 out of 49 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
modules/utxo-lib/src/noble_ecc.ts | Removes entire internal wrapper module |
modules/utxo-lib/src/index.ts | Updates exports to use @bitgo/secp256k1 with deprecation warnings |
modules/utxo-lib/package.json | Updates dependencies to use @bitgo/secp256k1 |
modules/secp256k1/src/index.ts | Adds missing ECPairFactory and BIP32Factory exports |
modules/abstract-utxo/* | Updates imports to use @bitgo/secp256k1 directly |
modules/utxo-core/* | Updates imports to use @bitgo/secp256k1 directly |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This PR standardizes our cryptographic implementations by replacing various
implementations with the official @bitgo/secp256k1 library:
utxo-lib
bip32 functionality with direct imports from@bitgo/secp256k1
in abstract-utxo module@bitgo/secp256k1 in utxo-lib
operations
These changes maintain backward compatibility while consolidating our
cryptographic operations on a single library.
Issue: BTC-2668