Update to Country Code instead of Geo-location

This commit is contained in:
steliosrammos 2023-09-05 00:09:55 -05:00 committed by GitHub
parent 479f39494a
commit c7e6bb37a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

14
3166.md
View File

@ -1,14 +1,14 @@
# Geo-Location NIP-3166 # Country Code NIP-3166
`draft` `author:steliosrammos` `draft` `author:steliosrammos`
This NIP defines a standard geo-location tag for events. This NIP defines a standard geo-location tag for events.
## `G tag` ## `c tag`
The [ISO3166-1 Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) standard can be used for a universally recognised country codes. The [ISO3166-1 Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) standard can be used for a universally recognised country codes.
`[“G”, “<ISO3166 alpha-2 country code>”]` `[“c”, “<ISO3166 alpha-2 country code>”]`
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. 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.
@ -16,27 +16,27 @@ The tag can be added on any event, and the meaning may vary (see [Examples](#exa
### On `kind:0` ### 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). The `c` 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 ```json
{ {
"kind": 0, "kind": 0,
"tags": [ "tags": [
[“G”, “GR”] # Greece Country Code [“c”, “GR”] # Greece Country Code
] ]
} }
``` ```
### On `kind:1` ### 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). On `kind:1` events the `c` tag can be used as a status for the post (similar to Instagram posts with a location).
```json ```json
{ {
"kind": 1, "kind": 1,
"content": "Enjoying a beer paid in Bitcoin at Bitcoin Beach." "content": "Enjoying a beer paid in Bitcoin at Bitcoin Beach."
"tags": [ "tags": [
[“G”, “ES”] # El Salvador Country Code [“c”, “ES”] # El Salvador Country Code
] ]
} }
``` ```