import type { Payments } from '../../payments.js'; import { McpConfig, PromptOptions, ResourceOptions, ToolOptions } from '../types/paywall.types.js'; import { PaywallAuthenticator } from './auth.js'; import { CreditsContextProvider } from './credits-context.js'; /** * Main class for creating paywall-protected MCP handlers */ export declare class PaywallDecorator { private payments; private authenticator; private creditsContext; private config; constructor(payments: Payments, authenticator: PaywallAuthenticator, creditsContext: CreditsContextProvider); /** * Configure the paywall with agent and server information */ configure(options: McpConfig): void; /** * Create a paywall-protected handler (uncurried version only) */ protect(handler: (args: TArgs, extra?: any) => Promise | any, options: ToolOptions | PromptOptions): (args: TArgs, extra?: any) => Promise; protect(handler: (uri: URL, variables: Record, extra?: any) => Promise | any, options: ResourceOptions): (uri: URL, variables: Record, extra?: any) => Promise; /** * Internal method to create the wrapped handler */ private createWrappedHandler; /** * Build a spec-shaped `PaymentRequired` dict for a settlement failure, from * the authenticated request context. Surfaced (with tool content suppressed) * when settlement fails after the tool has executed. */ private buildPaymentRequiredFromAuth; /** * Redeem credits after successful request */ private redeemCredits; } //# sourceMappingURL=paywall.d.ts.map