import { Idl, Program, web3 } from "@coral-xyz/anchor";
import { Connection, Finality, PublicKey, SignaturesForAddressOptions } from "@solana/web3.js";
import { EventType } from "../../types/svm";
/**
 * Finds a program address with a given label and optional extra seeds.
 */
export declare function findProgramAddress(label: string, program: PublicKey, extraSeeds?: string[]): {
    publicKey: web3.PublicKey;
    bump: number;
};
/**
 * Reads events from a transaction.
 */
export declare function readEvents<IDL extends Idl = Idl>(connection: Connection, txSignature: string, programs: Program<IDL>[], commitment?: Finality): Promise<{
    program: web3.PublicKey;
    data: any;
    name: string | undefined;
}[]>;
/**
 * Processes events from a transaction.
 */
export declare function processEventFromTx(txResult: web3.VersionedTransactionResponse, programs: Program<any>[]): {
    program: web3.PublicKey;
    data: any;
    name: string | undefined;
}[];
/**
 * Helper function to wait for an event to be emitted. Should only be used in tests where txSignature is known to emit.
 */
export declare function readEventsUntilFound<IDL extends Idl = Idl>(connection: Connection, txSignature: string, programs: Program<IDL>[]): Promise<{
    program: web3.PublicKey;
    data: any;
    name: string | undefined;
}[]>;
/**
 * Retrieves a specific event by name from a list of events.
 */
export declare function getEvent(events: any[], program: PublicKey, eventName: string): any;
/**
 * Reads all events for a specific program.
 */
export declare function readProgramEvents(connection: Connection, program: Program<any>, finality?: Finality, options?: SignaturesForAddressOptions): Promise<EventType[]>;
/**
 * Subscribes to CPI events for a program.
 */
export declare function subscribeToCpiEventsForProgram(connection: Connection, program: Program<any>, callback: (events: any[]) => void): Promise<number>;
/**
 * Stringifies a CPI event.
 */
export declare function stringifyCpiEvent(obj: any, eventName: string): any;
