Skip to content

Commit fd109ef

Browse files
Merge pull request #6788 from BitGo/BTC-2411
feat(utxo-core): explicitly set SIGHASH_ALL for BIP322 inputs
2 parents f5eb754 + b06eeb9 commit fd109ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/utxo-core/src/bip322/toSign.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Psbt, bitgo, networks } from '@bitgo/utxo-lib';
1+
import { Psbt, bitgo, networks, Transaction } from '@bitgo/utxo-lib';
22
import { toXOnlyPublicKey } from '@bitgo/utxo-lib/dist/src/bitgo/outputScripts';
33

44
import { addBip322ProofMessage } from './utils';
@@ -57,6 +57,7 @@ export function addBip322Input(psbt: Psbt, message: string, addressDetails: Addr
5757
index: 0, // vin[0].prevout.n = 0
5858
sequence: 0, // vin[0].nSequence = 0
5959
nonWitnessUtxo: toSpendTx.toBuffer(), // previous transaction for us to rebuild later to verify
60+
sighashType: Transaction.SIGHASH_ALL,
6061
});
6162
const inputIndex = psbt.data.inputs.length - 1;
6263
psbt.updateInput(inputIndex, {

0 commit comments

Comments
 (0)