- Transitive
cryptographyCVE fix. This package pullscryptographyonly throughnostrkey, which previously cappedcryptography<45.0and so shipped the vulnerable 44.0.3 (four advisories: PYSEC-2026-35, PYSEC-2026-2141, GHSA-537c-gmf6-5ccf, and a related OpenSSL fix). Thenostrkeyfloor is raised to>=0.3.5, whose lifted ceiling resolvescryptography49.0.0. Verified against the local nostrkey 0.3.5 build: full test suite andpip-auditgreen oncryptography49. No source changes.
NIP-47 compliance and response-verification fixes. Minor bump because error behavior changed (see below).
- Encryption negotiation (critical): the client always used NIP-44 but
never signalled it. Per NIP-47, requests default to NIP-04; NIP-44 requires
the wallet's kind-13194 info event to advertise
nip44_v2AND an['encryption', 'nip44_v2']tag on each kind-23194 request. On connect the client now fetches the wallet's info event, requiresnip44_v2, and adds theencryptiontag to every request. Wallets that only support NIP-04 raise a clearNWCError(UNSUPPORTED_ENCRYPTION) — nostrkey has no NIP-04 implementation yet; NIP-04 fallback is a planned follow-up. lookup_invoicealways reported unpaid: it read a nonexistentpaidfield from the NIP-47 result.paidis now derived fromsettled_at/preimage.LookupInvoiceResponsegainssettled_at,payment_hash,amount,fees_paid, andexpires_at.- Wallet responses were trusted blindly: response events from the relay
are now validated before decryption — kind 23195, authored by the wallet
pubkey,
['e', <request id>]tag matching our request, and a valid BIP-340 signature over the recomputed event id (vianostrkey.events.verify_event). Invalid/forged/replayed events are skipped and the client keeps waiting for the genuine response until the timeout. NWCErroris now anExceptionsubclass (it was a plain dataclass, soraise NWCError(...)crashed withTypeError). It is exported from the package root.- Response decryption failures now raise a descriptive
NWCError(DECRYPTION_FAILED) instead of a rawValueError.
- Response-wait timeout (already configurable via
NWCClient(uri, timeout=...)) now raisesNWCErrorwith codeTIMEOUTinstead ofTimeoutError.
Initial published release.