mm-strk 0.4.1__py3-none-any.whl → 0.4.3__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.
- mm_strk/account.py +1 -1
- mm_strk/cli/commands/node.py +11 -1
- mm_strk/domain.py +1 -1
- mm_strk-0.4.3.dist-info/METADATA +7 -0
- {mm_strk-0.4.1.dist-info → mm_strk-0.4.3.dist-info}/RECORD +7 -7
- {mm_strk-0.4.1.dist-info → mm_strk-0.4.3.dist-info}/WHEEL +1 -1
- mm_strk-0.4.1.dist-info/METADATA +0 -7
- {mm_strk-0.4.1.dist-info → mm_strk-0.4.3.dist-info}/entry_points.txt +0 -0
mm_strk/account.py
CHANGED
mm_strk/cli/commands/node.py
CHANGED
|
@@ -8,12 +8,16 @@ from starknet_py.net.full_node_client import FullNodeClient
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class NodeStatus(BaseModel):
|
|
11
|
+
"""Starknet node status response."""
|
|
12
|
+
|
|
13
|
+
spec_version: str
|
|
11
14
|
block_number: int | str
|
|
12
15
|
chain_id: int | str
|
|
13
16
|
syncing_status: bool | SyncStatus | str
|
|
14
17
|
|
|
15
18
|
|
|
16
19
|
def run(urls: list[str], proxy: str | None) -> None:
|
|
20
|
+
"""Check status of Starknet nodes."""
|
|
17
21
|
if proxy:
|
|
18
22
|
typer.echo("proxy is not supported yet")
|
|
19
23
|
raise typer.Exit(code=1)
|
|
@@ -29,8 +33,14 @@ async def _run(urls: list[str]) -> None:
|
|
|
29
33
|
|
|
30
34
|
|
|
31
35
|
async def _node_status(url: str) -> NodeStatus:
|
|
36
|
+
"""Fetch status from a single node."""
|
|
32
37
|
client = FullNodeClient(node_url=url)
|
|
33
38
|
|
|
39
|
+
try:
|
|
40
|
+
spec_version: str = await client.spec_version()
|
|
41
|
+
except Exception as e:
|
|
42
|
+
spec_version = str(e)
|
|
43
|
+
|
|
34
44
|
try:
|
|
35
45
|
block_number: int | str = await client.get_block_number()
|
|
36
46
|
except Exception as e:
|
|
@@ -46,4 +56,4 @@ async def _node_status(url: str) -> NodeStatus:
|
|
|
46
56
|
except Exception as e:
|
|
47
57
|
syncing_status = str(e)
|
|
48
58
|
|
|
49
|
-
return NodeStatus(block_number=block_number, chain_id=chain_id, syncing_status=syncing_status)
|
|
59
|
+
return NodeStatus(spec_version=spec_version, block_number=block_number, chain_id=chain_id, syncing_status=syncing_status)
|
mm_strk/domain.py
CHANGED
|
@@ -14,7 +14,7 @@ async def address_to_domain(address: str, timeout: float = 5.0, proxy: str | Non
|
|
|
14
14
|
return res.to_result_ok(None)
|
|
15
15
|
if res.is_err():
|
|
16
16
|
return res.to_result_err()
|
|
17
|
-
domain = res.
|
|
17
|
+
domain = res.parse_json("domain")
|
|
18
18
|
if domain:
|
|
19
19
|
return res.to_result_ok(domain)
|
|
20
20
|
return res.to_result_err("unknown_response")
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
mm_strk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
mm_strk/account.py,sha256=
|
|
2
|
+
mm_strk/account.py,sha256=BKxedMz_GvoohNp8TlB_05GVtSWQroy0jF0EiYhi-_w,1097
|
|
3
3
|
mm_strk/balance.py,sha256=jOCV1rm4lqXwwGU8CO49znOaUJWQxPukAbJiMkmti7k,1679
|
|
4
|
-
mm_strk/domain.py,sha256=
|
|
4
|
+
mm_strk/domain.py,sha256=ElDQPwnb1ZKHJowv9khGQZXnGnn3DmRGvPwqSWvfynE,755
|
|
5
5
|
mm_strk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
mm_strk/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
mm_strk/cli/cli.py,sha256=nQfgYlgaXPD9MEiTkUTwgHeWPqwavv1VtfYp-rWL2hY,762
|
|
8
8
|
mm_strk/cli/cli_utils.py,sha256=4_QLJ_rEotHK90PRQqsvCuFydDOXPrXrnMndBffMPIg,103
|
|
9
9
|
mm_strk/cli/commands/__init__.py,sha256=ipr1wm0YQIJoEZLupmrGaom6uJUENhxFuSCOVvCJuW8,39
|
|
10
|
-
mm_strk/cli/commands/node.py,sha256=
|
|
11
|
-
mm_strk-0.4.
|
|
12
|
-
mm_strk-0.4.
|
|
13
|
-
mm_strk-0.4.
|
|
14
|
-
mm_strk-0.4.
|
|
10
|
+
mm_strk/cli/commands/node.py,sha256=fmykK08gIgSTv-xuPZ2sQhUboYmUbhlBdEFdPzQ9exc,1570
|
|
11
|
+
mm_strk-0.4.3.dist-info/METADATA,sha256=M8Vkkrz2iOYkWejyxYaZEzJOVMksK0O_QLrGzTSVSUo,169
|
|
12
|
+
mm_strk-0.4.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
13
|
+
mm_strk-0.4.3.dist-info/entry_points.txt,sha256=X6zWJaYaUkTgJrY4LAVpcov8O43PmUU4cQ1ue8prYqQ,48
|
|
14
|
+
mm_strk-0.4.3.dist-info/RECORD,,
|
mm_strk-0.4.1.dist-info/METADATA
DELETED
|
File without changes
|