# Conflux

## **getConfluxSignedTransaction**

**This function for :**

* `.CONFLUX` - conflux (CRX)

### **Parameters**

* coinType: conflux network coin type
* confluxTransaction: ([ConfluxTransation](#class-confluxtransaction))conflux transaction parameter

#### class ConfluxTransaction

<table><thead><tr><th width="169.33333333333331">Name</th><th width="129">Type</th><th>Description</th></tr></thead><tbody><tr><td>nonce</td><td><code>String</code></td><td>account nonce for Conflux transaction</td></tr><tr><td>gasPrice</td><td><code>String</code></td><td>gas price for Conflux transaction</td></tr><tr><td>gas</td><td><code>String</code></td><td>gas limit value of Conflux transaction</td></tr><tr><td>to</td><td><code>String</code></td><td>address to send</td></tr><tr><td>amount</td><td><code>String</code></td><td>amount of CFX to send of Conflux transaction</td></tr><tr><td>storageLimit</td><td><code>String</code></td><td>storageLimit for Conflux transaction</td></tr><tr><td>epochHeight</td><td><code>String</code></td><td>epochHeight for Conflux transaction</td></tr><tr><td>chainId</td><td><code>String</code></td><td>chain id for Conflux transaction</td></tr><tr><td>data</td><td><code>String</code></td><td>(optional)transaction input data for Conflux transaction</td></tr><tr><td>addressPath</td><td><code>String</code></td><td>sign key path for Conflux transaction</td></tr></tbody></table>

### **Returns**

* result: (Bool) `true` if successful, `false` if error occurred
* txData: signed transaction

### **Requirements**

* D'CENT Biometric Wallet version 2.18.3 or higher is required.

**Example**

```swift
let confluxTransaction : ConfluxTransaction = ConfluxTransaction(nonce: "0", gasPrice: "1", gas: "53000", to: "cfx:aath39ukgygwae5jnhuj1z02vkkc68wsu62j5spdng", amount: "499993640000000000000", storageLimit: "0", epochHeight: "57744640", chainId: "1029", addressPath: "m/44'/60'/0'/0/0")
  
DcentMgr.getConfluxSignedTransaction(coinType: .CONFLUX, confluxTransaction: confluxTransaction) { (result, txData) in
    print("Conflux Transaction closure")
    if result == false {
        print("FAIL !!!")
    }else{
        print(txData)
    }
}
```

## **getCRC20TokenSignedTransaction**

**This fuction for :**

* `.CFX_CRC20` - conflux token

### **Parameters**

* coinType: conflux token coin type
* tokenTransaction: ([ConfluxCrc20Transation](#class-confluxcrc20transaction))conflux token transaction parameter

#### **class ConfluxCrc20Transaction**

<table><thead><tr><th width="192.33333333333331">Name</th><th width="133">Type</th><th>Description</th></tr></thead><tbody><tr><td>nonce</td><td><code>String</code></td><td>account nonce for Conflux transaction</td></tr><tr><td>gasPrice</td><td><code>String</code></td><td>gas price for Conflux transaction</td></tr><tr><td>gas</td><td><code>String</code></td><td>gas limit value of Conflux transaction</td></tr><tr><td>to</td><td><code>String</code></td><td>address to send</td></tr><tr><td>amount</td><td><code>String</code></td><td>amount of CFX to send of Conflux transaction</td></tr><tr><td>storageLimit</td><td><code>String</code></td><td>storageLimit for Conflux transaction</td></tr><tr><td>epochHeight</td><td><code>String</code></td><td>epochHeight for Conflux transaction</td></tr><tr><td>chainId</td><td><code>String</code></td><td>chain id for Conflux transaction</td></tr><tr><td>data</td><td><code>String</code></td><td>(optional)transaction input data for Conflux transaction</td></tr><tr><td>addressPath</td><td><code>String</code></td><td>sign key path for Conflux transaction</td></tr><tr><td>tokenName</td><td><code>String</code></td><td>token name of Crc20 transaction</td></tr><tr><td>contractAddress</td><td><code>String</code></td><td>contractAddress of Crc20 transaction</td></tr><tr><td>toAddress</td><td><code>String</code></td><td>toAddress of Crc20 transaction</td></tr><tr><td>decimals</td><td><code>String</code></td><td>decimals of of Crc20 transaction</td></tr><tr><td>value</td><td><code>String</code></td><td>amount of ether to be sent of Crc20. ( Drip unit value )</td></tr><tr><td>tokenSymbol</td><td><code>String</code></td><td>symbol of Crc20 transaction</td></tr></tbody></table>

### **Returns**

* result: (Bool) `true` if successful, `false` if error occurred
* txData: signed transaction

### **Requirements**

* D'CENT Biometric Wallet version 2.18.3 or higher is required.

**Example**

```swift
let crc20Transaction : CRC20TokenTransaction = CRC20TokenTransaction(nonce: "0", gasPrice: "1", gas: "53000", to: "cfx:acdeewzdr3cv7hvc12kdwp7gzysjaexz9jw7s1uaft", amount: "0", storageLimit: "0", epochHeight: "58463079", chainId: "1029", addressPath: "m/44'/60'/0'/0/0", tokenName: "IoTestCoin", contractAddress: "cfx:acdeewzdr3cv7hvc12kdwp7gzysjaexz9jw7s1uaft", toAddress: "cfx:aath39ukgygwae5jnhuj1z02vkkc68wsu62j5spdng", decimals: "18", value: "5000000000000000000", tokenSymbol:"ITC")
  
DcentMgr.getCRC20TokenSignedTransaction(coinType: .CFX_CRC20, tokenTransaction: crc20Transaction) { (result, txData) in
    print("Conflux token CRC20 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/conflux.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.
