{"id":"b035a69ad27112d42f7d4165d8a555b7243194b58c9fba51d1f62cd3ca32ff6e","pubkey":"2b39b4ffe62933df970e19366c22c1e092f953f83fcfed754e0f04d5a3b459f9","created_at":1781353189,"kind":30817,"tags":[["d","nip-22"],["title","NIP-22: Comment"],["summary","Kind 1111, the comment: a reply scoped to a root event or to an external identifier, with uppercase tags for the root and lowercase ones for the parent."],["s","draft"],["t","nostr"],["t","nip"],["k","1111","Comment"],["alt","A specification: NIP-22: Comment"],["client","openspecs-import"],["published_at","1658505007"],["proxy","https://github.com/nostr-protocol/nips/blob/656cecc7c0a815b6a2b218d3b5d6f078b3f4dbab/22.md","web"],["x","4f0581ae285dd569b67754415264e93d120d73c63dd012025e31d273dd88b817"]],"content":"NIP-22\n======\n\nComment\n-------\n\n`draft` `optional`\n\nA comment is a threading note always scoped to a root event or an [`I`-tag](nostr:naddr1qvzqqqrcvypzq2eeknl7v2fnm7tsuxfkds3vrcyjl9fls070a465urcy6k3mgk0eqqrxu6ts95mnxm8dm4t).\n\nIt uses `kind:1111` with plaintext `.content` (no HTML, Markdown, or other formatting).\n\nComments MUST point to the root scope using uppercase tag names (e.g. `K`, `E`, `A` or `I`)\nand MUST point to the parent item with lowercase ones (e.g. `k`, `e`, `a` or `i`).\n\nComments MUST point to the authors when one is available (i.e. tagging a nostr event). `P` for the root scope\nand `p` for the author of the parent item.\n\n```yaml\n{\n  \"kind\": 1111,\n  \"content\": \"<comment>\",\n  \"tags\": [\n    // root scope: event addresses, event ids, or I-tags.\n    [\"<A, E, I>\", \"<address, id or I-value>\", \"<relay or web page hint>\", \"<root event's pubkey, if an E tag>\"],\n    // the root item kind\n    [\"K\", \"<root kind>\"],\n\n    // pubkey of the author of the root scope event\n    [\"P\", \"<root-pubkey>\", \"relay-url-hint\"],\n\n    // parent item: event addresses, event ids, or i-tags.\n    [\"<a, e, i>\", \"<address, id or i-value>\", \"<relay or web page hint>\", \"<parent event's pubkey, if an e tag>\"],\n    // parent item kind\n    [\"k\", \"<parent comment kind>\"],\n\n    // parent item pubkey\n    [\"p\", \"<parent-pubkey>\", \"relay-url-hint\"]\n  ]\n  // other fields\n}\n```\n\nTags `K` and `k` MUST be present to define the event kind of the root and the parent items.\n\n`I` and `i` tags create scopes for hashtags, geohashes, URLs, and other external identifiers.\n\nThe possible values for `i` tags – and `k` tags, when related to an external identity – are listed on [NIP-73](nostr:naddr1qvzqqqrcvypzq2eeknl7v2fnm7tsuxfkds3vrcyjl9fls070a465urcy6k3mgk0eqqrxu6ts95mnxm8dm4t).\nTheir uppercase versions use the same type of values but relate to the root item instead of the parent one.\n\n`q` tags MAY be used when citing events in the `.content` with [NIP-21](nostr:naddr1qvzqqqrcvypzq2eeknl7v2fnm7tsuxfkds3vrcyjl9fls070a465urcy6k3mgk0eqqrxu6ts95erzkumy4n).\n\n```json\n[\"q\", \"<event-id> or <event-address>\", \"<relay-url>\", \"<pubkey-if-a-regular-event>\"]\n```\n\n`p` tags SHOULD be used when mentioning pubkeys in the `.content` with [NIP-21](nostr:naddr1qvzqqqrcvypzq2eeknl7v2fnm7tsuxfkds3vrcyjl9fls070a465urcy6k3mgk0eqqrxu6ts95erzkumy4n).\n\nComments MUST NOT be used to reply to kind 1 notes. [NIP-10](nostr:naddr1qvzqqqrcvypzq2eeknl7v2fnm7tsuxfkds3vrcyjl9fls070a465urcy6k3mgk0eqqrxu6ts95cnqpw4wta) should instead be followed.\n\n## Examples\n\nA comment on a blog post looks like this:\n\n```yaml\n{\n  \"kind\": 1111,\n  \"content\": \"Great blog post!\",\n  \"tags\": [\n    // top-level comments scope to event addresses or ids\n    [\"A\", \"30023:3c9849383bdea883b0bd16fece1ed36d37e37cdde3ce43b17ea4e9192ec11289:f9347ca7\", \"wss://example.relay\"],\n    // the root kind\n    [\"K\", \"30023\"],\n    // author of root event\n    [\"P\", \"3c9849383bdea883b0bd16fece1ed36d37e37cdde3ce43b17ea4e9192ec11289\", \"wss://example.relay\"]\n\n    // the parent event address (same as root for top-level comments)\n    [\"a\", \"30023:3c9849383bdea883b0bd16fece1ed36d37e37cdde3ce43b17ea4e9192ec11289:f9347ca7\", \"wss://example.relay\"],\n    // when the parent event is replaceable or addressable, also include an `e` tag referencing its id\n    [\"e\", \"5b4fc7fed15672fefe65d2426f67197b71ccc82aa0cc8a9e94f683eb78e07651\", \"wss://example.relay\"],\n    // the parent event kind\n    [\"k\", \"30023\"],\n    // author of the parent event\n    [\"p\", \"3c9849383bdea883b0bd16fece1ed36d37e37cdde3ce43b17ea4e9192ec11289\", \"wss://example.relay\"]\n  ]\n  // other fields\n}\n```\n\nA comment on a [NIP-94](nostr:naddr1qvzqqqrcvypzq2eeknl7v2fnm7tsuxfkds3vrcyjl9fls070a465urcy6k3mgk0eqqrxu6ts95unghjuv2m) file looks like this:\n\n```yaml\n{\n  \"kind\": 1111,\n  \"content\": \"Great file!\",\n  \"tags\": [\n    // top-level comments have the same scope and reply to addresses or ids\n    [\"E\", \"768ac8720cdeb59227cf95e98b66560ef03d8bc9a90d721779e76e68fb42f5e6\", \"wss://example.relay\", \"3721e07b079525289877c366ccab47112bdff3d1b44758ca333feb2dbbbbe5bb\"],\n    // the root kind\n    [\"K\", \"1063\"],\n    // author of the root event\n    [\"P\", \"3721e07b079525289877c366ccab47112bdff3d1b44758ca333feb2dbbbbe5bb\"],\n\n    // the parent event id (same as root for top-level comments)\n    [\"e\", \"768ac8720cdeb59227cf95e98b66560ef03d8bc9a90d721779e76e68fb42f5e6\", \"wss://example.relay\", \"3721e07b079525289877c366ccab47112bdff3d1b44758ca333feb2dbbbbe5bb\"],\n    // the parent kind\n    [\"k\", \"1063\"],\n    [\"p\", \"3721e07b079525289877c366ccab47112bdff3d1b44758ca333feb2dbbbbe5bb\"]\n  ]\n  // other fields\n}\n```\n\nA reply to a comment looks like this:\n\n```yaml\n{\n  \"kind\": 1111,\n  \"content\": \"This is a reply to \\\"Great file!\\\"\",\n  \"tags\": [\n    // nip-94 file event id\n    [\"E\", \"768ac8720cdeb59227cf95e98b66560ef03d8bc9a90d721779e76e68fb42f5e6\", \"wss://example.relay\", \"fd913cd6fa9edb8405750cd02a8bbe16e158b8676c0e69fdc27436cc4a54cc9a\"],\n    // the root kind\n    [\"K\", \"1063\"],\n    [\"P\", \"fd913cd6fa9edb8405750cd02a8bbe16e158b8676c0e69fdc27436cc4a54cc9a\"],\n\n    // the parent event\n    [\"e\", \"5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36\", \"wss://example.relay\", \"93ef2ebaaf9554661f33e79949007900bbc535d239a4c801c33a4d67d3e7f546\"],\n    // the parent kind\n    [\"k\", \"1111\"],\n    [\"p\", \"93ef2ebaaf9554661f33e79949007900bbc535d239a4c801c33a4d67d3e7f546\"]\n  ]\n  // other fields\n}\n```\n\nA comment on a website's url looks like this:\n\n```yaml\n{\n  \"kind\": 1111,\n  \"content\": \"Nice article!\",\n  \"tags\": [\n    // referencing the root url\n    [\"I\", \"https://abc.com/articles/1\"],\n    // the root \"kind\": for an url\n    [\"K\", \"web\"],\n\n    // the parent reference (same as root for top-level comments)\n    [\"i\", \"https://abc.com/articles/1\"],\n    // the parent \"kind\": for an url\n    [\"k\", \"web\"]\n  ]\n  // other fields\n}\n```\n\nA podcast comment example:\n\n```yaml\n{\n  \"id\": \"80c48d992a38f9c445b943a9c9f1010b396676013443765750431a9004bdac05\",\n  \"pubkey\": \"252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111\",\n  \"kind\": 1111,\n  \"content\": \"This was a great episode!\",\n  \"tags\": [\n    // podcast episode reference\n    [\"I\", \"podcast:item:guid:d98d189b-dc7b-45b1-8720-d4b98690f31f\", \"https://fountain.fm/episode/z1y9TMQRuqXl2awyrQxg\"],\n    // podcast episode type\n    [\"K\", \"podcast:item:guid\"],\n\n    // same value as \"I\" tag above, because it is a top-level comment (not a reply to a comment)\n    [\"i\", \"podcast:item:guid:d98d189b-dc7b-45b1-8720-d4b98690f31f\", \"https://fountain.fm/episode/z1y9TMQRuqXl2awyrQxg\"],\n    [\"k\", \"podcast:item:guid\"]\n  ]\n  // other fields\n}\n```\n\nA reply to a podcast comment:\n\n```yaml\n{\n  \"kind\": 1111,\n  \"content\": \"I'm replying to the above comment.\",\n  \"tags\": [\n    // podcast episode reference\n    [\"I\", \"podcast:item:guid:d98d189b-dc7b-45b1-8720-d4b98690f31f\", \"https://fountain.fm/episode/z1y9TMQRuqXl2awyrQxg\"],\n    // podcast episode type\n    [\"K\", \"podcast:item:guid\"],\n\n    // this is a reference to the above comment\n    [\"e\", \"80c48d992a38f9c445b943a9c9f1010b396676013443765750431a9004bdac05\", \"wss://example.relay\", \"252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111\"],\n    // the parent comment kind\n    [\"k\", \"1111\"],\n    [\"p\", \"252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111\"]\n  ]\n  // other fields\n}\n```\n","sig":"55c9dd0c73deddd5303173d05405e6e46ca11ea0f68f4cfccd364e5937c31fcbd60ec8a3d4035133ff167d3d516e1fe61fba27ff5b8037a99b3504dfcd8a832c"}