@substrate/api-sidecar
Version:
REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.
32 lines (31 loc) • 793 B
TypeScript
import { Request, Response } from 'express';
import client from 'prom-client';
interface IAppConfiguration {
port: number;
host: string;
}
interface Query extends Request {
route: {
path: string;
[key: string]: unknown;
};
}
export default class Metrics_App {
private app;
private registry;
private metrics;
private includeQueryParams;
private readonly port;
private readonly host;
/**
* @param appConfig configuration for app.
*/
constructor({ host, port }: IAppConfiguration);
listen(): void;
getRegisteredMetrics(): Record<string, client.Metric>;
private createMetricByType;
private getRoute;
preMiddleware(): (req: Query, res: Response, next: () => void) => void;
private init;
}
export {};