Skip to content

Conversation

@lcovar
Copy link
Contributor

@lcovar lcovar commented Feb 6, 2026

Why this upgrade is needed

The current @solana/spl-token@0.3.1 has a broken ESM build - the .mjs files have incorrect import paths that reference directories instead of files (e.g., ./memoTransfer.mjs instead of ./memoTransfer/index.mjs).

This blocks webpack browser bundles from using ESM resolution for @bitgo/sdk-coin-sol, which is required for @bitgo/wasm-solana support (WASM modules need ESM for proper async initialization in browsers).

What changed in 0.4.x

  1. Fixed ESM imports - uses .js files with "type": "module" and correct paths like ./memoTransfer/index.js

  2. Removed SYSVAR_RENT_PUBKEY from Associated Token Account instructions. This is a valid Solana protocol change - the rent sysvar was deprecated because the Solana runtime now provides rent information automatically. Transactions are now more efficient (6 accounts instead of 7).

Test fixture updates

27 test fixtures in test/resources/sol.ts were regenerated to reflect the new transaction serialization. The transactions are functionally equivalent and valid on-chain.

Ticket: BTC-3009

Copy link
Contributor

@Vijay-Jagannathan Vijay-Jagannathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im assuming that bumping this change in WP could potentially cause some test failures ? anything else that could affect ?

@lcovar lcovar marked this pull request as ready for review February 6, 2026 17:02
@lcovar lcovar requested review from a team as code owners February 6, 2026 17:02
@lcovar
Copy link
Contributor Author

lcovar commented Feb 9, 2026

im assuming that bumping this change in WP could potentially cause some test failures ? anything else that could affect ?

WP test failures are likely if we test byte by bytes but that should be it.

Copy link
Contributor

@Vijay-Jagannathan Vijay-Jagannathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@therealdwright therealdwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign your commit please.

## Why this upgrade is needed

The current @solana/spl-token@0.3.1 has a broken ESM build - the .mjs
files have incorrect import paths that reference directories instead
of files (e.g., `./memoTransfer.mjs` instead of `./memoTransfer/index.mjs`).

This blocks webpack browser bundles from using ESM resolution for
@bitgo/sdk-coin-sol, which is required for @bitgo/wasm-solana support
(WASM modules need ESM for proper async initialization in browsers).

## What changed in 0.4.x

1. Fixed ESM imports - uses .js files with "type": "module" and
   correct paths like `./memoTransfer/index.js`

2. Removed SYSVAR_RENT_PUBKEY from Associated Token Account instructions.
   This is a valid Solana protocol change - the rent sysvar was deprecated
   because the Solana runtime now provides rent information automatically.
   Transactions are now more efficient (6 accounts instead of 7).

## Test fixture updates

27 test fixtures in test/resources/sol.ts were regenerated to reflect
the new transaction serialization. The transactions are functionally
equivalent and valid on-chain.

Ticket: BTC-3009
@lcovar lcovar force-pushed the BTC-3009-upgrade-spl-token branch from c99427c to 2a0b8a3 Compare February 10, 2026 08:35
@lcovar lcovar merged commit 1600842 into master Feb 10, 2026
30 of 31 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