Skip to content

Instantly share code, notes, and snippets.

@Anderson-Juhasc
Created September 26, 2015 17:28
Show Gist options
  • Save Anderson-Juhasc/c2e04b8206c438564343 to your computer and use it in GitHub Desktop.
Save Anderson-Juhasc/c2e04b8206c438564343 to your computer and use it in GitHub Desktop.
var Bitcore = require('bitcore');
var Insight = require('bitcore-explorers').Insight;
var insight = new Insight();
insight.getUnspentUtxos('12S3tMNDJAnwPCcKwwQRgtPuiUs5sSkgHg', function(err, utxos) {
if (err) {
// Handle errors...
} else {
// Maybe use the UTXOs to create a transaction
console.log(utxos);
var transaction = new Bitcore.Transaction()
.from(utxos) // Feed information about what unspent outputs one can use
.to("1DZbtLjNNz2tk3hy7EGfksSTvx7B1esbBU", 1);
console.log(transaction);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment