Create sequence diagrams with simple online tool

Swimlanes.io is a free webapp for making sequence diagrams. You simply edit the text on the left and the diagram is updated in real time. You can download your sequence diagrams as images or distribute with a link.

Title: Lit EVM Swap Expired Example (mk II) dApp -> Lit Action: Executes the standard Lit Swap Lit Action, passing the flag: `execute` note The params given to the Lit Action include: - encryptionMetadata Lit Action -> Lit Action: Decrypts `encryptionMetadata` Lit Action -> Lit Action: Checks `swapObject.expiration` is in the future note For this diagram, assume `swapObject.expiration` has passed, and therefore the swap has expired group: Determing whether to return funds Lit Action -> chainB: Checks if the balance of `swapAddressB < swapObject.amountB` note If the balance is less than `swapObject.amountB`, that means `Bob` never funded `swapAddressB` at all, or didn't fund it completely Lit Action -> chainB: Checks if the nonce of `swapAddressB == 0` note We also require that the `nonce` be `0` to account for the scenerio where the swap executed successfully, and `Alice` is attempting to steal back her funds by making the `swapAddressB < swapObject.amountB` check fail if: If the balance and nonce checks pass Lit Action -> Lit Action: Encrypts `privateKeyA` note The key would be encrypted with the Access Control Conditions that only allow `swapObject.accountA` to decrypt Lit Action -> Lit Action: Encrypts `privateKeyB` note The key would be encrypted with the Access Control Conditions that only allow `swapObject.accountB` to decrypt end end group: Determing whether to return funds Lit Action -> chainA: Checks if the balance of `swapAddressA < swapObject.amountA` Lit Action -> chainA: Checks if the nonce of `swapAddressA == 0` if: If the balance and nonce checks pass Lit Action -> Lit Action: Encrypts `privateKeyB` Lit Action -> Lit Action: Encrypts `privateKeyA` end end Lit Action -> dApp: Returns encryption metadata for `privateKeyA` and `privateKeyB` dApp -> Alice: Shares `privateKeyA` encryption metadata dApp -> Bob: Shares `privateKeyB` encryption metadata Alice -> Lit network: Decrypts `privateKeyA` using an Auth Sig Bob -> Lit network: Decrypts `privateKeyB` using an Auth Sig Alice -> chainA: Uses `privateKeyA` to transfer ownership of funds Bob -> chainB: Uses `privateKeyB` to transfer ownership of funds