@btc-vision/transaction 1.0.101 → 1.0.102

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.
Files changed (75) hide show
  1. package/.vscode/settings.json +10 -0
  2. package/LICENSE +21 -0
  3. package/browser/generators/Features.d.ts +4 -1
  4. package/browser/generators/builders/CalldataGenerator.d.ts +1 -1
  5. package/browser/index.js +1 -1
  6. package/browser/keypair/EcKeyPair.d.ts +2 -2
  7. package/browser/metadata/contracts/wBTC.d.ts +2 -2
  8. package/browser/transaction/TransactionFactory.d.ts +4 -5
  9. package/browser/transaction/browser/extensions/UnisatSigner.d.ts +2 -2
  10. package/browser/transaction/browser/types/Unisat.d.ts +1 -2
  11. package/browser/transaction/builders/DeploymentTransaction.d.ts +1 -1
  12. package/browser/transaction/builders/FundingTransaction.d.ts +1 -1
  13. package/browser/transaction/processor/PsbtTransaction.d.ts +2 -2
  14. package/browser/utils/BitcoinUtils.d.ts +1 -1
  15. package/browser/utxo/OPNetLimitedProvider.d.ts +3 -3
  16. package/build/generators/Features.d.ts +4 -1
  17. package/build/generators/Features.js +4 -1
  18. package/build/generators/builders/CalldataGenerator.d.ts +1 -1
  19. package/build/generators/builders/CalldataGenerator.js +5 -3
  20. package/build/generators/builders/MultiSignGenerator.js +2 -2
  21. package/build/keypair/EcKeyPair.d.ts +2 -2
  22. package/build/keypair/EcKeyPair.js +8 -5
  23. package/build/metadata/contracts/wBTC.d.ts +2 -2
  24. package/build/metadata/contracts/wBTC.js +2 -2
  25. package/build/metadata/tokens.js +2 -2
  26. package/build/signer/TweakedSigner.js +1 -1
  27. package/build/transaction/TransactionFactory.d.ts +4 -5
  28. package/build/transaction/TransactionFactory.js +6 -7
  29. package/build/transaction/browser/extensions/UnisatSigner.d.ts +2 -2
  30. package/build/transaction/browser/extensions/UnisatSigner.js +3 -3
  31. package/build/transaction/browser/types/Unisat.d.ts +1 -2
  32. package/build/transaction/builders/CustomScriptTransaction.js +2 -2
  33. package/build/transaction/builders/DeploymentTransaction.d.ts +1 -1
  34. package/build/transaction/builders/DeploymentTransaction.js +2 -2
  35. package/build/transaction/builders/FundingTransaction.d.ts +1 -1
  36. package/build/transaction/builders/FundingTransaction.js +2 -2
  37. package/build/transaction/builders/MultiSignTransaction.js +7 -7
  38. package/build/transaction/builders/SharedInteractionTransaction.js +3 -3
  39. package/build/transaction/builders/TransactionBuilder.js +6 -6
  40. package/build/transaction/builders/UnwrapTransaction.js +4 -4
  41. package/build/transaction/builders/WrapTransaction.js +1 -1
  42. package/build/transaction/processor/PsbtTransaction.d.ts +2 -2
  43. package/build/transaction/processor/PsbtTransaction.js +2 -2
  44. package/build/transaction/shared/TweakedTransaction.js +4 -4
  45. package/build/utils/BitcoinUtils.d.ts +1 -1
  46. package/build/utils/BitcoinUtils.js +1 -1
  47. package/build/utxo/OPNetLimitedProvider.d.ts +3 -3
  48. package/build/utxo/OPNetLimitedProvider.js +7 -7
  49. package/eslint.config.js +10 -2
  50. package/gulpfile.js +19 -45
  51. package/package.json +7 -2
  52. package/src/generators/Features.ts +5 -1
  53. package/src/generators/builders/CalldataGenerator.ts +6 -4
  54. package/src/generators/builders/MultiSignGenerator.ts +6 -4
  55. package/src/keypair/EcKeyPair.ts +10 -8
  56. package/src/metadata/contracts/wBTC.ts +3 -3
  57. package/src/metadata/tokens.ts +2 -2
  58. package/src/signer/TweakedSigner.ts +4 -4
  59. package/src/transaction/TransactionFactory.ts +18 -20
  60. package/src/transaction/browser/extensions/UnisatSigner.ts +6 -6
  61. package/src/transaction/browser/types/Unisat.ts +1 -3
  62. package/src/transaction/builders/CustomScriptTransaction.ts +2 -2
  63. package/src/transaction/builders/DeploymentTransaction.ts +5 -5
  64. package/src/transaction/builders/FundingTransaction.ts +2 -2
  65. package/src/transaction/builders/MultiSignTransaction.ts +8 -7
  66. package/src/transaction/builders/SharedInteractionTransaction.ts +3 -3
  67. package/src/transaction/builders/TransactionBuilder.ts +6 -6
  68. package/src/transaction/builders/UnwrapTransaction.ts +4 -4
  69. package/src/transaction/builders/WrapTransaction.ts +1 -1
  70. package/src/transaction/processor/PsbtTransaction.ts +4 -4
  71. package/src/transaction/shared/TweakedTransaction.ts +19 -11
  72. package/src/utils/BitcoinUtils.ts +3 -3
  73. package/src/utxo/OPNetLimitedProvider.ts +19 -10
  74. package/webpack.config.js +1 -0
  75. package/LICENSE.md +0 -62
