summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-02-13 17:52:42 -0800
committerbndw <ben@bdw.to>2026-02-13 17:52:42 -0800
commitfcba12d7ae3cdb361c6321519fdaf5a537a6a871 (patch)
tree81131f5d8c96879d78688affa9c35f2cf6f83835 /README.md
parentd1a6b2ed2cc3e1f21d214ae54a14f6553d1b17b7 (diff)
feat: testclient can accept JSON events from stdin
Usage: - Standalone: ./bin/testclient (generates event) - With nak: nak event "hello" | ./bin/testclient Compatible with nak CLI for easy event generation
Diffstat (limited to 'README.md')
-rw-r--r--README.md18
1 files changed, 16 insertions, 2 deletions
diff --git a/README.md b/README.md
index f3d961a..142b0f1 100644
--- a/README.md
+++ b/README.md
@@ -31,8 +31,8 @@ The relay will start listening on `:50051` (gRPC).
31 31
32### Test with Client 32### Test with Client
33 33
34**Standalone mode:**
34```bash 35```bash
35# In another terminal:
36./bin/testclient 36./bin/testclient
37 37
38# Output: 38# Output:
@@ -40,10 +40,24 @@ The relay will start listening on `:50051` (gRPC).
40# Publishing event... 40# Publishing event...
41# ✓ Event published successfully: abc123... 41# ✓ Event published successfully: abc123...
42# Querying events... 42# Querying events...
43# Found 1 events 43# Found 1 events from author abc123...
44# - abc123...: Hello from gRPC client! 44# - abc123...: Hello from gRPC client!
45``` 45```
46 46
47**With nak CLI:**
48```bash
49# Pipe events from nak
50nak event "Hello from nak!" | ./bin/testclient
51
52# Or generate a signed event
53nak event --sec <nsec> --kind 1 "My message" | ./bin/testclient
54
55# Output:
56# Read event from stdin: abc123...
57# Publishing event...
58# ✓ Event published successfully: abc123...
59```
60
47## gRPC API 61## gRPC API
48 62
49See [proto/nostr/v1/nostr.proto](proto/nostr/v1/nostr.proto) for the full API. 63See [proto/nostr/v1/nostr.proto](proto/nostr/v1/nostr.proto) for the full API.