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
@@ -169,15 +169,29 @@ def edit_help(cls, option_name: str, help_text: str):
169
169
help = "Path to a JSON file containing the encrypted key backup. For example, a JSON file from PolkadotJS." ,
170
170
)
171
171
json_password = typer .Option (
172
- None , "--json-password" , help = "Password to decrypt the JSON file."
172
+ None ,
173
+ "--json-password" ,
174
+ "--json_password" ,
175
+ help = "Password to decrypt the JSON file." ,
173
176
)
174
177
use_password = typer .Option (
175
178
True ,
179
+ "--use-password" ,
180
+ "--use_password" ,
176
181
help = "Set this to `True` to protect the generated Bittensor key with a password." ,
177
182
)
178
- public_hex_key = typer .Option (None , help = "The public key in hex format." )
183
+ public_hex_key = typer .Option (
184
+ None ,
185
+ "--public-hex-key" ,
186
+ "--public_hex_key" ,
187
+ help = "The public key in hex format." ,
188
+ )
179
189
ss58_address = typer .Option (
180
- None , "--ss58" , "--ss58-address" , help = "The SS58 address of the coldkey."
190
+ None ,
191
+ "--ss58" ,
192
+ "--ss58-address" ,
193
+ "--ss58_address" ,
194
+ help = "The SS58 address of the coldkey." ,
181
195
)
182
196
overwrite = typer .Option (
183
197
False ,
@@ -208,11 +222,14 @@ def edit_help(cls, option_name: str, help_text: str):
208
222
)
209
223
netuid_not_req = typer .Option (
210
224
None ,
225
+ "--netuid" ,
211
226
help = "The netuid of the subnet in the network, (e.g. 1)." ,
212
227
prompt = False ,
213
228
)
214
229
all_netuids = typer .Option (
215
230
False ,
231
+ "--all-netuids/--not-all-netuids" ,
232
+ "--all_netuids/--not_all_netuids" ,
216
233
help = "Use all netuids" ,
217
234
prompt = False ,
218
235
)
@@ -225,6 +242,7 @@ def edit_help(cls, option_name: str, help_text: str):
225
242
reuse_last = typer .Option (
226
243
False ,
227
244
"--reuse-last" ,
245
+ "--reuse_last" ,
228
246
help = "Reuse the metagraph data you last retrieved."
229
247
"Use this option only if you have already retrieved the metagraph."
230
248
"data" ,
@@ -235,10 +253,15 @@ def edit_help(cls, option_name: str, help_text: str):
235
253
help = "Display the table as HTML in the browser." ,
236
254
)
237
255
wait_for_inclusion = typer .Option (
238
- True , help = "If `True`, waits until the transaction is included in a block."
256
+ True ,
257
+ "--wait-for-inclusion" ,
258
+ "--wait_for_inclusion" ,
259
+ help = "If `True`, waits until the transaction is included in a block." ,
239
260
)
240
261
wait_for_finalization = typer .Option (
241
262
True ,
263
+ "--wait-for-finalization" ,
264
+ "--wait_for_finalization" ,
242
265
help = "If `True`, waits until the transaction is finalized on the blockchain." ,
243
266
)
244
267
prompt = typer .Option (
@@ -276,13 +299,15 @@ def edit_help(cls, option_name: str, help_text: str):
276
299
"--slippage-tolerance" ,
277
300
"--tolerance" ,
278
301
"--rate-tolerance" ,
302
+ "--rate_tolerance" ,
279
303
help = "Set the rate tolerance percentage for transactions (default: 0.05 for 5%)." ,
280
304
callback = validate_rate_tolerance ,
281
305
)
282
306
safe_staking = typer .Option (
283
307
None ,
284
308
"--safe-staking/--no-safe-staking" ,
285
309
"--safe/--unsafe" ,
310
+ "--safe_staking/--no_safe_staking" ,
286
311
show_default = False ,
287
312
help = "Enable or disable safe staking mode [dim](default: enabled)[/dim]." ,
288
313
)
@@ -292,6 +317,7 @@ def edit_help(cls, option_name: str, help_text: str):
292
317
"--partial/--no-partial" ,
293
318
"--allow/--not-allow" ,
294
319
"--allow-partial/--not-partial" ,
320
+ "--allow_partial_stake/--no_allow_partial_stake" ,
295
321
show_default = False ,
296
322
help = "Enable or disable partial stake mode [dim](default: disabled)[/dim]." ,
297
323
)
@@ -308,6 +334,7 @@ def edit_help(cls, option_name: str, help_text: str):
308
334
False ,
309
335
"--json-output" ,
310
336
"--json-out" ,
337
+ "--json_output" ,
311
338
help = "Outputs the result of the command as JSON." ,
312
339
)
313
340
period : int = typer .Option (
@@ -929,11 +956,13 @@ def __init__(self):
929
956
)(self .view_dashboard )
930
957
931
958
# Sub command aliases
932
- # Weights
959
+ # Wallet
933
960
self .wallet_app .command (
934
961
"swap_hotkey" ,
935
962
hidden = True ,
936
963
)(self .wallet_swap_hotkey )
964
+ self .wallet_app .command ("swap_coldkey" , hidden = True )(self .wallet_swap_coldkey )
965
+ self .wallet_app .command ("swap_check" , hidden = True )(self .wallet_check_ck_swap )
937
966
self .wallet_app .command (
938
967
"regen_coldkey" ,
939
968
hidden = True ,
@@ -962,10 +991,14 @@ def __init__(self):
962
991
"get_identity" ,
963
992
hidden = True ,
964
993
)(self .wallet_get_id )
994
+ self .wallet_app .command ("associate_hotkey" )(self .wallet_associate_hotkey )
965
995
966
996
# Subnets
967
997
self .subnets_app .command ("burn_cost" , hidden = True )(self .subnets_burn_cost )
968
998
self .subnets_app .command ("pow_register" , hidden = True )(self .subnets_pow_register )
999
+ self .subnets_app .command ("set_identity" , hidden = True )(self .subnets_set_identity )
1000
+ self .subnets_app .command ("get_identity" , hidden = True )(self .subnets_get_identity )
1001
+ self .subnets_app .command ("check_start" , hidden = True )(self .subnets_check_start )
969
1002
970
1003
# Sudo
971
1004
self .sudo_app .command ("senate_vote" , hidden = True )(self .sudo_senate_vote )
0 commit comments