@btc-vision/transaction 1.6.7 → 1.6.8
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/browser/_version.d.ts +1 -1
- package/browser/index.js +1 -1
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/transaction/builders/TransactionBuilder.js +17 -5
- package/package.json +1 -1
- package/src/_version.ts +1 -1
- package/src/transaction/builders/TransactionBuilder.ts +19 -5
package/build/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.6.
|
|
1
|
+
export declare const version = "1.6.8";
|
package/build/_version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.6.
|
|
1
|
+
export const version = '1.6.8';
|
|
@@ -240,11 +240,23 @@ export class TransactionBuilder extends TweakedTransaction {
|
|
|
240
240
|
]),
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
|
-
if (
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
243
|
+
if (input.witnessUtxo) {
|
|
244
|
+
const script = input.witnessUtxo.script;
|
|
245
|
+
const decompiled = bitcoin.script.decompile(script);
|
|
246
|
+
if (decompiled &&
|
|
247
|
+
decompiled.length === 5 &&
|
|
248
|
+
decompiled[0] === opcodes.OP_DUP &&
|
|
249
|
+
decompiled[1] === opcodes.OP_HASH160 &&
|
|
250
|
+
decompiled[3] === opcodes.OP_EQUALVERIFY &&
|
|
251
|
+
decompiled[4] === opcodes.OP_CHECKSIG) {
|
|
252
|
+
return {
|
|
253
|
+
finalScriptSig: bitcoin.script.compile([
|
|
254
|
+
dummyEcdsaSig,
|
|
255
|
+
dummyCompressedPubkey,
|
|
256
|
+
]),
|
|
257
|
+
finalScriptWitness: undefined,
|
|
258
|
+
};
|
|
259
|
+
}
|
|
248
260
|
}
|
|
249
261
|
if (input.witnessScript) {
|
|
250
262
|
if (this.csvInputIndices.has(inputIndex)) {
|
package/package.json
CHANGED
package/src/_version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.6.
|
|
1
|
+
export const version = '1.6.8';
|
|
@@ -523,11 +523,25 @@ export abstract class TransactionBuilder<T extends TransactionType> extends Twea
|
|
|
523
523
|
};
|
|
524
524
|
}
|
|
525
525
|
|
|
526
|
-
if (
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
526
|
+
if (input.witnessUtxo) {
|
|
527
|
+
const script = input.witnessUtxo.script;
|
|
528
|
+
const decompiled = bitcoin.script.decompile(script);
|
|
529
|
+
if (
|
|
530
|
+
decompiled &&
|
|
531
|
+
decompiled.length === 5 &&
|
|
532
|
+
decompiled[0] === opcodes.OP_DUP &&
|
|
533
|
+
decompiled[1] === opcodes.OP_HASH160 &&
|
|
534
|
+
decompiled[3] === opcodes.OP_EQUALVERIFY &&
|
|
535
|
+
decompiled[4] === opcodes.OP_CHECKSIG
|
|
536
|
+
) {
|
|
537
|
+
return {
|
|
538
|
+
finalScriptSig: bitcoin.script.compile([
|
|
539
|
+
dummyEcdsaSig,
|
|
540
|
+
dummyCompressedPubkey,
|
|
541
|
+
]),
|
|
542
|
+
finalScriptWitness: undefined,
|
|
543
|
+
};
|
|
544
|
+
}
|
|
531
545
|
}
|
|
532
546
|
|
|
533
547
|
if (input.witnessScript) {
|