mirror of https://github.com/nucypher/nucypher.git
Allow a signer URI to be used when initializing a Bob via CLI.
parent
9324b6fb24
commit
1b1d21c79f
|
@ -116,6 +116,7 @@ class BobConfigOptions:
|
||||||
checksum_address = self.checksum_address
|
checksum_address = self.checksum_address
|
||||||
if not checksum_address and not self.federated_only:
|
if not checksum_address and not self.federated_only:
|
||||||
checksum_address = select_client_account(emitter=emitter,
|
checksum_address = select_client_account(emitter=emitter,
|
||||||
|
signer_uri=self.signer_uri,
|
||||||
provider_uri=self.provider_uri) # TODO: See #1888
|
provider_uri=self.provider_uri) # TODO: See #1888
|
||||||
|
|
||||||
return BobConfiguration.generate(
|
return BobConfiguration.generate(
|
||||||
|
|
|
@ -174,13 +174,17 @@ class UrsulaConfigOptions:
|
||||||
|
|
||||||
def generate_config(self, emitter, config_root, force):
|
def generate_config(self, emitter, config_root, force):
|
||||||
|
|
||||||
assert not self.dev # TODO: Raise instead
|
if self.dev:
|
||||||
|
raise RuntimeError('Persistent configurations cannot be created in development mode.')
|
||||||
|
|
||||||
worker_address = self.worker_address
|
worker_address = self.worker_address
|
||||||
if (not worker_address) and not self.federated_only:
|
if (not worker_address) and not self.federated_only:
|
||||||
if not worker_address:
|
if not worker_address:
|
||||||
prompt = "Select worker account"
|
prompt = "Select worker account"
|
||||||
worker_address = select_client_account(emitter=emitter, prompt=prompt, provider_uri=self.provider_uri, signer_uri=self.signer_uri)
|
worker_address = select_client_account(emitter=emitter,
|
||||||
|
prompt=prompt,
|
||||||
|
provider_uri=self.provider_uri,
|
||||||
|
signer_uri=self.signer_uri)
|
||||||
|
|
||||||
rest_host = self.rest_host
|
rest_host = self.rest_host
|
||||||
if not rest_host:
|
if not rest_host:
|
||||||
|
@ -258,8 +262,11 @@ class UrsulaCharacterOptions:
|
||||||
|
|
||||||
def create_character(self, emitter, config_file, json_ipc, load_seednodes=True):
|
def create_character(self, emitter, config_file, json_ipc, load_seednodes=True):
|
||||||
|
|
||||||
|
# TODO: embed compatibility layer?
|
||||||
ursula_config = self.config_options.create_config(emitter, config_file)
|
ursula_config = self.config_options.create_config(emitter, config_file)
|
||||||
is_clef = ClefSigner.is_valid_clef_uri(self.config_options.signer_uri)
|
is_clef = ClefSigner.is_valid_clef_uri(self.config_options.signer_uri)
|
||||||
|
|
||||||
|
# TODO: Oh
|
||||||
client_password = None
|
client_password = None
|
||||||
if not ursula_config.federated_only:
|
if not ursula_config.federated_only:
|
||||||
if not self.config_options.dev and not json_ipc and not is_clef:
|
if not self.config_options.dev and not json_ipc and not is_clef:
|
||||||
|
|
Loading…
Reference in New Issue