Skip to content

Conversation

OttoAllmendinger
Copy link
Contributor

This PR standardizes our cryptographic implementations by replacing various
implementations with the official @bitgo/secp256k1 library:

  • Replace utxo-lib bip32 functionality with direct imports from
    @bitgo/secp256k1 in abstract-utxo module
  • Replace internal noble_ecc wrapper with direct imports from
    @bitgo/secp256k1 in utxo-lib
  • Use ECPair instead of custom @noble/secp256k1 implementation for signing
    operations

These changes maintain backward compatibility while consolidating our
cryptographic operations on a single library.

Issue: BTC-2668

@OttoAllmendinger OttoAllmendinger force-pushed the BTC-2668.use-secp256k1-instead-of-utxolib branch 3 times, most recently from 37712be to 3384814 Compare October 13, 2025 07:43
OttoAllmendinger and others added 2 commits October 13, 2025 10:12
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>
@OttoAllmendinger OttoAllmendinger force-pushed the BTC-2668.use-secp256k1-instead-of-utxolib branch 2 times, most recently from 62b259f to 824cc9a Compare October 13, 2025 08:18
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>
@OttoAllmendinger OttoAllmendinger force-pushed the BTC-2668.use-secp256k1-instead-of-utxolib branch 2 times, most recently from 99255c0 to ceed183 Compare October 13, 2025 08:45
@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review October 14, 2025 07:26
@OttoAllmendinger OttoAllmendinger requested review from a team as code owners October 14, 2025 07:26
Copy link

@Copilot Copilot AI left a 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.

@OttoAllmendinger OttoAllmendinger merged commit 09a7ce9 into master Oct 15, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants