All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- NIP-46 server-side signer primitives:
unwrapRequest()— decrypt incoming kind 24133 event using signer's secret keywrapResponse()— encrypt and sign a NIP-46 response from the signer's perspectivehandleSignerRequest()— pure dispatch function routing NIP-46 methods to consumer-provided handlerscreateRequestFilter()— Nostr filter for subscribing to incoming requests (server-side)- New types:
Nip46SignerHandlers,Nip46HandleOptions,Nip46HandleResult,Nip46UnwrapResult
- NIP-46 now covers both client and server/signer perspectives
- Noble 2.0 migration:
@noble/curves^2.0.1,@noble/hashes^2.0.1 - Vitest 4: Upgraded test framework from vitest 3.x
- Pino 10: Upgraded logger from pino 8.x (where applicable)
- No Buffer dependency: All crypto functions accept
Uint8Arraykeys — browser-safe without polyfills - esbuild: Replaced webpack with esbuild for browser bundling
- Removed
Bufferdependency from all crypto paths - Memory zeroing for shared secrets and npub input rejection
- NIP-46 (Nostr Connect / Remote Signing): Pure protocol layer for remote signing
- Bunker URI parsing, creation, and validation
- Session management with ephemeral keypairs and NIP-44 conversation keys
- JSON-RPC request/response creation and parsing
- Kind 24133 event wrapping (encrypt + sign) and unwrapping (decrypt + parse)
- Convenience request creators for all NIP-46 methods
- Response filter helper for relay subscriptions
- Full TypeScript types:
Nip46Method,BunkerURI,Nip46Request,Nip46Response,Nip46Session
getPublicKeySync()— synchronous public key derivation from private keyfinalizeEvent()— one-step event creation + signing utility- Subpath exports:
nostr-crypto-utils/nip44,nostr-crypto-utils/nip46,nostr-crypto-utils/nip49
- NIP-44 (Versioned Encrypted Payloads): Restored from published v0.5.0 (lost during security refactoring)
getConversationKey(),encrypt(),decrypt(),calcPaddedLen(),v2API object
- NIP-49 (Private Key Encryption / ncryptsec): Restored from published v0.5.0
encrypt()anddecrypt()for ncryptsec bech32 strings
- Added
@noble/ciphers(chacha20, xchacha20poly1305 for NIP-44/49) - Added
@scure/base(base64 for NIP-44, bech32 for NIP-49)
- Updated dependencies to latest within major versions
- Updated exports to include validation functions
- Bumped version for npm publish
- Fixed Vite security vulnerability
- Updated build configuration for better ESM/CJS compatibility
- NIP-19 support and updated dependencies
- Improved types and NIP support
- Improved NIP-19 documentation and exports
- Improved TypeScript type handling and browser compatibility
- Removed unused imports
- Updated dist files after build cleanup
- Fixed linting issues and removed unused imports
- Corrected crypto module exports path for better ESM compatibility
- Fixed directory imports for Node.js ESM
- Enhanced Node.js compatibility with proper CJS/ESM module support
- Improved module resolution for both CommonJS and ES Module environments
- Fixed package exports to ensure consistent behavior across different Node.js versions
- Fixed NIP-19 function exports to ensure proper access from dependent packages
- Improved type exports for NIP-19 related types
- Updated documentation for NIP-19 functionality with clearer examples
- Enhanced logging system with comprehensive error handling
- Development mode pretty printing with timestamps
- TypeScript type exports for logger
- Export utility functions:
encodeBytesandgetPublicKeyHex
- Updated logger implementation to follow project-wide standards
- Improved error object formatting with stack traces
- Enhanced development mode output formatting
- Enhanced logging system with comprehensive error handling
- Development mode pretty printing with timestamps
- TypeScript type exports for logger
- Export utility functions:
encodeBytesandgetPublicKeyHex
- Updated logger implementation to follow project-wide standards
- Improved error object formatting with stack traces
- Enhanced development mode output formatting
- Removed unused code and variables
- Error object serialization in logs now includes stack traces
- Development mode logging now properly handles timestamps
- Resolved lint issues in nip-19, nip-26, and validation utilities
... (previous entries)