I dont know what is wrong
var insight = new Insight('https://insight.bitpay.com','livenet');
insight.getUnspentUtxos('1MkZVyKqNB5jpJDpfhp4TkDikFwdQM44he', function(err, utxos) {
if (err) {
console.log('Error in getUnspentUtxos: ' + err);
} else {
console.log('utxos' + ' :' + JSON.stringify(utxos, undefined, 2));
var transaction = new bitcore.Transaction()
.from(utxos)
.addData('pime')// Add OP_RETURN data.
.to('1J4u97VGMz4GV7YFfRjtKLDchZ5zjiKLu4',15000)
.fee(1000)
.change('1AG1c1t3FAAEFdxmzm3wTg7XAnRGSwX5QA')
.sign(privateKey);
console.log(transaction.serialize());
//console.log(transaction);
}
});
This is the result: http://pastebin.com/raw.php?i=YNaHBcmU