Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIP-3166: Country code tag based on ISO-3166 #763

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions 3166.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Country Code NIP-3166

`draft` `author:steliosrammos`

This NIP defines a standard country code tag for events.

## `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.

`[“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.

## Examples

### On `kind:0`

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
{
"kind": 0,
"tags": [
[“c”, “GR”] # Greece Country Code
]
}
```

### On `kind:1`

On `kind:1` events the `c` 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": [
[“c”, “ES”] # El Salvador Country Code
]
}
```