MCPcopy Create free account
hub / github.com/api3dao/airnode / loadConfig

Function loadConfig

packages/airnode-node/src/config/index.ts:64–73  ·  view source on GitHub ↗
(configPath: string, secrets: Record<string, string | undefined>)

Source from the content-addressed store, hash-verified

62}
63
64export function loadConfig(configPath: string, secrets: Record<string, string | undefined>) {
65 const rawConfig = readConfig(configPath);
66 const parsedConfigRes = parseConfigWithSecrets(rawConfig, secrets);
67 if (!parsedConfigRes.success) {
68 throw new Error(`Invalid Airnode configuration file: ${parsedConfigRes.error}`);
69 }
70
71 const config = parsedConfigRes.data;
72 return config;
73}
74
75export function loadTrustedConfig(configPath: string, secrets: Record<string, string | undefined>): configTypes.Config {
76 const rawConfig = readConfig(configPath);

Callers 4

throwingFunctionFunction · 0.90
deployFunction · 0.90
rollbackFunction · 0.90
validate-config.tsFile · 0.90

Calls 2

parseConfigWithSecretsFunction · 0.90
readConfigFunction · 0.70

Tested by 1

throwingFunctionFunction · 0.72