@tchain/tcabci-read-js-client 2.5.3 → 2.5.4
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 +3 -4
- package/package.json +1 -1
- package/websocketOptions.js +1 -3
package/client.js
CHANGED
|
@@ -14,13 +14,12 @@ import {
|
|
|
14
14
|
MESSAGE_TYPE,
|
|
15
15
|
READ_NODE_ADDRESS,
|
|
16
16
|
READ_NODE_WS_ADDRESS,
|
|
17
|
-
TX_TYPE,
|
|
18
17
|
} from './constants.js'
|
|
19
18
|
import Message from './message.js'
|
|
20
19
|
import { isJSON, toJSON } from './util.js'
|
|
21
20
|
import { Options } from './websocketOptions.js'
|
|
22
21
|
import { TWebSocket } from './websocket.js'
|
|
23
|
-
import
|
|
22
|
+
import { TX_TYPE_LIST } from './transaction.js'
|
|
24
23
|
|
|
25
24
|
/**
|
|
26
25
|
* @callback successCallback
|
|
@@ -49,7 +48,7 @@ export default class TCaBCIClient {
|
|
|
49
48
|
_connected = false
|
|
50
49
|
_chainName = 'transferchain'
|
|
51
50
|
_chainVersion = 'v1'
|
|
52
|
-
_version = `
|
|
51
|
+
_version = `v2.5.4`
|
|
53
52
|
/**
|
|
54
53
|
* @type {?successCallback}
|
|
55
54
|
*/
|
|
@@ -203,7 +202,7 @@ export default class TCaBCIClient {
|
|
|
203
202
|
throw new Error(INVALID_ARGUMENTS)
|
|
204
203
|
}
|
|
205
204
|
|
|
206
|
-
if (txTypes && txTypes.length >
|
|
205
|
+
if (txTypes && txTypes.length > TX_TYPE_LIST.length) {
|
|
207
206
|
throw new Error(INVALID_ARGUMENTS)
|
|
208
207
|
}
|
|
209
208
|
|
package/package.json
CHANGED
package/websocketOptions.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import pkg from './package.json' with { type: 'json' }
|
|
2
|
-
|
|
3
1
|
export const HTTPSPort = 443,
|
|
4
2
|
HTTPPort = 80
|
|
5
3
|
|
|
@@ -15,7 +13,7 @@ export class Options {
|
|
|
15
13
|
_protocols = []
|
|
16
14
|
_customWS
|
|
17
15
|
_endpoints = ['ws', 'longpoll']
|
|
18
|
-
_version = `
|
|
16
|
+
_version = `v2.5.4`
|
|
19
17
|
|
|
20
18
|
_maxConnectionDelay = 10000
|
|
21
19
|
_minReconnectionDelay = 1000 + Math.random() * 4000
|