{"id":"ce6a0a0531cf106502d2ffb9f69bde21073756cd80d41fa7e651aea3de521bc9","pubkey":"2b39b4ffe62933df970e19366c22c1e092f953f83fcfed754e0f04d5a3b459f9","created_at":1774889933,"kind":30817,"tags":[["d","nip-30"],["title","NIP-30: Custom Emoji"],["summary","The emoji tag, which maps a shortcode written in the content to an image URL."],["s","draft"],["t","nostr"],["t","nip"],["alt","A specification: NIP-30: Custom Emoji"],["client","openspecs-import"],["published_at","1680115391"],["proxy","https://github.com/nostr-protocol/nips/blob/656cecc7c0a815b6a2b218d3b5d6f078b3f4dbab/30.md","web"],["x","e06ad67951aa0772891f417a2a4344ff9eaa8e513a1c283f29b5fbe3e74c645e"]],"content":"NIP-30\n======\n\nCustom Emoji\n------------\n\n`draft` `optional`\n\nCustom emoji may be added to **kind 0**, **kind 1**, **kind 7** ([NIP-25](nostr:naddr1qvzqqqrcvypzq2eeknl7v2fnm7tsuxfkds3vrcyjl9fls070a465urcy6k3mgk0eqqrxu6ts95er2gglgtw)) and **kind 30315** ([NIP-38](nostr:naddr1qvzqqqrcvypzq2eeknl7v2fnm7tsuxfkds3vrcyjl9fls070a465urcy6k3mgk0eqqrxu6ts95enskd5p8k)) events by including one or more `\"emoji\"` tags, in the form:\n\n```\n[\"emoji\", <shortcode>, <image-url>, <emoji-set-address>]\n```\n\nWhere:\n\n- `<shortcode>` is a name given for the emoji, which MUST be comprised of only alphanumeric characters, hyphens, and underscores.\n- `<image-url>` is a URL to the corresponding image file of the emoji.\n- `<emoji-set-address>` is an optional address pointer (`kind:pubkey:d-tag`) to the kind 30030 emoji set ([NIP-51](nostr:naddr1qvzqqqrcvypzq2eeknl7v2fnm7tsuxfkds3vrcyjl9fls070a465urcy6k3mgk0eqqrxu6ts956nzk0x2rf)) the emoji belongs to.\n\nFor each emoji tag, clients should parse emoji shortcodes (aka \"emojify\") like `:shortcode:` in the event to display custom emoji.\n\nClients may allow users to add custom emoji to an event by including `:shortcode:` identifier in the event, and adding the relevant `\"emoji\"` tags.\n\n### Kind 0 events\n\nIn kind 0 events, the `name` and `about` fields should be emojified.\n\n```json\n{\n  \"kind\": 0,\n  \"content\": \"{\\\"name\\\":\\\"Alex Gleason :soapbox:\\\"}\",\n  \"tags\": [\n    [\"emoji\", \"soapbox\", \"https://gleasonator.com/emoji/Gleasonator/soapbox.png\"]\n  ],\n  \"pubkey\": \"79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6\",\n  \"created_at\": 1682790000\n}\n```\n\n### Kind 1 events\n\nIn kind 1 events, the `content` should be emojified.\n\n```json\n{\n  \"kind\": 1,\n  \"content\": \"Hello :gleasonator: 😂 :ablobcatrainbow: :disputed: yolo\",\n    \"tags\": [\n    [\"emoji\", \"ablobcatrainbow\", \"https://gleasonator.com/emoji/blobcat/ablobcatrainbow.png\", \"30030:79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6:blobcats\"],\n    [\"emoji\", \"disputed\", \"https://gleasonator.com/emoji/Fun/disputed.png\"],\n    [\"emoji\", \"gleasonator\", \"https://gleasonator.com/emoji/Gleasonator/gleasonator.png\"]\n  ],\n  \"pubkey\": \"79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6\",\n  \"created_at\": 1682630000\n}\n```\n\n### Kind 7 events\n\nIn kind 7 events, the `content` should be emojified.\n\n```json\n{\n  \"kind\": 7,\n  \"content\": \":dezh:\",\n  \"tags\": [\n    [\"emoji\", \"dezh\", \"https://raw.githubusercontent.com/dezh-tech/brand-assets/main/dezh/logo/black-normal.svg\"]\n  ],\n  \"pubkey\": \"79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6\",\n  \"created_at\": 1682630000\n}\n```\n","sig":"7a754ff0a4dda7292f9dac4ac59408f1127b706c18fb8cb85138a824368ef7490d42262facbc2abcbd5ea4cd22cae81c88273c01478f9d5500ece34c872288a6"}