mirror of
https://github.com/Routstr/protocol.git
synced 2026-08-08 23:34:42 +00:00
1.2 KiB
1.2 KiB
RIP-02: Discovery
Nodes announce their presence and capabilities via Nostr events for client discovery.
Provider Information Event
Kind: 38421
{
"kind": 38421,
"pubkey": "<routstr-provider-pubkey>",
"created_at": <unix-timestamp>,
"content": "<optional-kind:0-style-metadata>",
"tags": [
["d", "<unique-provider-identifier>"],
["u", "https://..."], // HTTP endpoint
["u", "<tor-onion-address>"], // Tor hidden service endpoint
["mint", "https://mint.example.com"],
["version", "0.0.1"]
]
}
Recommendation Event
Kind: 38000 (as defined in NIP-87)
{
"kind": 38000,
"pubkey": "<recommender-user-pubkey>",
"tags": [
["k", "38421"],
["d", "<d-identifier>"],
["u", "<recommended-routstr-http-url>"],
["a", "38421:routstr-provider-pubkey:<d-identifier>", "wss://relay1"]
],
"content": "Fast and reliable AI proxy with great model selection"
}
Discovery
Clients can discover providers by:
- Querying for
kind:38000events with#kfilter for38421(recommendations) - Directly querying for
kind:38421events (provider announcements)
Provider events are replaceable by the d tag, with newer events overriding older listings.