Add client tag to events published from Marco #128

Closed
opened 2026-11-27 08:35:42 +00:00 by raucao · 0 comments
Owner

Use the client tag from NIP-89. Add it to the event’s tags array. For Marco, it would look like this:

["client", "Marco", "31990:<app-pubkey-hex>:<d-tag>", "wss://nostr.kosmos.org"]

The third element is the address of Marco’s kind:31990 application handler event. The fourth is a relay hint for finding it. The tag is optional, and NIP-89 says clients should let users opt out for privacy.

A kind:31990 event is an app’s public description of what Nostr events it can open and how to open them. For example, Marco can publish one so another client knows how to offer an Open in Marco action for a place photo.

It’s an addressable event published under the app operator’s key. Its main fields are:

Field Purpose
d tag Stable identifier for this app handler. Together with the publisher’s pubkey, it gives the event its address, 31990:<pubkey>:<d>.
k tags Nostr event kinds the app can handle. Include one k tag per supported kind.
web, ios, etc. URL templates for opening an event in the app. The receiving client replaces <bech32> with a NIP-19 identifier such as nevent1….
content Optional JSON string with app metadata such as its name and icon. If empty, clients should use the publisher’s kind:0 profile.

You publish the handler once and update it at the same address as needed. Each photo or review Marco publishes can then include a client tag pointing to that same handler. The handler says “Marco can open events of these kinds.” The client tag says “This event was published using Marco.”

P.S.: Apps are also listed from NIP-89 events on e.g. https://nostrhub.io/apps (so publish the event to those relays, too)

Use the **`client`** tag from [NIP-89](https://github.com/nostr-protocol/nips/blob/master/89.md). Add it to the event’s `tags` array. For Marco, it would look like this: ```json ["client", "Marco", "31990:<app-pubkey-hex>:<d-tag>", "wss://nostr.kosmos.org"] ``` The third element is the address of Marco’s `kind:31990` application handler event. The fourth is a relay hint for finding it. The tag is optional, and NIP-89 says clients should let users opt out for privacy. A **`kind:31990` event is an app’s public description of what Nostr events it can open and how to open them.** For example, Marco can publish one so another client knows how to offer an **Open in Marco** action for a place photo. It’s an addressable event published under the app operator’s key. Its main fields are: | Field | Purpose | |---|---| | `d` tag | Stable identifier for this app handler. Together with the publisher’s pubkey, it gives the event its address, `31990:<pubkey>:<d>`. | | `k` tags | Nostr event kinds the app can handle. Include one `k` tag per supported kind. | | `web`, `ios`, etc. | URL templates for opening an event in the app. The receiving client replaces `<bech32>` with a NIP-19 identifier such as `nevent1…`. | | `content` | Optional JSON string with app metadata such as its name and icon. If empty, clients should use the publisher’s `kind:0` profile. | :chatgpt-content-reference{index="1"} You publish the handler once and update it at the same address as needed. Each photo or review Marco publishes can then include a `client` tag pointing to that same handler. The handler says **“Marco can open events of these kinds.”** The `client` tag says **“This event was published using Marco.”** P.S.: Apps are also listed from NIP-89 events on e.g. https://nostrhub.io/apps (so publish the event to those relays, too)
raucao added the featurenostr labels 2026-11-27 08:35:42 +00:00
raucao added the distribution label 2026-11-27 08:37:07 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: raucao/marco#128