docs.sigit.io/sign.md
_ ce92669bc3
All checks were successful
Release to Production / build_and_release (push) Successful in 29s
fix: sign flow
2025-03-07 15:17:11 +00:00

1.3 KiB

Sign

SIGits can be signed in any order.

Nostr Event

This event is designed to provide clarity (when signing) about the agreement being created. It is NOT published to a relay - instead, it is saved in an encrypted zip.

{ 
  "kind": 1603,
  "content": "You are signing an Agreement Template for the following npubs:\n- npub1\n- npub2\n\nEnsure this event is sourced from a trusted SIGit instance.",
  "created_at": 1716564780,
  "id": "...",
  "sig": "...",
  "pubkey": "pubkey of SIGNER",
  "tags":[
    ["prevsig","xxx"], // sig of kind 160300 (create) event
    ["meta","hash1"] // the hash of the meta.json file
  ]
}

Encrypted Zip File

This file contains the following:

  • "marked" folder (offline only) - containing marked pdfs
  • "files" folder (offline only) - containing original pdfs
  • "events" folder:
    • sign Event (1603)
    • create event (160300), for verification
    • OTS request event
    • OTS response event(s)
  • meta.json file - contains the marks information

Keys

The keys.json looks like this:

{ 
  "kind": 160301,
  "content": "",
  "created_at": 1716564780,
  "id": "...",
  "sig": "",  
  "pubkey": "random pubkey",
  "tags":[
    ["filehash",<optional list of blossom servers>],
    ["array of decryption keys", "encrypted to each recipient"]
  ]
}