UNPKG

node-red-contrib-nostr

Version:

Node-RED nodes for seamless Nostr protocol integration. Features robust WebSocket handling, event filtering, and NPUB-based routing. Built with TypeScript for type safety and extensive testing. Perfect for Nostr automation flows.

37 lines (36 loc) 1.26 kB
export declare function getDefaultReaderKeys(): Promise<{ privateKey: string; publicKey: string; }>; /** * Generate a new Nostr key pair * @returns {Promise<Object>} Object containing private and public keys */ export declare function generateKeyPair(): Promise<{ privateKey: string; publicKey: string; }>; /** * Convert a hex public key to npub format * @param {string} publicKeyHex - Public key in hex format * @returns {string} npub formatted public key */ export declare function hexToNpub(publicKeyHex: string): string; /** * Convert an npub to hex format * @param {string} npub - npub formatted public key * @returns {string} Public key in hex format */ export declare function npubToHex(npub: string): string; /** * Get public key from private key * @param {string} privateKeyHex - Private key in hex format * @returns {Promise<string>} Public key in hex format */ export declare function getPublicKey(privateKeyHex: string): Promise<string>; export declare class KeyManager { generatePrivateKey(): Promise<string>; getPublicKey(privateKey: string): Promise<string>; sign(privateKey: string, message: string): Promise<string>; verify(publicKey: string, message: string, signature: string): Promise<boolean>; }