Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Indy - Getting Started - Sequence Diagram
@startuml
box "\nUser"
actor Alice
participant Client
database "Private\nStorage" as PrivStorage
database "Private\nLedger" as PrivLedger
end box
box "\nAgents"
participant "Faber\nCollege" as College
participant "Acme\nEmployer" as Employer
participant "Thrift\nBank" as Bank
end box
box "\nIndy Network"
database "Public\nLedger" as PubLedger
collections Steward
end box
hide footbox
skinparam ParticipantPadding 5
skinparam BoxPadding 5
title Ledger Initialization
Steward --> Steward : new wallet
Steward -> Steward : exchange DID\nand verkey
Steward -> PubLedger : write Pool TXN
Steward -> PubLedger : write Domain TXN
Steward -> PubLedger : write Config
Steward -> PubLedger : start Validator
newpage Agent Provisioning
group For each Agent
College -> College : new wallet
College -\\ Steward : send DID and vkey (external channel)
Steward -> PubLedger : publish Nym
College -> PubLedger : publish endpoint attributes (ip:port)
College -> PubLedger : publish claims schema (Transcript)
end
group For each User
College -\\ Alice : send connection request (external channel)
end
newpage Client Initialization
Alice -> Client : new wallet
activate Client
Client -> PrivStorage : save keys
Client -> Alice : DID and vkey
deactivate Client
Alice -> Client : connect
activate Client
Client <- PubLedger : catch-up
deactivate PubLedger
Client -> Alice : status
deactivate Client
newpage Connection to College
Alice -> Client : accept
activate Client
Client <- PubLedger : lookup endpoint + vkey from DID
Client -> Client : verify\nsignature
Client -> PrivStorage : new DID
Client -> College : signed DID+nonce
activate College
College -> College : verify request
College -> PubLedger : publish Nym
College -> College : map DID
College -> Client : accepted
deactivate College
College -> Client : available claims
Client -> PrivStorage : save\nconnection
Client -> Alice : established
deactivate Client
Alice -> Client : ping
activate Client
Client -> College : signed DID+nonce
activate College
College -> College : verify\nsignature
College -> Client : signed nonce
deactivate College
Client -> Client : verify\nsignature
Client -> Alice : pong
deactivate Client
newpage Claim from College
Alice -> Client : show
activate Client
College -> Client : get schema name+version
PubLedger -> Client : get schema attributes
Client -> Alice : names
deactivate Client
Alice -> Client : request
activate Client
College -> Client : get signed claim
Client <- PubLedger : lookup vkey from claim
Client -> Client : verify\nsignature
Client -> PrivStorage : save claim
Client -> Alice : confirmation
deactivate Client
Alice -> Client : show
activate Client
Client <- PrivStorage : read claim
Client -> Alice : values
deactivate Client
newpage Connection to Employer
Alice -> Client : accept
activate Client
Client <- PubLedger : lookup endpoint + vkey from DID
Client -> Client : verify\nsignature
Client -> PrivStorage : new DID
Client -> Employer : signed DID+request+claim
activate Employer
Employer <- PubLedger : lookup claim vkey
Employer -> Employer : verify request
Employer -> PubLedger : publish Nym
Employer -> Employer : map DID
Employer -> Client : accepted
deactivate Employer
Employer -> Client : available claims
Client -> PrivStorage : save\nconnection
Client -> Alice : established
deactivate Client
newpage Claim from Employer
Alice -> Client : show
activate Client
Employer -> Client : get schema name+version
PubLedger -> Client : get schema attributes
Client -> Alice : names
deactivate Client
Alice -> Client : request
activate Client
Employer -> Client : get signed claim
Client <- PubLedger : lookup vkey from claim
Client -> Client : verify\nsignature
Client -> PrivStorage : save claim
Client -> Alice : confirmation
deactivate Client
Alice -> Client : show
activate Client
Client <- PrivStorage : read claim
Client -> Alice : values
deactivate Client
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.