MCPcopy
hub / github.com/subquery/subql / extractEndpoints

Function extractEndpoints

packages/cli/src/commands/init.ts:62–70  ·  view source on GitHub ↗
(endpointConfig: ProjectNetworkConfig['endpoint'])

Source from the content-addressed store, hash-verified

60type InitOutputs = z.infer<typeof initOutputs>;
61
62function 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)
73function findNetwork(

Callers 1

initAdapterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected