Files
marco/doc/nostr/publishing.md
raucao 2fce1f532e Add NIP-89 app handler docs and Nostr publishing scripts
Document Marco's NIP-89 app handler (kind 31990) and recommendation
(kind 31989), and how the place NIPs are published on Nostr as kind 30817
custom NIPs.

Add shell scripts that build and publish these events via nak: the app
handler, a recommendation, and the NIP specs. The publishing relay list
lives in scripts/nostr-relays.txt for easy editing. Signing requires an
explicit NOSTR_SECRET_KEY (nsec or NIP-46 bunker URL), and the scripts
refuse to publish from the wrong identity.
2026-11-28 12:39:28 +04:00

3.3 KiB

Publishing Marco's NIPs on Nostr

Marco distributes the place NIPs both as files in doc/nostr/ and as Nostr events, so they are discoverable and updatable without a git host.

Custom NIPs (kind 30817)

Marco publishes each spec as a kind 30817 "Custom NIP" event, the NIPs on Nostr convention:

  • content — the full Markdown of the spec
  • ["d", "<slug>"] — unique identifier
  • ["title", "<title>"]
  • ["k", "<kind>", "<kind name>"] — the event kind(s) the spec defines
  • ["status", "review"] — NostrHub metadata (not part of the kind-30817 spec)

Kind 30817 is addressable, so the spec is identified by (pubkey, d). Editing the file and re-running the publish script replaces the previous event; this only works from the original author's key, which the script enforces.

Published specs

Spec d k Status
Photos and Videos place-photos-and-videos 360 published
Place Reviews place-reviews 30360 not yet published

The published photos spec is authored by

npub:  npub1raustrrh5gjwt03zdj8syn9vmt2dwsv9t467m8c3gua636uxu89svgdees
hex:   1f79058c77a224e5be226c8f024cacdad4d741855d75ed9f11473ba8eb86e1cb
naddr: naddr1qvzqqqrcvypzq8meqkx80g3yuklzymy0qfx2ekk56aqc2ht4ak03z3em4r4cdcwtqqthqmrpvdjj6urgda6x7uedv9hxgttkd9jx2mmnl2q70n

and is readable at https://nostrhub.io/naddr1qvzqqqrcvypzq8meqkx80g3yuklzymy0qfx2ekk56aqc2ht4ak03z3em4r4cdcwtqqthqmrpvdjj6urgda6x7uedv9hxgttkd9jx2mmnl2q70n.

Relays

All publishing scripts read their relay list from scripts/nostr-relays.txt (one URL per line; # comments allowed), loaded into NOSTR_RELAYS by scripts/nostr-common.sh. Edit that file to change where events are sent; an explicitly set NOSTR_RELAYS environment variable overrides it.

Scripts

Script Publishes
scripts/publish-nip.sh photos nip-place-photos.md as kind 30817
scripts/publish-nip.sh reviews nip-place-reviews.md as kind 30817 (when ready)
scripts/publish-app-handler.sh Marco's NIP-89 app handler (kind 31990)
scripts/publish-app-recommendation.sh A NIP-89 recommendation (kind 31989) pointing at it

Each script signs via nak with an explicit NOSTR_SECRET_KEY and refuses to run without one, so nak's machine default key is never used by accident. The NIP scripts additionally verify the signer is the spec's author, so an update cannot accidentally fork the spec instead of replacing it.

Signing

NOSTR_SECRET_KEY accepts an nsec, hex or ncryptsec key, or a NIP-46 bunker:// URL to sign with a desktop signer over Nostr Connect. For example:

NOSTR_SECRET_KEY='bunker://<remote-pubkey>?relay=wss://relay.example' \
  ./scripts/publish-nip.sh photos

Use --dry-run to sign and print the event without publishing:

NOSTR_SECRET_KEY='...' ./scripts/publish-nip.sh photos --dry-run

See nip-89-app-handler.md for the app handler and recommendation events.