Skip to content

Instantly share code, notes, and snippets.

@williamcotton
Last active August 29, 2015 14:22
Show Gist options
  • Save williamcotton/79b0e76e3e3842867dd9 to your computer and use it in GitHub Desktop.
Save williamcotton/79b0e76e3e3842867dd9 to your computer and use it in GitHub Desktop.
var openpublish = require("openpublish");
document.getElementById("open-publish-file").addEventListener("click", function(event) {
getUnspentOutputs(function(err, unspentOutputs) {
openpublish.register({
file: file,
uri: uri,
address: address,
unspentOutputs: unspentOutputs,
signTransaction: signTransaction,
propagateTransaction: postTransaction
}, function(err, receipt) {
var openPublishReceiptJSON = JSON.stringify(receipt, null, 4);
document.getElementById("open-publish-receipt-json").innerHTML = openPublishReceiptJSON;
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment