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.

28 lines
677 B

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