# Solana

## **getSolanaSignedTransaction**

**This function for :**

* `SOLANA` (SOL)
* `SPL_TOKEN` - solana token

### **Parameters**

| Parameter   | Type                                          | Description                    |
| ----------- | --------------------------------------------- | ------------------------------ |
| coinType    | `CoinType`                                    | solana coin type.              |
| transaction | [SolanaTransaction](#class-solanatransaction) | solana transaction parameters. |

#### **class SolanaTransaction**

<table><thead><tr><th width="178.33333333333331">Name</th><th width="154">Type</th><th>Description</th></tr></thead><tbody><tr><td>hdKeyPath</td><td><code>Bip44KeyPath</code></td><td>sign key path for solana transaction</td></tr><tr><td>sigHash</td><td><code>String</code></td><td>transaction that has not been signed of solana transaction</td></tr><tr><td>fee</td><td><code>String</code></td><td>transaction fee of solana transaction<br>* Fee value is configured in solana(SOL) unit.</td></tr><tr><td>decimals</td><td><code>int</code></td><td>transaction decimals of solana transaction</td></tr><tr><td>symbol</td><td><code>String</code></td><td>transaction symbol of solana transaction</td></tr><tr><td>optionParam</td><td><code>String</code></td><td>(optional)hexadecimal value of the token method type is used only in spl token.<br>- '01': spl-token transaction<br>- '02': create assosiate<br>- '03' + amount(8bytes) : for dapp (amount value is configured in lamport unit)</td></tr></tbody></table>

### **Returns**

`String` - signed transaction.

### **Requirements**

* D'CENT Biometric Wallet version 2.16.5. or higher is required.
  * (for spl-token): 2.17.1. or higher is required.

**Example**

```java
String keyPath = "m/44'/501'/0'";
SolanaTransaction solanaTransaction;

solanaTransaction = new SolanaTransaction.Builder()
                    .keyPath(Bip44KeyPath.valueOf(keyPath))
                    .sigHash("010500137842adebf146d55498bf1e9c59cb1252338d79b9f9598eebd7fb2f76940b411814a9cc38c2da6f91700622eb3b8ddff7707a7e6bfcbb4301b9c442990b92dc8cc40a4939977b82afe23c3c6bf859cc74c8757a688e46c9633bb8051138b81b76eebcaf41d63734864c18aa510ca43c89f38eb80d40c1ad95d8f34a93b8364c8894b15d072786475a09b4944c100d830a7bd843bbab2955290bfbba9bb4650ae71314562a9db4410932a5510cbccf45294213ea9c9b237775d189801be4edde0504d42854e9bad4cef8bc8d53ec576586258bdf1f37ba15e7e253487bb4ee952659e944ad9682b34349abe72246ef5b999b273ae987903504e02e6f82c635eb5a2aa9d58c2c76ade93cb3a212a0a5ba5d75a03ce1dedb219ba48fc9d7d972eb44b3ae006f4a26f61d3ed71088b47d4a01a21b78f52344ab7276d784968f3b73b3174ef9f7ecee2165c5b31505e0d1755e5725829a4a760a6b61628bb098da935f73eb0c866fb2830342292ab39aed6bd16844507bcfcc34dc3e80be29f3066bc28f140d143f584f237abf346a017098929cb8dc686ef1905a9ab9469bfe4e3bf4272e2356580b6175fda5e189259dad62bb45308cf466e8cabd1083fa25b4d51706ddf6e1d765a193d9cbe146ceeb79ac1cb485ed5f5b37913a8cf5857eff00a94157b0580f31c5fce44a62582dbcf9d78ee75943a084a393b350368d22899308850f2d6e02a47af824d09ab69dc42d70cb28cbfa249fb7ee57b9d256c12762ef444718f31bf2796cbdb84c8d1e5e2b23913531c84d40fcacc7c349ee58b214c14bd949c43602c33f207790ed16a3524ca1b9975cf121a2a90cffec7df8b68acdd4e1e0977eeb6eea0dddf7d99524fd7748c2b13dcb08146e4bda783811815e000112120e010f0203040510060708090a0b110c0d000930a1b10400000000f125b10d00000000")
                    .fee("0.0021")
                    .decimals(10)
                    .symbol("SOL")
                    .optionParam("030000000000000500") // dapp(03) + amount(0000000000000500)
                    .build();

String response = mDcentmanager.getSolanaSignedTransaction(CoinType.SPL_TOKEN, solanaTransaction);
```


---

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