How to properly use the rpc command `listunspent` with `bitcore-lib` to create a transaction and get the transaction hash?
First, you need to serialize the transaction:

let txSerialized = transaction.serialize(true);


Then you can broadcast it:

client.sendRawTransaction(txSerialized, (error, response) =&gt; { if (error) console.log(error); console.log(response); });