• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cameri / nostream / 24592723639
65%

Build:
DEFAULT BRANCH: main
Ran 18 Apr 2026 12:39AM UTC
Jobs 1
Files 94
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Apr 2026 12:37AM UTC coverage: 45.889% (-0.9%) from 46.793%
24592723639

push

github

web-flow
feat: implement NIP-17 & NIP-44 v2 for Modern Direct Messages (#458)

* feat: implement NIP-17 & NIP-44 v2 for Modern Direct Messages

This commit introduces comprehensive support for NIP-17 (Private Direct Messages)
and NIP-44 v2 (Encrypted Payloads), establishing the modern standard for
secure messaging on Nostr.

Changes included:
- **NIP-17 Support**:
  - Added new Event Kinds: Seal (13), Direct Message (14), File Message (15), and Gift Wrap (1059).
  - Implemented `GiftWrapEventStrategy` to handle and validate incoming Gift Wrap events.
  - Added repository-level protections to block direct relay publication of inner events (Kinds 13, 14, 15), mandating they be encrypted inside a Gift Wrap.
- **NIP-44 v2 Crypto**:
  - Implemented `nip44Encrypt` and `nip44Decrypt` functions supporting ChaCha20, HKDF extraction/expansion, and MAC verification as per NIP-44 v2 specifications.
  - Added `validateNip44Payload` to ensure payloads adhere to the exact format requirements without needing to decrypt them.
- **Cleanup**:
  - Removed deprecated `encryptKind4Event` (legacy NIP-04 DM algorithm) from `event.ts`.
  - Updated `package.json` to declare NIPs 17 and 44 in `supportedNipExtensions`.
- **Tests**:
  - Added extensive unit tests across NIP-44 encryption logic, Event Strategies, and Message Handlers.
  - Resolved `sort-imports` ESLint violations in multiple handler specs.

* fix: address NIP-17/NIP-44 security review findings

- nip44: replace dead try/catch with explicit base64 regex + length%4 check
- gift-wrap: validate recipient p tag is a 64-char lowercase hex pubkey; fix error message
- mirroring worker: block inner event kinds (13/14/15) from being persisted directly

433 of 1065 branches covered (40.66%)

Branch coverage included in aggregate %.

118 of 271 new or added lines in 6 files covered. (43.54%)

87 existing lines in 10 files now uncovered.

1258 of 2620 relevant lines covered (48.02%)

3.0 hits per line

Uncovered Changes

Lines Coverage ∆ File
149
0.0
0.0% src/app/static-mirroring-worker.ts
2
93.02
src/utils/nip44.ts
1
94.29
-5.71% src/factories/event-strategy-factory.ts
1
95.74
src/handlers/event-strategies/gift-wrap-event-strategy.ts

Coverage Regressions

Lines Coverage ∆ File
46
17.11
-37.43% src/adapters/web-socket-adapter.ts
15
44.78
-29.85% src/adapters/web-socket-server-adapter.ts
6
37.5
-50.0% src/cache/client.ts
5
34.29
-28.57% src/app/worker.ts
4
17.5
-17.5% src/handlers/request-handlers/rate-limiter-middleware.ts
4
65.82
-6.33% src/utils/settings.ts
3
56.67
-10.0% src/adapters/web-server-adapter.ts
2
94.58
-0.91% src/handlers/event-message-handler.ts
1
84.47
-0.97% src/repositories/event-repository.ts
1
91.4
6.29% src/utils/event.ts
Jobs
ID Job ID Ran Files Coverage
1 Unit - 24592723639.1 18 Apr 2026 12:39AM UTC 94
45.89
GitHub Action Run
Source Files on build 24592723639
  • Tree
  • List 94
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 3a691ef5 on github
  • Prev Build on main (#24592438130)
  • Next Build on main (#24594109623)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc