@pioneer-platform/blockbook 8.1.53 → 8.1.54

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 CHANGED
@@ -10,6 +10,14 @@ declare const axiosRetry: any;
10
10
  declare let BLOCKBOOK_URLS: any;
11
11
  declare let BLOCKBOOK_SOCKETS: any;
12
12
  declare let spec: string;
13
+ declare let SERVERS_CONFIG: {
14
+ symbol: string;
15
+ blockchain: string;
16
+ caip: string;
17
+ type: string;
18
+ service: string;
19
+ websocket: string;
20
+ }[];
13
21
  declare let init_network: (servers?: any) => Promise<boolean>;
14
22
  declare let get_fees: (coin: string) => Promise<any>;
15
23
  declare let get_info_by_pubkey: (coin: string, pubkey: string, page?: string | undefined) => Promise<any>;
package/lib/index.js CHANGED
@@ -67,6 +67,96 @@ axiosRetry(axios, {
67
67
  var BLOCKBOOK_URLS = {};
68
68
  var BLOCKBOOK_SOCKETS = {};
69
69
  var spec = process.env['PIONEER_SPEC'] || 'https://pioneers.dev/spec/swagger.json';
70
+ var SERVERS_CONFIG = [
71
+ {
72
+ symbol: "MATIC",
73
+ blockchain: "polygon",
74
+ caip: "eip155:137/slip44:60",
75
+ type: "blockbook",
76
+ service: "https://indexer.polygon.shapeshift.com",
77
+ websocket: "wss://indexer.polygon.shapeshift.com/websocket"
78
+ },
79
+ {
80
+ symbol: "ETH",
81
+ blockchain: "optimism",
82
+ caip: "eip155:10/slip44:60",
83
+ type: "blockbook",
84
+ service: "https://indexer.optimism.shapeshift.com",
85
+ websocket: "wss://indexer.optimism.shapeshift.com/websocket"
86
+ },
87
+ {
88
+ symbol: "LTC",
89
+ blockchain: "litecoin",
90
+ caip: "bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2",
91
+ type: "blockbook",
92
+ service: "https://indexer.litecoin.shapeshift.com",
93
+ websocket: "wss://indexer.litecoin.shapeshift.com/websocket"
94
+ },
95
+ {
96
+ symbol: "xDAI",
97
+ blockchain: "gnosis",
98
+ caip: "eip155:100/slip44:60",
99
+ type: "blockbook",
100
+ service: "https://indexer.gnosis.shapeshift.com",
101
+ websocket: "wss://indexer.gnosis.shapeshift.com/websocket"
102
+ },
103
+ {
104
+ symbol: "ETH",
105
+ blockchain: "ethereum",
106
+ caip: "eip155:1/slip44:60",
107
+ type: "blockbook",
108
+ service: "https://indexer.ethereum.shapeshift.com",
109
+ websocket: "wss://indexer.ethereum.shapeshift.com/websocket"
110
+ },
111
+ {
112
+ symbol: "DOGE",
113
+ blockchain: "dogecoin",
114
+ caip: "bip122:00000000001a91e3dace36e2be3bf030/slip44:3",
115
+ type: "blockbook",
116
+ service: "https://indexer.dogecoin.shapeshift.com",
117
+ websocket: "wss://indexer.dogecoin.shapeshift.com/websocket"
118
+ },
119
+ {
120
+ symbol: "BNB",
121
+ blockchain: "bnbsmartchain",
122
+ caip: "eip155:56/slip44:60",
123
+ type: "blockbook",
124
+ service: "https://indexer.bnbsmartchain.shapeshift.com",
125
+ websocket: "wss://indexer.bnbsmartchain.shapeshift.com/websocket"
126
+ },
127
+ {
128
+ symbol: "BCH",
129
+ blockchain: "bitcoincash",
130
+ caip: "bip122:000000000000000000651ef99cb9fcbe/slip44:145",
131
+ type: "blockbook",
132
+ service: "https://indexer.bitcoincash.shapeshift.com",
133
+ websocket: "wss://indexer.bitcoincash.shapeshift.com/websocket"
134
+ },
135
+ {
136
+ symbol: "BTC",
137
+ blockchain: "bitcoin",
138
+ caip: "bip122:000000000019d6689c085ae165831e93/slip44:0",
139
+ type: "blockbook",
140
+ service: "https://indexer.bitcoin.shapeshift.com",
141
+ websocket: "wss://indexer.bitcoin.shapeshift.com/websocket"
142
+ },
143
+ {
144
+ symbol: "AVAX",
145
+ blockchain: "avalanche",
146
+ caip: "eip155:43114/slip44:60",
147
+ type: "blockbook",
148
+ service: "https://indexer.avalanche.shapeshift.com",
149
+ websocket: "wss://indexer.avalanche.shapeshift.com/websocket"
150
+ },
151
+ {
152
+ symbol: "AVAX",
153
+ blockchain: "avalanche",
154
+ caip: "eip155:43114/slip44:60",
155
+ type: "blockbook",
156
+ service: "https://indexer.avalanche.shapeshift.com",
157
+ websocket: "wss://indexer.avalanche.shapeshift.com/websocket"
158
+ }
159
+ ];
70
160
  module.exports = {
71
161
  init: function (servers) {
72
162
  return init_network(servers);
@@ -143,7 +233,7 @@ var init_network = function (servers) {
143
233
  return [3 /*break*/, 6];
144
234
  case 6:
145
235
  if (blockbooks.length === 0)
146
- throw Error("No blockblocks found!");
236
+ blockbooks.apply(void 0, SERVERS_CONFIG);
147
237
  log.info(tag, "blockbooks: ", blockbooks.length);
148
238
  for (i = 0; i < blockbooks.length; i++) {
149
239
  blockbook = blockbooks[i];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/blockbook",
3
- "version": "8.1.53",
3
+ "version": "8.1.54",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/main.d.ts",
6
6
  "scripts": {