---
title: Detailed Technical Flows
category: reference
---

> **Key takeaway:**  ☞   The renaming of "Ledger Live" to "Ledger Wallet" and\
>      "wallet" (in the hardware sense) to "signer" is still in progress.\
>      This page may contain legacy references that will be updated.

# Detailed Technical Flows

## Overview diagram

This is a [C4 diagram](https://c4model.com/) that describes an overview of the exchange during the swap process.

![Swap C4 diagram](/exchange/swap-light-C4.png)

> **Note:** Although the provider's LiveApp is embedded inside <Glossary word="Ledger Wallet" />, we describe it
> as running in a separate environment because it is sandboxed.

## Detailed transaction flow

Explanations about each step below the diagram.

![Swap transaction flow](/exchange/detailed-flow-2.png)

1. &#x20;opens the provider's LiveApp through a [deeplink](./providers-liveapp#deeplink). Example:

```
ledgerlive://discover/swapprovidername?quoteId=CC14E626-CF1B-4EDA-AF5E-766FFD5A3457&
fromAddress=bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq&
toAddress=0xb794f5ea0ba39494ce839613fffba74279579268&
fromAddressId=AF1A7BD4-6A9A-4491-A540-98B1C7AD2407&
toAddressId=6EA9F270-91C5-4832-9A44-2713F9A6F6F0
```

The `quoteId` sent is the one coming from a previous request to the `/quote` endpoint of the Provider's backend. This id is linked to the `fromCurrency` and `toCurrency` wanted by the user.

2. The provider's LiveApp starts Ledger's swap process through a call to ExchangeSDK method call: `swap`.

3. After asking the user to start the process, Ledger's Swap Service will call the Provider's backend to generate and sign the `payload`. The backend will also returns a `swapId`, for [status tracking purpose](#check-swap-status-flow).

4. The Provider's backend will generate the payload with Ledger's currency id. This part is important as Ledger's device only knows Ledger's referential currency.

5. The Provider's backend will sign the payload with its private key. The public part must be previously sent to Ledger and must use secp256k1 curve.

6. As soon as the user signs the transaction within his Ledger's device,  will broadcast the transaction.

7. The `transactionId` is returned in the response of the `swap` method, called by the LiveApp.

8. The LiveApp should call back  with a deeplink. Example: `ledgerlive://swap?status=COMPLETED&swapId=123`

## Display quote information to user

![Quote information flow](/exchange/detailed-flow-1.png)

[Details on the quote API needed](./redoc-api#operation/postQuote).

## Check swap status flow

![Check swap status flow](/exchange/detailed-flow-3.png)
