/** * Credits context provider for MCP paywall. * This class does not "calculate" credits, it builds the context * and resolves the configured credit policy. */ import { CreditsOption, AuthResult } from '../types/paywall.types.js'; /** * Provide credits using fixed value or a function receiving contextual information. */ export declare class CreditsContextProvider { /** * Resolve the credits to redeem based on the provided option. * @param creditsOption - Credits configuration (fixed bigint or function). * @param args - Original handler arguments. * @param result - Handler result. * @param authResult - Authentication result with request metadata. * @returns Credits to redeem as bigint. Defaults to 1n when option is not provided. */ resolve(creditsOption: CreditsOption | undefined, args: any, result: any, authResult: AuthResult): bigint; /** * Extract tool name from a logical MCP URL. * Falls back to 'tool' for HTTP endpoints or invalid URLs. * @param logicalUrl - Logical URL string (mcp:// or http://). * @returns Tool name derived from the URL path, or 'tool' as fallback. */ private extractToolNameFromUrl; } //# sourceMappingURL=credits-context.d.ts.map