Skip to content

Commit 0184960

Browse files
OttoAllmendingerllm-git
andcommitted
feat(utxo-lib): use fixed sessionId for deterministic nonce creation
Issue: BTC-2651 Co-authored-by: llm-git <llm-git@ttll.de>
1 parent b81fc7a commit 0184960

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • modules/utxo-lib/src/testutil

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)