# Solana

## **getSolanaSignedTransaction**

**This function for :**

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

### **Parameters**

* coinType: solana networks coin type
* solanaTransaction: ([SolanaTransation](#class-solanatransaction))solana transaction parameter

#### **class SolanaTransaction**

<table><thead><tr><th width="147.33333333333331">Name</th><th width="135">Type</th><th>Description</th></tr></thead><tbody><tr><td>key</td><td><code>String</code></td><td>sign key path for stacks transaction</td></tr><tr><td>signHash</td><td><code>String</code></td><td>transaction that has not been signed of stacks transaction</td></tr><tr><td>fee</td><td><code>String</code></td><td>transaction fee of stacks transaction<br>* fee value is configured in solana(SOL) unit</td></tr><tr><td>symbol</td><td><code>String</code></td><td>transaction symbol of stacks transaction</td></tr><tr><td>decimals</td><td><code>UInt32</code></td><td>transaction decimals of stacks 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' : assert transfer<br>- '02' : token stake<br>- '03' + amount(8bytes) : for dapp (amount value is configured in lamport unit)</td></tr></tbody></table>

### **Returns**

* result: (Bool) `true` if successful, `false` if error occurred
* txData: 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**

```swift
let solanaTransaction : SolanaTransaction = SolanaTransaction(key: "m/44'/501'/0'", sigHash: "0100010350d8ec411526b2704c9e730e1b59a2fe128cd9b5b2939a5918c54a660612177d480cc32970400e125ed89752129793ab63d351326e0d5af0aed644233955e59c0000000000000000000000000000000000000000000000000000000000000000d87cf02a1cea0c26fe671ee2ca0cf8c1fa7db58f18ae158c5808eac974d855f601020200010c0200000000e1f50500000000", fee: "0.0000506", symbol: "SOL", decimals: 9, optionParam: "")

DcentMgr.getSolanaSignedTransaction(coinType: .SOLANA, solanaTransaction: solanaTransaction) { (result, txData) in
    print("Solana Transaction closure")
    if result == false {
        print("FAIL !!!")
    }else{
        print(txData)
    }
}
```


---

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