http: add watchOnly options.
This commit is contained in:
parent
49ee93f472
commit
5e1b56363b
5
bin/cli
5
bin/cli
@ -53,6 +53,11 @@ CLI.prototype.createWallet = co(function* createWallet() {
|
|||||||
if (this.config.passphrase)
|
if (this.config.passphrase)
|
||||||
options.passphrase = this.config.passphrase;
|
options.passphrase = this.config.passphrase;
|
||||||
|
|
||||||
|
if (this.config.watch) {
|
||||||
|
options.watchOnly = true;
|
||||||
|
options.accountKey = this.config.watch;
|
||||||
|
}
|
||||||
|
|
||||||
wallet = yield this.client.createWallet(options);
|
wallet = yield this.client.createWallet(options);
|
||||||
this.log(wallet);
|
this.log(wallet);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -280,6 +280,16 @@ HTTPServer.prototype._init = function _init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params.watchOnly != null) {
|
||||||
|
assert(typeof params.watchOnly === 'boolean', 'watchOnly must be a boolean.');
|
||||||
|
options.watchOnly = params.watchOnly;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.accountKey) {
|
||||||
|
assert(typeof params.accountKey === 'string', 'accountKey must be a string.');
|
||||||
|
options.accountKey = params.accountKey;
|
||||||
|
}
|
||||||
|
|
||||||
if (params.outputs) {
|
if (params.outputs) {
|
||||||
assert(Array.isArray(params.outputs), 'Outputs must be an array.');
|
assert(Array.isArray(params.outputs), 'Outputs must be an array.');
|
||||||
options.outputs = [];
|
options.outputs = [];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user