Add NIP-05, category tags and the ngit repo to the app handler
CI / Lint (pull_request) Successful in 55s
CI / Test (pull_request) Failing after 1m16s

Set content.nip05 (marco@kosmos.org), a ["t","maps"] category tag, and a
kind-30617 `a` tag linking the ngit repository — the three fields NostrHub's
app listing reads. Add the values as config in scripts/nostr-common.sh.
This commit is contained in:
raucao committed 2026-11-28 17:50:35 +04:00
1 parent 38ca6ba296
commit c30e8cee72
3 files changed
+31 -3

No files matched your search

+12 -2
View File
@@ -43,7 +43,7 @@ in `scripts/nostr-common.sh` guards against signing from any other key. See
{
"kind": 31990,
"pubkey": "1f79058c77a224e5be226c8f024cacdad4d741855d75ed9f11473ba8eb86e1cb",
"content": "{\"name\":\"Marco\",\"about\":\"An unhosted maps application.\",\"picture\":\"https://marco.earth/icons/icon-192.png\",\"website\":\"https://marco.earth\"}",
"content": "{\"name\":\"Marco\",\"about\":\"An unhosted maps application.\",\"picture\":\"https://marco.earth/icons/icon-192.png\",\"website\":\"https://marco.earth\",\"nip05\":\"marco@kosmos.org\"}",
"tags": [
["d", "marco.earth"],
["k", "360"],
@@ -62,9 +62,15 @@ in `scripts/nostr-common.sh` guards against signing from any other key. See
["i", "https://github.com/nostr-protocol/nips/blob/master/B7.md"],
[
"a",
"30817:<nip-author-pubkey>:place-photos-and-videos",
"30817:1f79058c77a224e5be226c8f024cacdad4d741855d75ed9f11473ba8eb86e1cb:place-photos-and-videos",
"wss://nostr.kosmos.org",
"nip"
],
["t", "maps"],
[
"a",
"30617:1f79058c77a224e5be226c8f024cacdad4d741855d75ed9f11473ba8eb86e1cb:marco",
"wss://relay.ngit.dev"
]
]
}
@@ -90,6 +96,10 @@ in `scripts/nostr-common.sh` guards against signing from any other key. See
- **`i`** tags advertise the official NIPs Marco implements, and one **`a`** tag
references Marco's own kind-30817 NIP (Place Photos and Videos). See
[Implemented NIPs](#implemented-nips).
- **`content.nip05`** is the app's NIP-05 identifier.
- **`t`** tags are categories; NostrHub renders them as hashtags.
- The kind-30617 **`a`** tag links Marco's ngit repository (with a relay hint),
which NostrHub shows as the app's source.
## Implemented NIPs
+10
View File
@@ -42,6 +42,16 @@ MARCO_OLD_APP_PUBKEY="72424a5bdb8b3e6bcb2731643d43b26f3e3750ae61e5d601719aabd12e
# "d" identifier of Marco's NIP-89 app handler (kind 31990).
MARCO_APP_D="marco.earth"
# App metadata advertised in the handler:
# - NIP-05 identifier (goes into `content.nip05`)
# - category tags, one `["t", <tag>]` each (NostrHub shows these as
# hashtags/categories)
# - git repo reference: a kind-30617 `a` tag plus a relay hint
MARCO_APP_NIP05="marco@kosmos.org"
MARCO_APP_TAGS="maps"
MARCO_APP_REPO="30617:1f79058c77a224e5be226c8f024cacdad4d741855d75ed9f11473ba8eb86e1cb:marco"
MARCO_APP_REPO_RELAY="wss://relay.ngit.dev"
# Author of the published NIP specs (kind 30817, "NIPs on Nostr"). A published
# spec can only be updated by this key; publishing from another key would fork
# the spec instead of replacing it, so the scripts guard against it.
+9 -1
View File
@@ -23,7 +23,7 @@ done
require_signer
APP_ORIGIN="https://marco.earth"
APP_CONTENT="{\"name\":\"Marco\",\"about\":\"An unhosted maps application.\",\"picture\":\"$APP_ORIGIN/icons/icon-192.png\",\"website\":\"$APP_ORIGIN\"}"
APP_CONTENT="{\"name\":\"Marco\",\"about\":\"An unhosted maps application.\",\"picture\":\"$APP_ORIGIN/icons/icon-192.png\",\"website\":\"$APP_ORIGIN\",\"nip05\":\"$MARCO_APP_NIP05\"}"
NIP_URL_PREFIX="https://github.com/nostr-protocol/nips/blob/master"
# "k" tags list every kind this app handles; add k=30360 when place reviews
@@ -45,6 +45,14 @@ done
set -- "$@" -t "a=30817:$NIP_SPEC_PUBKEY:$MARCO_NIP_PHOTOS_D;$MARCO_NIP_RELAY;nip"
# Category tags (NostrHub shows these as hashtags/categories).
for tag in $MARCO_APP_TAGS; do
set -- "$@" -t "t=$tag"
done
# Git repo (ngit) reference: kind-30617 address plus relay hint.
set -- "$@" -t "a=$MARCO_APP_REPO;$MARCO_APP_REPO_RELAY"
event=$("$@")
pubkey=$(printf '%s\n' "$event" | event_pubkey)