@xyo-network/xl1-cli-lib 1.19.14 → 1.19.15
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.
- package/dist/node/commands/bridge/runBridge.d.ts +5 -3
- package/dist/node/commands/bridge/runBridge.d.ts.map +1 -1
- package/dist/node/commands/rewardRedemption/runRewardRedemptionApi.d.ts +5 -3
- package/dist/node/commands/rewardRedemption/runRewardRedemptionApi.d.ts.map +1 -1
- package/dist/node/commands/validator/runValidator.d.ts +5 -3
- package/dist/node/commands/validator/runValidator.d.ts.map +1 -1
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.mjs +111 -374
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/initLogger.d.ts +2 -2
- package/dist/node/initLogger.d.ts.map +1 -1
- package/dist/node/runCLI.d.ts.map +1 -1
- package/dist/node/xl1.mjs +92 -356
- package/dist/node/xl1.mjs.map +1 -1
- package/package.json +24 -26
- package/src/commands/bridge/runBridge.ts +18 -11
- package/src/commands/rewardRedemption/runRewardRedemptionApi.ts +20 -9
- package/src/commands/validator/runValidator.ts +17 -12
- package/src/index.ts +1 -0
- package/src/initLogger.ts +2 -2
- package/src/runCLI.ts +62 -78
- package/dist/node/locatorFromConfig.d.ts +0 -14
- package/dist/node/locatorFromConfig.d.ts.map +0 -1
- package/dist/node/tryParseConfig.d.ts +0 -431
- package/dist/node/tryParseConfig.d.ts.map +0 -1
- package/src/locatorFromConfig.ts +0 -326
- package/src/spec/MultiProducer.ChainOutput.json +0 -864
- package/src/tryParseConfig.ts +0 -42
package/src/runCLI.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { deepMerge, isDefined } from '@xylabs/sdk-js'
|
|
2
|
+
import { getApiActor, runApi } from '@xyo-network/chain-api'
|
|
3
|
+
import { getMempoolActor, runMempool } from '@xyo-network/chain-mempool'
|
|
2
4
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
ApiConfigZod, BridgeConfigZod, contextFromConfigWithoutLocator, locatorsFromConfig, MempoolConfigZod, Orchestrator,
|
|
6
|
+
ProducerConfigZod,
|
|
7
|
+
RewardRedemptionConfigZod,
|
|
8
|
+
tryParseConfig,
|
|
9
|
+
} from '@xyo-network/chain-orchestration'
|
|
8
10
|
import { runProducer } from '@xyo-network/chain-producer'
|
|
9
|
-
import type {
|
|
10
|
-
import {
|
|
11
|
+
import type { ActorConfig, Config } from '@xyo-network/xl1-sdk'
|
|
12
|
+
import {
|
|
13
|
+
ActorConfigZod, ConfigZod, isZodError,
|
|
14
|
+
resolveConfig,
|
|
15
|
+
} from '@xyo-network/xl1-sdk'
|
|
11
16
|
import type { Argv } from 'yargs'
|
|
12
17
|
import yargs from 'yargs'
|
|
13
18
|
import { hideBin } from 'yargs/helpers'
|
|
14
19
|
|
|
15
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
getValidatorActor, runBridge, runRewardRedemptionApi,
|
|
22
|
+
} from './commands/index.ts'
|
|
16
23
|
import { XL1LogoColorizedAscii } from './images.ts'
|
|
17
24
|
import { initLogger } from './initLogger.ts'
|
|
18
|
-
import { contextFromConfigWithoutLocator, locatorsFromConfig } from './locatorFromConfig.ts'
|
|
19
25
|
import { optionsFromGlobalZodRegistry } from './optionsFromGlobalZodRegistry.ts'
|
|
20
|
-
import { tryParseConfig } from './tryParseConfig.ts'
|
|
21
26
|
import { waitForHostPort } from './waitForHostPort.ts'
|
|
22
27
|
|
|
23
|
-
interface RunCliContext {
|
|
24
|
-
logger: Logger
|
|
25
|
-
orchestrator: Orchestrator
|
|
26
|
-
}
|
|
27
|
-
|
|
28
28
|
/** Version string injected by Rollup at build time. */
|
|
29
29
|
declare const __VERSION__: string
|
|
30
30
|
|
|
@@ -37,42 +37,18 @@ let configuration: Config
|
|
|
37
37
|
|
|
38
38
|
const version = isDefined(__VERSION__) ? __VERSION__ : 'unknown'
|
|
39
39
|
|
|
40
|
-
function resolveConfig(config: Config): Config {
|
|
41
|
-
const logger = console
|
|
42
|
-
const defaultChainId = toAddress('1')
|
|
43
|
-
const resolved = structuredClone(config)
|
|
44
|
-
if (!resolved.chain.id) {
|
|
45
|
-
logger.warn(`No chain ID specified in configuration; defaulting to ${defaultChainId}`)
|
|
46
|
-
resolved.chain.id = defaultChainId
|
|
47
|
-
}
|
|
48
|
-
return resolved
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const getContextFromConfig = async (configuration: Config): Promise<RunCliContext> => {
|
|
52
|
-
const logger = initLogger(configuration)
|
|
53
|
-
const orchestrator = await Orchestrator.create({ logger })
|
|
54
|
-
// Handle cancellation (Ctrl+C)
|
|
55
|
-
process.on('SIGINT', () => {
|
|
56
|
-
void (async () => {
|
|
57
|
-
try {
|
|
58
|
-
logger.log('\nSIGINT received. Attempting graceful shutdown...')
|
|
59
|
-
await orchestrator?.stop()
|
|
60
|
-
logger.log('Orchestrator stopped, exiting now.')
|
|
61
|
-
process.exit(0)
|
|
62
|
-
} catch (err) {
|
|
63
|
-
logger.error('Error stopping orchestrator:', err)
|
|
64
|
-
process.exit(1)
|
|
65
|
-
}
|
|
66
|
-
})()
|
|
67
|
-
})
|
|
68
|
-
return { logger, orchestrator }
|
|
69
|
-
}
|
|
70
|
-
|
|
71
40
|
const getLocatorsFromConfig = async (actors: string[], configuration: Config) => {
|
|
41
|
+
const actorConfigs: ActorConfig[] = []
|
|
42
|
+
for (const actorName of actors) {
|
|
43
|
+
const rawConfig = configuration.actors.find(actor => actor.name === actorName) ?? { name: actorName }
|
|
44
|
+
const actorConfig = ActorConfigZod.loose().parse(rawConfig)
|
|
45
|
+
actorConfigs.push(actorConfig)
|
|
46
|
+
}
|
|
47
|
+
const config = ConfigZod.parse(deepMerge(configuration, { actors: actorConfigs }))
|
|
72
48
|
const logger = initLogger(configuration)
|
|
73
49
|
const orchestrator = await Orchestrator.create({ logger })
|
|
74
|
-
const context = await contextFromConfigWithoutLocator(
|
|
75
|
-
const locators = await locatorsFromConfig(
|
|
50
|
+
const context = await contextFromConfigWithoutLocator(config, logger, 'xl1-cli', version)
|
|
51
|
+
const locators = await locatorsFromConfig(context, config)
|
|
76
52
|
// Handle cancellation (Ctrl+C)
|
|
77
53
|
process.on('SIGINT', () => {
|
|
78
54
|
void (async () => {
|
|
@@ -109,12 +85,12 @@ $0 <command> [options]`)
|
|
|
109
85
|
})
|
|
110
86
|
.env('XL1')
|
|
111
87
|
.scriptName('xl1')
|
|
112
|
-
.middleware((argv) => {
|
|
88
|
+
.middleware(async (argv) => {
|
|
113
89
|
try {
|
|
114
90
|
// Parse the various config sources
|
|
115
|
-
const parsedConfigFile = tryParseConfig() // Config file
|
|
116
|
-
const parsedConfigArgs = argv // Command-line arguments & ENV VARs
|
|
117
|
-
const parseResult = ConfigZod.safeParse(parsedConfigFile)
|
|
91
|
+
const parsedConfigFile = await tryParseConfig() // Config file
|
|
92
|
+
const parsedConfigArgs = ConfigZod.safeParse(argv).data ?? {} // Command-line arguments & ENV VARs
|
|
93
|
+
const parseResult = ConfigZod.safeParse(deepMerge(parsedConfigFile, parsedConfigArgs))
|
|
118
94
|
if (!parseResult.success) {
|
|
119
95
|
throw parseResult.error
|
|
120
96
|
}
|
|
@@ -125,7 +101,7 @@ $0 <command> [options]`)
|
|
|
125
101
|
// and receive a flattened object. We might need to manually invoke
|
|
126
102
|
// the parser without the defaults to achieve this.
|
|
127
103
|
// const mergedConfig = deepMerge(parsedConfigArgs, parsedConfigFile)
|
|
128
|
-
const mergedConfig =
|
|
104
|
+
const mergedConfig = parseResult.data
|
|
129
105
|
const validatedMergedConfigResult = ConfigZod.safeParse(mergedConfig)
|
|
130
106
|
if (!validatedMergedConfigResult.success) {
|
|
131
107
|
throw validatedMergedConfigResult.error
|
|
@@ -138,17 +114,6 @@ $0 <command> [options]`)
|
|
|
138
114
|
}
|
|
139
115
|
configuration = validatedConfigResult.data
|
|
140
116
|
|
|
141
|
-
const { actors, ...rootConfig } = configuration
|
|
142
|
-
const actorNames = Object.keys(actors) as ActorName[]
|
|
143
|
-
|
|
144
|
-
for (const actorName of actorNames) {
|
|
145
|
-
configuration.actors[actorName] = deepMerge(
|
|
146
|
-
rootConfig ?? {},
|
|
147
|
-
configuration.actors[actorName] ?? {},
|
|
148
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
149
|
-
) as any
|
|
150
|
-
}
|
|
151
|
-
|
|
152
117
|
// Check if user wants to dump config and exit
|
|
153
118
|
if (argv['dump-config']) {
|
|
154
119
|
console.log(JSON.stringify(configuration, null, 2))
|
|
@@ -171,56 +136,75 @@ $0 <command> [options]`)
|
|
|
171
136
|
.command('api', 'Run a XL1 API Node', (yargs) => {
|
|
172
137
|
return yargs
|
|
173
138
|
.command('$0', 'Run a XL1 API Node', () => {}, async () => {
|
|
174
|
-
const { locators, orchestrator } = await getLocatorsFromConfig(['api'], configuration)
|
|
175
|
-
await
|
|
139
|
+
const { locators, orchestrator } = await getLocatorsFromConfig(['api', 'mempool', 'validator'], configuration)
|
|
140
|
+
const actors = await Promise.all([getApiActor(
|
|
141
|
+
ApiConfigZod.parse(locators['api'].context.config),
|
|
142
|
+
locators['api'],
|
|
143
|
+
), getMempoolActor(
|
|
144
|
+
MempoolConfigZod.parse(locators['mempool'].context.config),
|
|
145
|
+
locators['mempool'],
|
|
146
|
+
), getValidatorActor(
|
|
147
|
+
ActorConfigZod.parse(locators['validator'].context.config),
|
|
148
|
+
locators['validator'],
|
|
149
|
+
)])
|
|
150
|
+
|
|
151
|
+
for (const actor of actors) {
|
|
152
|
+
await orchestrator.registerActor(actor)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
await orchestrator.start()
|
|
176
156
|
})
|
|
177
157
|
})
|
|
178
158
|
.command('bridge', 'Run a XL1 Bridge Node', (yargs) => {
|
|
179
159
|
return yargs
|
|
180
160
|
.command('$0', 'Run a XL1 Bridge Node', () => {}, async () => {
|
|
181
161
|
const { locators, orchestrator } = await getLocatorsFromConfig(['bridge'], configuration)
|
|
182
|
-
await runBridge(
|
|
162
|
+
await runBridge(BridgeConfigZod.parse(locators['bridge'].context.config), orchestrator, locators['bridge'])
|
|
183
163
|
})
|
|
184
164
|
})
|
|
185
165
|
.command('mempool', 'Run a XL1 Mempool Node', (yargs) => {
|
|
186
166
|
return yargs
|
|
187
167
|
.command('$0', 'Run a XL1 Mempool Node', () => {}, async () => {
|
|
188
168
|
const { locators, orchestrator } = await getLocatorsFromConfig(['mempool'], configuration)
|
|
189
|
-
await runMempool(
|
|
169
|
+
await runMempool(MempoolConfigZod.parse(locators['mempool'].context.config), orchestrator, locators['mempool'])
|
|
190
170
|
})
|
|
191
171
|
})
|
|
192
172
|
.command('producer', 'Run a XL1 Producer Node', (yargs) => {
|
|
193
173
|
return yargs
|
|
194
174
|
.command('$0', 'Run a XL1 Producer Node', () => {}, async () => {
|
|
195
175
|
const { locators, orchestrator } = await getLocatorsFromConfig(['producer'], configuration)
|
|
196
|
-
await runProducer(
|
|
176
|
+
await runProducer(ProducerConfigZod.parse(locators['producer'].context.config), orchestrator, locators['producer'])
|
|
197
177
|
})
|
|
198
178
|
})
|
|
199
179
|
.command('reward-redemption-api', 'Run a XL1 Rewards Redemption API Node', (yargs) => {
|
|
200
180
|
return yargs
|
|
201
181
|
.command('$0', 'Run a XL1 Rewards Redemption API Node', () => {}, async () => {
|
|
202
182
|
const { locators, orchestrator } = await getLocatorsFromConfig(['rewardRedemption'], configuration)
|
|
203
|
-
await runRewardRedemptionApi(
|
|
183
|
+
await runRewardRedemptionApi(RewardRedemptionConfigZod.parse(locators['rewardRedemption'].context.config), orchestrator, locators['rewardRedemption'])
|
|
204
184
|
})
|
|
205
185
|
})
|
|
206
186
|
.command('$0', 'Run a full XL1 Node', () => {}, async () => {
|
|
207
187
|
const actors = ['producer', 'api']
|
|
208
|
-
|
|
188
|
+
const mempoolEnabled = configuration.actors.find(actor => actor.name === 'mempool')?.enabled
|
|
189
|
+
if (mempoolEnabled) {
|
|
209
190
|
actors.push('mempool')
|
|
210
191
|
}
|
|
211
192
|
const { locators, orchestrator } = await getLocatorsFromConfig(['api', 'producer'], configuration)
|
|
212
|
-
if (
|
|
193
|
+
if (mempoolEnabled) {
|
|
194
|
+
const mempoolConfig = MempoolConfigZod.parse(locators['mempool'].context.config)
|
|
213
195
|
// Start Mempool but do not block
|
|
214
|
-
await runMempool(
|
|
196
|
+
await runMempool(mempoolConfig, orchestrator, locators['mempool'])
|
|
215
197
|
// Wait for Mempool to be ready
|
|
216
|
-
await waitForHostPort(
|
|
198
|
+
await waitForHostPort(mempoolConfig.host, mempoolConfig.port)
|
|
217
199
|
}
|
|
218
200
|
// Start API but do not block
|
|
219
|
-
|
|
201
|
+
const apiConfig = ApiConfigZod.parse(locators['api'].context.config)
|
|
202
|
+
await runApi(apiConfig, orchestrator, locators['api'])
|
|
220
203
|
// Wait for API to be ready
|
|
221
|
-
await waitForHostPort(
|
|
204
|
+
await waitForHostPort(apiConfig.host, apiConfig.port)
|
|
222
205
|
// Start Producer and block on it
|
|
223
|
-
|
|
206
|
+
const producerConfig = ProducerConfigZod.parse(locators['producer'].context.config)
|
|
207
|
+
await runProducer(producerConfig, orchestrator, locators['producer'])
|
|
224
208
|
})
|
|
225
209
|
.options({
|
|
226
210
|
'dump-config': {
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Logger, Promisable } from '@xylabs/sdk-js';
|
|
2
|
-
import type { Config, CreatableProviderContext, ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk';
|
|
3
|
-
export declare function telemetryContextFromConfig(config: Config, serviceName: string, serviceVersion: string): Promise<import("@xyo-network/chain-telemetry").TelemetryProviders>;
|
|
4
|
-
export declare function contextFromConfigWithoutLocator(config: Config, logger: Logger, serviceName: string, serviceVersion: string): Promise<Omit<CreatableProviderContext, 'locator'>>;
|
|
5
|
-
export declare function rootLocatorFromConfig(config: Config, context: Omit<CreatableProviderContext, 'locator'>): Promise<ProviderFactoryLocatorInstance>;
|
|
6
|
-
export declare function localLocatorFromConfig(config: Config, context: CreatableProviderContext): Promise<ProviderFactoryLocatorInstance>;
|
|
7
|
-
export declare function remoteLocatorFromConfig(config: Config, context: CreatableProviderContext): Promise<ProviderFactoryLocatorInstance>;
|
|
8
|
-
export declare function producerLocatorFromConfig(config: Config, context: CreatableProviderContext): Promise<ProviderFactoryLocatorInstance>;
|
|
9
|
-
export declare function apiLocatorFromConfig(config: Config, context: CreatableProviderContext): Promisable<ProviderFactoryLocatorInstance>;
|
|
10
|
-
export declare function mempoolLocatorFromConfig(config: Config, context: CreatableProviderContext): Promisable<ProviderFactoryLocatorInstance>;
|
|
11
|
-
export declare function bridgeLocatorFromConfig(config: Config, context: CreatableProviderContext): Promise<Promise<Promisable<ProviderFactoryLocatorInstance>>>;
|
|
12
|
-
export declare function rewardRedemptionLocatorFromConfig(config: Config, context: CreatableProviderContext): Promisable<ProviderFactoryLocatorInstance>;
|
|
13
|
-
export declare function locatorsFromConfig(actors: string[], config: Config, context: Omit<CreatableProviderContext, 'locator'>): Promise<Record<string, ProviderFactoryLocatorInstance>>;
|
|
14
|
-
//# sourceMappingURL=locatorFromConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"locatorFromConfig.d.ts","sourceRoot":"","sources":["../../src/locatorFromConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAYxD,OAAO,KAAK,EACV,MAAM,EAAE,wBAAwB,EAAE,8BAA8B,EACjE,MAAM,sBAAsB,CAAA;AA0C7B,wBAAsB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,sEAW3G;AAED,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,SAAS,CAAC,CAAC,CAapD;AAED,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,SAAS,CAAC,GACjD,OAAO,CAAC,8BAA8B,CAAC,CAuBzC;AAED,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,8BAA8B,CAAC,CAkCzC;AAED,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,8BAA8B,CAAC,CA4BzC;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,8BAA8B,CAAC,CAsCzC;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,GAChC,UAAU,CAAC,8BAA8B,CAAC,CAU5C;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,GAChC,UAAU,CAAC,8BAA8B,CAAC,CAO5C;AAED,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAoC9D;AAED,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,GAChC,UAAU,CAAC,8BAA8B,CAAC,CAQ5C;AAED,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EAAE,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,IAAI,CAAC,wBAAwB,EAAE,SAAS,CAAC,GACjD,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAAC,CAQzD"}
|
|
@@ -1,431 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Attempts to parse the configuration from a file using cosmiconfig.
|
|
3
|
-
* @returns The parsed configuration object if found and valid, otherwise undefined.
|
|
4
|
-
*/
|
|
5
|
-
export declare const tryParseConfig: () => {
|
|
6
|
-
chain: {
|
|
7
|
-
id?: import("@xylabs/sdk-js").BrandedHex | undefined;
|
|
8
|
-
genesisRewardAddress?: (Lowercase<string> & {
|
|
9
|
-
readonly __hex: true;
|
|
10
|
-
} & {
|
|
11
|
-
readonly __address: true;
|
|
12
|
-
}) | undefined;
|
|
13
|
-
};
|
|
14
|
-
evm: {
|
|
15
|
-
chainId?: string | undefined;
|
|
16
|
-
infura?: {
|
|
17
|
-
projectId?: string | undefined;
|
|
18
|
-
projectSecret?: string | undefined;
|
|
19
|
-
} | undefined;
|
|
20
|
-
jsonRpc?: {
|
|
21
|
-
url?: string | undefined;
|
|
22
|
-
} | undefined;
|
|
23
|
-
};
|
|
24
|
-
log: {
|
|
25
|
-
logLevel: "log" | "error" | "warn" | "info" | "debug" | "trace";
|
|
26
|
-
silent: boolean;
|
|
27
|
-
};
|
|
28
|
-
remote: {
|
|
29
|
-
rpc?: {
|
|
30
|
-
url: string;
|
|
31
|
-
} | undefined;
|
|
32
|
-
};
|
|
33
|
-
storage: {
|
|
34
|
-
mongo?: {
|
|
35
|
-
connectionString?: string | undefined;
|
|
36
|
-
database?: string | undefined;
|
|
37
|
-
domain?: string | undefined;
|
|
38
|
-
password?: string | undefined;
|
|
39
|
-
username?: string | undefined;
|
|
40
|
-
} | undefined;
|
|
41
|
-
root?: string | undefined;
|
|
42
|
-
};
|
|
43
|
-
telemetry: {
|
|
44
|
-
metrics?: {
|
|
45
|
-
scrape: {
|
|
46
|
-
path: string;
|
|
47
|
-
port?: number | undefined;
|
|
48
|
-
};
|
|
49
|
-
} | undefined;
|
|
50
|
-
otel?: {
|
|
51
|
-
otlpEndpoint?: string | undefined;
|
|
52
|
-
} | undefined;
|
|
53
|
-
};
|
|
54
|
-
validation: {
|
|
55
|
-
allowedRewardRedeemers?: (Lowercase<string> & {
|
|
56
|
-
readonly __hex: true;
|
|
57
|
-
} & {
|
|
58
|
-
readonly __address: true;
|
|
59
|
-
})[] | undefined;
|
|
60
|
-
allowedRewardEscrowAccountSigners?: (Lowercase<string> & {
|
|
61
|
-
readonly __hex: true;
|
|
62
|
-
} & {
|
|
63
|
-
readonly __address: true;
|
|
64
|
-
})[] | undefined;
|
|
65
|
-
};
|
|
66
|
-
actors: {
|
|
67
|
-
api: {
|
|
68
|
-
chain: {
|
|
69
|
-
id?: import("@xylabs/sdk-js").BrandedHex | undefined;
|
|
70
|
-
genesisRewardAddress?: (Lowercase<string> & {
|
|
71
|
-
readonly __hex: true;
|
|
72
|
-
} & {
|
|
73
|
-
readonly __address: true;
|
|
74
|
-
}) | undefined;
|
|
75
|
-
};
|
|
76
|
-
evm: {
|
|
77
|
-
chainId?: string | undefined;
|
|
78
|
-
infura?: {
|
|
79
|
-
projectId?: string | undefined;
|
|
80
|
-
projectSecret?: string | undefined;
|
|
81
|
-
} | undefined;
|
|
82
|
-
jsonRpc?: {
|
|
83
|
-
url?: string | undefined;
|
|
84
|
-
} | undefined;
|
|
85
|
-
};
|
|
86
|
-
log: {
|
|
87
|
-
logLevel: "log" | "error" | "warn" | "info" | "debug" | "trace";
|
|
88
|
-
silent: boolean;
|
|
89
|
-
};
|
|
90
|
-
remote: {
|
|
91
|
-
rpc?: {
|
|
92
|
-
url: string;
|
|
93
|
-
} | undefined;
|
|
94
|
-
};
|
|
95
|
-
storage: {
|
|
96
|
-
mongo?: {
|
|
97
|
-
connectionString?: string | undefined;
|
|
98
|
-
database?: string | undefined;
|
|
99
|
-
domain?: string | undefined;
|
|
100
|
-
password?: string | undefined;
|
|
101
|
-
username?: string | undefined;
|
|
102
|
-
} | undefined;
|
|
103
|
-
root?: string | undefined;
|
|
104
|
-
};
|
|
105
|
-
telemetry: {
|
|
106
|
-
metrics?: {
|
|
107
|
-
scrape: {
|
|
108
|
-
path: string;
|
|
109
|
-
port?: number | undefined;
|
|
110
|
-
};
|
|
111
|
-
} | undefined;
|
|
112
|
-
otel?: {
|
|
113
|
-
otlpEndpoint?: string | undefined;
|
|
114
|
-
} | undefined;
|
|
115
|
-
};
|
|
116
|
-
validation: {
|
|
117
|
-
allowedRewardRedeemers?: (Lowercase<string> & {
|
|
118
|
-
readonly __hex: true;
|
|
119
|
-
} & {
|
|
120
|
-
readonly __address: true;
|
|
121
|
-
})[] | undefined;
|
|
122
|
-
allowedRewardEscrowAccountSigners?: (Lowercase<string> & {
|
|
123
|
-
readonly __hex: true;
|
|
124
|
-
} & {
|
|
125
|
-
readonly __address: true;
|
|
126
|
-
})[] | undefined;
|
|
127
|
-
};
|
|
128
|
-
host: string;
|
|
129
|
-
initRewardsCache: boolean;
|
|
130
|
-
port: number;
|
|
131
|
-
mnemonic?: string | undefined;
|
|
132
|
-
};
|
|
133
|
-
bridge: {
|
|
134
|
-
chain: {
|
|
135
|
-
id?: import("@xylabs/sdk-js").BrandedHex | undefined;
|
|
136
|
-
genesisRewardAddress?: (Lowercase<string> & {
|
|
137
|
-
readonly __hex: true;
|
|
138
|
-
} & {
|
|
139
|
-
readonly __address: true;
|
|
140
|
-
}) | undefined;
|
|
141
|
-
};
|
|
142
|
-
evm: {
|
|
143
|
-
chainId?: string | undefined;
|
|
144
|
-
infura?: {
|
|
145
|
-
projectId?: string | undefined;
|
|
146
|
-
projectSecret?: string | undefined;
|
|
147
|
-
} | undefined;
|
|
148
|
-
jsonRpc?: {
|
|
149
|
-
url?: string | undefined;
|
|
150
|
-
} | undefined;
|
|
151
|
-
};
|
|
152
|
-
log: {
|
|
153
|
-
logLevel: "log" | "error" | "warn" | "info" | "debug" | "trace";
|
|
154
|
-
silent: boolean;
|
|
155
|
-
};
|
|
156
|
-
remote: {
|
|
157
|
-
rpc?: {
|
|
158
|
-
url: string;
|
|
159
|
-
} | undefined;
|
|
160
|
-
};
|
|
161
|
-
storage: {
|
|
162
|
-
mongo?: {
|
|
163
|
-
connectionString?: string | undefined;
|
|
164
|
-
database?: string | undefined;
|
|
165
|
-
domain?: string | undefined;
|
|
166
|
-
password?: string | undefined;
|
|
167
|
-
username?: string | undefined;
|
|
168
|
-
} | undefined;
|
|
169
|
-
root?: string | undefined;
|
|
170
|
-
};
|
|
171
|
-
telemetry: {
|
|
172
|
-
metrics?: {
|
|
173
|
-
scrape: {
|
|
174
|
-
path: string;
|
|
175
|
-
port?: number | undefined;
|
|
176
|
-
};
|
|
177
|
-
} | undefined;
|
|
178
|
-
otel?: {
|
|
179
|
-
otlpEndpoint?: string | undefined;
|
|
180
|
-
} | undefined;
|
|
181
|
-
};
|
|
182
|
-
validation: {
|
|
183
|
-
allowedRewardRedeemers?: (Lowercase<string> & {
|
|
184
|
-
readonly __hex: true;
|
|
185
|
-
} & {
|
|
186
|
-
readonly __address: true;
|
|
187
|
-
})[] | undefined;
|
|
188
|
-
allowedRewardEscrowAccountSigners?: (Lowercase<string> & {
|
|
189
|
-
readonly __hex: true;
|
|
190
|
-
} & {
|
|
191
|
-
readonly __address: true;
|
|
192
|
-
})[] | undefined;
|
|
193
|
-
};
|
|
194
|
-
feeFixed: import("@xylabs/sdk-js").BrandedHex;
|
|
195
|
-
feeRateBasisPoints: number;
|
|
196
|
-
host: string;
|
|
197
|
-
maxBridgeAmount: import("@xylabs/sdk-js").BrandedHex;
|
|
198
|
-
minBridgeAmount: import("@xylabs/sdk-js").BrandedHex;
|
|
199
|
-
port: number;
|
|
200
|
-
redisHost: string;
|
|
201
|
-
redisPort: number;
|
|
202
|
-
remoteBridgeContractAddress: Lowercase<string> & {
|
|
203
|
-
readonly __hex: true;
|
|
204
|
-
} & {
|
|
205
|
-
readonly __address: true;
|
|
206
|
-
};
|
|
207
|
-
remoteChainId: import("@xylabs/sdk-js").BrandedHex;
|
|
208
|
-
remoteTokenAddress: import("@xylabs/sdk-js").BrandedHex;
|
|
209
|
-
remoteChainWalletPrivateKey: import("@xylabs/sdk-js").BrandedHex;
|
|
210
|
-
escrowAddress?: (Lowercase<string> & {
|
|
211
|
-
readonly __hex: true;
|
|
212
|
-
} & {
|
|
213
|
-
readonly __address: true;
|
|
214
|
-
}) | undefined;
|
|
215
|
-
feesAddress?: (Lowercase<string> & {
|
|
216
|
-
readonly __hex: true;
|
|
217
|
-
} & {
|
|
218
|
-
readonly __address: true;
|
|
219
|
-
}) | undefined;
|
|
220
|
-
mnemonic?: string | undefined;
|
|
221
|
-
xl1ChainId?: import("@xylabs/sdk-js").BrandedHex | undefined;
|
|
222
|
-
xl1TokenAddress?: import("@xylabs/sdk-js").BrandedHex | undefined;
|
|
223
|
-
};
|
|
224
|
-
mempool: {
|
|
225
|
-
chain: {
|
|
226
|
-
id?: import("@xylabs/sdk-js").BrandedHex | undefined;
|
|
227
|
-
genesisRewardAddress?: (Lowercase<string> & {
|
|
228
|
-
readonly __hex: true;
|
|
229
|
-
} & {
|
|
230
|
-
readonly __address: true;
|
|
231
|
-
}) | undefined;
|
|
232
|
-
};
|
|
233
|
-
evm: {
|
|
234
|
-
chainId?: string | undefined;
|
|
235
|
-
infura?: {
|
|
236
|
-
projectId?: string | undefined;
|
|
237
|
-
projectSecret?: string | undefined;
|
|
238
|
-
} | undefined;
|
|
239
|
-
jsonRpc?: {
|
|
240
|
-
url?: string | undefined;
|
|
241
|
-
} | undefined;
|
|
242
|
-
};
|
|
243
|
-
log: {
|
|
244
|
-
logLevel: "log" | "error" | "warn" | "info" | "debug" | "trace";
|
|
245
|
-
silent: boolean;
|
|
246
|
-
};
|
|
247
|
-
remote: {
|
|
248
|
-
rpc?: {
|
|
249
|
-
url: string;
|
|
250
|
-
} | undefined;
|
|
251
|
-
};
|
|
252
|
-
storage: {
|
|
253
|
-
mongo?: {
|
|
254
|
-
connectionString?: string | undefined;
|
|
255
|
-
database?: string | undefined;
|
|
256
|
-
domain?: string | undefined;
|
|
257
|
-
password?: string | undefined;
|
|
258
|
-
username?: string | undefined;
|
|
259
|
-
} | undefined;
|
|
260
|
-
root?: string | undefined;
|
|
261
|
-
};
|
|
262
|
-
telemetry: {
|
|
263
|
-
metrics?: {
|
|
264
|
-
scrape: {
|
|
265
|
-
path: string;
|
|
266
|
-
port?: number | undefined;
|
|
267
|
-
};
|
|
268
|
-
} | undefined;
|
|
269
|
-
otel?: {
|
|
270
|
-
otlpEndpoint?: string | undefined;
|
|
271
|
-
} | undefined;
|
|
272
|
-
};
|
|
273
|
-
validation: {
|
|
274
|
-
allowedRewardRedeemers?: (Lowercase<string> & {
|
|
275
|
-
readonly __hex: true;
|
|
276
|
-
} & {
|
|
277
|
-
readonly __address: true;
|
|
278
|
-
})[] | undefined;
|
|
279
|
-
allowedRewardEscrowAccountSigners?: (Lowercase<string> & {
|
|
280
|
-
readonly __hex: true;
|
|
281
|
-
} & {
|
|
282
|
-
readonly __address: true;
|
|
283
|
-
})[] | undefined;
|
|
284
|
-
};
|
|
285
|
-
enabled: boolean;
|
|
286
|
-
host: string;
|
|
287
|
-
port: number;
|
|
288
|
-
mnemonic?: string | undefined;
|
|
289
|
-
};
|
|
290
|
-
producer: {
|
|
291
|
-
chain: {
|
|
292
|
-
id?: import("@xylabs/sdk-js").BrandedHex | undefined;
|
|
293
|
-
genesisRewardAddress?: (Lowercase<string> & {
|
|
294
|
-
readonly __hex: true;
|
|
295
|
-
} & {
|
|
296
|
-
readonly __address: true;
|
|
297
|
-
}) | undefined;
|
|
298
|
-
};
|
|
299
|
-
evm: {
|
|
300
|
-
chainId?: string | undefined;
|
|
301
|
-
infura?: {
|
|
302
|
-
projectId?: string | undefined;
|
|
303
|
-
projectSecret?: string | undefined;
|
|
304
|
-
} | undefined;
|
|
305
|
-
jsonRpc?: {
|
|
306
|
-
url?: string | undefined;
|
|
307
|
-
} | undefined;
|
|
308
|
-
};
|
|
309
|
-
log: {
|
|
310
|
-
logLevel: "log" | "error" | "warn" | "info" | "debug" | "trace";
|
|
311
|
-
silent: boolean;
|
|
312
|
-
};
|
|
313
|
-
remote: {
|
|
314
|
-
rpc?: {
|
|
315
|
-
url: string;
|
|
316
|
-
} | undefined;
|
|
317
|
-
};
|
|
318
|
-
storage: {
|
|
319
|
-
mongo?: {
|
|
320
|
-
connectionString?: string | undefined;
|
|
321
|
-
database?: string | undefined;
|
|
322
|
-
domain?: string | undefined;
|
|
323
|
-
password?: string | undefined;
|
|
324
|
-
username?: string | undefined;
|
|
325
|
-
} | undefined;
|
|
326
|
-
root?: string | undefined;
|
|
327
|
-
};
|
|
328
|
-
telemetry: {
|
|
329
|
-
metrics?: {
|
|
330
|
-
scrape: {
|
|
331
|
-
path: string;
|
|
332
|
-
port?: number | undefined;
|
|
333
|
-
};
|
|
334
|
-
} | undefined;
|
|
335
|
-
otel?: {
|
|
336
|
-
otlpEndpoint?: string | undefined;
|
|
337
|
-
} | undefined;
|
|
338
|
-
};
|
|
339
|
-
validation: {
|
|
340
|
-
allowedRewardRedeemers?: (Lowercase<string> & {
|
|
341
|
-
readonly __hex: true;
|
|
342
|
-
} & {
|
|
343
|
-
readonly __address: true;
|
|
344
|
-
})[] | undefined;
|
|
345
|
-
allowedRewardEscrowAccountSigners?: (Lowercase<string> & {
|
|
346
|
-
readonly __hex: true;
|
|
347
|
-
} & {
|
|
348
|
-
readonly __address: true;
|
|
349
|
-
})[] | undefined;
|
|
350
|
-
};
|
|
351
|
-
heartbeatInterval: number;
|
|
352
|
-
minStake: number;
|
|
353
|
-
port: number;
|
|
354
|
-
allowlist?: (Lowercase<string> & {
|
|
355
|
-
readonly __hex: true;
|
|
356
|
-
} & {
|
|
357
|
-
readonly __address: true;
|
|
358
|
-
})[] | undefined;
|
|
359
|
-
disableIntentRedeclaration?: boolean | undefined;
|
|
360
|
-
healthCheckPort?: number | undefined;
|
|
361
|
-
mnemonic?: string | undefined;
|
|
362
|
-
rewardAddress?: string | undefined;
|
|
363
|
-
};
|
|
364
|
-
rewardRedemption: {
|
|
365
|
-
chain: {
|
|
366
|
-
id?: import("@xylabs/sdk-js").BrandedHex | undefined;
|
|
367
|
-
genesisRewardAddress?: (Lowercase<string> & {
|
|
368
|
-
readonly __hex: true;
|
|
369
|
-
} & {
|
|
370
|
-
readonly __address: true;
|
|
371
|
-
}) | undefined;
|
|
372
|
-
};
|
|
373
|
-
evm: {
|
|
374
|
-
chainId?: string | undefined;
|
|
375
|
-
infura?: {
|
|
376
|
-
projectId?: string | undefined;
|
|
377
|
-
projectSecret?: string | undefined;
|
|
378
|
-
} | undefined;
|
|
379
|
-
jsonRpc?: {
|
|
380
|
-
url?: string | undefined;
|
|
381
|
-
} | undefined;
|
|
382
|
-
};
|
|
383
|
-
log: {
|
|
384
|
-
logLevel: "log" | "error" | "warn" | "info" | "debug" | "trace";
|
|
385
|
-
silent: boolean;
|
|
386
|
-
};
|
|
387
|
-
remote: {
|
|
388
|
-
rpc?: {
|
|
389
|
-
url: string;
|
|
390
|
-
} | undefined;
|
|
391
|
-
};
|
|
392
|
-
storage: {
|
|
393
|
-
mongo?: {
|
|
394
|
-
connectionString?: string | undefined;
|
|
395
|
-
database?: string | undefined;
|
|
396
|
-
domain?: string | undefined;
|
|
397
|
-
password?: string | undefined;
|
|
398
|
-
username?: string | undefined;
|
|
399
|
-
} | undefined;
|
|
400
|
-
root?: string | undefined;
|
|
401
|
-
};
|
|
402
|
-
telemetry: {
|
|
403
|
-
metrics?: {
|
|
404
|
-
scrape: {
|
|
405
|
-
path: string;
|
|
406
|
-
port?: number | undefined;
|
|
407
|
-
};
|
|
408
|
-
} | undefined;
|
|
409
|
-
otel?: {
|
|
410
|
-
otlpEndpoint?: string | undefined;
|
|
411
|
-
} | undefined;
|
|
412
|
-
};
|
|
413
|
-
validation: {
|
|
414
|
-
allowedRewardRedeemers?: (Lowercase<string> & {
|
|
415
|
-
readonly __hex: true;
|
|
416
|
-
} & {
|
|
417
|
-
readonly __address: true;
|
|
418
|
-
})[] | undefined;
|
|
419
|
-
allowedRewardEscrowAccountSigners?: (Lowercase<string> & {
|
|
420
|
-
readonly __hex: true;
|
|
421
|
-
} & {
|
|
422
|
-
readonly __address: true;
|
|
423
|
-
})[] | undefined;
|
|
424
|
-
};
|
|
425
|
-
host: string;
|
|
426
|
-
port: number;
|
|
427
|
-
mnemonic?: string | undefined;
|
|
428
|
-
};
|
|
429
|
-
};
|
|
430
|
-
};
|
|
431
|
-
//# sourceMappingURL=tryParseConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tryParseConfig.d.ts","sourceRoot":"","sources":["../../src/tryParseConfig.ts"],"names":[],"mappings":"AAcA;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuB1B,CAAA"}
|