Skip to content

Instantly share code, notes, and snippets.

@gkucmierz
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gkucmierz/8891627 to your computer and use it in GitHub Desktop.
Save gkucmierz/8891627 to your computer and use it in GitHub Desktop.
add many transactions in brainwallet #tx
// add many transactions in brainwallet #tx
var add = function(addr, amount) {
document.querySelector('#txAddDest').click();
[].pop.call(document.querySelectorAll('#txDest')).value = addr;
[].pop.call(document.querySelectorAll('#txValue')).value = amount;
};
var addr = prompt().split(/\n/).filter(function(line) {
return line.trim() !== '';
}).map(function(line) {
var m = line.match(/(1[\w]+)\s+([0-9\,\.]+)/);
return [m[1], m[2].replace(/\,/, '.')];
});
addr.map(function(line) {
add(line[0], line[1]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment