Tron

getTronSignedTransaction

This function for :

  • .TRON - tron (TRX)

  • .TRC_TOKEN - tron token

  • .TRX_TESTNET - tron testnet (tTRX)

  • .TRC_TESTNET - tron testnet token

Parameters

  • coinType: tron networks coin type

  • tronTransaction: (TronTransation)tron transaction parameter

class TronTransaction

Name
Type
Description

txData

String

transaction that has not been signed of tron transaction

key

String

sign key path for tron transaction

fee

String

transaction fee of this tron transaction * fee value is configured in tron(TRX) unit.

Returns

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

  • txData: signed transaction

Requirements

  • D'CENT Biometric Wallet version 2.2.2. or higher is required.

Example

let tronTransaction : TronTransaction = TronTransaction(txData: "0a02610a220838507457b79561a740e8dd8fefaf2e5a65080112610a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412300a15418f2d2dfaa81af60f5a3ac4ca5597e795aff7abae121541c27dcd7d914fd6aa8fec3c8a41cb2e90883bc6f0187f70dd978cefaf2e", key: "m/44'/195'/0'/0/0", fee: "0.00262")
  
  
DcentMgr.getTronSignedTransaction(coinType: .TRON, tronTransaction: tronTransaction) { (result, txData) in
    print("Tron Transaction closure")
    if result == false {
        print("FAIL !!!")
    }else{
        print(txData)
    }
}

Last updated