Skip to content

feat(sdk-coin-sol): upgrade @solana/spl-token from 0.3.1 to 0.4.9#8072

Open
lcovar wants to merge 1 commit intomasterfrom
BTC-3009-upgrade-spl-token
Open

feat(sdk-coin-sol): upgrade @solana/spl-token from 0.3.1 to 0.4.9#8072
lcovar wants to merge 1 commit intomasterfrom
BTC-3009-upgrade-spl-token

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

## 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
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.

2 participants