> **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.

# Provider's LiveApp

As explained in the [Swap Integration](../swap) page, you need to modify your LiveApp with some particularities compared to the one that can be found in the Discover section.

Your LiveApp must:

- Use the [Ledger Exchange Services Kit](https://github.com/LedgerHQ/exchange-sdk), in addition to the Wallet API.
- Respond to specific LiveApp URLs in order to adapt to the flow inside .
- Have a modified, slightly more complex, Manifest file.
- Follow specifics flow/ux requirements.

## Ledger Exchange Services Kit

To learn how to create (or embed if already existing) your user interface for the swap, please follow the [Discover documentation](../../discover/getting-started).

Your LiveApp will interact with , through the [ExchangeSDK](https://github.com/LedgerHQ/exchange-sdk), with the corresponding method.

You will need to set up the SDK with your `providerId` attributed upon request by Ledger.

```js copy
const exchangeSDK = new ExchangeSDK("yourProviderId");
```

### SWAP Method

This method will need you to provide the following parameters:

- `quoteId`: the id coming from your system and [forwarded to your LiveApp](./providers-liveapp) as a query parameter
- `fromAccountId`: user's account id, [previously given to the LiveApp](./providers-liveapp) as a query parameter
- `toAccountId`: user's account id, [previously given to the LiveApp](./providers-liveapp) as a query parameter
- `fromAmount`: amount that will be sent from `fromAddressId` to `payinAddress`
- `feeStrategy`: `SLOW`, `MEDIUM`, `FAST` or `CUSTOM`.
- `rate`: rate differences in the pair, [previously given to the LiveApp](./providers-liveapp) as a query parameter

```js copy
exchangeSDK.swap({
  quoteId: "1234",
  fromAccountId: "07AB5930-C73A-433F-A2FA-920640AF3A02",
  toAccountId: "76A239EB-1C2A-4237-B942-CA87472106EB",
  fromAmount: "12.3",
  feeStrategy: "SLOW",
  rate: 0.7555,
});
```

## LiveApp URL

The LiveApp needs to respond to an URL with some parameters. LiveApp URLs are used to open your LiveApp with the quote values that the user already entered in .

The LiveApp URL format is already fixed and will depend on the information you provided inside your [LiveApp manifest](../../../../docs/discover/wallet-api/appendix/manifest) (ex: `ledgerlive://discover/swapprovidername`).

- `quoteId`: The id retrieved by Ledger's backend during a quote request.
- `fromAmount`: The amount of currency.
- `fromAccountId`: The user's account id in  repository.
- `toAccountId`: The user's account id in  repository.
- `rate`: the rate differences in the pair.
- `feeStrategy`: `SLOW`, `MEDIUM`, `FAST` or `CUSTOM`.
- `initFeeTotalValue`: initial transaction total fee.
- `customFeeConfig`(optional, required for `CUSTOM` feeStrategy): Custom fee configuration in case the strategy is of type `CUSTOM`. The key-value object is encoded in URI parameter.
- `ledger-transaction-id`: id used by ledger to track transactions and their completion statuses.
- `fiatCurrencyId`: The fiat currency id used as reference for the quote.
- `theme`: The theme used in .
- `displayLanguage`: The language used in .

**Example**:

```
ledgerlive://discover/swapprovidername?quoteId=1234&fromAmount=0.09&fromAccountId=82f48c06-6170-536e-a21b-56b30b02b58d&toAccountId=c0c4493e-fc4b-50b6-b1a0-566f1a751521&rate=79.09405555555555555556&feeStrategy=CUSTOM&initFeeTotalValue=878198522989412&customFeeConfig=%7B%22maxFeePerGas%22%3A%2212000000000%22%2C%22maxPriorityFeePerGas%22%3A%221000000000%22%2C%22userGasLimit%22%3Anull%2C%22gasLimit%22%3A%2221000%22%7D
```

> **Note:** Ledger needs to know how to send referral information through the widget.

## Manifest Permission

Your [LiveApp manifest](../../../../docs/discover/wallet-api/appendix/manifest) should contains at least those permissions request:

```json copy
"permissions": [
  "account.list",
  "currency.list",
  "custom.exchange.start",
  "custom.exchange.complete",
  "custom.exchange.error",
]
```

## Flow/UX requirements

Please refer to the [Flow Breakdown](./flow) section for more information.
