mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 07:51:52 +00:00
- Updated PROTOCOL_INVENTORY.md with NIP-40, NIP-78, and Kind 27235 details. - Created protocol-report-2026-02-17.md. - Verified system health with unit tests. - Completed scheduler cycle (lock, memory, log). Co-authored-by: PR0M3TH3AN <[email protected]>
2.4 KiB
2.4 KiB
Protocol Inventory
This file tracks external protocol specifications and libraries used in this repository, their implementation points, and compliance status.
Nostr (NIPs)
| Protocol / Spec | Implementation Points | Compliance Status | Notes |
|---|---|---|---|
| NIP-01 (Basic Protocol) | src/lib.mjs, src/lock-ops.mjs, src/relay-health.mjs |
Compliant | Uses nostr-tools for event creation, signing, and relay communication. |
| NIP-04 (Encrypted Direct Message) | N/A | Unknown | Not explicitly used in lock logic, but mentioned in test prompts. |
| NIP-33 (Parameterized Replaceable Events) | src/lock-ops.mjs |
Compliant | Defines the mechanics for Kind 30078 updates (d-tags). |
| NIP-40 (Expiration Timestamp) | src/lock-ops.mjs |
Compliant | Parses expiration tag to filter active locks. |
| NIP-42 (Authentication) | N/A | Unknown | Not currently implemented in lock logic. |
| NIP-78 (Application-specific Data) | src/lock-ops.mjs |
Compliant | Uses Kind 30078 for distributed lock state. |
Other Protocols
| Protocol | Implementation Points | Compliance Status | Notes |
|---|---|---|---|
| HTTP/1.1 | src/dashboard.mjs, dashboard/ |
Compliant | Dashboard server uses Node.js http module. |
| WebSocket | src/relay-health.mjs |
Compliant | Raw ws usage for health probes; nostr-tools for standard relay comms. |
| JSON | src/lock-ops.mjs, src/ops.mjs |
Compliant | Ubiquitous for event content and config files. |
Internal / Custom Protocols
| Name | Kind / ID | Implementation | Notes |
|---|---|---|---|
| Relay Health Probe | Kind 27235 |
src/relay-health.mjs |
Custom ephemeral event kind used for deep reachability checks. |
Libraries
| Library | Version | Usage | Risks |
|---|---|---|---|
nostr-tools |
2.19.4 |
Core Nostr primitives (keys, events, pool). | Supply chain risk. Pinned version recommended. |
ws |
8.19.0 |
WebSocket client for Node.js. | Standard library for Node.js websocket support. |
Implementation details
- Locking Mechanism: Uses Kind 30078 (NIP-78) with NIP-33 semantics (d-tags) and NIP-40 expiration.
- Relay Communication: Uses
SimplePoolfromnostr-toolsfor querying and publishing. - Health Checks: Uses raw
WebSocketconnections insrc/relay-health.mjsfor deep health probes (Kind 27235).