@btc-vision/transaction 1.0.58 → 1.0.59
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/build/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.0.
|
|
1
|
+
export declare const version = "1.0.59";
|
package/build/_version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.0.
|
|
1
|
+
export const version = '1.0.59';
|
|
@@ -76,14 +76,20 @@ export class TransactionFactory {
|
|
|
76
76
|
};
|
|
77
77
|
const finalTransaction = new DeploymentTransaction(newParams);
|
|
78
78
|
const outTx = await finalTransaction.signTransaction();
|
|
79
|
+
const refundUTXO = {
|
|
80
|
+
transactionId: signedTransaction.getId(),
|
|
81
|
+
outputIndex: 1,
|
|
82
|
+
scriptPubKey: {
|
|
83
|
+
hex: out.script.toString('hex'),
|
|
84
|
+
address: deploymentParameters.from,
|
|
85
|
+
},
|
|
86
|
+
value: BigInt(signedTransaction.outs[1].value),
|
|
87
|
+
};
|
|
79
88
|
return {
|
|
80
89
|
transaction: [signedTransaction.toHex(), outTx.toHex()],
|
|
81
90
|
contractAddress: finalTransaction.contractAddress,
|
|
82
91
|
p2trAddress: finalTransaction.p2trAddress,
|
|
83
|
-
utxos: [
|
|
84
|
-
...newUtxo,
|
|
85
|
-
outputIndex: 1,
|
|
86
|
-
}],
|
|
92
|
+
utxos: [refundUTXO],
|
|
87
93
|
};
|
|
88
94
|
}
|
|
89
95
|
async wrap(warpParameters) {
|
package/package.json
CHANGED
package/src/_version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.0.
|
|
1
|
+
export const version = '1.0.59';
|
|
@@ -170,14 +170,21 @@ export class TransactionFactory {
|
|
|
170
170
|
// We have to regenerate using the new utxo
|
|
171
171
|
const outTx: Transaction = await finalTransaction.signTransaction();
|
|
172
172
|
|
|
173
|
+
const refundUTXO: UTXO = {
|
|
174
|
+
transactionId: signedTransaction.getId(),
|
|
175
|
+
outputIndex: 1, // always 1
|
|
176
|
+
scriptPubKey: {
|
|
177
|
+
hex: out.script.toString('hex'),
|
|
178
|
+
address: deploymentParameters.from,
|
|
179
|
+
},
|
|
180
|
+
value: BigInt(signedTransaction.outs[1].value),
|
|
181
|
+
};
|
|
182
|
+
|
|
173
183
|
return {
|
|
174
184
|
transaction: [signedTransaction.toHex(), outTx.toHex()],
|
|
175
185
|
contractAddress: finalTransaction.contractAddress,
|
|
176
186
|
p2trAddress: finalTransaction.p2trAddress,
|
|
177
|
-
utxos: [
|
|
178
|
-
...newUtxo,
|
|
179
|
-
outputIndex: 1, // always 1
|
|
180
|
-
}],
|
|
187
|
+
utxos: [refundUTXO],
|
|
181
188
|
};
|
|
182
189
|
}
|
|
183
190
|
|