Blog Docs Roadmap GitHub
November 08, 2020

Relay sequence diagram

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

sequenceDiagram Note left of relay: request contract information relay->>+contract: info() contract-->>-relay: response Note left of relay: enrollment: relay->>+dir: enroll(request) dir->>dir: validation() dir->>+relay: challenge relay-->>-dir: challenge+response dir->>dir: verify() + validate() dir->>+relay: wl:ping relay-->>-dir: wl:pong dir->>dir: add() dir-->>-relay: success loop handle traffic Note left of relay: handle traffic and accumulate sharetokens relay->>relay: handle(encapsulated_traffic) Note right of relay: relay traffic opt settlement window open Note left of relay: sharetoken submission during settlement window activate relay relay->>+relay: signedSharetokens = sign(sharetokens) relay->>+contract: submit(signedSharetokens) contract->>contract: verify(signedSharetokens) contract-->>-relay: response deactivate relay end end Note left of relay: request balance available for withdrawal relay->>+contract: requestBalance() loop payout.check_period contract->>+ps: pendingTxns() ps-->>-contract: response end contract->>contract: verifyRequest() + lookupBalance() contract-->>-relay: balance Note left of relay: request withdrawal relay->>+contract: requestWithdrawal(amount,destination) contract->>contract: signedRequest = verifyAndSign(request) contract->>+ps: requestWithdrawal(signedRequest) ps->>+auth: verifyRequest(signedRequest) auth-->>-ps: response ps->>+processor: performTxn(amount,destination) processor-->>-ps: receipt ps-->>-contract: receipt contract-->>-relay: receipt