@pioneer-platform/nodes 8.30.1 → 8.30.3

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.
@@ -1,5 +1,5 @@
1
1
 
2
2
  
3
- > @pioneer-platform/nodes@8.30.1 build /Users/highlander/WebstormProjects/keepkey-stack/projects/pioneer/modules/pioneer/pioneer-nodes
3
+ > @pioneer-platform/nodes@8.30.3 build /Users/highlander/WebstormProjects/keepkey-stack/projects/pioneer/modules/pioneer/pioneer-nodes
4
4
  > tsc -p .
5
5
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @pioneer-platform/nodes
2
2
 
3
+ ## 8.30.3
4
+
5
+ ### Patch Changes
6
+
7
+ - chore: chore: - Services (discovery-service, watchtower)
8
+ - Updated dependencies
9
+ - @pioneer-platform/pioneer-caip@9.19.3
10
+
11
+ ## 8.30.2
12
+
13
+ ### Patch Changes
14
+
15
+ - fa09397: chore: - Services (discovery-service, watchtower)
16
+ - Updated dependencies [fa09397]
17
+ - @pioneer-platform/pioneer-caip@9.19.2
18
+
3
19
  ## 8.30.1
4
20
 
5
21
  ### Patch Changes
package/README.md ADDED
@@ -0,0 +1,170 @@
1
+ # @pioneer-platform/nodes
2
+
3
+ Single source of truth for blockchain node configurations across the Pioneer ecosystem.
4
+
5
+ ## Overview
6
+
7
+ This package provides centralized node configurations for:
8
+ - ✅ 17+ Blockbook node configurations (UTXO & EVM chains)
9
+ - ✅ 1,200+ validated Web3 RPC nodes (70+ EVM networks)
10
+ - ✅ Unchained API configurations (9 networks)
11
+ - ✅ Runtime config loading with API key injection
12
+ - ✅ TypeScript type definitions
13
+ - ✅ Node validation tooling
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ pnpm add @pioneer-platform/nodes
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ### Static Import (Compile-Time)
24
+
25
+ ```typescript
26
+ import { getBlockbooks } from '@pioneer-platform/nodes';
27
+
28
+ const configs = getBlockbooks();
29
+ // Returns array of blockbook node configs
30
+ ```
31
+
32
+ ### Runtime Import (Dynamic Loading)
33
+
34
+ **Use this for services that need runtime API key injection:**
35
+
36
+ ```typescript
37
+ import { getBlockbookConfigs } from '@pioneer-platform/nodes/runtime';
38
+
39
+ const configs = getBlockbookConfigs({
40
+ apiKey: process.env.NOW_NODES_API,
41
+ injectApiKeys: true // Replaces {API_KEY} placeholder
42
+ });
43
+ ```
44
+
45
+ ### TypeScript Types
46
+
47
+ ```typescript
48
+ import type { BlockbookNodeConfig, NodeType } from '@pioneer-platform/nodes';
49
+
50
+ function processNode(config: BlockbookNodeConfig) {
51
+ console.log(`${config.symbol} (${config.networkId})`);
52
+ console.log(`Service: ${config.service}`);
53
+ console.log(`WebSocket: ${config.websocket}`);
54
+ }
55
+ ```
56
+
57
+ ## Node Configuration Format
58
+
59
+ ### Blockbook Nodes
60
+
61
+ ```typescript
62
+ {
63
+ symbol: "BTC", // Chain ticker
64
+ blockchain: "bitcoin", // Full blockchain name
65
+ networkId: "bip122:...", // CAIP-2 network identifier
66
+ caip: "bip122:.../slip44:0", // CAIP-19 asset identifier
67
+ type: "blockbook", // Node type
68
+ service: "https://.../{ API_KEY}", // REST API endpoint
69
+ websocket: "wss://.../{ API_KEY}", // WebSocket URL
70
+ expectedBlockTime: 600 // Block time (seconds)
71
+ }
72
+ ```
73
+
74
+ ## Supported Chains
75
+
76
+ **UTXO Chains** (12):
77
+ BTC, LTC, DOGE, BCH, DASH, ZEC, DGB, GRS, DCR, BTG, KMD, BASE
78
+
79
+ **EVM Chains** (5):
80
+ ETH, BSC, MATIC, AVAX, ARB
81
+
82
+ **Additional chains available via web3.ts** (70+ EVM networks)
83
+
84
+ ## Migration Guide
85
+
86
+ ### For Pioneer Watchtower
87
+
88
+ **Before** (file-based JSON loading):
89
+ ```typescript
90
+ const configPath = path.join(__dirname, '../blockbook_nodes.json');
91
+ const chainConfig = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
92
+ ```
93
+
94
+ **After** (package-based loading):
95
+ ```typescript
96
+ import { getBlockbookConfigs } from '@pioneer-platform/nodes/runtime';
97
+
98
+ const chainConfig = {
99
+ blockbooks: getBlockbookConfigs({
100
+ apiKey: NOW_NODES_API,
101
+ injectApiKeys: true
102
+ })
103
+ };
104
+ ```
105
+
106
+ ## Node Validation
107
+
108
+ Validate node health and connectivity:
109
+
110
+ ```bash
111
+ pnpm run validate-nodes # Default: 5s timeout, 20 parallel
112
+ pnpm run validate-nodes:verbose # With detailed logs
113
+ pnpm run validate-nodes:fast # 3s timeout, 30 parallel
114
+ ```
115
+
116
+ ## Contributing
117
+
118
+ To add a new node:
119
+
120
+ 1. Add config to `src/seeds.ts` (blockbooks array)
121
+ 2. Follow existing format with CAIP-2 networkId
122
+ 3. Include websocket URL if available
123
+ 4. Add expectedBlockTime for timeout calculations
124
+ 5. Build: `pnpm run build`
125
+ 6. Test: `pnpm test`
126
+ 7. Validate: `pnpm run validate-nodes`
127
+
128
+ ## WebSocket URL Patterns
129
+
130
+ **UTXO chains**: Include `/websocket` suffix
131
+ ```
132
+ wss://btc.nownodes.io/wss/{API_KEY}/websocket
133
+ ```
134
+
135
+ **EVM -blockbook endpoints**: Include `/websocket` suffix
136
+ ```
137
+ wss://eth-blockbook.nownodes.io/wss/{API_KEY}/websocket
138
+ ```
139
+
140
+ **EVM specific endpoints** (AVAX, ARB): NO `/websocket` suffix
141
+ ```
142
+ wss://avax-blockbook.nownodes.io/wss/{API_KEY}
143
+ ```
144
+
145
+ ## Architecture
146
+
147
+ ```
148
+ @pioneer-platform/nodes
149
+ ├── src/
150
+ │ ├── index.ts - Main exports
151
+ │ ├── runtime.ts - Runtime config loading with API key injection
152
+ │ ├── types.ts - TypeScript type definitions
153
+ │ ├── seeds.ts - Blockbook & Unchained node configs
154
+ │ ├── web3.ts - Web3/EVM RPC nodes (auto-generated)
155
+ │ └── validate-nodes.ts - Node validation tooling
156
+ └── lib/ - Compiled JavaScript output
157
+ ```
158
+
159
+ ## Package Exports
160
+
161
+ ```json
162
+ {
163
+ ".": "./lib/index.js",
164
+ "./runtime": "./lib/runtime.js"
165
+ }
166
+ ```
167
+
168
+ ## License
169
+
170
+ See project root for license information.
package/lib/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ export { getBlockbookConfigs, RuntimeOptions } from './runtime';
2
+ export type { BaseNodeConfig, BlockbookNodeConfig, ApiOnlyNodeConfig, UnchainedNodeConfig, Web3NodeConfig, AnyNodeConfig } from './types';
3
+ export { NodeType } from './types';
1
4
  export declare const init: (type: string, config: any, isTestnet: boolean) => Promise<boolean>;
