UNPKG

nostr-nsec-seedphrase

Version:

A comprehensive TypeScript library for Nostr key management with BIP39 seed phrases, supporting both ESM and CommonJS. Implements NIP-01, NIP-06, NIP-19, and NIP-26 with key generation, event signing, bech32 encoding/decoding, and secure cryptographic ope

27 lines (26 loc) 1.22 kB
import { bytesToHex as originalBytesToHex, hexToBytes as originalHexToBytes } from "@noble/hashes/utils.js"; export declare function getPublicKey(privateKey: Uint8Array | string): Uint8Array; export declare const schnorr: { sign(message: Uint8Array | string, privateKey: Uint8Array | string): Promise<Uint8Array>; verify(signature: Uint8Array | string, message: Uint8Array | string, publicKey: Uint8Array | string): Promise<boolean>; }; export declare const utils: { bytesToHex: typeof originalBytesToHex; hexToBytes: typeof originalHexToBytes; isValidPrivateKey(key: Uint8Array | string): boolean; randomPrivateKey(): Uint8Array; }; declare const _default: { getPublicKey: typeof getPublicKey; schnorr: { sign(message: Uint8Array | string, privateKey: Uint8Array | string): Promise<Uint8Array>; verify(signature: Uint8Array | string, message: Uint8Array | string, publicKey: Uint8Array | string): Promise<boolean>; }; utils: { bytesToHex: typeof originalBytesToHex; hexToBytes: typeof originalHexToBytes; isValidPrivateKey(key: Uint8Array | string): boolean; randomPrivateKey(): Uint8Array; }; }; export default _default;