You can connect Ripple Custody accounts to decentralized applications (DApps) to perform operations in a decentralized exchange. DApps provide a way to perform operations not currently supported by Ripple Custody, for example, swap assets or stake a balance.
In this section, you'll learn how to:
- Connect an account to a DApp through WalletConnect
- Initiate a transaction from your connected account
Ripple Custody includes DApp support for WalletConnect version 2 DApps.
For more information, see the Reown (formerly WalletConnect) specification.
The DApps functionality is only available in the Ripple Custody UI, not the API.
The following DApp methods are supported by Ripple Custody:
eth_sendTransactioneth_signTypedDatapersonal_signwallet_addEthereumChainwallet_switchEthereumChain
Ripple Custody can consume the following event types from a DApp:
session_proposalsession_requestsession_deleteauth_request
This functionality is only available for EVM ledgers.
For a list of EVM ledgers, see Ethereum Virtual Machine ledgers.
The steps below demonstrate how to connect a Ripple Custody account to a DApp and initiate a transaction from the DApp.
To use a DApp with Ripple Custody, you need:
- A DApp that supports WalletConnect version 2
- An account on a supported EVM ledger
- The Ripple: Auth & Sign app with push notifications enabled
To connect your account:
- In Ripple Custody, navigate to My DApps.
- Select Connect DApp.
- In Account, select an account on an EVM ledger.
- In Ledger, select the EVM ledger.
- In WalletConnect code, paste the WalletConnect code. The details of the DApp connection are displayed.
- Click Connect.
- Check the connection was created correctly:
- In the DApp, view the Ripple Custody account and check the balance.
- In Ripple Custody, check the balance matches the balance of the DApp account. For more information, see Check account balances.
To perform an operation:
- In the DApp, initiate a transaction from the connected account. The Ripple: Auth & Sign app notifies you that a new intent was submitted for your user.
- In the app, sign the operation. Ripple Custody triggers a standard intent submission workflow.
- In Ripple Custody, track the intent through the workflow. For more information, see Check state.