2
5
  export declare const getWeb3Nodes: () => {
3
6
  networkId: string;
@@ -26,22 +29,6 @@ export declare const getBlockbooks: () => ({
26
29
  type: string;
27
30
  service: string;
28
31
  websocket?: undefined;
29
- } | {
30
- symbol: string;
31
- blockchain: string;
32
- caip: string;
33
- type: string;
34
- service: string;
35
- websocket: string;
36
- networkId?: undefined;
37
- } | {
38
- symbol: string;
39
- blockchain: string;
40
- caip: string;
41
- type: string;
42
- service: string;
43
- networkId?: undefined;
44
- websocket?: undefined;
45
32
  })[];
46
33
  export declare const getUnchaineds: () => {
47
34
  networkId: any;
package/lib/index.js CHANGED
@@ -51,13 +51,18 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
51
51
  }
52
52
  };
53
53
  Object.defineProperty(exports, "__esModule", { value: true });
54
- exports.getUnchaineds = exports.getBlockbooks = exports.getNode = exports.getNodes = exports.getWeb3Nodes = exports.init = void 0;
54
+ exports.getUnchaineds = exports.getBlockbooks = exports.getNode = exports.getNodes = exports.getWeb3Nodes = exports.init = exports.NodeType = exports.getBlockbookConfigs = void 0;
55
55
  var TAG = " | Pioneer Nodes | ";
