@tchain/tcabci-read-js-client 1.3.6 → 1.3.7

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.
Files changed (2) hide show
  1. package/client.js +9 -3
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -18,7 +18,7 @@ class TCAbciClient {
18
18
  subscribed = false
19
19
  subscribedAddresses = []
20
20
  connected = false
21
- version = "v1.3.6"
21
+ version = "v1.3.7"
22
22
  errorCb = null
23
23
  listenCb = null
24
24
  ws = null
@@ -26,7 +26,12 @@ class TCAbciClient {
26
26
  readNodeAddress = READ_NODE_ADDRESS
27
27
  readNodeWSAddress = READ_NODE_WS_ADDRESS
28
28
 
29
- constructor(readNodeAddresses = []) {
29
+ /**
30
+ *
31
+ * @param {Array<String>} readNodeAddresses
32
+ * @param axiosAdapter Axios Adapter
33
+ */
34
+ constructor(readNodeAddresses = [], axiosAdapter = null) {
30
35
  if (readNodeAddresses.length === 2) {
31
36
  this.readNodeAddress = readNodeAddresses[0]
32
37
  this.readNodeWSAddress = readNodeAddresses[1]
@@ -34,7 +39,8 @@ class TCAbciClient {
34
39
  this.httpClient = axios.create({
35
40
  baseURL: this.readNodeAddress,
36
41
  timeout: 10000,
37
- headers: {'Client': `tcabaci-read-js-client${this.version}`}
42
+ headers: {'Client': `tcabaci-read-js-client${this.version}`},
43
+ ...(axiosAdapter ? { adapter: axiosAdapter } : {})
38
44
  })
39
45
  }
40
46
  Socket() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tchain/tcabci-read-js-client",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "TransferChain Fastest Read Network WebSocket Client",
5
5
  "main": "client.js",
6
6
  "type": "commonjs",