@tchain/tcabci-read-js-client 1.3.10 → 1.3.12
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 +4 -2
- package/client_test.js +2 -0
- package/constants.js +2 -0
- 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.
|
|
21
|
+
version = "v1.3.12"
|
|
22
22
|
errorCb = null
|
|
23
23
|
listenCb = null
|
|
24
24
|
ws = null
|
|
@@ -126,8 +126,10 @@ class TCAbciClient {
|
|
|
126
126
|
sender_addrs: senderAddrs,
|
|
127
127
|
typ: typ,
|
|
128
128
|
})
|
|
129
|
-
.then(res => {
|
|
129
|
+
.then((res) => {
|
|
130
130
|
return {
|
|
131
|
+
first_block_height: res.data.data.first_block_height,
|
|
132
|
+
first_transaction: res.data.data.first_transaction,
|
|
131
133
|
last_block_height: res.data.data.last_block_height,
|
|
132
134
|
last_transaction: res.data.data.last_transaction,
|
|
133
135
|
total_count: res.data.total_count,
|
package/client_test.js
CHANGED
|
@@ -148,6 +148,8 @@ describe("TCAbciClient TESTS", () => {
|
|
|
148
148
|
recipientAddrs: ["2mSCzresfg8Gwu7LZ9k9BTWkQAcQEkvYHFUSCZE2ubM4QV89PTeSYwQDqBas3ykq2emHEK6VRvxdgoe1vrhBbQGN"],
|
|
149
149
|
})
|
|
150
150
|
.then(data => {
|
|
151
|
+
unitJS.value(data.first_block_height).isGreaterThan(0)
|
|
152
|
+
unitJS.value(data.first_transaction).isNotEmpty()
|
|
151
153
|
unitJS.value(data.last_block_height).isGreaterThan(0)
|
|
152
154
|
unitJS.value(data.total_count).isGreaterThan(0)
|
|
153
155
|
unitJS.value(data.last_transaction).isNotEmpty()
|
package/constants.js
CHANGED
|
@@ -10,6 +10,8 @@ module.exports = {
|
|
|
10
10
|
TX_TYPE_MASTER: "initial_storage",
|
|
11
11
|
TX_TYPE_ADDRESS: "interim_storage",
|
|
12
12
|
TX_TYPE_ADDRESSES: "interim_storages",
|
|
13
|
+
TX_TYPE_ACCOUNT: 'initial_account',
|
|
14
|
+
TX_TYPE_ACCOUNT_INITIAL_TXS: 'initial_account_txs',
|
|
13
15
|
TX_TYPE_MESSAGE: "message",
|
|
14
16
|
TX_TYPE_MESSAGE_SENT: "inherit_message",
|
|
15
17
|
TX_TYPE_MESSAGE_THREAD_DELETE: "inherit_message_recv",
|