Skip to content

Commit 2d9370c

Browse files
feat(awm): adapting recovery flows to take backup awm
Ticket: WCN-363
1 parent 734533f commit 2d9370c

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/advancedWalletManager/routers/advancedWalletManagerApiSpec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ const RecoveryMultisigRequest = {
7272
bitgoPub: optional(t.string),
7373
unsignedSweepPrebuildTx: t.any,
7474
walletContractAddress: optional(t.string),
75+
// When set, only sign with the specified key (user half-sign or backup full-sign).
76+
// When omitted, the endpoint signs with both keys (default single-AWM behavior).
77+
keyToSign: optional(t.union([t.literal('user'), t.literal('backup')])),
78+
// Required when keyToSign is 'backup': the half-signed transaction from the user-key phase.
79+
halfSignedTransaction: optional(t.any),
7580
};
7681

7782
// Response type for /multisig/recovery endpoint

src/masterBitgoExpress/clients/advancedWalletManagerClient.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ interface RecoveryMultisigOptions {
9999
| MPCTx
100100
| RecoveryTransaction;
101101
walletContractAddress: string;
102+
// When set, only sign with the specified key (user half-sign or backup full-sign).
103+
keyToSign?: 'user' | 'backup';
104+
// Required when keyToSign is 'backup': the half-signed transaction from the user-key phase.
105+
halfSignedTransaction?: any;
102106
}
103107

104108
interface SignMpcCommitmentParams {

0 commit comments

Comments
 (0)