Skip to content

feat(sdk-coin-sol): add SPL getTokenType and SolCoin programId guardrails#8904

Open
abhijeet8986 wants to merge 1 commit into
masterfrom
CHALO-506-sol-single-asset-consolidation
Open

feat(sdk-coin-sol): add SPL getTokenType and SolCoin programId guardrails#8904
abhijeet8986 wants to merge 1 commit into
masterfrom
CHALO-506-sol-single-asset-consolidation

Conversation

@abhijeet8986
Copy link
Copy Markdown
Contributor

@abhijeet8986 abhijeet8986 commented Jun 1, 2026

Ticket: CHALO-506

Description

M1 BitGoJS prerequisites for SOL single-asset consolidation (Phase 1). Wallet-platform will gate behavior behind wallet-platform_sol-consolidation_single-asset-enable; this PR does not change consolidation runtime behavior in WP.

Summary

  • Add getTokenType(): 'SPL' on @bitgo/sdk-coin-sol SolToken for SDK parity with TRX/ERC-20 token coins (used by WP for consolidateToken intent routing when WP adds the same method on its SolToken).
  • Add a statics regression test ensuring every SolCoin has a valid programId (classic SPL or Token-2022). WP resolves mint/programId at build time via coins.get(tokenName) — not via formatted SolTokenConfig.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Unit tests added in modules/sdk-coin-sol/test/unit/solToken.ts:
    getTokenType() returns 'SPL' for mainnet (sol:spx) and testnet (tsol:usdc) via existing TestBitGo / bitgo.coin() setup

  • Unit test added in modules/statics/test/unit/coins.ts:
    All SolCoin entries have programId ∈ { TokenProgramId, Token2022ProgramId }

@abhijeet8986 abhijeet8986 requested a review from a team as a code owner June 1, 2026 08:25
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 1, 2026

CHALO-506

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.

1 participant