# XRPL

## **getXrpSignedTransaction**

**This function for :**

* `XRP` (XRP) - xrpl
* `XRP_TA` - xrp ta
* `XRP_TESTNET` (XRPt)
* `XRP_TA_TESTNET`

### **Parameters**

| Parameter   | Type                                    | Description                 |
| ----------- | --------------------------------------- | --------------------------- |
| coinType    | `CoinType`                              | xrp coin type.              |
| transaction | [XrpTransaction](#class-xrptransaction) | xrp transaction parameters. |

#### **class XrpTransaction**

<table><thead><tr><th width="204.33333333333331">Name</th><th width="173">Type</th><th>Description</th></tr></thead><tbody><tr><td>hdKeyPath</td><td><code>Bip44KeyPath</code></td><td>sign key path for xrp transaction</td></tr><tr><td>sourceAddress</td><td><code>String</code></td><td>Source address of xrp transaction<br>Only used in <code>getXrpSignedTransaction()</code></td></tr><tr><td>destinationAddress</td><td><code>String</code></td><td>Destination addresse of xrptransaction<br>Only used in <code>getXrpSignedTransaction()</code></td></tr><tr><td>amountDrops</td><td><code>long</code></td><td>Amount to be send ( Drops unit value)<br>Only used in <code>getXrpSignedTransaction()</code></td></tr><tr><td>feeDrops</td><td><code>long</code></td><td>Fee of this transaction ( Drops unit value)<br>Only used in <code>getXrpSignedTransaction()</code></td></tr><tr><td>sequence</td><td><code>int</code></td><td>The sequence number, relative to the initiating account, of xrp transaction<br>Only used in <code>getXrpSignedTransaction</code>()</td></tr><tr><td>destinationTag</td><td><code>long</code></td><td>Destination tag of xrp transaction<br>Only used in <code>getXrpSignedTransaction()</code></td></tr><tr><td>unsignedTx</td><td><code>String</code></td><td>Encoded unsigned Trasaction value for xrp transaction<br>Only used in <code>getXrpSingedTransactionWithUnsignedTx()</code></td></tr></tbody></table>

### **Returns**

`String` - signed transaction.

**Example**

```java
XrpTransaction xrpTransaction;

String address = mDcentManager.getAddress(CoinType.RIPPLE, Bip44KeyPath.valueOf("m/44'/144'/0'/0/0")).get("address");
xrpTransaction = new XrpTransaction.Builder()
                .keyPath(Bip44KeyPath.valueOf("m/44'/144'/0'/0/0"))
                .sourceAddress(address)
                .destinationAddress("rsHXBk5vnswg5SZxUQCEPYVnmrd4PaZ7Ah")
                .amountDrops(2)
                .feeDrops(10)
                .sequence(11)
                .destinationTag(-1)
                .build();

String response = mDcentManager.getXrpSignedTransaction(CoinType.XRP, xrpTransaction);
```

## **getXRPSignedTransactionWithUnsignedTx**

**This function for :**

* `XRP` (XRP) - xrpl
* `XRP_TA` - xrp ta
* `XRP_TESTNET` (XRPt)
* `XRP_TA_TESTNET`

### **Parameters**

| Parameter   | Type                                    | Description                 |
| ----------- | --------------------------------------- | --------------------------- |
| coinType    | `CoinType`                              | xrp coin type.              |
| transaction | [XrpTransaction](#class-xrptransaction) | xrp transaction parameters. |

**Returns**

`HashMap<String, String>` - signed transaction{sign, pubkey, accountId}.

**Example**

```java
XrpTransaction xrpTransaction;
xrpTransaction= new XrpTransaction .Builder()
                .keyPath(Bip44KeyPath.valueOf("m/44'/144'/0'/0/0"))
                .unsignedTx("1200002280000000240238634E2E00000000201B023863E161400000000098968068400000000000000A8114FD970F4612987680F4008BA53ED6FD87BE0DAAF983141DEE2154B117FB47FCF4F19CD983D9FCBB894FF7")
                .build();
HashMap<String, String> response = mDcentmanager.getXRPSignedTransactionWithUnsignedTx(CoinType.XRP, xrpTransaction);

String resSign = response.get("sign");
String resPubKey = response.get("pubkey");
String res_accountId = response.get("accountId");
```


---

# 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://dev-docs.dcentwallet.com/dcent-biometric-wallet-for-mobile/dcent-biometric-sdk-android/xrpl.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.
