path: key path, wallet sign with that private key with a given key path (BIP32 ex) "m/44'/858'/0'/0/0").
fee: fee, It is fee that wallet displays on the screen.
symbol: symbol, It is a symbol that the wallet displays on the screen.
decimals: havah or havah token's decimals.
Requirements
D'CENT Bridge version 1.5.0 or higher is required.
D'CENT Biometric Wallet version 2.26.0 or higher is required.
Useage
import IconService from'icon-sdk-js'const { IconBuilder,IconAmount,IconConverter,IconUtil } = IconServiceconsthttpProvider=newHttpProvider('https://ctz.solidwallet.io/api/v3');consticonService=newIconService(httpProvider);// networkId of node 1:mainnet, 2~:etcconstnetworkId=newBigNumber("3"); // input node’s networkldconstversion=newBigNumber("3"); // version// Recommended icx transfer step limit :// use 'default' step cost in the response of getStepCosts APIconststepLimit=awaitthis.getDefaultStepCost(); // Please refer to the above description.// Timestamp is used to prevent the identical transactions. Only current time is required (Standard unit : us)// If the timestamp is considerably different from the current time, the transaction will be rejected.consttimestamp= (newDate()).getTime() *1000;constvalue=IconAmount.of(Number(amount),IconAmount.Unit.ICX).toLoop()// Enter transaction informationconst { IcxTransactionBuilder } = IconBuilderconsticxTransactionBuilder=newIcxTransactionBuilder();consttransaction= icxTransactionBuilder.nid(networkId).from(walletAddress).to(MockData.WALLET_ADDRESS_2).value(value).version(version).stepLimit(stepLimit).timestamp(timestamp).nonce(IconConverter.toBigNumber(1)).build();constrawData=Buffer.from(IconUtil.generateHashKey(IconConverter.toRawTransaction(tx))).toString('hex')constsigHash= rawDataconsttransactionJson= { coinType:DcentWebConnector.coinType.HAVAH, sigHash: sigHash, path:`m/44'/858'/0'/0/0`, decimals:IconAmount.Unit.ICX, fee, symbol:'HVH',}var resulttry { result =awaitDcentWebConnector.getHavahSignedTransaction(transactionJson); } catch (e) {console.log(e) result = e}