|
1 | 1 | import type { Host, Port } from './network/types'; |
| 2 | +import type { NodeAddress } from 'nodes/types'; |
2 | 3 | import { getDefaultNodePath } from './utils'; |
3 | 4 | // @ts-ignore package.json is outside rootDir |
4 | 5 | import { version } from '../package.json'; |
5 | 6 |
|
| 7 | +/** |
| 8 | + * Configuration for testnet node addresses. |
| 9 | + * Extracted here to enforce types properly. |
| 10 | + */ |
| 11 | +const testnet: Record<string, NodeAddress> = { |
| 12 | + vg9a9e957878s2qgtbdmu2atvli8ms7muukb1dk4dpbm4llkki3h0: { |
| 13 | + host: 'testnet.polykey.io' as Host, |
| 14 | + port: 1314 as Port, |
| 15 | + }, |
| 16 | + vh9oqtvct10eaiv3cl4ebm0ko33sl0qqpvb59vud8cngfvqs4p4ng: { |
| 17 | + host: 'testnet.polykey.io' as Host, |
| 18 | + port: 1314 as Port, |
| 19 | + }, |
| 20 | +}; |
| 21 | + |
| 22 | +/** |
| 23 | + * Configuration for main net node addresses. |
| 24 | + * Extracted here to enforce types properly. |
| 25 | + */ |
| 26 | +const mainnet: Record<string, NodeAddress> = {}; |
| 27 | + |
6 | 28 | /** |
7 | 29 | * Polykey static configuration |
8 | 30 | * This is intended only for static properties |
@@ -96,17 +118,8 @@ const config = { |
96 | 118 | }, |
97 | 119 | // This is not used by the `PolykeyAgent` which defaults to `{}` |
98 | 120 | network: { |
99 | | - mainnet: {}, |
100 | | - testnet: { |
101 | | - vg9a9e957878s2qgtbdmu2atvli8ms7muukb1dk4dpbm4llkki3h0: { |
102 | | - host: 'testnet.polykey.io' as Host, |
103 | | - port: 1314 as Port, |
104 | | - }, |
105 | | - vh9oqtvct10eaiv3cl4ebm0ko33sl0qqpvb59vud8cngfvqs4p4ng: { |
106 | | - host: 'testnet.polykey.io' as Host, |
107 | | - port: 1314 as Port, |
108 | | - }, |
109 | | - }, |
| 121 | + mainnet: mainnet, |
| 122 | + testnet: testnet, |
110 | 123 | }, |
111 | 124 | }, |
112 | 125 | }; |
|
0 commit comments