From 9048c722234b6e1697a7e4c9ebc78998685f918e Mon Sep 17 00:00:00 2001 From: bdhimes Date: Thu, 11 Dec 2025 18:49:31 +0200 Subject: [PATCH] Consolidates the `--coldkey-ss58` param into a predefined Option. --- bittensor_cli/cli.py | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index dab315863..574882709 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -236,6 +236,15 @@ def edit_help(cls, option_name: str, help_text: str): "--wallet.hotkey", help="Hotkey name or SS58 address of the hotkey", ) + coldkey_ss58 = typer.Option( + None, + "--ss58", + "--coldkey-ss58", + "--coldkey_ss58", + "--key", + "-k", + help="Coldkey address of the wallet", + ) mnemonic = typer.Option( None, help='Mnemonic used to regenerate your key. For example: "horse cart dog ..."', @@ -3830,16 +3839,7 @@ def wallet_get_id( wallet_name: Optional[str] = Options.wallet_name, wallet_hotkey: Optional[str] = Options.wallet_hotkey, wallet_path: Optional[str] = Options.wallet_path, - coldkey_ss58=typer.Option( - None, - "--ss58", - "--coldkey_ss58", - "--coldkey.ss58_address", - "--coldkey.ss58", - "--key", - "-k", - help="Coldkey address of the wallet", - ), + coldkey_ss58: Optional[str] = Options.coldkey_ss58, network: Optional[list[str]] = Options.network, quiet: bool = Options.quiet, verbose: bool = Options.verbose, @@ -4259,14 +4259,7 @@ def get_auto_stake( network: Optional[list[str]] = Options.network, wallet_name: Optional[str] = Options.wallet_name, wallet_path: Optional[str] = Options.wallet_path, - coldkey_ss58=typer.Option( - None, - "--ss58", - "--coldkey_ss58", - "--coldkey.ss58_address", - "--coldkey.ss58", - help="Coldkey address of the wallet", - ), + coldkey_ss58: Optional[str] = Options.coldkey_ss58, quiet: bool = Options.quiet, verbose: bool = Options.verbose, json_output: bool = Options.json_output, @@ -4394,14 +4387,7 @@ def stake_list( wallet_name: Optional[str] = Options.wallet_name, wallet_hotkey: Optional[str] = Options.wallet_hotkey, wallet_path: Optional[str] = Options.wallet_path, - coldkey_ss58=typer.Option( - None, - "--ss58", - "--coldkey_ss58", - "--coldkey.ss58_address", - "--coldkey.ss58", - help="Coldkey address of the wallet", - ), + coldkey_ss58: Optional[str] = Options.coldkey_ss58, live: bool = Options.live, quiet: bool = Options.quiet, verbose: bool = Options.verbose,