UNPKG

@kya-os/mcp-i

Version:

The TypeScript MCP framework with identity features built-in

32 lines (31 loc) 932 B
import { NonceCache } from "@kya-os/contracts/handshake"; /** * Cloudflare KV namespace interface */ interface KVNamespace { get(key: string, options?: { type?: string; }): Promise<string | null>; getWithMetadata?(key: string): Promise<{ value: string | null; metadata?: unknown; }>; put(key: string, value: string, options?: { expirationTtl?: number; }): Promise<void>; delete(key: string): Promise<void>; } /** * Cloudflare KV-based nonce cache implementation * Suitable for Cloudflare Workers deployments */ export declare class CloudflareKVNonceCache implements NonceCache { private kv; private keyPrefix; constructor(kv: KVNamespace, keyPrefix?: string); private getKey; has(nonce: string, agentDid?: string): Promise<boolean>; add(nonce: string, ttl: number, agentDid?: string): Promise<void>; cleanup(): Promise<void>; } export {};