49 lines
1.1 KiB
Markdown
49 lines
1.1 KiB
Markdown
# Signup Flow
|
|
|
|
We need a flow that avoids any copy pasting of nsecs, and allows regular key rotation. The principle then is that all system nsecs are generated locally, and never leave the device.
|
|
|
|
## Kind Numbers
|
|
|
|
Kind numbers are all based on a "2029" root, which is the [BIP-39 word for "work"](https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt#L2029).
|
|
|
|
|Kind|Name|Type|Comments|
|
|
|---|---|---|---|
|
|
|2029|POST Client|Gift-Wrapped|Register a POW client|
|
|
|
|
|
|
## SuperAdmin Signup flow:
|
|
|
|
```mermaid
|
|
sequenceDiagram
|
|
autoNumber
|
|
participant d as POW Server
|
|
|
|
participant e as Electron App
|
|
actor u as SuperAdmin
|
|
|
|
Note over d: DVM initiated <br>with relays &<br>Admin Npubs
|
|
Note over d: DVM nProfile<br>logged to console
|
|
e->>u: Download App
|
|
u->>e: Sign in
|
|
Note over e: Client npub <br>created
|
|
u->>e: "Add Org"
|
|
u->>e: Paste DVM<br> nProfile
|
|
u->>e: Sign 21120 <br> AUTH
|
|
e->>d: POST CLIENT
|
|
Note over d: Validate event<br>& update DB<br>with Client info
|
|
d->>e: Job Response
|
|
|
|
Note over e: Client registered
|
|
|
|
Note over e: Additional 21120's <br> signed by client
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|