bittensor-cli 9.4.2__tar.gz → 9.4.3__tar.gz
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-9.4.2 → bittensor_cli-9.4.3}/PKG-INFO +1 -2
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/cli.py +29 -22
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/subnets/subnets.py +2 -2
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/view.py +7 -7
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/wallets.py +2 -2
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli.egg-info/PKG-INFO +1 -2
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli.egg-info/requires.txt +0 -1
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/pyproject.toml +1 -2
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/README.md +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/__init__.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/doc_generation_helper.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/__init__.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/__init__.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/balances.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/chain_data.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/extrinsics/__init__.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/extrinsics/registration.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/extrinsics/root.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/extrinsics/transfer.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/minigraph.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/networking.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/subtensor_interface.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/utils.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/__init__.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/stake/__init__.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/stake/add.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/stake/children_hotkeys.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/stake/list.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/stake/move.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/stake/remove.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/subnets/__init__.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/subnets/price.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/sudo.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/weights.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/version.py +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli.egg-info/SOURCES.txt +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli.egg-info/dependency_links.txt +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli.egg-info/entry_points.txt +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli.egg-info/top_level.txt +0 -0
- {bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: bittensor-cli
|
3
|
-
Version: 9.4.
|
3
|
+
Version: 9.4.3
|
4
4
|
Summary: Bittensor CLI
|
5
5
|
Author: bittensor.com
|
6
6
|
Project-URL: homepage, https://github.com/opentensor/btcli
|
@@ -8,7 +8,6 @@ Project-URL: Repository, https://github.com/opentensor/btcli
|
|
8
8
|
Requires-Python: <3.14,>=3.9
|
9
9
|
Description-Content-Type: text/markdown
|
10
10
|
Requires-Dist: wheel
|
11
|
-
Requires-Dist: async-property==0.2.2
|
12
11
|
Requires-Dist: async-substrate-interface>=1.1.0
|
13
12
|
Requires-Dist: aiohttp~=3.10.2
|
14
13
|
Requires-Dist: backoff~=2.2.1
|
@@ -8,6 +8,7 @@ import re
|
|
8
8
|
import ssl
|
9
9
|
import sys
|
10
10
|
import traceback
|
11
|
+
import warnings
|
11
12
|
from pathlib import Path
|
12
13
|
from typing import Coroutine, Optional
|
13
14
|
from dataclasses import fields
|
@@ -1000,31 +1001,37 @@ class CLIManager:
|
|
1000
1001
|
:param network: Network name (e.g. finney, test, etc.) or
|
1001
1002
|
chain endpoint (e.g. ws://127.0.0.1:9945, wss://entrypoint-finney.opentensor.ai:443)
|
1002
1003
|
"""
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1004
|
+
with warnings.catch_warnings():
|
1005
|
+
warnings.filterwarnings(
|
1006
|
+
"ignore",
|
1007
|
+
"You are instantiating the AsyncSubstrateInterface Websocket outside of an event loop. "
|
1008
|
+
"Verify this is intended.",
|
1009
|
+
)
|
1010
|
+
if not self.subtensor:
|
1011
|
+
if network:
|
1012
|
+
network_ = None
|
1013
|
+
for item in network:
|
1014
|
+
if item.startswith("ws"):
|
1015
|
+
network_ = item
|
1016
|
+
break
|
1017
|
+
else:
|
1018
|
+
network_ = item
|
1019
|
+
|
1020
|
+
not_selected_networks = [net for net in network if net != network_]
|
1021
|
+
if not_selected_networks:
|
1022
|
+
console.print(
|
1023
|
+
f"Networks not selected: [dark_orange]{', '.join(not_selected_networks)}[/dark_orange]"
|
1024
|
+
)
|
1012
1025
|
|
1013
|
-
|
1014
|
-
|
1026
|
+
self.subtensor = SubtensorInterface(network_)
|
1027
|
+
elif self.config["network"]:
|
1028
|
+
self.subtensor = SubtensorInterface(self.config["network"])
|
1015
1029
|
console.print(
|
1016
|
-
f"
|
1030
|
+
f"Using the specified network [{COLORS.G.LINKS}]{self.config['network']}"
|
1031
|
+
f"[/{COLORS.G.LINKS}] from config"
|
1017
1032
|
)
|
1018
|
-
|
1019
|
-
|
1020
|
-
elif self.config["network"]:
|
1021
|
-
self.subtensor = SubtensorInterface(self.config["network"])
|
1022
|
-
console.print(
|
1023
|
-
f"Using the specified network [{COLORS.G.LINKS}]{self.config['network']}"
|
1024
|
-
f"[/{COLORS.G.LINKS}] from config"
|
1025
|
-
)
|
1026
|
-
else:
|
1027
|
-
self.subtensor = SubtensorInterface(defaults.subtensor.network)
|
1033
|
+
else:
|
1034
|
+
self.subtensor = SubtensorInterface(defaults.subtensor.network)
|
1028
1035
|
return self.subtensor
|
1029
1036
|
|
1030
1037
|
def _run_command(self, cmd: Coroutine, exit_early: bool = True):
|
@@ -1028,7 +1028,7 @@ async def show(
|
|
1028
1028
|
The table displays the root subnet participants and their metrics.
|
1029
1029
|
The columns are as follows:
|
1030
1030
|
- Position: The sorted position of the hotkey by total TAO.
|
1031
|
-
- TAO: The sum of all TAO balances for this hotkey
|
1031
|
+
- TAO: The sum of all TAO balances for this hotkey across all subnets.
|
1032
1032
|
- Stake: The stake balance of this hotkey on root (measured in TAO).
|
1033
1033
|
- Emission: The emission accrued to this hotkey across all subnets every block measured in TAO.
|
1034
1034
|
- Hotkey: The hotkey ss58 address.
|
@@ -1374,7 +1374,7 @@ async def show(
|
|
1374
1374
|
# The table displays the subnet participants and their metrics.
|
1375
1375
|
# The columns are as follows:
|
1376
1376
|
# - UID: The hotkey index in the subnet.
|
1377
|
-
# - TAO: The sum of all TAO balances for this hotkey
|
1377
|
+
# - TAO: The sum of all TAO balances for this hotkey across all subnets.
|
1378
1378
|
# - Stake: The stake balance of this hotkey on this subnet.
|
1379
1379
|
# - Weight: The stake-weight of this hotkey on this subnet. Computed as an average of the normalized TAO and Stake columns of this subnet.
|
1380
1380
|
# - Dividends: Validating dividends earned by the hotkey.
|
@@ -5,7 +5,7 @@ import tempfile
|
|
5
5
|
import webbrowser
|
6
6
|
import netaddr
|
7
7
|
from dataclasses import asdict, is_dataclass
|
8
|
-
from typing import Any
|
8
|
+
from typing import Any
|
9
9
|
from pywry import PyWry
|
10
10
|
|
11
11
|
from bittensor_cli.src.bittensor.balances import Balance
|
@@ -149,7 +149,7 @@ def get_identity(
|
|
149
149
|
|
150
150
|
async def fetch_subnet_data(
|
151
151
|
wallet: Wallet, subtensor: "SubtensorInterface"
|
152
|
-
) ->
|
152
|
+
) -> dict[str, Any]:
|
153
153
|
"""
|
154
154
|
Fetch subnet data from the network.
|
155
155
|
"""
|
@@ -187,7 +187,7 @@ async def fetch_subnet_data(
|
|
187
187
|
}
|
188
188
|
|
189
189
|
|
190
|
-
def process_subnet_data(raw_data:
|
190
|
+
def process_subnet_data(raw_data: dict[str, Any]) -> dict[str, Any]:
|
191
191
|
"""
|
192
192
|
Process and prepare subnet data.
|
193
193
|
"""
|
@@ -206,7 +206,7 @@ def process_subnet_data(raw_data: Dict[str, Any]) -> Dict[str, Any]:
|
|
206
206
|
total_slippage_value = Balance.from_tao(0)
|
207
207
|
|
208
208
|
# Process stake
|
209
|
-
stake_dict:
|
209
|
+
stake_dict: dict[int, list[dict[str, Any]]] = {}
|
210
210
|
for stake in stake_info:
|
211
211
|
if stake.stake.tao > 0:
|
212
212
|
slippage_value, _, slippage_percentage = pool_info[
|
@@ -367,7 +367,7 @@ def _has_exited(handler) -> bool:
|
|
367
367
|
)
|
368
368
|
|
369
369
|
|
370
|
-
def generate_full_page(data:
|
370
|
+
def generate_full_page(data: dict[str, Any]) -> str:
|
371
371
|
"""
|
372
372
|
Generate full HTML content for the interface.
|
373
373
|
"""
|
@@ -673,7 +673,7 @@ def generate_neuron_details() -> str:
|
|
673
673
|
"""
|
674
674
|
|
675
675
|
|
676
|
-
def generate_main_header(wallet_info:
|
676
|
+
def generate_main_header(wallet_info: dict[str, Any], block_number: int) -> str:
|
677
677
|
truncated_coldkey = f"{wallet_info['coldkey'][:6]}...{wallet_info['coldkey'][-6:]}"
|
678
678
|
|
679
679
|
# Calculate slippage percentage
|
@@ -746,7 +746,7 @@ def generate_main_filters() -> str:
|
|
746
746
|
"""
|
747
747
|
|
748
748
|
|
749
|
-
def generate_subnets_table(subnets:
|
749
|
+
def generate_subnets_table(subnets: list[dict[str, Any]]) -> str:
|
750
750
|
rows = []
|
751
751
|
for subnet in subnets:
|
752
752
|
total_your_stake = sum(stake["amount"] for stake in subnet["your_stakes"])
|
@@ -1259,8 +1259,8 @@ async def overview(
|
|
1259
1259
|
|
1260
1260
|
grid.add_row(table)
|
1261
1261
|
|
1262
|
-
caption =
|
1263
|
-
total_balance
|
1262
|
+
caption = (
|
1263
|
+
f"\n[italic][dim][bright_cyan]Wallet free balance: [dark_orange]{total_balance}"
|
1264
1264
|
)
|
1265
1265
|
data_dict["total_balance"] = total_balance.tao
|
1266
1266
|
grid.add_row(Align(caption, vertical="middle", align="center"))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: bittensor-cli
|
3
|
-
Version: 9.4.
|
3
|
+
Version: 9.4.3
|
4
4
|
Summary: Bittensor CLI
|
5
5
|
Author: bittensor.com
|
6
6
|
Project-URL: homepage, https://github.com/opentensor/btcli
|
@@ -8,7 +8,6 @@ Project-URL: Repository, https://github.com/opentensor/btcli
|
|
8
8
|
Requires-Python: <3.14,>=3.9
|
9
9
|
Description-Content-Type: text/markdown
|
10
10
|
Requires-Dist: wheel
|
11
|
-
Requires-Dist: async-property==0.2.2
|
12
11
|
Requires-Dist: async-substrate-interface>=1.1.0
|
13
12
|
Requires-Dist: aiohttp~=3.10.2
|
14
13
|
Requires-Dist: backoff~=2.2.1
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "bittensor-cli"
|
7
|
-
version = "9.4.
|
7
|
+
version = "9.4.3"
|
8
8
|
description = "Bittensor CLI"
|
9
9
|
readme = "README.md"
|
10
10
|
authors = [
|
@@ -15,7 +15,6 @@ scripts = { btcli = "bittensor_cli.cli:main" }
|
|
15
15
|
requires-python = ">=3.9,<3.14"
|
16
16
|
dependencies = [
|
17
17
|
"wheel",
|
18
|
-
"async-property==0.2.2",
|
19
18
|
"async-substrate-interface>=1.1.0",
|
20
19
|
"aiohttp~=3.10.2",
|
21
20
|
"backoff~=2.2.1",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/extrinsics/__init__.py
RENAMED
File without changes
|
{bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/extrinsics/registration.py
RENAMED
File without changes
|
File without changes
|
{bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/extrinsics/transfer.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/bittensor/subtensor_interface.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{bittensor_cli-9.4.2 → bittensor_cli-9.4.3}/bittensor_cli/src/commands/stake/children_hotkeys.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|