import { Idl } from "@coral-xyz/anchor";
import { Address, Commitment, GetSignaturesForAddressApi, Signature } from "@solana/kit";
import { EventName, EventWithData, SVMProvider } from "./types";
import { DepositWithTime, FillWithTime } from "../../interfaces";
type GetSignaturesForAddressConfig = Parameters<GetSignaturesForAddressApi["getSignaturesForAddress"]>[1];
export type DepositEventFromSignature = Omit<DepositWithTime, "fromLiteChain" | "toLiteChain">;
export type FillEventFromSignature = FillWithTime;
export declare class SvmCpiEventsClient {
    private rpc;
    private programAddress;
    private programEventAuthority;
    private idl;
    /**
     * Note: Strongly prefer to use the async create() method to instantiate.
     */
    constructor(rpc: SVMProvider, address: Address, eventAuthority: Address, idl: Idl);
    /**
     * Factory method to asynchronously create an instance of SvmSpokeEventsClient.
     */
    static create(rpc: SVMProvider): Promise<SvmCpiEventsClient>;
    static createFor(rpc: SVMProvider, programId: string, idl: Idl): Promise<SvmCpiEventsClient>;
    /**
     * Queries events for the SvmSpoke program filtered by event name.
     *
     * @param eventName - The name of the event to filter by.
     * @param fromSlot - Optional starting slot.
     * @param toSlot - Optional ending slot.
     * @param options - Options for fetching signatures.
     * @returns A promise that resolves to an array of events matching the eventName.
     */
    queryEvents(eventName: EventName, fromSlot?: bigint, toSlot?: bigint, options?: GetSignaturesForAddressConfig): Promise<EventWithData[]>;
    /**
     * Queries events for the provided derived address at instantiation filtered by event name.
     *
     * @param eventName - The name of the event to filter by.
     * @param fromSlot - Optional starting slot.
     * @param toSlot - Optional ending slot.
     * @param options - Options for fetching signatures.
     * @returns A promise that resolves to an array of events matching the eventName.
     */
    queryDerivedAddressEvents(eventName: string, derivedAddress: Address, fromSlot?: bigint, toSlot?: bigint, options?: GetSignaturesForAddressConfig): Promise<EventWithData[]>;
    /**
     * Queries all events for a specific program.
     *
     * @param fromSlot - Optional starting slot.
     * @param toSlot - Optional ending slot.
     * @param options - Options for fetching signatures.
     * @param forDerivedAddress - Whether to query events for the program or the derived address.
     * @returns A promise that resolves to an array of all events with additional metadata.
     */
    private queryAllEvents;
    /**
     * Reads events from a transaction signature.
     *
     * @param txSignature - The transaction signature.
     * @param commitment - Commitment level.
     * @returns A promise that resolves to an array of events.
     */
    readEventsFromSignature(txSignature: Signature, commitment?: Commitment): Promise<{
        program: Address;
        data: unknown;
        name: string;
    }[]>;
    /**
     * Processes events from a transaction.
     *
     * @param txResult - The transaction result.
     * @returns A promise that resolves to an array of events with their data and name.
     */
    private processEventFromTx;
    /**
     * Finds all FundsDeposited events for a given transaction signature.
     *
     * @param originChainId - The chain ID where the deposit originated.
     * @param txSignature - The transaction signature to search for events.
     * @param commitment - Optional commitment level for the transaction query.
     * @returns A promise that resolves to an array of deposit events for the transaction, or undefined if none found.
     */
    getDepositEventsFromSignature(originChainId: number, txSignature: Signature, commitment?: Commitment): Promise<DepositEventFromSignature[] | undefined>;
    /**
     * Finds all FilledRelay events for a given transaction signature.
     *
     * @param destinationChainId - The destination chain ID (must be an SVM chain).
     * @param txSignature - The transaction signature to search for events.
     * @returns A promise that resolves to an array of fill events for the transaction, or undefined if none found.
     */
    getFillEventsFromSignature(destinationChainId: number, txSignature: Signature, commitment?: Commitment): Promise<FillEventFromSignature[] | undefined>;
    getProgramAddress(): Address;
    getRpc(): SVMProvider;
}
export {};
