@substrate/api-sidecar
Version:
REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.
48 lines (47 loc) • 1.14 kB
TypeScript
/**
* Object to house the values of all the configurable components for Sidecar.
*/
export interface ISidecarConfig {
EXPRESS: ISidecarConfigExpress;
SUBSTRATE: ISidecarConfigSubstrate;
LOG: ISidecarConfigLog;
METRICS: ISidecarConfigMetrics;
}
interface ISidecarConfigSubstrate {
URL: string;
MULTI_CHAIN_URL: Array<{
url: string;
type: 'relay' | 'assethub' | 'parachain' | undefined;
}>;
TYPES_BUNDLE: string;
TYPES_CHAIN: string;
TYPES_SPEC: string;
TYPES: string;
CACHE_CAPACITY: number;
}
interface ISidecarConfigExpress {
HOST: string;
PORT: number;
KEEP_ALIVE_TIMEOUT: number;
MAX_BODY: string;
INJECTED_CONTROLLERS: boolean;
}
interface ISidecarConfigLog {
LEVEL: string;
JSON: boolean;
FILTER_RPC: boolean;
STRIP_ANSI: boolean;
WRITE: boolean;
WRITE_PATH: string;
WRITE_MAX_FILE_SIZE: number;
WRITE_MAX_FILES: number;
}
interface ISidecarConfigMetrics {
ENABLED: boolean;
PROM_HOST: string;
PROM_PORT: number;
LOKI_HOST: string;
LOKI_PORT: number;
INCLUDE_QUERYPARAMS: boolean;
}
export {};