Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0420a87
feat(core): add the secp256k1, hashing and negentropy dependencies
chappie-daemon Oct 19, 2026
f038bfa
feat(core): implement the event model, filters, crypto and NIP semantics
chappie-daemon Oct 19, 2026
1a0dd5f
test(core): port the captured TypeScript specs as parity modules
chappie-daemon Oct 19, 2026
55b5b72
test(core): add the differential event fixture and its regenerator
chappie-daemon Oct 19, 2026
d190413
docs: record the core crypto and negentropy decisions
chappie-daemon Oct 19, 2026
6eeb3b4
test(core): refuse to run the fixture generator outside a capture tree
chappie-daemon Oct 19, 2026
64682ff
fix(core): refuse a NIP-44 payload the validator cannot decode
chappie-daemon Oct 19, 2026
50213a2
fix(core): count filter length bounds in UTF-16 units and word the u6…
chappie-daemon Oct 19, 2026
c566958
fix(core): set the author when signing an event
chappie-daemon Oct 19, 2026
0127c90
fix(core): read the expiration forms Number() reads
chappie-daemon Oct 19, 2026
80912cb
feat(config): keep the capture's kind-range acceptance in mirror filters
chappie-daemon Oct 19, 2026
54e35ae
docs: split the reference-time predicate from the gate's policy
chappie-daemon Oct 19, 2026
0769df3
test: guard both capture generators against the rewrite tree
chappie-daemon Oct 19, 2026
6c5a05a
docs: record the round-2 divergences in ADR 0002
chappie-daemon Oct 19, 2026
78f6ec4
docs: state what the negentropy convergence tests pin
chappie-daemon Oct 19, 2026
84243e4
fix(core): decode NIP-44 payloads as leniently when decrypting
chappie-daemon Oct 19, 2026
84c88f0
fix(core): refuse values at 2^64 instead of saturating them
chappie-daemon Oct 19, 2026
9bbd84d
fix(config): scope the settings filter crossing to local matching
chappie-daemon Oct 19, 2026
42b0a55
fix(core): reject a sign after the expiration radix prefix and trim t…
chappie-daemon Oct 19, 2026
7429381
docs: correct the settings-filter record and give each divergence its…
chappie-daemon Oct 19, 2026
9e3e171
fix(core): carry a u64::MAX kind or limit exactly
chappie-daemon Oct 19, 2026
104dd61
docs: give the representability divergence its real reversal condition
chappie-daemon Oct 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .changeset/core-event-model-and-crypto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
---

feat(core): implement the event model, NIP-01 filters, crypto and NIP semantics

`nostream-core` gains the 32-byte `EventId`/`Pubkey` and 64-byte `Signature` newtypes
with the schema's hex rules in the type, the canonical serialization and SHA-256 event
id, BIP-340 Schnorr signing and verification, the NIP-01 filter matcher and the zod
filter schema's rules, subscription normalisation, NIP-13 difficulty, NIP-40 expiration,
NIP-44 v2, reference-time and replaceable-precedence helpers, and the NIP-77
reconciliation engine over the `negentropy` crate. Settings keep operator pubkey text in
a separate `SettingsPubkey`.

The TypeScript tree is untouched: no `src/` or `test/` file changes, so the published
package has no user-visible change. The differential fixture
(`crates/nostream-core/tests/fixtures/ts-events.json`) is the capture's own measurement
of 1,000 events and 50 negative events, regenerated by
`crates/nostream-core/tests/capture/gen-ts-events.mjs` at `242a3001`. Decisions and the
negentropy divergences are recorded in `docs/rewrite/decisions/0002-core-crypto-and-negentropy.md`.
175 changes: 175 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ repository = "https://github.com/cameri/nostream"

[workspace.dependencies]
anyhow = "1"
base64 = "0.22.1"
chacha20 = "0.10.2"
clap = { version = "4", features = ["derive"] }
heed = "0.20"
hex = "0.4.3"
hkdf = "0.13.0"
hmac = "0.13.0"
negentropy = "0.5.2"
nostream-admin = { path = "crates/nostream-admin" }
nostream-cli = { path = "crates/nostream-cli" }
nostream-config = { path = "crates/nostream-config" }
Expand All @@ -24,9 +30,11 @@ nostreamd = { path = "crates/nostreamd" }
opentelemetry = "0.33.1"
opentelemetry-otlp = { version = "0.33.1", default-features = false, features = ["trace", "grpc-tonic"] }
opentelemetry_sdk = { version = "0.33.1", default-features = false, features = ["trace", "rt-tokio"] }
secp256k1 = "0.33.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9"
sha2 = "0.11.1"
tempfile = "3"
thiserror = "2"
tokio = { version = "1", features = ["macros", "net", "rt-multi-thread", "signal", "sync", "time"] }
Expand Down
Loading
Loading