# Klaytn

## **getKalytnSignedTransaction**

The D'CENT Android SDK provides functions for signing transaction of coins.

**This function for :**

* `KLAYTN` (KLAY)
* `KLAYTN_ERC20` - klaytn token
* `KLAY_BAOBAB` (KLAYt)
* `KRC20_BAOBAB`

### **Parameters**

| Parameter   | Type                                          | Description                    |
| ----------- | --------------------------------------------- | ------------------------------ |
| coinType    | `CoinType`                                    | klaytn coin type.              |
| transaction | [KlaytnTransaction](#class-klaytntransaction) | klaytn transaction parameters. |

#### **class KlaytnTransaction**

<table><thead><tr><th width="167.33333333333331">Name</th><th width="160">Type</th><th>Description</th></tr></thead><tbody><tr><td>hdKeyPath</td><td><code>Bip44KeyPath</code></td><td>sign key path for klaytn transaction</td></tr><tr><td>nonce</td><td><code>String</code></td><td>account nonce for klaytn transaction</td></tr><tr><td>toAddr</td><td><code>String</code></td><td>address to send</td></tr><tr><td>amount</td><td><code>String</code></td><td>amount of ETH to send</td></tr><tr><td>gasLimit</td><td><code>String</code></td><td>gas limit value</td></tr><tr><td>gasPrice</td><td><code>String</code></td><td>gas price for klaytn transaction</td></tr><tr><td>data</td><td><code>String</code></td><td>transaction data of klaytn transaction</td></tr><tr><td>chainId</td><td><code>int</code></td><td>chain id</td></tr><tr><td>txType</td><td><code>KlaytnTxType</code></td><td>(optional)Type of klaytn transaction<br>This can be set using the <code>setOptionAttribute()</code> method. The default is <code>TX_TYPE_LEGACY</code></td></tr><tr><td>fromAddr</td><td><code>String</code></td><td>(optional)Signer's Address of klaytn transaction<br>This can be set using the <code>setOptionAttribute()</code> method.</td></tr><tr><td>feeRatio</td><td><code>int</code></td><td>(optional)Fee Ratio of klaytn transaction<br>This can be set using the <code>setOptionAttribute()</code> method.</td></tr><tr><td>tokenName</td><td><code>String</code></td><td>(optional)token name of contract for <code>KLAYTN_ERC20</code> transaction<br>This can be set using the <code>setTokenAttribute()</code>method. </td></tr><tr><td>decimals</td><td><code>String</code></td><td>(optional)decimals of contract for <code>KLAYTN_ERC20</code> transaction<br>This can be set using the <code>setTokenAttribute()</code>method.</td></tr><tr><td>symbol</td><td><code>String</code></td><td>(optional)symbol of contract for <code>KLAYTN_ERC20</code> transaction<br>This can be set using the <code>setTokenAttribute()</code>method.</td></tr></tbody></table>

### **Returns**

`String` - signed transaction.

**Example**

```java
KlaytnTransaction klaytnTransanction;
klaytnTransanction = new KlaytnTransaction.Builder()
                .keyPath(Bip44KeyPath.valueOf("m/44'/8217'/0'/0/0"))
                .nonce("0")
                .toAddr("0x732E035fBdb9E5AB5Ef80c08f6aA081d029984dc")
                .amount("1000000000000000000")
                .gasLimit("25000")
                .gasPrice("25000000000")
                .data("")
                .chainId(1001)
                .build();

String response = mDcentmanager.getKlaytnSignedTransaction(CoinType.KLAYTN, klaytnTransanction);
```


---

# 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/klaytn.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.
