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.
24 lines
597 B
24 lines
597 B
#!/usr/bin/env node
|
|
|
|
var _ = require('lodash');
|
|
var fs = require('fs');
|
|
var program = require('commander');
|
|
var utils = require('./cli-utils');
|
|
program = utils.configureCommander(program);
|
|
|
|
program
|
|
.option('-o, --output [filename]', 'output file')
|
|
.parse(process.argv);
|
|
|
|
var args = program.args;
|
|
var client = utils.getClient(program);
|
|
|
|
client.getTxProposals({}, function(err, txps) {
|
|
utils.die(err);
|
|
utils.renderTxProposals(txps);
|
|
if (program.output) {
|
|
fs.writeFileSync(program.output, JSON.stringify(txps));
|
|
console.log(' * Proposals Saved to: %s\n', program.output);
|
|
}
|
|
|
|
});
|
|
|