Skip to main content

Conflux

getConfluxSignedTransaction

This function is for:

  • CONFLUX (CFX)

Parameters

ParameterTypeDescription
coinTypeCoinTypeconflux coin type.
transactionConfluxTransactionconflux transaction parameters.

class ConfluxTransaction

NameTypeDescription
nonceStringaccount nonce for Conflux transaction
gasPriceStringgas price for Conflux transaction
gasLimitintgas limit value of Conflux transaction
toAddrStringaddress to send
amountStringamount of CFX to send of Conflux transaction
storageLimitStringstorageLimit for Conflux transaction
epochHeightStringepochHeight for Conflux transaction
chainIdStringchain id for Conflux transaction
dataString(optional)transaction input data for Conflux transaction
hdKeyPathBip44KeyPathsign key path for Conflux transaction

Returns

String - signed transaction.

Requirements

  • DCENT Biometric Wallet version 2.18.3 or higher is required.

Example

String keyPath = "m/44'/60'/0'/0/0";
ConfluxTransaction confluxTransaction;

confluxTransaction = new ConfluxTransaction.Builder()
.keyPath(Bip44KeyPath.valueOf(keyPath))
.nonce("0")
.gasPrice("1")
.gasLimit("53000")
.toAddr("cfx:aath39ukgygwae5jnhuj1z02vkkc68wsu62j5spdng")
.amount("499993640000000000000")
.storageLimit("0")
.epochHeight("57744640")
.chainId("1029")
.data("")
.build();

String response = mDcentmanager.getConfluxSignedTransaction(CoinType.CONFLUX, confluxTransaction);

getConfluxCrc20SignedTransaction

This function is for:

  • CFX_CRC20 - Conflux Token

Parameters

ParameterTypeDescription
coinTypeCoinTypeconflux crc20 coin type.
transactionConfluxCrc20Transactionconflux crc20 transaction parameters.

class ConfluxCrc20Transaction

NameTypeDescription
nonceStringaccount nonce for Conflux transaction
gasPriceStringgas price for Conflux transaction
gasLimitintgas limit value of Conflux transaction
toAddrStringaddress to send
amountStringamount of CFX to send of Conflux transaction
storageLimitStringstorageLimit for Conflux transaction
epochHeightStringepochHeight for Conflux transaction
chainIdStringchain id for Conflux transaction
dataString(optional)transaction input data for Conflux transaction
hdKeyPathBip44KeyPathsign key path for Conflux transaction
nameStringtoken name of Crc20 transaction
contractAddressStringcontractAddress of Crc20 transaction
toAddressStringtoAddress of Crc20 transaction
decimalsStringdecimals of Crc20 transaction
valueStringamount of ether to be sent of Crc20. ( Drip unit value )
symbolStringsymbol of Crc20 transaction

Returns

String - signed transaction.

Requirements

  • DCENT Biometric Wallet version 2.18.3 or higher is required.

Example

String keyPath = "m/44'/60'/0'/0/0";
ConfluxCrc20Transaction confluxCrc20Transaction;

confluxCrc20Transaction = new ConfluxCrc20Transaction.Builder()
.keyPath(Bip44KeyPath.valueOf(keyPath))
.nonce("0")
.gasPrice("1")
.gasLimit("53000")
.toAddr("cfx:acdeewzdr3cv7hvc12kdwp7gzysjaexz9jw7s1uaft")
.amount("0")
.storageLimit("0")
.epochHeight("58463079")
.chainId("1029")
.data("")
.name("IoTestCoin")
.contractAddress("cfx:acdeewzdr3cv7hvc12kdwp7gzysjaexz9jw7s1uaft")
.toAddressForCrc20("cfx:aath39ukgygwae5jnhuj1z02vkkc68wsu62j5spdng")
.decimals("18")
.value("5000000000000000000")
.symbol("ITC")
.build();

String response = mDcentmanager.getConfluxCrc20SignedTransaction(CoinType.CFX_CRC20, confluxCrc20Transaction)