Vechain

getVechainSignedTransaction

This function for :

  • .VECHAIN - vechain (VET)

  • .VECHAIN_ERC20 - vechain token

Parameters

  • coinType: vechain networks coin type

  • vechainTransaction: (VechainTransation)vechain transaction parameter

class VechainTransaction

NameTypeDescription

sigHash

String

transaction that has not been signed of vechain transaction

key

String

sign key path for vechain transaction

fee

String

transaction fee of vechain transaction * fee value is configured in vechain(VET) unit.

nonce

String

(optional)transaction nonce of vechain transaction

decimals

String

transaction decimals of vechain transaction

symbol

String

transaction symbol of vechain transaction

optionParam

String

(optional)option parameter

Returns

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

  • txData: signed transaction

Requirements

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

Example

let vechainTransaction : VechainTransaction = VechainTransaction(sigHash: "f83b2787c6143a04c08fe18202d0e1e094a57105e43efa47e787d84bb6dfedb19bdcaa8a908908e3f50b173c100001808082520880860152671166bdc0", key: "m/44'/818'/0'/0/0", fee: "0.21", decimals: 18, symbol: "VET", optionParam: "")

DcentMgr.getVechainSignedTransaction(coinType: .VECHAIN, vechainTransaction: vechainTransaction) { (result, txData) in
    print("Vechain Transaction closure")
    if result == false {
        print("FAIL !!!")
    }else{
        print(txData)
    }
}

Last updated