Skip to content

Conversation

@OttoAllmendinger
Copy link
Contributor

@OttoAllmendinger OttoAllmendinger commented Oct 22, 2025

Move UTXO coin implementations from coin-specific modules into the
abstract-utxo module. Each coin implementation now resides in its own
directory under src/impl/ and is re-exported from the main module.

The original structure did not provide much benefit and makes testing much more difficult than it should be.

This change:

  • Consolidates UTXO coin implementations in abstract-utxo
  • Allows coin-specific modules to simply re-export implementations
  • Simplifies maintenance and keeps the code DRY
  • Moves test files from individual UTXO coin modules into abstract-utxo
  • Reorganizes test directory structure with separate unit and integration
    test directories
  • Adds sdk-test and mocha as devDependencies to abstract-utxo

This changes allows us to move the utxo tests from bitgo/test/v2/unit/coins/utxo to
abstract-utxo in subsequent PRs.

BTC-2652

@OttoAllmendinger OttoAllmendinger force-pushed the BTC-2652.move-abstract-utxo-impl branch 2 times, most recently from 2cd9eaf to a67e9e6 Compare October 22, 2025 12:58
Move UTXO coin implementations from coin-specific modules into the
abstract-utxo module. Each coin implementation now resides in its own
directory under src/impl/ and is re-exported from the main module.

This allows coin-specific modules to simply re-export the implementations
from abstract-utxo, which simplifies maintenance and keeps the code DRY.

Migrates test files from individual UTXO coin modules into the abstract-utxo
module under test/impl/<coin>. This consolidates all tests in one place for
better organization and reuse.

Added sdk-test and mocha as devDependencies to abstract-utxo package.json.

Issue: BTC-2652

Co-authored-by: llm-git <llm-git@ttll.de>
@OttoAllmendinger OttoAllmendinger force-pushed the BTC-2652.move-abstract-utxo-impl branch from a67e9e6 to 02e2e69 Compare October 22, 2025 13:03
@OttoAllmendinger OttoAllmendinger changed the title # feat(abstract-utxo): move and reorganize UTXO coin implementations and tests feat(abstract-utxo): move and reorganize UTXO coin implementations and tests Oct 22, 2025
@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review October 22, 2025 13:26
@OttoAllmendinger OttoAllmendinger requested review from a team as code owners October 22, 2025 13:26
Copy link

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 consolidates UTXO coin implementations by moving them from individual coin-specific modules into the abstract-utxo module, establishing a cleaner architecture where coin modules simply re-export implementations. This refactoring also relocates and reorganizes test files from individual UTXO coin modules into abstract-utxo with separate unit and integration test directories.

Key Changes:

  • Moved coin implementations (BTC, BCH, BCHA, BSV, BTG, LTC, DASH, DOGE, ZEC) from sdk-coin-* modules to abstract-utxo/src/impl/
  • Updated coin-specific modules to re-export from @bitgo/abstract-utxo instead of local implementations
  • Reorganized test structure with dedicated unit and integration directories in abstract-utxo

Reviewed Changes

Copilot reviewed 82 out of 94 changed files in this pull request and generated no comments.

Show a summary per file
File Description
modules/sdk-coin-*/src/index.ts Re-exports coin implementations from @bitgo/abstract-utxo and consolidates register function
modules/sdk-coin-*/package.json Removes test scripts and dependencies now handled by abstract-utxo
modules/abstract-utxo/src/impl/* New coin implementation files organized by coin type
modules/abstract-utxo/src/index.ts Exports all coin implementations from impl directory
modules/abstract-utxo/test/* Updated import paths to reflect new directory structure
modules/abstract-utxo/package.json Adds devDependencies (sdk-test, mocha) and utxo-ord dependency
Dockerfile Reorders utxo-ord module copy and linking to match dependency structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@OttoAllmendinger OttoAllmendinger merged commit 860cc73 into master Oct 24, 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.

4 participants