@tchain/tcabci-read-js-client 2.6.1 → 2.6.2

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.
package/client.js CHANGED
@@ -47,7 +47,7 @@ export default class TCaBCIClient {
47
47
  _connected = false
48
48
  _chainName = 'transferchain'
49
49
  _chainVersion = 'v1'
50
- _version = `v2.6.1`
50
+ _version = `v2.6.2`
51
51
  /**
52
52
  * @type {?SuccessCallback}
53
53
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tchain/tcabci-read-js-client",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "TransferChain Fastest Read Network WebSocket Client",
5
5
  "main": "client.js",
6
6
  "type": "module",
@@ -31,15 +31,15 @@
31
31
  "chai": "^6.2.2",
32
32
  "eslint": "^9.39.2",
33
33
  "eslint-config-prettier": "^10.1.8",
34
- "eslint-plugin-prettier": "^5.5.4",
34
+ "eslint-plugin-prettier": "^5.5.5",
35
35
  "esm": "^3.2.25",
36
36
  "express": "^5.2.1",
37
37
  "globals": "^16.5.0",
38
38
  "mocha": "^11.7.5",
39
39
  "nyc": "^17.1.0",
40
- "prettier": "^3.7.4",
40
+ "prettier": "^3.8.1",
41
41
  "unit.js": "^2.1.1",
42
- "ws": "^8.18.3"
42
+ "ws": "^8.19.0"
43
43
  },
44
44
  "dependencies": {
45
45
  "reconnecting-websocket": "^4.4.0"
package/transaction.js CHANGED
@@ -166,8 +166,6 @@ export class Transaction {
166
166
  this._inserted_at = inserted_at
167
167
  if (additionalData) this._additionalData = additionalData
168
168
  if (cipherData) this._cipherData = cipherData
169
-
170
- this._validate()
171
169
  }
172
170
 
173
171
  get ID() {
@@ -299,8 +297,8 @@ export class Transaction {
299
297
  })
300
298
  }
301
299
 
302
- _validate() {
303
- if (typeof this._id !== 'number')
300
+ Validate() {
301
+ if (typeof this._id === 'undefined')
304
302
  throw new Error(INVALID_ARGUMENT_WITH_CS('id'))
305
303
  if (typeof this._height !== 'number')
306
304
  throw new Error(INVALID_ARGUMENT_WITH_CS('height'))
@@ -13,7 +13,7 @@ export class Options {
13
13
  _protocols = []
14
14
  _customWS
15
15
  _endpoints = ['ws', 'longpoll']
16
- _version = `v2.6.1`
16
+ _version = `v2.6.2`
17
17
 
18
18
  _maxConnectionDelay = 10000
19
19
  _minReconnectionDelay = 1000 + Math.random() * 4000