Function
extractEndpoints
(endpointConfig: ProjectNetworkConfig['endpoint'])
Source from the content-addressed store, hash-verified
| 60 | type InitOutputs = z.infer<typeof initOutputs>; |
| 61 | |
| 62 | function extractEndpoints(endpointConfig: ProjectNetworkConfig['endpoint']): string[] { |
| 63 | if (typeof endpointConfig === 'string') { |
| 64 | return [endpointConfig]; |
| 65 | } |
| 66 | if (endpointConfig instanceof Array) { |
| 67 | return endpointConfig; |
| 68 | } |
| 69 | return Object.keys(endpointConfig); |
| 70 | } |
| 71 | |
| 72 | // Family needs to be provided because there can be the same network name in different families. eg Bittensor (Substrate and EVM) |
| 73 | function findNetwork( |
Tested by
no test coverage detected