Add keys chapter
Introduces PublicKey and SecretKey as distinct type-safe wrappers around secp256k1, with hex and NIP-19 bech32 (npub/nsec) encoding. SecretKey has a redacted Debug impl and no Display to reduce accidental leakage; it exposes material only through explicit to_hex / to_nsec. FromStr on both types auto-detects hex vs. bech32. Eight round-trip tests cover encoding, auto-detection, prefix validation, debug redaction, and generation.
This commit is contained in:
@@ -13,7 +13,7 @@ which are community-authored specifications.
|
||||
|
||||
## What this book covers
|
||||
|
||||
This book is both a tutorial and the source code for the `coracle` family of Rust crates:
|
||||
This book is the source code for the `coracle` family of Rust crates:
|
||||
|
||||
- **coracle-lib** — Core types and stateless utilities: events, keys, tags, filters, and
|
||||
serialization. Everything you need to understand and manipulate nostr data.
|
||||
|
||||
Reference in New Issue
Block a user