cartha-cli 1.0.2__tar.gz → 1.0.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.
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/PKG-INFO +1 -1
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/commands/pair_status.py +1 -1
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/commands/pools.py +5 -25
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/commands/prove_lock.py +11 -40
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/pyproject.toml +1 -3
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/.github/workflows/README.md +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/.github/workflows/ci.yml +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/.gitignore +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/.ruff.toml +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/CONTRIBUTING.md +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/LICENSE +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/Makefile +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/README.md +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/__init__.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/bt.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/commands/__init__.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/commands/common.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/commands/config.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/commands/health.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/commands/help.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/commands/miner_password.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/commands/miner_status.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/commands/register.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/commands/shared_options.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/commands/version.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/config.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/display.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/eth712.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/main.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/pair.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3/cartha_cli}/testnet/README.md +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3/cartha_cli}/testnet/__init__.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3/cartha_cli}/testnet/pool_ids.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/utils.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/verifier.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/cartha_cli/wallet.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/docs/COMMANDS.md +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/docs/FEEDBACK.md +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/tests/conftest.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/tests/test_cli.py +0 -0
- {cartha_cli-1.0.2 → cartha_cli-1.0.3}/uv.lock +0 -0
|
@@ -50,7 +50,7 @@ def _fallback_pool_id_to_name(pool_id: str) -> str | None:
|
|
|
50
50
|
|
|
51
51
|
# Try to import from testnet module, fallback to default if not available
|
|
52
52
|
try:
|
|
53
|
-
from
|
|
53
|
+
from ..testnet.pool_ids import pool_id_to_name
|
|
54
54
|
except (ImportError, ModuleNotFoundError):
|
|
55
55
|
# Use fallback function
|
|
56
56
|
pool_id_to_name = _fallback_pool_id_to_name
|
|
@@ -22,36 +22,16 @@ def _fallback_pool_id_to_chain_id(pool_id: str) -> int | None:
|
|
|
22
22
|
|
|
23
23
|
# Try to import from testnet module, fallback to defaults if not available
|
|
24
24
|
try:
|
|
25
|
-
from
|
|
25
|
+
from ..testnet.pool_ids import (
|
|
26
26
|
list_pools,
|
|
27
27
|
pool_id_to_chain_id,
|
|
28
28
|
pool_id_to_vault_address,
|
|
29
29
|
)
|
|
30
30
|
except (ImportError, ModuleNotFoundError):
|
|
31
|
-
#
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
# Try adding parent directory to path
|
|
36
|
-
testnet_dir = Path(__file__).parent.parent.parent / "testnet"
|
|
37
|
-
if testnet_dir.exists():
|
|
38
|
-
sys.path.insert(0, str(testnet_dir.parent))
|
|
39
|
-
try:
|
|
40
|
-
from testnet.pool_ids import (
|
|
41
|
-
list_pools,
|
|
42
|
-
pool_id_to_chain_id,
|
|
43
|
-
pool_id_to_vault_address,
|
|
44
|
-
)
|
|
45
|
-
except (ImportError, ModuleNotFoundError):
|
|
46
|
-
# Use fallback functions
|
|
47
|
-
list_pools = _fallback_list_pools
|
|
48
|
-
pool_id_to_vault_address = _fallback_pool_id_to_vault_address
|
|
49
|
-
pool_id_to_chain_id = _fallback_pool_id_to_chain_id
|
|
50
|
-
else:
|
|
51
|
-
# Use fallback functions if testnet directory doesn't exist
|
|
52
|
-
list_pools = _fallback_list_pools
|
|
53
|
-
pool_id_to_vault_address = _fallback_pool_id_to_vault_address
|
|
54
|
-
pool_id_to_chain_id = _fallback_pool_id_to_chain_id
|
|
31
|
+
# Use fallback functions if import failed
|
|
32
|
+
list_pools = _fallback_list_pools
|
|
33
|
+
pool_id_to_vault_address = _fallback_pool_id_to_vault_address
|
|
34
|
+
pool_id_to_chain_id = _fallback_pool_id_to_chain_id
|
|
55
35
|
|
|
56
36
|
|
|
57
37
|
def pools(
|
|
@@ -86,7 +86,8 @@ def _fallback_vault_address_to_chain_id(vault_address: str) -> int | None:
|
|
|
86
86
|
|
|
87
87
|
# Try to import from testnet module, fallback to defaults if not available
|
|
88
88
|
try:
|
|
89
|
-
from
|
|
89
|
+
# Import from cartha_cli.testnet (works both in development and when installed)
|
|
90
|
+
from ..testnet.pool_ids import (
|
|
90
91
|
format_pool_id,
|
|
91
92
|
list_pools,
|
|
92
93
|
pool_id_to_chain_id,
|
|
@@ -97,45 +98,15 @@ try:
|
|
|
97
98
|
vault_address_to_pool_id,
|
|
98
99
|
)
|
|
99
100
|
except (ImportError, ModuleNotFoundError):
|
|
100
|
-
#
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
from testnet.pool_ids import (
|
|
110
|
-
format_pool_id,
|
|
111
|
-
list_pools,
|
|
112
|
-
pool_id_to_chain_id,
|
|
113
|
-
pool_id_to_name,
|
|
114
|
-
pool_id_to_vault_address,
|
|
115
|
-
pool_name_to_id,
|
|
116
|
-
vault_address_to_chain_id,
|
|
117
|
-
vault_address_to_pool_id,
|
|
118
|
-
)
|
|
119
|
-
except (ImportError, ModuleNotFoundError):
|
|
120
|
-
# Use fallback functions
|
|
121
|
-
pool_name_to_id = _fallback_pool_name_to_id
|
|
122
|
-
pool_id_to_name = _fallback_pool_id_to_name
|
|
123
|
-
format_pool_id = _fallback_format_pool_id
|
|
124
|
-
list_pools = _fallback_list_pools
|
|
125
|
-
pool_id_to_vault_address = _fallback_pool_id_to_vault_address
|
|
126
|
-
vault_address_to_pool_id = _fallback_vault_address_to_pool_id
|
|
127
|
-
pool_id_to_chain_id = _fallback_pool_id_to_chain_id
|
|
128
|
-
vault_address_to_chain_id = _fallback_vault_address_to_chain_id
|
|
129
|
-
else:
|
|
130
|
-
# Use fallback functions if testnet directory doesn't exist
|
|
131
|
-
pool_name_to_id = _fallback_pool_name_to_id
|
|
132
|
-
pool_id_to_name = _fallback_pool_id_to_name
|
|
133
|
-
format_pool_id = _fallback_format_pool_id
|
|
134
|
-
list_pools = _fallback_list_pools
|
|
135
|
-
pool_id_to_vault_address = _fallback_pool_id_to_vault_address
|
|
136
|
-
vault_address_to_pool_id = _fallback_vault_address_to_pool_id
|
|
137
|
-
pool_id_to_chain_id = _fallback_pool_id_to_chain_id
|
|
138
|
-
vault_address_to_chain_id = _fallback_vault_address_to_chain_id
|
|
101
|
+
# Use fallback functions if import failed
|
|
102
|
+
pool_name_to_id = _fallback_pool_name_to_id
|
|
103
|
+
pool_id_to_name = _fallback_pool_id_to_name
|
|
104
|
+
format_pool_id = _fallback_format_pool_id
|
|
105
|
+
list_pools = _fallback_list_pools
|
|
106
|
+
pool_id_to_vault_address = _fallback_pool_id_to_vault_address
|
|
107
|
+
vault_address_to_pool_id = _fallback_vault_address_to_pool_id
|
|
108
|
+
pool_id_to_chain_id = _fallback_pool_id_to_chain_id
|
|
109
|
+
vault_address_to_chain_id = _fallback_vault_address_to_chain_id
|
|
139
110
|
|
|
140
111
|
|
|
141
112
|
def prove_lock(
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cartha-cli"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.3"
|
|
8
8
|
description = "CLI utilities for Cartha subnet miners."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11,<3.12"
|
|
@@ -51,5 +51,3 @@ cartha = "cartha_cli:main"
|
|
|
51
51
|
addopts = "-ra"
|
|
52
52
|
testpaths = ["tests"]
|
|
53
53
|
|
|
54
|
-
[tool.hatchling.build.targets.wheel]
|
|
55
|
-
packages = ["cartha_cli", "testnet"]
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|