Skip to content

feat(sdk-coin-sol): add addFeePayerSignature() - #9848

Draft
ralph-bitgo[bot] wants to merge 1 commit into
masterfrom
CHALO-1652-fee-payer-rewrite-versioned-tx-pt1
Draft

ralph-bitgo[bot] wants to merge 1 commit into
masterfrom
CHALO-1652-fee-payer-rewrite-versioned-tx-pt1

Conversation

@ralph-bitgo

@ralph-bitgo ralph-bitgo Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

What

  • Adds addFeePayerSignature(publicKey, signature) to Transaction and TransactionBuilder in modules/sdk-coin-sol.
  • The method wraps the existing addSignature() and rejects a key that is not account 0 of the message (the fee payer): for a versioned transaction that is the first static account key; for a legacy transaction @solana/web3.js places the fee payer first. On both message kinds the signature lands in slot 0.

Why

  • Sponsored SOL transactions (CHALO-983 PRD, SOL Gasless Fee Payer) are paid by the enterprise fee address, whose HSM single-sig signature must end up in slot 0 next to the wallet signature. SOL has no such method today (APT and SUI do).
  • This is the CHALO-996 scope, pulled in as the dependency surface of the CHALO-1652 fee-payer rewrite (part 2 of this stack), because CHALO-996 had not landed when this work started. If CHALO-996 lands first, this PR can be dropped in favor of it.

Test plan

  • npx mocha test/unit/transaction.ts: the fee-payer signature fills the empty signature slot of RAW_TX_UNSIGNED and reproduces RAW_TX_SIGNED byte-for-byte; a non-account-0 key and an unbuilt transaction are rejected
  • npm run lint and tsc --build clean in modules/sdk-coin-sol
  • Full module unit suite green (761 passing)

Ticket: CHALO-1652

Stack

This PR is part 1 of 2 in a stack. Review and merge in order:

  1. feat(sdk-coin-sol): add addFeePayerSignature() #9848 — addFeePayerSignature() (CHALO-996 dependency surface; base: master) ← you are here
  2. feat(sdk-coin-sol): rewrite fee payer for versioned custom transactions #9849 — fee-payer rewrite for versioned custom transactions (base: CHALO-1652-fee-payer-rewrite-versioned-tx-pt1)

@linear-code

linear-code Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

CHALO-1652

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Unit tests are failing on Node 26.x (Current release line, non-blocking). This is not an LTS version yet, so it does not block merge, but it signals an incompatibility to fix before Node 26.x becomes LTS.

View run

@ralph-bitgo
ralph-bitgo Bot force-pushed the CHALO-1652-fee-payer-rewrite-versioned-tx-pt1 branch from 29f424f to 71b0f65 Compare September 29, 2026 10:56
Add addFeePayerSignature(publicKey, signature) to Transaction and
TransactionBuilder, wrapping the existing addSignature() and
rejecting a key that is not account 0 of the message (the fee
payer). For versioned transactions account 0 is the first static
account key; for legacy transactions web3.js places the fee payer
first, so the signature lands in slot 0 on both.

Sponsored SOL transactions need the enterprise fee key's
signature in slot 0 (CHALO-983); SOL had no such method yet. This
is the CHALO-996 dependency surface of the fee-payer rewrite.

Ticket: CHALO-1652
Session-Id: c2138ca7-d8a2-46e6-8dd0-e00e22cc44c0
Task-Id: 40c147ec-2821-4dfc-a85f-85bc82e625fa
@MohammedRyaan786
MohammedRyaan786 force-pushed the CHALO-1652-fee-payer-rewrite-versioned-tx-pt1 branch from 71b0f65 to a0c5168 Compare October 7, 2026 06:17

This branch has not been deployed

No deployments
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