# Stacks

## **getStacksSignedTransaction**

**This function for :**

* `STACKS` (STX)
* `SIP010` - stacks token
* `STACKS_TESTNET` (STXt)
* `SIP010_TESTNET`

### **Parameters**

<table><thead><tr><th width="156">Parameter</th><th width="179.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>coinType</td><td><code>CoinType</code></td><td>stacks coin type.</td></tr><tr><td>transaction</td><td><a href="#class-stackstransaction">StacksTransaction</a></td><td>stacks transaction parameters.</td></tr></tbody></table>

#### class StacksTransaction

<table><thead><tr><th width="151.33333333333331">Name</th><th width="168">Type</th><th>Description</th></tr></thead><tbody><tr><td>hdKeyPath</td><td><code>Bip44KeyPath</code></td><td>sign key path for stacks transaction</td></tr><tr><td>sigHash</td><td><code>String</code></td><td>transaction that has not been signed of stacks transaction</td></tr><tr><td>authType</td><td><code>int</code></td><td>transaction authorization type of stacks transaction (refer to<a href="https://docs.stacks.co/docs/stacks-academy/technical-specs#transactions">Stacks Doc</a>)<br>- standard authorization: 0x04<br>- sponsored authorization: 0x05</td></tr><tr><td>fee</td><td><code>String</code></td><td>transaction fee of stacks transaction<br>* Fee value is configured in stacks(STX) unit.</td></tr><tr><td>nonce</td><td><code>String</code></td><td>transaction nonce of stacks transaction</td></tr><tr><td>decimals</td><td><code>int</code></td><td>transaction decimals of stacks transaction</td></tr><tr><td>symbol</td><td><code>String</code></td><td>transaction symbol of stacks transaction</td></tr><tr><td>optionParam</td><td><code>String</code></td><td>(optional)hexadecimal value of the token method type<br>- '01' : assert transfer<br>- '02' : token stake<br>- '03' + amount(8bytes) : token revoke (amount value is configured in micro-STX unit)<br>- '04': dapp contract</td></tr></tbody></table>

### **Returns**

`String` - signed transaction.

### **Requirements**

* D'CENT Biometric Wallet version 2.14.1 or higher is required.
  * (for SIP010): 2.16.7 or higher is required.

**Example**

```java
String keyPath = "m/44'/5757'/0'/0/0";
StacksTransaction stacksTransaction;

stacksTransaction = new StacksTransaction.Builder()
                    .keyPath(Bip44KeyPath.valueOf(keyPath))
                    .sigHash("0000000001040027b586cbbbd0902773c2faafb2c511b130c3610800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030200000000021608633eac058f2e6ab41613a0a537c7ea1a79cdd20f6d69616d69636f696e2d746f6b656e087472616e736665720000000401000000000000000000000000000f4240051627b586cbbbd0902773c2faafb2c511b130c361080516e3d94a92b80d0aabe8ef1b50de84449cd61ad6370a0200000006313130343239")
                    .fee("0.12")
                    .nonce("0000000000000029")
                    .decimals(6)
                    .authType(4)
                    .symbol("MIAMI")
                    .optionParam("01") // assert transfer
                    .build();

String response = mDcentmanager.getStacksSignedTransaction(CoinType.SRC20, stacksTransaction);
```
