dexbot.config_validator module¶
-
class
dexbot.config_validator.
ConfigValidator
(config, bitshares_instance)¶ Bases:
object
Config validation methods.
Parameters: - config (dexbot.config.Config) – dexbot config
- bitshares.BitShares – BitShares instance
-
add_private_key
(private_key)¶ Add private key into local wallet.
Parameters: private_key (str) – private key
-
validate_account_name
(account)¶ Check whether bitshares account exists.
Parameters: account (str) – bitshares account name
-
validate_account_not_in_use
(account)¶ Check whether account is already used for another worker or not.
Parameters: account (str) – bitshares account name
-
validate_asset
(asset)¶ Check whether asset is exists on the network.
Parameters: asset (str) – asset name
-
static
validate_market
(base_asset, quote_asset)¶ Check whether market tickers is not the same.
Parameters: - base_asset (str) – BASE asset ticker
- quote_asset (str) – QUOTE asset ticker
-
validate_private_key
(account, private_key)¶ Check whether private key is associated with account.
Parameters: - account (str) – bitshares account name
- private_key (str) – private key
-
validate_private_key_type
(account, private_key)¶ Check whether private key type is “active” or “owner”.
Parameters: - account (str) – bitshares account name
- private_key (str) – private key
-
validate_worker_name
(worker_name, old_worker_name=None)¶ Check whether worker name is unique or not.
Parameters: - worker_name (str) – name of the new worker
- old_worker_name (str) – old name of the worker