Skip to main content

Hedera

getHederaSignedTransaction

This function is for:

  • .HEDERA - hedera (HBAR)
  • .HEDERA_HTS - hedera token
  • .HEDERA_TESTNET - hedera testnet (HBARt)
  • .HTS_TESTNET - hedera testnet token

Parameters

  • coinType: hedera networks coin type
  • hederaTransaction: (HederaTransaction)hedera transaction parameter

class HederaTransaction

NameTypeDescription
unsignedStringtransaction that has not been signed of hedera transaction
keyStringsign key path for hedera transaction
symbolStringtransaction symbol of hedera transaction
decimalsStringtransaction decimals of hedera transaction

Returns

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

Requirements

  • DCENT Biometric Wallet version 2.13.0 or higher is required.

Example

let hederaTransaction : HederaTransaction = HederaTransaction(unsigned: "", key: "", symbol: "", decimals: "")

// test data
hederaTransaction.unsigned = "0a1a0a0c088dfbbc9006108885e6a90112080800100018d6c0151800120608001000180318c0843d22020878320072260a240a100a080800100018d6c01510ef8de29a030a100a080800100018f6a72810f08de29a03"
hederaTransaction.key = "m/44'/3030'/0'"
hederaTransaction.symbol = "HBAR"
hederaTransaction.decimals = "8"

DcentMgr.getHederaSignedTransaction(coinType: .HEDERA, hederaTransaction: hederaTransaction) { (result, txData) in
print("Hedera Transaction closure")
if result == false {
print("FAIL !!!")
}else{
print(txData)
}
}