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

30 lines (23 loc) 1.32 kB
# Project Checklist ## Overview of Changes - Fixed TypeScript errors related to unknown type assignments across multiple files. - Improved error handling by converting error objects to strings before logging. - Ensured consistent logging practices throughout the codebase. - Updated logger imports to use default imports where necessary. ## Resolved Issues - Resolved TypeScript error: `Argument of type 'unknown' is not assignable to parameter of type 'string | undefined'` in the following files: - `src/crypto/keys.ts` - `src/utils/validation.ts` - `src/utils/conversion.ts` - `src/crypto/events.ts` - `src/nips/nip-26.ts` - `src/index.ts` ## Best Practices - Always convert error objects to strings when logging to avoid TypeScript errors. - Use consistent logging formats and messages for better readability and debugging. - Validate inputs and handle exceptions gracefully to improve code robustness. ## Gotchas - Be cautious when handling unknown types in TypeScript; always ensure proper type checks or conversions. - Keep an eye on the logger import style to avoid inconsistencies in the codebase. --- This checklist serves as a guide for future development and maintenance of the project. Make sure to adhere to the best practices and be aware of potential pitfalls as you work on the code.