You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit caf07ea
Browse filesBrowse the repository at this point in the historyBrowse files
`--uses` defaults to `nip43.defaultMaxUses` (1). `--expires-in` defaults to `nip43.inviteCodeExpirySeconds` (600 = 10 minutes). `--expires-in` must be a positive integer; never-expiring codes are a yaml policy (`nip43.inviteCodeExpirySeconds: 0`), not a CLI flag. The printed code is the first line of human output so scripts can capture it. If `info.self` is a hex pubkey or `npub1…`, it is stored as `created_by`.
48
48
49
-
This does not yet generate kind 28935 on `REQ` or publish membership list events.
49
+
The relay also answers `REQ`s for kind 28935 by minting a code on the fly and returning it as a relay-signed ephemeral event, so users can obtain a claim string without an operator handing one out. It is off by default and requires `nip43.enabled`, `nip43.allowInviteRequests` and a NIP-42 authenticated client — see [CONFIGURATION.md](CONFIGURATION.md). Membership list events (kind 13534) are not published yet.
50
+
51
+
Invites minted over `REQ` record the requesting pubkey as `created_by`; `nostream invite create` records `info.self`.
52
+
53
+
### Relay signing pubkey
54
+
55
+
NIP-43 clients verify relay-signed events against the `self` field of the NIP-11 document, so `self` must match the key the relay actually signs with. That key is derived from `SECRET` and is otherwise invisible, so `nostream info` prints it:
56
+
57
+
```bash
58
+
nostream info | grep 'Signing pubkey'
59
+
nostream info --json # same value under relay.signingPubkey
60
+
```
61
+
62
+
Leave `info.self` unset in settings to have this value advertised automatically. Set it only if you want to pin it explicitly, and set it to exactly this value — a mismatch disables kind 28935 invite requests.
| info.relay_url | Public-facing URL of your relay. (e.g. wss://relay.your-domain.com) |
151
-
| info.self |Relay pubkey in hex format for the relay information document`self` field. |
151
+
| info.self |Optional. The relay's own signing pubkey (hex or `npub1...`), published as `self` in the relay information document. NIP-43 clients verify relay-signed events against it, so it must match the key the relay signs with. Leave unset to derive it from `SECRET`; run `nostream info` to print the derived value. A configured value that does not match disables kind 28935 invite requests. |
152
152
| info.terms_of_service | Public URL to relay terms of service. |
153
153
| limits.admissionCheck.ipWhitelist | List of IPs (IPv4 or IPv6) to ignore rate limits. |
154
154
| limits.admissionCheck.rateLimits[].period | Rate limit period in milliseconds. |
@@ -173,6 +173,8 @@ The settings below are listed in alphabetical order by name. Please keep this ta
173
173
| limits.event.retention.pubkey.whitelist | Public keys excluded from retention purge. |
174
174
| limits.event.whitelists.ipAddresses | List of IPs (IPv4 or IPv6) to ignore rate limits. |
175
175
| limits.event.whitelists.pubkeys | List of public keys to ignore rate limits. |
176
+
| limits.invite.rateLimits[].period | Rate limit period in milliseconds for NIP-43 kind 28935 invite requests, counted per requesting pubkey. |
177
+
| limits.invite.rateLimits[].rate | Maximum number of invite requests a single pubkey may make during period. Each granted request writes a row to `invite_codes`, so this is the main defence against a code flood. Defaults to 5 per hour. |
176
178
| limits.message.ipWhitelist | List of IPs (IPv4 or IPv6) to ignore rate limits. |
177
179
| limits.message.rateLimits[].period | Rate limit period in milliseconds. |
178
180
| limits.client.subscription.maxSubscriptions | Maximum number of subscriptions per connected client. Defaults to 10. Disabled when set to zero. |
@@ -199,6 +201,8 @@ The settings below are listed in alphabetical order by name. Please keep this ta
199
201
| nip43.enabled | Enable NIP-43 invite-based membership. When true, only admitted members may publish. Defaults to false. |
200
202
| nip43.inviteCodeExpirySeconds | Seconds until a newly minted invite code expires. `0` means the code never expires. Defaults to 600 (10 minutes). |
201
203
| nip43.defaultMaxUses | How many times a newly minted invite code can be claimed. Defaults to 1. |
204
+
| nip43.allowInviteRequests | Answer REQs for kind 28935 by minting an invite code on the fly and returning it as a relay-signed ephemeral event on that subscription. NIP-43 requires relays to opt in to this explicitly. Requesters must be authenticated via NIP-42, and `info.self` must match the relay's signing pubkey. Defaults to false. |
205
+
| nip43.inviteRequestWhitelist | Public keys allowed to request kind 28935 invite codes. Empty (the default) means any authenticated pubkey may request one; a non-empty list restricts minting to those pubkeys. |
202
206
| nip45.enabled | Enable or disable NIP-45 COUNT handling. Defaults to true. |
203
207
| nip50.enabled | Enable or disable NIP-50 full-text search. Defaults to false. When enabled, clients can include a `search` field in REQ filters to perform text queries against event content. Requires the GIN full-text index migration. |
204
208
| nip50.language | PostgreSQL text-search configuration name. Defaults to `simple` (language-agnostic tokenization). Set to `english`, `spanish`, etc. for stemming support. See [PostgreSQL text search configurations](https://www.postgresql.org/docs/current/textsearch-configuration.html). **Note:** The GIN index migration is built with the `simple` configuration. If you change this value, you must manually rebuild the index: `DROP INDEX CONCURRENTLY events_content_fts_idx; CREATE INDEX CONCURRENTLY events_content_fts_idx ON events USING gin (to_tsvector('<your_language>', event_content));` — otherwise the planner cannot use the index and queries fall back to sequential scans. |
0 commit comments