/** * Utility Functions */ import { Connection, TransactionInstruction } from "@solana/web3.js"; export * from "./simulation.js"; export * from "./jito.js"; /** * Priority level for transaction fees */ export declare enum PriorityLevel { Fast = "fast", Turbo = "turbo", Ultra = "ultra" } /** * Configuration for priority fee calculation */ export interface PriorityFeeConfig { level: PriorityLevel; baseMultiplier: number; maxMicroLamports: number; } /** * Priority fee configuration by level * - Fast: 50th percentile, 1.0x multiplier, 1k max (minimal fallback) * - Turbo: 75th percentile, 2.0x multiplier, 5k max (minimal fallback) * - Ultra: 90th percentile, 5.0x multiplier, 10k max (minimal fallback) */ export declare const PRIORITY_CONFIGS: Record; /** * Default priority fee in micro-lamports per compute unit * Minimum value (1) is used as fallback when RPC doesn't support priority fee queries */ export declare const DEFAULT_PRIORITY_FEE_MICRO_LAMPORTS = 1; /** * Create a Compute Unit limit instruction */ export declare function createComputeUnitLimitInstruction(units: number): TransactionInstruction; /** * Create a Priority Fee instruction */ export declare function createPriorityFeeInstruction(microLamportsPerCu: number): TransactionInstruction; /** * Get recent priority fees from the network * Returns the median priority fee from recent slots * * @param connection - Solana connection * @param fallbackMicroLamports - Fallback value if RPC doesn't support priority fees (e.g., devnet) */ export declare function getRecentPriorityFee(connection: Connection, fallbackMicroLamports?: number): Promise; /** * Calculate priority fee using percentile-based approach * Falls back to tier-based fees if RPC call fails * * @param connection - Solana connection * @param level - Priority level (Fast/Turbo/Ultra) * @param fallbackMicroLamports - Optional fallback value (defaults to level's max) * @returns Priority fee in microLamports per compute unit */ export declare function calculatePriorityFee(connection: Connection, level: PriorityLevel, fallbackMicroLamports?: number): Promise; /** * Create compute budget instructions for a transaction * * @param cuLimit - Compute unit limit * @param connection - Optional connection to fetch dynamic priority fee * @param priorityFeeMicroLamports - Optional manual priority fee override * @returns Array of compute budget instructions to prepend to transaction */ export declare function createComputeBudgetInstructions(cuLimit: number, connection?: Connection, priorityFeeMicroLamports?: number): Promise; /** * Sleep for a specified number of milliseconds */ export declare function sleep(ms: number): Promise; /** * Format lamports to SOL string */ export declare function formatSol(lamports: number | bigint): string; /** * Format cents to dollar string */ export declare function formatDollars(cents: number): string; /** * Format probability as percentage */ export declare function formatPercentage(probability: number): string; //# sourceMappingURL=index.d.ts.map