@tchain/tcabci-read-js-client 2.6.1 → 2.6.3
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 +1 -1
- package/package.json +4 -4
- package/transaction.js +5 -5
- package/websocketOptions.js +1 -1
package/client.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tchain/tcabci-read-js-client",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.3",
|
|
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.
|
|
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.
|
|
40
|
+
"prettier": "^3.8.1",
|
|
41
41
|
"unit.js": "^2.1.1",
|
|
42
|
-
"ws": "^8.
|
|
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() {
|
|
@@ -229,6 +227,7 @@ export class Transaction {
|
|
|
229
227
|
|
|
230
228
|
if (parsed.order) tx._order = parsed.order
|
|
231
229
|
tx._id = parsed.id
|
|
230
|
+
tx._typ = parsed.typ
|
|
232
231
|
if (parsed.identifier) tx._identifier = parsed.identifier
|
|
233
232
|
tx._height = parsed.height
|
|
234
233
|
tx._version = parsed.version
|
|
@@ -254,6 +253,7 @@ export class Transaction {
|
|
|
254
253
|
|
|
255
254
|
if (obj.order) tx._order = obj.order
|
|
256
255
|
tx._id = obj.id
|
|
256
|
+
tx._typ = obj.typ
|
|
257
257
|
if (obj.identifier) tx._identifier = obj.identifier
|
|
258
258
|
tx._height = obj.height
|
|
259
259
|
tx._version = obj.version
|
|
@@ -278,7 +278,7 @@ export class Transaction {
|
|
|
278
278
|
* @throws Error
|
|
279
279
|
*/
|
|
280
280
|
ToJSON() {
|
|
281
|
-
this.
|
|
281
|
+
this.Validate()
|
|
282
282
|
|
|
283
283
|
return JSON.stringify({
|
|
284
284
|
id: this._id,
|
|
@@ -299,8 +299,8 @@ export class Transaction {
|
|
|
299
299
|
})
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
|
|
303
|
-
if (typeof this._id
|
|
302
|
+
Validate() {
|
|
303
|
+
if (typeof this._id === 'undefined')
|
|
304
304
|
throw new Error(INVALID_ARGUMENT_WITH_CS('id'))
|
|
305
305
|
if (typeof this._height !== 'number')
|
|
306
306
|
throw new Error(INVALID_ARGUMENT_WITH_CS('height'))
|
package/websocketOptions.js
CHANGED