You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
651 B

10 years ago
#!/usr/bin/env node
var _ = require('lodash');
var program = require('commander');
var Client = require('../lib/client');
var utils = require('./cli-utils');
program = utils.configureCommander(program);
10 years ago
program
.usage('[options] <txpid>')
.parse(process.argv);
10 years ago
var args = program.args;
var txpid = args[0] || '';
10 years ago
utils.getClient(program, function (client) {
client.getTxProposals({}, function(err, txps) {
utils.die(err);
var txp = utils.findOneTxProposal(txps, txpid);
client.broadcastTxProposal(txp, function(err, txp) {
utils.die(err);
console.log('Transaction Broadcasted: TXID: ' + txp.txid);
});
});
});