Sending a transaction to another account
To send a transaction within the system you need to:
Pay commission. That is why, you need to have sufficient amount of tokens to send the transaction. The code
console.log('accountData',accountData)from the example in the code snippet above outputs the account data. The
amountfield will also display the tokens assigned to the account.
Add the following code to the code example specified in paragraph 2 of the section above:
//send 10 tokens to another account
let res= await walletApi.makeNewTx (importedWallet.wif,importedWallet.address,to,'SK',amount,comment,new Date().getTime());
The account address
is an example address. Please, replace it with your actual destination address.
Check out the next document to learn how to work with the transactions.