@pioneer-platform/blockbook 8.20.1 → 8.25.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/CHANGELOG.md CHANGED
@@ -1,5 +1,60 @@
1
1
  # @pioneer-platform/blockbook
2
2
 
3
+ ## 8.25.0
4
+
5
+ ### Minor Changes
6
+
7
+ - chore: feat(pioneer-server): Migrate from Bun to Node.js for Blockbook WebSocket compatibility
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @pioneer-platform/nodes@8.24.0
13
+
14
+ ## 8.24.0
15
+
16
+ ### Minor Changes
17
+
18
+ - feat(pioneer-server): Migrate from Bun to Node.js for Blockbook WebSocket compatibility
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+ - @pioneer-platform/nodes@8.23.0
24
+
25
+ ## 8.23.0
26
+
27
+ ### Minor Changes
28
+
29
+ - feat(pioneer-server): Migrate from Bun to Node.js for Blockbook WebSocket compatibility
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies
34
+ - @pioneer-platform/nodes@8.22.0
35
+
36
+ ## 8.22.0
37
+
38
+ ### Minor Changes
39
+
40
+ - feat(pioneer-server): Migrate from Bun to Node.js for Blockbook WebSocket compatibility
41
+
42
+ ### Patch Changes
43
+
44
+ - Updated dependencies
45
+ - @pioneer-platform/nodes@8.21.0
46
+
47
+ ## 8.21.0
48
+
49
+ ### Minor Changes
50
+
51
+ - feat(pioneer-server): Migrate from Bun to Node.js for Blockbook WebSocket compatibility
52
+
53
+ ### Patch Changes
54
+
55
+ - Updated dependencies
56
+ - @pioneer-platform/nodes@8.20.0
57
+
3
58
  ## 8.20.1
4
59
 
5
60
  ### Patch Changes
package/lib/index.js CHANGED
@@ -298,14 +298,16 @@ var init_network = function (servers) {
298
298
  return __generator(this, function (_a) {
299
299
  switch (_a.label) {
300
300
  case 0:
301
- tag = ' | get_txs_by_address | ';
301
+ tag = ' | blockbook-module | ';
302
302
  _a.label = 1;
303
303
  case 1:
304
304
  _a.trys.push([1, 3, , 4]);
305
+ console.log('[DEBUG] init_network CALLED');
305
306
  log.debug(tag, "checkpoint: ");
306
307
  return [4 /*yield*/, nodes.getBlockbooks()];
307
308
  case 2:
308
309
  SEED_NODES = _a.sent();
310
+ console.log('[DEBUG] SEED_NODES loaded:', SEED_NODES.length, 'blockbooks');
309
311
  log.info(tag, "SEED_NODES: ", SEED_NODES);
310
312
  blockbooks = [];
311
313
  if (servers && Array.isArray(servers)) { // Type checking for array
@@ -315,12 +317,15 @@ var init_network = function (servers) {
315
317
  log.warn("Invalid 'servers' parameter. Expected an array.");
316
318
  blockbooks = SEED_NODES;
317
319
  }
320
+ console.log('[DEBUG] Total blockbooks to process:', blockbooks.length);
318
321
  log.debug(tag, "blockbooks: ", blockbooks.length);
319
322
  // Clear existing nodes
320
323
  BLOCKBOOK_NODES = {};
321
324
  // Process nodes with priority assignment
325
+ console.log('[DEBUG] Processing', blockbooks.length, 'blockbooks...');
322
326
  for (i = 0; i < blockbooks.length; i++) {
323
327
  blockbook = blockbooks[i];
328
+ console.log('[DEBUG] Processing blockbook', i + 1, '/', blockbooks.length, ':', blockbook.symbol);
324
329
  if (blockbook && blockbook.service) {
325
330
  symbol = blockbook.symbol.toUpperCase();
326
331
  priority = 50;
@@ -338,6 +343,7 @@ var init_network = function (servers) {
338
343
  }
339
344
  if (blockbook && blockbook.websocket) {
340
345
  wsUrl = blockbook.websocket;
346
+ console.log('[DEBUG] Found WebSocket for', blockbook.symbol, ':', wsUrl);
341
347
  // Ensure proper wss:// protocol
342
348
  if (!wsUrl.startsWith('wss://') && !wsUrl.startsWith('ws://')) {
343
349
  wsUrl = 'wss://' + wsUrl;
@@ -348,20 +354,24 @@ var init_network = function (servers) {
348
354
  // Remove any existing /wss/ suffix, then add /wss/API_KEY
349
355
  wsUrl = wsUrl.replace(/\/wss\/?$/, ''); // Remove trailing /wss or /wss/
350
356
  wsUrl = wsUrl + '/wss/' + NOW_NODES_API;
357
+ console.log('[DEBUG] Added API key to', blockbook.symbol, 'WebSocket');
351
358
  log.info(tag, "Configured NowNodes websocket for ".concat(blockbook.symbol, " with API key"));
352
359
  }
353
360
  // Ensure /websocket suffix (only if not already there)
354
361
  if (!wsUrl.endsWith('/websocket')) {
355
362
  wsUrl = wsUrl + '/websocket';
356
363
  }
364
+ console.log('[DEBUG] Final WebSocket URL for', blockbook.symbol, ':', wsUrl);
357
365
  log.info(tag, "WebSocket URL for ".concat(blockbook.symbol, ": ").concat(wsUrl));
358
366
  // Use blockbook-client package
359
367
  BLOCKBOOK_SOCKETS[blockbook.symbol.toUpperCase()] = new Blockbook({
360
368
  nodes: [wsUrl],
361
369
  disableTypeValidation: true,
362
370
  });
371
+ console.log('[DEBUG] Created Blockbook socket for', blockbook.symbol);
363
372
  }
364
373
  else {
374
+ console.log('[DEBUG] NO WebSocket for', blockbook.symbol);
365
375
  log.info(tag, "no websocket for: ", blockbook.symbol);
366
376
  }
367
377
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/blockbook",
3
- "version": "8.20.1",
3
+ "version": "8.25.0",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "scripts": {
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@pioneer-platform/loggerdog": "^8.11.0",
15
- "@pioneer-platform/nodes": "^8.19.0",
15
+ "@pioneer-platform/nodes": "^8.24.0",
16
16
  "@pioneer-platform/pioneer-caip": "^9.19.0",
17
17
  "@types/request-promise-native": "^1.0.17",
18
18
  "axiom": "^0.1.6",