bittensor-cli 9.1.4__py3-none-any.whl → 9.2.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/src/bittensor/subtensor_interface.py +66 -0
- bittensor_cli/src/commands/stake/add.py +42 -10
- bittensor_cli/src/commands/stake/move.py +43 -6
- bittensor_cli/src/commands/stake/remove.py +73 -12
- {bittensor_cli-9.1.4.dist-info → bittensor_cli-9.2.0.dist-info}/METADATA +25 -5
- {bittensor_cli-9.1.4.dist-info → bittensor_cli-9.2.0.dist-info}/RECORD +9 -9
- {bittensor_cli-9.1.4.dist-info → bittensor_cli-9.2.0.dist-info}/WHEEL +0 -0
- {bittensor_cli-9.1.4.dist-info → bittensor_cli-9.2.0.dist-info}/entry_points.txt +0 -0
- {bittensor_cli-9.1.4.dist-info → bittensor_cli-9.2.0.dist-info}/top_level.txt +0 -0
@@ -1435,3 +1435,69 @@ class SubtensorInterface:
|
|
1435
1435
|
)
|
1436
1436
|
|
1437
1437
|
return [decode_account_id(hotkey[0]) for hotkey in owned_hotkeys or []]
|
1438
|
+
|
1439
|
+
async def get_stake_fee(
|
1440
|
+
self,
|
1441
|
+
origin_hotkey_ss58: Optional[str],
|
1442
|
+
origin_netuid: Optional[int],
|
1443
|
+
origin_coldkey_ss58: str,
|
1444
|
+
destination_hotkey_ss58: Optional[str],
|
1445
|
+
destination_netuid: Optional[int],
|
1446
|
+
destination_coldkey_ss58: str,
|
1447
|
+
amount: int,
|
1448
|
+
block_hash: Optional[str] = None,
|
1449
|
+
) -> Balance:
|
1450
|
+
"""
|
1451
|
+
Calculates the fee for a staking operation.
|
1452
|
+
|
1453
|
+
:param origin_hotkey_ss58: SS58 address of source hotkey (None for new stake)
|
1454
|
+
:param origin_netuid: Netuid of source subnet (None for new stake)
|
1455
|
+
:param origin_coldkey_ss58: SS58 address of source coldkey
|
1456
|
+
:param destination_hotkey_ss58: SS58 address of destination hotkey (None for removing stake)
|
1457
|
+
:param destination_netuid: Netuid of destination subnet (None for removing stake)
|
1458
|
+
:param destination_coldkey_ss58: SS58 address of destination coldkey
|
1459
|
+
:param amount: Amount of stake to transfer in RAO
|
1460
|
+
:param block_hash: Optional block hash at which to perform the calculation
|
1461
|
+
|
1462
|
+
:return: The calculated stake fee as a Balance object
|
1463
|
+
|
1464
|
+
When to use None:
|
1465
|
+
|
1466
|
+
1. Adding new stake (default fee):
|
1467
|
+
- origin_hotkey_ss58 = None
|
1468
|
+
- origin_netuid = None
|
1469
|
+
- All other fields required
|
1470
|
+
|
1471
|
+
2. Removing stake (default fee):
|
1472
|
+
- destination_hotkey_ss58 = None
|
1473
|
+
- destination_netuid = None
|
1474
|
+
- All other fields required
|
1475
|
+
|
1476
|
+
For all other operations, no None values - provide all parameters:
|
1477
|
+
3. Moving between subnets
|
1478
|
+
4. Moving between hotkeys
|
1479
|
+
5. Moving between coldkeys
|
1480
|
+
"""
|
1481
|
+
|
1482
|
+
origin = None
|
1483
|
+
if origin_hotkey_ss58 is not None and origin_netuid is not None:
|
1484
|
+
origin = (origin_hotkey_ss58, origin_netuid)
|
1485
|
+
|
1486
|
+
destination = None
|
1487
|
+
if destination_hotkey_ss58 is not None and destination_netuid is not None:
|
1488
|
+
destination = (destination_hotkey_ss58, destination_netuid)
|
1489
|
+
|
1490
|
+
result = await self.query_runtime_api(
|
1491
|
+
runtime_api="StakeInfoRuntimeApi",
|
1492
|
+
method="get_stake_fee",
|
1493
|
+
params=[
|
1494
|
+
origin,
|
1495
|
+
origin_coldkey_ss58,
|
1496
|
+
destination,
|
1497
|
+
destination_coldkey_ss58,
|
1498
|
+
amount,
|
1499
|
+
],
|
1500
|
+
block_hash=block_hash,
|
1501
|
+
)
|
1502
|
+
|
1503
|
+
return Balance.from_rao(result)
|
@@ -282,10 +282,24 @@ async def stake_add(
|
|
282
282
|
return False
|
283
283
|
remaining_wallet_balance -= amount_to_stake
|
284
284
|
|
285
|
-
|
286
|
-
|
287
|
-
|
285
|
+
stake_fee = await subtensor.get_stake_fee(
|
286
|
+
origin_hotkey_ss58=None,
|
287
|
+
origin_netuid=None,
|
288
|
+
origin_coldkey_ss58=wallet.coldkeypub.ss58_address,
|
289
|
+
destination_hotkey_ss58=hotkey[1],
|
290
|
+
destination_netuid=netuid,
|
291
|
+
destination_coldkey_ss58=wallet.coldkeypub.ss58_address,
|
292
|
+
amount=amount_to_stake.rao,
|
288
293
|
)
|
294
|
+
|
295
|
+
# Calculate slippage
|
296
|
+
try:
|
297
|
+
received_amount, slippage_pct, slippage_pct_float, rate = (
|
298
|
+
_calculate_slippage(subnet_info, amount_to_stake, stake_fee)
|
299
|
+
)
|
300
|
+
except ValueError:
|
301
|
+
return False
|
302
|
+
|
289
303
|
max_slippage = max(slippage_pct_float, max_slippage)
|
290
304
|
|
291
305
|
# Add rows for the table
|
@@ -296,6 +310,7 @@ async def stake_add(
|
|
296
310
|
str(rate)
|
297
311
|
+ f" {Balance.get_unit(netuid)}/{Balance.get_unit(0)} ", # rate
|
298
312
|
str(received_amount.set_unit(netuid)), # received
|
313
|
+
str(stake_fee), # fee
|
299
314
|
str(slippage_pct), # slippage
|
300
315
|
]
|
301
316
|
|
@@ -531,6 +546,11 @@ def _define_stake_table(
|
|
531
546
|
justify="center",
|
532
547
|
style=COLOR_PALETTE["POOLS"]["TAO_EQUIV"],
|
533
548
|
)
|
549
|
+
table.add_column(
|
550
|
+
"Fee (τ)",
|
551
|
+
justify="center",
|
552
|
+
style=COLOR_PALETTE["STAKE"]["STAKE_AMOUNT"],
|
553
|
+
)
|
534
554
|
table.add_column(
|
535
555
|
"Slippage", justify="center", style=COLOR_PALETTE["STAKE"]["SLIPPAGE_PERCENT"]
|
536
556
|
)
|
@@ -585,29 +605,41 @@ The columns are as follows:
|
|
585
605
|
|
586
606
|
|
587
607
|
def _calculate_slippage(
|
588
|
-
subnet_info, amount: Balance
|
608
|
+
subnet_info, amount: Balance, stake_fee: Balance
|
589
609
|
) -> tuple[Balance, str, float, str]:
|
590
610
|
"""Calculate slippage when adding stake.
|
591
611
|
|
592
612
|
Args:
|
593
613
|
subnet_info: Subnet dynamic info
|
594
614
|
amount: Amount being staked
|
615
|
+
stake_fee: Transaction fee for the stake operation
|
595
616
|
|
596
617
|
Returns:
|
597
618
|
tuple containing:
|
598
|
-
- received_amount: Amount received after slippage
|
619
|
+
- received_amount: Amount received after slippage and fees
|
599
620
|
- slippage_str: Formatted slippage percentage string
|
600
621
|
- slippage_float: Raw slippage percentage value
|
622
|
+
- rate: Exchange rate string
|
601
623
|
"""
|
602
|
-
|
603
|
-
|
604
|
-
|
624
|
+
amount_after_fee = amount - stake_fee
|
625
|
+
|
626
|
+
if amount_after_fee < 0:
|
627
|
+
print_error("You don't have enough balance to cover the stake fee.")
|
628
|
+
raise ValueError()
|
629
|
+
|
630
|
+
received_amount, _, _ = subnet_info.tao_to_alpha_with_slippage(amount_after_fee)
|
631
|
+
|
605
632
|
if subnet_info.is_dynamic:
|
633
|
+
ideal_amount = subnet_info.tao_to_alpha(amount)
|
634
|
+
total_slippage = ideal_amount - received_amount
|
635
|
+
slippage_pct_float = 100 * (total_slippage.tao / ideal_amount.tao)
|
606
636
|
slippage_str = f"{slippage_pct_float:.4f} %"
|
607
637
|
rate = f"{(1 / subnet_info.price.tao or 1):.4f}"
|
608
638
|
else:
|
609
|
-
slippage_pct_float =
|
610
|
-
|
639
|
+
slippage_pct_float = (
|
640
|
+
100 * float(stake_fee.tao) / float(amount.tao) if amount.tao != 0 else 0
|
641
|
+
)
|
642
|
+
slippage_str = f"{slippage_pct_float:.4f} %"
|
611
643
|
rate = "1"
|
612
644
|
|
613
645
|
return received_amount, slippage_str, slippage_pct_float, rate
|
@@ -32,13 +32,14 @@ async def display_stake_movement_cross_subnets(
|
|
32
32
|
origin_hotkey: str,
|
33
33
|
destination_hotkey: str,
|
34
34
|
amount_to_move: Balance,
|
35
|
+
stake_fee: Balance,
|
35
36
|
) -> tuple[Balance, float, str, str]:
|
36
37
|
"""Calculate and display slippage information"""
|
37
38
|
|
38
39
|
if origin_netuid == destination_netuid:
|
39
40
|
subnet = await subtensor.subnet(origin_netuid)
|
40
41
|
received_amount_tao = subnet.alpha_to_tao(amount_to_move)
|
41
|
-
received_amount_tao -=
|
42
|
+
received_amount_tao -= stake_fee
|
42
43
|
|
43
44
|
if received_amount_tao < Balance.from_tao(0):
|
44
45
|
print_error("Not enough Alpha to pay the transaction fee.")
|
@@ -46,7 +47,7 @@ async def display_stake_movement_cross_subnets(
|
|
46
47
|
|
47
48
|
received_amount = subnet.tao_to_alpha(received_amount_tao)
|
48
49
|
slippage_pct_float = (
|
49
|
-
100 * float(
|
50
|
+
100 * float(stake_fee) / float(stake_fee + received_amount_tao)
|
50
51
|
if received_amount_tao != 0
|
51
52
|
else 0
|
52
53
|
)
|
@@ -67,7 +68,7 @@ async def display_stake_movement_cross_subnets(
|
|
67
68
|
received_amount_tao, _, _ = dynamic_origin.alpha_to_tao_with_slippage(
|
68
69
|
amount_to_move
|
69
70
|
)
|
70
|
-
received_amount_tao -=
|
71
|
+
received_amount_tao -= stake_fee
|
71
72
|
received_amount, _, _ = dynamic_destination.tao_to_alpha_with_slippage(
|
72
73
|
received_amount_tao
|
73
74
|
)
|
@@ -135,6 +136,11 @@ async def display_stake_movement_cross_subnets(
|
|
135
136
|
justify="center",
|
136
137
|
style=COLOR_PALETTE["POOLS"]["TAO_EQUIV"],
|
137
138
|
)
|
139
|
+
table.add_column(
|
140
|
+
"Fee (τ)",
|
141
|
+
justify="center",
|
142
|
+
style=COLOR_PALETTE["STAKE"]["STAKE_AMOUNT"],
|
143
|
+
)
|
138
144
|
table.add_column(
|
139
145
|
"slippage",
|
140
146
|
justify="center",
|
@@ -149,13 +155,11 @@ async def display_stake_movement_cross_subnets(
|
|
149
155
|
str(amount_to_move),
|
150
156
|
price_str,
|
151
157
|
str(received_amount),
|
158
|
+
str(stake_fee),
|
152
159
|
str(slippage_pct),
|
153
160
|
)
|
154
161
|
|
155
162
|
console.print(table)
|
156
|
-
# console.print(
|
157
|
-
# f"[dim]A fee of {MIN_STAKE_FEE} applies.[/dim]"
|
158
|
-
# )
|
159
163
|
|
160
164
|
# Display slippage warning if necessary
|
161
165
|
if slippage_pct_float > 5:
|
@@ -513,6 +517,16 @@ async def move_stake(
|
|
513
517
|
)
|
514
518
|
return False
|
515
519
|
|
520
|
+
stake_fee = await subtensor.get_stake_fee(
|
521
|
+
origin_hotkey_ss58=origin_hotkey,
|
522
|
+
origin_netuid=origin_netuid,
|
523
|
+
origin_coldkey_ss58=wallet.coldkeypub.ss58_address,
|
524
|
+
destination_hotkey_ss58=destination_hotkey,
|
525
|
+
destination_netuid=destination_netuid,
|
526
|
+
destination_coldkey_ss58=wallet.coldkeypub.ss58_address,
|
527
|
+
amount=amount_to_move_as_balance.rao,
|
528
|
+
)
|
529
|
+
|
516
530
|
# Slippage warning
|
517
531
|
if prompt:
|
518
532
|
try:
|
@@ -523,6 +537,7 @@ async def move_stake(
|
|
523
537
|
origin_hotkey=origin_hotkey,
|
524
538
|
destination_hotkey=destination_hotkey,
|
525
539
|
amount_to_move=amount_to_move_as_balance,
|
540
|
+
stake_fee=stake_fee,
|
526
541
|
)
|
527
542
|
except ValueError:
|
528
543
|
return False
|
@@ -686,6 +701,16 @@ async def transfer_stake(
|
|
686
701
|
)
|
687
702
|
return False
|
688
703
|
|
704
|
+
stake_fee = await subtensor.get_stake_fee(
|
705
|
+
origin_hotkey_ss58=origin_hotkey,
|
706
|
+
origin_netuid=origin_netuid,
|
707
|
+
origin_coldkey_ss58=wallet.coldkeypub.ss58_address,
|
708
|
+
destination_hotkey_ss58=origin_hotkey,
|
709
|
+
destination_netuid=dest_netuid,
|
710
|
+
destination_coldkey_ss58=dest_coldkey_ss58,
|
711
|
+
amount=amount_to_transfer.rao,
|
712
|
+
)
|
713
|
+
|
689
714
|
# Slippage warning
|
690
715
|
if prompt:
|
691
716
|
try:
|
@@ -696,6 +721,7 @@ async def transfer_stake(
|
|
696
721
|
origin_hotkey=origin_hotkey,
|
697
722
|
destination_hotkey=origin_hotkey,
|
698
723
|
amount_to_move=amount_to_transfer,
|
724
|
+
stake_fee=stake_fee,
|
699
725
|
)
|
700
726
|
except ValueError:
|
701
727
|
return False
|
@@ -844,6 +870,16 @@ async def swap_stake(
|
|
844
870
|
)
|
845
871
|
return False
|
846
872
|
|
873
|
+
stake_fee = await subtensor.get_stake_fee(
|
874
|
+
origin_hotkey_ss58=hotkey_ss58,
|
875
|
+
origin_netuid=origin_netuid,
|
876
|
+
origin_coldkey_ss58=wallet.coldkeypub.ss58_address,
|
877
|
+
destination_hotkey_ss58=hotkey_ss58,
|
878
|
+
destination_netuid=destination_netuid,
|
879
|
+
destination_coldkey_ss58=wallet.coldkeypub.ss58_address,
|
880
|
+
amount=amount_to_swap.rao,
|
881
|
+
)
|
882
|
+
|
847
883
|
# Slippage warning
|
848
884
|
if prompt:
|
849
885
|
try:
|
@@ -854,6 +890,7 @@ async def swap_stake(
|
|
854
890
|
origin_hotkey=hotkey_ss58,
|
855
891
|
destination_hotkey=hotkey_ss58,
|
856
892
|
amount_to_move=amount_to_swap,
|
893
|
+
stake_fee=stake_fee,
|
857
894
|
)
|
858
895
|
except ValueError:
|
859
896
|
return False
|
@@ -194,9 +194,25 @@ async def unstake(
|
|
194
194
|
)
|
195
195
|
continue # Skip to the next subnet - useful when single amount is specified for all subnets
|
196
196
|
|
197
|
-
|
198
|
-
|
197
|
+
stake_fee = await subtensor.get_stake_fee(
|
198
|
+
origin_hotkey_ss58=staking_address_ss58,
|
199
|
+
origin_netuid=netuid,
|
200
|
+
origin_coldkey_ss58=wallet.coldkeypub.ss58_address,
|
201
|
+
destination_hotkey_ss58=None,
|
202
|
+
destination_netuid=None,
|
203
|
+
destination_coldkey_ss58=wallet.coldkeypub.ss58_address,
|
204
|
+
amount=amount_to_unstake_as_balance.rao,
|
199
205
|
)
|
206
|
+
|
207
|
+
try:
|
208
|
+
received_amount, slippage_pct, slippage_pct_float = _calculate_slippage(
|
209
|
+
subnet_info=subnet_info,
|
210
|
+
amount=amount_to_unstake_as_balance,
|
211
|
+
stake_fee=stake_fee,
|
212
|
+
)
|
213
|
+
except ValueError:
|
214
|
+
continue
|
215
|
+
|
200
216
|
total_received_amount += received_amount
|
201
217
|
max_float_slippage = max(max_float_slippage, slippage_pct_float)
|
202
218
|
|
@@ -220,6 +236,7 @@ async def unstake(
|
|
220
236
|
str(amount_to_unstake_as_balance), # Amount to Unstake
|
221
237
|
str(subnet_info.price.tao)
|
222
238
|
+ f"({Balance.get_unit(0)}/{Balance.get_unit(netuid)})", # Rate
|
239
|
+
str(stake_fee), # Fee
|
223
240
|
str(received_amount), # Received Amount
|
224
241
|
slippage_pct, # Slippage Percent
|
225
242
|
]
|
@@ -411,6 +428,11 @@ async def unstake_all(
|
|
411
428
|
justify="center",
|
412
429
|
style=COLOR_PALETTE["POOLS"]["RATE"],
|
413
430
|
)
|
431
|
+
table.add_column(
|
432
|
+
f"Fee ({Balance.unit})",
|
433
|
+
justify="center",
|
434
|
+
style=COLOR_PALETTE["STAKE"]["STAKE_AMOUNT"],
|
435
|
+
)
|
414
436
|
table.add_column(
|
415
437
|
f"Recieved ({Balance.unit})",
|
416
438
|
justify="center",
|
@@ -432,9 +454,22 @@ async def unstake_all(
|
|
432
454
|
hotkey_display = hotkey_names.get(stake.hotkey_ss58, stake.hotkey_ss58)
|
433
455
|
subnet_info = all_sn_dynamic_info.get(stake.netuid)
|
434
456
|
stake_amount = stake.stake
|
435
|
-
|
436
|
-
|
457
|
+
stake_fee = await subtensor.get_stake_fee(
|
458
|
+
origin_hotkey_ss58=stake.hotkey_ss58,
|
459
|
+
origin_netuid=stake.netuid,
|
460
|
+
origin_coldkey_ss58=wallet.coldkeypub.ss58_address,
|
461
|
+
destination_hotkey_ss58=None,
|
462
|
+
destination_netuid=None,
|
463
|
+
destination_coldkey_ss58=wallet.coldkeypub.ss58_address,
|
464
|
+
amount=stake_amount.rao,
|
437
465
|
)
|
466
|
+
try:
|
467
|
+
received_amount, slippage_pct, slippage_pct_float = _calculate_slippage(
|
468
|
+
subnet_info=subnet_info, amount=stake_amount, stake_fee=stake_fee
|
469
|
+
)
|
470
|
+
except ValueError:
|
471
|
+
continue
|
472
|
+
|
438
473
|
max_slippage = max(max_slippage, slippage_pct_float)
|
439
474
|
total_received_value += received_amount
|
440
475
|
|
@@ -444,6 +479,7 @@ async def unstake_all(
|
|
444
479
|
str(stake_amount),
|
445
480
|
str(float(subnet_info.price))
|
446
481
|
+ f"({Balance.get_unit(0)}/{Balance.get_unit(stake.netuid)})",
|
482
|
+
str(stake_fee),
|
447
483
|
str(received_amount),
|
448
484
|
slippage_pct,
|
449
485
|
)
|
@@ -791,28 +827,47 @@ async def _unstake_all_extrinsic(
|
|
791
827
|
|
792
828
|
|
793
829
|
# Helpers
|
794
|
-
def _calculate_slippage(
|
830
|
+
def _calculate_slippage(
|
831
|
+
subnet_info, amount: Balance, stake_fee: Balance
|
832
|
+
) -> tuple[Balance, str, float]:
|
795
833
|
"""Calculate slippage and received amount for unstaking operation.
|
796
834
|
|
797
835
|
Args:
|
798
836
|
subnet_info: Subnet information containing price data
|
799
837
|
amount: Amount being unstaked
|
838
|
+
stake_fee: Stake fee to include in slippage calculation
|
800
839
|
|
801
840
|
Returns:
|
802
841
|
tuple containing:
|
803
|
-
- received_amount: Balance after slippage
|
842
|
+
- received_amount: Balance after slippage deduction
|
804
843
|
- slippage_pct: Formatted string of slippage percentage
|
805
844
|
- slippage_pct_float: Float value of slippage percentage
|
806
845
|
"""
|
807
|
-
received_amount, _,
|
808
|
-
|
809
|
-
|
846
|
+
received_amount, _, _ = subnet_info.alpha_to_tao_with_slippage(amount)
|
847
|
+
received_amount -= stake_fee
|
848
|
+
|
849
|
+
if received_amount < Balance.from_tao(0):
|
850
|
+
print_error("Not enough Alpha to pay the transaction fee.")
|
851
|
+
raise ValueError
|
810
852
|
|
811
853
|
if subnet_info.is_dynamic:
|
854
|
+
# Ideal amount w/o slippage
|
855
|
+
ideal_amount = subnet_info.alpha_to_tao(amount)
|
856
|
+
|
857
|
+
# Total slippage including fees
|
858
|
+
total_slippage = ideal_amount - received_amount
|
859
|
+
slippage_pct_float = (
|
860
|
+
100 * (float(total_slippage.tao) / float(ideal_amount.tao))
|
861
|
+
if ideal_amount.tao != 0
|
862
|
+
else 0
|
863
|
+
)
|
812
864
|
slippage_pct = f"{slippage_pct_float:.4f} %"
|
813
865
|
else:
|
814
|
-
|
815
|
-
|
866
|
+
# Root will only have fee-based slippage
|
867
|
+
slippage_pct_float = (
|
868
|
+
100 * float(stake_fee.tao) / float(amount.tao) if amount.tao != 0 else 0
|
869
|
+
)
|
870
|
+
slippage_pct = f"{slippage_pct_float:.4f} %"
|
816
871
|
|
817
872
|
return received_amount, slippage_pct, slippage_pct_float
|
818
873
|
|
@@ -1174,6 +1229,11 @@ def _create_unstake_table(
|
|
1174
1229
|
justify="center",
|
1175
1230
|
style=COLOR_PALETTE["POOLS"]["RATE"],
|
1176
1231
|
)
|
1232
|
+
table.add_column(
|
1233
|
+
f"Fee ({Balance.get_unit(0)})",
|
1234
|
+
justify="center",
|
1235
|
+
style=COLOR_PALETTE["STAKE"]["STAKE_AMOUNT"],
|
1236
|
+
)
|
1177
1237
|
table.add_column(
|
1178
1238
|
f"Received ({Balance.get_unit(0)})",
|
1179
1239
|
justify="center",
|
@@ -1227,7 +1287,8 @@ The columns are as follows:
|
|
1227
1287
|
- [bold white]Hotkey[/bold white]: The ss58 address or identity of the hotkey you are unstaking from.
|
1228
1288
|
- [bold white]Amount to Unstake[/bold white]: The stake amount you are removing from this key.
|
1229
1289
|
- [bold white]Rate[/bold white]: The rate of exchange between TAO and the subnet's stake.
|
1230
|
-
- [bold white]
|
1290
|
+
- [bold white]Fee[/bold white]: The transaction fee for this unstake operation.
|
1291
|
+
- [bold white]Received[/bold white]: The amount of free balance TAO you will receive on this subnet after slippage and fees.
|
1231
1292
|
- [bold white]Slippage[/bold white]: The slippage percentage of the unstake operation. (0% if the subnet is not dynamic i.e. root)."""
|
1232
1293
|
|
1233
1294
|
safe_staking_description = """
|
@@ -1,15 +1,15 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: bittensor-cli
|
3
|
-
Version: 9.
|
3
|
+
Version: 9.2.0
|
4
4
|
Summary: Bittensor CLI
|
5
5
|
Author: bittensor.com
|
6
6
|
Project-URL: homepage, https://github.com/opentensor/btcli
|
7
7
|
Project-URL: Repository, https://github.com/opentensor/btcli
|
8
|
-
Requires-Python: <3.
|
8
|
+
Requires-Python: <3.14,>=3.9
|
9
9
|
Description-Content-Type: text/markdown
|
10
10
|
Requires-Dist: wheel
|
11
11
|
Requires-Dist: async-property==0.2.2
|
12
|
-
Requires-Dist: async-substrate-interface>=1.0.
|
12
|
+
Requires-Dist: async-substrate-interface>=1.0.8
|
13
13
|
Requires-Dist: aiohttp~=3.10.2
|
14
14
|
Requires-Dist: backoff~=2.2.1
|
15
15
|
Requires-Dist: GitPython>=3.0.0
|
@@ -31,7 +31,6 @@ Requires-Dist: pywry>=0.6.2
|
|
31
31
|
Requires-Dist: plotly>=6.0.0
|
32
32
|
Provides-Extra: cuda
|
33
33
|
Requires-Dist: torch<2.6.0,>=1.13.1; extra == "cuda"
|
34
|
-
Requires-Dist: cubit>=1.1.0; extra == "cuda"
|
35
34
|
|
36
35
|
<div align="center">
|
37
36
|
|
@@ -74,7 +73,20 @@ Installation steps are described below. For a full documentation on how to use `
|
|
74
73
|
|
75
74
|
## Install on macOS and Linux
|
76
75
|
|
77
|
-
You can install `btcli` on your local machine directly from source. **Make sure you verify your installation after you install**:
|
76
|
+
You can install `btcli` on your local machine directly from source, or from from PyPI. **Make sure you verify your installation after you install**:
|
77
|
+
|
78
|
+
|
79
|
+
### Install from PyPI
|
80
|
+
|
81
|
+
Run
|
82
|
+
```
|
83
|
+
pip install -U bittensor-cli
|
84
|
+
```
|
85
|
+
|
86
|
+
Alternatively, if you prefer to use [uv](https://pypi.org/project/uv/):
|
87
|
+
```
|
88
|
+
uv pip install bittensor-cli
|
89
|
+
```
|
78
90
|
|
79
91
|
### Install from source
|
80
92
|
|
@@ -104,6 +116,14 @@ cd btcli
|
|
104
116
|
pip3 install .
|
105
117
|
```
|
106
118
|
|
119
|
+
### Also install bittensor (SDK)
|
120
|
+
|
121
|
+
If you prefer to install the btcli alongside the bittensor SDK, you can do this in a single command with
|
122
|
+
|
123
|
+
```
|
124
|
+
pip install -U bittensor[cli]
|
125
|
+
```
|
126
|
+
|
107
127
|
---
|
108
128
|
|
109
129
|
## Install on Windows
|
@@ -8,7 +8,7 @@ bittensor_cli/src/bittensor/balances.py,sha256=q5KkxF8wmUguWAFddEKstfDKTxPe5ISHp
|
|
8
8
|
bittensor_cli/src/bittensor/chain_data.py,sha256=IPgimCD3US5xZqoIBvH4jQza4LDbfUIpFfl_Orgok1Q,41637
|
9
9
|
bittensor_cli/src/bittensor/minigraph.py,sha256=BIzmSVLfBYiRAeGD_i1LAC8Cw7zxp38a91SIFEPMqYc,10479
|
10
10
|
bittensor_cli/src/bittensor/networking.py,sha256=pZLMs8YXpZzDMLXWMBb_Bj6TVkm_q9khyY-lnbwVMuE,462
|
11
|
-
bittensor_cli/src/bittensor/subtensor_interface.py,sha256=
|
11
|
+
bittensor_cli/src/bittensor/subtensor_interface.py,sha256=FM3wiKPIDeclHQNFvzLlvCfLrncPPSYIUtU8HYFEXmE,56982
|
12
12
|
bittensor_cli/src/bittensor/utils.py,sha256=6oJmqiW-ECEobs0z37Eyzu__MfvEU0DyAD_j3FCfzmI,47530
|
13
13
|
bittensor_cli/src/bittensor/extrinsics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
14
|
bittensor_cli/src/bittensor/extrinsics/registration.py,sha256=3mJZ3hw_wZEa-8I0R8WVuKjMQi4Y9EV5FjTCvbY37Iw,63780
|
@@ -20,16 +20,16 @@ bittensor_cli/src/commands/view.py,sha256=2MdhWWbY9rwGqDilzs8r2ioa0l2GzrYxe8pKka
|
|
20
20
|
bittensor_cli/src/commands/wallets.py,sha256=AGV8JFCvRE_OOJv6NozxmyO4Cvf4y5HYXVfI_1kl70M,50736
|
21
21
|
bittensor_cli/src/commands/weights.py,sha256=uI7aACKD90JOtYt61VdKL76z7Fe_wh4WtdwMXL6ydD4,16269
|
22
22
|
bittensor_cli/src/commands/stake/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
|
-
bittensor_cli/src/commands/stake/add.py,sha256=
|
23
|
+
bittensor_cli/src/commands/stake/add.py,sha256=xJLVcU7RZmksxU29gNh22WLiL5ZWcIm1dKEeYo4IfMc,25816
|
24
24
|
bittensor_cli/src/commands/stake/children_hotkeys.py,sha256=Eg0Rq_R2DYBsjEBqqNHElJchQ6MlZePkW_oWlifXfSY,29782
|
25
25
|
bittensor_cli/src/commands/stake/list.py,sha256=G7YLP68sq-qmWKPuIy2s6cMYK7XTz0oaMDK4JWR7aBE,28577
|
26
|
-
bittensor_cli/src/commands/stake/move.py,sha256=
|
27
|
-
bittensor_cli/src/commands/stake/remove.py,sha256=
|
26
|
+
bittensor_cli/src/commands/stake/move.py,sha256=T9sP3CnZW2hWB2gI0J5mVvT_CGooFMjJQoB95otiS2w,35821
|
27
|
+
bittensor_cli/src/commands/stake/remove.py,sha256=huHinuNYCZx9fLwYcYELGS13X3rDG3OsKMsqICOtXDM,49486
|
28
28
|
bittensor_cli/src/commands/subnets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
29
|
bittensor_cli/src/commands/subnets/price.py,sha256=TWcRXUFeS_Q-pfyv0YIluAL8SE7d2gzTODK-9M2J5pw,29878
|
30
30
|
bittensor_cli/src/commands/subnets/subnets.py,sha256=d41oWtxOfr4a2QxW3v_P2weELtUOr1vRx4Vi0HzN87s,83935
|
31
|
-
bittensor_cli-9.
|
32
|
-
bittensor_cli-9.
|
33
|
-
bittensor_cli-9.
|
34
|
-
bittensor_cli-9.
|
35
|
-
bittensor_cli-9.
|
31
|
+
bittensor_cli-9.2.0.dist-info/METADATA,sha256=yi6Yd5E8dLmt9UeUcmhewA7GOITtGkLufezrn2tuS78,6475
|
32
|
+
bittensor_cli-9.2.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
33
|
+
bittensor_cli-9.2.0.dist-info/entry_points.txt,sha256=hBTLGLbVxmAKy69XSKaUZvjTCmyEzDGZKq4S8UOto8I,49
|
34
|
+
bittensor_cli-9.2.0.dist-info/top_level.txt,sha256=DvgvXpmTtI_Q1BbDZMlK90LFcGFCreN1daViEPV2iFw,14
|
35
|
+
bittensor_cli-9.2.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|