Skip to content

Commit 04317c7

Browse files
OttoAllmendingerllm-git
andcommitted
feat(utxo-lib): use fixed sessionId for deterministic nonce creation
Issue: BTC-2651 Co-authored-by: llm-git <[email protected]>
1 parent 98155e8 commit 04317c7

File tree

1 file changed

+3
-1
lines changed
  • modules/utxo-lib/src/testutil

1 file changed

+3
-1
lines changed

modules/utxo-lib/src/testutil/psbt.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ export function constructPsbt(
212212
return psbt;
213213
}
214214

215-
psbt.setAllInputsMusig2NonceHD(rootWalletKeys['user']);
215+
/* use fixed sessionId for deterministic nonce creation */
216+
const sessionId = Buffer.alloc(32);
217+
psbt.setAllInputsMusig2NonceHD(rootWalletKeys['user'], { sessionId });
216218
psbt.setAllInputsMusig2NonceHD(rootWalletKeys['bitgo'], { deterministic });
217219

218220
signAllPsbtInputs(psbt, inputs, rootWalletKeys, 'halfsigned', { signers, skipNonWitnessUtxo });

0 commit comments

Comments
 (0)