From 45e473954214a2db61d615aaf317f19bf17092d7 Mon Sep 17 00:00:00 2001 From: David Kaplan Date: Wed, 27 May 2026 09:25:17 -0400 Subject: [PATCH] feat(express): add qr param to sendmany, sendcoins, prebuildAndSign schemas Allow the `qr` (quantum-resistant sweep) boolean parameter through Express typed route validation for all three transaction endpoints. Without this, Express strips the unknown field before forwarding to Wallet-Platform. Ticket: T1-3417 Co-authored-by: Cursor --- .../src/typedRoutes/api/v2/prebuildAndSignTransaction.ts | 2 ++ modules/express/src/typedRoutes/api/v2/sendCoins.ts | 3 +++ modules/express/src/typedRoutes/api/v2/sendmany.ts | 3 +++ 3 files changed, 8 insertions(+) diff --git a/modules/express/src/typedRoutes/api/v2/prebuildAndSignTransaction.ts b/modules/express/src/typedRoutes/api/v2/prebuildAndSignTransaction.ts index 30e3dbf117..cc8bb4a18d 100644 --- a/modules/express/src/typedRoutes/api/v2/prebuildAndSignTransaction.ts +++ b/modules/express/src/typedRoutes/api/v2/prebuildAndSignTransaction.ts @@ -398,6 +398,8 @@ export const PrebuildAndSignTransactionBody = { keepAlive: optional(t.boolean), /** Transaction format ('legacy', 'psbt', or 'psbt-lite') */ txFormat: optional(t.union([t.literal('legacy'), t.literal('psbt'), t.literal('psbt-lite')])), + /** (UTXO only) Quantum-resistant sweep mode — sweeps quantum-exposed unspents to fresh wallet addresses */ + qr: optional(t.boolean), /** Solana custom instructions */ solInstructions: optional(t.array(SolInstruction)), /** Solana versioned transaction data */ diff --git a/modules/express/src/typedRoutes/api/v2/sendCoins.ts b/modules/express/src/typedRoutes/api/v2/sendCoins.ts index 313a6f581b..9afc27c05b 100644 --- a/modules/express/src/typedRoutes/api/v2/sendCoins.ts +++ b/modules/express/src/typedRoutes/api/v2/sendCoins.ts @@ -353,6 +353,9 @@ export const SendCoinsRequestBody = { /** Flag indicating if this is the last signature */ isLastSignature: optional(t.boolean), + /** (UTXO only) Quantum-resistant sweep mode — sweeps quantum-exposed unspents to fresh wallet addresses */ + qr: optional(t.boolean), + /** Pre-built transaction object */ txPrebuild: optional(t.any), diff --git a/modules/express/src/typedRoutes/api/v2/sendmany.ts b/modules/express/src/typedRoutes/api/v2/sendmany.ts index 5fd4463b6d..b55a9b918a 100644 --- a/modules/express/src/typedRoutes/api/v2/sendmany.ts +++ b/modules/express/src/typedRoutes/api/v2/sendmany.ts @@ -429,6 +429,9 @@ export const SendManyRequestBody = { /** Flag indicating if this is the last signature */ isLastSignature: optional(t.boolean), + /** (UTXO only) Quantum-resistant sweep mode — sweeps quantum-exposed unspents to fresh wallet addresses */ + qr: optional(t.boolean), + /** Pre-built transaction object */ txPrebuild: optional(t.any),