# Create ## 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. ```json { "kind": 160300, "content": "You are creating an Agreement between 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 CREATOR", "tags":[ ["signers","npub1d0csynr..","npub1nqulz.."], ["viewers","npub1viewer1"], // optional tag, only if there are viewers ["files","hash1:name1.csv","hash2:name2.pdf"], // extension determines the file type. Order determines index. ["meta","hash1"] // the hash of the meta.json file ] } ``` ## Encrypted Zip File This file contains the following: - "files" folder - the unmarked files, using original filenames (to make them easy to open) - "events" folder - contains the create Event and OTS request event - meta.json file - contains the marks information ## Keys The keys.json looks like this: ```json { "kind": 160301, "content": "", "created_at": 1716564780, "id": "...", "sig": "", "pubkey": "random pubkey", "tags":[ ["filehash",], ["array of decryption keys", "encrypted to each recipient"] ] } ``` ## Online Communication Once the zip file is created, encrypted, and uploaded to the blossom server(s) - the decryption key and file location(s) must be sent to each counterparty. This is done using a regular NIP-17 Chat Message. The rumor would be the same for all recipients: ```json { "id": "",   "pubkey": "", "created_at": "",   "kind": 14,   "tags": [     ["p", "", ""],     ["p", "", ""],     ["e", "", "", "reply"] // if this is a reply ["subject", ""],     // by including tags from the kind 160301 we avoid an additional lookup in SIGit ["filehash",], ["array of decryption keys", "encrypted to each recipient"]   ],   "content": "A new SIGit has been created - please visit your preferred instance or click https://sigit.io/find/$(idOfKind160301)", } ``` ## Online Flow * Create & sign kind 160300 * Zip this along with files and meta.json * Push zip to blossom * Publish kind 160301 with decryption keys * Send DM with link to above (manual flow) and keys (automatic flow) ```mermaid sequenceDiagram autoNumber actor u as Creator participant b as browser participant r as Relay participant bl as Blossom u->>b: Upload files u->>b: Define marks &
counterparties u->>b: Sign Kind 160300 Note over b: 160300 + files
+ meta.json
= encrypted zip b->>bl: Upload encrypted zip Note over b: Create kind 160301 event
with ephemeral key b->>r: publish 160301
to relay Note over b: Create NIP-17 DM
with link to SIGit
& 160301 npub u->>b: Sign NIP-17
notification / DM
for each receiver b->>r: send DM to
each counterparty ``` ## Offline Communication For offline, the encrypted zip PLUS the Kind 160301 are zipped together and downloaded. ```mermaid sequenceDiagram autoNumber actor u as Creator participant b as browser u->>b: Upload files u->>b: Define marks &
counterparties u->>b: Sign Kind 160300 Note over b: Encrypted Zip =
Kind 160300
+ files
+ meta.json Note over b: Kind 160301 =
decryption key
+ location Note over b: Final Zip =
Encrypted Zip
+ Kind 160301 b->>u: Download Zip ```