import { node } from '../api'; import { NodeProvider } from '../api'; declare type EventCallback = (event: node.ContractEvent) => Promise; declare type ErrorCallback = (error: any, subscription: Subscription) => Promise; export interface SubscribeOptions { provider: NodeProvider; contractAddress: string; fromCount?: number; pollingInterval: number; eventCallback: EventCallback; errorCallback: ErrorCallback; } export declare class Subscription { provider: NodeProvider; readonly contractAddress: string; pollingInterval: number; private fromCount; private eventCallback; private errorCallback; private task; private cancelled; private eventEmitter; constructor(options: SubscribeOptions); unsubscribe(): void; currentEventCount(): number; private fetchEvents; } export declare function subscribe(options: SubscribeOptions): Subscription; export {};