11
11
import traceback
12
12
import warnings
13
13
from pathlib import Path
14
- from typing import Coroutine , Optional , Union
14
+ from typing import Coroutine , Optional
15
15
from dataclasses import fields
16
16
17
17
import rich
@@ -929,11 +929,13 @@ def __init__(self):
929
929
)(self .view_dashboard )
930
930
931
931
# Sub command aliases
932
- # Weights
932
+ # Wallet
933
933
self .wallet_app .command (
934
934
"swap_hotkey" ,
935
935
hidden = True ,
936
936
)(self .wallet_swap_hotkey )
937
+ self .wallet_app .command ("swap_coldkey" , hidden = True )(self .wallet_swap_coldkey )
938
+ self .wallet_app .command ("swap_check" , hidden = True )(self .wallet_check_ck_swap )
937
939
self .wallet_app .command (
938
940
"regen_coldkey" ,
939
941
hidden = True ,
@@ -962,10 +964,14 @@ def __init__(self):
962
964
"get_identity" ,
963
965
hidden = True ,
964
966
)(self .wallet_get_id )
967
+ self .wallet_app .command ("associate_hotkey" )(self .wallet_associate_hotkey )
965
968
966
969
# Subnets
967
970
self .subnets_app .command ("burn_cost" , hidden = True )(self .subnets_burn_cost )
968
971
self .subnets_app .command ("pow_register" , hidden = True )(self .subnets_pow_register )
972
+ self .subnets_app .command ("set_identity" , hidden = True )(self .subnets_set_identity )
973
+ self .subnets_app .command ("get_identity" , hidden = True )(self .subnets_get_identity )
974
+ self .subnets_app .command ("check_start" , hidden = True )(self .subnets_check_start )
969
975
970
976
# Sudo
971
977
self .sudo_app .command ("senate_vote" , hidden = True )(self .sudo_senate_vote )
@@ -1897,6 +1903,8 @@ def wallet_swap_hotkey(
1897
1903
wallet_name : Optional [str ] = Options .wallet_name ,
1898
1904
wallet_path : Optional [str ] = Options .wallet_path ,
1899
1905
wallet_hotkey : Optional [str ] = Options .wallet_hotkey ,
1906
+ netuid : Optional [int ] = Options .netuid_not_req ,
1907
+ all_netuids : bool = Options .all_netuids ,
1900
1908
network : Optional [list [str ]] = Options .network ,
1901
1909
destination_hotkey_name : Optional [str ] = typer .Argument (
1902
1910
None , help = "Destination hotkey name."
@@ -1917,12 +1925,14 @@ def wallet_swap_hotkey(
1917
1925
1918
1926
- Make sure that your original key pair (coldkeyA, hotkeyA) is already registered.
1919
1927
- Make sure that you use a newly created hotkeyB in this command. A hotkeyB that is already registered cannot be used in this command.
1928
+ - You can specify the netuid for which you want to swap the hotkey for. If it is not defined, the swap will be initiated for all subnets.
1920
1929
- Finally, note that this command requires a fee of 1 TAO for recycling and this fee is taken from your wallet (coldkeyA).
1921
1930
1922
1931
EXAMPLE
1923
1932
1924
- [green]$[/green] btcli wallet swap_hotkey destination_hotkey_name --wallet-name your_wallet_name --wallet-hotkey original_hotkey
1933
+ [green]$[/green] btcli wallet swap_hotkey destination_hotkey_name --wallet-name your_wallet_name --wallet-hotkey original_hotkey --netuid 1
1925
1934
"""
1935
+ netuid = get_optional_netuid (netuid , all_netuids )
1926
1936
self .verbosity_handler (quiet , verbose , json_output )
1927
1937
original_wallet = self .wallet_ask (
1928
1938
wallet_name ,
@@ -1946,7 +1956,7 @@ def wallet_swap_hotkey(
1946
1956
self .initialize_chain (network )
1947
1957
return self ._run_command (
1948
1958
wallets .swap_hotkey (
1949
- original_wallet , new_wallet , self .subtensor , prompt , json_output
1959
+ original_wallet , new_wallet , self .subtensor , netuid , prompt , json_output
1950
1960
)
1951
1961
)
1952
1962
@@ -5021,6 +5031,7 @@ def subnets_create(
5021
5031
description : Optional [str ] = typer .Option (
5022
5032
None , "--description" , help = "Description"
5023
5033
),
5034
+ logo_url : Optional [str ] = typer .Option (None , "--logo-url" , help = "Logo URL" ),
5024
5035
additional_info : Optional [str ] = typer .Option (
5025
5036
None , "--additional-info" , help = "Additional information"
5026
5037
),
@@ -5063,6 +5074,7 @@ def subnets_create(
5063
5074
subnet_url = subnet_url ,
5064
5075
discord = discord ,
5065
5076
description = description ,
5077
+ logo_url = logo_url ,
5066
5078
additional = additional_info ,
5067
5079
)
5068
5080
self ._run_command (
@@ -5084,7 +5096,7 @@ def subnets_check_start(
5084
5096
This command verifies if a subnet's emission schedule can be started based on the subnet's registration block.
5085
5097
5086
5098
Example:
5087
- [green]$[/green] btcli subnets check_start --netuid 1
5099
+ [green]$[/green] btcli subnets check-start --netuid 1
5088
5100
"""
5089
5101
self .verbosity_handler (quiet , verbose )
5090
5102
return self ._run_command (
@@ -5186,6 +5198,7 @@ def subnets_set_identity(
5186
5198
description : Optional [str ] = typer .Option (
5187
5199
None , "--description" , help = "Description"
5188
5200
),
5201
+ logo_url : Optional [str ] = typer .Option (None , "--logo-url" , help = "Logo URL" ),
5189
5202
additional_info : Optional [str ] = typer .Option (
5190
5203
None , "--additional-info" , help = "Additional information"
5191
5204
),
@@ -5237,6 +5250,7 @@ def subnets_set_identity(
5237
5250
subnet_url = subnet_url ,
5238
5251
discord = discord ,
5239
5252
description = description ,
5253
+ logo_url = logo_url ,
5240
5254
additional = additional_info ,
5241
5255
)
5242
5256
0 commit comments