diff options
Diffstat (limited to 'website/index.html')
| -rw-r--r-- | website/index.html | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/website/index.html b/website/index.html index d90af65..be66095 100644 --- a/website/index.html +++ b/website/index.html | |||
| @@ -3,9 +3,9 @@ | |||
| 3 | <head> | 3 | <head> |
| 4 | <meta charset="UTF-8"> | 4 | <meta charset="UTF-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | <meta name="description" content="A minimal Go library for Nostr. 1 dependency."> | 6 | <meta name="description" content="A zero-dependency Go library for Nostr. Rolls its own crypto."> |
| 7 | <meta name="go-import" content="code.northwest.io/nostr git https://code.northwest.io/nostr.git"> | 7 | <meta name="go-import" content="code.northwest.io/nostr git https://code.northwest.io/nostr.git"> |
| 8 | <title>nostr — minimal Go library</title> | 8 | <title>nostr — zero-dependency Go library</title> |
| 9 | <style> | 9 | <style> |
| 10 | :root { | 10 | :root { |
| 11 | --bg: #f5f2eb; | 11 | --bg: #f5f2eb; |
| @@ -116,15 +116,6 @@ | |||
| 116 | color: var(--muted); | 116 | color: var(--muted); |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | .dep { | ||
| 120 | background: var(--code-bg); | ||
| 121 | padding: 0.5rem 0.75rem; | ||
| 122 | border: 1px solid var(--border); | ||
| 123 | display: inline-block; | ||
| 124 | font-size: 13px; | ||
| 125 | margin-bottom: 1.5rem; | ||
| 126 | } | ||
| 127 | |||
| 128 | footer { | 119 | footer { |
| 129 | margin-top: 3rem; | 120 | margin-top: 3rem; |
| 130 | padding-top: 1.5rem; | 121 | padding-top: 1.5rem; |
| @@ -140,21 +131,24 @@ | |||
| 140 | </head> | 131 | </head> |
| 141 | <body> | 132 | <body> |
| 142 | <h1>nostr</h1> | 133 | <h1>nostr</h1> |
| 143 | <p class="tagline">A minimal Go library for the Nostr protocol.</p> | 134 | <p class="tagline">A zero-dependency Go library for Nostr.</p> |
| 144 | 135 | ||
| 145 | <div class="install">go get code.northwest.io/nostr</div> | 136 | <div class="install">go get code.northwest.io/nostr</div> |
| 146 | 137 | ||
| 147 | <h2>Why</h2> | 138 | <h2>Why</h2> |
| 148 | <p><strong>1 dependency.</strong> Other Nostr libraries pull in 30+. This one has exactly one:</p> | 139 | <p>You probably shouldn't use this.</p> |
| 149 | <div class="dep">btcec/v2 — Schnorr signatures (required by protocol)</div> | 140 | <p>This library rolls its own secp256k1 crypto in pure Go. No CGO, no external dependencies, no nothing. I built it to see if it was possible to implement Nostr with truly zero dependencies. It is. But that doesn't mean it's a good idea.</p> |
| 150 | <p>No WebSocket libraries, no logging frameworks, no kitchen sink. Just the core protocol, stdlib only.</p> | 141 | |
| 142 | <p><strong>What you get:</strong> zero deps, auditable code, passes all BIP-340 test vectors, works fine for normal usage.</p> | ||
| 143 | <p><strong>What you give up:</strong> constant-time operations, performance (~10x slower than btcec), battle-tested code.</p> | ||
| 144 | <p>If you're building something serious, use a library backed by btcec. If you're hacking on a side project or just want to read the code, welcome.</p> | ||
| 151 | 145 | ||
| 152 | <h2>What's Included</h2> | 146 | <h2>What's Included</h2> |
| 153 | <ul> | 147 | <ul> |
| 154 | <li><strong>Keys</strong> — generate, parse, sign, verify (hex + bech32)</li> | 148 | <li><strong>Keys</strong> — generate, parse, sign, verify (hex + bech32)</li> |
| 155 | <li><strong>Events</strong> — create, serialize, sign NIP-01 events</li> | 149 | <li><strong>Events</strong> — create, serialize, sign NIP-01 events</li> |
| 156 | <li><strong>Filters</strong> — build and match subscription filters</li> | 150 | <li><strong>Filters</strong> — build and match subscription filters</li> |
| 157 | <li><strong>Relay</strong> — WebSocket pub/sub (stdlib net/http)</li> | 151 | <li><strong>Relay</strong> — WebSocket pub/sub (stdlib only)</li> |
| 158 | <li><strong>Tags</strong> — parse and build event tags</li> | 152 | <li><strong>Tags</strong> — parse and build event tags</li> |
| 159 | <li><strong>Envelopes</strong> — protocol message parsing</li> | 153 | <li><strong>Envelopes</strong> — protocol message parsing</li> |
| 160 | </ul> | 154 | </ul> |
| @@ -172,9 +166,6 @@ key.Sign(event) | |||
| 172 | relay, _ := nostr.Connect(ctx, "wss://relay.damus.io") | 166 | relay, _ := nostr.Connect(ctx, "wss://relay.damus.io") |
| 173 | relay.Publish(ctx, event)</code></pre> | 167 | relay.Publish(ctx, event)</code></pre> |
| 174 | 168 | ||
| 175 | <h2>What's Not Included</h2> | ||
| 176 | <p>This is a minimal core library. It implements NIP-01 and the basics. It doesn't implement every NIP, handle connection pooling, or manage relay discovery. Build that yourself, or don't.</p> | ||
| 177 | |||
| 178 | <footer> | 169 | <footer> |
| 179 | <a href="https://code.northwest.io/nostr.git/about/">source</a> · MIT | 170 | <a href="https://code.northwest.io/nostr.git/about/">source</a> · MIT |
| 180 | </footer> | 171 | </footer> |
