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.

30 lines
657 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');
10 years ago
program
10 years ago
.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;
10 years ago
if (!args[0])
10 years ago
program.help();
10 years ago
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, x) {
utils.die(err);
10 years ago
console.log('Transaction signed.');
});
10 years ago
});