2023-03-04 04:25:07 +03:00
|
|
|
import type { AbstractProvider, Subscriber } from "./abstract-provider.js";
|
|
|
|
import type { EventFilter, OrphanFilter, ProviderEvent } from "./provider.js";
|
|
|
|
/**
|
2023-06-02 00:52:58 +03:00
|
|
|
* Return the polling subscriber for common events.
|
2023-03-04 04:25:07 +03:00
|
|
|
*
|
|
|
|
* @_docloc: api/providers/abstract-provider
|
|
|
|
*/
|
|
|
|
export declare function getPollingSubscriber(provider: AbstractProvider, event: ProviderEvent): Subscriber;
|
|
|
|
/**
|
2023-06-02 00:52:58 +03:00
|
|
|
* A **PollingBlockSubscriber** polls at a regular interval for a change
|
|
|
|
* in the block number.
|
2023-03-04 04:25:07 +03:00
|
|
|
*
|
|
|
|
* @_docloc: api/providers/abstract-provider
|
|
|
|
*/
|
|
|
|
export declare class PollingBlockSubscriber implements Subscriber {
|
|
|
|
#private;
|
2023-06-02 00:52:58 +03:00
|
|
|
/**
|
|
|
|
* Create a new **PollingBlockSubscriber** attached to %%provider%%.
|
|
|
|
*/
|
2023-03-04 04:25:07 +03:00
|
|
|
constructor(provider: AbstractProvider);
|
2023-06-02 00:52:58 +03:00
|
|
|
/**
|
|
|
|
* The polling interval.
|
|
|
|
*/
|
2023-03-04 04:25:07 +03:00
|
|
|
get pollingInterval(): number;
|
|
|
|
set pollingInterval(value: number);
|
|
|
|
start(): void;
|
|
|
|
stop(): void;
|
|
|
|
pause(dropWhilePaused?: boolean): void;
|
|
|
|
resume(): void;
|
|
|
|
}
|
|
|
|
/**
|
2023-06-02 00:52:58 +03:00
|
|
|
* An **OnBlockSubscriber** can be sub-classed, with a [[_poll]]
|
|
|
|
* implmentation which will be called on every new block.
|
2023-03-04 04:25:07 +03:00
|
|
|
*
|
|
|
|
* @_docloc: api/providers/abstract-provider
|
|
|
|
*/
|
|
|
|
export declare class OnBlockSubscriber implements Subscriber {
|
|
|
|
#private;
|
2023-06-02 00:52:58 +03:00
|
|
|
/**
|
|
|
|
* Create a new **OnBlockSubscriber** attached to %%provider%%.
|
|
|
|
*/
|
2023-03-04 04:25:07 +03:00
|
|
|
constructor(provider: AbstractProvider);
|
2023-06-02 00:52:58 +03:00
|
|
|
/**
|
|
|
|
* Called on every new block.
|
|
|
|
*/
|
2023-03-04 04:25:07 +03:00
|
|
|
_poll(blockNumber: number, provider: AbstractProvider): Promise<void>;
|
|
|
|
start(): void;
|
|
|
|
stop(): void;
|
|
|
|
pause(dropWhilePaused?: boolean): void;
|
|
|
|
resume(): void;
|
|
|
|
}
|
|
|
|
/**
|
2023-06-02 00:52:58 +03:00
|
|
|
* @_ignore:
|
2023-03-04 04:25:07 +03:00
|
|
|
*
|
|
|
|
* @_docloc: api/providers/abstract-provider
|
|
|
|
*/
|
|
|
|
export declare class PollingOrphanSubscriber extends OnBlockSubscriber {
|
|
|
|
#private;
|
|
|
|
constructor(provider: AbstractProvider, filter: OrphanFilter);
|
|
|
|
_poll(blockNumber: number, provider: AbstractProvider): Promise<void>;
|
|
|
|
}
|
|
|
|
/**
|
2023-06-02 00:52:58 +03:00
|
|
|
* A **PollingTransactionSubscriber** will poll for a given transaction
|
|
|
|
* hash for its receipt.
|
2023-03-04 04:25:07 +03:00
|
|
|
*
|
|
|
|
* @_docloc: api/providers/abstract-provider
|
|
|
|
*/
|
|
|
|
export declare class PollingTransactionSubscriber extends OnBlockSubscriber {
|
|
|
|
#private;
|
2023-06-02 00:52:58 +03:00
|
|
|
/**
|
|
|
|
* Create a new **PollingTransactionSubscriber** attached to
|
|
|
|
* %%provider%%, listening for %%hash%%.
|
|
|
|
*/
|
2023-03-04 04:25:07 +03:00
|
|
|
constructor(provider: AbstractProvider, hash: string);
|
|
|
|
_poll(blockNumber: number, provider: AbstractProvider): Promise<void>;
|
|
|
|
}
|
|
|
|
/**
|
2023-06-02 00:52:58 +03:00
|
|
|
* A **PollingEventSubscriber** will poll for a given filter for its logs.
|
2023-03-04 04:25:07 +03:00
|
|
|
*
|
|
|
|
* @_docloc: api/providers/abstract-provider
|
|
|
|
*/
|
|
|
|
export declare class PollingEventSubscriber implements Subscriber {
|
|
|
|
#private;
|
2023-06-02 00:52:58 +03:00
|
|
|
/**
|
|
|
|
* Create a new **PollingTransactionSubscriber** attached to
|
|
|
|
* %%provider%%, listening for %%filter%%.
|
|
|
|
*/
|
2023-03-04 04:25:07 +03:00
|
|
|
constructor(provider: AbstractProvider, filter: EventFilter);
|
|
|
|
start(): void;
|
|
|
|
stop(): void;
|
|
|
|
pause(dropWhilePaused?: boolean): void;
|
|
|
|
resume(): void;
|
|
|
|
}
|
2023-04-27 15:19:55 +03:00
|
|
|
//# sourceMappingURL=subscriber-polling.d.ts.map
|