Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand NIP 03 to include relay and user notaries #1737

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions 03.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
NIP-03
======

OpenTimestamps Attestations for Events
--------------------------------------
Timestamp Attestations for Events
---------------------------------

`draft` `optional`

This NIP defines an event with `kind:1040` that can contain an [OpenTimestamps](https://opentimestamps.org/) proof for any other event:
This NIP defines strategies for establishing when an event was first found on the nostr network:

- [OpenTimestamps](#opentimestamps)
- [Attestation Event](#attestation-event)

# OpenTimestamps

An event with `kind:1040` contains an [OpenTimestamps](https://opentimestamps.org/) proof for any event:

```json
{
Expand All @@ -22,7 +29,7 @@ This NIP defines an event with `kind:1040` that can contain an [OpenTimestamps](
- The OpenTimestamps proof MUST prove the referenced `e` event id as its digest.
- The `content` MUST be the full content of an `.ots` file containing at least one Bitcoin attestation. This file SHOULD contain a **single** Bitcoin attestation (as not more than one valid attestation is necessary and less bytes is better than more) and no reference to "pending" attestations since they are useless in this context.

### Example OpenTimestamps proof verification flow
## Example OpenTimestamps proof verification flow

Using [`nak`](https://github.com/fiatjaf/nak), [`jq`](https://jqlang.github.io/jq/) and [`ots`](https://github.com/fiatjaf/ots):

Expand All @@ -32,3 +39,28 @@ Using [`nak`](https://github.com/fiatjaf/nak), [`jq`](https://jqlang.github.io/j
- sequence ending on block 810391 is valid
timestamp validated at block [810391]
```

# Attestation Event

Users MAY verify when they first saw an event by publishing a `kind:4341` event.

- One or more `e` tags MUST be included indicating event ids and timestamps. Event addresses MUST NOT be used.
staab marked this conversation as resolved.
Show resolved Hide resolved
- One or more `k` tags SHOULD be included indicating the kind(s) of the event(s) being referred to.
- The `content` field MAY provide any human-readable explanation of the event.

```jsonc
{
"kind": 4341,
"content": "I vaguely remember hearing about this note last year",
"created_at": 1738617405,
"tags": [
["alt", "A timestamp attestation event"],
["e", "<event-id>", "<relay-url>", "<author-pubkey>"],
["k", "10002"]
]
}
```

Note that user-provided attestations provide a weaker guarantee than OTS proofs. Depending on the importance of the verification, multiple users with a good reputation should be consulted in order to determine a reasonable result.

Relays MAY also provide these attestations by generating and signing them on the fly using the `self` pubkey listed in the relay's [NIP 11](./11.md) document.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `2003` | Torrent | [35](35.md) |
| `2004` | Torrent Comment | [35](35.md) |
| `2022` | Coinjoin Pool | [joinstr][joinstr] |
| `4341` | Timestamp Attestation | [03](03.md) |
| `4550` | Community Post Approval | [72](72.md) |
| `5000`-`5999` | Job Request | [90](90.md) |
| `6000`-`6999` | Job Result | [90](90.md) |
Expand Down