Skip to content

refactor: remove bitcoinjs-lib v5 and consolidate PSBT on v6 #461

Description

@kunal-595

Hi, @bucko13

What do you think about this?

Current State

the repository depnds on two major versions of bitcoinjs-lib:

  • v5.1.10
    • @caravan/bitcoin
    • @caravan/wallets
  • v6.1.5
    • @caravan/psbt
    • @caravan/transactions

this results in duplicated dependncies, incompatible types, and incresed maintenance overhead

Duplicate PSBT Implementations

Two independent PsbtV2 implemntations exist:

  • @caravan/bitcoin/src/psbtv2.ts
  • @caravan/psbt/src/psbtv2/*

The v6 implementation is actively used and supports features not present in the v5 version
The v5-based implementation appears unused and redndant.

Issues

  • multiple versions of the same core dependency
  • type incompatibilities across package boundaries
  • duplicated PSBT logic
  • implicit and inconsistently enforced ECC initialzation

Proposed Direction

  • standardize all packages on bitcoinjs-lib@^6.1.5
  • migrate remaining v5-dependent code
  • deprecate and remove PSBT exports from @caravan/bitcoin
  • treat @caravan/psbt as the single PSBT implementation
  • remove all v5 dependencies and aliases

If this direction makes sense to you, i am willing to start working on the migraton and consolidation outlined above

let me know if you would like me to proced, or if you would prefer any scope adjustments before implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions