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.
 
 

26 lines
704 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]', 'write tx to output file for offline signing')
.parse(process.argv);
var args = program.args;
utils.getClient(program, function (client) {
client.getTxProposals({forAirGapped: !!program.output}, function (err, res) {
utils.die(err);
if (program.output) {
fs.writeFileSync(program.output, JSON.stringify(res));
console.log(' * Tx proposals saved to: %s\n', program.output);
} else {
utils.renderTxProposals(res);
}
});
});