@waves/node-api-js 1.2.5-beta.6 → 1.2.6-cjs.0
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.js +2 -2
- package/cjs/api-node/activation/index.js.map +1 -1
- package/cjs/api-node/addresses/index.js +45 -54
- package/cjs/api-node/addresses/index.js.map +1 -1
- package/cjs/api-node/alias/index.js +5 -5
- package/cjs/api-node/alias/index.js.map +1 -1
- package/cjs/api-node/assets/index.js +60 -113
- package/cjs/api-node/assets/index.js.map +1 -1
- package/cjs/api-node/blocks/index.js +49 -60
- package/cjs/api-node/blocks/index.js.map +1 -1
- package/cjs/api-node/consensus/index.js +5 -6
- package/cjs/api-node/consensus/index.js.map +1 -1
- package/cjs/api-node/debug/index.js +14 -17
- package/cjs/api-node/debug/index.js.map +1 -1
- package/cjs/api-node/eth/index.js +5 -5
- package/cjs/api-node/eth/index.js.map +1 -1
- package/cjs/api-node/leasing/index.js +7 -19
- package/cjs/api-node/leasing/index.js.map +1 -1
- package/cjs/api-node/node/index.js +5 -7
- package/cjs/api-node/node/index.js.map +1 -1
- package/cjs/api-node/peers/index.js +13 -17
- package/cjs/api-node/peers/index.js.map +1 -1
- package/cjs/api-node/rewards/index.js +5 -6
- package/cjs/api-node/rewards/index.js.map +1 -1
- package/cjs/api-node/transactions/index.js +42 -82
- package/cjs/api-node/transactions/index.js.map +1 -1
- package/cjs/api-node/utils/index.js +22 -22
- package/cjs/api-node/utils/index.js.map +1 -1
- package/cjs/create.d.ts +51 -1
- package/cjs/create.js +59 -59
- package/cjs/create.js.map +1 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +5 -5
- package/cjs/index.js.map +1 -1
- package/cjs/interface.js +2 -6
- package/cjs/interface.js.map +1 -1
- package/cjs/tools/adresses/availableSponsoredBalances.js +9 -9
- package/cjs/tools/adresses/availableSponsoredBalances.js.map +1 -1
- package/cjs/tools/adresses/ethAddress2waves.js +16 -29
- package/cjs/tools/adresses/ethAddress2waves.js.map +1 -1
- package/cjs/tools/adresses/getAssetIdListByTx.js +15 -36
- package/cjs/tools/adresses/getAssetIdListByTx.js.map +1 -1
- package/cjs/tools/adresses/getAssetsByTransaction.js +4 -4
- 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.js +56 -85
- package/cjs/tools/adresses/watch.js.map +1 -1
- package/cjs/tools/adresses/wavesAddress2eth.js +4 -4
- package/cjs/tools/adresses/wavesAddress2eth.js.map +1 -1
- package/cjs/tools/assets/wavesAsset2eth.js +4 -4
- package/cjs/tools/assets/wavesAsset2eth.js.map +1 -1
- package/cjs/tools/blocks/detectInterval.js +4 -4
- package/cjs/tools/blocks/detectInterval.js.map +1 -1
- package/cjs/tools/blocks/getNetworkByte.js +6 -6
- 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 +13 -36
- package/cjs/tools/blocks/waitHeight.js.map +1 -1
- package/cjs/tools/parse.js +2 -2
- package/cjs/tools/parse.js.map +1 -1
- package/cjs/tools/query.js +8 -34
- package/cjs/tools/query.js.map +1 -1
- package/cjs/tools/request.d.ts +1 -1
- package/cjs/tools/request.js +7 -19
- package/cjs/tools/request.js.map +1 -1
- package/cjs/tools/stringify.js +3 -3
- package/cjs/tools/stringify.js.map +1 -1
- package/cjs/tools/transactions/broadcast.js +18 -29
- package/cjs/tools/transactions/broadcast.js.map +1 -1
- package/cjs/tools/transactions/ethTxId2waves.js +5 -2
- package/cjs/tools/transactions/ethTxId2waves.js.map +1 -1
- package/cjs/tools/transactions/transactions.d.ts +5 -5
- package/cjs/tools/transactions/transactions.js +57 -63
- package/cjs/tools/transactions/transactions.js.map +1 -1
- package/cjs/tools/transactions/wait.js +16 -16
- package/cjs/tools/transactions/wait.js.map +1 -1
- package/cjs/tools/utils.js +30 -63
- package/cjs/tools/utils.js.map +1 -1
- package/dist/node-api.js +589 -45
- package/dist/node-api.min.js +5 -5
- package/es/create.d.ts +51 -1
- package/es/index.d.ts +1 -0
- package/es/index.js.map +1 -1
- package/es/tools/request.d.ts +1 -1
- package/es/tools/request.js +1 -1
- package/es/tools/request.js.map +1 -1
- package/es/tools/transactions/ethTxId2waves.js +5 -2
- package/es/tools/transactions/ethTxId2waves.js.map +1 -1
- package/es/tools/transactions/transactions.d.ts +5 -5
- package/es/tools/transactions/transactions.js +12 -4
- package/es/tools/transactions/transactions.js.map +1 -1
- package/package.json +4 -4
- package/cjs/tools/adresses/ethTxId2waves.d.ts +0 -1
- package/cjs/tools/adresses/ethTxId2waves.js +0 -8
- package/cjs/tools/adresses/ethTxId2waves.js.map +0 -1
- package/es/tools/adresses/eth2waves.d.ts +0 -1
- package/es/tools/adresses/eth2waves.js +0 -19
- package/es/tools/adresses/eth2waves.js.map +0 -1
- package/es/tools/adresses/ethTxId2waves.d.ts +0 -1
- package/es/tools/adresses/ethTxId2waves.js +0 -5
- package/es/tools/adresses/ethTxId2waves.js.map +0 -1
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchHeightByTimestamp = exports.fetchHeight = exports.fetchDelay = exports.fetchLast = exports.fetchBlocksByAddress = exports.fetchFirst = exports.fetchBlockById = exports.fetchSeq = exports.fetchBlockAt = exports.fetchHeadersById = exports.fetchHeadersAt = exports.fetchHeightById = exports.fetchHeadersLast = exports.fetchHeadersSeq = void 0;
|
|
7
|
-
|
|
7
|
+
const request_1 = __importDefault(require("../../tools/request"));
|
|
8
8
|
/**
|
|
9
9
|
* GET /blocks/headers/seq/{from}/{to}
|
|
10
10
|
* Get block headers at specified heights
|
|
@@ -12,12 +12,11 @@ var request_1 = __importDefault(require("../../tools/request"));
|
|
|
12
12
|
* @param from
|
|
13
13
|
* @param to
|
|
14
14
|
*/
|
|
15
|
-
function fetchHeadersSeq(base, from, to, options) {
|
|
16
|
-
if (options === void 0) { options = Object.create(null); }
|
|
15
|
+
function fetchHeadersSeq(base, from, to, options = Object.create(null)) {
|
|
17
16
|
return request_1.default({
|
|
18
|
-
base
|
|
19
|
-
url:
|
|
20
|
-
options
|
|
17
|
+
base,
|
|
18
|
+
url: `/blocks/headers/seq/${from}/${to}`,
|
|
19
|
+
options
|
|
21
20
|
});
|
|
22
21
|
}
|
|
23
22
|
exports.fetchHeadersSeq = fetchHeadersSeq;
|
|
@@ -26,12 +25,11 @@ exports.fetchHeadersSeq = fetchHeadersSeq;
|
|
|
26
25
|
* Last block header
|
|
27
26
|
* @param base
|
|
28
27
|
*/
|
|
29
|
-
function fetchHeadersLast(base, options) {
|
|
30
|
-
if (options === void 0) { options = Object.create(null); }
|
|
28
|
+
function fetchHeadersLast(base, options = Object.create(null)) {
|
|
31
29
|
return request_1.default({
|
|
32
|
-
base
|
|
33
|
-
url:
|
|
34
|
-
options
|
|
30
|
+
base,
|
|
31
|
+
url: `/blocks/headers/last`,
|
|
32
|
+
options
|
|
35
33
|
});
|
|
36
34
|
}
|
|
37
35
|
exports.fetchHeadersLast = fetchHeadersLast;
|
|
@@ -43,8 +41,8 @@ exports.fetchHeadersLast = fetchHeadersLast;
|
|
|
43
41
|
*/
|
|
44
42
|
function fetchHeightById(base, id) {
|
|
45
43
|
return request_1.default({
|
|
46
|
-
base
|
|
47
|
-
url:
|
|
44
|
+
base,
|
|
45
|
+
url: `/blocks/height/${id}`
|
|
48
46
|
});
|
|
49
47
|
}
|
|
50
48
|
exports.fetchHeightById = fetchHeightById;
|
|
@@ -54,12 +52,11 @@ exports.fetchHeightById = fetchHeightById;
|
|
|
54
52
|
* @param base
|
|
55
53
|
* @param height
|
|
56
54
|
*/
|
|
57
|
-
function fetchHeadersAt(base, height, options) {
|
|
58
|
-
if (options === void 0) { options = Object.create(null); }
|
|
55
|
+
function fetchHeadersAt(base, height, options = Object.create(null)) {
|
|
59
56
|
return request_1.default({
|
|
60
|
-
base
|
|
61
|
-
url:
|
|
62
|
-
options
|
|
57
|
+
base,
|
|
58
|
+
url: `/blocks/headers/at/${height}`,
|
|
59
|
+
options
|
|
63
60
|
});
|
|
64
61
|
}
|
|
65
62
|
exports.fetchHeadersAt = fetchHeadersAt;
|
|
@@ -69,12 +66,11 @@ exports.fetchHeadersAt = fetchHeadersAt;
|
|
|
69
66
|
* @param base
|
|
70
67
|
* @param height
|
|
71
68
|
*/
|
|
72
|
-
function fetchHeadersById(base, id, options) {
|
|
73
|
-
if (options === void 0) { options = Object.create(null); }
|
|
69
|
+
function fetchHeadersById(base, id, options = Object.create(null)) {
|
|
74
70
|
return request_1.default({
|
|
75
|
-
base
|
|
76
|
-
url:
|
|
77
|
-
options
|
|
71
|
+
base,
|
|
72
|
+
url: `/blocks/headers/${id}`,
|
|
73
|
+
options
|
|
78
74
|
});
|
|
79
75
|
}
|
|
80
76
|
exports.fetchHeadersById = fetchHeadersById;
|
|
@@ -84,12 +80,11 @@ exports.fetchHeadersById = fetchHeadersById;
|
|
|
84
80
|
* @param base
|
|
85
81
|
* @param height
|
|
86
82
|
*/
|
|
87
|
-
function fetchBlockAt(base, height, options) {
|
|
88
|
-
if (options === void 0) { options = Object.create(null); }
|
|
83
|
+
function fetchBlockAt(base, height, options = Object.create(null)) {
|
|
89
84
|
return request_1.default({
|
|
90
|
-
base
|
|
91
|
-
url:
|
|
92
|
-
options
|
|
85
|
+
base,
|
|
86
|
+
url: `/blocks/at/${height}`,
|
|
87
|
+
options
|
|
93
88
|
});
|
|
94
89
|
}
|
|
95
90
|
exports.fetchBlockAt = fetchBlockAt;
|
|
@@ -100,12 +95,11 @@ exports.fetchBlockAt = fetchBlockAt;
|
|
|
100
95
|
* @param from
|
|
101
96
|
* @param to
|
|
102
97
|
*/
|
|
103
|
-
function fetchSeq(base, from, to, options) {
|
|
104
|
-
if (options === void 0) { options = Object.create(null); }
|
|
98
|
+
function fetchSeq(base, from, to, options = Object.create(null)) {
|
|
105
99
|
return request_1.default({
|
|
106
|
-
base
|
|
107
|
-
url:
|
|
108
|
-
options
|
|
100
|
+
base,
|
|
101
|
+
url: `/blocks/seq/${from}/${to}`,
|
|
102
|
+
options
|
|
109
103
|
});
|
|
110
104
|
}
|
|
111
105
|
exports.fetchSeq = fetchSeq;
|
|
@@ -115,12 +109,11 @@ exports.fetchSeq = fetchSeq;
|
|
|
115
109
|
* @param base
|
|
116
110
|
* @param id
|
|
117
111
|
*/
|
|
118
|
-
function fetchBlockById(base, id, options) {
|
|
119
|
-
if (options === void 0) { options = Object.create(null); }
|
|
112
|
+
function fetchBlockById(base, id, options = Object.create(null)) {
|
|
120
113
|
return request_1.default({
|
|
121
|
-
base
|
|
122
|
-
url:
|
|
123
|
-
options
|
|
114
|
+
base,
|
|
115
|
+
url: `/blocks/${id}`,
|
|
116
|
+
options
|
|
124
117
|
});
|
|
125
118
|
}
|
|
126
119
|
exports.fetchBlockById = fetchBlockById;
|
|
@@ -129,12 +122,11 @@ exports.fetchBlockById = fetchBlockById;
|
|
|
129
122
|
* Get genesis block
|
|
130
123
|
* @param base
|
|
131
124
|
*/
|
|
132
|
-
function fetchFirst(base, options) {
|
|
133
|
-
if (options === void 0) { options = Object.create(null); }
|
|
125
|
+
function fetchFirst(base, options = Object.create(null)) {
|
|
134
126
|
return request_1.default({
|
|
135
|
-
base
|
|
136
|
-
url:
|
|
137
|
-
options
|
|
127
|
+
base,
|
|
128
|
+
url: `/blocks/first`,
|
|
129
|
+
options
|
|
138
130
|
});
|
|
139
131
|
}
|
|
140
132
|
exports.fetchFirst = fetchFirst;
|
|
@@ -146,12 +138,11 @@ exports.fetchFirst = fetchFirst;
|
|
|
146
138
|
* @param from
|
|
147
139
|
* @param to
|
|
148
140
|
*/
|
|
149
|
-
function fetchBlocksByAddress(base, address, from, to, options) {
|
|
150
|
-
if (options === void 0) { options = Object.create(null); }
|
|
141
|
+
function fetchBlocksByAddress(base, address, from, to, options = Object.create(null)) {
|
|
151
142
|
return request_1.default({
|
|
152
|
-
base
|
|
153
|
-
url:
|
|
154
|
-
options
|
|
143
|
+
base,
|
|
144
|
+
url: `/blocks/address/${address}/${from}/${to}`,
|
|
145
|
+
options
|
|
155
146
|
});
|
|
156
147
|
}
|
|
157
148
|
exports.fetchBlocksByAddress = fetchBlocksByAddress;
|
|
@@ -160,12 +151,11 @@ exports.fetchBlocksByAddress = fetchBlocksByAddress;
|
|
|
160
151
|
* Last block
|
|
161
152
|
* @param base
|
|
162
153
|
*/
|
|
163
|
-
function fetchLast(base, options) {
|
|
164
|
-
if (options === void 0) { options = Object.create(null); }
|
|
154
|
+
function fetchLast(base, options = Object.create(null)) {
|
|
165
155
|
return request_1.default({
|
|
166
|
-
base
|
|
156
|
+
base,
|
|
167
157
|
url: '/blocks/last',
|
|
168
|
-
options
|
|
158
|
+
options
|
|
169
159
|
});
|
|
170
160
|
}
|
|
171
161
|
exports.fetchLast = fetchLast;
|
|
@@ -178,8 +168,8 @@ exports.fetchLast = fetchLast;
|
|
|
178
168
|
*/
|
|
179
169
|
function fetchDelay(base, id, blockNum) {
|
|
180
170
|
return request_1.default({
|
|
181
|
-
base
|
|
182
|
-
url:
|
|
171
|
+
base,
|
|
172
|
+
url: `/blocks/delay/${id}/${blockNum}`
|
|
183
173
|
});
|
|
184
174
|
}
|
|
185
175
|
exports.fetchDelay = fetchDelay;
|
|
@@ -189,7 +179,7 @@ exports.fetchDelay = fetchDelay;
|
|
|
189
179
|
*/
|
|
190
180
|
function fetchHeight(base) {
|
|
191
181
|
return request_1.default({
|
|
192
|
-
base
|
|
182
|
+
base,
|
|
193
183
|
url: '/blocks/height'
|
|
194
184
|
});
|
|
195
185
|
}
|
|
@@ -198,12 +188,11 @@ exports.fetchHeight = fetchHeight;
|
|
|
198
188
|
* GET /blocks/heightByTimestamp
|
|
199
189
|
* @param base
|
|
200
190
|
*/
|
|
201
|
-
function fetchHeightByTimestamp(base, timestamp, options) {
|
|
202
|
-
if (options === void 0) { options = Object.create(null); }
|
|
191
|
+
function fetchHeightByTimestamp(base, timestamp, options = Object.create(null)) {
|
|
203
192
|
return request_1.default({
|
|
204
|
-
base
|
|
205
|
-
url:
|
|
206
|
-
options
|
|
193
|
+
base,
|
|
194
|
+
url: `/blocks/heightByTimestamp/${timestamp}`,
|
|
195
|
+
options
|
|
207
196
|
});
|
|
208
197
|
}
|
|
209
198
|
exports.fetchHeightByTimestamp = fetchHeightByTimestamp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/blocks/index.ts"],"names":[],"mappings":";;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/blocks/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -4,16 +4,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchConsensusAlgo = exports.fetchBasetarget = exports.fetchGeneratingBalance = void 0;
|
|
7
|
-
|
|
7
|
+
const request_1 = __importDefault(require("../../tools/request"));
|
|
8
8
|
/**
|
|
9
9
|
* GET /consensus/generatingbalance/{address}
|
|
10
10
|
* Generating balance
|
|
11
11
|
* @param base
|
|
12
12
|
* @param address
|
|
13
13
|
*/
|
|
14
|
-
function fetchGeneratingBalance(base, address, options) {
|
|
15
|
-
|
|
16
|
-
return request_1.default({ base: base, url: "/consensus/generatingbalance/" + address });
|
|
14
|
+
function fetchGeneratingBalance(base, address, options = Object.create(null)) {
|
|
15
|
+
return request_1.default({ base, url: `/consensus/generatingbalance/${address}` });
|
|
17
16
|
}
|
|
18
17
|
exports.fetchGeneratingBalance = fetchGeneratingBalance;
|
|
19
18
|
/**
|
|
@@ -22,7 +21,7 @@ exports.fetchGeneratingBalance = fetchGeneratingBalance;
|
|
|
22
21
|
* @param base
|
|
23
22
|
*/
|
|
24
23
|
function fetchBasetarget(base) {
|
|
25
|
-
return request_1.default({ base
|
|
24
|
+
return request_1.default({ base, url: '/consensus/basetarget' });
|
|
26
25
|
}
|
|
27
26
|
exports.fetchBasetarget = fetchBasetarget;
|
|
28
27
|
/**
|
|
@@ -31,7 +30,7 @@ exports.fetchBasetarget = fetchBasetarget;
|
|
|
31
30
|
* @param base
|
|
32
31
|
*/
|
|
33
32
|
function fetchConsensusAlgo(base) {
|
|
34
|
-
return request_1.default({ base
|
|
33
|
+
return request_1.default({ base, url: '/consensus/algo' });
|
|
35
34
|
}
|
|
36
35
|
exports.fetchConsensusAlgo = fetchConsensusAlgo;
|
|
37
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/consensus/index.ts"],"names":[],"mappings":";;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/consensus/index.ts"],"names":[],"mappings":";;;;;;AACA,kEAA0C;AAE1C;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,IAAY,EAAE,OAAe,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5G,OAAO,iBAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,gCAAgC,OAAO,EAAE,EAAC,CAAC,CAAC;AAC3E,CAAC;AAFD,wDAEC;AAED;;;;GAIG;AACH,SAAgB,eAAe,CAAC,IAAY;IACxC,OAAO,iBAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,uBAAuB,EAAC,CAAC,CAAC;AACzD,CAAC;AAFD,0CAEC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC3C,OAAO,iBAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,iBAAiB,EAAC,CAAC,CAAC;AACnD,CAAC;AAFD,gDAEC"}
|
|
@@ -4,19 +4,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchStateChangesByTxId = exports.fetchStateChangesByAddress = exports.fetchBalanceHistory = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
+
const query_1 = __importDefault(require("../../tools/query"));
|
|
9
9
|
/**
|
|
10
10
|
* Waves balance history
|
|
11
11
|
* @param base
|
|
12
12
|
* @param address
|
|
13
13
|
*/
|
|
14
|
-
function fetchBalanceHistory(base, address, options) {
|
|
15
|
-
if (options === void 0) { options = Object.create(null); }
|
|
14
|
+
function fetchBalanceHistory(base, address, options = Object.create(null)) {
|
|
16
15
|
return request_1.default({
|
|
17
|
-
base
|
|
18
|
-
url:
|
|
19
|
-
options
|
|
16
|
+
base,
|
|
17
|
+
url: `/debug/balances/history/${address}`,
|
|
18
|
+
options
|
|
20
19
|
});
|
|
21
20
|
}
|
|
22
21
|
exports.fetchBalanceHistory = fetchBalanceHistory;
|
|
@@ -27,12 +26,11 @@ exports.fetchBalanceHistory = fetchBalanceHistory;
|
|
|
27
26
|
* @param limit
|
|
28
27
|
* @param after
|
|
29
28
|
*/
|
|
30
|
-
function fetchStateChangesByAddress(base, address, limit, after, options) {
|
|
31
|
-
if (options === void 0) { options = Object.create(null); }
|
|
29
|
+
function fetchStateChangesByAddress(base, address, limit, after, options = Object.create(null)) {
|
|
32
30
|
return request_1.default({
|
|
33
|
-
base
|
|
34
|
-
url:
|
|
35
|
-
options
|
|
31
|
+
base,
|
|
32
|
+
url: `/debug/stateChanges/address/${address}/limit/${limit}${query_1.default({ after })}`,
|
|
33
|
+
options
|
|
36
34
|
});
|
|
37
35
|
}
|
|
38
36
|
exports.fetchStateChangesByAddress = fetchStateChangesByAddress;
|
|
@@ -41,12 +39,11 @@ exports.fetchStateChangesByAddress = fetchStateChangesByAddress;
|
|
|
41
39
|
* @param base
|
|
42
40
|
* @param txId
|
|
43
41
|
*/
|
|
44
|
-
function fetchStateChangesByTxId(base, txId, options) {
|
|
45
|
-
if (options === void 0) { options = Object.create(null); }
|
|
42
|
+
function fetchStateChangesByTxId(base, txId, options = Object.create(null)) {
|
|
46
43
|
return request_1.default({
|
|
47
|
-
base
|
|
48
|
-
url:
|
|
49
|
-
options
|
|
44
|
+
base,
|
|
45
|
+
url: `/debug/stateChanges/info/${txId}`,
|
|
46
|
+
options
|
|
50
47
|
});
|
|
51
48
|
}
|
|
52
49
|
exports.fetchStateChangesByTxId = fetchStateChangesByTxId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/debug/index.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/debug/index.ts"],"names":[],"mappings":";;;;;;AAAA,kEAA0C;AAE1C,8DAAsC;AAGtC;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,IAAY,EAAE,OAAe,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACzG,OAAO,iBAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,2BAA2B,OAAO,EAAE;QACzC,OAAO;KACV,CAAC,CAAC;AACP,CAAC;AAND,kDAMC;AAmED;;;;;;GAMG;AACH,SAAgB,0BAA0B,CACtC,IAAY,EACZ,OAAe,EACf,KAAa,EACb,KAAc,EACd,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAE1C,OAAO,iBAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,+BAA+B,OAAO,UAAU,KAAK,GAAG,eAAK,CAAC,EAAC,KAAK,EAAC,CAAC,EAAE;QAC7E,OAAO;KACV,CAAC,CAAC;AACP,CAAC;AAZD,gEAYC;AAGD;;;;GAIG;AACH,SAAgB,uBAAuB,CAAC,IAAY,EAAE,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC1G,OAAO,iBAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,4BAA4B,IAAI,EAAE;QACvC,OAAO;KACV,CAAC,CAAC;AACP,CAAC;AAND,0DAMC;AAED,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"}
|
|
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchEthAssetDetails = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
+
const utils_1 = require("../../tools/utils");
|
|
9
|
+
const query_1 = __importDefault(require("../../tools/query"));
|
|
10
10
|
function fetchEthAssetDetails(base, ethAssetId) {
|
|
11
|
-
|
|
12
|
-
return request_1.default({ base
|
|
11
|
+
const id = utils_1.toArray(ethAssetId);
|
|
12
|
+
return request_1.default({ base, url: `/eth/assets?${query_1.default({ id })}` }).then(list => Array.isArray(ethAssetId) ? list : list[0]);
|
|
13
13
|
}
|
|
14
14
|
exports.fetchEthAssetDetails = fetchEthAssetDetails;
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/eth/index.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/eth/index.ts"],"names":[],"mappings":";;;;;;AAAA,kEAA0C;AAE1C,6CAA0C;AAC1C,8DAAsC;AAItC,SAAgB,oBAAoB,CAAC,IAAY,EAAE,UAA6B;IAC5E,MAAM,EAAE,GAAG,eAAO,CAAC,UAAU,CAAC,CAAA;IAE9B,OAAO,iBAAO,CAAuB,EAAC,IAAI,EAAE,GAAG,EAAE,eAAe,eAAK,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;AAJD,oDAIC"}
|
|
@@ -1,39 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
6
|
exports.fetchLeasingInfo = exports.fetchActive = void 0;
|
|
18
|
-
|
|
7
|
+
const request_1 = __importDefault(require("../../tools/request"));
|
|
19
8
|
/**
|
|
20
9
|
* GET /leasing/active/{address}
|
|
21
10
|
* Get all active leases for an address
|
|
22
11
|
*/
|
|
23
|
-
function fetchActive(base, address, options) {
|
|
24
|
-
|
|
25
|
-
return request_1.default({ base: base, url: "/leasing/active/" + address, options: options });
|
|
12
|
+
function fetchActive(base, address, options = Object.create(null)) {
|
|
13
|
+
return request_1.default({ base, url: `/leasing/active/${address}`, options });
|
|
26
14
|
}
|
|
27
15
|
exports.fetchActive = fetchActive;
|
|
28
16
|
/**
|
|
29
17
|
* GET /leasing/info/
|
|
30
18
|
* Get lease transactions info.
|
|
31
19
|
*/
|
|
32
|
-
function fetchLeasingInfo(base, ids, options) {
|
|
33
|
-
|
|
34
|
-
var searchParams = "{\"ids\":[" + ids.map(function (id) { return "\"" + id + "\""; }).join(',') + "]}";
|
|
20
|
+
function fetchLeasingInfo(base, ids, options = Object.create(null)) {
|
|
21
|
+
const searchParams = `{\"ids\":[${ids.map(id => `\"${id}\"`).join(',')}]}`;
|
|
35
22
|
return request_1.default({
|
|
36
|
-
base
|
|
23
|
+
base, url: `/leasing/info/`,
|
|
24
|
+
options: Object.assign(Object.assign({}, options), { body: searchParams, method: 'POST', headers: {
|
|
37
25
|
'Content-Type': 'application/json'
|
|
38
26
|
} })
|
|
39
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/leasing/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/leasing/index.ts"],"names":[],"mappings":";;;;;;AACA,kEAA0C;AAG1C;;;GAGG;AACH,SAAgB,WAAW,CAAC,IAAY,EAAE,OAAe,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACjG,OAAO,iBAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,OAAO,EAAE,EAAE,OAAO,EAAC,CAAC,CAAC;AACvE,CAAC;AAFD,kCAEC;AAGD;;;GAGG;AACH,SAAgB,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,iBAAO,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;AAbD,4CAaC"}
|
|
@@ -4,17 +4,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchNodeVersion = exports.fetchNodeStatus = void 0;
|
|
7
|
-
|
|
7
|
+
const request_1 = __importDefault(require("../../tools/request"));
|
|
8
8
|
// @TODO: When correct API key
|
|
9
9
|
// POST /node/stop
|
|
10
|
-
function fetchNodeStatus(base, options) {
|
|
11
|
-
|
|
12
|
-
return request_1.default({ base: base, url: '/node/status', options: options });
|
|
10
|
+
function fetchNodeStatus(base, options = Object.create(null)) {
|
|
11
|
+
return request_1.default({ base, url: '/node/status', options });
|
|
13
12
|
}
|
|
14
13
|
exports.fetchNodeStatus = fetchNodeStatus;
|
|
15
|
-
function fetchNodeVersion(base, options) {
|
|
16
|
-
|
|
17
|
-
return request_1.default({ base: base, url: '/node/version', options: options });
|
|
14
|
+
function fetchNodeVersion(base, options = Object.create(null)) {
|
|
15
|
+
return request_1.default({ base, url: '/node/version', options });
|
|
18
16
|
}
|
|
19
17
|
exports.fetchNodeVersion = fetchNodeVersion;
|
|
20
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/node/index.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/node/index.ts"],"names":[],"mappings":";;;;;;AAAA,kEAA0C;AAE1C,8BAA8B;AAC9B,kBAAkB;AAElB,SAAgB,eAAe,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACpF,OAAO,iBAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC,CAAC;AAC3D,CAAC;AAFD,0CAEC;AAED,SAAgB,gBAAgB,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACrF,OAAO,iBAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,CAAC;AAC5D,CAAC;AAFD,4CAEC"}
|
|
@@ -4,17 +4,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchSuspended = exports.fetchBlackListed = exports.fetchConnected = exports.fetchAll = void 0;
|
|
7
|
-
|
|
7
|
+
const request_1 = __importDefault(require("../../tools/request"));
|
|
8
8
|
/**
|
|
9
9
|
* GET /peers/all
|
|
10
10
|
* Peer list
|
|
11
11
|
*/
|
|
12
|
-
function fetchAll(base, options) {
|
|
13
|
-
if (options === void 0) { options = Object.create(null); }
|
|
12
|
+
function fetchAll(base, options = Object.create(null)) {
|
|
14
13
|
return request_1.default({
|
|
15
|
-
base
|
|
14
|
+
base,
|
|
16
15
|
url: '/peers/all',
|
|
17
|
-
options
|
|
16
|
+
options
|
|
18
17
|
});
|
|
19
18
|
}
|
|
20
19
|
exports.fetchAll = fetchAll;
|
|
@@ -22,12 +21,11 @@ exports.fetchAll = fetchAll;
|
|
|
22
21
|
* GET /peers/connected
|
|
23
22
|
* Connected peers list
|
|
24
23
|
*/
|
|
25
|
-
function fetchConnected(base, options) {
|
|
26
|
-
if (options === void 0) { options = Object.create(null); }
|
|
24
|
+
function fetchConnected(base, options = Object.create(null)) {
|
|
27
25
|
return request_1.default({
|
|
28
|
-
base
|
|
26
|
+
base,
|
|
29
27
|
url: '/peers/connected',
|
|
30
|
-
options
|
|
28
|
+
options
|
|
31
29
|
});
|
|
32
30
|
}
|
|
33
31
|
exports.fetchConnected = fetchConnected;
|
|
@@ -35,12 +33,11 @@ exports.fetchConnected = fetchConnected;
|
|
|
35
33
|
* GET /peers/blacklisted
|
|
36
34
|
* Blacklisted peers list
|
|
37
35
|
*/
|
|
38
|
-
function fetchBlackListed(base, options) {
|
|
39
|
-
if (options === void 0) { options = Object.create(null); }
|
|
36
|
+
function fetchBlackListed(base, options = Object.create(null)) {
|
|
40
37
|
return request_1.default({
|
|
41
|
-
base
|
|
38
|
+
base,
|
|
42
39
|
url: '/peers/blacklisted',
|
|
43
|
-
options
|
|
40
|
+
options
|
|
44
41
|
});
|
|
45
42
|
}
|
|
46
43
|
exports.fetchBlackListed = fetchBlackListed;
|
|
@@ -48,12 +45,11 @@ exports.fetchBlackListed = fetchBlackListed;
|
|
|
48
45
|
* GET /peers/suspended
|
|
49
46
|
* Suspended peers list
|
|
50
47
|
*/
|
|
51
|
-
function fetchSuspended(base, options) {
|
|
52
|
-
if (options === void 0) { options = Object.create(null); }
|
|
48
|
+
function fetchSuspended(base, options = Object.create(null)) {
|
|
53
49
|
return request_1.default({
|
|
54
|
-
base
|
|
50
|
+
base,
|
|
55
51
|
url: '/peers/suspended',
|
|
56
|
-
options
|
|
52
|
+
options
|
|
57
53
|
});
|
|
58
54
|
}
|
|
59
55
|
exports.fetchSuspended = fetchSuspended;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/peers/index.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/peers/index.ts"],"names":[],"mappings":";;;;;;AAAA,kEAA0C;AAG1C;;;GAGG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC7E,OAAO,iBAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,YAAY;QACjB,OAAO;KACV,CAAC,CAAA;AACN,CAAC;AAND,4BAMC;AAGD;;;GAGG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACnF,OAAO,iBAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,kBAAkB;QACvB,OAAO;KACV,CAAC,CAAA;AACN,CAAC;AAND,wCAMC;AAED;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACrF,OAAO,iBAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,oBAAoB;QACzB,OAAO;KACV,CAAC,CAAA;AACN,CAAC;AAND,4CAMC;AAED;;;GAGG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACnF,OAAO,iBAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,kBAAkB;QACvB,OAAO;KACV,CAAC,CAAA;AACN,CAAC;AAND,wCAMC"}
|
|
@@ -4,17 +4,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchRewards = void 0;
|
|
7
|
-
|
|
7
|
+
const request_1 = __importDefault(require("../../tools/request"));
|
|
8
8
|
/**
|
|
9
9
|
* GET /blockchain/rewards
|
|
10
10
|
* Current reward status
|
|
11
11
|
*/
|
|
12
|
-
function fetchRewards(base, height, options) {
|
|
13
|
-
if (options === void 0) { options = Object.create(null); }
|
|
12
|
+
function fetchRewards(base, height, options = Object.create(null)) {
|
|
14
13
|
return request_1.default({
|
|
15
|
-
base
|
|
16
|
-
url: height ?
|
|
17
|
-
options
|
|
14
|
+
base,
|
|
15
|
+
url: height ? `/blockchain/rewards/${height}` : '/blockchain/rewards',
|
|
16
|
+
options
|
|
18
17
|
});
|
|
19
18
|
}
|
|
20
19
|
exports.fetchRewards = fetchRewards;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/rewards/index.ts"],"names":[],"mappings":";;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/rewards/index.ts"],"names":[],"mappings":";;;;;;AACA,kEAA0C;AAG1C;;;GAGG;AACH,SAAgB,YAAY,CAAC,IAAY,EAAE,MAAe,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAClG,OAAO,iBAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,uBAAuB,MAAM,EAAE,CAAC,CAAC,CAAC,qBAAqB;QACrE,OAAO;KACV,CAAC,CAAC;AACP,CAAC;AAND,oCAMC"}
|