Hi everyone. I tried used bitcore-lib to generate signed Transaction then I will use blockdozer.com to boardcast it. But I always got this error when I tried boardcast my transaction
This is my hex string transaction:
This was my error when I had tried to boardcast it:
An error occured:
Missing inputs. Code:-25
This is my code:
const bch = require('bitcore-lib-cash');
let utxo = {
"txId" : "f8a258720cb68be265baf6828612a401567f916ee50fc276d817f647e4bc3212",
"vout" : 0,
"address" : "n282sbTawPEUSqZ5Se8W3z8MWKAV3vcr7K",
"scriptPubKey" : bch.Script.buildPublicKeyHashOut("n282sbTawPEUSqZ5Se8W3z8MWKAV3vcr7K").toString(),
"amount" : 0.0009887
};
// notice that the change address is the same as the address in the utxo
let transaction = new bch.Transaction()
.from(utxo)
.to('mrgjQLqBZih9ETT7R4hwXpXujCXuwojurS', 20000)
.fee(1000)
.change('n282sbTawPEUSqZ5Se8W3z8MWKAV3vcr7K')
.sign('7e0b3ee8e73563eea616b2084c53fa1cc8cc0ca9882298607d46956dff434856');
console.log(transaction.toString());
Hi everyone. I tried used bitcore-lib to generate signed Transaction then I will use
blockdozer.com
to boardcast it. But I always got this error when I tried boardcast my transaction This is my hex string transaction:This was my error when I had tried to boardcast it:
This is my code:
Thank you for your help