clone

nostr relays on demand at <name>.bind.ws: claim one with your key, pay in zaps past the free allowance

docs, landing: two media doors, nip94 tags and blob reports

Dami committed 3363cbf
commit
3363cbfe86f65173c29dab9e8cfffae31741e0f8
parent
317c75b6635da3d04bbdbde3ec0173633deac495
author
Dami <dami.etoile@gmail.com>
4 files changed, +12 -5
Mdocs/00-getting-started.md4++++
Mdocs/10-architecture.md4++--
Mdocs/12-develop-extend.md3++-
Msrc/landing.ts6++++--
M docs/00-getting-started.md +4 -0
M docs/10-architecture.md +2 -2
@@ -41,7 +41,7 @@ SQLite tables: `events`, `tags` (single-letter tags only), an FTS5 `search` tabl
4141 4242 Only kinds that carry prose go into the search index: profiles, notes, threads, comments, highlights, articles and wiki pages.4343 44-Blobs live in R2 under `<name>/<sha256>`. Their descriptors live in the relay's database, so they count toward storage and appear in the console.44+Blobs live in R2 under `<name>/<sha256>`. Their descriptors live in the relay's database, so they count toward storage and appear in the console. Two doors lead to the same bucket and table: Blossom (`blossom.ts`) and NIP-96 (`nip96.ts`), a thin adapter that reuses the Blossom store, gate and URLs. Descriptors and NIP-96 answers carry the NIP-94 tags the relay can vouch for without decoding the file: `url`, `m`, `x`, `ox` and `size`. Blob reports (BUD-09) go into the `reports` table with the sha256 in `target_event` and the uploader in `target_pubkey`; resolving one with delete removes the blob and puts its hash on the banned id list, which every upload door checks.4545 4646 ## Alarm4747
@@ -86,4 +86,4 @@ Moderators cannot act on the owner or on each other; only the owner appoints or
8686 8787 ## Protocol surface8888 89-NIP-01, 09, 11, 13, 17/59 private kinds, 29, 40, 42, 45 with HLL, 50, 56, 62, 67, 70, 77, 86, 98, plus NIP-05, NIP-43, NIP-57 and Blossom BUD-01/02/04/06. `test/conformance` is a black-box suite that runs against any relay URL.89+NIP-01, 09, 11, 13, 17/59 private kinds, 29, 40, 42, 45 with HLL, 50, 56, 62, 67, 70, 77, 86, 98, plus NIP-05, NIP-43, NIP-57, NIP-96 with NIP-94, and Blossom BUD-01/02/04/06/08/09. `test/conformance` is a black-box suite that runs against any relay URL.
M docs/12-develop-extend.md +2 -1
M src/landing.ts +4 -2
@@ -92,7 +92,8 @@ const PROTOCOL: [string, string][] = [
9292 ["05", "Members with a name are you@name.bind.ws."],9393 ["43", "The relay signs and publishes its member list."],9494 ["57", "Zaps to the relay add fuel. The receipt is stored on the relay."],95- ["Blossom", "Upload and fetch files by hash on the same host. Check an upload before sending it, or mirror a file from a URL."],95+ ["Blossom", "Upload and fetch files by hash on the same host. Check an upload before sending it, mirror a file from a URL, report one by hash."],96+ ["94, 96", "The same files through the NIP-96 door, with NIP-94 metadata in every answer."],9697 ];9798 9899 function table(heads: string[], rows: string[][], right: number[] = []): string {
@@ -114,7 +115,8 @@ export function landing(req: Request, env: Env): Response {
114115 ["POST /", "NIP-86", "NIP-98, owner", "claim and the management methods"],115116 ["POST /lease", "lease", "optional NIP-98", `A temporary relay for ${leaseDays(env)} days. A signature reserves the claim for that key.`],116117 ["POST /events /query /count", "HTTP bridge", "NIP-98", "The signer has the same access as an authenticated socket."],117- ["PUT /upload, GET /&lt;sha256&gt;", "Blossom", "kind 24242", "Stored in R2. Counted as files. HEAD /upload checks first; PUT /mirror copies from a URL."],118+ ["PUT /upload, GET /&lt;sha256&gt;", "Blossom", "kind 24242", "Stored in R2. Counted as files. HEAD /upload checks first; PUT /mirror copies from a URL; PUT /report files a report."],119+ ["POST /nip96, GET /.well-known/nostr/nip96.json", "NIP-96", "NIP-98", "Same bucket and file list as Blossom. NIP-94 tags in every answer."],118120 ["GET /.well-known/nostr.json", "NIP-05", "none", "Members that have a name."],119121 ["GET /fuel, POST /fuel/invoice", "NIP-57", "none", "Gauges are public. The invoice comes from a signed zap request."],120122 ]);