nips/03.md
fiatjaf_ 09ffb951c6
rework NIP-03 so it is actually usable (#804)
* rework nip-03 to be actually useful and usable.
* fixes.
* add ots verification flow.
2023-10-11 10:17:43 -03:00

1.4 KiB

NIP-03

OpenTimestamps Attestations for Events

draft optional author:fiatjaf author:constant

This NIP defines an event with kind:1040 that can contain an OpenTimestamps proof for any other event:

{
  "kind": 1040
  "tags": [
    ["e", <event-id>, <relay-url>],
    ["block", <block-height-as-string>, <block-hash>],
    ["alt", "opentimestamps attestation"]
  ],
  "content": <base64-encoded OTS file data>
}
  • The OpenTimestamps proof MUST prove the referenced e event id as its digest.
  • The block tag is optional, it exists to establish a minimum date since which the given event has existed.
  • 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 and no reference to "pending" attestations since they are useless in this context.

Example OpenTimestamps proof verification flow

Using nak, jq and ots:

~> nak req -i e71c6ea722987debdb60f81f9ea4f604b5ac0664120dd64fb9d23abc4ec7c323 wss://nostr-pub.wellorder.net | jq -r .content | ots verify
> using an esplora server at https://blockstream.info/api
- sequence ending on block 810391 is valid
timestamp validated at block [810391]