{"id":"25f96e769f81a4320dffb6f98f85d170fa167ecb9203c60831d97892ec701e86","pubkey":"c4f5e7a75a8ce3683d529cff06368439c529e5243c6b125ba68789198856cac7","created_at":1774441812,"kind":30817,"tags":[["d","attestations"],["title","Attestations"],["k","31871"],["k","31872"],["k","31873"],["k","11871"],["client","nostrhub.io"]],"content":"# Abstract\n\nNostr lacks a standardized, interoperable way to make, track, and revoke truthfulness claims about Nostr events.\n\nThis NIP introduces Attestations, which provides a base structure to:\n- **Make attestations** about that validity of *any other* event on Nostr of *any* kind;\n- **Revoke attestations** about previous validity claims.\n\n This base Attestation structure can *optionally* be extended to: \n- Manage simple attestation lifecycles;\n- Request attestations from other npubs; \n- Recommend individual attestation providers based on their proficiency in verifying given kinds;\n- Publish your verification proficiency for given kinds.\n\nAttestations enable a web of-trust for notes.\n\n---\n\n# Definitions\n## Base Definitions\n\n| Entity              | Definition                                                                        |\n| ------------------- | --------------------------------------------------------------------------------- |\n| `Assertor`          | Signer of the `Assertion Event`. Interchangeable with Attestee.                   |\n| `Attestor`          | Verifying party and signer of the`Attestation Event`.                             |\n| `Assertion Event`   | Event being attested to by the `Attestor`.                                        |\n| `Attestation Event` | Event published by the `Attestor` to signal attestation of the `Assertion Event`. |\n\n![Simple Entity Relationship Diagram](https://i.nostr.build/wNb0pexGXW0YI12t.png)\n\n```mermaid\nerDiagram\n    ATTESTOR ||--o{ ATTESTATION_EVENT : signs\n    ASSERTOR ||--o{ ASSERTION_EVENT : signs\n\t\n\tATTESTATION_EVENT ||--|| ASSERTION_EVENT : attests_to\n```\n\n---\n## Extended Definitions\n\n| Entity                                   | Definition                                                                                   |\n| ---------------------------------------- | -------------------------------------------------------------------------------------------- |\n| `Requestor`                              | Signer of the `Attestation Request Event`.                                                   |\n| `Reccomender`                            | Signer of the  `Attestation Recommendation Event`.                                           |\n| `Attestation Request Event`              | The request for an `Attestation Event` from an `Attestor`.                                   |\n| `Attestor Recommendation Event`          | The recommendation of a given `Attestor` for proficiency in the verification of given kinds. |\n| `Attestor Proficiency Declaration Event` | A declaration of proficiency from a given `Attestor` in the verification of given kinds.     |\n\n![Extended Entity Relationship Diagram](https://i.nostr.build/cA7t2bnkMnWbS6zl.png)\n\n```mermaid\nerDiagram\n    ATTESTOR o|--o{ ATTESTATION_EVENT : signs\n    ATTESTOR o|--|| ATTESTOR_PROFICIENCY_DECLARATION_EVENT : signs\n    ASSERTOR o|--o{ ASSERTION_EVENT : signs\n    ASSERTOR o|--o{ ATTESTATION_REQUEST_EVENT : signs\n\tREQUESTOR o|--o{ ATTESTATION_REQUEST_EVENT : signs\n\tRECOMMENDER o|--o{ ATTESTOR_RECOMMENDATION_EVENT : signs\n\t\n\tATTESTATION_EVENT ||--|| ASSERTION_EVENT : attests_to\n    ATTESTATION_REQUEST_EVENT ||--|| ASSERTION_EVENT : requests_attestation_of\n    ATTESTOR_RECOMMENDATION_EVENT ||--|| ATTESTOR: recommends\n    ATTESTOR_PROFICIENCY_DECLARATION_EVENT ||--|| ATTESTOR: declares_proficiency_of\n```\n\n---\n# Specification\n\n### Event Kinds\n\n| Kind    | Description                      | Type        |\n| ------- | -------------------------------- | ----------- |\n| `31871` | Attestation                      | Addressable |\n| `31872` | Attestation Request              | Addressable |\n| `31873` | Attestor Recommendation          | Addressable |\n| `11871` | Attestor Proficiency Declaration | Replaceable |\n\n---\n\n## Tags\n\n### Attestation Event (`31871`)\n\nEvent signed by the `Attestor`. The `Attestor` should only sign an `Attestation Event` after verifying the validity of the `Assertion Event` to a degree appropriate for its kind type.\n\n| Tag          | Description                                                                                                                                                                                                                                                                                            | Format                                                                                                           | Required    |\n| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | ----------- |\n| `d`          | Unique identifier for addressable attestation.                                                                                                                                                                                                                                            | `[\"d\", \"<npub>:my-claim-id\"]`                                                                                    | Yes         |\n| `e` / `a` | Specific `Assertion Event`. Exactly one of `e` or `a` **must** be present.                                                                                                                                                                                                                     | `[\"e\", \"<event-id>\"]` or `[\"a\", \"<kind>:<pubkey>:<d-tag>\"]` | Yes         |\n| `s`          | Marks an Attestation as being in only one of the following states: `verifying` - `valid` - `invalid` - `revoked`                                                                                                                                          | `[\"s\",\"verifying\" <> \"valid\" <> \"invalid\" <> \"revoked\"]`                                               | Yes    |\n| `valid_from` | Unix timestamp (seconds). The earliest time (inclusive) at which the attestation is valid from. Clients **should** interpret the absence of `valid_from` tag as having `validity`/`invalidity` from the `created_at` timestamp of the `Assertion Event`                                  | `[\"valid_from\",1671217411]`                                                                                      | Optional    |\n| `valid_to`   | UNIX timestamp (seconds). The latest time (inclusive) at which the attestation is valid from. Clients **should** interpret the absence of `valid_to` tag as having `validity`/`invalidity` in perpetuity.                                                                                | `[\"valid_from\",1671567643]`                                                                                      | Optional    |\n| `expiration` | UNIX timestamp (seconds). The time (inclusive) at which the `Attestation Event` will expire and be treated as such by relays in accordance to `NIP-40`. Clients **should** set this it be the same value as `valid_to` if there is no value in the `Attestation Event` being long-lived. | `[\"expiration\",1671567643]`                                                                                      | Optional    |\n| `request`    | `Attestation Request Event` that prompted this attestation.                                                                                                                                                                                                                                        | `[\"request\", \"31872:<requestor_pubkey>:<d-tag>\"]`                                                                | Optional    |\n\n`content` key should be used for optional human-readable description.\n\n---\n\n### Attestation Request (`31872`)\n\nEvent signed by the `Requestor` (usually the `Assertor`) requesting an `Attestation Event` from an `Attestor`.\n\n| Tag           | Description                                                                                                                                                           | Format                                                      | Required |\n| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | -------- |\n| `d`           | Unique identifier for addressable attestation request.                                                                                                                | `[\"d\", \"<requestor_pubkey>:my-request-id\"]`                 | Yes      |\n| `e`/`a`   | Specific `Assertion Event` Exactly one of `e` or `a` must be present.                                                                                          | `[\"e\", \"<event-id>\"]` or `[\"a\", \"<kind>:<pubkey>:<d-tag>\"]`. | Yes      |\n| `p`           | One or more requested `Attestators`. *Repeatable*.                                                                                                                                   | `[\"p\", \"<attestor_pubkey1>\"]`                                | No       |\n| `cashu_token` | A Cashu token locked to given spending conditions (HLTC, P2PK, etc.). Spending conditions *may* be locked to the observation of requested `Attestation Events`. | `[\"cashu_token\", \"<cashuBo...>\"]`                           | No       |\n\n---\n\n### Attestor Recommendation (`31873`)\n\nEvent signed by the `Recommender`.\n\nAllows any npub to recommend an `Attestor` for verification proficiency in one or more event kinds. \n\n| Tag    | Description                                                      | Format                                           | Required |\n| ------ | ---------------------------------------------------------------- | ------------------------------------------------ | -------- |\n| `d`    | Unique identifier for the recommendation. | `[\"d\", \"<attestor_pubkey>:<recommendationid>`                       | Yes      |\n| `p`           | Pubkey of recommended `Attestator`. | `[\"p\", \"<attestor_pubkey>\"]`\n| `k`    | One or more event kinds the attestor is recommended for verifying.  *Repeatable*.         | `[\"k\", \"<kind1>\"]`                    | Yes      |\n\n`content` key should be used for optional human-readable description.\n\n---\n\n### Attestor Proficiency Declaration (`11871`)\n\nEvent signed by the `Attestor`.\n\nEnables an attestor to publicly declare which event kinds they are proficient in verifying; facilitating discovery of suitable attestors for specific verification needs.\n\n| Tag    | Description                                                       | Format                                       | Required |\n| ------ | ----------------------------------------------------------------- | -------------------------------------------- | -------- |\n| `k`    | One or more event kinds the attestor claims verification proficiency in.  *Repeatable*.        | `[\"k\", \"<kind>,\"]`                            | Yes      |\n\n`content` key should be used for optional human-readable description.\n\n---\n\n# Worked Examples\n\n## 1. Attestation Request\n\n```\n{\n  \"kind\": 31872,\n  \"tags\": [\n\t[\"d\", \"npub1requestor...:my-request-id\"],\n    [\"a\", 12345:npub1...:central-park-saftey-assertation\"],\n    [\"p\", \"npub1attestor1...\"]\n    [\"p\", \"npub1attestor2...\"]\n  ],\n  \"content\": \"Verify safety status for Central Park\"\n}\n```\n\n## 2. Attestation\n\n```\n{\n  \"kind\": 31871,\n  \"tags\": [\n    [\"d\", \"npub:safety-verification-2025\"],\n    [\"a\", \"12345:npub1...:central-park-saftey-assertation\"],\n    [\"s\", \"valid\"],\n    [\"valid_from\", \"1760227200\"], // Sept 12, 2025 @ 00:00 UTC\n    [\"valid_to\",   \"1760486400\"],  // Sept 15, 2025 @ 00:00 UTC\n    [\"request\", \"request-event-id-123\"]\n  ],\n  \"content\": \"Safety inspection valid\"\n}\n```\n\n## 3. Revocation\n\n```\n{\n  \"kind\": 31871,\n  \"tags\": [\n    [\"d\", \"npub:safety-verification-2025\"],\n    [\"s\", \"revoked\"]\n  ],\n  \"content\": \"Retracted due to new safety concerns\"\n}\n```\n\n---\n# Related NIPs\n\n## NIP-03 - OpenTimeStamps Attestations\n\nAn `Attestor`, `Assertor` or any other npub may choose to issue a `kind:1040` `OpenTimestamps Attestations for Events` event to anchor the `Attestation Event` to a given blockheight on the Bitcoin timechain.\n\n## NIP-58 - Badges\n\nAn `Attestor` or any other npub may choose to issue a badge for a given `Attestation` should they wish.","sig":"d2fdea2dcba3e5072996e8cd5326760a83704bbd212f324e172fb712512e1cea9fddf7d250693b8c526156087197aa09f24e982c1604cac2e5a16a59a92cc3c9"}