{"id":"1c7e47043406aca3521807c512f69be3e1cb50ea2c6a09f38a9085b996d4e2eb","pubkey":"97539d204444cec9f454b79e865b9894806ddb52dcb9ee6407c1374d7222ce08","created_at":1787325241,"kind":30817,"tags":[["d","testimony"],["title","Testimony"],["alt","Nostr Implementation Possibility: Testimony"],["k","31675","Testimony"],["client","NostrHub"]],"content":"# Testimony\n\n`draft` `optional`\n\nA testimony is one person's written opinion about another person.\n\n## Event\n\nKind `31675`, addressable.\n\n```json\n{\n  \"kind\": 31675,\n  \"tags\": [\n    [\"d\", \"<subject pubkey, 64 lowercase hex>\"],\n    [\"p\", \"<same pubkey>\"]\n  ],\n  \"content\": \"She flagged the data-loss bug nobody else wanted to look at, three weeks before it would have bitten us. I would work with her again without hesitating.\"\n}\n```\n\n- `d` — the subject. Exactly one, always the raw 64-char lowercase-hex pubkey, never an `npub`.\n- `p` — the same pubkey, so the testimony routes to the subject's inbox relays (NIP-65) and\n  shows up in normal `#p` tooling. A relay hint MAY be added as the second value.\n- `content` — free-form plain text. **This NIP says nothing about what a testimony may say.**\n  Social convention decides that.\n\nNothing else. No rating, no score, no label, no relationship field, no expiration.\n\nBecause the address is `31675:<author>:<subject>`, an author has **one testimony per person**.\nWriting another one about the same person replaces it. Writing about someone else is a\ndifferent address, so there is no limit on how many people you may write about.\n\n## Rules\n\nAuthors:\n\n- MUST NOT write a testimony about themselves (`d` equal to their own pubkey). That is `kind:0`.\n- Revise by republishing at the same address.\n- Retract by republishing at the same address with empty `content` and a **strictly greater**\n  `created_at`. (Equal timestamps are resolved by lowest event id, so a same-second retraction\n  loses about half the time.)\n\nClients:\n\n- MUST ignore any `31675` event that does not have exactly one `d` tag, whose `d` is not 64\n  lowercase hex, whose first `p` value differs from `d`, or whose `d` equals its own `pubkey`.\n  This validation is what enforces one-per-pair — relays do not. An event carrying a second\n  `d` tag gets its own address but still matches a `#d` query, so an unvalidating client can\n  be flooded.\n- MUST discover testimonies about a person with `#d`, never with `#p`. `#p` is for routing and\n  notifications only, and is unconstrained.\n- MUST fold results by `(kind, pubkey, d)` keeping the highest `created_at`. Relays serve stale\n  versions.\n- MUST treat empty `content` as retracted and not render it.\n- SHOULD scope the default view of testimonies about a person to the reader's own social graph\n  rather than showing every one that exists.\n- SHOULD NOT derive a count, average or score from testimonies.\n\nRelays need no changes to store and serve testimonies. They MAY validate the rules above at\ningest, and MAY refuse the kind entirely.\n\n## Queries\n\n```jsonc\n{\"kinds\":[31675],\"#d\":[\"<subject>\"]}                      // about a person\n{\"kinds\":[31675],\"authors\":[\"<author>\"]}                  // written by a person\n{\"kinds\":[31675],\"authors\":[\"<me>\"],\"#d\":[\"<subject>\"]}   // have I already written one?\n```\n\n## Notes\n\nA subject cannot suppress a testimony about themself, only decline to endorse it. Relays that\nhonour NIP-62 (Request to Vanish) SHOULD also drop `31675` events whose `d` is the vanishing\npubkey — otherwise erasure removes a person's own history and leaves what others wrote standing.\n\nReplacing in place means there is no record of earlier versions. A testimony is a current\nstanding statement, not a historical one.\n\n## Prior art\n\n- **NIP-87** kind `38000` is this exact shape — addressable, `d` = the subject's pubkey, free\n  prose, no rating, no consent gate — applied to mints. This applies it to people.\n- **NIP-56** kind `1984` is the only merged kind where one person writes prose about another's\n  pubkey. Testimony is that with the sign flipped and the taxonomy removed.\n- **PR #2198** (kind `63`) proposes testimonials as a regular, recipient-approved event.\n  This is the opposite trade: public, unilateral, and capped at one per pair.","sig":"9b7321667bb07a95f5f5fe12cc8f1f9042e6feb34c457d7b633d03f38ffd7f38fe3825d1864c091021b5457d7a40673d32e47149fb33d53cc48d0796a4c2ec60"}