56
56
  var log = require('@pioneer-platform/loggerdog')();
57
57
  var _a = require("@pioneer-platform/pioneer-caip"), shortListNameToCaip = _a.shortListNameToCaip, shortListSymbolToCaip = _a.shortListSymbolToCaip, evmCaips = _a.evmCaips;
58
58
  var seeds_1 = require("./seeds");
59
59
  var web3_1 = require("./web3");
60
60
  var NODES = web3_1.web3Seeds;
61
+ // Export runtime config functions
62
+ var runtime_1 = require("./runtime");
63
+ Object.defineProperty(exports, "getBlockbookConfigs", { enumerable: true, get: function () { return runtime_1.getBlockbookConfigs; } });
64
+ var types_1 = require("./types");
65
+ Object.defineProperty(exports, "NodeType", { enumerable: true, get: function () { return types_1.NodeType; } });
61
66
  var init = function (type, config, isTestnet) {
62
67
  return init_nodes(type, config, isTestnet);
63
68
  };
@@ -0,0 +1,44 @@
1
+ export interface RuntimeOptions {
2
+ apiKey?: string;
3
+ injectApiKeys?: boolean;
4
+ }
5
+ /**
6
+ * Get blockbook node configurations with optional runtime API key injection.
7
+ *
8
+ * This function replaces file-based JSON loading patterns and allows services
9
+ * to load configs directly from the @pioneer-platform/nodes package with
10
+ * dynamic API key injection at runtime.
11
+ *
12
+ * @param options - Configuration options
13
+ * @param options.apiKey - API key to inject (replaces {API_KEY} placeholder)
14
+ * @param options.injectApiKeys - Whether to perform API key injection
15
+ * @returns Array of blockbook node configurations
16
+ *
17
+ * @example
18
+ * // Load configs without API key injection
19
+ * const configs = getBlockbookConfigs();
20
+ *
21
+ * @example
22
+ * // Load configs with API key injection
23
+ * const configs = getBlockbookConfigs({
24
+ * apiKey: process.env.NOW_NODES_API,
25
+ * injectApiKeys: true
26
+ * });
27
+ */
28
+ export declare function getBlockbookConfigs(options?: RuntimeOptions): ({
29
+ symbol: string;
30
+ blockchain: string;
31
+ caip: string;
32
+ networkId: string;
33
+ type: string;
34
+ service: string;
35
+ websocket: string;
36
+ } | {
37
+ symbol: string;
38
+ blockchain: string;
39
+ caip: string;
40
+ networkId: string;
41
+ type: string;
42
+ service: string;
43
+ websocket?: undefined;
44
+ })[];
package/lib/runtime.js ADDED
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /*
3
+ Runtime Config Loader
4
+
5
+ Provides runtime API for dynamic blockchain node configuration loading.
6
+ Used by services like watchtower to replace file-based JSON loading.
7
+ */
8
+ var __assign = (this && this.__assign) || function () {
9
+ __assign = Object.assign || function(t) {
10
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
11
+ s = arguments[i];
12
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
13
+ t[p] = s[p];
14
+ }
15
+ return t;
16
+ };
17
+ return __assign.apply(this, arguments);
18
+ };
19
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
20
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
21
+ if (ar || !(i in from)) {
22
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
23
+ ar[i] = from[i];
24
+ }
25
+ }
26
+ return to.concat(ar || Array.prototype.slice.call(from));
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.getBlockbookConfigs = getBlockbookConfigs;
30
+ var seeds_1 = require("./seeds");
31
+ /**
32
+ * Get blockbook node configurations with optional runtime API key injection.
33
+ *
34
+ * This function replaces file-based JSON loading patterns and allows services
35
+ * to load configs directly from the @pioneer-platform/nodes package with
36
+ * dynamic API key injection at runtime.
37
+ *
38
+ * @param options - Configuration options
39
+ * @param options.apiKey - API key to inject (replaces {API_KEY} placeholder)
40
+ * @param options.injectApiKeys - Whether to perform API key injection
41
+ * @returns Array of blockbook node configurations
42
+ *
43
+ * @example
44
+ * // Load configs without API key injection
45
+ * const configs = getBlockbookConfigs();
46
+ *
47
+ * @example
48
+ * // Load configs with API key injection
49
+ * const configs = getBlockbookConfigs({
50
+ * apiKey: process.env.NOW_NODES_API,
51
+ * injectApiKeys: true
52
+ * });
53
+ */
54
+ function getBlockbookConfigs(options) {
55
+ if (options === void 0) { options = {}; }
56
+ // Clone configs to avoid mutating the source
57
+ var configs = __spreadArray([], seeds_1.blockbooks, true);
58
+ // Inject API keys if requested
59
+ if (options.injectApiKeys && options.apiKey) {
60
+ configs = configs.map(function (config) {
61
+ var _a;
62
+ return (__assign(__assign({}, config), { service: config.service.replace('{API_KEY}', options.apiKey), websocket: (_a = config.websocket) === null || _a === void 0 ? void 0 : _a.replace('{API_KEY}', options.apiKey) }));
63
+ });
64
+ }
65
+ return configs;
66
+ }
package/lib/seeds.d.ts CHANGED
@@ -49,22 +49,6 @@ export declare const blockbooks: ({
49
49
  type: string;
50
50
  service: string;
51
51
  websocket?: undefined;
52
- } | {
53
- symbol: string;
54
- blockchain: string;
55
- caip: string;
56
- type: string;
57
- service: string;
58
- websocket: string;
59
- networkId?: undefined;
60
- } | {
61
- symbol: string;
62
- blockchain: string;
63
- caip: string;
64
- type: string;
65
- service: string;
66
- networkId?: undefined;
67
- websocket?: undefined;
68
52
  })[];
