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.
25 lines
597 B
25 lines
597 B
10 years ago
|
#!/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);
|
||
|
}
|
||
|
|
||
|
});
|