import { AccountInfo, Connection, PublicKey, AddressLookupTableAccount } from "@solana/web3.js"; import { type TokenAccount } from "../client/base"; import { Mint } from "@solana/spl-token"; export type StakeAccountInfo = { address: PublicKey; lamports: number; state: string; voter?: PublicKey; }; export declare const getStakeDelegationState: (activationEpoch: string | number, deactivationEpoch: string | number, currentEpoch: string | number) => "active" | "inactive" | "activating" | "deactivating"; /** * Fetches all the token accounts owned by the specified pubkey. */ export declare function getTokenAccountsByOwner(connection: Connection, owner: PublicKey): Promise; export declare function getSolAndTokenBalances(connection: Connection, owner: PublicKey): Promise<{ balanceLamports: number; uiAmount: number; tokenAccounts: TokenAccount[]; }>; export declare const findStakeAccounts: (connection: Connection, withdrawAuthority: PublicKey) => Promise; export declare const getStakeAccountsWithStates: (connection: Connection, withdrawAuthority: PublicKey) => Promise; /** * Parses mint account info to extract mint and token program * * @param accountInfo The account info buffer * @param pubkey The mint public key * @returns Mint object and token program ID */ export declare function parseMintAccountInfo(accountInfo: AccountInfo, pubkey: PublicKey): { mint: Mint; tokenProgram: PublicKey; }; /** * Fetches mint accounts and token program IDs for the given mint pubkeys * * @param connection Solana connection * @param mintPubkeys Array of mint public keys * @returns Array of mint objects with their token program IDs */ export declare function fetchMintsAndTokenPrograms(connection: Connection, mintPubkeys: PublicKey[]): Promise<{ mint: Mint; tokenProgram: PublicKey; }[]>; /** * Fetches mint account and token program ID for the given mint pubkey * * @param connection Solana connection * @param mintPubkey Mint public key * @returns Mint object and token program ID */ export declare function fetchMintAndTokenProgram(connection: Connection, mintPubkey: PublicKey): Promise<{ mint: Mint; tokenProgram: PublicKey; }>; /** * Checks if Token ACL (sRFC-37) is enabled for the given mint by verifying * the freeze authority is set to the Token ACL program. */ export declare function isTokenAclEnabled(connection: Connection, mintPubkey: PublicKey): Promise; /** * Finds all Address Lookup Tables (ALTs) associated with the current vault. * * Queries the ALT program directly using `getProgramAccounts` with filters. * * @returns Array of AddressLookupTableAccount objects for the vault * @throws RPC errors from `getProgramAccounts`. Callers that only use the * result to optimize transaction size may want to catch and fall back to an * empty list; callers that rely on the result for correctness (e.g. ALT * management commands) should let the error propagate. */ export declare function findGlamLookupTables(statePda: PublicKey, vaultPda: PublicKey, connection: Connection): Promise;