From 52b8167b088b7d81dfde6594e1cca7fa062faa79 Mon Sep 17 00:00:00 2001 From: Stelios Rammos Date: Mon, 4 Sep 2023 19:50:40 -0500 Subject: [PATCH] first draft for NIP-3166 --- 3166.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 3166.md diff --git a/3166.md b/3166.md new file mode 100644 index 00000000..15b78c0d --- /dev/null +++ b/3166.md @@ -0,0 +1,42 @@ +# Geo-Location NIP-3166 + +`draft` `author:steliosrammos` + +This NIP defines a standard geo-location tag for events. + +## `G tag` + +The [ISO3166-1 Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) standard can be used for a universally recognised country codes. + +`[“G”, “”]` + +The tag can be added on any event, and the meaning may vary (see [Examples](#examples) below). The advantage of having a tag specifically for location is to allow Nostr clients to easily query/filter content by location, and for Relays to index events by that tag. + +## Examples + +### On `kind:0` + +The `G` tag can be added to profiles through the `kind:0` event. Nostr clients can display the location on the profile page of the user (similar to Twitter/X profiles). + +```json +{ + "kind": 0, + "tags": [ + [“G”, “GR”] # Greece Country Code + ] +} +``` + +### On `kind:1` + +On `kind:1` events the `G` tag can be used as a status for the post (similar to Instagram posts with a location). + +```json +{ + "kind": 1, + "content": "Enjoying a beer paid in Bitcoin at Bitcoin Beach." + "tags": [ + [“G”, “ES”] # El Salvador Country Code + ] +} +``` \ No newline at end of file