From 1af3b5131b4797da7a143464cc21616dee899ec7 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 16 Nov 2016 12:13:56 -0800 Subject: [PATCH] cli: account creation options. --- bin/cli | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/bin/cli b/bin/cli index 94add755..c49e936d 100755 --- a/bin/cli +++ b/bin/cli @@ -108,8 +108,26 @@ CLI.prototype.getAccount = co(function* getAccount() { }); CLI.prototype.createAccount = co(function* createAccount() { - var name = this.argv[0]; - var account = yield this.wallet.createAccount(name); + var options = { name: this.argv[0] }; + var account; + + if (this.config.type) + options.type = this.config.type; + + if (this.config.m) + options.m = this.config.m >>> 0; + + if (this.config.n) + options.n = this.config.n >>> 0; + + if (this.config.witness != null) + options.witness = !!this.config.witness; + + if (this.config.watch) + options.accountKey = this.config.watch; + + account = yield this.wallet.createAccount(options); + this.log(account); });