@pioneer-platform/blockbook 8.1.45 → 8.1.49
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/lib/index.d.ts +3 -3
- package/lib/index.js +3 -18
- package/package.json +6 -6
package/lib/index.d.ts
CHANGED
|
@@ -7,12 +7,12 @@ declare const axios: any;
|
|
|
7
7
|
declare const axiosRetry: any;
|
|
8
8
|
declare let BLOCKBOOK_URLS: any;
|
|
9
9
|
declare let get_info_by_pubkey: (coin: string, pubkey: string, page?: string | undefined) => Promise<any>;
|
|
10
|
-
declare let get_txids_by_address: (coin: string, address: string, page?: number
|
|
11
|
-
declare let get_info_by_address: (coin: string, address: string, filter?: string
|
|
10
|
+
declare let get_txids_by_address: (coin: string, address: string, page?: number) => Promise<any>;
|
|
11
|
+
declare let get_info_by_address: (coin: string, address: string, filter?: string) => Promise<any>;
|
|
12
12
|
declare let get_txs_by_xpub: (coin: string, xpub: string) => Promise<any>;
|
|
13
13
|
declare let broadcast_transaction: (coin: string, hex: string) => Promise<any>;
|
|
14
14
|
declare let get_transaction: (coin: string, txid: string) => Promise<any>;
|
|
15
15
|
declare let get_utxos_by_xpub: (coin: string, xpub: string) => Promise<any>;
|
|
16
16
|
declare let get_balance_by_xpub: (coin: string, xpub: any) => Promise<number | undefined>;
|
|
17
|
-
declare let init_network: (servers: any, runtime?: string
|
|
17
|
+
declare let init_network: (servers: any, runtime?: string) => boolean;
|
|
18
18
|
declare let get_node_info: () => Promise<true | undefined>;
|
package/lib/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
18
18
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
19
19
|
function step(op) {
|
|
20
20
|
if (f) throw new TypeError("Generator is already executing.");
|
|
21
|
-
while (_) try {
|
|
21
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
22
22
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
23
23
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
24
24
|
switch (op[0]) {
|
|
@@ -53,7 +53,7 @@ var axiosRetry = require('axios-retry');
|
|
|
53
53
|
axiosRetry(axios, {
|
|
54
54
|
retries: 3,
|
|
55
55
|
retryDelay: function (retryCount) {
|
|
56
|
-
console.log("retry attempt: "
|
|
56
|
+
console.log("retry attempt: ".concat(retryCount));
|
|
57
57
|
return retryCount * 2000; // time interval between retries
|
|
58
58
|
},
|
|
59
59
|
retryCondition: function (error) {
|
|
@@ -294,22 +294,7 @@ var broadcast_transaction = function (coin, hex) {
|
|
|
294
294
|
return [3 /*break*/, 5];
|
|
295
295
|
case 4:
|
|
296
296
|
e_5 = _a.sent();
|
|
297
|
-
|
|
298
|
-
// log.info(tag,"data0: ",e)
|
|
299
|
-
// log.info(tag,"resp: ",resp)
|
|
300
|
-
// log.info(tag,"data0: ",Object.keys(e))
|
|
301
|
-
// log.info(tag,"data1: ",e.response.req)
|
|
302
|
-
// log.info(tag,"data2: ",e.response.data)
|
|
303
|
-
// log.info(tag,"data2: ",e.response.data.error)
|
|
304
|
-
// log.info(tag,"error3: ",e.toJSON().request)
|
|
305
|
-
// log.info(tag,"erro4: ",e.toJSON().data)
|
|
306
|
-
// log.info(tag,"error5: ",e.toJSON().code)
|
|
307
|
-
if (e_5.response.data.error) {
|
|
308
|
-
output.error = e_5.response.data.error;
|
|
309
|
-
}
|
|
310
|
-
else {
|
|
311
|
-
output.error = e_5;
|
|
312
|
-
}
|
|
297
|
+
log.error(tag, "error: ", e_5);
|
|
313
298
|
return [3 /*break*/, 5];
|
|
314
299
|
case 5: return [2 /*return*/, output];
|
|
315
300
|
case 6:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pioneer-platform/blockbook",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.49",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"types": "./lib/main.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"refresh": "rm -rf ./node_modules ./package-lock.json && npm install"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@pioneer-platform/loggerdog": "^8.1.
|
|
15
|
+
"@pioneer-platform/loggerdog": "^8.1.29",
|
|
16
16
|
"@types/request-promise-native": "^1.0.17",
|
|
17
17
|
"@types/ws": "^7.4.2",
|
|
18
|
-
"axios": "^
|
|
18
|
+
"axios": "^1.3.4",
|
|
19
19
|
"axios-retry": "^3.1.9",
|
|
20
20
|
"blockbook-client": "^0.4.3",
|
|
21
21
|
"fake-useragent": "^1.0.1"
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@types/express": "^4.17.6",
|
|
25
25
|
"@types/node": "^13.13.48",
|
|
26
26
|
"nodemon": "^2.0.3",
|
|
27
|
-
"ts-node": "^
|
|
28
|
-
"typescript": "^
|
|
27
|
+
"ts-node": "^10.9.1",
|
|
28
|
+
"typescript": "^5.0.2"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "8c626a669f7045d1eb9c00252d9a81845a57fa50"
|
|
31
31
|
}
|