@waves/node-api-js 1.3.10 → 1.4.0-snapshot.1
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/cjs/api-node/activation/index.d.ts +2 -1
- package/cjs/api-node/activation/index.js +2 -3
- package/cjs/api-node/activation/index.js.map +1 -1
- package/cjs/api-node/addresses/index.d.ts +4 -4
- package/cjs/api-node/addresses/index.js +68 -55
- package/cjs/api-node/addresses/index.js.map +1 -1
- package/cjs/api-node/alias/index.d.ts +1 -1
- package/cjs/api-node/alias/index.js +6 -7
- package/cjs/api-node/alias/index.js.map +1 -1
- package/cjs/api-node/assets/index.d.ts +4 -4
- package/cjs/api-node/assets/index.js +24 -25
- package/cjs/api-node/assets/index.js.map +1 -1
- package/cjs/api-node/blocks/index.d.ts +14 -7
- package/cjs/api-node/blocks/index.js +36 -51
- package/cjs/api-node/blocks/index.js.map +1 -1
- package/cjs/api-node/debug/index.d.ts +2 -2
- package/cjs/api-node/debug/index.js +56 -43
- package/cjs/api-node/debug/index.js.map +1 -1
- package/cjs/api-node/eth/index.js +3 -4
- package/cjs/api-node/eth/index.js.map +1 -1
- package/cjs/api-node/finalization/index.d.ts +54 -0
- package/cjs/api-node/finalization/index.js +126 -0
- package/cjs/api-node/finalization/index.js.map +1 -0
- package/cjs/api-node/leasing/index.js +7 -7
- package/cjs/api-node/leasing/index.js.map +1 -1
- package/cjs/api-node/node/index.js +4 -5
- package/cjs/api-node/node/index.js.map +1 -1
- package/cjs/api-node/peers/index.js +8 -9
- package/cjs/api-node/peers/index.js.map +1 -1
- package/cjs/api-node/rewards/index.d.ts +1 -1
- package/cjs/api-node/rewards/index.js +3 -4
- package/cjs/api-node/rewards/index.js.map +1 -1
- package/cjs/api-node/transactions/index.d.ts +1 -1
- package/cjs/api-node/transactions/index.js +26 -27
- package/cjs/api-node/transactions/index.js.map +1 -1
- package/cjs/api-node/utils/index.js +29 -30
- package/cjs/api-node/utils/index.js.map +1 -1
- package/cjs/constants.d.ts +1 -1
- package/cjs/create.d.ts +17 -1168
- package/cjs/create.js +30 -10
- package/cjs/create.js.map +1 -1
- package/cjs/index.d.ts +2 -1
- package/cjs/index.js +4 -1
- package/cjs/index.js.map +1 -1
- package/cjs/interface.d.ts +6 -6
- package/cjs/interface.js +4 -2
- package/cjs/interface.js.map +1 -1
- package/cjs/nodeInteraction.d.ts +34 -0
- package/cjs/nodeInteraction.js +266 -0
- package/cjs/nodeInteraction.js.map +1 -0
- package/cjs/tools/adresses/availableSponsoredBalances.d.ts +1 -1
- package/cjs/tools/adresses/availableSponsoredBalances.js +2 -2
- package/cjs/tools/adresses/availableSponsoredBalances.js.map +1 -1
- package/cjs/tools/adresses/ethAddress2waves.js +15 -10
- package/cjs/tools/adresses/ethAddress2waves.js.map +1 -1
- package/cjs/tools/adresses/getAssetIdListByTx.js +12 -7
- package/cjs/tools/adresses/getAssetIdListByTx.js.map +1 -1
- package/cjs/tools/adresses/getAssetsByTransaction.js +3 -3
- package/cjs/tools/adresses/getAssetsByTransaction.js.map +1 -1
- package/cjs/tools/adresses/getTransactionsWithAssets.js +3 -3
- package/cjs/tools/adresses/getTransactionsWithAssets.js.map +1 -1
- package/cjs/tools/adresses/watch.d.ts +8 -5
- package/cjs/tools/adresses/watch.js +56 -16
- package/cjs/tools/adresses/watch.js.map +1 -1
- package/cjs/tools/adresses/wavesAddress2eth.js +3 -3
- package/cjs/tools/adresses/wavesAddress2eth.js.map +1 -1
- package/cjs/tools/assets/wavesAsset2eth.js +3 -3
- package/cjs/tools/assets/wavesAsset2eth.js.map +1 -1
- package/cjs/tools/blocks/detectInterval.js +3 -3
- package/cjs/tools/blocks/detectInterval.js.map +1 -1
- package/cjs/tools/blocks/getNetworkByte.js +2 -2
- package/cjs/tools/blocks/getNetworkByte.js.map +1 -1
- package/cjs/tools/blocks/getNetworkCode.js +2 -2
- package/cjs/tools/blocks/getNetworkCode.js.map +1 -1
- package/cjs/tools/blocks/waitHeight.js +5 -5
- package/cjs/tools/blocks/waitHeight.js.map +1 -1
- package/cjs/tools/matcher/order.d.ts +17 -0
- package/cjs/tools/matcher/order.js +27 -0
- package/cjs/tools/matcher/order.js.map +1 -0
- package/cjs/tools/parse.js +1 -1
- package/cjs/tools/parse.js.map +1 -1
- package/cjs/tools/query.d.ts +1 -1
- package/cjs/tools/query.js +3 -3
- package/cjs/tools/query.js.map +1 -1
- package/cjs/tools/request.d.ts +1 -57
- package/cjs/tools/request.js +48 -6
- package/cjs/tools/request.js.map +1 -1
- package/cjs/tools/resolve.js +1 -1
- package/cjs/tools/resolve.js.map +1 -1
- package/cjs/tools/stringify.js +3 -3
- package/cjs/tools/stringify.js.map +1 -1
- package/cjs/tools/transactions/broadcast.d.ts +2 -2
- package/cjs/tools/transactions/broadcast.js +8 -8
- package/cjs/tools/transactions/broadcast.js.map +1 -1
- package/cjs/tools/transactions/ethTxId2waves.js +2 -2
- package/cjs/tools/transactions/ethTxId2waves.js.map +1 -1
- package/cjs/tools/transactions/wait.js +5 -5
- package/cjs/tools/transactions/wait.js.map +1 -1
- package/cjs/tools/utils.d.ts +7 -7
- package/cjs/tools/utils.js +30 -23
- package/cjs/tools/utils.js.map +1 -1
- package/package.json +34 -35
- package/dist/node-api.js +0 -30492
- package/dist/node-api.min.js +0 -26
- package/es/api-node/activation/index.d.ts +0 -21
- package/es/api-node/activation/index.js +0 -13
- package/es/api-node/activation/index.js.map +0 -1
- package/es/api-node/addresses/index.d.ts +0 -81
- package/es/api-node/addresses/index.js +0 -111
- package/es/api-node/addresses/index.js.map +0 -1
- package/es/api-node/alias/index.d.ts +0 -6
- package/es/api-node/alias/index.js +0 -14
- package/es/api-node/alias/index.js.map +0 -1
- package/es/api-node/assets/index.d.ts +0 -79
- package/es/api-node/assets/index.js +0 -103
- package/es/api-node/assets/index.js.map +0 -1
- package/es/api-node/blocks/index.d.ts +0 -143
- package/es/api-node/blocks/index.js +0 -179
- package/es/api-node/blocks/index.js.map +0 -1
- package/es/api-node/debug/index.d.ts +0 -189
- package/es/api-node/debug/index.js +0 -201
- package/es/api-node/debug/index.js.map +0 -1
- package/es/api-node/eth/index.d.ts +0 -3
- package/es/api-node/eth/index.js +0 -8
- package/es/api-node/eth/index.js.map +0 -1
- package/es/api-node/leasing/index.d.ts +0 -22
- package/es/api-node/leasing/index.js +0 -22
- package/es/api-node/leasing/index.js.map +0 -1
- package/es/api-node/node/index.d.ts +0 -11
- package/es/api-node/node/index.js +0 -10
- package/es/api-node/node/index.js.map +0 -1
- package/es/api-node/peers/index.d.ts +0 -46
- package/es/api-node/peers/index.js +0 -46
- package/es/api-node/peers/index.js.map +0 -1
- package/es/api-node/rewards/index.d.ts +0 -21
- package/es/api-node/rewards/index.js +0 -13
- package/es/api-node/rewards/index.js.map +0 -1
- package/es/api-node/transactions/index.d.ts +0 -73
- package/es/api-node/transactions/index.js +0 -137
- package/es/api-node/transactions/index.js.map +0 -1
- package/es/api-node/utils/index.d.ts +0 -110
- package/es/api-node/utils/index.js +0 -193
- package/es/api-node/utils/index.js.map +0 -1
- package/es/api-node/wallet/index.d.ts +0 -5
- package/es/api-node/wallet/index.js +0 -7
- package/es/api-node/wallet/index.js.map +0 -1
- package/es/constants.d.ts +0 -40
- package/es/constants.js +0 -40
- package/es/constants.js.map +0 -1
- package/es/create.d.ts +0 -1238
- package/es/create.js +0 -90
- package/es/create.js.map +0 -1
- package/es/index.d.ts +0 -9
- package/es/index.js +0 -9
- package/es/index.js.map +0 -1
- package/es/interface.d.ts +0 -44
- package/es/interface.js +0 -3
- package/es/interface.js.map +0 -1
- package/es/tools/adresses/availableSponsoredBalances.d.ts +0 -7
- package/es/tools/adresses/availableSponsoredBalances.js +0 -27
- package/es/tools/adresses/availableSponsoredBalances.js.map +0 -1
- package/es/tools/adresses/ethAddress2waves.d.ts +0 -1
- package/es/tools/adresses/ethAddress2waves.js +0 -31
- package/es/tools/adresses/ethAddress2waves.js.map +0 -1
- package/es/tools/adresses/getAssetIdListByTx.d.ts +0 -2
- package/es/tools/adresses/getAssetIdListByTx.js +0 -24
- package/es/tools/adresses/getAssetIdListByTx.js.map +0 -1
- package/es/tools/adresses/getAssetsByTransaction.d.ts +0 -3
- package/es/tools/adresses/getAssetsByTransaction.js +0 -8
- package/es/tools/adresses/getAssetsByTransaction.js.map +0 -1
- package/es/tools/adresses/getTransactionsWithAssets.d.ts +0 -6
- package/es/tools/adresses/getTransactionsWithAssets.js +0 -7
- package/es/tools/adresses/getTransactionsWithAssets.js.map +0 -1
- package/es/tools/adresses/watch.d.ts +0 -24
- package/es/tools/adresses/watch.js +0 -134
- package/es/tools/adresses/watch.js.map +0 -1
- package/es/tools/adresses/wavesAddress2eth.d.ts +0 -1
- package/es/tools/adresses/wavesAddress2eth.js +0 -7
- package/es/tools/adresses/wavesAddress2eth.js.map +0 -1
- package/es/tools/assets/wavesAsset2eth.d.ts +0 -1
- package/es/tools/assets/wavesAsset2eth.js +0 -7
- package/es/tools/assets/wavesAsset2eth.js.map +0 -1
- package/es/tools/blocks/detectInterval.d.ts +0 -1
- package/es/tools/blocks/detectInterval.js +0 -9
- package/es/tools/blocks/detectInterval.js.map +0 -1
- package/es/tools/blocks/getNetworkByte.d.ts +0 -1
- package/es/tools/blocks/getNetworkByte.js +0 -51
- package/es/tools/blocks/getNetworkByte.js.map +0 -1
- package/es/tools/blocks/getNetworkCode.d.ts +0 -1
- package/es/tools/blocks/getNetworkCode.js +0 -5
- package/es/tools/blocks/getNetworkCode.js.map +0 -1
- package/es/tools/blocks/waitHeight.d.ts +0 -3
- package/es/tools/blocks/waitHeight.js +0 -36
- package/es/tools/blocks/waitHeight.js.map +0 -1
- package/es/tools/parse.d.ts +0 -1
- package/es/tools/parse.js +0 -5
- package/es/tools/parse.js.map +0 -1
- package/es/tools/query.d.ts +0 -4
- package/es/tools/query.js +0 -12
- package/es/tools/query.js.map +0 -1
- package/es/tools/request.d.ts +0 -64
- package/es/tools/request.js +0 -22
- package/es/tools/request.js.map +0 -1
- package/es/tools/resolve.d.ts +0 -1
- package/es/tools/resolve.js +0 -4
- package/es/tools/resolve.js.map +0 -1
- package/es/tools/stringify.d.ts +0 -1
- package/es/tools/stringify.js +0 -18
- package/es/tools/stringify.js.map +0 -1
- package/es/tools/transactions/broadcast.d.ts +0 -14
- package/es/tools/transactions/broadcast.js +0 -43
- package/es/tools/transactions/broadcast.js.map +0 -1
- package/es/tools/transactions/ethTxId2waves.d.ts +0 -1
- package/es/tools/transactions/ethTxId2waves.js +0 -8
- package/es/tools/transactions/ethTxId2waves.js.map +0 -1
- package/es/tools/transactions/wait.d.ts +0 -10
- package/es/tools/transactions/wait.js +0 -39
- package/es/tools/transactions/wait.js.map +0 -1
- package/es/tools/utils.d.ts +0 -32
- package/es/tools/utils.js +0 -73
- package/es/tools/utils.js.map +0 -1
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import request from '../../tools/request';
|
|
2
|
-
/**
|
|
3
|
-
* GET /blocks/headers/seq/{from}/{to}
|
|
4
|
-
* Get block headers at specified heights
|
|
5
|
-
* @param base
|
|
6
|
-
* @param from
|
|
7
|
-
* @param to
|
|
8
|
-
*/
|
|
9
|
-
export function fetchHeadersSeq(base, from, to, options = Object.create(null)) {
|
|
10
|
-
return request({
|
|
11
|
-
base,
|
|
12
|
-
url: `/blocks/headers/seq/${from}/${to}`,
|
|
13
|
-
options
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* GET /blocks/headers/last
|
|
18
|
-
* Last block header
|
|
19
|
-
* @param base
|
|
20
|
-
*/
|
|
21
|
-
export function fetchHeadersLast(base, options = Object.create(null)) {
|
|
22
|
-
return request({
|
|
23
|
-
base,
|
|
24
|
-
url: `/blocks/headers/last`,
|
|
25
|
-
options
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* GET /blocks/height/{id}
|
|
30
|
-
* Height of a block by its id
|
|
31
|
-
* @param base
|
|
32
|
-
* @param id
|
|
33
|
-
*/
|
|
34
|
-
export function fetchHeightById(base, id) {
|
|
35
|
-
return request({
|
|
36
|
-
base,
|
|
37
|
-
url: `/blocks/height/${id}`
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* GET /blocks/headers/at/{height}
|
|
42
|
-
* Block header at height
|
|
43
|
-
* @param base
|
|
44
|
-
* @param height
|
|
45
|
-
*/
|
|
46
|
-
export function fetchHeadersAt(base, height, options = Object.create(null)) {
|
|
47
|
-
return request({
|
|
48
|
-
base,
|
|
49
|
-
url: `/blocks/headers/at/${height}`,
|
|
50
|
-
options
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* GET /blocks/headers/{id}
|
|
55
|
-
* Get block at specified height
|
|
56
|
-
* @param base
|
|
57
|
-
* @param height
|
|
58
|
-
*/
|
|
59
|
-
export function fetchHeadersById(base, id, options = Object.create(null)) {
|
|
60
|
-
return request({
|
|
61
|
-
base,
|
|
62
|
-
url: `/blocks/headers/${id}`,
|
|
63
|
-
options
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* GET /blocks/at/{height}
|
|
68
|
-
* Get block at specified height
|
|
69
|
-
* @param base
|
|
70
|
-
* @param height
|
|
71
|
-
*/
|
|
72
|
-
export function fetchBlockAt(base, height, options = Object.create(null)) {
|
|
73
|
-
return request({
|
|
74
|
-
base,
|
|
75
|
-
url: `/blocks/at/${height}`,
|
|
76
|
-
options
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* GET /blocks/seq/{from}/{to}
|
|
81
|
-
* Block range
|
|
82
|
-
* @param base
|
|
83
|
-
* @param from
|
|
84
|
-
* @param to
|
|
85
|
-
*/
|
|
86
|
-
export function fetchSeq(base, from, to, options = Object.create(null)) {
|
|
87
|
-
return request({
|
|
88
|
-
base,
|
|
89
|
-
url: `/blocks/seq/${from}/${to}`,
|
|
90
|
-
options
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* GET /blocks/{id}
|
|
95
|
-
* Get block by its id
|
|
96
|
-
* @param base
|
|
97
|
-
* @param id
|
|
98
|
-
*/
|
|
99
|
-
export function fetchBlockById(base, id, options = Object.create(null)) {
|
|
100
|
-
return request({
|
|
101
|
-
base,
|
|
102
|
-
url: `/blocks/${id}`,
|
|
103
|
-
options
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* GET /blocks/first
|
|
108
|
-
* Get genesis block
|
|
109
|
-
* @param base
|
|
110
|
-
*/
|
|
111
|
-
export function fetchFirst(base, options = Object.create(null)) {
|
|
112
|
-
return request({
|
|
113
|
-
base,
|
|
114
|
-
url: `/blocks/first`,
|
|
115
|
-
options
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* /blocks/address/{address}/{from}/{to}
|
|
120
|
-
* Get list of blocks generated by specified address
|
|
121
|
-
* @param base
|
|
122
|
-
* @param address
|
|
123
|
-
* @param from
|
|
124
|
-
* @param to
|
|
125
|
-
*/
|
|
126
|
-
export function fetchBlocksByAddress(base, address, from, to, options = Object.create(null)) {
|
|
127
|
-
return request({
|
|
128
|
-
base,
|
|
129
|
-
url: `/blocks/address/${address}/${from}/${to}`,
|
|
130
|
-
options
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* GET /blocks/last
|
|
135
|
-
* Last block
|
|
136
|
-
* @param base
|
|
137
|
-
*/
|
|
138
|
-
export function fetchLast(base, options = Object.create(null)) {
|
|
139
|
-
return request({
|
|
140
|
-
base,
|
|
141
|
-
url: '/blocks/last',
|
|
142
|
-
options
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* GET /blocks/delay/{id}/{blockNum}
|
|
147
|
-
* Average delay in milliseconds between last blockNum blocks starting from block with id
|
|
148
|
-
* @param base
|
|
149
|
-
* @param id
|
|
150
|
-
* @param blockNum
|
|
151
|
-
*/
|
|
152
|
-
export function fetchDelay(base, id, blockNum) {
|
|
153
|
-
return request({
|
|
154
|
-
base,
|
|
155
|
-
url: `/blocks/delay/${id}/${blockNum}`
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* GET /blocks/height
|
|
160
|
-
* @param base
|
|
161
|
-
*/
|
|
162
|
-
export function fetchHeight(base) {
|
|
163
|
-
return request({
|
|
164
|
-
base,
|
|
165
|
-
url: '/blocks/height'
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* GET /blocks/heightByTimestamp
|
|
170
|
-
* @param base
|
|
171
|
-
*/
|
|
172
|
-
export function fetchHeightByTimestamp(base, timestamp, options = Object.create(null)) {
|
|
173
|
-
return request({
|
|
174
|
-
base,
|
|
175
|
-
url: `/blocks/heightByTimestamp/${timestamp}`,
|
|
176
|
-
options
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/blocks/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,IAAY,EAAE,EAAU,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC9G,OAAO,OAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,uBAAuB,IAAI,IAAI,EAAE,EAAE;QACxC,OAAO;KACV,CAAC,CAAA;AACN,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACrF,OAAO,OAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,sBAAsB;QAC3B,OAAO;KACV,CAAC,CAAC;AACP,CAAC;AAED;;;;;GAKG;AACH,MA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AE,6BAA6B,SAAS,EAAE;QAC7C,OAAO;KACV,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { TLong } from '../../interface';
|
|
2
|
-
import { AssetDecimals, DataTransactionEntry, Transaction, WithId } from '@waves/ts-types';
|
|
3
|
-
/**
|
|
4
|
-
* Waves balance history
|
|
5
|
-
* @param base
|
|
6
|
-
* @param address
|
|
7
|
-
*/
|
|
8
|
-
export declare function fetchBalanceHistory(base: string, address: string, options?: RequestInit): Promise<Array<IBalanceHistory>>;
|
|
9
|
-
interface IBalanceHistory {
|
|
10
|
-
height: number;
|
|
11
|
-
balance: TLong;
|
|
12
|
-
}
|
|
13
|
-
export declare type TPayment = {
|
|
14
|
-
assetId: string | null;
|
|
15
|
-
amount: TLong;
|
|
16
|
-
};
|
|
17
|
-
export declare type TStateChanges = {
|
|
18
|
-
data: DataTransactionEntry[];
|
|
19
|
-
transfers: {
|
|
20
|
-
address: string;
|
|
21
|
-
amount: TLong;
|
|
22
|
-
asset: string | null;
|
|
23
|
-
}[];
|
|
24
|
-
issues: {
|
|
25
|
-
assetId: string;
|
|
26
|
-
name: string;
|
|
27
|
-
description: string;
|
|
28
|
-
quantity: TLong;
|
|
29
|
-
decimals: AssetDecimals;
|
|
30
|
-
isReissuable: boolean;
|
|
31
|
-
compiledScript: null | string;
|
|
32
|
-
nonce: TLong;
|
|
33
|
-
}[];
|
|
34
|
-
reissues: {
|
|
35
|
-
assetId: string;
|
|
36
|
-
isReissuable: boolean;
|
|
37
|
-
quantity: TLong;
|
|
38
|
-
}[];
|
|
39
|
-
burns: {
|
|
40
|
-
assetId: string;
|
|
41
|
-
quantity: TLong;
|
|
42
|
-
}[];
|
|
43
|
-
sponsorFees: {
|
|
44
|
-
assetId: string;
|
|
45
|
-
minSponsoredAssetFee: TLong;
|
|
46
|
-
}[];
|
|
47
|
-
leases: {
|
|
48
|
-
leaseId: string;
|
|
49
|
-
recipient: string;
|
|
50
|
-
amount: TLong;
|
|
51
|
-
}[];
|
|
52
|
-
leaseCancels: {
|
|
53
|
-
leaseId: string;
|
|
54
|
-
}[];
|
|
55
|
-
invokes: ({
|
|
56
|
-
dApp: string;
|
|
57
|
-
call: {
|
|
58
|
-
function: string;
|
|
59
|
-
args: {
|
|
60
|
-
type: string;
|
|
61
|
-
value: string;
|
|
62
|
-
}[];
|
|
63
|
-
};
|
|
64
|
-
payment: TPayment[];
|
|
65
|
-
stateChanges: TStateChanges;
|
|
66
|
-
})[];
|
|
67
|
-
error?: {
|
|
68
|
-
code: number;
|
|
69
|
-
text: string;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
export interface IWithStateChanges {
|
|
73
|
-
stateChanges: TStateChanges | null;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Get list of transactions with state changes where specified address has been involved
|
|
77
|
-
* @param base
|
|
78
|
-
* @param address
|
|
79
|
-
* @param limit
|
|
80
|
-
* @param after
|
|
81
|
-
*/
|
|
82
|
-
export declare function fetchStateChangesByAddress(base: string, address: string, limit: number, after?: string, options?: RequestInit): Promise<Array<Transaction<TLong> & WithId & IWithStateChanges>>;
|
|
83
|
-
/**
|
|
84
|
-
* Get invokeScript transaction state changes
|
|
85
|
-
* @param base
|
|
86
|
-
* @param txId
|
|
87
|
-
*/
|
|
88
|
-
export declare function fetchStateChangesByTxId(base: string, txId: string, options?: RequestInit): Promise<Transaction<TLong> & WithId & IWithStateChanges>;
|
|
89
|
-
export declare function postPeerToTheBanList(base: string, peer: string): Promise<any>;
|
|
90
|
-
export declare function fetchConfigInfo(base: string, apiKey: string): Promise<string>;
|
|
91
|
-
export declare function fetchDebugInfo(base: string, apiKey: string): Promise<IDebugInfo>;
|
|
92
|
-
export declare function fetchMinerInfo(base: string, apiKey: string): Promise<IMinerInfo<TLong>>;
|
|
93
|
-
export declare function fetchPortfolios(base: string, address: string, apiKey: string): Promise<IPortfolio<TLong>>;
|
|
94
|
-
export declare function debugPrint(base: string, message: string, apiKey: string): Promise<any>;
|
|
95
|
-
/**
|
|
96
|
-
* Removes all blocks after a given height. Max number of blocks back from the current height is set by waves.db.max-rollback-depth, 2000 by default
|
|
97
|
-
* @param base
|
|
98
|
-
* @param height
|
|
99
|
-
* @param returnTransactionsToUtx
|
|
100
|
-
* @param apiKey
|
|
101
|
-
*/
|
|
102
|
-
export declare function debugRollback(base: string, height: number, returnTransactionsToUtx: boolean, apiKey: string): Promise<any>;
|
|
103
|
-
/**
|
|
104
|
-
* Rollback the state to the block with a given ID
|
|
105
|
-
* @param base
|
|
106
|
-
* @param height
|
|
107
|
-
* @param returnTransactionsToUtx
|
|
108
|
-
* @param apiKey
|
|
109
|
-
*/
|
|
110
|
-
export declare function debugRollbackTo(base: string, id: string, apiKey: string): Promise<any>;
|
|
111
|
-
/**
|
|
112
|
-
* Regular address balance at the current height
|
|
113
|
-
* @param base
|
|
114
|
-
* @param apiKey
|
|
115
|
-
*/
|
|
116
|
-
export declare function debugState(base: string, apiKey: string): Promise<Record<string, number | string>>;
|
|
117
|
-
/**
|
|
118
|
-
* Get state hash at height. Available only if node configuration contains waves.db.store-state-hashes = true option
|
|
119
|
-
* @param base
|
|
120
|
-
* @param height
|
|
121
|
-
*/
|
|
122
|
-
export declare function debugStateHash(base: string, height: number, options?: RequestInit): Promise<IStateHash>;
|
|
123
|
-
/**
|
|
124
|
-
* Regular address balance at the height. Max number of blocks back from the current height is set by waves.db.max-rollback-depth, 2000 by default
|
|
125
|
-
* @param base
|
|
126
|
-
* @param height
|
|
127
|
-
* @param apiKey
|
|
128
|
-
*/
|
|
129
|
-
export declare function debugStateWaves(base: string, height: number, apiKey: string): Promise<Record<string, number | string>>;
|
|
130
|
-
/**
|
|
131
|
-
* Validates a transaction and measures time spent in milliseconds. You should use the JSON transaction format with proofs
|
|
132
|
-
* @param base
|
|
133
|
-
* @param transaction
|
|
134
|
-
*/
|
|
135
|
-
export declare function debugValidate(base: string, transaction: string): Promise<IValidateResponse>;
|
|
136
|
-
interface IDebugInfo {
|
|
137
|
-
"stateHeight": number;
|
|
138
|
-
"extensionLoaderState": string;
|
|
139
|
-
"historyReplierCacheSizes": {
|
|
140
|
-
"microBlockOwners": number;
|
|
141
|
-
"nextInvs": number;
|
|
142
|
-
"awaiting": number;
|
|
143
|
-
"successfullyReceived": number;
|
|
144
|
-
};
|
|
145
|
-
"microBlockSynchronizerCacheSizes": {
|
|
146
|
-
"microBlockOwners": number;
|
|
147
|
-
"nextInvs": number;
|
|
148
|
-
"awaiting": number;
|
|
149
|
-
"successfullyReceived": number;
|
|
150
|
-
};
|
|
151
|
-
"scoreObserverStats": {
|
|
152
|
-
"localScore": number;
|
|
153
|
-
"currentBestChannel": string;
|
|
154
|
-
"scoresCacheSize": number;
|
|
155
|
-
};
|
|
156
|
-
"minerState": string;
|
|
157
|
-
}
|
|
158
|
-
interface IMinerInfo<LONG> {
|
|
159
|
-
"address": string;
|
|
160
|
-
"miningBalance": LONG;
|
|
161
|
-
"timestamp": number;
|
|
162
|
-
}
|
|
163
|
-
interface IPortfolio<LONG> {
|
|
164
|
-
"balance": number;
|
|
165
|
-
"lease": {
|
|
166
|
-
"in": number;
|
|
167
|
-
"out": number;
|
|
168
|
-
};
|
|
169
|
-
"assets": Record<string, LONG>;
|
|
170
|
-
}
|
|
171
|
-
interface IStateHash {
|
|
172
|
-
stateHash: string;
|
|
173
|
-
wavesBalanceHash: string;
|
|
174
|
-
assetBalanceHash: string;
|
|
175
|
-
dataEntryHash: string;
|
|
176
|
-
accountScriptHash: string;
|
|
177
|
-
assetScriptHash: string;
|
|
178
|
-
leaseBalanceHash: string;
|
|
179
|
-
leaseStatusHash: string;
|
|
180
|
-
sponsorshipHash: string;
|
|
181
|
-
aliasHash: string;
|
|
182
|
-
blockId: string;
|
|
183
|
-
}
|
|
184
|
-
interface IValidateResponse {
|
|
185
|
-
valid: boolean;
|
|
186
|
-
validationTime: number;
|
|
187
|
-
"trace": string[];
|
|
188
|
-
}
|
|
189
|
-
export {};
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import request, { parseResponse } from '../../tools/request';
|
|
2
|
-
import query from '../../tools/query';
|
|
3
|
-
/**
|
|
4
|
-
* Waves balance history
|
|
5
|
-
* @param base
|
|
6
|
-
* @param address
|
|
7
|
-
*/
|
|
8
|
-
export function fetchBalanceHistory(base, address, options = Object.create(null)) {
|
|
9
|
-
return request({
|
|
10
|
-
base,
|
|
11
|
-
url: `/debug/balances/history/${address}`,
|
|
12
|
-
options
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Get list of transactions with state changes where specified address has been involved
|
|
17
|
-
* @param base
|
|
18
|
-
* @param address
|
|
19
|
-
* @param limit
|
|
20
|
-
* @param after
|
|
21
|
-
*/
|
|
22
|
-
export function fetchStateChangesByAddress(base, address, limit, after, options = Object.create(null)) {
|
|
23
|
-
return request({
|
|
24
|
-
base,
|
|
25
|
-
url: `/debug/stateChanges/address/${address}/limit/${limit}${query({ after })}`,
|
|
26
|
-
options
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Get invokeScript transaction state changes
|
|
31
|
-
* @param base
|
|
32
|
-
* @param txId
|
|
33
|
-
*/
|
|
34
|
-
export function fetchStateChangesByTxId(base, txId, options = Object.create(null)) {
|
|
35
|
-
return request({
|
|
36
|
-
base,
|
|
37
|
-
url: `/transactions/info/${txId}`,
|
|
38
|
-
options
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
export function postPeerToTheBanList(base, peer) {
|
|
42
|
-
return fetch(`${base}/debug/blacklist`, {
|
|
43
|
-
method: "POST",
|
|
44
|
-
body: peer,
|
|
45
|
-
headers: {
|
|
46
|
-
"Content-Type": "application/json"
|
|
47
|
-
}
|
|
48
|
-
}).then(parseResponse);
|
|
49
|
-
}
|
|
50
|
-
export function fetchConfigInfo(base, apiKey) {
|
|
51
|
-
return fetch(`${base}/debug/configInfo`, {
|
|
52
|
-
method: "GET",
|
|
53
|
-
headers: {
|
|
54
|
-
"X-API-Key": apiKey,
|
|
55
|
-
"Content-Type": "application/json"
|
|
56
|
-
}
|
|
57
|
-
}).then(parseResponse);
|
|
58
|
-
}
|
|
59
|
-
export function fetchDebugInfo(base, apiKey) {
|
|
60
|
-
return fetch(`${base}/debug/info`, {
|
|
61
|
-
method: "GET",
|
|
62
|
-
headers: {
|
|
63
|
-
"X-API-Key": apiKey,
|
|
64
|
-
"Content-Type": "application/json"
|
|
65
|
-
}
|
|
66
|
-
}).then(parseResponse);
|
|
67
|
-
}
|
|
68
|
-
export function fetchMinerInfo(base, apiKey) {
|
|
69
|
-
return fetch(`${base}/debug/minerInfo`, {
|
|
70
|
-
method: "GET",
|
|
71
|
-
headers: {
|
|
72
|
-
"X-API-Key": apiKey,
|
|
73
|
-
"Content-Type": "application/json"
|
|
74
|
-
}
|
|
75
|
-
}).then(parseResponse);
|
|
76
|
-
}
|
|
77
|
-
export function fetchPortfolios(base, address, apiKey) {
|
|
78
|
-
return fetch(`${base}/debug/portfolios/${address}`, {
|
|
79
|
-
method: "GET",
|
|
80
|
-
headers: {
|
|
81
|
-
"X-API-Key": apiKey,
|
|
82
|
-
"Content-Type": "application/json"
|
|
83
|
-
}
|
|
84
|
-
}).then(parseResponse);
|
|
85
|
-
}
|
|
86
|
-
export function debugPrint(base, message, apiKey) {
|
|
87
|
-
return fetch(`${base}/debug/print`, {
|
|
88
|
-
method: "POST",
|
|
89
|
-
headers: {
|
|
90
|
-
"X-API-Key": apiKey,
|
|
91
|
-
"Content-Type": "application/json"
|
|
92
|
-
},
|
|
93
|
-
body: JSON.stringify({ message })
|
|
94
|
-
}).then(parseResponse);
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Removes all blocks after a given height. Max number of blocks back from the current height is set by waves.db.max-rollback-depth, 2000 by default
|
|
98
|
-
* @param base
|
|
99
|
-
* @param height
|
|
100
|
-
* @param returnTransactionsToUtx
|
|
101
|
-
* @param apiKey
|
|
102
|
-
*/
|
|
103
|
-
export function debugRollback(base, height, returnTransactionsToUtx, apiKey) {
|
|
104
|
-
return fetch(`${base}/debug/rollback`, {
|
|
105
|
-
method: "POST",
|
|
106
|
-
headers: {
|
|
107
|
-
"X-API-Key": apiKey,
|
|
108
|
-
"Content-Type": "application/json"
|
|
109
|
-
},
|
|
110
|
-
body: JSON.stringify({
|
|
111
|
-
rollbackTo: height,
|
|
112
|
-
returnTransactionsToUtx
|
|
113
|
-
})
|
|
114
|
-
}).then(parseResponse);
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Rollback the state to the block with a given ID
|
|
118
|
-
* @param base
|
|
119
|
-
* @param height
|
|
120
|
-
* @param returnTransactionsToUtx
|
|
121
|
-
* @param apiKey
|
|
122
|
-
*/
|
|
123
|
-
export function debugRollbackTo(base, id, apiKey) {
|
|
124
|
-
return fetch(`${base}/debug/rollback-to/${id}`, {
|
|
125
|
-
method: "DELETE",
|
|
126
|
-
headers: {
|
|
127
|
-
"X-API-Key": apiKey,
|
|
128
|
-
"Content-Type": "application/json"
|
|
129
|
-
},
|
|
130
|
-
}).then(parseResponse);
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Regular address balance at the current height
|
|
134
|
-
* @param base
|
|
135
|
-
* @param apiKey
|
|
136
|
-
*/
|
|
137
|
-
export function debugState(base, apiKey) {
|
|
138
|
-
return fetch(`${base}/debug/state`, {
|
|
139
|
-
method: "GET",
|
|
140
|
-
headers: {
|
|
141
|
-
"X-API-Key": apiKey,
|
|
142
|
-
"Content-Type": "application/json"
|
|
143
|
-
},
|
|
144
|
-
}).then(parseResponse);
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Get state hash at height. Available only if node configuration contains waves.db.store-state-hashes = true option
|
|
148
|
-
* @param base
|
|
149
|
-
* @param height
|
|
150
|
-
*/
|
|
151
|
-
export function debugStateHash(base, height, options = Object.create(null)) {
|
|
152
|
-
return request({
|
|
153
|
-
base,
|
|
154
|
-
url: `/debug/stateHash/${height}`,
|
|
155
|
-
options
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Regular address balance at the height. Max number of blocks back from the current height is set by waves.db.max-rollback-depth, 2000 by default
|
|
160
|
-
* @param base
|
|
161
|
-
* @param height
|
|
162
|
-
* @param apiKey
|
|
163
|
-
*/
|
|
164
|
-
export function debugStateWaves(base, height, apiKey) {
|
|
165
|
-
return fetch(`${base}/debug/stateWaves/${height}`, {
|
|
166
|
-
method: "GET",
|
|
167
|
-
headers: {
|
|
168
|
-
"X-API-Key": apiKey,
|
|
169
|
-
"Content-Type": "application/json"
|
|
170
|
-
},
|
|
171
|
-
}).then(parseResponse);
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Validates a transaction and measures time spent in milliseconds. You should use the JSON transaction format with proofs
|
|
175
|
-
* @param base
|
|
176
|
-
* @param transaction
|
|
177
|
-
*/
|
|
178
|
-
export function debugValidate(base, transaction) {
|
|
179
|
-
return fetch(`${base}/debug/validate`, {
|
|
180
|
-
method: "POST",
|
|
181
|
-
headers: {
|
|
182
|
-
"Content-Type": "application/json"
|
|
183
|
-
},
|
|
184
|
-
body: transaction
|
|
185
|
-
}).then(parseResponse);
|
|
186
|
-
}
|
|
187
|
-
// @TODO need API key:
|
|
188
|
-
// GET /debug/stateWaves/{height}
|
|
189
|
-
// POST /debug/rollback
|
|
190
|
-
// DELETE /debug/rollback-to/{id}
|
|
191
|
-
// GET /debug/portfolios/{address}
|
|
192
|
-
// GET /debug/minerInfo
|
|
193
|
-
// GET /debug/historyInfo
|
|
194
|
-
// GET /debug/historyInfo
|
|
195
|
-
// GET /debug/info
|
|
196
|
-
// POST /debug/validate
|
|
197
|
-
// GET /debug/blocks/{howMany}
|
|
198
|
-
// POST /debug/blacklist
|
|
199
|
-
// POST /debug/print
|
|
200
|
-
// GET /debug/state
|
|
201
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{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BAAoB,MAAM,EAAE;QACjC,OAAO;KACV,CAAC,CAAA;AACN,CAAC;AAGD;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,MAAc,EAAE,MAAc;IACxE,OAAO,KAAK,CAAC,GAAG,IAAI,qBAAqB,MAAM,EAAE,EAAE;QAC/C,MAAM,EAAE,KAAK;QACb,OAAO,EAAE;YACL,WAAW,EAAE,MAAM;YACnB,cAAc,EAAE,kBAAkB;SACrC;KACJ,CAAC,CAAC,IAAI,CAAC,aAAa,CAA6C,CAAA;AACtE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,WAAmB;IAC3D,OAAO,KAAK,CAAC,GAAG,IAAI,iBAAiB,EAAE;QACnC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACL,cAAc,EAAE,kBAAkB;SACrC;QACD,IAAI,EAAE,WAAW;KACpB,CAAC,CAAC,IAAI,CAAC,aAAa,CAA+B,CAAA;AACxD,CAAC;AA2DD,sBAAsB;AACtB,iCAAiC;AACjC,uBAAuB;AACvB,iCAAiC;AACjC,kCAAkC;AAClC,uBAAuB;AACvB,yBAAyB;AACzB,yBAAyB;AACzB,kBAAkB;AAClB,uBAAuB;AACvB,8BAA8B;AAC9B,wBAAwB;AACxB,oBAAoB;AACpB,mBAAmB"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { TAssetDetails } from "../assets";
|
|
2
|
-
export declare function fetchEthAssetDetails(base: string, ethAssetId: string, options?: RequestInit): Promise<TAssetDetails>;
|
|
3
|
-
export declare function fetchEthAssetDetails(base: string, ethAssetId: Array<string>, options?: RequestInit): Promise<Array<TAssetDetails>>;
|
package/es/api-node/eth/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import request from "../../tools/request";
|
|
2
|
-
import { toArray } from "../../tools/utils";
|
|
3
|
-
import query from "../../tools/query";
|
|
4
|
-
export function fetchEthAssetDetails(base, ethAssetId) {
|
|
5
|
-
const id = toArray(ethAssetId);
|
|
6
|
-
return request({ base, url: `/eth/assets?${query({ id })}` }).then(list => Array.isArray(ethAssetId) ? list : list[0]);
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/eth/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAE1C,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,MAAM,mBAAmB,CAAC;AAItC,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,UAA6B;IAC5E,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;IAE9B,OAAO,OAAO,CAAuB,EAAC,IAAI,EAAE,GAAG,EAAE,eAAe,KAAK,CAAC,EAAC,EAAE,EAAC,CAAC,EAAE,EAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7I,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { TLong } from '../../interface';
|
|
2
|
-
/**
|
|
3
|
-
* GET /leasing/active/{address}
|
|
4
|
-
* Get all active leases for an address
|
|
5
|
-
*/
|
|
6
|
-
export declare function fetchActive(base: string, address: string, options?: RequestInit): Promise<Array<ILeaseInfo>>;
|
|
7
|
-
/**
|
|
8
|
-
* GET /leasing/info/
|
|
9
|
-
* Get lease transactions info.
|
|
10
|
-
*/
|
|
11
|
-
export declare function fetchLeasingInfo(base: string, ids: string[], options?: RequestInit): Promise<Array<ILeaseInfo>>;
|
|
12
|
-
export interface ILeaseInfo {
|
|
13
|
-
id: string;
|
|
14
|
-
originTransactionId: string;
|
|
15
|
-
sender: string;
|
|
16
|
-
recipient: string;
|
|
17
|
-
amount: TLong;
|
|
18
|
-
height: number;
|
|
19
|
-
status: string;
|
|
20
|
-
cancelHeight: number | null;
|
|
21
|
-
cancelTransactionId: string | null;
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import request from '../../tools/request';
|
|
2
|
-
/**
|
|
3
|
-
* GET /leasing/active/{address}
|
|
4
|
-
* Get all active leases for an address
|
|
5
|
-
*/
|
|
6
|
-
export function fetchActive(base, address, options = Object.create(null)) {
|
|
7
|
-
return request({ base, url: `/leasing/active/${address}`, options });
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* GET /leasing/info/
|
|
11
|
-
* Get lease transactions info.
|
|
12
|
-
*/
|
|
13
|
-
export function fetchLeasingInfo(base, ids, options = Object.create(null)) {
|
|
14
|
-
const searchParams = `{\"ids\":[${ids.map(id => `\"${id}\"`).join(',')}]}`;
|
|
15
|
-
return request({
|
|
16
|
-
base, url: `/leasing/info/`,
|
|
17
|
-
options: Object.assign(Object.assign({}, options), { body: searchParams, method: 'POST', headers: {
|
|
18
|
-
'Content-Type': 'application/json'
|
|
19
|
-
} })
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/leasing/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,OAAe,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACjG,OAAO,OAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,OAAO,EAAE,EAAE,OAAO,EAAC,CAAC,CAAC;AACvE,CAAC;AAGD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,GAAa,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACpG,MAAM,YAAY,GAAG,aAAa,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;IAE3E,OAAO,OAAO,CAAC;QACX,IAAI,EAAE,GAAG,EAAE,gBAAgB;QAAE,OAAO,kCAC7B,OAAO,KACV,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;gBACL,cAAc,EAAE,kBAAkB;aACrC,GACJ;KACJ,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare function fetchNodeStatus(base: string, options?: RequestInit): Promise<INodeStatus>;
|
|
2
|
-
export declare function fetchNodeVersion(base: string, options?: RequestInit): Promise<INodeVersion>;
|
|
3
|
-
export interface INodeStatus {
|
|
4
|
-
blockchainHeight: number;
|
|
5
|
-
stateHeight: number;
|
|
6
|
-
updatedTimestamp: number;
|
|
7
|
-
updatedDate: string;
|
|
8
|
-
}
|
|
9
|
-
export interface INodeVersion {
|
|
10
|
-
version: string;
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import request from '../../tools/request';
|
|
2
|
-
// @TODO: When correct API key
|
|
3
|
-
// POST /node/stop
|
|
4
|
-
export function fetchNodeStatus(base, options = Object.create(null)) {
|
|
5
|
-
return request({ base, url: '/node/status', options });
|
|
6
|
-
}
|
|
7
|
-
export function fetchNodeVersion(base, options = Object.create(null)) {
|
|
8
|
-
return request({ base, url: '/node/version', options });
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAE1C,8BAA8B;AAC9B,kBAAkB;AAElB,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACpF,OAAO,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACrF,OAAO,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,CAAC;AAC5D,CAAC"}
|