@btc-vision/transaction 1.1.14 → 1.1.15

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.
@@ -116,7 +116,9 @@ export class BinaryReader {
116
116
  }
117
117
  readU8() {
118
118
  this.verifyEnd(this.currentOffset + U8_BYTE_LENGTH);
119
- return this.buffer.getUint8(this.currentOffset + U8_BYTE_LENGTH);
119
+ const value = this.buffer.getUint8(this.currentOffset);
120
+ this.currentOffset += U8_BYTE_LENGTH;
121
+ return value;
120
122
  }
121
123
  readU16() {
122
124
  this.verifyEnd(this.currentOffset + U16_BYTE_LENGTH);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@btc-vision/transaction",
3
3
  "type": "module",
4
- "version": "1.1.14",
4
+ "version": "1.1.15",
5
5
  "author": "BlobMaster41",
6
6
  "description": "OPNet transaction library allows you to create and sign transactions for the OPNet network.",
7
7
  "engines": {
@@ -165,7 +165,10 @@ export class BinaryReader {
165
165
  public readU8(): u8 {
166
166
  this.verifyEnd(this.currentOffset + U8_BYTE_LENGTH);
167
167
 
168
- return this.buffer.getUint8(this.currentOffset + U8_BYTE_LENGTH);
168
+ const value = this.buffer.getUint8(this.currentOffset);
169
+ this.currentOffset += U8_BYTE_LENGTH;
170
+
171
+ return value;
169
172
  }
170
173
 
171
174
  public readU16(): u16 {