cc-zos
Version:
Command-line interface for the ZeppelinOS smart contract platform
24 lines (16 loc) • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _session = require('../scripts/session');
var _session2 = _interopRequireDefault(_session);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const name = 'session';
const signature = name;
const description = 'by providing network options, commands like create, freeze, push, status and update will use them unless overridden. Use --close to undo.';
const register = program => program.command(signature, { noHelp: true }).usage('[options]').description(description).option('--expires <expires>', 'expiration of the session in seconds (defaults to 900, 15 minutes)').option('--close', 'closes the current session, removing all network options set').withNetworkOptions().action(action);
function action(options) {
const { network, from, timeout, close, expires } = options;
(0, _session2.default)({ network, from, timeout, close, expires });
}
exports.default = { name, signature, description, register, action };