@@ -139,7 +139,7 @@ export class MultiSignTransaction extends TransactionBuilder<TransactionType.MUL
139
139
  public static verifyIfSigned(psbt: Psbt, signerPubKey: Buffer): boolean {
140
140
  let alreadySigned: boolean = false;
141
141
  for (let i = 1; i < psbt.data.inputs.length; i++) {
142
- let input: PsbtInput = psbt.data.inputs[i];
142
+ const input: PsbtInput = psbt.data.inputs[i];
143
143
  if (!input.finalScriptWitness) {
144
144
  continue;
145
145
  }
@@ -183,12 +183,12 @@ export class MultiSignTransaction extends TransactionBuilder<TransactionType.MUL
183
183
  let final: boolean = true;
184
184
 
185
185
  for (let i = originalInputCount; i < psbt.data.inputs.length; i++) {
186
- let input: PsbtInput = psbt.data.inputs[i];
186
+ const input: PsbtInput = psbt.data.inputs[i];
187
187
  if (!input.tapInternalKey) {
188
188
  input.tapInternalKey = toXOnly(MultiSignTransaction.numsPoint);
189
189
  }
190
190
 
191
- let partialSignatures: TapScriptSig[] = [];
191
+ const partialSignatures: TapScriptSig[] = [];
192
192
  if (input.finalScriptWitness) {
193
193
  const decoded = TransactionBuilder.readScriptWitnessToWitnessStack(
194
194
  input.finalScriptWitness,
@@ -278,9 +278,9 @@ export class MultiSignTransaction extends TransactionBuilder<TransactionType.MUL
278
278
  .flat();
279
279
  } else {
280
280
  /** We must order the signatures and the pub keys. */
281
- for (let pubKey of orderedPubKeys) {
281
+ for (const pubKey of orderedPubKeys) {
282
282
  let found = false;
283
- for (let sig of input.tapScriptSig) {
283
+ for (const sig of input.tapScriptSig) {
284
284
  if (sig.pubkey.equals(toXOnly(pubKey))) {
285
285
  scriptSolution.push(sig.signature);
286
286
  found = true;
@@ -349,13 +349,13 @@ export class MultiSignTransaction extends TransactionBuilder<TransactionType.MUL
349
349
  let finalizedInputs = 0;
350
350
  for (let i = startIndex; i < psbt.data.inputs.length; i++) {
351
351
  try {
352
- let input = psbt.data.inputs[i];
352
+ const input = psbt.data.inputs[i];
353
353
 
354
354
  if (!input.tapInternalKey) {
355
355
  input.tapInternalKey = toXOnly(MultiSignTransaction.numsPoint);
356
356
  }
357
357
 
358
- let partialSignatures: TapScriptSig[] = [];
358
+ const partialSignatures: TapScriptSig[] = [];
359
359
  if (input.finalScriptWitness) {
360
360
  const decoded = TransactionBuilder.readScriptWitnessToWitnessStack(
361
361
  input.finalScriptWitness,
@@ -451,6 +451,7 @@ export class MultiSignTransaction extends TransactionBuilder<TransactionType.MUL
451
451
  * @throws {Error} If the left over funds script redeem version is required
452
452
  * @throws {Error} If the left over funds script redeem output is required
453
453
  */
454
+ // eslint-disable-next-line @typescript-eslint/require-await
454
455
  protected override async buildTransaction(): Promise<void> {
455
456
  const selectedRedeem = this.targetScriptRedeem;
456
457
  if (!selectedRedeem) {
@@ -136,7 +136,7 @@ export abstract class SharedInteractionTransaction<
136
136
  protected override async buildTransaction(): Promise<void> {
137
137
  if (!this.to) throw new Error('To address is required');
138
138
 
139
- const selectedRedeem = !!this.scriptSigner
139
+ const selectedRedeem = this.scriptSigner
140
140
  ? this.targetScriptRedeem
141
141
  : this.leftOverFundsScriptRedeem;
142
142
 
@@ -186,7 +186,7 @@ export abstract class SharedInteractionTransaction<
186
186
  }
187
187
 
188
188
  for (let i = 0; i < transaction.data.inputs.length; i++) {
189
- let input: PsbtInput = transaction.data.inputs[i];
189
+ const input: PsbtInput = transaction.data.inputs[i];
190
190
  let finalized: boolean = false;
191
191
  let signed: boolean = false;
192
192
 
@@ -235,7 +235,7 @@ export abstract class SharedInteractionTransaction<
235
235
  }
236
236
 
237
237
  protected override generateTapData(): Payment {
238
- const selectedRedeem = !!this.scriptSigner
238
+ const selectedRedeem = this.scriptSigner
239
239
  ? this.targetScriptRedeem
240
240
  : this.leftOverFundsScriptRedeem;
241
241
 
@@ -446,7 +446,7 @@ export abstract class TransactionBuilder<T extends TransactionType> extends Twea
446
446
  );
447
447
  }
448
448
 
449
- for (let output of this.outputs) {
449
+ for (const output of this.outputs) {
450
450
  if ('address' in output && output.address === this.to) {
451
451
  output.value += Number(value);
452
452
  return;
@@ -476,7 +476,7 @@ export abstract class TransactionBuilder<T extends TransactionType> extends Twea
476
476
  */
477
477
  protected calculateTotalUTXOAmount(): bigint {
478
478
  let total: bigint = 0n;
479
- for (let utxo of this.utxos) {
479
+ for (const utxo of this.utxos) {
480
480
  total += utxo.value;
481
481
  }
482
482
 
@@ -490,7 +490,7 @@ export abstract class TransactionBuilder<T extends TransactionType> extends Twea
490
490
  */
491
491
  protected calculateTotalVOutAmount(): bigint {
492
492
  let total: bigint = 0n;
493
- for (let utxo of this.utxos) {
493
+ for (const utxo of this.utxos) {
494
494
  total += utxo.value;
495
495
  }
496
496
 
@@ -583,7 +583,7 @@ export abstract class TransactionBuilder<T extends TransactionType> extends Twea
583
583
  * @protected
584
584
  */
585
585
  protected verifyUTXOValidity(): void {
586
- for (let utxo of this.utxos) {
586
+ for (const utxo of this.utxos) {
587
587
  if (!utxo.scriptPubKey) {
588
588
  throw new Error('Address is required');
589
589
  }
@@ -599,7 +599,7 @@ export abstract class TransactionBuilder<T extends TransactionType> extends Twea
599
599
  protected async setFeeOutput(output: PsbtOutputExtended): Promise<void> {
600
600
  const initialValue = output.value;
601
601
 
602
- let fee = await this.estimateTransactionFees();
602
+ const fee = await this.estimateTransactionFees();
603
603
  output.value = initialValue - Number(fee);
604
604
 
605
605
  if (output.value < TransactionBuilder.MINIMUM_DUST) {
@@ -613,7 +613,7 @@ export abstract class TransactionBuilder<T extends TransactionType> extends Twea
613
613
  } else {
614
614
  this.feeOutput = output;
615
615
 
616
- let fee = await this.estimateTransactionFees();
616
+ const fee = await this.estimateTransactionFees();
617
617
  if (fee > BigInt(initialValue)) {
618
618
  throw new Error(
619
619
  `estimateTransactionFees: Insufficient funds to pay the fees. Fee: ${fee} > Value: ${initialValue}. Total input: ${this.totalInputAmount} sat`,
@@ -188,7 +188,7 @@ export class UnwrapTransaction extends SharedInteractionTransaction<TransactionT
188
188
  public getRefund(): bigint {
189
189
  let losses: bigint = -currentConsensusConfig.UNWRAP_CONSOLIDATION_PREPAID_FEES_SAT;
190
190
 
191
- for (let vault of this.vaultUTXOs) {
191
+ for (const vault of this.vaultUTXOs) {
192
192
  for (let i = 0; i < vault.utxos.length; i++) {
193
193
  losses += currentConsensusConfig.UNWRAP_CONSOLIDATION_PREPAID_FEES_SAT;
194
194
  }
@@ -206,7 +206,7 @@ export class UnwrapTransaction extends SharedInteractionTransaction<TransactionT
206
206
  * @returns {bigint} - The estimated fee loss or refund
207
207
  */
208
208
  public getFeeLossOrRefund(): bigint {
209
- let refund: bigint = this.getRefund();
209
+ const refund: bigint = this.getRefund();
210
210
 
211
211
  return refund - this.estimatedFeeLoss;
212
212
  }
@@ -219,7 +219,7 @@ export class UnwrapTransaction extends SharedInteractionTransaction<TransactionT
219
219
  const totalInputAmount: bigint = this.getVaultTotalOutputAmount(this.vaultUTXOs);
220
220
 
221
221
  let refund: bigint = this.getRefund();
222
- let outputLeftAmount = totalInputAmount - refund - this.amount;
222
+ const outputLeftAmount = totalInputAmount - refund - this.amount;
223
223
 
224
224
  if (outputLeftAmount === currentConsensusConfig.UNWRAP_CONSOLIDATION_PREPAID_FEES_SAT) {
225
225
  refund += currentConsensusConfig.UNWRAP_CONSOLIDATION_PREPAID_FEES_SAT;
@@ -235,7 +235,7 @@ export class UnwrapTransaction extends SharedInteractionTransaction<TransactionT
235
235
  throw new Error('No vaults provided');
236
236
  }
237
237
 
238
- let hasConsolidation: boolean =
238
+ const hasConsolidation: boolean =
239
239
  outputLeftAmount > currentConsensusConfig.VAULT_MINIMUM_AMOUNT &&
240
240
  outputLeftAmount - currentConsensusConfig.UNWRAP_CONSOLIDATION_PREPAID_FEES_SAT !== 0n;
241
241
 
@@ -223,7 +223,7 @@ export class WrapTransaction extends SharedInteractionTransaction<TransactionTyp
223
223
  protected override async buildTransaction(): Promise<void> {
224
224
  if (!this.to) throw new Error('To address is required');
225
225
 
226
- const selectedRedeem = !!this.scriptSigner
226
+ const selectedRedeem = this.scriptSigner
227
227
  ? this.targetScriptRedeem
228
228
  : this.leftOverFundsScriptRedeem;
229
229
 
@@ -1,7 +1,7 @@
1
+ import { Address } from '@btc-vision/bsi-binary';
1
2
  import { Network, Psbt, Signer, Transaction } from 'bitcoinjs-lib';
2
- import { ITweakedTransactionData, TweakedTransaction } from '../shared/TweakedTransaction.js';
3
3
  import { PsbtInputExtended, PsbtOutputExtended } from '../interfaces/Tap.js';
4
- import { Address } from '@btc-vision/bsi-binary';
4
+ import { ITweakedTransactionData, TweakedTransaction } from '../shared/TweakedTransaction.js';
5
5
 
6
6
  export interface PsbtTransactionData extends ITweakedTransactionData {
7
7
  readonly psbt: Psbt;
@@ -141,7 +141,7 @@ export class PsbtTransaction extends TweakedTransaction {
141
141
  try {
142
142
  const inputs = this.transaction.data.inputs;
143
143
  for (let i = n; i < inputs.length; i++) {
144
- let input = inputs[i];
144
+ const input = inputs[i];
145
145
  if (input.finalScriptWitness) {
146
146
  this.transaction.finalizeTaprootInput(i, input.finalScriptWitness);
147
147
  } else {
@@ -151,7 +151,7 @@ export class PsbtTransaction extends TweakedTransaction {
151
151
 
152
152
  return true;
153
153
  } catch (e) {
154
- this.warn((e as Error).stack);
154
+ this.warn((e as Error).stack || "Couldn't finalize inputs");
155
155
  return false;
156
156
  }
157
157
  }
@@ -210,7 +210,7 @@ export abstract class TweakedTransaction extends Logger {
210
210
  }
211
211
 
212
212
  let signHash: number = 0;
213
- for (let sighashType of sighashTypes) {
213
+ for (const sighashType of sighashTypes) {
214
214
  signHash |= sighashType;
215
215
  }
216
216
 
@@ -262,7 +262,7 @@ export abstract class TweakedTransaction extends Logger {
262
262
 
263
263
  this.sequence = TransactionSequence.FINAL;
264
264
 
265
- for (let input of this.inputs) {
265
+ for (const input of this.inputs) {
266
266
  input.sequence = TransactionSequence.FINAL;
267
267
  }
268
268
  }
@@ -379,21 +379,25 @@ export abstract class TweakedTransaction extends Logger {
379
379
 
380
380
  try {
381
381
  if ('signTaprootInput' in signer) {
382
- // @ts-ignore
383
- return await signer.signTaprootInput(transaction, i, signHash);
382
+ // @ts-expect-error - we know it's a taproot signer
383
+ return await (signer.signTaprootInput(
384
+ transaction,
385
+ i,
386
+ signHash,
387
+ ) as Promise<void>);
384
388
  } else {
385
389
  transaction.signTaprootInput(i, tweakedSigner, undefined, signHash);
386
390
  }
387
391
 
388
392
  return;
389
- } catch (e) {}
393
+ } catch {}
390
394
  }
391
395
  }
392
396
 
393
397
  try {
394
398
  if ('signInput' in signer) {
395
- // @ts-ignore
396
- return await signer.signInput(transaction, i, signHash);
399
+ // @ts-expect-error - we know it's a signer
400
+ return await (signer.signInput(transaction, i, signHash) as Promise<void>);
397
401
  } else {
398
402
  transaction.signInput(i, signer, signHash);
399
403
  }
@@ -402,8 +406,12 @@ export abstract class TweakedTransaction extends Logger {
402
406
  // and we try again taproot...
403
407
 
404
408
  if ('signTaprootInput' in signer) {
405
- // @ts-ignore
406
- return await signer.signTaprootInput(transaction, i, signHash);
409
+ // @ts-expect-error - we know it's a taproot signer
410
+ return await (signer.signTaprootInput(
411
+ transaction,
412
+ i,
413
+ signHash,
414
+ ) as Promise<void>);
407
415
  } else if (this.tweakedSigner) {
408
416
  transaction.signTaprootInput(i, this.tweakedSigner, undefined, signHash);
409
417
  } else {
@@ -421,7 +429,7 @@ export abstract class TweakedTransaction extends Logger {
421
429
  */
422
430
  protected async signInputs(transaction: Psbt): Promise<void> {
423
431
  for (let i = 0; i < transaction.data.inputs.length; i++) {
424
- let input: PsbtInput = transaction.data.inputs[i];
432
+ const input: PsbtInput = transaction.data.inputs[i];
425
433
 
426
434
  try {
427
435
  await this.signInput(transaction, input, i);
@@ -489,7 +497,7 @@ export abstract class TweakedTransaction extends Logger {
489
497
  return;
490
498
  }
491
499
 
492
- return TweakedSigner.tweakSigner(signer as unknown as ECPairInterface, settings) as Signer;
500
+ return TweakedSigner.tweakSigner(signer as unknown as ECPairInterface, settings);
493
501
  }
494
502
 
495
503
  /**
@@ -8,9 +8,9 @@ export class BitcoinUtils {
8
8
  /**
9
9
  * Converts satoshi to BTC
10
10
  * @param {number} btc - The amount in BTC
11
- * @returns {BigInt} The amount in satoshi
11
+ * @returns {bigint} The amount in satoshi
12
12
  */
13
- public static btcToSatoshi(btc: number): BigInt {
13
+ public static btcToSatoshi(btc: number): bigint {
14
14
  return BigInt(btc * 100000000);
15
15
  }
16
16
 
@@ -82,7 +82,7 @@ export class BitcoinUtils {
82
82
 
83
83
  let mostPublicKeys: number = 0;
84
84
  let vault: VaultUTXOs | undefined;
85
- for (let v of vaults) {
85
+ for (const v of vaults) {
86
86
  if (v.publicKeys.length > mostPublicKeys) {
87
87
  mostPublicKeys = v.publicKeys.length;
88
88
  vault = v;
@@ -1,10 +1,15 @@
1
- import { FetchUTXOParams, FetchUTXOParamsMultiAddress, RawUTXOResponse, UTXO } from './interfaces/IUTXO.js';
2
- import { WrappedGeneration } from '../wbtc/WrappedGenerationParameters.js';
3
- import { UnwrappedGenerationParameters, WrappedGenerationParameters } from '../wbtc/Generate.js';
4
- import { BroadcastResponse } from './interfaces/BroadcastResponse.js';
5
1
  import { Address } from '@btc-vision/bsi-binary';
6
- import { UnwrapGeneration } from '../wbtc/UnwrapGeneration.js';
7
2
  import { currentConsensusConfig } from '../consensus/ConsensusConfig.js';
3
+ import { UnwrappedGenerationParameters, WrappedGenerationParameters } from '../wbtc/Generate.js';
4
+ import { UnwrapGeneration } from '../wbtc/UnwrapGeneration.js';
5
+ import { WrappedGeneration } from '../wbtc/WrappedGenerationParameters.js';
6
+ import { BroadcastResponse } from './interfaces/BroadcastResponse.js';
7
+ import {
8
+ FetchUTXOParams,
9
+ FetchUTXOParamsMultiAddress,
10
+ RawUTXOResponse,
11
+ UTXO,
12
+ } from './interfaces/IUTXO.js';
8
13
 
9
14
  /**
10
15
  * Allows to fetch UTXO data from any OPNET node
@@ -36,7 +41,7 @@ export class OPNetLimitedProvider {
36
41
  throw new Error(`Failed to fetch UTXO data: ${resp.statusText}`);
37
42
  }
38
43
 
39
- const fetchedData: RawUTXOResponse[] = await resp.json();
44
+ const fetchedData: RawUTXOResponse[] = (await resp.json()) as RawUTXOResponse[];
40
45
  if (fetchedData.length === 0) {
41
46
  throw new Error('No UTXO found');
42
47
  }
@@ -49,7 +54,7 @@ export class OPNetLimitedProvider {
49
54
  throw new Error('No UTXO found (minAmount)');
50
55
  }
51
56
 
52
- let finalUTXOs: UTXO[] = [];
57
+ const finalUTXOs: UTXO[] = [];
53
58
  let currentAmount: bigint = 0n;
54
59
 
55
60
  const amountRequested: bigint = settings.requestedAmount;
@@ -86,7 +91,7 @@ export class OPNetLimitedProvider {
86
91
  public async fetchUTXOMultiAddr(settings: FetchUTXOParamsMultiAddress): Promise<UTXO[]> {
87
92
  const promises: Promise<UTXO[]>[] = [];
88
93
 
89
- for (let address of settings.addresses) {
94
+ for (const address of settings.addresses) {
90
95
  const params: FetchUTXOParams = {
91
96
  address: address,
92
97
  minAmount: settings.minAmount,
@@ -107,7 +112,7 @@ export class OPNetLimitedProvider {
107
112
  const finalUTXOs: UTXO[] = [];
108
113
  let currentAmount = 0n;
109
114
  for (let i = 0; i < all.length; i++) {
110
- let utxo = all[i];
115
+ const utxo = all[i];
111
116
 
112
117
  if (currentAmount >= settings.requestedAmount) {
113
118
  break;
@@ -168,7 +173,11 @@ export class OPNetLimitedProvider {
168
173
  throw new Error(`Failed to fetch to rpc: ${resp.statusText}`);
169
174
  }
170
175
 
171
- const fetchedData = await resp.json();
176
+ const fetchedData = (await resp.json()) as {
177
+ result: {
178
+ error?: string;
179
+ };
180
+ };
172
181
  if (!fetchedData) {
173
182
  throw new Error('No data fetched');
174
183
  }
package/webpack.config.js CHANGED
@@ -2,6 +2,7 @@ import webpack from 'webpack';
2
2
 
3
3
  export default {
4
4
  mode: 'production',
5
+ target: 'web',
5
6
  entry: {
6
7
  index: {
7
8
  import: './src/index.ts',
package/LICENSE.md DELETED
@@ -1,62 +0,0 @@
1
- # Custom Software License Agreement
2
-
3
- ## 1. Definitions
4
-
5
- - **"Licensor"** refers to the owner(s) and creator(s) of the software. The owner of the github organization "
6
- btc-vision", "BlobMaster41".
7
- - **"User"** refers to any person or entity that accesses or uses the software.
8
- - **"Software"** refers to the source code, binaries, and documentation, whether in electronic or printed format, made
9
- available by Licensor.
10
-
11
- ## 2. Grant of License
12
-
13
- This License permits User to view the Software via the repository hosting the Software ("Hosting Service"). Except as
14
- provided in this Section, no other use of the Software is permitted. The User may not modify, copy, reproduce,
15
- republish, upload, post, transmit, or distribute the Software in any way.
16
-
17
- ## 3. Restrictions
18
-
19
- - **Modification and Distribution**: User is prohibited from modifying, merging, distributing, sublicensing, and/or
20
- selling copies of the Software.
21
- - **Commercial Use**: User is prohibited from using the Software for any commercial purposes.
22
- - **Reverse Engineering**: User is prohibited from reverse engineering, decompiling, or disassembling the Software.
23
-
24
- ## 4. Termination
25
-
26
- This License is effective until terminated by the Licensor. It will terminate immediately without notice from the
27
- Licensor if User fails to comply with any provision of this License. Upon termination, User must destroy all copies of
28
- the Software.
29
-
30
- ## 5. Release to Public
31
-
32
- This License restricts the above rights until the Software is officially released to the public by the Licensor. Upon
33
- such release, the terms of this License may be modified by the Licensor to allow broader use rights.
34
-
35
- ## 6. Governing Law
36
-
37
- This License shall be governed by and construed in accordance with the laws of [Toronto, Canada]. Any legal action or
38
- proceeding arising under this License will be brought exclusively in the courts located in [Toronto], and the parties
39
- hereby consent to personal jurisdiction and venue therein.
40
-
41
- ## 7. Limitation of Liability
42
-
43
- In no event will the Licensor be liable for any damages, including, without limitation, indirect, incidental, special,
44
- consequential, or punitive damages arising out of the use of or inability to use the Software.
45
-
46
- ## 8. Indemnification
47
-
48
- User agrees to indemnify, defend, and hold harmless the Licensor and its affiliates, officers, agents, employees, and
49
- partners from any claim or demand, including reasonable attorneys' fees, made by any third party due to or arising out
50
- of User's use of the Software, User's violation of this License, or User's violation of any rights of another.
51
-
52
- ## 9. Breach of License
53
-
54
- Any breach of this License will result in immediate termination of User's rights under this License. Additionally, the
55
- Licensor reserves the right to pursue any legal action against the User in the event of a breach of this License.
56
-
57
- ## 10. Acknowledgment
58
-
59
- User acknowledges that they have read this License, understand it, and agree to be bound by its terms and conditions.
60
- User also agrees that this License is the complete and exclusive statement of the agreement between the Licensor and the
61
- User and supersedes all proposals or prior agreements, oral or written, and any other communications between the
62
- Licensor and the User relating to the subject matter of this License.