@@ -55,6 +55,9 @@ export type TransactionInfo = {
5555 flags ?: number ,
5656} ;
5757
58+ // TransactionInfo without keyPath (keyPath is at request level for multi-transaction support)
59+ export type TransactionData = Omit < TransactionInfo , 'keyPath' > ;
60+
5861export enum BitcoinTransactionInputType {
5962 STANDARD = 'standard' ,
6063 HTLC_REDEEM = 'htlc-redeem' ,
@@ -167,10 +170,17 @@ export type ExportResult = {
167170
168171type SignTransactionRequestCommon = SimpleRequest & TransactionInfo ;
169172
170- export type SignTransactionRequestStandard = SignTransactionRequestCommon & {
173+ // Standard layout supports both single and multiple transactions
174+ export type SignTransactionRequestStandard = SimpleRequest & {
175+ keyPath : string ,
171176 layout ?: 'standard' ,
172- recipientLabel ?: string ,
173- } ;
177+ recipientLabel ?: string , // Only used for single-tx display
178+ } & (
179+ // Option A: Single transaction (backward compatible - fields directly on request)
180+ TransactionData |
181+ // Option B: Multiple transactions
182+ { transactions : TransactionData [ ] | Uint8Array [ ] }
183+ ) ;
174184
175185export type SignTransactionRequestCheckout = SignTransactionRequestCommon & {
176186 layout : 'checkout' ,
@@ -616,6 +626,8 @@ export type ListLegacyResult = LegacyKeyInfoObject[];
616626export type SignTransactionResult = SignatureResult & {
617627 serializedTx : Uint8Array ,
618628} ;
629+ // Array result type for multi-transaction signing
630+ export type SignTransactionResults = SignTransactionResult [ ] ;
619631export type SignStakingResult = SignatureResult & {
620632 transaction : Uint8Array ,
621633} ;
@@ -653,6 +665,7 @@ export type RedirectResult
653665 | SignatureResult
654666 | ConnectResult
655667 | SignTransactionResult
668+ | SignTransactionResults
656669 | SignStakingResult [ ]
657670 | SignedBitcoinTransaction
658671 | SignedPolygonTransaction
@@ -667,7 +680,7 @@ export type Result = RedirectResult | IFrameResult;
667680
668681export type ResultType < T extends RedirectRequest > =
669682 T extends Is < T , SignMessageRequest > ? SignatureResult :
670- T extends Is < T , SignTransactionRequest > ? SignTransactionResult :
683+ T extends Is < T , SignTransactionRequest > ? SignTransactionResult | SignTransactionResults :
671684 T extends Is < T , SignMultisigTransactionRequest > ? SignatureResult :
672685 T extends Is < T , SignStakingRequest > ? SignStakingResult [ ] :
673686 T extends Is < T , ConnectRequest > ? ConnectResult :
@@ -684,7 +697,7 @@ export type ResultType<T extends RedirectRequest> =
684697
685698export type ResultByCommand < T extends KeyguardCommand > =
686699 T extends KeyguardCommand . SIGN_MESSAGE ? SignatureResult :
687- T extends KeyguardCommand . SIGN_TRANSACTION ? SignTransactionResult :
700+ T extends KeyguardCommand . SIGN_TRANSACTION ? SignTransactionResult | SignTransactionResults :
688701 T extends KeyguardCommand . SIGN_MULTISIG_TRANSACTION ? SignatureResult :
689702 T extends KeyguardCommand . SIGN_STAKING ? SignStakingResult [ ] :
690703 T extends KeyguardCommand . CONNECT_ACCOUNT ? ConnectResult :
0 commit comments