Binance

getBinanceSignedTransaction

This function for :

  • .BINANCE - binance (BNB)

  • .BEP2 - binacne token

  • .BNB_TESTNET - binance testnet (BNB)

  • .BEP2_TESTNET - binacne testnet token

Parameters

  • coinType: binance networks coin type

  • binacneTransaction: (BinanceTransation)binacne transaction parameter

class BinanceTransaction

NameTypeDescription

std_sign_doc

String

transaction that has not been signed of binance transaction

key

String

sign key path for binace transaction

fee

String

transaction fee of binance transaction

Returns

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

  • txData: signed transaction

Requirements

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

Example

let binanceTransaction : BinanceTransaction = BinanceTransaction(std_sign_doc: "", key: "", fee: "")
  
// test data
binanceTransaction.std_sign_doc = "7b226163636f756e745f6e756d626572223a22343834303237222c22636861696e5f6964223a2242696e616e63652d436861696e2d546967726973222c2264617461223a6e756c6c2c226d656d6f223a22222c226d736773223a5b7b22696e70757473223a5b7b2261646472657373223a22626e62317a7a34647634767235687a3076647161686334707371797a39676a303974703775646d673273222c22636f696e73223a5b7b22616d6f756e74223a313030303030302c2264656e6f6d223a22424e42227d5d7d5d2c226f757470757473223a5b7b2261646472657373223a22626e6231796d33377164616e76716b72686139636b70686a6b3067336d6630367068656d33787a393437222c22636f696e73223a5b7b22616d6f756e74223a31303030303030303030302c2264656e6f6d223a22424e42227d5d7d5d7d5d2c2273657175656e6365223a2230222c22736f75726365223a2230227d"
binanceTransaction.key = "m/44'/714'/0'/0/0"
binanceTransaction.fee = "375000"
  
DcentMgr.getBinanceSignedTransaction(coinType: .BINANCE, binanceTransaction: binanceTransaction){ (result, txData) in
    print("Binance Transaction closure")
    if result == false {
        print("FAIL !!!")
    }else{
        print(txData)
    }
}

Last updated