Nomen indexers may provide their data in different ways, such as an API, a web page or an archive. However, as Nomen is intended to be a Nostr-native protocol, it would make sense for indexers to publish their data to Nostr relays in a well understood format. This will allow Nostr clients that support Nomen to go to relays as the sole source of data without needing to make further external network calls.
Nomen indexers should publish a single event per name. It will be a parameterized replaceable event, per the NIP-01 specification. When name data changes (e.g. new records or ownership transfers) then the event will be republished and replaced.
The fields to be aware of:
Event field | Expected value |
---|---|
pubkey |
The indexer's pubkey |
kind |
38301 |
d tag |
the indexed name |
content |
JSON serialized name object (see blow) |
The content
will be a serialized form of the following data:
{
"name": "indexed named, should match the d tag",
"pubkey": "hex-encoded pubkey of name's owner",
"records": {
"KEY1": "VALUE1",
"KEY2": "VALUE2"
}
}
r
should be replaced with the canonical records as understood by the indexer.
For an indexer with a web presence, such as the Nomen Explorer, they may respond to GET
requests under: https://<domain>/.well-known/nomen.json
with a JSON object like this:
{
"indexer": {
"pubkey": "indexer's hex-encoded pubkey",
"relays": ["wss://relay.example.com"]
}
}
Clients may choose to check this convenience to locate the pubkey to use when searching for relay-published indexes. Additionally, the indexer can list the "officially" supported relays.
2023-11-21:
- The "relays" key was added to the
.well-known/nomen.json
document.