UNPKG

@thorium-dev-group/x402-mcp-extension

Version:
33 lines (32 loc) 1.3 kB
import 'reflect-metadata'; import { PaymentOptions } from './PaymentOptions'; export declare const METADATA_KEY_MCP_RESOURCE = "x402_mcp_protocol:mcp_resource"; export interface MCPResourceOptions { name: string; uri?: string; template?: string; description?: string; mimeType?: string; title?: string; payment?: PaymentOptions; listCallback?: (extra: any) => Promise<{ resources: Array<{ uri: string; }>; }> | { resources: Array<{ uri: string; }>; }; completeCallbacks?: { [variable: string]: (value: string, context?: { arguments?: Record<string, string>; }) => string[] | Promise<string[]>; }; _meta?: object; } export declare function MCPResource(options: MCPResourceOptions): (target: any, propertyKey: string | symbol) => void; export declare function isMCPResource(target: Object, propertyKey: string | symbol): boolean; export declare function getMCPResourceOptions(target: Object, propertyKey: string | symbol): MCPResourceOptions | undefined; export declare function isPaymentRequired(target: Object, propertyKey: string | symbol): boolean; export declare function getPaymentOptions(target: Object, propertyKey: string | symbol): PaymentOptions | undefined;