Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @startuml
- actor USER as "Investor"
- participant UI as "portal-ui"
- participant BJS as "bitgojs"
- participant API as "portal-api"
- participant WWW as "bitgo-express"
- USER -[#blue]> UI: <b>Set up wallet
- UI -> USER: Passphrase Entry
- USER -> USER: Enters passphrase x 2
- USER -[#blue]> UI: <b>Continue
- UI -> USER: Generate Your Keycard
- USER -[#blue]> UI: <b>Generate Keys
- == Key Generation ==
- UI -> BJS: Create user keychain
- BJS -> UI: User keychain
- note over UI
- {
- pub: "xpub123...",
- prv: "xprv456..."
- }
- end note
- UI -> BJS: Encrypt user prv
- BJS -> UI
- note over UI
- userKey.encryptedPrv = bitgo.encrypt({
- input: userKey.prv,
- password: passphrase
- })
- end note
- UI -> BJS: Create backup keychain
- BJS -> UI: Backup keychain
- note over UI
- {
- pub: "xpub789...",
- prv: "xprv001..."
- }
- end note
- UI -> BJS: Encrypt backup prv
- BJS -> UI
- note over UI
- backupKey.encryptedPrv = bitgo.encrypt({
- input: backupKey.prv,
- password: passphrase
- })
- end note
- == Keycard Creation ==
- UI -> UI: Generate Keycard
- note over UI
- {
- jsPDF,
- QRCode,
- userKeychain: {
- pub: "xpub123...",
- encryptedPrv: "..."
- },
- backupKeychain: {
- pub: "xpub789...",
- encryptedPrv: "..."
- },
- activationCode: 123456
- }
- end note
- UI -> USER: Save Keycard
- == Activate Keycard ==
- USER -> UI: Enter activation code\nfrom keycard
- USER -[#blue]> UI: <b>Continue
- UI -> UI: Confirm activation code
- UI -> USER: Complete Set Up
- USER -> UI: Ticks checkbox
- USER -[#blue]> UI: <b>Complete Set Up
- == BitGo Keychain Creation ==
- UI -> API: Create wallet
- note over API
- {
- userKey: {
- pub: "xpub123...",
- encryptedPrv: "..."
- },
- backupKey: {
- pub: "xpub789...",
- encryptedPrv: "..."
- }
- }
- end note
- API -> WWW: POST /api/v2/eth/key
- note right #ffaaff: Create User Keychain
- note over WWW
- {
- pub: "xpub123...",
- encryptedPrv: "...",
- enterprise: "42de..."
- }
- end note
- WWW -> API: 200 SUCCESS
- note over API
- {
- id: "54ab...",
- pub: "xpub123..."
- }
- end note
- API -> WWW: POST /api/v2/eth/key
- note right #ffaaff: Create Backup Keychain
- note over WWW
- {
- pub: "xpub789...",
- encryptedPrv: "...",
- enterprise: "42de..."
- source: "backup"
- }
- end note
- WWW -> API: 200 SUCCESS
- note over API
- {
- id: "884f...",
- pub: "xpub789..."
- }
- end note
- API -> WWW: POST /api/v2/eth/key
- note right #ffaaff: Create BitGo Keychain
- note over WWW
- {
- enterprise: "42de..."
- source: "bitgo"
- }
- end note
- WWW -> API: 200 SUCCESS
- note over API
- {
- id: "cd9a...",
- pub: "xpub83b..."
- }
- end note
- == BitGo Wallet Creation ==
- API -> WWW: POST /api/v2/eth/wallet
- note over WWW
- {
- label: "Harbor wallet",
- m: 2,
- n: 3,
- keys: [
- "54ab...", "884f...", "cd9a..."
- ],
- enterprise: "42de..."
- }
- end note
- WWW -> API: 200 SUCCESS
- note over API
- {
- wallet: {
- _wallet: {
- id: "138f...",
- label: "Harbor wallet",
- ...
- }
- }
- }
- end note
- API -> UI: Wallet Provisioning Success
- ... later, upon on chain wallet confirmation ...
- WWW -> API: Webhook fired
- API -> UI: Wallet is ready to use
- @enduml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement