Specification for generic location-first Nostr events. Location data is defined with standard Nostr tags (with additional accuracy tag). Primary location definiton is geohash, so tag g must always be defined, all other tags are optional.
Events are addressable (NIP-01#kinds) with two event kinds: one for public (30472) and one for private (30473) location events.
{
"kind": 30472,
"pubkey": "<32-bytes lowercase hex-encoded public key>",
"created_at": <unix timestamp in seconds>,
"tags": [
["g", "<geohash of the location, required>"],
["d", "<identifier, optional>"],
["expiration", <unix timestamp as defined in NIP-40, optional>],
<optional location tags>
],
// no content field
"sig": "<64-bytes lowercase hex of the signature>"
}Private events must use recipient key for encryption, but it may be omitted from tags to hide the recipient. Location data tags are in content field and encrypted with NIP-44.
{
"kind": 30473,
"pubkey": "<32-bytes lowercase hex-encoded public key>",
"created_at": <unix timestamp in seconds>,
"tags": [
["p", "<32-bytes lowercase hex of recipient pubkey, optional>"],
["d", "<identifier, optional>"],
["expiration", <unix timestamp as defined in NIP-40, optional>]
],
"content": ENCRYPTED [
["g", "<geohash of the location, required>"],
<optional location tags>
],
"sig": "<64-bytes lowercase hex of the signature>"
}