diff --git a/.changeset/chubby-drinks-worry.md b/.changeset/chubby-drinks-worry.md deleted file mode 100644 index a845151c..00000000 --- a/.changeset/chubby-drinks-worry.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/cyan-tigers-relax.md b/.changeset/cyan-tigers-relax.md deleted file mode 100644 index a49ba484..00000000 --- a/.changeset/cyan-tigers-relax.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- \ No newline at end of file diff --git a/.changeset/empty-nip40-tests.md b/.changeset/empty-nip40-tests.md deleted file mode 100644 index a1484b6d..00000000 --- a/.changeset/empty-nip40-tests.md +++ /dev/null @@ -1,4 +0,0 @@ ---- ---- - -Test-only NIP-40 integration coverage; no release version bump required. diff --git a/.changeset/fix-upsertmany-tiebreak.md b/.changeset/fix-upsertmany-tiebreak.md deleted file mode 100644 index 47f86a82..00000000 --- a/.changeset/fix-upsertmany-tiebreak.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": patch ---- - -Fix replaceable batch upserts to apply NIP-01 tie-breaker semantics when timestamps are equal by comparing event IDs. diff --git a/.changeset/full-donuts-allow.md b/.changeset/full-donuts-allow.md deleted file mode 100644 index a02552de..00000000 --- a/.changeset/full-donuts-allow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": minor ---- - -added NIP-45 COUNT support with end-to-end handling (validation, handler routing, DB counting, and tests). diff --git a/.changeset/fuzzy-corners-wink.md b/.changeset/fuzzy-corners-wink.md deleted file mode 100644 index a845151c..00000000 --- a/.changeset/fuzzy-corners-wink.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/gentle-dots-swim.md b/.changeset/gentle-dots-swim.md deleted file mode 100644 index 8cf1a68d..00000000 --- a/.changeset/gentle-dots-swim.md +++ /dev/null @@ -1,4 +0,0 @@ ---- ---- - -docs: add NIP-62 to supported feature list \ No newline at end of file diff --git a/.changeset/hot-path-indexes-benchmark.md b/.changeset/hot-path-indexes-benchmark.md deleted file mode 100644 index de1024e9..00000000 --- a/.changeset/hot-path-indexes-benchmark.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": minor ---- - -Add hot-path PostgreSQL indexes for subscription, vanish, retention, and invoice queries; add `db:benchmark` and `db:verify-index-impact` tooling; document index rationale and benchmarking. Closes #68. diff --git a/.changeset/invoice-user-repo-unit-tests.md b/.changeset/invoice-user-repo-unit-tests.md deleted file mode 100644 index 6e6163cb..00000000 --- a/.changeset/invoice-user-repo-unit-tests.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": patch ---- - -Add unit tests for InvoiceRepository and UserRepository with sinon-stubbed DB client diff --git a/.changeset/khaki-papayas-return.md b/.changeset/khaki-papayas-return.md deleted file mode 100644 index 2737c231..00000000 --- a/.changeset/khaki-papayas-return.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": patch ---- - -Fix: Restore CONFIGURATION.md with proper settings and remove duplicate changesets created during recovery diff --git a/.changeset/light-lilies-yawn.md b/.changeset/light-lilies-yawn.md deleted file mode 100644 index faabbcc8..00000000 --- a/.changeset/light-lilies-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": minor ---- - -Add EWMA rate limiter with configurable strategy support diff --git a/.changeset/loose-jeans-lead.md b/.changeset/loose-jeans-lead.md deleted file mode 100644 index a66fe65d..00000000 --- a/.changeset/loose-jeans-lead.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": patch ---- - -update NIP-11 relay info fields and CORS, with test and docs updates diff --git a/.changeset/migrate-logging-to-pino.md b/.changeset/migrate-logging-to-pino.md deleted file mode 100644 index 8384ad6e..00000000 --- a/.changeset/migrate-logging-to-pino.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": patch ---- - -Migrate runtime logging to pino across adapters, services, workers, and controllers, and stabilize CI-related fixes for coverage and integration workflows after rebasing. diff --git a/.changeset/nip-02-integration-tests.md b/.changeset/nip-02-integration-tests.md deleted file mode 100644 index c5dd98ce..00000000 --- a/.changeset/nip-02-integration-tests.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": patch ---- - -Add integration tests for NIP-02 contact lists (Kind 3) diff --git a/.changeset/nip-03-opentimestamps.md b/.changeset/nip-03-opentimestamps.md deleted file mode 100644 index 8c202db5..00000000 --- a/.changeset/nip-03-opentimestamps.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": minor ---- - -Add NIP-03 OpenTimestamps support for kind 1040 events: structural `.ots` validation, Bitcoin attestation requirement, digest match to the referenced `e` tag, and relay metadata updates (#105). diff --git a/.changeset/nip-11-integration-tests.md b/.changeset/nip-11-integration-tests.md deleted file mode 100644 index fde71e52..00000000 --- a/.changeset/nip-11-integration-tests.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": patch ---- - -Add NIP-11 integration tests and fix max_filters mapping in relay information document. diff --git a/.changeset/nip-22-created-at-limits-coverage.md b/.changeset/nip-22-created-at-limits-coverage.md deleted file mode 100644 index 0d2abfea..00000000 --- a/.changeset/nip-22-created-at-limits-coverage.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"nostream": patch ---- - -Improve NIP-22 `created_at` limit handling coverage and boundary reliability. - -This adds integration coverage for accepted and rejected events across configured positive and negative `created_at` deltas, and keeps rejection semantics consistent (`rejected`) for out-of-range timestamps. diff --git a/.changeset/nip-62-integration-tests.md b/.changeset/nip-62-integration-tests.md deleted file mode 100644 index 9009ab5f..00000000 --- a/.changeset/nip-62-integration-tests.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": patch ---- - -Add NIP-62 integration tests for Request to Vanish \ No newline at end of file diff --git a/.changeset/old-toys-stare.md b/.changeset/old-toys-stare.md deleted file mode 100644 index a845151c..00000000 --- a/.changeset/old-toys-stare.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/proud-pants-cry.md b/.changeset/proud-pants-cry.md deleted file mode 100644 index a845151c..00000000 --- a/.changeset/proud-pants-cry.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/quick-maps-marry.md b/.changeset/quick-maps-marry.md deleted file mode 100644 index 75e563f5..00000000 --- a/.changeset/quick-maps-marry.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"nostream": minor ---- - -Add gzip and xz compression support to event import/export flows. - -- Export supports `--compress`/`-z` with `--format gzip|gz|xz`. -- Import auto-detects compressed input by extension and magic bytes and decompresses in a stream pipeline. -- Includes docs updates and unit/integration test coverage for compression paths. \ No newline at end of file diff --git a/.changeset/release-whitelist-exact-match.md b/.changeset/release-whitelist-exact-match.md deleted file mode 100644 index d806b77d..00000000 --- a/.changeset/release-whitelist-exact-match.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": major ---- - -Use exact pubkey matching for fee-schedule whitelists and event pubkey whitelist/blacklist checks. diff --git a/.changeset/remove-sonarqube-fix-coveralls-badge.md b/.changeset/remove-sonarqube-fix-coveralls-badge.md deleted file mode 100644 index a845151c..00000000 --- a/.changeset/remove-sonarqube-fix-coveralls-badge.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/replace-semantic-release-with-changesets.md b/.changeset/replace-semantic-release-with-changesets.md deleted file mode 100644 index b328e82e..00000000 --- a/.changeset/replace-semantic-release-with-changesets.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": patch ---- - -Replace semantic-release with changesets for explicit PR-level version management. Contributors now add a changeset file per PR; the Changesets Release workflow handles version bumps and GitHub releases. diff --git a/.changeset/soft-rats-stare.md b/.changeset/soft-rats-stare.md deleted file mode 100644 index a845151c..00000000 --- a/.changeset/soft-rats-stare.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/sparkly-times-win.md b/.changeset/sparkly-times-win.md deleted file mode 100644 index a845151c..00000000 --- a/.changeset/sparkly-times-win.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/strong-candles-yell.md b/.changeset/strong-candles-yell.md deleted file mode 100644 index f17ea354..00000000 --- a/.changeset/strong-candles-yell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": patch ---- - -Dedup keys were taking multiple tags, that was not according to NIP-01 behaviour. diff --git a/.changeset/tasty-parents-pump.md b/.changeset/tasty-parents-pump.md deleted file mode 100644 index d7cc8504..00000000 --- a/.changeset/tasty-parents-pump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": patch ---- - -Fix IP spoofing via unconditional trust of x-forwarded-for header diff --git a/.changeset/tired-dots-cover.md b/.changeset/tired-dots-cover.md deleted file mode 100644 index a845151c..00000000 --- a/.changeset/tired-dots-cover.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.changeset/unreleased-since-v2.1.0.md b/.changeset/unreleased-since-v2.1.0.md deleted file mode 100644 index fe943ab9..00000000 --- a/.changeset/unreleased-since-v2.1.0.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -"nostream": minor ---- - -Release highlights: - -**Features** -- NIP-05 verification support (#463) -- NIP-17 & NIP-44 v2 Modern Direct Messages (#458) -- NIP-62 vanish event support (#418) -- Vanish optimization (#446) -- Export events to JSON Lines format (#451) -- Import .jsonl events into events table (#414) -- Opt-in event retention purge (#359, #412) -- Wipe events table script (#450) -- Nginx reverse proxy in docker-compose (#423) -- Docker DNS pre-flight check for connectivity verification (#398) -- Strict validation for payment callbacks (#426) -- Real home page with templated pages (#409) - -**Bug Fixes** -- NIP-01 compliance: deterministic event ordering by event_id -- NIP-01 compliance: correct dedup keys for parametrized replaceable events (#480) -- NIP-01 replaceable event tiebreaker (#416) -- NIP-11 served only on root path instead of relay path (#399) -- Dockerfile: run database migrations in CMD (#422) -- Added expired_at filter to message pipeline (#403) -- Removed unsafe-inline and implemented script nonces for CSP hardening (#394) -- Axios upgraded to fix CVE-2025-62718 (#466) - -**Refactors & Chores** -- Migrated validation from Joi to Zod (#484) -- Migrated linting and formatting to Biome (#452) -- Converted user admission to PostgreSQL stored function (#428) -- Upgraded to Node.js 24 LTS (#419) -- Updated dependencies (express, body-parser, js-yaml, axios) diff --git a/.changeset/uppercase-tag-filters.md b/.changeset/uppercase-tag-filters.md deleted file mode 100644 index 2d024281..00000000 --- a/.changeset/uppercase-tag-filters.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"nostream": patch ---- - -Support uppercase tag filters (#A-Z) in filter schema validation diff --git a/.changeset/wild-buttons-melt.md b/.changeset/wild-buttons-melt.md deleted file mode 100644 index a845151c..00000000 --- a/.changeset/wild-buttons-melt.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..cf2aa8cd --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,89 @@ +# nostream + +## 3.0.0 + +### Major Changes + +- [#524](https://github.com/cameri/nostream/pull/524) [`b3effd1`](https://github.com/cameri/nostream/commit/b3effd1c4d55ad8e8ebc25d6a13eeef17bb5e6ba) Thanks [@vikashsiwach](https://github.com/vikashsiwach)! - Use exact pubkey matching for fee-schedule whitelists and event pubkey whitelist/blacklist checks. + +### Minor Changes + +- [#522](https://github.com/cameri/nostream/pull/522) [`7edd6c3`](https://github.com/cameri/nostream/commit/7edd6c33aa895e672acf653c5b2a980c2c1e0402) Thanks [@a-khushal](https://github.com/a-khushal)! - added NIP-45 COUNT support with end-to-end handling (validation, handler routing, DB counting, and tests). + +- [#534](https://github.com/cameri/nostream/pull/534) [`a07b0f6`](https://github.com/cameri/nostream/commit/a07b0f68c7bd18501067ca3e650684488327f4e1) Thanks [@archief2910](https://github.com/archief2910)! - Add hot-path PostgreSQL indexes for subscription, vanish, retention, and invoice queries; add `db:benchmark` and `db:verify-index-impact` tooling; document index rationale and benchmarking. Closes [#68](https://github.com/cameri/nostream/issues/68). + +- [#476](https://github.com/cameri/nostream/pull/476) [`49322a9`](https://github.com/cameri/nostream/commit/49322a9449f59569e054166b1a336321d9218960) Thanks [@saniddhyaDubey](https://github.com/saniddhyaDubey)! - Add EWMA rate limiter with configurable strategy support + +- [#515](https://github.com/cameri/nostream/pull/515) [`5c12f36`](https://github.com/cameri/nostream/commit/5c12f361f44f5cd59982a502f04d8ca10a45f2cd) Thanks [@archief2910](https://github.com/archief2910)! - Add NIP-03 OpenTimestamps support for kind 1040 events: structural `.ots` validation, Bitcoin attestation requirement, digest match to the referenced `e` tag, and relay metadata updates ([#105](https://github.com/cameri/nostream/issues/105)). + +- [#514](https://github.com/cameri/nostream/pull/514) [`214bef5`](https://github.com/cameri/nostream/commit/214bef5926b8bacbc7833fa4b31951d177c1d768) Thanks [@Anshumancanrock](https://github.com/Anshumancanrock)! - Add gzip and xz compression support to event import/export flows. + + - Export supports `--compress`/`-z` with `--format gzip|gz|xz`. + - Import auto-detects compressed input by extension and magic bytes and decompresses in a stream pipeline. + - Includes docs updates and unit/integration test coverage for compression paths. + +- [#497](https://github.com/cameri/nostream/pull/497) [`e1a7bfb`](https://github.com/cameri/nostream/commit/e1a7bfb16cd8a1a1625664b649fd3e43b3635808) Thanks [@phoenix-server](https://github.com/phoenix-server)! - Release highlights: + + **Features** + + - NIP-05 verification support ([#463](https://github.com/cameri/nostream/issues/463)) + - NIP-17 & NIP-44 v2 Modern Direct Messages ([#458](https://github.com/cameri/nostream/issues/458)) + - NIP-62 vanish event support ([#418](https://github.com/cameri/nostream/issues/418)) + - Vanish optimization ([#446](https://github.com/cameri/nostream/issues/446)) + - Export events to JSON Lines format ([#451](https://github.com/cameri/nostream/issues/451)) + - Import .jsonl events into events table ([#414](https://github.com/cameri/nostream/issues/414)) + - Opt-in event retention purge ([#359](https://github.com/cameri/nostream/issues/359), [#412](https://github.com/cameri/nostream/issues/412)) + - Wipe events table script ([#450](https://github.com/cameri/nostream/issues/450)) + - Nginx reverse proxy in docker-compose ([#423](https://github.com/cameri/nostream/issues/423)) + - Docker DNS pre-flight check for connectivity verification ([#398](https://github.com/cameri/nostream/issues/398)) + - Strict validation for payment callbacks ([#426](https://github.com/cameri/nostream/issues/426)) + - Real home page with templated pages ([#409](https://github.com/cameri/nostream/issues/409)) + + **Bug Fixes** + + - NIP-01 compliance: deterministic event ordering by event_id + - NIP-01 compliance: correct dedup keys for parametrized replaceable events ([#480](https://github.com/cameri/nostream/issues/480)) + - NIP-01 replaceable event tiebreaker ([#416](https://github.com/cameri/nostream/issues/416)) + - NIP-11 served only on root path instead of relay path ([#399](https://github.com/cameri/nostream/issues/399)) + - Dockerfile: run database migrations in CMD ([#422](https://github.com/cameri/nostream/issues/422)) + - Added expired_at filter to message pipeline ([#403](https://github.com/cameri/nostream/issues/403)) + - Removed unsafe-inline and implemented script nonces for CSP hardening ([#394](https://github.com/cameri/nostream/issues/394)) + - Axios upgraded to fix CVE-2025-62718 ([#466](https://github.com/cameri/nostream/issues/466)) + + **Refactors & Chores** + + - Migrated validation from Joi to Zod ([#484](https://github.com/cameri/nostream/issues/484)) + - Migrated linting and formatting to Biome ([#452](https://github.com/cameri/nostream/issues/452)) + - Converted user admission to PostgreSQL stored function ([#428](https://github.com/cameri/nostream/issues/428)) + - Upgraded to Node.js 24 LTS ([#419](https://github.com/cameri/nostream/issues/419)) + - Updated dependencies (express, body-parser, js-yaml, axios) + +### Patch Changes + +- [#553](https://github.com/cameri/nostream/pull/553) [`3c78e61`](https://github.com/cameri/nostream/commit/3c78e6130b1745142b6443f5576ee5e76d61adc9) Thanks [@Anshumancanrock](https://github.com/Anshumancanrock)! - Fix replaceable batch upserts to apply NIP-01 tie-breaker semantics when timestamps are equal by comparing event IDs. + +- [#551](https://github.com/cameri/nostream/pull/551) [`7fc0552`](https://github.com/cameri/nostream/commit/7fc055233e0919c4fed24b489fdc189cb139f208) Thanks [@CKodidela](https://github.com/CKodidela)! - Add unit tests for InvoiceRepository and UserRepository with sinon-stubbed DB client + +- [#538](https://github.com/cameri/nostream/pull/538) [`9496685`](https://github.com/cameri/nostream/commit/949668540a5e2d4754f9e9f5d5c2ab76833f6191) Thanks [@saniddhyaDubey](https://github.com/saniddhyaDubey)! - Fix: Restore CONFIGURATION.md with proper settings and remove duplicate changesets created during recovery + +- [#557](https://github.com/cameri/nostream/pull/557) [`32a1ec5`](https://github.com/cameri/nostream/commit/32a1ec5b6a64c082a171d1c787c3c551810a71ca) Thanks [@a-khushal](https://github.com/a-khushal)! - update NIP-11 relay info fields and CORS, with test and docs updates + +- [#511](https://github.com/cameri/nostream/pull/511) [`a38d402`](https://github.com/cameri/nostream/commit/a38d402ba98c3261ae48245ae07e7131398848b1) Thanks [@Priyanshubhartistm](https://github.com/Priyanshubhartistm)! - Migrate runtime logging to pino across adapters, services, workers, and controllers, and stabilize CI-related fixes for coverage and integration workflows after rebasing. + +- [#552](https://github.com/cameri/nostream/pull/552) [`25f9637`](https://github.com/cameri/nostream/commit/25f9637237b9b0c8f857b3733bbb091167e455ca) Thanks [@vikashsiwach](https://github.com/vikashsiwach)! - Add integration tests for NIP-02 contact lists (Kind 3) + +- [#527](https://github.com/cameri/nostream/pull/527) [`4d030c7`](https://github.com/cameri/nostream/commit/4d030c7dde29903d555e353d5822cb5413ffd2dd) Thanks [@kanishka0411](https://github.com/kanishka0411)! - Add NIP-11 integration tests and fix max_filters mapping in relay information document. + +- [#547](https://github.com/cameri/nostream/pull/547) [`664168a`](https://github.com/cameri/nostream/commit/664168ab7128616d4fbf3c8ded69b6bf8aa8d879) Thanks [@Priyanshubhartistm](https://github.com/Priyanshubhartistm)! - Improve NIP-22 `created_at` limit handling coverage and boundary reliability. + + This adds integration coverage for accepted and rejected events across configured positive and negative `created_at` deltas, and keeps rejection semantics consistent (`rejected`) for out-of-range timestamps. + +- [#537](https://github.com/cameri/nostream/pull/537) [`a89a95e`](https://github.com/cameri/nostream/commit/a89a95e474e871b2f778306321e7e111e4c16a23) Thanks [@vikashsiwach](https://github.com/vikashsiwach)! - Add NIP-62 integration tests for Request to Vanish + +- [#497](https://github.com/cameri/nostream/pull/497) [`e1a7bfb`](https://github.com/cameri/nostream/commit/e1a7bfb16cd8a1a1625664b649fd3e43b3635808) Thanks [@phoenix-server](https://github.com/phoenix-server)! - Replace semantic-release with changesets for explicit PR-level version management. Contributors now add a changeset file per PR; the Changesets Release workflow handles version bumps and GitHub releases. + +- [#525](https://github.com/cameri/nostream/pull/525) [`b09e23a`](https://github.com/cameri/nostream/commit/b09e23a6f1a706b9a1eda0059d97c8f8d2224422) Thanks [@kushagra0902](https://github.com/kushagra0902)! - Dedup keys were taking multiple tags, that was not according to NIP-01 behaviour. + +- [#493](https://github.com/cameri/nostream/pull/493) [`5bf1a58`](https://github.com/cameri/nostream/commit/5bf1a5802b74924a9c9e607115be9db077587b08) Thanks [@kanishka0411](https://github.com/kanishka0411)! - Fix IP spoofing via unconditional trust of x-forwarded-for header + +- [#548](https://github.com/cameri/nostream/pull/548) [`00240a9`](https://github.com/cameri/nostream/commit/00240a902c4a5f21a6c699e3ed5d60fb00a44565) Thanks [@CKodidela](https://github.com/CKodidela)! - Support uppercase tag filters (#A-Z) in filter schema validation diff --git a/package-lock.json b/package-lock.json index 43cff0ff..0f05ce67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "nostream", - "version": "2.1.1", + "version": "3.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nostream", - "version": "2.1.1", + "version": "3.0.0", "license": "MIT", "dependencies": { "@noble/secp256k1": "1.7.1", diff --git a/package.json b/package.json index 09da8b33..a1b8e8a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nostream", - "version": "2.1.1", + "version": "3.0.0", "private": true, "description": "A Nostr relay written in Typescript.", "supportedNips": [