Repository navigation
feat(sdk-core): forward SOL intent wire version (Refs: CHALO-1603) - #10027
Merged
Merged
Conversation
Contributor
Contributor
|
|
bhavidhingra
force-pushed
the
bhavi/sol-v1-intent-version
branch
from
October 22, 2026 08:42
78853b9 to
9b2a4c8
Compare
prebuildTransaction builds the payment intent from an explicit literal, so version was dropped before populateIntent and every v1 payment request silently built a v0 envelope. Add version (0 | 1) to PrebuildTransactionOptions, PrebuildTransactionWithIntentOptions and PopulatedIntent, forward it in the payment literal, and copy it onto the intent in Sol.setCoinSpecificFieldsInIntent (the only coin-level seam populateIntent exposes).
bhavidhingra
force-pushed
the
bhavi/sol-v1-intent-version
branch
from
October 22, 2026 09:55
9b2a4c8 to
c7e8dac
Compare
MohammedRyaan786
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Solana v1 (SIMD-0296/0385) payments never reached Wallet Platform as v1:
Wallet.prebuildTransaction/sendManybuild the txRequest intent from an explicit literal (modules/sdk-core/src/bitgo/wallet/wallet.ts:4531), so a caller-suppliedversion: 1was dropped beforepopulateIntentand every request silently produced a v0 envelope — no error, no warning.This PR forwards the marker:
version?: 0 | 1onPrebuildTransactionOptions(wallet/iWallet.ts),PrebuildTransactionWithIntentOptionsandPopulatedIntent(utils/tss/baseTypes.ts)version: params.versionin the payment intent literal (wallet/wallet.ts)Sol.setCoinSpecificFieldsInIntentcopies it onto the intent (sdk-coin-sol/src/sol.ts:2248) — the only coin-level seampopulateIntentexposes (utils/mpcUtils.ts:118ends with that hook)Wallet Platform already consumes it:
isStructuredPaymentV1Intent(intentType === 'payment' && intent.version === 1) selectsbuildStructuredV1Payment, which builds the envelope server-side viagetV1PaymentBuilder(). The intent contract exists in public-types (SolVersionMarker).Scope note: no example scripts are included — the manifest and broadcast evidence below came from throwaway local scripts, which are not tested and do not belong in the repo.
Issue Number
CHALO-1603
Type of change
How Has This Been Tested?
modules/sdk-coin-sol: 889 passing, including 3 new cases intest/unit/solIntentVersion.ts(forwards1, forwards0, leaves the key absent when unset).modules/sdk-core:mpcUtils.wrapApprove+mpcUtils.unwrapintent suites, 9 passing.346Keirjtcp84XQJ8i8Bbp1szrBetyv3vB4nRhKujwdyrhaRg1pyqyNrsEciEAd3sQ9vQKSPenj3V5c22v89aHgd,27RSCHiVZeDpTUfDJB6idaNBRKzWu1eNrzUyhLqMbCbmBJNBWwkrqpLjojsXHorsVdb9KZWL8JMPdx1bqSP8rMco);getTransactionreportsversion: 1, fee 10,000 (5,000 base + 5,000 priority from the v1 config).tsolhot wallet builds a 411-byte 0x81 envelope whose persisted intent carriesversion: 1, and signs toreadyToSend.POST /tx/sendthen returns 500Failed to deserialize transaction: io error: unexpected end of file— the send/assembly path cannot parse v1 yet; tracked in CHALO-1603, not introduced here.Checklist: