Skip to content

Commit 06ec850

Browse files
committed
fix: add token fields to ConsolidateIntent TypeScript type
ConsolidateIntent.recipients was missing tokenAddress, tokenProgramId, and decimalPlaces — the same fields PaymentIntent has. The Rust build_consolidate now uses these for SPL transfer_checked instructions, and bgms passes them, but the TypeScript type didn't declare them. Ticket: BTC-3188
1 parent 03f800f commit 06ec850

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

packages/wasm-solana/js/intentBuilder.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export interface DurableNonce {
5151

5252
/** Parameters for building a transaction from intent */
5353
export interface BuildFromIntentParams {
54-
/** Fee payer address (wallet root) */
54+
/** Fee payer address — typically the wallet root, but for consolidation this is the child address being swept */
5555
feePayer: string;
5656
/** Nonce source - blockhash or durable nonce */
5757
nonce: NonceSource;
@@ -175,10 +175,16 @@ export interface ConsolidateIntent extends BaseIntent {
175175
intentType: "consolidate";
176176
/** The child address to consolidate from (sender) */
177177
receiveAddress: string;
178-
/** Recipients (root address for SOL, ATAs for tokens) */
178+
/** Recipients (root address for native SOL, wallet ATAs for tokens) */
179179
recipients?: Array<{
180180
address?: { address: string };
181-
amount?: { value: bigint };
181+
amount?: { value: bigint; symbol?: string };
182+
/** Mint address (base58) — if set, this is an SPL token transfer */
183+
tokenAddress?: string;
184+
/** Token program ID (defaults to SPL Token Program) */
185+
tokenProgramId?: string;
186+
/** Decimal places for the token (required for transfer_checked) */
187+
decimalPlaces?: number;
182188
}>;
183189
}
184190

0 commit comments

Comments
 (0)