@btc-vision/transaction 1.3.6 → 1.4.0

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,7 +12,6 @@ export interface BroadcastedTransaction {
12
12
  readonly result?: string;
13
13
  readonly error?: string;
14
14
  readonly peers?: number;
15
- readonly identifier: bigint | string;
16
15
  }
17
16
  export interface Web3Provider {
18
17
  signInteraction(interactionParameters: InteractionParametersWithoutSigner): Promise<InteractionResponse>;
@@ -1 +1 @@
1
- export declare const version = "1.3.6";
1
+ export declare const version = "1.4.0";
package/build/_version.js CHANGED
@@ -1 +1 @@
1
- export const version = '1.3.6';
1
+ export const version = '1.4.0';
@@ -9,6 +9,8 @@ export declare class BinaryReader {
9
9
  static bigintCompare(a: bigint, b: bigint): number;
10
10
  static numberCompare(a: number, b: number): number;
11
11
  setBuffer(bytes: BufferLike): void;
12
+ length(): number;
13
+ bytesLeft(): number;
12
14
  readU8(): u8;
13
15
  readU16(be?: boolean): u16;
14
16
  readU32(be?: boolean): u32;
@@ -27,6 +27,12 @@ export class BinaryReader {
27
27
  this.buffer = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
28
28
  this.currentOffset = 0;
29
29
  }
30
+ length() {
31
+ return this.buffer.byteLength;
32
+ }
33
+ bytesLeft() {
34
+ return this.buffer.byteLength - this.currentOffset;
35
+ }
30
36
  readU8() {
31
37
  this.verifyEnd(this.currentOffset + U8_BYTE_LENGTH);
32
38
  const value = this.buffer.getUint8(this.currentOffset);
@@ -12,7 +12,6 @@ export interface BroadcastedTransaction {
12
12
  readonly result?: string;
13
13
  readonly error?: string;
14
14
  readonly peers?: number;
15
- readonly identifier: bigint | string;
16
15
  }
17
16
  export interface Web3Provider {
18
17
  signInteraction(interactionParameters: InteractionParametersWithoutSigner): Promise<InteractionResponse>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@btc-vision/transaction",
3
3
  "type": "module",
4
- "version": "1.3.6",
4
+ "version": "1.4.0",
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.3.6';
1
+ export const version = '1.4.0';
@@ -42,6 +42,14 @@ export class BinaryReader {
42
42
  this.currentOffset = 0;
43
43
  }
44
44
 
45
+ public length(): number {
46
+ return this.buffer.byteLength;
47
+ }
48
+
49
+ public bytesLeft(): number {
50
+ return this.buffer.byteLength - this.currentOffset;
51
+ }
52
+
45
53
  /**
46
54
  * Reads a single unsigned byte (u8).
47
55
  */
@@ -38,11 +38,6 @@ export interface BroadcastedTransaction {
38
38
  * The number of peers that the transaction was broadcasted to.
39
39
  */
40
40
  readonly peers?: number;
41
-
42
- /**
43
- * The identifier of the transaction.
44
- */
45
- readonly identifier: bigint | string;
46
41
  }
47
42
 
48
43
  export interface Web3Provider {