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.

32 lines
726 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');
10 years ago
program
.version('0.0.1')
.option('-c,--config [file]', 'Wallet config filename')
.option('-v,--verbose', 'be verbose')
.usage('[options] <txpid>')
.parse(process.argv);
10 years ago
var args = program.args;
if (!args[0])
program.help();
var txpid = args[0];
var client = utils.getClient(program);
10 years ago
client.getTxProposals({}, function(err, txps) {
utils.die(err);
10 years ago
var txp = utils.findOneTxProposal(txps, txpid);
client.broadcastTxProposal(txp, function(err, txid) {
utils.die(err);
10 years ago
console.log('Transaction Broadcasted: TXID: ' + x.txid);
});
});