# XRP

## EVM ChainX to XRP bridging guide

* `function requestSwap(address tokenAddress, string calldata toChain, bytes calldata toAddr, uint amount, bytes calldata data) external payable`
  * oXRP tokenAddress : [link](/bridging-assets/ripple-vault.md)
  * toChain : XRP
  * toAddress : xrp hex address format
  * minAmount for Bridging : 20.03 oXRP&#x20;
  * data : XRP destination tag ( hex format )
    * ex) 1234 -> 0x4d2
* chainFee : [link](/policies/bridge-fee/history/ripple-layer-1.md)

### toAddress format

```
// "ripple-address-codec": "4.2.3"
const addressCodec = require('ripple-address-codec');

// xrpAddress
const xrpAddress = "r~";

// hexAddress for toAddress
const hexAddress = '0x' + Buffer.from(addressCodec.codec.codec.decode(xrpAddress)).toString('hex');

```

* example
  * XRP address : `rLcxBUrZESqHnruY4fX7GQthRjDCDSAWia`
  * Hex address : `0x00d73701c4123236e2d61d372052eadcc3ede48b06e617b033`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bridge-docs.orbitchain.io/cross-chain-guide/xrp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
