@waves/node-api-js 1.2.6-cjs.0 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.d.ts +2 -0
- package/cjs/api-node/addresses/index.js +105 -46
- 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.d.ts +16 -2
- package/cjs/api-node/assets/index.js +137 -63
- package/cjs/api-node/assets/index.js.map +1 -1
- package/cjs/api-node/blocks/index.d.ts +2 -2
- 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.d.ts +100 -0
- package/cjs/api-node/debug/index.js +196 -15
- 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.d.ts +9 -5
- package/cjs/api-node/transactions/index.js +94 -43
- 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 -248
- 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.d.ts +2 -3
- 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 +2 -1
- package/cjs/tools/request.js +21 -7
- package/cjs/tools/request.js.map +1 -1
- package/cjs/tools/stringify.js +7 -4
- 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.js +65 -51
- 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 +455 -0
- package/dist/node-api.js +367 -720
- package/dist/node-api.min.js +5 -5
- package/es/api-node/addresses/index.d.ts +2 -0
- package/es/api-node/addresses/index.js +17 -1
- package/es/api-node/addresses/index.js.map +1 -1
- package/es/api-node/assets/index.d.ts +16 -2
- package/es/api-node/assets/index.js +13 -6
- package/es/api-node/assets/index.js.map +1 -1
- package/es/api-node/blocks/index.d.ts +2 -2
- package/es/api-node/debug/index.d.ts +100 -0
- package/es/api-node/debug/index.js +147 -1
- package/es/api-node/debug/index.js.map +1 -1
- package/es/api-node/transactions/index.d.ts +9 -5
- package/es/api-node/transactions/index.js +12 -3
- package/es/api-node/transactions/index.js.map +1 -1
- package/es/create.d.ts +6 -248
- package/es/tools/adresses/getTransactionsWithAssets.d.ts +2 -3
- package/es/tools/adresses/watch.js.map +1 -1
- package/es/tools/request.d.ts +2 -1
- package/es/tools/request.js +2 -2
- package/es/tools/request.js.map +1 -1
- package/es/tools/stringify.js +5 -2
- package/es/tools/stringify.js.map +1 -1
- package/package.json +7 -7
|
@@ -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;;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ACJ,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"}
|
|
@@ -86,4 +86,104 @@ export declare function fetchStateChangesByAddress(base: string, address: string
|
|
|
86
86
|
* @param txId
|
|
87
87
|
*/
|
|
88
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
|
+
}
|
|
89
189
|
export {};
|
|
@@ -1,21 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
23
|
};
|
|
5
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.fetchStateChangesByTxId = exports.fetchStateChangesByAddress = exports.fetchBalanceHistory = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
25
|
+
exports.debugValidate = exports.debugStateWaves = exports.debugStateHash = exports.debugState = exports.debugRollbackTo = exports.debugRollback = exports.debugPrint = exports.fetchPortfolios = exports.fetchMinerInfo = exports.fetchDebugInfo = exports.fetchConfigInfo = exports.postPeerToTheBanList = exports.fetchStateChangesByTxId = exports.fetchStateChangesByAddress = exports.fetchBalanceHistory = void 0;
|
|
26
|
+
var request_1 = __importStar(require("../../tools/request"));
|
|
27
|
+
var query_1 = __importDefault(require("../../tools/query"));
|
|
9
28
|
/**
|
|
10
29
|
* Waves balance history
|
|
11
30
|
* @param base
|
|
12
31
|
* @param address
|
|
13
32
|
*/
|
|
14
|
-
function fetchBalanceHistory(base, address, options
|
|
33
|
+
function fetchBalanceHistory(base, address, options) {
|
|
34
|
+
if (options === void 0) { options = Object.create(null); }
|
|
15
35
|
return request_1.default({
|
|
16
|
-
base,
|
|
17
|
-
url:
|
|
18
|
-
options
|
|
36
|
+
base: base,
|
|
37
|
+
url: "/debug/balances/history/" + address,
|
|
38
|
+
options: options
|
|
19
39
|
});
|
|
20
40
|
}
|
|
21
41
|
exports.fetchBalanceHistory = fetchBalanceHistory;
|
|
@@ -26,11 +46,12 @@ exports.fetchBalanceHistory = fetchBalanceHistory;
|
|
|
26
46
|
* @param limit
|
|
27
47
|
* @param after
|
|
28
48
|
*/
|
|
29
|
-
function fetchStateChangesByAddress(base, address, limit, after, options
|
|
49
|
+
function fetchStateChangesByAddress(base, address, limit, after, options) {
|
|
50
|
+
if (options === void 0) { options = Object.create(null); }
|
|
30
51
|
return request_1.default({
|
|
31
|
-
base,
|
|
32
|
-
url:
|
|
33
|
-
options
|
|
52
|
+
base: base,
|
|
53
|
+
url: "/debug/stateChanges/address/" + address + "/limit/" + limit + query_1.default({ after: after }),
|
|
54
|
+
options: options
|
|
34
55
|
});
|
|
35
56
|
}
|
|
36
57
|
exports.fetchStateChangesByAddress = fetchStateChangesByAddress;
|
|
@@ -39,14 +60,174 @@ exports.fetchStateChangesByAddress = fetchStateChangesByAddress;
|
|
|
39
60
|
* @param base
|
|
40
61
|
* @param txId
|
|
41
62
|
*/
|
|
42
|
-
function fetchStateChangesByTxId(base, txId, options
|
|
63
|
+
function fetchStateChangesByTxId(base, txId, options) {
|
|
64
|
+
if (options === void 0) { options = Object.create(null); }
|
|
43
65
|
return request_1.default({
|
|
44
|
-
base,
|
|
45
|
-
url:
|
|
46
|
-
options
|
|
66
|
+
base: base,
|
|
67
|
+
url: "/debug/stateChanges/info/" + txId,
|
|
68
|
+
options: options
|
|
47
69
|
});
|
|
48
70
|
}
|
|
49
71
|
exports.fetchStateChangesByTxId = fetchStateChangesByTxId;
|
|
72
|
+
function postPeerToTheBanList(base, peer) {
|
|
73
|
+
return fetch(base + "/debug/blacklist", {
|
|
74
|
+
method: "POST",
|
|
75
|
+
body: peer,
|
|
76
|
+
headers: {
|
|
77
|
+
"Content-Type": "application/json"
|
|
78
|
+
}
|
|
79
|
+
}).then(request_1.parseResponse);
|
|
80
|
+
}
|
|
81
|
+
exports.postPeerToTheBanList = postPeerToTheBanList;
|
|
82
|
+
function fetchConfigInfo(base, apiKey) {
|
|
83
|
+
return fetch(base + "/debug/configInfo", {
|
|
84
|
+
method: "GET",
|
|
85
|
+
headers: {
|
|
86
|
+
"X-API-Key": apiKey,
|
|
87
|
+
"Content-Type": "application/json"
|
|
88
|
+
}
|
|
89
|
+
}).then(request_1.parseResponse);
|
|
90
|
+
}
|
|
91
|
+
exports.fetchConfigInfo = fetchConfigInfo;
|
|
92
|
+
function fetchDebugInfo(base, apiKey) {
|
|
93
|
+
return fetch(base + "/debug/info", {
|
|
94
|
+
method: "GET",
|
|
95
|
+
headers: {
|
|
96
|
+
"X-API-Key": apiKey,
|
|
97
|
+
"Content-Type": "application/json"
|
|
98
|
+
}
|
|
99
|
+
}).then(request_1.parseResponse);
|
|
100
|
+
}
|
|
101
|
+
exports.fetchDebugInfo = fetchDebugInfo;
|
|
102
|
+
function fetchMinerInfo(base, apiKey) {
|
|
103
|
+
return fetch(base + "/debug/minerInfo", {
|
|
104
|
+
method: "GET",
|
|
105
|
+
headers: {
|
|
106
|
+
"X-API-Key": apiKey,
|
|
107
|
+
"Content-Type": "application/json"
|
|
108
|
+
}
|
|
109
|
+
}).then(request_1.parseResponse);
|
|
110
|
+
}
|
|
111
|
+
exports.fetchMinerInfo = fetchMinerInfo;
|
|
112
|
+
function fetchPortfolios(base, address, apiKey) {
|
|
113
|
+
return fetch(base + "/debug/portfolios/" + address, {
|
|
114
|
+
method: "GET",
|
|
115
|
+
headers: {
|
|
116
|
+
"X-API-Key": apiKey,
|
|
117
|
+
"Content-Type": "application/json"
|
|
118
|
+
}
|
|
119
|
+
}).then(request_1.parseResponse);
|
|
120
|
+
}
|
|
121
|
+
exports.fetchPortfolios = fetchPortfolios;
|
|
122
|
+
function debugPrint(base, message, apiKey) {
|
|
123
|
+
return fetch(base + "/debug/print", {
|
|
124
|
+
method: "POST",
|
|
125
|
+
headers: {
|
|
126
|
+
"X-API-Key": apiKey,
|
|
127
|
+
"Content-Type": "application/json"
|
|
128
|
+
},
|
|
129
|
+
body: JSON.stringify({ message: message })
|
|
130
|
+
}).then(request_1.parseResponse);
|
|
131
|
+
}
|
|
132
|
+
exports.debugPrint = debugPrint;
|
|
133
|
+
/**
|
|
134
|
+
* 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
|
|
135
|
+
* @param base
|
|
136
|
+
* @param height
|
|
137
|
+
* @param returnTransactionsToUtx
|
|
138
|
+
* @param apiKey
|
|
139
|
+
*/
|
|
140
|
+
function debugRollback(base, height, returnTransactionsToUtx, apiKey) {
|
|
141
|
+
return fetch(base + "/debug/rollback", {
|
|
142
|
+
method: "POST",
|
|
143
|
+
headers: {
|
|
144
|
+
"X-API-Key": apiKey,
|
|
145
|
+
"Content-Type": "application/json"
|
|
146
|
+
},
|
|
147
|
+
body: JSON.stringify({
|
|
148
|
+
rollbackTo: height,
|
|
149
|
+
returnTransactionsToUtx: returnTransactionsToUtx
|
|
150
|
+
})
|
|
151
|
+
}).then(request_1.parseResponse);
|
|
152
|
+
}
|
|
153
|
+
exports.debugRollback = debugRollback;
|
|
154
|
+
/**
|
|
155
|
+
* Rollback the state to the block with a given ID
|
|
156
|
+
* @param base
|
|
157
|
+
* @param height
|
|
158
|
+
* @param returnTransactionsToUtx
|
|
159
|
+
* @param apiKey
|
|
160
|
+
*/
|
|
161
|
+
function debugRollbackTo(base, id, apiKey) {
|
|
162
|
+
return fetch(base + "/debug/rollback-to/" + id, {
|
|
163
|
+
method: "DELETE",
|
|
164
|
+
headers: {
|
|
165
|
+
"X-API-Key": apiKey,
|
|
166
|
+
"Content-Type": "application/json"
|
|
167
|
+
},
|
|
168
|
+
}).then(request_1.parseResponse);
|
|
169
|
+
}
|
|
170
|
+
exports.debugRollbackTo = debugRollbackTo;
|
|
171
|
+
/**
|
|
172
|
+
* Regular address balance at the current height
|
|
173
|
+
* @param base
|
|
174
|
+
* @param apiKey
|
|
175
|
+
*/
|
|
176
|
+
function debugState(base, apiKey) {
|
|
177
|
+
return fetch(base + "/debug/state", {
|
|
178
|
+
method: "GET",
|
|
179
|
+
headers: {
|
|
180
|
+
"X-API-Key": apiKey,
|
|
181
|
+
"Content-Type": "application/json"
|
|
182
|
+
},
|
|
183
|
+
}).then(request_1.parseResponse);
|
|
184
|
+
}
|
|
185
|
+
exports.debugState = debugState;
|
|
186
|
+
/**
|
|
187
|
+
* Get state hash at height. Available only if node configuration contains waves.db.store-state-hashes = true option
|
|
188
|
+
* @param base
|
|
189
|
+
* @param height
|
|
190
|
+
*/
|
|
191
|
+
function debugStateHash(base, height, options) {
|
|
192
|
+
if (options === void 0) { options = Object.create(null); }
|
|
193
|
+
return request_1.default({
|
|
194
|
+
base: base,
|
|
195
|
+
url: "/debug/stateHash/" + height,
|
|
196
|
+
options: options
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
exports.debugStateHash = debugStateHash;
|
|
200
|
+
/**
|
|
201
|
+
* 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
|
|
202
|
+
* @param base
|
|
203
|
+
* @param height
|
|
204
|
+
* @param apiKey
|
|
205
|
+
*/
|
|
206
|
+
function debugStateWaves(base, height, apiKey) {
|
|
207
|
+
return fetch(base + "/debug/stateWaves/" + height, {
|
|
208
|
+
method: "GET",
|
|
209
|
+
headers: {
|
|
210
|
+
"X-API-Key": apiKey,
|
|
211
|
+
"Content-Type": "application/json"
|
|
212
|
+
},
|
|
213
|
+
}).then(request_1.parseResponse);
|
|
214
|
+
}
|
|
215
|
+
exports.debugStateWaves = debugStateWaves;
|
|
216
|
+
/**
|
|
217
|
+
* Validates a transaction and measures time spent in milliseconds. You should use the JSON transaction format with proofs
|
|
218
|
+
* @param base
|
|
219
|
+
* @param transaction
|
|
220
|
+
*/
|
|
221
|
+
function debugValidate(base, transaction) {
|
|
222
|
+
return fetch(base + "/debug/validate", {
|
|
223
|
+
method: "POST",
|
|
224
|
+
headers: {
|
|
225
|
+
"Content-Type": "application/json"
|
|
226
|
+
},
|
|
227
|
+
body: transaction
|
|
228
|
+
}).then(request_1.parseResponse);
|
|
229
|
+
}
|
|
230
|
+
exports.debugValidate = debugValidate;
|
|
50
231
|
// @TODO need API key:
|
|
51
232
|
// GET /debug/stateWaves/{height}
|
|
52
233
|
// POST /debug/rollback
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/debug/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node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,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACnG,OAAO,iBAAO,CAAC;QACX,IAAI,MAAA;QACJ,GAAG,EAAE,sBAAoB,MAAQ;QACjC,OAAO,SAAA;KACV,CAAC,CAAA;AACN,CAAC;AAND,wCAMC;AAGD;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,IAAY,EAAE,MAAc,EAAE,MAAc;IACxE,OAAO,KAAK,CAAI,IAAI,0BAAqB,MAAQ,EAAE;QAC/C,MAAM,EAAE,KAAK;QACb,OAAO,EAAE;YACL,WAAW,EAAE,MAAM;YACnB,cAAc,EAAE,kBAAkB;SACrC;KACJ,CAAC,CAAC,IAAI,CAAC,uBAAa,CAA6C,CAAA;AACtE,CAAC;AARD,0CAQC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,IAAY,EAAE,WAAmB;IAC3D,OAAO,KAAK,CAAI,IAAI,oBAAiB,EAAE;QACnC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACL,cAAc,EAAE,kBAAkB;SACrC;QACD,IAAI,EAAE,WAAW;KACpB,CAAC,CAAC,IAAI,CAAC,uBAAa,CAA+B,CAAA;AACxD,CAAC;AARD,sCAQC;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"}
|
|
@@ -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
|