bittensor-cli 9.3.0__py3-none-any.whl → 9.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
bittensor_cli/cli.py CHANGED
@@ -259,14 +259,15 @@ class Options:
259
259
  "--slippage-tolerance",
260
260
  "--tolerance",
261
261
  "--rate-tolerance",
262
- help="Set the rate tolerance percentage for transactions (default: 0.05%).",
262
+ help="Set the rate tolerance percentage for transactions (default: 0.05 for 5%).",
263
263
  callback=validate_rate_tolerance,
264
264
  )
265
265
  safe_staking = typer.Option(
266
266
  None,
267
267
  "--safe-staking/--no-safe-staking",
268
268
  "--safe/--unsafe",
269
- help="Enable or disable safe staking mode (default: enabled).",
269
+ show_default=False,
270
+ help="Enable or disable safe staking mode [dim](default: enabled)[/dim].",
270
271
  )
271
272
  allow_partial_stake = typer.Option(
272
273
  None,
@@ -274,7 +275,8 @@ class Options:
274
275
  "--partial/--no-partial",
275
276
  "--allow/--not-allow",
276
277
  "--allow-partial/--not-partial",
277
- help="Enable or disable partial stake mode (default: disabled).",
278
+ show_default=False,
279
+ help="Enable or disable partial stake mode [dim](default: disabled)[/dim].",
278
280
  )
279
281
  dashboard_path = typer.Option(
280
282
  None,
@@ -873,6 +875,12 @@ class CLIManager:
873
875
  self.subnets_app.command(
874
876
  "get-identity", rich_help_panel=HELP_PANELS["SUBNETS"]["IDENTITY"]
875
877
  )(self.subnets_get_identity)
878
+ self.subnets_app.command(
879
+ "start", rich_help_panel=HELP_PANELS["SUBNETS"]["CREATION"]
880
+ )(self.subnets_start)
881
+ self.subnets_app.command(
882
+ "check-start", rich_help_panel=HELP_PANELS["SUBNETS"]["INFO"]
883
+ )(self.subnets_check_start)
876
884
 
877
885
  # weights commands
878
886
  self.weights_app.command(
@@ -1184,12 +1192,14 @@ class CLIManager:
1184
1192
  "--safe-staking/--no-safe-staking",
1185
1193
  "--safe/--unsafe",
1186
1194
  help="Enable or disable safe staking mode.",
1195
+ show_default=False,
1187
1196
  ),
1188
1197
  allow_partial_stake: Optional[bool] = typer.Option(
1189
1198
  None,
1190
1199
  "--allow-partial-stake/--no-allow-partial-stake",
1191
1200
  "--partial/--no-partial",
1192
1201
  "--allow/--not-allow",
1202
+ show_default=False,
1193
1203
  ),
1194
1204
  dashboard_path: Optional[str] = Options.dashboard_path,
1195
1205
  ):
@@ -4975,6 +4985,70 @@ class CLIManager:
4975
4985
  )
4976
4986
  )
4977
4987
 
4988
+ def subnets_check_start(
4989
+ self,
4990
+ network: Optional[list[str]] = Options.network,
4991
+ netuid: int = Options.netuid,
4992
+ quiet: bool = Options.quiet,
4993
+ verbose: bool = Options.verbose,
4994
+ ):
4995
+ """
4996
+ Checks if a subnet's emission schedule can be started.
4997
+
4998
+ This command verifies if a subnet's emission schedule can be started based on the subnet's registration block.
4999
+
5000
+ Example:
5001
+ [green]$[/green] btcli subnets check_start --netuid 1
5002
+ """
5003
+ self.verbosity_handler(quiet, verbose)
5004
+ return self._run_command(
5005
+ subnets.get_start_schedule(self.initialize_chain(network), netuid)
5006
+ )
5007
+
5008
+ def subnets_start(
5009
+ self,
5010
+ wallet_name: str = Options.wallet_name,
5011
+ wallet_path: str = Options.wallet_path,
5012
+ wallet_hotkey: str = Options.wallet_hotkey,
5013
+ network: Optional[list[str]] = Options.network,
5014
+ netuid: int = Options.netuid,
5015
+ prompt: bool = Options.prompt,
5016
+ quiet: bool = Options.quiet,
5017
+ verbose: bool = Options.verbose,
5018
+ ):
5019
+ """
5020
+ Starts a subnet's emission schedule.
5021
+
5022
+ The owner of the subnet must call this command to start the emission schedule.
5023
+
5024
+ Example:
5025
+ [green]$[/green] btcli subnets start --netuid 1
5026
+ [green]$[/green] btcli subnets start --netuid 1 --wallet-name alice
5027
+ """
5028
+ self.verbosity_handler(quiet, verbose)
5029
+ if not wallet_name:
5030
+ wallet_name = Prompt.ask(
5031
+ "Enter the [blue]wallet name[/blue] [dim](which you used to create the subnet)[/dim]",
5032
+ default=self.config.get("wallet_name") or defaults.wallet.name,
5033
+ )
5034
+ wallet = self.wallet_ask(
5035
+ wallet_name,
5036
+ wallet_path,
5037
+ wallet_hotkey,
5038
+ ask_for=[
5039
+ WO.NAME,
5040
+ ],
5041
+ validate=WV.WALLET,
5042
+ )
5043
+ return self._run_command(
5044
+ subnets.start_subnet(
5045
+ wallet,
5046
+ self.initialize_chain(network),
5047
+ netuid,
5048
+ prompt,
5049
+ )
5050
+ )
5051
+
4978
5052
  def subnets_get_identity(
4979
5053
  self,
4980
5054
  network: Optional[list[str]] = Options.network,