@exodus/bip322-js 1.1.0-exodus.3 → 1.1.0-exodus.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Signer.js +1 -5
- package/package.json +1 -1
package/dist/Signer.js
CHANGED
|
@@ -88,13 +88,9 @@ class Signer {
|
|
|
88
88
|
signer = signer.tweak(bitcoin.crypto.taggedHash('TapTweak', signer.publicKey.subarray(1, 33)));
|
|
89
89
|
// Draft a toSign transaction that spends toSpend transaction
|
|
90
90
|
toSignTx = BIP322_1.default.buildToSignTx(toSpendTx.getId(), scriptPubKey, false, internalPublicKey);
|
|
91
|
-
// Set the sighashType to bitcoin.Transaction.SIGHASH_ALL since it defaults to SIGHASH_DEFAULT
|
|
92
|
-
toSignTx.updateInput(0, {
|
|
93
|
-
sighashType: bitcoin.Transaction.SIGHASH_ALL
|
|
94
|
-
});
|
|
95
91
|
}
|
|
96
92
|
// Sign the toSign transaction
|
|
97
|
-
const toSignTxSigned = toSignTx.signAllInputs(signer, [bitcoin.Transaction.SIGHASH_ALL]).finalizeAllInputs();
|
|
93
|
+
const toSignTxSigned = toSignTx.signAllInputs(signer, [bitcoin.Transaction.SIGHASH_ALL, bitcoin.Transaction.SIGHASH_DEFAULT]).finalizeAllInputs();
|
|
98
94
|
// Extract and return the signature
|
|
99
95
|
return BIP322_1.default.encodeWitness(toSignTxSigned);
|
|
100
96
|
}
|
package/package.json
CHANGED