UNPKG

@gala-chain/launchpad-mcp-server

Version:

MCP server for Gala Launchpad SDK with 55 tools + 14 slash commands - Production-grade AI agent integration with comprehensive validation, optimized performance, and 80%+ test coverage

147 lines 3.86 kB
/** * Default Value Utilities * * Centralized default values for tool parameters to eliminate magic numbers * and ensure consistency across 47 MCP tools. * * @see Phase 2.2 of refactoring plan */ /** * Default pagination configuration */ export declare const DEFAULT_PAGINATION: { readonly page: 1; readonly limit: 20; }; /** * Operation-specific default limits */ export declare const DEFAULT_LIMITS: { readonly trade: 20; readonly user: 20; readonly pool: 20; readonly comment: 20; }; /** * Maximum limits per operation type (from MCP_CONSTRAINTS) */ export declare const MAX_LIMITS: { readonly trade: 20; readonly user: 20; readonly pool: 100; readonly comment: 50; }; /** * Default slippage tolerance (1%) */ export declare const DEFAULT_SLIPPAGE_TOLERANCE = 0.01; /** * Default reverse bonding curve fee slippage tolerance (1%) */ export declare const DEFAULT_RBC_FEE_SLIPPAGE = 0.01; /** * Default pool type for fetchPools */ export declare const DEFAULT_POOL_TYPE = "recent"; /** * Default sort order */ export declare const DEFAULT_SORT_ORDER = "DESC"; /** * Default resolution for volume data (1 hour) */ export declare const DEFAULT_VOLUME_RESOLUTION = "1h"; /** * Resolution mapping (string to seconds) */ export declare const RESOLUTION_MAP: Record<string, number>; /** * Applies default pagination values to args object * * @example * ```typescript * const params = applyPaginationDefaults(args); * // { page: 1, limit: 20, ...otherArgs } * ``` */ export declare function applyPaginationDefaults<T extends Record<string, any>>(args: T, defaults?: { page?: number; limit?: number; }): T & { page: number; limit: number; }; /** * Applies operation-specific pagination defaults * * @example * ```typescript * const params = applyOperationPaginationDefaults(args, 'pool'); * // Uses default limit of 20 for pool operations * ``` */ export declare function applyOperationPaginationDefaults<T extends Record<string, any>>(args: T, operationType: keyof typeof DEFAULT_LIMITS): T & { page: number; limit: number; }; /** * Applies default slippage values to trading args * * @example * ```typescript * const params = applySlippageDefaults(args); * // { slippageToleranceFactor: 0.01, maxAcceptableReverseBondingCurveFeeSlippageFactor: 0.01, ...args } * ``` */ export declare function applySlippageDefaults<T extends Record<string, any>>(args: T, defaults?: { slippageToleranceFactor?: number; maxAcceptableReverseBondingCurveFeeSlippageFactor?: number; }): T & { slippageToleranceFactor: number; maxAcceptableReverseBondingCurveFeeSlippageFactor: number; }; /** * Converts volume resolution string to seconds * * @example * ```typescript * const seconds = resolutionToSeconds('1h', '1h'); * // 3600 * ``` */ export declare function resolutionToSeconds(resolution: string | undefined, defaultResolution?: string): number; /** * Converts ISO 8601 date string to Unix timestamp (seconds) * * @example * ```typescript * const timestamp = dateToUnixTimestamp('2024-01-15T14:30:25Z'); * // 1705329025 * ``` */ export declare function dateToUnixTimestamp(isoDate: string | undefined): number | undefined; export declare const defaultValues: { pagination: { readonly page: 1; readonly limit: 20; }; limits: { readonly trade: 20; readonly user: 20; readonly pool: 20; readonly comment: 20; }; maxLimits: { readonly trade: 20; readonly user: 20; readonly pool: 100; readonly comment: 50; }; slippageTolerance: number; rbcFeeSlippage: number; poolType: string; sortOrder: string; volumeResolution: string; resolutionMap: Record<string, number>; }; //# sourceMappingURL=default-values.d.ts.map