feat(nests): adopt deployed nostrnests schema (streaming/auth/live + paired 10112)
The deployed nostrnests reference (NestsUI v2 + moq-auth + moq-rs)
emits a different on-the-wire schema than the previous EGG-01 / EGG-09
drafts and Quartz writers. Verified by reading the production
NestsUI bundle. The deployed schema is now canonical:
kind:30312 (room event)
- relay URL → ["streaming", url] (was ["endpoint", url])
- auth URL → ["auth", url] (was ["service", url])
- live status → ["status", "live"] (was "open")
- ended status → ["status", "ended"] (was "closed")
- room name → ["title", name] (was ["room", name])
kind:10112 (user MoQ-server list)
- 3-element entries: ["server", relay, auth]
- first-element name "relay" accepted as a synonym (legacy)
- 2-element entries: derive auth host by replacing leading "moq."
with "moq-auth.", or prepending "moq-auth." otherwise
Implementation
- ServiceUrlTag.TAG_NAME = "auth", LEGACY_TAG_NAME = "service"
- EndpointUrlTag.TAG_NAME = "streaming", LEGACY_TAG_NAME = "endpoint"
- StatusTag enum: PLANNED/LIVE/PRIVATE/ENDED with code "live"/"ended";
legacy "open"/"closed" still parsed on read
- NestsServersEvent: emit/read 3-element [server, relay, auth] tags
with the legacy-shape tolerances above; expose a NestsServer pair
- Account.nestsServers.flow now produces List<NestsServer> pairs
- NestsServersScreen: rewritten edit-field asks for both URLs,
recommended row shows the nostrnests pair, list rows show both URLs
- NestsScreen first-time setup writes the nostrnests pair, not a
single URL; gate the create FAB on both URLs being parseable
- CreateNestViewModel: drop the resolveServerPair hardcoded mapping —
the saved pair is now authoritative; defaults stay correct for an
empty kind-10112 list
Specs
- EGG-01 rewritten to canonical streaming/auth/live/ended with a
legacy-spelling table; example uses the real nostrnests pair
- EGG-02 references "auth" tag throughout; error taxonomy says "ended"
- EGG-09 rewritten to 3-element server tag with derivation fallback
- New nestsClient/specs/nip-53-proposed.md — a single self-contained
proposed update to upstream NIP-53 covering kind 30312 + kind 10112
with the deployed schema and the JWT-mint flow
All existing unit tests adjusted; quartz:jvmTest, amethyst:testPlayDebugUnitTest,
and nestsClient:jvmTest pass.
This commit is contained in:
+4
-4
@@ -37,7 +37,7 @@ class MeetingSpaceEventBuildTest {
|
||||
val template =
|
||||
MeetingSpaceEvent.build(
|
||||
room = "Main Hall",
|
||||
status = StatusTag.STATUS.OPEN,
|
||||
status = StatusTag.STATUS.LIVE,
|
||||
service = "https://meet.example.com/hall",
|
||||
host = ParticipantTag(host, null, "Host", null),
|
||||
dTag = "main-hall",
|
||||
@@ -53,9 +53,9 @@ class MeetingSpaceEventBuildTest {
|
||||
|
||||
assertEquals("main-hall", byName["d"]?.single()?.get(1))
|
||||
assertEquals("Main Hall", byName["room"]?.single()?.get(1))
|
||||
assertEquals("open", byName["status"]?.single()?.get(1))
|
||||
assertEquals("https://meet.example.com/hall", byName["service"]?.single()?.get(1))
|
||||
assertEquals("https://api.example.com/hall", byName["endpoint"]?.single()?.get(1))
|
||||
assertEquals("live", byName["status"]?.single()?.get(1))
|
||||
assertEquals("https://meet.example.com/hall", byName["auth"]?.single()?.get(1))
|
||||
assertEquals("https://api.example.com/hall", byName["streaming"]?.single()?.get(1))
|
||||
assertEquals("The big room", byName["summary"]?.single()?.get(1))
|
||||
assertEquals("https://example.com/hall.png", byName["image"]?.single()?.get(1))
|
||||
assertEquals(MeetingSpaceEvent.ALT, byName["alt"]?.single()?.get(1))
|
||||
|
||||
Reference in New Issue
Block a user