mirror of https://github.com/nucypher/nucypher.git
Only Ursula uses interactive mnemonic generation via config.
parent
77dfef825d
commit
44f535dbf7
|
@ -317,6 +317,7 @@ class CharacterConfiguration(BaseConfiguration):
|
||||||
|
|
||||||
CHARACTER_CLASS = NotImplemented
|
CHARACTER_CLASS = NotImplemented
|
||||||
DEFAULT_CONTROLLER_PORT = NotImplemented
|
DEFAULT_CONTROLLER_PORT = NotImplemented
|
||||||
|
MNEMONIC_KEYSTORE = False
|
||||||
DEFAULT_DOMAIN = NetworksInventory.DEFAULT
|
DEFAULT_DOMAIN = NetworksInventory.DEFAULT
|
||||||
DEFAULT_NETWORK_MIDDLEWARE = RestMiddleware
|
DEFAULT_NETWORK_MIDDLEWARE = RestMiddleware
|
||||||
TEMP_CONFIGURATION_DIR_PREFIX = 'tmp-nucypher'
|
TEMP_CONFIGURATION_DIR_PREFIX = 'tmp-nucypher'
|
||||||
|
@ -757,7 +758,7 @@ class CharacterConfiguration(BaseConfiguration):
|
||||||
power_ups.append(power_up)
|
power_ups.append(power_up)
|
||||||
return power_ups
|
return power_ups
|
||||||
|
|
||||||
def initialize(self, password: str, force: bool = False) -> str:
|
def initialize(self, password: str) -> str:
|
||||||
"""Initialize a new configuration and write installation files to disk."""
|
"""Initialize a new configuration and write installation files to disk."""
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
|
@ -768,7 +769,7 @@ class CharacterConfiguration(BaseConfiguration):
|
||||||
# Persistent
|
# Persistent
|
||||||
else:
|
else:
|
||||||
self._ensure_config_root_exists()
|
self._ensure_config_root_exists()
|
||||||
self.write_keystore(password=password, force=force)
|
self.write_keystore(password=password, interactive=self.MNEMONIC_KEYSTORE)
|
||||||
|
|
||||||
self._cache_runtime_filepaths()
|
self._cache_runtime_filepaths()
|
||||||
self.node_storage.initialize()
|
self.node_storage.initialize()
|
||||||
|
@ -782,8 +783,8 @@ class CharacterConfiguration(BaseConfiguration):
|
||||||
self.log.debug(message)
|
self.log.debug(message)
|
||||||
return self.config_root
|
return self.config_root
|
||||||
|
|
||||||
def write_keystore(self, password: str, force: bool = False) -> Keystore:
|
def write_keystore(self, password: str, interactive: bool = True) -> Keystore:
|
||||||
self.__keystore = Keystore.generate(password=password, keystore_dir=self.keystore_dir, force=force)
|
self.__keystore = Keystore.generate(password=password, keystore_dir=self.keystore_dir, interactive=interactive)
|
||||||
return self.keystore
|
return self.keystore
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
@ -49,6 +49,7 @@ class UrsulaConfiguration(CharacterConfiguration):
|
||||||
DEFAULT_AVAILABILITY_CHECKS = False
|
DEFAULT_AVAILABILITY_CHECKS = False
|
||||||
LOCAL_SIGNERS_ALLOWED = True
|
LOCAL_SIGNERS_ALLOWED = True
|
||||||
SIGNER_ENVVAR = NUCYPHER_ENVVAR_WORKER_ETH_PASSWORD
|
SIGNER_ENVVAR = NUCYPHER_ENVVAR_WORKER_ETH_PASSWORD
|
||||||
|
MNEMONIC_KEYSTORE = True
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
rest_host: str = None,
|
rest_host: str = None,
|
||||||
|
|
Loading…
Reference in New Issue