← Todos los NIPs

NIP-58

Insignias

BorradorEventos

Cualquiera puede diseñar una insignia y otorgarla a otras personas. Las concesiones son permanentes y no se pueden transferir, pero cada destinatario elige qué insignias mostrar en su perfil y en qué orden, y puede agruparlas en conjuntos.

De un vistazo

Estado
En uso, pero todavía puede cambiar.
Kinds
Tags
  • a
  • d
  • description
  • e
  • image
  • name
  • p
  • thumb
Último cambio
13 jun 2026

Pruébalo

Edita el formulario o el JSON: ambos se mantienen sincronizados, la insignia indica si el resultado es válido y, al tocar cualquier campo, se explica qué hace.

Qué construir

Cómo se conectan las partes: Del diseño a la exhibición

Ejemplos
Válido 1 nota

Aún sin firmar · Solo claves de demo. Las claves secretas de estos personajes son públicas a propósito.

Formulario
1 ene 2025, 0:00 UTC

Contenido

Vacío. Todo está en los tags.

Este kind no lleva contenido: déjalo como un string vacío.

Tags

  1. d Obligatorio

    Nombre único de la insignia para este emisor.

  2. name Opcional

    Nombre corto para mostrar.

  3. description Opcional

    Qué significa la insignia o por qué se otorga.

  4. image Opcional

    La imagen a tamaño completo (se recomienda 1024x1024, cuadrada).

  5. thumb Opcional

    Versiones más pequeñas de la imagen. Tamaños recomendados: 512, 256, 64, 32 y 16 píxeles, cuadradas.

  6. thumb Opcional

    Versiones más pequeñas de la imagen. Tamaños recomendados: 512, 256, 64, 32 y 16 píxeles, cuadradas.

Añadir tag

Cómo funciona este NIP

Paso 1 de 5

Define la insignia

El emisor publica kind 30009 con un tag d y, opcionalmente, nombre, descripción, imagen y miniaturas.

En el curso

Ningún capítulo del curso cubre este NIP todavía. El editor de arriba es la forma más rápida de empezar.

Se basa en

Especificación

El texto de las especificaciones se cita en inglés del repositorio nostr-protocol/nips. Nuestras explicaciones y la interfaz están traducidas. Código fuente en GitHub en el commit 0046368

Leer la especificación798 palabras, citadas del repositorio en el commit 0046368.

Four special events are used to define, award, display and categorize badges in user profiles:

  1. A "Badge Definition" event is defined as an addressable event with kind 30009 having a d tag with a value that uniquely identifies the badge (e.g. bravery) published by the badge issuer. Badge definitions can be updated.

  2. A "Badge Award" event is a kind 8 event with a single a tag referencing a "Badge Definition" event and one or more p tags, one for each pubkey the badge issuer wishes to award. Awarded badges are immutable and non-transferable.

  3. A "Profile Badges" event is defined as a replaceable event with kind 10008 as a NIP-51 standard list. Profile badges contain an ordered list of pairs of a and e tags referencing a Badge Definition and a Badge Award for each badge to be displayed. It may also contain a tags referencing "Badge Set" events.

  4. A "Badge Set" event is defined as an addressable event with kind 30008 as a NIP-51 set. Badge sets allow users to categorize accepted badges into labeled groups. They contain ordered pairs of a and e tags referencing a Badge Definition and a Badge Award for each badge in the set.

Badge Definition event

The following tags MUST be present:

  • d tag with the unique name of the badge.

The following tags MAY be present:

  • A name tag with a short name for the badge.
  • image tag whose value is the URL of a high-resolution image representing the badge. The second value optionally specifies the dimensions of the image as widthxheight in pixels. Badge recommended dimensions is 1024x1024 pixels.
  • A description tag whose value MAY contain a textual representation of the image, the meaning behind the badge, or the reason of its issuance.
  • One or more thumb tags whose first value is an URL pointing to a thumbnail version of the image referenced in the image tag. The second value optionally specifies the dimensions of the thumbnail as widthxheight in pixels.

Badge Award event

The following tags MUST be present:

  • An a tag referencing a kind 30009 Badge Definition event.
  • One or more p tags referencing each pubkey awarded.

Profile Badges Event

The number of badges a pubkey can be awarded is unbounded. The Profile Badge event allows individual users to accept or reject awarded badges, as well as choose the display order of badges on their profiles.

The following tags MAY be present:

  • Zero or more ordered consecutive pairs of a and e tags referencing a kind 30009 Badge Definition and kind 8 Badge Award, respectively. Clients SHOULD ignore a without corresponding e tag and viceversa. Badge Awards referenced by the e tags should contain the same a tag.

Motivation

Users MAY be awarded badges (but not limited to) in recognition, in gratitude, for participation, or in appreciation of a certain goal, task or cause.

Users MAY choose to decorate their profiles with badges for fame, notoriety, recognition, support, etc., from badge issuers they deem reputable.

Recommendations

Clients MAY whitelist badge issuers (pubkeys) for the purpose of ensuring they retain a valuable/special factor for their users.

Badge image recommended aspect ratio is 1:1 with a high-res size of 1024x1024 pixels.

Badge thumbnail image recommended dimensions are: 512x512 (xl), 256x256 (l), 64x64 (m), 32x32 (s) and 16x16 (xs).

Clients MAY choose to render less badges than those specified by users in the Profile Badges event or replace the badge image and thumbnails with ones that fits the theme of the client.

Clients SHOULD attempt to render the most appropriate badge thumbnail according to the number of badges chosen by the user and space available. Clients SHOULD attempt render the high-res version on user action (click, tap, hover).

Example of a Badge Definition event

{
  "pubkey": "alice",
  "kind": 30009,
  "tags": [
    ["d", "bravery"],
    ["name", "Medal of Bravery"],
    ["description", "Awarded to users demonstrating bravery"],
    ["image", "https://nostr.academy/awards/bravery.png", "1024x1024"],
    ["thumb", "https://nostr.academy/awards/bravery_256x256.png", "256x256"]
  ],
  // other fields...
}

Example of Badge Award event

{
  "id": "<badge award event id>",
  "kind": 8,
  "pubkey": "alice",
  "tags": [
    ["a", "30009:alice:bravery"],
    ["p", "bob", "wss://relay"],
    ["p", "charlie", "wss://relay"]
  ],
  // other fields...
}

Example of a Profile Badges event

Honorable Bob The Brave:

{
  "kind": 10008,
  "pubkey": "bob",
  "tags": [
    ["a", "30009:alice:bravery"],
    ["e", "<bravery badge award event id>", "wss://nostr.academy"],
    ["a", "30009:alice:honor"],
    ["e", "<honor badge award event id>", "wss://nostr.academy"]
  ],
  // other fields...
}

Deprecated Profile Badges event

An earlier version of this NIP used a kind 30008 addressable event with a d tag value of profile_badges for the Profile Badges event. Clients should treat these events as equivalent to kind 10008 and migrate to the new format.