#!/usr/bin/env node var program = require('commander'); var Client = require('../lib/client'); var fs = require('fs'); var utils = require('./cli-utils'); program = utils.configureCommander(program); program .version('0.0.1') .usage('import [options] ') .parse(process.argv); var args = program.args; if (!args[0]) program.help(); var client = utils.getClient(program); var str = fs.readFileSync(args[0]); client.import(str, function(err, x) { utils.die(err); console.log('Wallet Imported. Access level:' + x); });