I've been learning to create bitcoin transactions for 3 weeks now, but keep paying the entire unspent_outputs - inputs as fees, even if the transacted amount was like 1/100 th of the outputs. How do I put the unspent output back into the output address ?
var utxo = {
"txId" : "",
"outputIndex" : "",
"address" : "",
"script" : "",
"satoshis" : ""
}
var transaction = new bitcore.Transaction()
.from(utxo)
.to(address, satoshis)
.sign(privateKeyWIF);
var tx = transaction.toString()