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.
This commit is contained in:
7 files changed
+473
No files matched your search
@@ -0,0 +1,123 @@
|
||||
# Marco as a NIP-89 App Handler
|
||||
|
||||
[NIP-89](https://github.com/nostr-protocol/nips/blob/master/89.md) lets clients
|
||||
discover applications that can handle an otherwise unknown event kind. Marco
|
||||
declares itself as the handler for the place media kinds it defines:
|
||||
|
||||
- `kind 360` — Place Photos and Videos (see
|
||||
[`nip-place-photos.md`](./nip-place-photos.md))
|
||||
- `kind 30360` — Place Reviews (to be added when
|
||||
[`nip-place-reviews.md`](./nip-place-reviews.md) ships)
|
||||
|
||||
Two events are involved:
|
||||
|
||||
| Event | Kind | Published by | Purpose |
|
||||
| -------------- | ------- | --------------------------- | --------------------------------------------------- |
|
||||
| App handler | `31990` | dedicated **Marco app** key | Describes Marco and where to open each handled kind |
|
||||
| Recommendation | `31989` | a **user** key | Recommends Marco's handler to that user's followers |
|
||||
|
||||
Both are addressable: re-publishing with the same author and `d` tag replaces
|
||||
the previous event.
|
||||
|
||||
## Identity
|
||||
|
||||
Marco's app handler is signed by a **dedicated "Marco app" key**, separate from
|
||||
any person's account and from the key that authors the NIP specs. Its pubkey is
|
||||
recorded here once the key exists:
|
||||
|
||||
```
|
||||
pubkey: <marco-app-pubkey>
|
||||
npub: <marco-app-npub>
|
||||
naddr: <31990 naddr>
|
||||
```
|
||||
|
||||
The key itself is never stored in this repository. The publishing scripts
|
||||
sign through `nak` with an explicit signer from `NOSTR_SECRET_KEY` (an
|
||||
`nsec`/hex key, or a NIP-46 `bunker://` URL for a desktop signer). See
|
||||
[`publishing.md`](./publishing.md) for the shared setup.
|
||||
|
||||
## App handler event (`kind 31990`)
|
||||
|
||||
```json
|
||||
{
|
||||
"kind": 31990,
|
||||
"pubkey": "<marco-app-pubkey>",
|
||||
"content": "{\"name\":\"Marco\",\"about\":\"An unhosted maps application.\",\"picture\":\"https://marco.earth/icons/icon-192.png\",\"website\":\"https://marco.earth\"}",
|
||||
"tags": [
|
||||
["d", "marco.earth"],
|
||||
["k", "360"],
|
||||
["web", "https://marco.earth/e/<bech32>", "nevent"]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
- **`content`** is optional kind-0-style metadata. Because the app key is not an
|
||||
account users follow, Marco carries its name/description/icon/website here
|
||||
instead of (or in addition to) a `kind 0`.
|
||||
- **`d`** is `marco.earth`, so the addressable coordinate is
|
||||
`31990:<marco-app-pubkey>:marco.earth`.
|
||||
- **`k`** lists every event kind Marco handles. Add `["k", "30360"]` when place
|
||||
reviews ship.
|
||||
- **`web`** is a URL template. Clients replace `<bech32>` with the NIP-19
|
||||
encoding of the entity they want to open, then load the URL. For `kind 360`
|
||||
events the entity is a `nevent`, so Marco must be able to resolve a
|
||||
`nevent` at `/e/:nevent` to the event's place. **That route is planned but
|
||||
not implemented yet**; publish the handler only once it exists.
|
||||
- The second `web` value (`nevent`) makes the tag kind-specific. When reviews
|
||||
ship, add a `naddr` template (reviews are addressable) pointing at the same
|
||||
route, since an `naddr` resolves to the reviewed place too.
|
||||
|
||||
## Recommendation event (`kind 31989`)
|
||||
|
||||
Published from a _user's_ account (`scripts/publish-app-recommendation.sh`):
|
||||
|
||||
```json
|
||||
{
|
||||
"kind": 31989,
|
||||
"pubkey": "<user-pubkey>",
|
||||
"content": "",
|
||||
"tags": [
|
||||
["d", "360"],
|
||||
[
|
||||
"a",
|
||||
"31990:<marco-app-pubkey>:marco.earth",
|
||||
"wss://nostr.kosmos.org",
|
||||
"web"
|
||||
],
|
||||
[
|
||||
"a",
|
||||
"31990:<marco-app-pubkey>:marco.earth",
|
||||
"wss://relay.primal.net",
|
||||
"web"
|
||||
]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
- **`d`** is the supported event kind this recommendation applies to (`360`
|
||||
now; publish another with `d = 30360` later).
|
||||
- Each **`a`** tag is the app-handler coordinate plus a relay hint and the
|
||||
platform (`web`). Two tags give clients two places to find the handler.
|
||||
|
||||
## Relays
|
||||
|
||||
Publishing targets live in `scripts/nostr-relays.txt` (one URL per line; `#`
|
||||
comments allowed). `scripts/nostr-common.sh` loads them into `NOSTR_RELAYS`;
|
||||
edit that file to change where events are sent. An explicitly set
|
||||
`NOSTR_RELAYS` environment variable overrides it.
|
||||
|
||||
## Publishing
|
||||
|
||||
```sh
|
||||
# app handler, signed by the Marco app key
|
||||
NOSTR_SECRET_KEY='bunker://...' ./scripts/publish-app-handler.sh
|
||||
|
||||
# recommendation, signed by your own key (after MARCO_APP_PUBKEY is set)
|
||||
NOSTR_SECRET_KEY='<your key or bunker>' ./scripts/publish-app-recommendation.sh
|
||||
|
||||
# add --dry-run to either script to sign and print without publishing
|
||||
```
|
||||
|
||||
The first app-handler run prints the app pubkey and its `naddr`; paste the
|
||||
pubkey into `MARCO_APP_PUBKEY` in `scripts/nostr-common.sh` and record the
|
||||
identifiers above.
|
||||
@@ -0,0 +1,77 @@
|
||||
# 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:
|
||||
|
||||
```sh
|
||||
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:
|
||||
|
||||
```sh
|
||||
NOSTR_SECRET_KEY='...' ./scripts/publish-nip.sh photos --dry-run
|
||||
```
|
||||
|
||||
See [`nip-89-app-handler.md`](./nip-89-app-handler.md) for the app handler and
|
||||
recommendation events.
|
||||
Executable
+66
@@ -0,0 +1,66 @@
|
||||
# Shared configuration for Marco's Nostr publishing scripts.
|
||||
#
|
||||
# Sourced (not executed) by:
|
||||
# scripts/publish-app-handler.sh
|
||||
# scripts/publish-app-recommendation.sh
|
||||
# scripts/publish-nip.sh
|
||||
#
|
||||
# Nothing here is secret. Signing is done through nak with an explicit signer
|
||||
# from the environment (nsec, hex, ncryptsec or a NIP-46 bunker:// URL).
|
||||
|
||||
# Prints an error and exits.
|
||||
die() {
|
||||
echo "error: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Relays every script publishes to. Edit scripts/nostr-relays.txt (one URL per
|
||||
# line) instead of this file. An explicitly set NOSTR_RELAYS overrides it.
|
||||
if [ -z "${NOSTR_RELAYS:-}" ]; then
|
||||
RELAYS_FILE="${NOSTR_RELAYS_FILE:-$(dirname "$0")/nostr-relays.txt}"
|
||||
[ -f "$RELAYS_FILE" ] || die "relay list not found: $RELAYS_FILE (create it or set NOSTR_RELAYS)"
|
||||
NOSTR_RELAYS=$(
|
||||
tr -d '\r' <"$RELAYS_FILE" |
|
||||
sed -e 's/#.*//' -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -e '/^$/d' |
|
||||
tr '\n' ' '
|
||||
)
|
||||
NOSTR_RELAYS=${NOSTR_RELAYS% }
|
||||
[ -n "$NOSTR_RELAYS" ] || die "no relays found in $RELAYS_FILE"
|
||||
fi
|
||||
|
||||
# Hex pubkey of the dedicated "Marco app" identity that signs the NIP-89 app
|
||||
# handler (kind 31990). Leave empty until the key exists; after the first
|
||||
# successful publish-app-handler.sh run, paste the printed pubkey here so the
|
||||
# scripts refuse to publish from the wrong identity.
|
||||
MARCO_APP_PUBKEY=""
|
||||
|
||||
# "d" identifier of Marco's NIP-89 app handler (kind 31990).
|
||||
MARCO_APP_D="marco.earth"
|
||||
|
||||
# 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.
|
||||
NIP_SPEC_PUBKEY="1f79058c77a224e5be226c8f024cacdad4d741855d75ed9f11473ba8eb86e1cb"
|
||||
|
||||
# Requires an explicit signer so we never silently fall back to nak's machine
|
||||
# default key. Exports NAK_SEC for the nak calls.
|
||||
require_signer() {
|
||||
command -v nak >/dev/null 2>&1 || die "nak is not installed (https://github.com/fiatjaf/nak)"
|
||||
[ -n "${NOSTR_SECRET_KEY:-}" ] || die "set NOSTR_SECRET_KEY (nsec, hex, ncryptsec or bunker://...) first"
|
||||
NAK_SEC="$NOSTR_SECRET_KEY"
|
||||
export NAK_SEC
|
||||
}
|
||||
|
||||
# Reads a signed event (nak prints compact, single-line JSON) on stdin and
|
||||
# prints its pubkey.
|
||||
event_pubkey() {
|
||||
sed -n 's/.*"pubkey":"\([0-9a-f]\{64\}\)".*/\1/p'
|
||||
}
|
||||
|
||||
# Refuses to continue when the signer is not the expected identity.
|
||||
# $1 expected pubkey ("" skips the check), $2 actual pubkey.
|
||||
assert_pubkey() {
|
||||
if [ -n "$1" ] && [ "$2" != "$1" ]; then
|
||||
die "signer is $2, expected $1 — wrong key for this event"
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# Relays every Nostr publish script sends to.
|
||||
#
|
||||
# One WebSocket URL per line. Blank lines and everything after a "#" are
|
||||
# ignored. Edit this file to change where Marco publishes its NIP-89 app
|
||||
# handler, recommendations and kind-30817 specs.
|
||||
#
|
||||
# Read by scripts/nostr-common.sh into NOSTR_RELAYS. Set the NOSTR_RELAYS
|
||||
# environment variable to override this file entirely.
|
||||
|
||||
# Marco's home relay
|
||||
wss://nostr.kosmos.org
|
||||
|
||||
# Relays used by the Ditto/NostrHub clients
|
||||
wss://relay.ditto.pub
|
||||
wss://relay.dreamith.to
|
||||
|
||||
# General public relays
|
||||
wss://nos.lol
|
||||
wss://relay.primal.net
|
||||
wss://relay.nostr.band
|
||||
wss://nostr.wine
|
||||
wss://relay.snort.social
|
||||
wss://relay.damus.io
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Publish (or re-publish) Marco's NIP-89 app handler (kind 31990).
|
||||
#
|
||||
# Kind 31990 is addressable, so re-running this replaces the previous event
|
||||
# (same author + "d" tag). See doc/nostr/nip-89-app-handler.md.
|
||||
#
|
||||
# Usage:
|
||||
# NOSTR_SECRET_KEY='bunker://...' ./scripts/publish-app-handler.sh [--dry-run]
|
||||
#
|
||||
set -eu
|
||||
|
||||
. "$(dirname "$0")/nostr-common.sh"
|
||||
|
||||
DRY_RUN=0
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--dry-run) DRY_RUN=1 ;;
|
||||
*) die "unknown argument: $arg" ;;
|
||||
esac
|
||||
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\"}"
|
||||
|
||||
# "k" tags list every kind this app handles; add k=30360 when place reviews
|
||||
# ship. Clients replace <bech32> with a NIP-19 nevent before opening the URL.
|
||||
# The /e/<nevent> route is planned in Marco (see the doc).
|
||||
event=$(
|
||||
nak event --sec "$NAK_SEC" -k 31990 \
|
||||
-d "$MARCO_APP_D" \
|
||||
-t k=360 \
|
||||
-t "web=$APP_ORIGIN/e/<bech32>;nevent" \
|
||||
-c "$APP_CONTENT"
|
||||
)
|
||||
|
||||
pubkey=$(printf '%s\n' "$event" | event_pubkey)
|
||||
[ -n "$pubkey" ] || die "could not read pubkey from the signed event"
|
||||
assert_pubkey "$MARCO_APP_PUBKEY" "$pubkey"
|
||||
|
||||
if [ "$DRY_RUN" = 1 ]; then
|
||||
printf '%s\n' "$event"
|
||||
echo "dry run: signed by $pubkey, not published" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
printf '%s\n' "$event" | nak event $NOSTR_RELAYS
|
||||
|
||||
echo "published app handler (kind 31990) as $pubkey"
|
||||
if [ -z "$MARCO_APP_PUBKEY" ]; then
|
||||
echo "record MARCO_APP_PUBKEY=$pubkey in scripts/nostr-common.sh" >&2
|
||||
fi
|
||||
naddr=$(nak encode naddr -k 31990 -a "$pubkey" -d "$MARCO_APP_D" 2>/dev/null || true)
|
||||
if [ -n "$naddr" ]; then
|
||||
echo "naddr: $naddr"
|
||||
fi
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Publish (or re-publish) a NIP-89 recommendation (kind 31989) pointing at
|
||||
# Marco's app handler. Signed by a *user* key (your own), not the app key.
|
||||
#
|
||||
# Kind 31989 is addressable per (author, "d" = supported kind), so re-running
|
||||
# replaces your previous recommendation for that kind.
|
||||
#
|
||||
# Usage:
|
||||
# NOSTR_SECRET_KEY='...' ./scripts/publish-app-recommendation.sh [kind] [--dry-run]
|
||||
#
|
||||
# kind defaults to 360 (place photos); pass 30360 once place reviews ship.
|
||||
#
|
||||
set -eu
|
||||
|
||||
. "$(dirname "$0")/nostr-common.sh"
|
||||
|
||||
DRY_RUN=0
|
||||
RECOMMEND_KIND=360
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--dry-run) DRY_RUN=1 ;;
|
||||
*[!0-9]*) die "unknown argument: $arg" ;;
|
||||
*) RECOMMEND_KIND="$arg" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
[ -n "$MARCO_APP_PUBKEY" ] || die "set MARCO_APP_PUBKEY in scripts/nostr-common.sh (run publish-app-handler.sh first)"
|
||||
require_signer
|
||||
|
||||
# One "a" tag per relay hint, so clients can find the handler either way.
|
||||
event=$(
|
||||
nak event --sec "$NAK_SEC" -k 31989 \
|
||||
-d "$RECOMMEND_KIND" \
|
||||
-t "a=31990:$MARCO_APP_PUBKEY:$MARCO_APP_D;wss://nostr.kosmos.org;web" \
|
||||
-t "a=31990:$MARCO_APP_PUBKEY:$MARCO_APP_D;wss://relay.primal.net;web"
|
||||
)
|
||||
|
||||
pubkey=$(printf '%s\n' "$event" | event_pubkey)
|
||||
[ -n "$pubkey" ] || die "could not read pubkey from the signed event"
|
||||
|
||||
if [ "$DRY_RUN" = 1 ]; then
|
||||
printf '%s\n' "$event"
|
||||
echo "dry run: signed by $pubkey, not published" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
printf '%s\n' "$event" | nak event $NOSTR_RELAYS
|
||||
|
||||
echo "published recommendation (kind 31989, kind $RECOMMEND_KIND) as $pubkey"
|
||||
Executable
+76
@@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Publish (or re-publish) one of Marco's NIPs as a kind 30817 "Custom NIP"
|
||||
# ("NIPs on Nostr"). Kind 30817 is addressable, so re-running replaces the
|
||||
# previous version (same author + "d" tag); the spec is updated, not forked.
|
||||
#
|
||||
# See doc/nostr/publishing.md.
|
||||
#
|
||||
# Usage:
|
||||
# NOSTR_SECRET_KEY='...' ./scripts/publish-nip.sh [photos|reviews] [--dry-run]
|
||||
#
|
||||
set -eu
|
||||
|
||||
. "$(dirname "$0")/nostr-common.sh"
|
||||
|
||||
DRY_RUN=0
|
||||
WHICH=photos
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--dry-run) DRY_RUN=1 ;;
|
||||
photos | reviews) WHICH="$arg" ;;
|
||||
*) die "unknown argument: $arg" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "$WHICH" in
|
||||
photos)
|
||||
NIP_PATH="doc/nostr/nip-place-photos.md"
|
||||
NIP_D="place-photos-and-videos"
|
||||
NIP_TITLE="Place Photos and Videos"
|
||||
NIP_KIND="360"
|
||||
;;
|
||||
reviews)
|
||||
NIP_PATH="doc/nostr/nip-place-reviews.md"
|
||||
NIP_D="place-reviews"
|
||||
NIP_TITLE="Place Reviews"
|
||||
NIP_KIND="30360"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Allow running from anywhere: resolve paths against the repo root.
|
||||
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
||||
NIP_FILE="$root/$NIP_PATH"
|
||||
[ -f "$NIP_FILE" ] || die "spec not found: $NIP_FILE"
|
||||
|
||||
require_signer
|
||||
|
||||
# "status" is NostrHub metadata; the spec-defined tags are d/title/k (see
|
||||
# doc/nostr/publishing.md). The "client" tag is deliberately not set.
|
||||
event=$(
|
||||
nak event --sec "$NAK_SEC" -k 30817 \
|
||||
-d "$NIP_D" \
|
||||
-t "title=$NIP_TITLE" \
|
||||
-t "alt=Nostr Implementation Possibility: $NIP_TITLE" \
|
||||
-t "k=$NIP_KIND;$NIP_TITLE" \
|
||||
-t "status=review" \
|
||||
-c "@$NIP_FILE"
|
||||
)
|
||||
|
||||
pubkey=$(printf '%s\n' "$event" | event_pubkey)
|
||||
[ -n "$pubkey" ] || die "could not read pubkey from the signed event"
|
||||
assert_pubkey "$NIP_SPEC_PUBKEY" "$pubkey"
|
||||
|
||||
if [ "$DRY_RUN" = 1 ]; then
|
||||
printf '%s\n' "$event"
|
||||
echo "dry run: signed by $pubkey, not published" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
printf '%s\n' "$event" | nak event $NOSTR_RELAYS
|
||||
|
||||
echo "published NIP '$NIP_TITLE' (kind 30817) as $pubkey"
|
||||
naddr=$(nak encode naddr -k 30817 -a "$pubkey" -d "$NIP_D" 2>/dev/null || true)
|
||||
if [ -n "$naddr" ]; then
|
||||
echo "naddr: $naddr"
|
||||
fi
|
||||
Reference in new issue
Block a user