/** * Self-service federation join with a local key: public registration or a private invite. * * Decentralized by design: the user generates/holds THEIR OWN Nostr key locally, * registers with a NIP-98-signed request (no admin in the user flow), proves * membership with NIP-42, and announces themselves. The gateway never signs for them. * * `nostr-tools` is an optional dependency (secp256k1/Schnorr is not in node:crypto): * when absent the tool degrades with an install hint instead of throwing at load. */ import type { MCPTool } from './types.js'; type NostrTools = { generateSecretKey: () => Uint8Array; getPublicKey: (sk: Uint8Array) => string; finalizeEvent: (t: Record, sk: Uint8Array) => Record & { id: string; }; }; export declare function loadOrCreateKey(nt: NostrTools, file?: string): { sk: Uint8Array; pubkey: string; created: boolean; }; export declare function nip98Header(nt: NostrTools, sk: Uint8Array, url: string, method: string, body?: string): string; export declare function verifyMembership(nt: NostrTools, sk: Uint8Array, relayWs: string): Promise<{ ok: boolean; reason?: string; }>; export declare const xFederationJoinTools: MCPTool[]; export {}; //# sourceMappingURL=x-federation-join.d.ts.map