Skip to content

Conversation

@lcovar
Copy link
Contributor

@lcovar lcovar commented Nov 25, 2025

The ESM build support added in PR #7534 introduced strict exports in package.json which blocks deep imports like:

  • @bitgo/utxo-staking/dist/src/babylon/parseDescriptor
  • @bitgo/utxo-staking/dist/src/babylon/network

This breaks consumers (e.g., wallet-platform) that rely on these internal modules. By re-exporting them from the babylon namespace, consumers can import via the public API:

import { babylon } from '@bitgo/utxo-staking';
const { parseStakingDescriptor, toBitcoinJsNetwork } = babylon;

Ticket: BTC-2826

TICKET: BTC-2826

The ESM build support added in PR #7534 introduced strict `exports` in
package.json which blocks deep imports like:
- @bitgo/utxo-staking/dist/src/babylon/parseDescriptor
- @bitgo/utxo-staking/dist/src/babylon/network

This breaks consumers (e.g., wallet-platform) that rely on these internal
modules. By re-exporting them from the babylon namespace, consumers can
import via the public API:

  import { babylon } from '@bitgo/utxo-staking';
  const { parseStakingDescriptor, toBitcoinJsNetwork } = babylon;

Ticket: BTC-2826

TICKET: BTC-2826
@lcovar lcovar requested a review from a team as a code owner November 25, 2025 19:03
@OttoAllmendinger OttoAllmendinger merged commit 6add082 into master Nov 25, 2025
14 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.

3 participants