import type { UnsubscribePromise } from '@polkadot/api/types'; import type { GearApi } from '../GearApi'; import type { HexString, IBalanceCallback, IBlocksCallback } from '../types'; import type { Transfer, UserMessageSent } from './GearEvents'; import type { IGearEvent, IGearVoucherEvent } from './types'; export declare class GearEvents { #private; private api; constructor(gearApi: GearApi); subscribeToGearEvent(method: M, callback: (event: IGearEvent[M]) => void | Promise, fromBlock?: number | HexString, blocks?: 'finalized' | 'latest'): Promise<() => void>; subscribeToGearVoucherEvent(method: M, callback: (event: IGearVoucherEvent[M]) => void | Promise): UnsubscribePromise; subscribeToUserMessageSentByActor(options: { from?: HexString; to?: HexString; }, callback: (event: UserMessageSent) => void): UnsubscribePromise; subscribeToTransferEvents(callback: (event: Transfer) => void | Promise): UnsubscribePromise; /** * @deprecated Use api.blocks.subscribeNewHeads instead */ subscribeToNewBlocks(callback: IBlocksCallback): UnsubscribePromise; subscribeToBalanceChanges(accountAddress: string, callback: IBalanceCallback): UnsubscribePromise; }