@beblurt/blurt-nodes-checker 1.0.0 → 1.1.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/README.md +86 -86
- package/dist/blurt-nodes-checker.min.js +48 -5
- package/lib/helpers/index.d.ts +28 -10
- package/lib/helpers/index.js +20 -0
- package/lib/helpers/index.js.map +1 -1
- package/lib/index.d.ts +7 -4
- package/lib/index.js +130 -57
- package/lib/index.js.map +1 -1
- package/lib/test.d.ts +3 -1
- package/lib/test.js +86 -13
- package/lib/test.js.map +1 -1
- package/package.json +12 -11
- package/lib/helpers/BLOCK_API/GET_BLOCK.d.ts +0 -26
- package/lib/helpers/BLOCK_API/GET_BLOCK.js +0 -2
- package/lib/helpers/BLOCK_API/GET_BLOCK.js.map +0 -1
- package/lib/helpers/CONDENSER_API/DYNAMIC_GLOBAL_PROPERTIES.d.ts +0 -67
- package/lib/helpers/CONDENSER_API/DYNAMIC_GLOBAL_PROPERTIES.js +0 -2
- package/lib/helpers/CONDENSER_API/DYNAMIC_GLOBAL_PROPERTIES.js.map +0 -1
- package/lib/helpers/CONDENSER_API/GET_ACCOUNT.d.ts +0 -73
- package/lib/helpers/CONDENSER_API/GET_ACCOUNT.js +0 -2
- package/lib/helpers/CONDENSER_API/GET_ACCOUNT.js.map +0 -1
- package/lib/helpers/CONDENSER_API/GET_BLOG_ENTRY.d.ts +0 -7
- package/lib/helpers/CONDENSER_API/GET_BLOG_ENTRY.js +0 -2
- package/lib/helpers/CONDENSER_API/GET_BLOG_ENTRY.js.map +0 -1
- package/lib/helpers/CONDENSER_API/GET_CONFIG.d.ts +0 -174
- package/lib/helpers/CONDENSER_API/GET_CONFIG.js +0 -2
- package/lib/helpers/CONDENSER_API/GET_CONFIG.js.map +0 -1
- package/lib/helpers/CONDENSER_API/GET_CONTENT.d.ts +0 -54
- package/lib/helpers/CONDENSER_API/GET_CONTENT.js +0 -2
- package/lib/helpers/CONDENSER_API/GET_CONTENT.js.map +0 -1
- package/lib/helpers/CONDENSER_API/GET_DISCUSSION.d.ts +0 -39
- package/lib/helpers/CONDENSER_API/GET_DISCUSSION.js +0 -2
- package/lib/helpers/CONDENSER_API/GET_DISCUSSION.js.map +0 -1
package/lib/helpers/index.js
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @project @beblurt/blurt-nodes-checker
|
|
3
|
+
* @file Type definition
|
|
4
|
+
* @author BeBlurt <https://beblurt.com/@beblurt>
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright (C) 2022 IMT ASE Co., LTD
|
|
7
|
+
*
|
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
1
21
|
export {};
|
|
2
22
|
//# sourceMappingURL=index.js.map
|
package/lib/helpers/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @project @beblurt/blurt-nodes-checker
|
|
3
|
-
* @
|
|
3
|
+
* @file Blurt Nodes Checker
|
|
4
|
+
* @description Testing the different RPC nodes of the Blurt blockchain
|
|
5
|
+
* @author BeBlurt <https://beblurt.com/@beblurt>
|
|
4
6
|
* @license
|
|
5
7
|
* Copyright (C) 2022 IMT ASE Co., LTD
|
|
6
8
|
*
|
|
@@ -17,8 +19,6 @@
|
|
|
17
19
|
* You should have received a copy of the GNU General Public License
|
|
18
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
21
|
*/
|
|
20
|
-
/** Axios */
|
|
21
|
-
import axios from "axios";
|
|
22
22
|
/** RxJS */
|
|
23
23
|
import { Subject } from "rxjs";
|
|
24
24
|
import { OPTIONS, RPC_NODE, FULL_TEST } from "./helpers/index.js";
|
|
@@ -27,17 +27,20 @@ export declare class BlurtNodesChecker {
|
|
|
27
27
|
nodes: RPC_NODE[];
|
|
28
28
|
message: Subject<RPC_NODE[]>;
|
|
29
29
|
timer: ReturnType<typeof setTimeout>;
|
|
30
|
+
debug: boolean;
|
|
30
31
|
full: boolean;
|
|
32
|
+
nexus: boolean;
|
|
31
33
|
interval: number;
|
|
32
34
|
timeout: number;
|
|
33
35
|
reset?: number;
|
|
34
|
-
instance: axios.AxiosInstance;
|
|
36
|
+
instance: import("axios").AxiosInstance;
|
|
35
37
|
intercept?: string;
|
|
36
38
|
tests: FULL_TEST[];
|
|
37
39
|
constructor(nodes: string[], options?: OPTIONS);
|
|
38
40
|
start(): Promise<void>;
|
|
39
41
|
stop(): void;
|
|
40
42
|
restart(): void;
|
|
43
|
+
private nexusLight;
|
|
41
44
|
private check;
|
|
42
45
|
private sendMessage;
|
|
43
46
|
}
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @project @beblurt/blurt-nodes-checker
|
|
3
|
-
* @
|
|
3
|
+
* @file Blurt Nodes Checker
|
|
4
|
+
* @description Testing the different RPC nodes of the Blurt blockchain
|
|
5
|
+
* @author BeBlurt <https://beblurt.com/@beblurt>
|
|
4
6
|
* @license
|
|
5
7
|
* Copyright (C) 2022 IMT ASE Co., LTD
|
|
6
8
|
*
|
|
@@ -46,12 +48,24 @@ export class BlurtNodesChecker {
|
|
|
46
48
|
writable: true,
|
|
47
49
|
value: void 0
|
|
48
50
|
});
|
|
51
|
+
Object.defineProperty(this, "debug", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
configurable: true,
|
|
54
|
+
writable: true,
|
|
55
|
+
value: false
|
|
56
|
+
});
|
|
49
57
|
Object.defineProperty(this, "full", {
|
|
50
58
|
enumerable: true,
|
|
51
59
|
configurable: true,
|
|
52
60
|
writable: true,
|
|
53
61
|
value: false
|
|
54
62
|
});
|
|
63
|
+
Object.defineProperty(this, "nexus", {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
configurable: true,
|
|
66
|
+
writable: true,
|
|
67
|
+
value: false
|
|
68
|
+
});
|
|
55
69
|
Object.defineProperty(this, "interval", {
|
|
56
70
|
enumerable: true,
|
|
57
71
|
configurable: true,
|
|
@@ -74,7 +88,7 @@ export class BlurtNodesChecker {
|
|
|
74
88
|
enumerable: true,
|
|
75
89
|
configurable: true,
|
|
76
90
|
writable: true,
|
|
77
|
-
value: axios.
|
|
91
|
+
value: axios.create()
|
|
78
92
|
});
|
|
79
93
|
Object.defineProperty(this, "intercept", {
|
|
80
94
|
enumerable: true,
|
|
@@ -89,8 +103,12 @@ export class BlurtNodesChecker {
|
|
|
89
103
|
value: testList(20000000, "blurtofficial", "blurt-hardfork-0-8-a-new-consensus")
|
|
90
104
|
});
|
|
91
105
|
if (options) {
|
|
106
|
+
if (options.debug && (typeof options.debug) === 'boolean')
|
|
107
|
+
this.debug = options.debug;
|
|
92
108
|
if (options.full && (typeof options.full) === 'boolean')
|
|
93
109
|
this.full = options.full;
|
|
110
|
+
if (options.nexus && (typeof options.nexus) === 'boolean')
|
|
111
|
+
this.nexus = options.nexus;
|
|
94
112
|
if (options.interval && typeof options.interval === 'number')
|
|
95
113
|
this.interval = options.interval * 1000;
|
|
96
114
|
if (options.timeout && typeof options.timeout === 'number')
|
|
@@ -146,51 +164,103 @@ export class BlurtNodesChecker {
|
|
|
146
164
|
clearInterval(this.timer);
|
|
147
165
|
this.start();
|
|
148
166
|
}
|
|
149
|
-
async
|
|
167
|
+
async nexusLight(node) {
|
|
168
|
+
return new Promise((resolve) => {
|
|
169
|
+
const nexusOptions = {
|
|
170
|
+
method: "post",
|
|
171
|
+
url: node.url,
|
|
172
|
+
headers: {
|
|
173
|
+
"Content-Type": "application/json"
|
|
174
|
+
},
|
|
175
|
+
data: {
|
|
176
|
+
jsonrpc: "2.0",
|
|
177
|
+
method: "bridge.unread_notifications",
|
|
178
|
+
params: { "account": "blurtofficial" },
|
|
179
|
+
id: 1
|
|
180
|
+
},
|
|
181
|
+
timeout: this.timeout
|
|
182
|
+
};
|
|
183
|
+
this.instance(nexusOptions).then(async (unread_notifications) => {
|
|
184
|
+
const unread = unread_notifications.data;
|
|
185
|
+
if (unread.result) {
|
|
186
|
+
resolve(true);
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
resolve(false);
|
|
190
|
+
}
|
|
191
|
+
}).catch(e => {
|
|
192
|
+
if (this.debug) {
|
|
193
|
+
console.warn('[BNC] Nexus Light: ', e instanceof Error ? e.message : 'Unknown error!');
|
|
194
|
+
}
|
|
195
|
+
resolve(false);
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
check() {
|
|
150
200
|
/** Define the execution time (used for sendMessage) */
|
|
151
201
|
const checkTime = Date.now();
|
|
152
202
|
/** Node Loop */
|
|
153
203
|
for (const [i, node] of this.nodes.entries()) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
204
|
+
/** We reach the reset number of tests => reinit counters value */
|
|
205
|
+
if (this.reset && (node.nb_ok + node.nb_error + node.nb_degraded) === this.reset) {
|
|
206
|
+
this.nodes[i].nb_ok = 0;
|
|
207
|
+
this.nodes[i].nb_error = 0;
|
|
208
|
+
this.nodes[i].nb_degraded = 0;
|
|
209
|
+
if (this.debug) {
|
|
210
|
+
console.log('[BNC] reset counter', node.url);
|
|
160
211
|
}
|
|
212
|
+
}
|
|
213
|
+
/** hrtime */
|
|
214
|
+
const startRequestNode = hrtime();
|
|
215
|
+
/** First request to BLURT node (light test) */
|
|
216
|
+
const options = {
|
|
217
|
+
method: "post",
|
|
218
|
+
url: node.url,
|
|
219
|
+
headers: {
|
|
220
|
+
"Content-Type": "application/json"
|
|
221
|
+
},
|
|
222
|
+
data: {
|
|
223
|
+
jsonrpc: "2.0",
|
|
224
|
+
method: "condenser_api.get_config",
|
|
225
|
+
params: [],
|
|
226
|
+
id: 1
|
|
227
|
+
},
|
|
228
|
+
timeout: this.timeout
|
|
229
|
+
};
|
|
230
|
+
this.instance(options).then(async (get_config) => {
|
|
161
231
|
/** hrtime */
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
this.
|
|
187
|
-
this.
|
|
188
|
-
this.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
232
|
+
const stopRequestNode = hrtime(startRequestNode);
|
|
233
|
+
const milli = (stopRequestNode[0] * 1e9 + stopRequestNode[1]) / 1e6;
|
|
234
|
+
const config = get_config.data;
|
|
235
|
+
if (config.error)
|
|
236
|
+
throw new Error(config.error.message);
|
|
237
|
+
if (config.result) {
|
|
238
|
+
this.nodes[i].nb_ok++;
|
|
239
|
+
this.nodes[i].status = "online";
|
|
240
|
+
this.nodes[i].version = config.result.BLURT_BLOCKCHAIN_VERSION;
|
|
241
|
+
this.nodes[i].duration = Math.round(milli);
|
|
242
|
+
if (this.debug) {
|
|
243
|
+
console.log('[BNC]', node.url, 'updated');
|
|
244
|
+
}
|
|
245
|
+
/** try Nexus if asked (light test) */
|
|
246
|
+
if (this.nexus) {
|
|
247
|
+
node.nexus = await this.nexusLight(node);
|
|
248
|
+
this.nodes[i].nexus = node.nexus;
|
|
249
|
+
if (this.debug) {
|
|
250
|
+
console.log('[BNC]', node.url, 'Nexus =>', node.nexus);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
/** Execute a full test */
|
|
254
|
+
if (this.full) {
|
|
255
|
+
/** Define the number of test to proceed */
|
|
256
|
+
const doNexus = this.nexus && node.nexus ? true : false;
|
|
257
|
+
const doNbTests = doNexus ? this.tests.length : this.tests.filter(t => !t.nexus).length;
|
|
258
|
+
if (this.debug) {
|
|
259
|
+
console.log('[BNC]', node.url, 'Nb Tests to proceed =', doNbTests, 'Proceed Nexus =>', doNexus);
|
|
260
|
+
}
|
|
261
|
+
/** Test Loop */
|
|
262
|
+
for (const test of this.tests) {
|
|
263
|
+
if (doNexus || !test.nexus) {
|
|
194
264
|
/** hrtime */
|
|
195
265
|
const startRequestTest = hrtime();
|
|
196
266
|
/** Check if previous test */
|
|
@@ -254,8 +324,11 @@ export class BlurtNodesChecker {
|
|
|
254
324
|
this.nodes[i].test_result.push(r);
|
|
255
325
|
}
|
|
256
326
|
/** End of tests for the node? */
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
327
|
+
const nbTests = this.nodes[i].test_result.filter(n => n.last_check === checkTime).length;
|
|
328
|
+
if (this.debug) {
|
|
329
|
+
console.log('[BNC]', node.url, 'Proceed test =>', nbTests, '/', doNbTests);
|
|
330
|
+
}
|
|
331
|
+
if (nbTests === doNbTests) {
|
|
259
332
|
/** assign the execution time */
|
|
260
333
|
this.nodes[i].last_check = checkTime;
|
|
261
334
|
/** Send message? */
|
|
@@ -298,33 +371,33 @@ export class BlurtNodesChecker {
|
|
|
298
371
|
});
|
|
299
372
|
}
|
|
300
373
|
}
|
|
301
|
-
else {
|
|
302
|
-
/** assign the execution time */
|
|
303
|
-
this.nodes[i].last_check = checkTime;
|
|
304
|
-
/** Send message? */
|
|
305
|
-
this.sendMessage(checkTime);
|
|
306
|
-
}
|
|
307
374
|
}
|
|
308
375
|
else {
|
|
309
|
-
this.nodes[i].nb_error++;
|
|
310
|
-
this.nodes[i].status = "error";
|
|
311
|
-
this.nodes[i].error = "No result!";
|
|
312
376
|
/** assign the execution time */
|
|
313
377
|
this.nodes[i].last_check = checkTime;
|
|
314
378
|
/** Send message? */
|
|
315
379
|
this.sendMessage(checkTime);
|
|
316
380
|
}
|
|
317
|
-
}
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
318
383
|
this.nodes[i].nb_error++;
|
|
319
384
|
this.nodes[i].status = "error";
|
|
320
|
-
|
|
321
|
-
this.nodes[i].error = error.message;
|
|
385
|
+
this.nodes[i].error = "No result!";
|
|
322
386
|
/** assign the execution time */
|
|
323
387
|
this.nodes[i].last_check = checkTime;
|
|
324
388
|
/** Send message? */
|
|
325
389
|
this.sendMessage(checkTime);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
390
|
+
}
|
|
391
|
+
}).catch(error => {
|
|
392
|
+
this.nodes[i].nb_error++;
|
|
393
|
+
this.nodes[i].status = "error";
|
|
394
|
+
if (error)
|
|
395
|
+
this.nodes[i].error = error.message;
|
|
396
|
+
/** assign the execution time */
|
|
397
|
+
this.nodes[i].last_check = checkTime;
|
|
398
|
+
/** Send message? */
|
|
399
|
+
this.sendMessage(checkTime);
|
|
400
|
+
});
|
|
328
401
|
}
|
|
329
402
|
}
|
|
330
403
|
async sendMessage(checkTime) {
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;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AAC,CAAE,CAAC,KAAK,GAAI,YAAY,CAAA;oBAEpC,gCAAgC;oBAChC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,UAAU,GAAG,SAAS,CAAA;oBAErC,oBAAoB;oBACpB,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;iBAC5B;YACH,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;gBACf,IAAI,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,QAAQ,EAAE,CAAA;gBACzB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,MAAM,GAAG,OAAO,CAAA;gBAC/B,IAAG,KAAK;oBAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,KAAK,GAAK,KAAkC,CAAC,OAAO,CAAA;gBAE7E,gCAAgC;gBAChC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,UAAU,GAAG,SAAS,CAAA;gBAErC,oBAAoB;gBACpB,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;YAC7B,CAAC,CAAC,CAAA;SACH;IACH,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,SAAiB;QACzC,oBAAoB;QACpB,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,SAAS,CAAC,CAAA;QAExE,IAAG,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,aAAa,CAAC,MAAM;YAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC9E,CAAC;CACF"}
|
package/lib/test.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @project @beblurt/blurt-nodes-checker
|
|
3
|
-
* @
|
|
3
|
+
* @file Full tests
|
|
4
|
+
* @description Testing the different RPC nodes of the Blurt blockchain
|
|
5
|
+
* @author BeBlurt <https://beblurt.com/@beblurt>
|
|
4
6
|
* @license
|
|
5
7
|
* Copyright (C) 2022 IMT ASE Co., LTD
|
|
6
8
|
*
|
package/lib/test.js
CHANGED
|
@@ -1,31 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @project @beblurt/blurt-nodes-checker
|
|
3
|
+
* @file Full tests
|
|
4
|
+
* @description Testing the different RPC nodes of the Blurt blockchain
|
|
5
|
+
* @author BeBlurt <https://beblurt.com/@beblurt>
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright (C) 2022 IMT ASE Co., LTD
|
|
8
|
+
*
|
|
9
|
+
* This program is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
1
22
|
export const testList = (block, account, permlink) => {
|
|
2
23
|
return [
|
|
3
24
|
{
|
|
4
|
-
name: "
|
|
5
|
-
description: "
|
|
6
|
-
|
|
7
|
-
|
|
25
|
+
name: "Bridge | account_notifications ",
|
|
26
|
+
description: "Account notifications",
|
|
27
|
+
nexus: true,
|
|
28
|
+
method: "bridge.account_notifications",
|
|
29
|
+
params: { account, min_score: 25, last_id: null, limit: 10 },
|
|
30
|
+
validator: (result) => Array.isArray(result) && result.length > 0 ? true : false
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "Bridge | get_payout_stats ",
|
|
34
|
+
description: "Get payout stats",
|
|
35
|
+
nexus: true,
|
|
36
|
+
method: "bridge.get_payout_stats",
|
|
37
|
+
params: { limit: 10 },
|
|
8
38
|
validator: (result) => {
|
|
9
|
-
return result.
|
|
39
|
+
return result.items ? true : false;
|
|
10
40
|
}
|
|
11
41
|
},
|
|
12
42
|
{
|
|
13
|
-
name: "
|
|
43
|
+
name: "Bridge | get_post ",
|
|
44
|
+
description: "Fetch a single post",
|
|
45
|
+
nexus: true,
|
|
46
|
+
method: "bridge.get_post",
|
|
47
|
+
params: { author: account, permlink, observer: null },
|
|
48
|
+
validator: (result) => {
|
|
49
|
+
return result.title ? true : false;
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "Bridge | get_profile ",
|
|
54
|
+
description: "Resume of a profile",
|
|
55
|
+
nexus: true,
|
|
56
|
+
method: "bridge.get_profile",
|
|
57
|
+
params: { account, observer: null },
|
|
58
|
+
validator: (result) => {
|
|
59
|
+
return result.created ? true : false;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "Bridge | list_communities ",
|
|
64
|
+
description: "List of communities",
|
|
65
|
+
nexus: true,
|
|
66
|
+
method: "bridge.list_communities",
|
|
67
|
+
params: { last: null, limit: 10, query: null, sort: 'rank', observer: account },
|
|
68
|
+
validator: (result) => Array.isArray(result) && result.length > 0 ? true : false
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "Condenser | Get Account",
|
|
14
72
|
description: "Retrieve an account details",
|
|
73
|
+
nexus: false,
|
|
15
74
|
method: "condenser_api.get_accounts",
|
|
16
75
|
params: [[account]],
|
|
17
76
|
validator: (result) => Array.isArray(result) && result.length > 0 ? true : false
|
|
18
77
|
},
|
|
19
78
|
{
|
|
20
|
-
name: "
|
|
21
|
-
description: "
|
|
79
|
+
name: "Condenser | Get Block",
|
|
80
|
+
description: "Get Block",
|
|
81
|
+
nexus: false,
|
|
82
|
+
method: "condenser_api.get_block",
|
|
83
|
+
params: [block],
|
|
84
|
+
validator: (result) => {
|
|
85
|
+
return result.witness ? true : false;
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "Condenser | Get Blog Entries",
|
|
90
|
+
description: "Retrieve the list of blog entries for an account",
|
|
91
|
+
nexus: false,
|
|
22
92
|
method: "condenser_api.get_blog_entries",
|
|
23
93
|
params: [account, 0, 25],
|
|
24
94
|
validator: (result) => Array.isArray(result) && result.length > 0 ? true : false
|
|
25
95
|
},
|
|
26
96
|
{
|
|
27
|
-
name: "
|
|
28
|
-
description: "Retrieve the content (post or comment)
|
|
97
|
+
name: "Condenser | Get Content",
|
|
98
|
+
description: "Retrieve the content (post or comment)",
|
|
99
|
+
nexus: false,
|
|
29
100
|
method: "condenser_api.get_content",
|
|
30
101
|
params: [account, permlink],
|
|
31
102
|
validator: (result) => {
|
|
@@ -33,8 +104,9 @@ export const testList = (block, account, permlink) => {
|
|
|
33
104
|
}
|
|
34
105
|
},
|
|
35
106
|
{
|
|
36
|
-
name: "
|
|
107
|
+
name: "Condenser | Get Dynamic Global Propertie",
|
|
37
108
|
description: "Check chain global properties",
|
|
109
|
+
nexus: false,
|
|
38
110
|
method: "condenser_api.get_dynamic_global_properties",
|
|
39
111
|
params: [],
|
|
40
112
|
validator: (result) => {
|
|
@@ -42,8 +114,9 @@ export const testList = (block, account, permlink) => {
|
|
|
42
114
|
}
|
|
43
115
|
},
|
|
44
116
|
{
|
|
45
|
-
name: "
|
|
46
|
-
description: "Retrieve a list of discussions by blog
|
|
117
|
+
name: "Condenser | Get Disccusion By Blog",
|
|
118
|
+
description: "Retrieve a list of discussions by blog",
|
|
119
|
+
nexus: false,
|
|
47
120
|
method: "condenser_api.get_discussions_by_blog",
|
|
48
121
|
params: [{ tag: account, limit: 5, truncate_body: 1 }],
|
|
49
122
|
validator: (result) => Array.isArray(result) && result.length > 0 ? true : false
|
package/lib/test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources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,uCAAuC;YAC/C,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAC,CAAC;YACrD,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,MAAsB,CAAC,IAAK,MAAuB,CAAC,MAAM,GAAG,CAAC,CAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;SACpH;KACF,CAAA;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beblurt/blurt-nodes-checker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "BLURT blockchain RPC nodes servers checker (latency, availability, methods)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"node": ">=14.16",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"commit": "git-cz",
|
|
15
15
|
"release": "standard-version",
|
|
16
16
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
17
|
-
"build": "tsc --declaration",
|
|
17
|
+
"build": "tsc -p tsconfig.json --declaration",
|
|
18
18
|
"build-browser": "node ./build.js"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
@@ -29,26 +29,27 @@
|
|
|
29
29
|
"blurt rpc",
|
|
30
30
|
"blurt blockchain"
|
|
31
31
|
],
|
|
32
|
-
"author": "@beblurt (https://
|
|
32
|
+
"author": "@beblurt (https://beblurt.com/@beblurt)",
|
|
33
33
|
"license": "GPL-3.0-or-later",
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://gitlab.com/beblurt/blurt-nodes-checker/issues"
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://gitlab.com/beblurt/blurt-nodes-checker#readme",
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/node": "^
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
41
|
-
"@typescript-eslint/parser": "^5.
|
|
39
|
+
"@types/node": "^18.11.9",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
|
41
|
+
"@typescript-eslint/parser": "^5.43.0",
|
|
42
42
|
"commitizen": "^4.2.5",
|
|
43
|
-
"esbuild": "^0.15.
|
|
44
|
-
"eslint": "^8.
|
|
43
|
+
"esbuild": "^0.15.14",
|
|
44
|
+
"eslint": "^8.28.0",
|
|
45
45
|
"prettier": "^2.7.1",
|
|
46
46
|
"standard-version": "^9.5.0",
|
|
47
|
-
"typescript": "^4.
|
|
47
|
+
"typescript": "^4.9.3"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"
|
|
51
|
-
"
|
|
50
|
+
"@beblurt/dblurt": "^0.9.4",
|
|
51
|
+
"axios": "^1.1.3",
|
|
52
|
+
"rxjs": "^7.5.7"
|
|
52
53
|
},
|
|
53
54
|
"contributors": [
|
|
54
55
|
"@beblurt (https://blurt.blog/@beblurt)"
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare type FEE_INFO = 3 | {
|
|
2
|
-
operation_flat_fee: number;
|
|
3
|
-
bandwidth_kbytes_fee: number;
|
|
4
|
-
};
|
|
5
|
-
export declare type TRANSACTION = {
|
|
6
|
-
ref_block_num: number;
|
|
7
|
-
ref_block_prefix: number;
|
|
8
|
-
expiration: string;
|
|
9
|
-
operations: unknown[];
|
|
10
|
-
extensions: unknown[];
|
|
11
|
-
signatures: string[];
|
|
12
|
-
};
|
|
13
|
-
export declare type BLOCK_GET_BLOCK = {
|
|
14
|
-
block: {
|
|
15
|
-
previous: string;
|
|
16
|
-
timestamp: string;
|
|
17
|
-
witness: string;
|
|
18
|
-
transaction_merkle_root: string;
|
|
19
|
-
extensions: FEE_INFO[];
|
|
20
|
-
witness_signature: string;
|
|
21
|
-
transactions: TRANSACTION[];
|
|
22
|
-
block_id: string;
|
|
23
|
-
signing_key: string;
|
|
24
|
-
transaction_ids: string[];
|
|
25
|
-
};
|
|
26
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GET_BLOCK.js","sourceRoot":"","sources":["../../../src/helpers/BLOCK_API/GET_BLOCK.ts"],"names":[],"mappings":""}
|