NIPs nostr improvement proposals

NIP-CC - Geocaching Events

Table of Contents

Geocaching Events

draft optional

This NIP defines event kinds for geocaching activities on Nostr, enabling users to create, discover, and log geocaches in a decentralized manner.

Motivation

Geocaching is a global treasure hunting game where participants use GPS coordinates to hide and seek containers ("geocaches") at specific locations. This NIP brings geocaching to Nostr, allowing for censorship-resistant, decentralized geocache listings and logs without relying on centralized platforms.

Event Kinds

This NIP defines two new event kinds:

Geocache Listing (kind:37515)

A geocache listing is an addressable event that describes a hidden geocache. The event is addressable to allow cache owners to update their listings (e.g., to provide maintenance updates or adjust coordinates).

Content

The .content field contains the cache description as plain text.

Tags

Required tags:

Optional tags:

Example

{
"kind": 37515,
"pubkey": "<cache owner's pubkey>",
"created_at": 1234567890,
"content": "A scenic cache along the river trail. Please be mindful of muggles during busy hours.",
"tags": [
["d", "riverside-mystery-2024"],
["name", "Riverside Mystery"],
["g", "dp3wfg"],
["location", "Riverside Park, Portland, OR"],
["difficulty", "2"],
["terrain", "3"],
["size", "small"],
["cache-type", "traditional"],
["hint", "Ybbx sbe gur byq bnx gerr"],
["image", "https://example.com/cache-area.jpg"],
["t", "scenic"],
["t", "river"],
["published_at", "1704067200"],
["status", "active"],
["relay", "wss://geocaching.example.com"],
["relay", "wss://oregon.nostr.com"]
]
}

Geocache Log (kind:37516)

A geocache log represents a user's visit to a geocache. These are regular (non-addressable) events.

Content

The .content field contains the log message as plain text.

Tags

Required tags:

Optional tags:

Example

{
"kind": 37516,
"pubkey": "<finder's pubkey>",
"created_at": 1234567890,
"content": "Beautiful location! Took me 20 minutes to find it. TFTC!",
"tags": [
["a", "37515:abc123...:riverside-mystery-2024", "wss://geocaching.example.com"],
["log-type", "found"],
["image", "https://example.com/selfie.jpg"],
["g", "dp3w"],
["published_at", "1704153600"]
]
}

Relay Selection

For Cache Listings

Cache owners SHOULD include one or more relay tags in their listing events to indicate preferred relays for log submissions. Relays are listed in order of preference, with the first relay being the primary choice.

For Log Events

When creating log events (kind:37516), clients SHOULD:

  1. Check the cache listing for relay tags and publish logs to those relays
  2. Include the first (primary) relay URL in the a tag reference (third parameter)
  3. Also publish to the user's regular write relays for their own activity tracking

Geographic and Specialized Relays

Communities MAY establish geographic or geocaching-specific relays. Clients SHOULD:

Relay Discovery

When querying for geocaches and logs, clients SHOULD:

  1. Use the relay hints from a tags when fetching referenced cache listings
  2. Query both general-purpose and specialized geocaching relays
  3. Consider geographic proximity when selecting relays to query

Client Implementation Notes

Querying Geocaches

Clients SHOULD use the following filters to query geocaches:

  1. All active geocaches: {"kinds": [37515], "#status": ["active"]}
  2. Geocaches by location: {"kinds": [37515], "#g": ["dp3w"]} (using geohash prefix)
  3. Geocaches by type: {"kinds": [37515], "#cache-type": ["mystery"]}
  4. Geocaches by tag: {"kinds": [37515], "#t": ["scenic"]}
  5. User's hidden caches: {"kinds": [37515], "authors": ["<pubkey>"]}

Querying Logs

  1. Logs for a specific cache: {"kinds": [37516], "#a": ["37515:<pubkey>:<d-tag>"]}
  2. User's found caches: {"kinds": [37516], "authors": ["<pubkey>"], "#log-type": ["found"]}
  3. Recent activity: {"kinds": [37516], "limit": 50} with time-based sorting

Privacy Considerations

Coordinate Handling

Statistics

Clients MAY calculate statistics by counting log events:

Appendix: Geocaching Terminology

Security and Spam Considerations

Future Considerations

This NIP intentionally keeps the initial implementation simple. Future NIPs may define: