What is Nostr?
arkinox
npub1ark…h43w
2024-03-20 13:59:27

Check-in spec for Yondar

This is an idea for how to implement check-ins on nostr; it could be used in any location client. Yondar doesn’t implement this yet, but there is interest in adding it.

When you arrive at a place (using Yondar’s arrival algorithm) You are prompted if you want to check in.

Checking in will retrieve the kind 13811 (1CHK) (a single replaceable event), copy is tags referencing places visited, and append the latest place visited in a new 13811.

The 13811 tags are as follows:

[a, pubkey:kind:id, timestamp visited]

This supports checking in at the same place multiple times.

The order of the tags should be chronological.

Example Kind 13811

{
	id: "af74809235bcb39920fab8...",
	pubkey: "0f8ba12dc905...",
	content: "",
	created_at: 1706720386,
	tags: [
		["a", "37515:<pubkey>:<d tag of place>", "wss://relayable.org", "1703721153"] // referencing a place; 4th arg is the time visited
	]
}

The single replaceable event allows you to edit or delete your history.

When viewing a place you can query for visits with a filter like this:

{
	kinds: [13811],
	"#a": ["37515:<pubkey of place>:<d tag of place>"] // this info comes from place
}

[!Warning] Privacy Option: Encrypted Visits The tags containing the check-in tags may be JSON encoded and encrypted in the content property instead of the public tags property.

[!Warning] Privacy Option: Anonymous Key A brand new private key may be generated and stored locally. This key may be used to publish check-ins so it isn’t associated with your primary public key.

Author Public Key
npub1arkn0xxxll4llgy9qxkrncn3vc4l69s0dz8ef3zadykcwe7ax3dqrrh43w