UNPKG

delegate-framework

Version:

A TypeScript framework for building robust, production-ready blockchain workflows with comprehensive error handling, logging, and testing. Maintained by delegate.fun

42 lines 1.64 kB
import { Connection } from "@solana/web3.js"; import { SplConfig, Logger, GetPriorityFeeOptions } from "../types"; export declare class SplClient { private static readonly DEFAULT_TIMEOUT; private static readonly DEFAULT_RETRIES; private static readonly DEFAULT_PERCENTILE; private static readonly DEFAULT_CU_PRICE; private readonly config; private readonly connection; private readonly logger?; private requestId; constructor(config: SplConfig); /** * Get priority fee based on recent network activity * @param options - Optional configuration for fee calculation * @param options.percentile - Percentile to use for fee calculation (0-1, default: 0.9999999) * @param options.defaultCuPrice - Default fee when no data is available (default: 0.1) * @returns Priority fee in microLamports per compute unit */ getPriorityFee(options?: GetPriorityFeeOptions): Promise<number>; /** * Make a request with retry logic and error handling * @param operation - The operation to perform * @param operationName - Name of the operation for logging * @returns Result of the operation */ private makeRequest; /** * Utility method for delays * @param ms - Milliseconds to delay */ private delay; /** * Get the current configuration * @returns Current client configuration */ getConfig(): Readonly<Omit<Required<SplConfig>, 'logger' | 'connection' | 'programId' | 'percentile' | 'defaultCuPrice'> & { connection: Connection; logger?: Logger; }>; } //# sourceMappingURL=spl.d.ts.map