v0.1.0 — Library core
Milestone A2: keys, encoding, events, and signatures — the cryptographic and data foundation the rest of the library builds on.
Highlights
- secp256k1 keys and BIP-340 Schnorr signatures, bound to bitcoin-core's audited
libsecp256k1(compiled from source, pinned by exact commit). Passes the full official BIP-340 test-vector suite — all 19 vectors, both signing (exact signature reproduction) and verification (correct accept/reject on every case, including the adversarial ones). - NIP-01 event model: canonical
[0,pubkey,created_at,kind,tags,content]serialization with the spec's exact escaping rule, sha256 id hashing, wire-format JSON encode/decode, and event-levelcreate/verify. - NIP-19 bech32 entity encoding (
npub/nsec/notebare,nprofile/nevent/naddr/nrelayTLV) and NIP-21nostr:URIs, verified against the official spec vectors. - NIP-06 key derivation: BIP-39 mnemonic (embedded official English wordlist, checksum validation) + BIP-32 HD derivation for
m/44'/1237'/<account>'/0/0, verified against both official test vectors byte-for-byte. - NIP-49 encrypted private key storage (
ncryptsec): scrypt + XChaCha20-Poly1305, verified against the official decryption vector.
Quality
- 39/39 tests passing, CI green on Linux and macOS.
- Every cryptographic primitive verified against official spec test vectors, not just internal self-consistency.
- No hand-rolled cryptography — signing/verification binds to audited
bitcoin-core/secp256k1.
Install
zig fetch --save https://github.com/zig-nostr/nostr/archive/refs/tags/v0.1.0.tar.gzWhat's next
Milestone A3: relay transport (websocket client, reconnect/backoff), NIP-01 message handling, subscription management, and NIP-65 outbox routing.