@waves/node-api-js 1.2.5-beta.15 → 1.2.5-beta.18
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 +54 -45
- 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 +118 -63
- package/cjs/api-node/assets/index.js.map +1 -1
- package/cjs/api-node/blocks/index.js +60 -49
- package/cjs/api-node/blocks/index.js.map +1 -1
- package/cjs/api-node/consensus/index.js +6 -5
- package/cjs/api-node/consensus/index.js.map +1 -1
- package/cjs/api-node/debug/index.js +17 -14
- 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 +19 -7
- package/cjs/api-node/leasing/index.js.map +1 -1
- package/cjs/api-node/node/index.js +7 -5
- package/cjs/api-node/node/index.js.map +1 -1
- package/cjs/api-node/peers/index.js +17 -13
- package/cjs/api-node/peers/index.js.map +1 -1
- package/cjs/api-node/rewards/index.js +6 -5
- package/cjs/api-node/rewards/index.js.map +1 -1
- package/cjs/api-node/transactions/index.js +82 -42
- 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 +6 -31
- package/cjs/create.js +59 -59
- package/cjs/create.js.map +1 -1
- package/cjs/index.js +5 -5
- package/cjs/index.js.map +1 -1
- package/cjs/interface.js +6 -2
- 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 +29 -16
- package/cjs/tools/adresses/ethAddress2waves.js.map +1 -1
- package/cjs/tools/adresses/getAssetIdListByTx.js +36 -15
- 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 +85 -56
- 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 +36 -13
- 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 +34 -8
- package/cjs/tools/query.js.map +1 -1
- package/cjs/tools/request.d.ts +1 -1
- package/cjs/tools/request.js +19 -7
- 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 +29 -18
- 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/transactions.d.ts +2 -2
- package/cjs/tools/transactions/transactions.js +66 -52
- 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 +63 -30
- package/cjs/tools/utils.js.map +1 -1
- package/dist/0.node-api.js +467 -0
- package/dist/node-api.js +42 -573
- package/dist/node-api.min.js +5 -5
- package/dist/node-api.min.js.LICENSE.txt +17 -0
- package/dist/node_fs-node_path.node-api.js +23 -0
- package/dist/vendors-node_modules_node-fetch_src_utils_multipart-parser_js.node-api.js +599 -0
- package/es/create.d.ts +6 -31
- 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/transactions.d.ts +2 -2
- package/es/tools/transactions/transactions.js +1 -1
- package/es/tools/transactions/transactions.js.map +1 -1
- package/package.json +4 -4
|
@@ -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
|
+
var 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,11 +12,12 @@ const request_1 = __importDefault(require("../../tools/request"));
|
|
|
12
12
|
* @param from
|
|
13
13
|
* @param to
|
|
14
14
|
*/
|
|
15
|
-
function fetchHeadersSeq(base, from, to, options
|
|
15
|
+
function fetchHeadersSeq(base, from, to, options) {
|
|
16
|
+
if (options === void 0) { options = Object.create(null); }
|
|
16
17
|
return request_1.default({
|
|
17
|
-
base,
|
|
18
|
-
url:
|
|
19
|
-
options
|
|
18
|
+
base: base,
|
|
19
|
+
url: "/blocks/headers/seq/" + from + "/" + to,
|
|
20
|
+
options: options
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
23
|
exports.fetchHeadersSeq = fetchHeadersSeq;
|
|
@@ -25,11 +26,12 @@ exports.fetchHeadersSeq = fetchHeadersSeq;
|
|
|
25
26
|
* Last block header
|
|
26
27
|
* @param base
|
|
27
28
|
*/
|
|
28
|
-
function fetchHeadersLast(base, options
|
|
29
|
+
function fetchHeadersLast(base, options) {
|
|
30
|
+
if (options === void 0) { options = Object.create(null); }
|
|
29
31
|
return request_1.default({
|
|
30
|
-
base,
|
|
31
|
-
url:
|
|
32
|
-
options
|
|
32
|
+
base: base,
|
|
33
|
+
url: "/blocks/headers/last",
|
|
34
|
+
options: options
|
|
33
35
|
});
|
|
34
36
|
}
|
|
35
37
|
exports.fetchHeadersLast = fetchHeadersLast;
|
|
@@ -41,8 +43,8 @@ exports.fetchHeadersLast = fetchHeadersLast;
|
|
|
41
43
|
*/
|
|
42
44
|
function fetchHeightById(base, id) {
|
|
43
45
|
return request_1.default({
|
|
44
|
-
base,
|
|
45
|
-
url:
|
|
46
|
+
base: base,
|
|
47
|
+
url: "/blocks/height/" + id
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
exports.fetchHeightById = fetchHeightById;
|
|
@@ -52,11 +54,12 @@ exports.fetchHeightById = fetchHeightById;
|
|
|
52
54
|
* @param base
|
|
53
55
|
* @param height
|
|
54
56
|
*/
|
|
55
|
-
function fetchHeadersAt(base, height, options
|
|
57
|
+
function fetchHeadersAt(base, height, options) {
|
|
58
|
+
if (options === void 0) { options = Object.create(null); }
|
|
56
59
|
return request_1.default({
|
|
57
|
-
base,
|
|
58
|
-
url:
|
|
59
|
-
options
|
|
60
|
+
base: base,
|
|
61
|
+
url: "/blocks/headers/at/" + height,
|
|
62
|
+
options: options
|
|
60
63
|
});
|
|
61
64
|
}
|
|
62
65
|
exports.fetchHeadersAt = fetchHeadersAt;
|
|
@@ -66,11 +69,12 @@ exports.fetchHeadersAt = fetchHeadersAt;
|
|
|
66
69
|
* @param base
|
|
67
70
|
* @param height
|
|
68
71
|
*/
|
|
69
|
-
function fetchHeadersById(base, id, options
|
|
72
|
+
function fetchHeadersById(base, id, options) {
|
|
73
|
+
if (options === void 0) { options = Object.create(null); }
|
|
70
74
|
return request_1.default({
|
|
71
|
-
base,
|
|
72
|
-
url:
|
|
73
|
-
options
|
|
75
|
+
base: base,
|
|
76
|
+
url: "/blocks/headers/" + id,
|
|
77
|
+
options: options
|
|
74
78
|
});
|
|
75
79
|
}
|
|
76
80
|
exports.fetchHeadersById = fetchHeadersById;
|
|
@@ -80,11 +84,12 @@ exports.fetchHeadersById = fetchHeadersById;
|
|
|
80
84
|
* @param base
|
|
81
85
|
* @param height
|
|
82
86
|
*/
|
|
83
|
-
function fetchBlockAt(base, height, options
|
|
87
|
+
function fetchBlockAt(base, height, options) {
|
|
88
|
+
if (options === void 0) { options = Object.create(null); }
|
|
84
89
|
return request_1.default({
|
|
85
|
-
base,
|
|
86
|
-
url:
|
|
87
|
-
options
|
|
90
|
+
base: base,
|
|
91
|
+
url: "/blocks/at/" + height,
|
|
92
|
+
options: options
|
|
88
93
|
});
|
|
89
94
|
}
|
|
90
95
|
exports.fetchBlockAt = fetchBlockAt;
|
|
@@ -95,11 +100,12 @@ exports.fetchBlockAt = fetchBlockAt;
|
|
|
95
100
|
* @param from
|
|
96
101
|
* @param to
|
|
97
102
|
*/
|
|
98
|
-
function fetchSeq(base, from, to, options
|
|
103
|
+
function fetchSeq(base, from, to, options) {
|
|
104
|
+
if (options === void 0) { options = Object.create(null); }
|
|
99
105
|
return request_1.default({
|
|
100
|
-
base,
|
|
101
|
-
url:
|
|
102
|
-
options
|
|
106
|
+
base: base,
|
|
107
|
+
url: "/blocks/seq/" + from + "/" + to,
|
|
108
|
+
options: options
|
|
103
109
|
});
|
|
104
110
|
}
|
|
105
111
|
exports.fetchSeq = fetchSeq;
|
|
@@ -109,11 +115,12 @@ exports.fetchSeq = fetchSeq;
|
|
|
109
115
|
* @param base
|
|
110
116
|
* @param id
|
|
111
117
|
*/
|
|
112
|
-
function fetchBlockById(base, id, options
|
|
118
|
+
function fetchBlockById(base, id, options) {
|
|
119
|
+
if (options === void 0) { options = Object.create(null); }
|
|
113
120
|
return request_1.default({
|
|
114
|
-
base,
|
|
115
|
-
url:
|
|
116
|
-
options
|
|
121
|
+
base: base,
|
|
122
|
+
url: "/blocks/" + id,
|
|
123
|
+
options: options
|
|
117
124
|
});
|
|
118
125
|
}
|
|
119
126
|
exports.fetchBlockById = fetchBlockById;
|
|
@@ -122,11 +129,12 @@ exports.fetchBlockById = fetchBlockById;
|
|
|
122
129
|
* Get genesis block
|
|
123
130
|
* @param base
|
|
124
131
|
*/
|
|
125
|
-
function fetchFirst(base, options
|
|
132
|
+
function fetchFirst(base, options) {
|
|
133
|
+
if (options === void 0) { options = Object.create(null); }
|
|
126
134
|
return request_1.default({
|
|
127
|
-
base,
|
|
128
|
-
url:
|
|
129
|
-
options
|
|
135
|
+
base: base,
|
|
136
|
+
url: "/blocks/first",
|
|
137
|
+
options: options
|
|
130
138
|
});
|
|
131
139
|
}
|
|
132
140
|
exports.fetchFirst = fetchFirst;
|
|
@@ -138,11 +146,12 @@ exports.fetchFirst = fetchFirst;
|
|
|
138
146
|
* @param from
|
|
139
147
|
* @param to
|
|
140
148
|
*/
|
|
141
|
-
function fetchBlocksByAddress(base, address, from, to, options
|
|
149
|
+
function fetchBlocksByAddress(base, address, from, to, options) {
|
|
150
|
+
if (options === void 0) { options = Object.create(null); }
|
|
142
151
|
return request_1.default({
|
|
143
|
-
base,
|
|
144
|
-
url:
|
|
145
|
-
options
|
|
152
|
+
base: base,
|
|
153
|
+
url: "/blocks/address/" + address + "/" + from + "/" + to,
|
|
154
|
+
options: options
|
|
146
155
|
});
|
|
147
156
|
}
|
|
148
157
|
exports.fetchBlocksByAddress = fetchBlocksByAddress;
|
|
@@ -151,11 +160,12 @@ exports.fetchBlocksByAddress = fetchBlocksByAddress;
|
|
|
151
160
|
* Last block
|
|
152
161
|
* @param base
|
|
153
162
|
*/
|
|
154
|
-
function fetchLast(base, options
|
|
163
|
+
function fetchLast(base, options) {
|
|
164
|
+
if (options === void 0) { options = Object.create(null); }
|
|
155
165
|
return request_1.default({
|
|
156
|
-
base,
|
|
166
|
+
base: base,
|
|
157
167
|
url: '/blocks/last',
|
|
158
|
-
options
|
|
168
|
+
options: options
|
|
159
169
|
});
|
|
160
170
|
}
|
|
161
171
|
exports.fetchLast = fetchLast;
|
|
@@ -168,8 +178,8 @@ exports.fetchLast = fetchLast;
|
|
|
168
178
|
*/
|
|
169
179
|
function fetchDelay(base, id, blockNum) {
|
|
170
180
|
return request_1.default({
|
|
171
|
-
base,
|
|
172
|
-
url:
|
|
181
|
+
base: base,
|
|
182
|
+
url: "/blocks/delay/" + id + "/" + blockNum
|
|
173
183
|
});
|
|
174
184
|
}
|
|
175
185
|
exports.fetchDelay = fetchDelay;
|
|
@@ -179,7 +189,7 @@ exports.fetchDelay = fetchDelay;
|
|
|
179
189
|
*/
|
|
180
190
|
function fetchHeight(base) {
|
|
181
191
|
return request_1.default({
|
|
182
|
-
base,
|
|
192
|
+
base: base,
|
|
183
193
|
url: '/blocks/height'
|
|
184
194
|
});
|
|
185
195
|
}
|
|
@@ -188,11 +198,12 @@ exports.fetchHeight = fetchHeight;
|
|
|
188
198
|
* GET /blocks/heightByTimestamp
|
|
189
199
|
* @param base
|
|
190
200
|
*/
|
|
191
|
-
function fetchHeightByTimestamp(base, timestamp, options
|
|
201
|
+
function fetchHeightByTimestamp(base, timestamp, options) {
|
|
202
|
+
if (options === void 0) { options = Object.create(null); }
|
|
192
203
|
return request_1.default({
|
|
193
|
-
base,
|
|
194
|
-
url:
|
|
195
|
-
options
|
|
204
|
+
base: base,
|
|
205
|
+
url: "/blocks/heightByTimestamp/" + timestamp,
|
|
206
|
+
options: options
|
|
196
207
|
});
|
|
197
208
|
}
|
|
198
209
|
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":";;;;;;AACA,gEAA0C;AAG1C;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,IAAY,EAAE,IAAY,EAAE,EAAU,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC9G,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,yBAAuB,IAAI,SAAI,EAAI;QACxC,OAAO,SAAA;KACV,CAAC,CAAA;AACN,CAAC;AAND,0CAMC;AAED;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,IAAY,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACrF,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,sBAAsB;QAC3B,OAAO,SAAA;KACV,CAAC,CAAC;AACP,CAAC;AAND,4CAMC;AAED;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,IAAY,EAAE,EAAU;IACpD,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,oBAAkB,EAAI;KAC9B,CAAC,CAAA;AACN,CAAC;AALD,0CAKC;AAED;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,MAAc,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACnG,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,wBAAsB,MAAQ;QACnC,OAAO,SAAA;KACV,CAAC,CAAC;AACP,CAAC;AAND,wCAMC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,IAAY,EAAE,EAAU,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACjG,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,qBAAmB,EAAI;QAC5B,OAAO,SAAA;KACV,CAAC,CAAC;AACP,CAAC;AAND,4CAMC;AAED;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,IAAY,EAAE,MAAc,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACjG,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,gBAAc,MAAQ;QAC3B,OAAO,SAAA;KACV,CAAC,CAAC;AACP,CAAC;AAND,oCAMC;AAED;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,IAAY,EAAE,EAAU,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACvG,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,iBAAe,IAAI,SAAI,EAAI;QAChC,OAAO,SAAA;KACV,CAAC,CAAA;AACN,CAAC;AAND,4BAMC;AAED;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,EAAU,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC/F,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,aAAW,EAAI;QACpB,OAAO,SAAA;KACV,CAAC,CAAA;AACN,CAAC;AAND,wCAMC;AAED;;;;GAIG;AACH,SAAgB,UAAU,CAAC,IAAY,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC/E,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,eAAe;QACpB,OAAO,SAAA;KACV,CAAC,CAAA;AACN,CAAC;AAND,gCAMC;AAED;;;;;;;GAOG;AACH,SAAgB,oBAAoB,CAAC,IAAY,EAAE,OAAe,EAAE,IAAY,EAAE,EAAU,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACpI,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,qBAAmB,OAAO,SAAI,IAAI,SAAI,EAAI;QAC/C,OAAO,SAAA;KACV,CAAC,CAAA;AACN,CAAC;AAND,oDAMC;AAED;;;;GAIG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC9E,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,cAAc;QACnB,OAAO,SAAA;KACV,CAAC,CAAA;AACN,CAAC;AAND,8BAMC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY,EAAE,EAAU,EAAE,QAAgB;IACjE,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,mBAAiB,EAAE,SAAI,QAAU;KACzC,CAAC,CAAA;AACN,CAAC;AALD,gCAKC;AAED;;;GAGG;AACH,SAAgB,WAAW,CAAC,IAAY;IACpC,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,gBAAgB;KACxB,CAAC,CAAC;AACP,CAAC;AALD,kCAKC;AAED;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,IAAY,EAAE,SAAiB,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC9G,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,+BAA6B,SAAW;QAC7C,OAAO,SAAA;KACV,CAAC,CAAC;AACP,CAAC;AAND,wDAMC"}
|
|
@@ -4,15 +4,16 @@ 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
|
+
var 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
|
-
|
|
14
|
+
function fetchGeneratingBalance(base, address, options) {
|
|
15
|
+
if (options === void 0) { options = Object.create(null); }
|
|
16
|
+
return request_1.default({ base: base, url: "/consensus/generatingbalance/" + address });
|
|
16
17
|
}
|
|
17
18
|
exports.fetchGeneratingBalance = fetchGeneratingBalance;
|
|
18
19
|
/**
|
|
@@ -21,7 +22,7 @@ exports.fetchGeneratingBalance = fetchGeneratingBalance;
|
|
|
21
22
|
* @param base
|
|
22
23
|
*/
|
|
23
24
|
function fetchBasetarget(base) {
|
|
24
|
-
return request_1.default({ base, url: '/consensus/basetarget' });
|
|
25
|
+
return request_1.default({ base: base, url: '/consensus/basetarget' });
|
|
25
26
|
}
|
|
26
27
|
exports.fetchBasetarget = fetchBasetarget;
|
|
27
28
|
/**
|
|
@@ -30,7 +31,7 @@ exports.fetchBasetarget = fetchBasetarget;
|
|
|
30
31
|
* @param base
|
|
31
32
|
*/
|
|
32
33
|
function fetchConsensusAlgo(base) {
|
|
33
|
-
return request_1.default({ base, url: '/consensus/algo' });
|
|
34
|
+
return request_1.default({ base: base, url: '/consensus/algo' });
|
|
34
35
|
}
|
|
35
36
|
exports.fetchConsensusAlgo = fetchConsensusAlgo;
|
|
36
37
|
//# 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,gEAA0C;AAE1C;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,IAAY,EAAE,OAAe,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5G,OAAO,iBAAO,CAAC,EAAC,IAAI,MAAA,EAAE,GAAG,EAAE,kCAAgC,OAAS,EAAC,CAAC,CAAC;AAC3E,CAAC;AAFD,wDAEC;AAED;;;;GAIG;AACH,SAAgB,eAAe,CAAC,IAAY;IACxC,OAAO,iBAAO,CAAC,EAAC,IAAI,MAAA,EAAE,GAAG,EAAE,uBAAuB,EAAC,CAAC,CAAC;AACzD,CAAC;AAFD,0CAEC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC3C,OAAO,iBAAO,CAAC,EAAC,IAAI,MAAA,EAAE,GAAG,EAAE,iBAAiB,EAAC,CAAC,CAAC;AACnD,CAAC;AAFD,gDAEC"}
|
|
@@ -4,18 +4,19 @@ 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
|
+
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
+
var 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
|
|
14
|
+
function fetchBalanceHistory(base, address, options) {
|
|
15
|
+
if (options === void 0) { options = Object.create(null); }
|
|
15
16
|
return request_1.default({
|
|
16
|
-
base,
|
|
17
|
-
url:
|
|
18
|
-
options
|
|
17
|
+
base: base,
|
|
18
|
+
url: "/debug/balances/history/" + address,
|
|
19
|
+
options: options
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
22
|
exports.fetchBalanceHistory = fetchBalanceHistory;
|
|
@@ -26,11 +27,12 @@ exports.fetchBalanceHistory = fetchBalanceHistory;
|
|
|
26
27
|
* @param limit
|
|
27
28
|
* @param after
|
|
28
29
|
*/
|
|
29
|
-
function fetchStateChangesByAddress(base, address, limit, after, options
|
|
30
|
+
function fetchStateChangesByAddress(base, address, limit, after, options) {
|
|
31
|
+
if (options === void 0) { options = Object.create(null); }
|
|
30
32
|
return request_1.default({
|
|
31
|
-
base,
|
|
32
|
-
url:
|
|
33
|
-
options
|
|
33
|
+
base: base,
|
|
34
|
+
url: "/debug/stateChanges/address/" + address + "/limit/" + limit + query_1.default({ after: after }),
|
|
35
|
+
options: options
|
|
34
36
|
});
|
|
35
37
|
}
|
|
36
38
|
exports.fetchStateChangesByAddress = fetchStateChangesByAddress;
|
|
@@ -39,11 +41,12 @@ exports.fetchStateChangesByAddress = fetchStateChangesByAddress;
|
|
|
39
41
|
* @param base
|
|
40
42
|
* @param txId
|
|
41
43
|
*/
|
|
42
|
-
function fetchStateChangesByTxId(base, txId, options
|
|
44
|
+
function fetchStateChangesByTxId(base, txId, options) {
|
|
45
|
+
if (options === void 0) { options = Object.create(null); }
|
|
43
46
|
return request_1.default({
|
|
44
|
-
base,
|
|
45
|
-
url:
|
|
46
|
-
options
|
|
47
|
+
base: base,
|
|
48
|
+
url: "/debug/stateChanges/info/" + txId,
|
|
49
|
+
options: options
|
|
47
50
|
});
|
|
48
51
|
}
|
|
49
52
|
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,gEAA0C;AAE1C,4DAAsC;AAGtC;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,IAAY,EAAE,OAAe,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACzG,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,6BAA2B,OAAS;QACzC,OAAO,SAAA;KACV,CAAC,CAAC;AACP,CAAC;AAND,kDAMC;AAmED;;;;;;GAMG;AACH,SAAgB,0BAA0B,CACtC,IAAY,EACZ,OAAe,EACf,KAAa,EACb,KAAc,EACd,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAE1C,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,iCAA+B,OAAO,eAAU,KAAK,GAAG,eAAK,CAAC,EAAC,KAAK,OAAA,EAAC,CAAG;QAC7E,OAAO,SAAA;KACV,CAAC,CAAC;AACP,CAAC;AAZD,gEAYC;AAGD;;;;GAIG;AACH,SAAgB,uBAAuB,CAAC,IAAY,EAAE,IAAY,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC1G,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,8BAA4B,IAAM;QACvC,OAAO,SAAA;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
|
+
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
+
var utils_1 = require("../../tools/utils");
|
|
9
|
+
var query_1 = __importDefault(require("../../tools/query"));
|
|
10
10
|
function fetchEthAssetDetails(base, ethAssetId) {
|
|
11
|
-
|
|
12
|
-
return request_1.default({ base, url:
|
|
11
|
+
var id = utils_1.toArray(ethAssetId);
|
|
12
|
+
return request_1.default({ base: base, url: "/eth/assets?" + query_1.default({ id: id }) }).then(function (list) { return 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,gEAA0C;AAE1C,2CAA0C;AAC1C,4DAAsC;AAItC,SAAgB,oBAAoB,CAAC,IAAY,EAAE,UAA6B;IAC5E,IAAM,EAAE,GAAG,eAAO,CAAC,UAAU,CAAC,CAAA;IAE9B,OAAO,iBAAO,CAAuB,EAAC,IAAI,MAAA,EAAE,GAAG,EAAE,iBAAe,eAAK,CAAC,EAAC,EAAE,IAAA,EAAC,CAAG,EAAC,CAAC,CAAC,IAAI,CAAC,UAAA,IAAI,IAAI,OAAA,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAA1C,CAA0C,CAAC,CAAC;AAC7I,CAAC;AAJD,oDAIC"}
|
|
@@ -1,27 +1,39 @@
|
|
|
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
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
17
|
exports.fetchLeasingInfo = exports.fetchActive = void 0;
|
|
7
|
-
|
|
18
|
+
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
19
|
/**
|
|
9
20
|
* GET /leasing/active/{address}
|
|
10
21
|
* Get all active leases for an address
|
|
11
22
|
*/
|
|
12
|
-
function fetchActive(base, address, options
|
|
13
|
-
|
|
23
|
+
function fetchActive(base, address, options) {
|
|
24
|
+
if (options === void 0) { options = Object.create(null); }
|
|
25
|
+
return request_1.default({ base: base, url: "/leasing/active/" + address, options: options });
|
|
14
26
|
}
|
|
15
27
|
exports.fetchActive = fetchActive;
|
|
16
28
|
/**
|
|
17
29
|
* GET /leasing/info/
|
|
18
30
|
* Get lease transactions info.
|
|
19
31
|
*/
|
|
20
|
-
function fetchLeasingInfo(base, ids, options
|
|
21
|
-
|
|
32
|
+
function fetchLeasingInfo(base, ids, options) {
|
|
33
|
+
if (options === void 0) { options = Object.create(null); }
|
|
34
|
+
var searchParams = "{\"ids\":[" + ids.map(function (id) { return "\"" + id + "\""; }).join(',') + "]}";
|
|
22
35
|
return request_1.default({
|
|
23
|
-
base, url:
|
|
24
|
-
options: Object.assign(Object.assign({}, options), { body: searchParams, method: 'POST', headers: {
|
|
36
|
+
base: base, url: "/leasing/info/", options: __assign(__assign({}, options), { body: searchParams, method: 'POST', headers: {
|
|
25
37
|
'Content-Type': 'application/json'
|
|
26
38
|
} })
|
|
27
39
|
});
|
|
@@ -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,gEAA0C;AAG1C;;;GAGG;AACH,SAAgB,WAAW,CAAC,IAAY,EAAE,OAAe,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACjG,OAAO,iBAAO,CAAC,EAAC,IAAI,MAAA,EAAE,GAAG,EAAE,qBAAmB,OAAS,EAAE,OAAO,SAAA,EAAC,CAAC,CAAC;AACvE,CAAC;AAFD,kCAEC;AAGD;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,IAAY,EAAE,GAAa,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACpG,IAAM,YAAY,GAAG,eAAa,GAAG,CAAC,GAAG,CAAC,UAAA,EAAE,IAAI,OAAA,OAAK,EAAE,OAAI,EAAX,CAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,OAAI,CAAC;IAE3E,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA,EAAE,GAAG,EAAE,gBAAgB,EAAE,OAAO,wBAC7B,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,15 +4,17 @@ 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
|
+
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
8
|
// @TODO: When correct API key
|
|
9
9
|
// POST /node/stop
|
|
10
|
-
function fetchNodeStatus(base, options
|
|
11
|
-
|
|
10
|
+
function fetchNodeStatus(base, options) {
|
|
11
|
+
if (options === void 0) { options = Object.create(null); }
|
|
12
|
+
return request_1.default({ base: base, url: '/node/status', options: options });
|
|
12
13
|
}
|
|
13
14
|
exports.fetchNodeStatus = fetchNodeStatus;
|
|
14
|
-
function fetchNodeVersion(base, options
|
|
15
|
-
|
|
15
|
+
function fetchNodeVersion(base, options) {
|
|
16
|
+
if (options === void 0) { options = Object.create(null); }
|
|
17
|
+
return request_1.default({ base: base, url: '/node/version', options: options });
|
|
16
18
|
}
|
|
17
19
|
exports.fetchNodeVersion = fetchNodeVersion;
|
|
18
20
|
//# 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,gEAA0C;AAE1C,8BAA8B;AAC9B,kBAAkB;AAElB,SAAgB,eAAe,CAAC,IAAY,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACpF,OAAO,iBAAO,CAAC,EAAE,IAAI,MAAA,EAAE,GAAG,EAAE,cAAc,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AAC3D,CAAC;AAFD,0CAEC;AAED,SAAgB,gBAAgB,CAAC,IAAY,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACrF,OAAO,iBAAO,CAAC,EAAE,IAAI,MAAA,EAAE,GAAG,EAAE,eAAe,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AAC5D,CAAC;AAFD,4CAEC"}
|
|
@@ -4,16 +4,17 @@ 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
|
+
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
8
|
/**
|
|
9
9
|
* GET /peers/all
|
|
10
10
|
* Peer list
|
|
11
11
|
*/
|
|
12
|
-
function fetchAll(base, options
|
|
12
|
+
function fetchAll(base, options) {
|
|
13
|
+
if (options === void 0) { options = Object.create(null); }
|
|
13
14
|
return request_1.default({
|
|
14
|
-
base,
|
|
15
|
+
base: base,
|
|
15
16
|
url: '/peers/all',
|
|
16
|
-
options
|
|
17
|
+
options: options
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
20
|
exports.fetchAll = fetchAll;
|
|
@@ -21,11 +22,12 @@ exports.fetchAll = fetchAll;
|
|
|
21
22
|
* GET /peers/connected
|
|
22
23
|
* Connected peers list
|
|
23
24
|
*/
|
|
24
|
-
function fetchConnected(base, options
|
|
25
|
+
function fetchConnected(base, options) {
|
|
26
|
+
if (options === void 0) { options = Object.create(null); }
|
|
25
27
|
return request_1.default({
|
|
26
|
-
base,
|
|
28
|
+
base: base,
|
|
27
29
|
url: '/peers/connected',
|
|
28
|
-
options
|
|
30
|
+
options: options
|
|
29
31
|
});
|
|
30
32
|
}
|
|
31
33
|
exports.fetchConnected = fetchConnected;
|
|
@@ -33,11 +35,12 @@ exports.fetchConnected = fetchConnected;
|
|
|
33
35
|
* GET /peers/blacklisted
|
|
34
36
|
* Blacklisted peers list
|
|
35
37
|
*/
|
|
36
|
-
function fetchBlackListed(base, options
|
|
38
|
+
function fetchBlackListed(base, options) {
|
|
39
|
+
if (options === void 0) { options = Object.create(null); }
|
|
37
40
|
return request_1.default({
|
|
38
|
-
base,
|
|
41
|
+
base: base,
|
|
39
42
|
url: '/peers/blacklisted',
|
|
40
|
-
options
|
|
43
|
+
options: options
|
|
41
44
|
});
|
|
42
45
|
}
|
|
43
46
|
exports.fetchBlackListed = fetchBlackListed;
|
|
@@ -45,11 +48,12 @@ exports.fetchBlackListed = fetchBlackListed;
|
|
|
45
48
|
* GET /peers/suspended
|
|
46
49
|
* Suspended peers list
|
|
47
50
|
*/
|
|
48
|
-
function fetchSuspended(base, options
|
|
51
|
+
function fetchSuspended(base, options) {
|
|
52
|
+
if (options === void 0) { options = Object.create(null); }
|
|
49
53
|
return request_1.default({
|
|
50
|
-
base,
|
|
54
|
+
base: base,
|
|
51
55
|
url: '/peers/suspended',
|
|
52
|
-
options
|
|
56
|
+
options: options
|
|
53
57
|
});
|
|
54
58
|
}
|
|
55
59
|
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,gEAA0C;AAG1C;;;GAGG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC7E,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,YAAY;QACjB,OAAO,SAAA;KACV,CAAC,CAAA;AACN,CAAC;AAND,4BAMC;AAGD;;;GAGG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACnF,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,kBAAkB;QACvB,OAAO,SAAA;KACV,CAAC,CAAA;AACN,CAAC;AAND,wCAMC;AAED;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,IAAY,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACrF,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,oBAAoB;QACzB,OAAO,SAAA;KACV,CAAC,CAAA;AACN,CAAC;AAND,4CAMC;AAED;;;GAGG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACnF,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,kBAAkB;QACvB,OAAO,SAAA;KACV,CAAC,CAAA;AACN,CAAC;AAND,wCAMC"}
|
|
@@ -4,16 +4,17 @@ 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
|
+
var 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
|
|
12
|
+
function fetchRewards(base, height, options) {
|
|
13
|
+
if (options === void 0) { options = Object.create(null); }
|
|
13
14
|
return request_1.default({
|
|
14
|
-
base,
|
|
15
|
-
url: height ?
|
|
16
|
-
options
|
|
15
|
+
base: base,
|
|
16
|
+
url: height ? "/blockchain/rewards/" + height : '/blockchain/rewards',
|
|
17
|
+
options: options
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
20
|
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,gEAA0C;AAG1C;;;GAGG;AACH,SAAgB,YAAY,CAAC,IAAY,EAAE,MAAe,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAClG,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,yBAAuB,MAAQ,CAAC,CAAC,CAAC,qBAAqB;QACrE,OAAO,SAAA;KACV,CAAC,CAAC;AACP,CAAC;AAND,oCAMC"}
|