Skip to content

Tag: u ​

Overview ​

The u tag represents a URL in the Nostr protocol. It is used to specify a URL to a resource, such as a mint URL in Nutzaps (NIP-61) or the absolute request URL in HTTP Auth (NIP-98).

Specification ​

PropertyValue
Tag Nameu
Defined inNIP-61, NIP-98
Required forKind 9321 (Nutzap), Kind 27235 (HTTP Auth)

Format ​

["u", "<url>"]

Usage Description ​

The u tag contains a URL string value. The specific use depends on the event kind:

  1. In Kind 9321 (Nutzap events, NIP-61): The u tag specifies the URL of the mint exactly as specified by the recipient's kind:10019 event.

  2. In Kind 27235 (HTTP Auth events, NIP-98): The u tag must contain exactly the same absolute request URL as the one being authenticated (including query parameters).

Examples ​

Example in Nutzap (NIP-61) ​

json
["u", "https://stablenut.umint.cash"]

Example in HTTP Auth (NIP-98) ​

json
["u", "https://api.snort.social/api/v1/n5sp/list"]

Client Behavior ​

  • In Nutzap context (NIP-61):

    • When creating a Nutzap event, clients MUST include the mint URL exactly as specified in the recipient's kind:10019 event.
    • When displaying Nutzap events, clients MAY use the u tag to show which mint the Nutzap tokens were minted at.
  • In HTTP Auth context (NIP-98):

    • When generating an auth event, clients MUST include the exact absolute URL of the requested resource, including all query parameters.

Relay Behavior ​

Relays generally do not need to perform any special validation on the u tag itself, but the tag is essential for the functionality of the events that use it.

References ​

  • p tag - Used in conjunction with the u tag in Nutzaps to specify the recipient
  • proof tag - Used in Nutzaps to provide the Cashu proofs
  • method tag - Used in HTTP Auth to specify the HTTP method

Notes ​

  • The u tag is case-sensitive.
  • In HTTP Auth (NIP-98), servers MUST verify that the u tag exactly matches the requested URL.
  • In Nutzaps (NIP-61), the mint URL must exactly match what the recipient has specified in their kind:10019 event.