@btc-vision/transaction 1.0.121 → 1.0.122

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.
@@ -1 +1 @@
1
- export declare const version = "1.0.121";
1
+ export declare const version = "1.0.122";
package/build/_version.js CHANGED
@@ -1 +1 @@
1
- export const version = '1.0.121';
1
+ export const version = '1.0.122';
@@ -11,7 +11,6 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
11
11
  };
12
12
  var _Address_p2tr, _Address_network, _Address_originalPublicKey, _Address_keyPair;
13
13
  import { EcKeyPair } from './EcKeyPair.js';
14
- import { ADDRESS_BYTE_LENGTH } from '../utils/types.js';
15
14
  import { AddressVerificator } from './AddressVerificator.js';
16
15
  import { toXOnly } from '@btc-vision/bitcoin/src/psbt/bip371.js';
17
16
  const hexPattern = /^[0-9a-fA-F]+$/;
@@ -20,7 +19,7 @@ const isHexadecimal = (input) => {
20
19
  };
21
20
  export class Address extends Uint8Array {
22
21
  constructor(bytes) {
23
- super(bytes?.length || ADDRESS_BYTE_LENGTH);
22
+ super(32);
24
23
  _Address_p2tr.set(this, void 0);
25
24
  _Address_network.set(this, void 0);
26
25
  _Address_originalPublicKey.set(this, void 0);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@btc-vision/transaction",
3
3
  "type": "module",
4
- "version": "1.0.121",
4
+ "version": "1.0.122",
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.0.121';
1
+ export const version = '1.0.122';
@@ -1,7 +1,6 @@
1
1
  import { Network } from '@btc-vision/bitcoin';
2
2
  import { EcKeyPair } from './EcKeyPair.js';
3
3
  import { ECPairInterface } from 'ecpair';
4
- import { ADDRESS_BYTE_LENGTH } from '../utils/types.js';
5
4
  import { AddressVerificator } from './AddressVerificator.js';
6
5
  import { toXOnly } from '@btc-vision/bitcoin/src/psbt/bip371.js';
7
6
 
@@ -21,7 +20,7 @@ export class Address extends Uint8Array {
21
20
  #keyPair: ECPairInterface | undefined;
22
21
 
23
22
  public constructor(bytes?: ArrayLike<number>) {
24
- super(bytes?.length || ADDRESS_BYTE_LENGTH);
23
+ super(32);
25
24
 
26
25
  if (!bytes) {
27
26
  return;
@@ -185,7 +184,7 @@ export class Address extends Uint8Array {
185
184
  const tweakedBytes = toXOnly(
186
185
  EcKeyPair.tweakPublicKey(Buffer.from(this.#originalPublicKey)),
187
186
  );
188
-
187
+
189
188
  super.set(tweakedBytes);
190
189
  }
191
190
  }