/** * Nostr utilities — event creation, signing, publishing */ export interface PortfolioItem { id: string; url: string; name?: string; description?: string; } export interface AgentProfile { name?: string; description?: string; capabilities?: string[]; framework?: string; model?: string; ownerType?: string; ownerX?: string; status?: string; parent?: string; messagingPolicy?: string; messagingMinTrust?: number; messagingFee?: number; portfolio?: PortfolioItem[]; skills?: string[]; experience?: string[]; } /** * Generate a new Nostr keypair and save to a JSON file. * Returns the secret key as Uint8Array. */ export declare function generateAndSaveKeypair(outputPath: string): { sk: Uint8Array; npub: string; path: string; }; /** * Parse a secret key from nsec, hex, or key file */ export declare function parseSecretKey(input: string): Uint8Array; /** * Get npub from secret key */ export declare function getNpub(sk: Uint8Array): string; /** * Get hex pubkey from secret key */ export declare function getPubkeyHex(sk: Uint8Array): string; /** * Build and sign a kind 31339 agent profile event */ export declare function createProfileEvent(sk: Uint8Array, profile: AgentProfile): import("nostr-tools").VerifiedEvent; /** * Publish an event to Nostr relays */ export declare function publishToRelays(event: object, relays?: string[], timeoutMs?: number): Promise; /** * Fetch existing kind 0, merge new fields, and republish. * Used to set lud16 (lightning address) during registration. */ export declare function updateKind0(sk: Uint8Array, updates: { lud16?: string; }, relays?: string[]): Promise; /** * Build and sign a kind 0 profile metadata event (for NIP-05 verification). * After claiming a NIP-05 name, publish this to relays so Nostr clients * (njump, Damus, Primal) can verify the identity. */ /** * Fetch existing kind 0, merge explicit updates, and return signed event. * Safe for existing Nostr users — only overwrites fields explicitly passed. */ export declare function buildKind0Event(sk: Uint8Array, updates: { name?: string; about?: string; nip05?: string; picture?: string; lud16?: string; website?: string; ownerPubkeyHex?: string; bot?: boolean; }, relays?: string[]): Promise; /** * Create and sign a kind 1 note tagged #agentdex */ export declare function createNote(sk: Uint8Array, content: string): import("nostr-tools").VerifiedEvent;