UNPKG

libp2p-middleware-evm

Version:
30 lines 1.29 kB
import { type AbortOptions, type Connection, type Startable, type Stream } from '@libp2p/interface'; import { type EVMRuleEngine } from 'evm-rule-engine'; import type { MiddlewareEVMComponents, MiddlewareEVMInit } from './index.js'; export declare class MiddlewareEVM implements Startable { readonly protocol: string; private readonly components; private started; readonly timeout: number; private readonly maxInboundStreams; private readonly maxOutboundStreams; private readonly runOnLimitedConnection; private readonly log; private readonly decoratedConnections; evmRuleEngine: EVMRuleEngine; private readonly signer; constructor(components: MiddlewareEVMComponents, init: MiddlewareEVMInit); readonly [Symbol.toStringTag] = "libp2p-middleware-evm"; start(): Promise<void>; stop(): Promise<void>; isStarted(): boolean; isDecorated(connection: Connection): boolean; wrappedRulesToSign(): string; handler({ stream, connection }: { stream: Stream; connection: Connection; }): void; handle(stream: Stream, connection: Connection): Promise<void>; decorate(stream: Stream, connection: Connection, abortOptions?: AbortOptions): Promise<boolean>; } //# sourceMappingURL=middleware-evm.d.ts.map