69
53
  interface NodeEntry {
70
54
  key: string;
package/lib/seeds.js CHANGED
@@ -119,24 +119,27 @@ exports.blockbooks = [
119
119
  symbol: "DOGE",
120
120
  blockchain: "dogecoin",
121
121
  caip: "bip122:00000000001a91e3dace36e2be3bf030/slip44:3",
122
+ networkId: "bip122:00000000001a91e3dace36e2be3bf030",
122
123
  type: "blockbook",
123
- service: "https://dogebook.nownodes.io/cf522543-87e2-4dd6-b645-2fbfd0bc61f6",
124
+ service: "https://dogebook.nownodes.io/{API_KEY}",
124
125
  websocket: "wss://doge.nownodes.io/wss/{API_KEY}/websocket"
125
126
  },
126
127
  {
127
128
  symbol: "LTC",
128
129
  blockchain: "litecoin",
129
130
  caip: "bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2",
131
+ networkId: "bip122:12a765e31ffd4059bada1e25190f6e98",
130
132
  type: "blockbook",
131
- service: "https://ltcbook.nownodes.io/cf522543-87e2-4dd6-b645-2fbfd0bc61f6",
133
+ service: "https://ltcbook.nownodes.io/{API_KEY}",
132
134
  websocket: "wss://ltc.nownodes.io/wss/{API_KEY}/websocket"
133
135
  },
134
136
  {
135
137
  symbol: "BCH",
136
138
  blockchain: "bitcoincash",
137
139
  caip: "bip122:000000000000000000651ef99cb9fcbe/slip44:145",
140
+ networkId: "bip122:000000000000000000651ef99cb9fcbe",
138
141
  type: "blockbook",
139
- service: "https://bchbook.nownodes.io/cf522543-87e2-4dd6-b645-2fbfd0bc61f6",
142
+ service: "https://bchbook.nownodes.io/{API_KEY}",
140
143
  websocket: "wss://bch.nownodes.io/wss/{API_KEY}/websocket"
141
144
  },
142
145
  // ============================================================================
@@ -163,8 +166,9 @@ exports.blockbooks = [
163
166
  symbol: "GRS",
164
167
  blockchain: "Groestlcoin",
165
168
  caip: "bip122:00000ac5927c594d49cc0bdb81759d0d/slip44:17",
169
+ networkId: "bip122:00000ac5927c594d49cc0bdb81759d0d",
166
170
  type: "blockbook",
167
- service: "https://grsbook.nownodes.io/cf522543-87e2-4dd6-b645-2fbfd0bc61f6"
171
+ service: "https://grsbook.nownodes.io/{API_KEY}"
168
172
  },
169
173
  {
170
174
  symbol: "DCR",
@@ -172,28 +176,31 @@ exports.blockbooks = [
172
176
  caip: "bip122:00000ac5927c594d49cc0bdb81759d0d/slip44:42",
173
177
  networkId: "bip122:00000ac5927c594d49cc0bdb81759d0d",
174
178
  type: "blockbook",
175
- service: "https://dcr-blockbook.nownodes.io/cf522543-87e2-4dd6-b645-2fbfd0bc61f6"
179
+ service: "https://dcr-blockbook.nownodes.io/{API_KEY}"
176
180
  },
177
181
  {
178
182
  symbol: "BTG",
179
183
  blockchain: "bitcoin gold",
180
184
  caip: "bip122:00069578d7a76f82b2c7117c1334c7ef/slip44:1",
185
+ networkId: "bip122:00069578d7a76f82b2c7117c1334c7ef",
181
186
  type: "blockbook",
182
- service: "https://btg.nownodes.io/cf522543-87e2-4dd6-b645-2fbfd0bc61f6"
187
+ service: "https://btg.nownodes.io/{API_KEY}"
183
188
  },
184
189
  {
185
190
  symbol: "KMD",
186
191
  blockchain: "Komodo",
187
192
  caip: "bip122:027e3758c3a65b12aa1046462b486d0a/slip44:1",
193
+ networkId: "bip122:027e3758c3a65b12aa1046462b486d0a",
188
194
  type: "blockbook",
189
- service: "https://kmdbook.nownodes.io/cf522543-87e2-4dd6-b645-2fbfd0bc61f6"
195
+ service: "https://kmdbook.nownodes.io/{API_KEY}"
190
196
  },
191
197
  {
192
198
  symbol: "ZEC",
193
199
  blockchain: "zcash",
194
200
  caip: "bip122:00040fe8ec8471911baa1db1266ea15d/slip44:133",
201
+ networkId: "bip122:00040fe8ec8471911baa1db1266ea15d",
195
202
  type: "blockbook",
196
- service: "https://zecbook.nownodes.io/cf522543-87e2-4dd6-b645-2fbfd0bc61f6"
203
+ service: "https://zecbook.nownodes.io/{API_KEY}"
197
204
  },
198
205
  // ============================================================================
199
206
  // EVM CHAINS - NowNodes Blockbook
@@ -207,6 +214,42 @@ exports.blockbooks = [
207
214
  service: "https://eth-blockbook.nownodes.io/{API_KEY}",
208
215
  websocket: "wss://eth-blockbook.nownodes.io/wss/{API_KEY}/websocket"
209
216
  },
217
+ {
218
+ symbol: "BSC",
219
+ blockchain: "binancesmartchain",
220
+ caip: "eip155:56/slip44:60",
221
+ networkId: "eip155:56",
222
+ type: "blockbook",
223
+ service: "https://bsc-blockbook.nownodes.io/{API_KEY}",
224
+ websocket: "wss://bsc-blockbook.nownodes.io/wss/{API_KEY}/websocket"
225
+ },
226
+ {
227
+ symbol: "MATIC",
228
+ blockchain: "polygon",
229
+ caip: "eip155:137/slip44:60",
230
+ networkId: "eip155:137",
231
+ type: "blockbook",
232
+ service: "https://maticbook.nownodes.io/{API_KEY}",
233
+ websocket: "wss://maticbook.nownodes.io/wss/{API_KEY}/websocket"
234
+ },
235
+ {
236
+ symbol: "AVAX",
237
+ blockchain: "avalanche",
238
+ caip: "eip155:43114/slip44:60",
239
+ networkId: "eip155:43114",
240
+ type: "blockbook",
241
+ service: "https://avax-blockbook.nownodes.io/{API_KEY}",
242
+ websocket: "wss://avax-blockbook.nownodes.io/wss/{API_KEY}"
243
+ },
244
+ {
245
+ symbol: "ARB",
246
+ blockchain: "arbitrum",
247
+ caip: "eip155:42161/slip44:60",
248
+ networkId: "eip155:42161",
249
+ type: "blockbook",
250
+ service: "https://arb-blockbook.nownodes.io/{API_KEY}",
251
+ websocket: "wss://arb-blockbook.nownodes.io/wss/{API_KEY}"
252
+ },
210
253
  // ============================================================================
211
254
  // ZELCORE NODES REMOVED - All returning HTTP 403 Forbidden
212
255
  // ============================================================================
package/lib/types.d.ts ADDED
@@ -0,0 +1,66 @@
1
+ export declare enum NodeType {
2
+ BLOCKBOOK = "blockbook",
3
+ API_ONLY = "api-only",
4
+ UNCHAINED = "unchained",
5
+ WEB3 = "web3"
6
+ }
7
+ /**
8
+ * Base configuration shared by all node types
9
+ */
10
+ export interface BaseNodeConfig {
11
+ symbol: string;
12
+ blockchain: string;
13
+ networkId: string;
14
+ type: string | NodeType;
15
+ }
16
+ /**
17
+ * Blockbook node configuration for UTXO and EVM chains
18
+ *
19
+ * Blockbook nodes provide REST APIs and WebSocket connections
20
+ * for blockchain data and transaction monitoring.
21
+ */
22
+ export interface BlockbookNodeConfig extends BaseNodeConfig {
23
+ type: 'blockbook' | NodeType.BLOCKBOOK;
24
+ service: string;
25
+ websocket?: string;
26
+ expectedBlockTime?: number;
27
+ caip?: string;
28
+ }
29
+ /**
30
+ * API-only node configuration for chains without blockbook support
31
+ *
32
+ * Used for chains that only need basic metadata without
33
+ * full REST or WebSocket endpoints.
34
+ */
35
+ export interface ApiOnlyNodeConfig extends BaseNodeConfig {
36
+ type: 'api-only' | NodeType.API_ONLY;
37
+ expectedBlockTime?: number;
38
+ }
39
+ /**
40
+ * Unchained API node configuration
41
+ *
42
+ * ShapeShift's Unchained APIs provide standardized blockchain access.
43
+ */
44
+ export interface UnchainedNodeConfig extends BaseNodeConfig {
45
+ type: 'unchained' | NodeType.UNCHAINED;
46
+ networkId: string;
47
+ caip: string;
48
+ swagger?: string;
49
+ service?: string;
50
+ wss?: string;
51
+ }
52
+ /**
53
+ * Web3 RPC node configuration
54
+ *
55
+ * Used for EVM chains with standard Web3/Ethereum RPC interfaces.
56
+ */
57
+ export interface Web3NodeConfig extends BaseNodeConfig {
58
+ type: 'web3' | NodeType.WEB3;
59
+ url: string;
60
+ networkId: string;
61
+ chainId?: number;
62
+ }
63
+ /**
64
+ * Union type for all node configurations
65
+ */
66
+ export type AnyNodeConfig = BlockbookNodeConfig | ApiOnlyNodeConfig | UnchainedNodeConfig | Web3NodeConfig;
package/lib/types.js ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /*
3
+ Pioneer Nodes Type Definitions
4
+
5
+ TypeScript interfaces for blockchain node configurations.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.NodeType = void 0;
9
+ var NodeType;
10
+ (function (NodeType) {
11
+ NodeType["BLOCKBOOK"] = "blockbook";
12
+ NodeType["API_ONLY"] = "api-only";
13
+ NodeType["UNCHAINED"] = "unchained";
14
+ NodeType["WEB3"] = "web3";
15
+ })(NodeType || (exports.NodeType = NodeType = {}));
package/package.json CHANGED
@@ -1,13 +1,23 @@
1
1
  {
2
2
  "name": "@pioneer-platform/nodes",
3
- "version": "8.30.1",
3
+ "version": "8.30.3",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
+ "exports": {
7
+ ".": {
8
+ "require": "./lib/index.js",
9
+ "types": "./lib/index.d.ts"
10
+ },
11
+ "./runtime": {
12
+ "require": "./lib/runtime.js",
13
+ "types": "./lib/runtime.d.ts"
14
+ }
15
+ },
6
16
  "dependencies": {
7
17
  "dotenv": "^8.2.0",
8
18
  "ethers": "5.7.2",
9
19
  "@pioneer-platform/loggerdog": "8.11.0",
10
- "@pioneer-platform/pioneer-caip": "9.19.1"
20
+ "@pioneer-platform/pioneer-caip": "9.19.3"
11
21
  },
12
22
  "devDependencies": {
13
23
  "@types/jest": "^25.2.3",
@@ -25,6 +35,7 @@
25
35
  "npm": "pnpm i",
26
36
  "npm-update": "pnpm update",
27
37
  "test": "pnpm run build && node __tests__/test-module.js",
38
+ "test:runtime": "pnpm run build && node __tests__/runtime.test.js",
28
39
  "test-cli-export": "pnpm run build && node __tests__/reference-test-cli-export.js",
29
40
  "lint": "prettier --write '**/**/*.ts'",
30
41
  "start": "nodemon --watch 'src/**/*.ts' --exec ts-node __tests__node",