/// import reduct = require('reduct'); import Config from './config'; import Accounts from './accounts'; import Core from './core'; import Stats from './stats'; import { Middleware, MiddlewareDefinition } from '../types/middleware'; import { PluginInstance } from '../types/plugin'; export default class MiddlewareManager { protected config: Config; protected accounts: Accounts; protected core: Core; protected middlewares: { [key: string]: Middleware; }; protected stats: Stats; private startupHandlers; private teardownHandlers; private outgoingDataHandlers; private outgoingMoneyHandlers; private started; constructor(deps: reduct.Injector); construct(name: string, definition: MiddlewareDefinition): Middleware; setup(): Promise; startup(): Promise; addPlugin(accountId: string, plugin: PluginInstance): Promise; removePlugin(accountId: string, plugin: PluginInstance): Promise; sendData(data: Buffer, accountId: string): Promise; sendMoney(amount: string, accountId: string): Promise; getMiddleware(name: string): Middleware | undefined; teardown(): Promise; private createHandler; }