/**
 * @purpose Config account utilities for SRSLY
 *
 * Fetches global config state data from the SRSLY program.
 */
import { type Address } from '@solana/kit';
import { type ConfigState } from '../generated/codama/accounts';
/**
 * Fetch global config state from the SRSLY program
 *
 * @param rpcUrl - Optional RPC endpoint URL. If not provided, uses RPC from global config
 * @returns Config state with vault, fees, durations, etc.
 * @throws Error if config account not found or fetch fails
 *
 * @example
 * ```typescript
 * // Uses RPC URL from global config
 * const config = await fetchConfig();
 * console.log('Vault:', config.data.slyvault);
 * console.log('Service fee:', config.data.serviceFeeBps);
 *
 * // Uses specific RPC URL
 * const config2 = await fetchConfig('https://api.devnet.solana.com');
 * console.log('Admin:', config2.data.admin);
 * ```
 */
export declare function fetchConfig(rpcUrl?: string): Promise<{
    data: ConfigState;
    address: Address;
}>;
/**
 * Fetch all config state accounts from the SRSLY program
 *
 * Uses getProgramAccounts with a discriminator filter to find all ConfigState accounts.
 *
 * @param rpcUrl - Optional RPC endpoint URL. If not provided, uses RPC from global config
 * @returns Array of config states with their addresses
 *
 * @example
 * ```typescript
 * const configs = await fetchAllConfigs();
 * console.log(`Found ${configs.length} configs`);
 * configs.forEach(c => console.log(c.address, c.data.admin));
 * ```
 */
export declare function fetchAllConfigs(rpcUrl?: string): Promise<Array<{
    data: ConfigState;
    address: Address;
}>>;
//# sourceMappingURL=config.d.ts.map