@btc-vision/transaction 1.6.10 → 1.6.11

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.
@@ -12,6 +12,7 @@ export interface DeploymentResult {
12
12
  readonly contractAddress: string;
13
13
  readonly contractPubKey: string;
14
14
  readonly challenge: RawChallenge;
15
+ readonly rawTransaction: Transaction;
15
16
  readonly utxos: UTXO[];
16
17
  }
17
18
  export interface FundingTransactionResponse {
@@ -31,6 +32,7 @@ export interface InteractionResponse {
31
32
  readonly estimatedFees: bigint;
32
33
  readonly nextUTXOs: UTXO[];
33
34
  readonly challenge: RawChallenge;
35
+ readonly rawTransaction: Transaction;
34
36
  }
35
37
  export interface BitcoinTransferResponse extends BitcoinTransferBase {
36
38
  readonly original: FundingTransaction;
@@ -1 +1 @@
1
- export declare const version = "1.6.9";
1
+ export declare const version = "1.6.11";
package/build/_version.js CHANGED
@@ -1 +1 @@
1
- export const version = '1.6.9';
1
+ export const version = '1.6.11';
@@ -12,6 +12,7 @@ export interface DeploymentResult {
12
12
  readonly contractAddress: string;
13
13
  readonly contractPubKey: string;
14
14
  readonly challenge: RawChallenge;
15
+ readonly rawTransaction: Transaction;
15
16
  readonly utxos: UTXO[];
16
17
  }
17
18
  export interface FundingTransactionResponse {
@@ -31,6 +32,7 @@ export interface InteractionResponse {
31
32
  readonly estimatedFees: bigint;
32
33
  readonly nextUTXOs: UTXO[];
33
34
  readonly challenge: RawChallenge;
35
+ readonly rawTransaction: Transaction;
34
36
  }
35
37
  export interface BitcoinTransferResponse extends BitcoinTransferBase {
36
38
  readonly original: FundingTransaction;
@@ -138,6 +138,7 @@ export class TransactionFactory {
138
138
  const interactionTx = new InteractionTransaction(newParams);
139
139
  const outTx = await interactionTx.signTransaction();
140
140
  return {
141
+ rawTransaction: signedTransaction.tx,
141
142
  fundingTransaction: signedTransaction.tx.toHex(),
142
143
  interactionTransaction: outTx.toHex(),
143
144
  estimatedFees: interactionTx.transactionFee,
@@ -216,6 +217,7 @@ export class TransactionFactory {
216
217
  value: BigInt(out2.value),
217
218
  };
218
219
  return {
220
+ rawTransaction: outTx,
219
221
  transaction: [signedTransaction.toHex(), outTx.toHex()],
220
222
  contractAddress: deploymentTx.getContractAddress(),
221
223
  contractPubKey: deploymentTx.contractPubKey,
@@ -341,6 +343,7 @@ export class TransactionFactory {
341
343
  const signedTx = await p2wdaTransaction.signTransaction();
342
344
  const txHex = signedTx.toHex();
343
345
  return {
346
+ rawTransaction: signedTx,
344
347
  fundingTransaction: null,
345
348
  interactionTransaction: txHex,
346
349
  estimatedFees: p2wdaTransaction.estimatedFees,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@btc-vision/transaction",
3
3
  "type": "module",
4
- "version": "1.6.10",
4
+ "version": "1.6.11",
5
5
  "author": "BlobMaster41",
6
6
  "description": "OPNet transaction library allows you to create and sign transactions for the OPNet network.",
7
7
  "engines": {
package/src/_version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '1.6.9';
1
+ export const version = '1.6.11';
@@ -36,6 +36,7 @@ export interface DeploymentResult {
36
36
  readonly contractPubKey: string;
37
37
  readonly challenge: RawChallenge;
38
38
 
39
+ readonly rawTransaction: Transaction;
39
40
  readonly utxos: UTXO[];
40
41
  }
41
42
 
@@ -58,6 +59,7 @@ export interface InteractionResponse {
58
59
  readonly estimatedFees: bigint;
59
60
  readonly nextUTXOs: UTXO[];
60
61
  readonly challenge: RawChallenge;
62
+ readonly rawTransaction: Transaction;
61
63
  }
62
64
 
63
65
  export interface BitcoinTransferResponse extends BitcoinTransferBase {
@@ -158,10 +160,6 @@ export class TransactionFactory {
158
160
  ];
159
161
  }
160
162
 
161
- /**
162
- * @description Generates the required transactions.
163
- * @returns {Promise<InteractionResponse>} - The signed transaction
164
- */
165
163
  /**
166
164
  * @description Generates the required transactions.
167
165
  * @returns {Promise<InteractionResponse>} - The signed transaction
@@ -257,6 +255,7 @@ export class TransactionFactory {
257
255
  const outTx = await interactionTx.signTransaction();
258
256
 
259
257
  return {
258
+ rawTransaction: signedTransaction.tx,
260
259
  fundingTransaction: signedTransaction.tx.toHex(),
261
260
  interactionTransaction: outTx.toHex(),
262
261
  estimatedFees: interactionTx.transactionFee,
@@ -370,6 +369,7 @@ export class TransactionFactory {
370
369
  };
371
370
 
372
371
  return {
372
+ rawTransaction: outTx,
373
373
  transaction: [signedTransaction.toHex(), outTx.toHex()],
374
374
  contractAddress: deploymentTx.getContractAddress(),
375
375
  contractPubKey: deploymentTx.contractPubKey,
@@ -587,6 +587,7 @@ export class TransactionFactory {
587
587
  const txHex = signedTx.toHex();
588
588
 
589
589
  return {
590
+ rawTransaction: signedTx,
590
591
  fundingTransaction: null,
591
592
  interactionTransaction: txHex,
592
593
  estimatedFees: p2wdaTransaction.estimatedFees,