December 16, 2020

Client sequence diagram

This sequence diagram shows the high-level flow and behind the scenes interaction between Wireleap components, from the perspective of the client.

sequenceDiagram participant user participant client participant contract participant dir participant relay participant ps participant auth Note left of user: purchase accesskeys opt pof type user->>+ps: purchase() ps->>+auth: generate() auth-->>-ps: accesskeys ps-->>-user: accesskeys end Note left of user: initialize and start daemon user->>+client: init() deactivate client user->>+client: start() deactivate client Note left of user: import purchased accesskeys user->>+client: import(accesskeys) client->>+contract: info() contract-->>-client: response client->>+dir: relays() dir-->>-client: response client->>client: verify() deactivate client Note left of user: send traffic to daemon user->>+client: traffic opt accesskey ondemand client->>+contract: activate(pof,sk_pubkey) contract->>contract: verify(pof) contract->>contract: sign_timestamp(sk_pubkey) contract-->>-client: response end opt new circuit client->>client: generate_circuit() end loop reverse(relay in circuit) client->>client: generate_sharetoken(servicekey,relay_pubkey) client->>client: encapsulate(sharetoken,nexthop,encrypted_payload) end client->>+relay: send(encapsulated_traffic) relay->>relay: handle(encapsulated_traffic) Note right of relay: relay traffic relay-->>-client: response client-->>-user: response