Skip to main content

Cosmos

getCosmosSignedTransaction​

This function is for:

  • COSMOS (ATOM)
  • COREUM (CORE)

Parameters​

ParameterTypeDescription
coinTypeCoinTypecosmos coin type.
transactionCosmosTransactioncosmos transaction parameters.

class CosmosTransaction​

NameTypeDescription
hdKeyPathBip44KeyPathsign key path for cosmos transaction
sigHashStringtransaction that has not been signed of cosmos transaction
decimalsinttransaction decimals of cosmos transaction
symbolStringtransaction symbol of cosmos transaction
feeStringtransaction fee of cosmos transaction
* Fee value is configured in cosmos(ATOM) or coreum(CORE) unit.
nonceString(optional)transaction nonce of cosmos transaction
optionParamString(optional)option parameter

Returns​

String - signed transaction.

Requirements​

  • DCENT Biometric Wallet version 2.21.0 or higher is required.
    • COREUM: 2.25.0 or higher is required.

Example

String keyPath = "m/44'/118'/0'/0/0";
CosmosTransaction cosmosTransaction;

cosmosTransaction = new CosmosTransaction.Builder()
.keyPath(Bip44KeyPath.valueOf(keyPath))
.sigHash("0a94010a8f010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e64126f0a2d636f736d6f73317235763573726461377866746833686e327332367478767263726e746c646a756d74386d686c122d636f736d6f733138766864637a6a7574343467707379383034637266686e64356e713030336e7a306e663230761a0f0a057561746f6d1206313030303030120012670a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff12040a020801180a12130a0d0a057561746f6d12043530303010c09a0c1a0b636f736d6f736875622d34208f3a")
.fee("0.00025")
.decimals(6)
.symbol("ATOM")
.build();

String response = mDcentmanager.getCosmosSignedTransaction(CoinType.COSMOS, cosmosTransaction);