bitcore
bitcore copied to clipboard
Bitcore serialization Error: message: 'undefined'
const tx = new bitcore.Transaction()
.from(inputs)
.to(recieverAddress, satoshiToSend) // In satoshis
.fee(bitcore.Unit.fromBTC(fee).toSatoshis() * 20) // In satoshis
.change(address) // Return the change to the same address
.addData() // Add metadata to the transaction
.sign(privateKey)
console.log(tx.verify())
console.log(tx)
tx.serialize()
tx.verify() is shows True and the transaction logs properly on the console.
Error comes when i try to serialize the transaction
Can you please include the text of the error message?