# SIGit
## Flow
- Create Event
- Sign Event
- COMPLETE EVENT
---
sigit is made up of:
- pointers, notifications, components (events)
- files (encrypted blobs)
- all events are private (giftwrapped)
## Create Event Component - kind X1
Signer should display:
```
You are signing an Agreement template for the following npubs:
- npub1
- npub2
Ensure this event is sourced from a trusted SIGit instance.
```
- Signed by Creator
- NOT published by default
- fileData{}
- counterpartyData{}
- markData{}
This data is all stored inside the X1 blob
Verifications take place on all the elements in X2 (todo: list them)
---
## File pointer
Signer should say: "You are verifying that the following files exist:"
And list the full urls (blossom url + hash)
- signed by sender
- NOT PUBLISHED by default
- points to encrypted blossom blob (BB)
```json
{"content":"",
"kind": XX, --tbd
"tags"[
["filehash","$(hash)"],
["blossomUrls","url1","blossom2"], --optional
["engine": "SIGIT"]
]
}
```
---
## Encrypted Blob from XX
Contains:
- Create Event
- Files
- OTS?
## Creation flow
```mermaid
sequenceDiagram
autoNumber
actor u as Creator
participant s as SIGit Website
participant b as Blossom Server
participant r as Relay
u->>s: Signs NIP-98
AUTH event
Note over s: Prepare SIGit
pack (docs, marks,
counterparties)
u->>s: Signs
CREATE event
Note over s: ZIP and ENCRYPT
SIGit pack
s->>b: Upload to Blossom
u->>s: Signs POINTER event
Note over s: Gift wrap pointer
+ decryption key
s->>r:
DM each counterparty
```
## Sign flow
```mermaid
sequenceDiagram
autoNumber
actor u as Signer
participant s as SIGit Website
participant b as Blossom Server
participant r as Relay
u->>s: Signs NIP-98
AUTH event
r->>s: Fetch NIP-17 DMs
Note over s: Prepare SIGit
pack (docs, marks,
counterparties)
u->>s: Signs
CREATE event
Note over s: ZIP and ENCRYPT
SIGit pack
s->>b: Upload to Blossom
u->>s: Signs POINTER event
Note over s: Gift wrap pointer
+ decryption key
s->>r:
DM each counterparty
```