mm-sol 0.5.5__tar.gz → 0.5.6__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.
- {mm_sol-0.5.5 → mm_sol-0.5.6}/PKG-INFO +2 -1
- {mm_sol-0.5.5 → mm_sol-0.5.6}/pyproject.toml +2 -1
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/account.py +5 -5
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/balance.py +5 -8
- {mm_sol-0.5.5 → mm_sol-0.5.6}/uv.lock +13 -11
- {mm_sol-0.5.5 → mm_sol-0.5.6}/.env.example +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/.gitignore +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/README.md +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/dict.dic +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/justfile +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/__init__.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/async_rpc.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/block.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/__init__.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/calcs.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cli.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cli_utils.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/__init__.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/balance_cmd.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/balances_cmd.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/example_cmd.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/node_cmd.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/transfer_cmd.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/wallet/__init__.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/wallet/keypair_cmd.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/wallet/mnemonic_cmd.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/examples/balances.toml +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/examples/transfer.toml +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/validators.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/constants.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/converters.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/py.typed +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/rpc.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/solana_cli.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/token.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/transfer.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/utils.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/__init__.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/cli/__init__.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/cli/cmd/__init__.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/cli/cmd/wallet/__init__.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/cli/cmd/wallet/test_keypair_cmd.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/cli/cmd/wallet/test_mnemonic_cmd.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/conftest.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/test_account.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/test_async_rpc.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/test_balance.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/test_client.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/test_converters.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/test_rpc.py +0 -0
- {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/test_token.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mm-sol
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.6
|
|
4
4
|
Requires-Python: >=3.12
|
|
5
5
|
Requires-Dist: base58~=2.1.1
|
|
6
6
|
Requires-Dist: jinja2>=3.1.6
|
|
@@ -8,4 +8,5 @@ Requires-Dist: mm-crypto-utils>=0.2.9
|
|
|
8
8
|
Requires-Dist: mnemonic==0.21
|
|
9
9
|
Requires-Dist: socksio>=1.0.0
|
|
10
10
|
Requires-Dist: solana~=0.36.6
|
|
11
|
+
Requires-Dist: solders~=0.26.0
|
|
11
12
|
Requires-Dist: typer>=0.15.2
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mm-sol"
|
|
3
|
-
version = "0.5.
|
|
3
|
+
version = "0.5.6"
|
|
4
4
|
description = ""
|
|
5
5
|
requires-python = ">=3.12"
|
|
6
6
|
dependencies = [
|
|
7
7
|
"mm-crypto-utils>=0.2.9",
|
|
8
8
|
"solana~=0.36.6",
|
|
9
|
+
"solders~=0.26.0",
|
|
9
10
|
"base58~=2.1.1",
|
|
10
11
|
"mnemonic==0.21",
|
|
11
12
|
"typer>=0.15.2",
|
|
@@ -51,7 +51,7 @@ def derive_accounts(mnemonic: str, passphrase: str, derivation_path: str, limit:
|
|
|
51
51
|
index=i,
|
|
52
52
|
path=path,
|
|
53
53
|
address=str(keypair.pubkey()),
|
|
54
|
-
private_key=base58.b58encode(bytes(keypair.
|
|
54
|
+
private_key=base58.b58encode(bytes(keypair.to_bytes())).decode("utf-8"),
|
|
55
55
|
)
|
|
56
56
|
)
|
|
57
57
|
|
|
@@ -61,8 +61,8 @@ def derive_accounts(mnemonic: str, passphrase: str, derivation_path: str, limit:
|
|
|
61
61
|
def generate_account() -> NewAccount:
|
|
62
62
|
keypair = Keypair()
|
|
63
63
|
public_key = str(keypair.pubkey())
|
|
64
|
-
private_key_base58 = base58.b58encode(bytes(keypair.
|
|
65
|
-
private_key_arr = list(keypair.
|
|
64
|
+
private_key_base58 = base58.b58encode(bytes(keypair.to_bytes())).decode("utf-8")
|
|
65
|
+
private_key_arr = list(keypair.to_bytes())
|
|
66
66
|
return NewAccount(public_key=public_key, private_key_base58=private_key_base58, private_key_arr=private_key_arr)
|
|
67
67
|
|
|
68
68
|
|
|
@@ -93,12 +93,12 @@ def get_public_key(private_key: str) -> str:
|
|
|
93
93
|
|
|
94
94
|
def get_private_key_base58(private_key: str) -> str:
|
|
95
95
|
keypair = get_keypair(private_key)
|
|
96
|
-
return base58.b58encode(bytes(keypair.
|
|
96
|
+
return base58.b58encode(bytes(keypair.to_bytes())).decode("utf-8")
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
def get_private_key_arr(private_key: str) -> list[int]:
|
|
100
100
|
keypair = get_keypair(private_key)
|
|
101
|
-
return list(x for x in keypair.
|
|
101
|
+
return list(x for x in keypair.to_bytes()) # noqa: C400
|
|
102
102
|
|
|
103
103
|
|
|
104
104
|
def get_private_key_arr_str(private_key: str) -> str:
|
|
@@ -63,10 +63,8 @@ def get_token_balance(
|
|
|
63
63
|
return Ok(0)
|
|
64
64
|
return Ok(int(res.value.amount), data=res.to_json())
|
|
65
65
|
except RPCException as e:
|
|
66
|
-
if
|
|
67
|
-
|
|
68
|
-
if isinstance(s, InvalidParamsMessage) and "could not find account" in s.message:
|
|
69
|
-
return Ok(0)
|
|
66
|
+
if "could not find account" in str(e):
|
|
67
|
+
return Ok(0)
|
|
70
68
|
return Err(e)
|
|
71
69
|
except httpx.HTTPStatusError as e:
|
|
72
70
|
return Err(f"http error: {e}")
|
|
@@ -98,11 +96,10 @@ async def get_token_balance_async(
|
|
|
98
96
|
return Ok(0)
|
|
99
97
|
return Ok(int(res.value.amount), data=res.to_json())
|
|
100
98
|
except RPCException as e:
|
|
101
|
-
if
|
|
102
|
-
|
|
103
|
-
if isinstance(s, InvalidParamsMessage) and "could not find account" in s.message:
|
|
104
|
-
return Ok(0)
|
|
99
|
+
if "could not find account" in str(e):
|
|
100
|
+
return Ok(0)
|
|
105
101
|
return Err(e)
|
|
102
|
+
|
|
106
103
|
except httpx.HTTPStatusError as e:
|
|
107
104
|
return Err(f"http error: {e}")
|
|
108
105
|
except SolanaRpcException as e:
|
|
@@ -452,7 +452,7 @@ wheels = [
|
|
|
452
452
|
|
|
453
453
|
[[package]]
|
|
454
454
|
name = "mm-sol"
|
|
455
|
-
version = "0.5.
|
|
455
|
+
version = "0.5.6"
|
|
456
456
|
source = { editable = "." }
|
|
457
457
|
dependencies = [
|
|
458
458
|
{ name = "base58" },
|
|
@@ -461,6 +461,7 @@ dependencies = [
|
|
|
461
461
|
{ name = "mnemonic" },
|
|
462
462
|
{ name = "socksio" },
|
|
463
463
|
{ name = "solana" },
|
|
464
|
+
{ name = "solders" },
|
|
464
465
|
{ name = "typer" },
|
|
465
466
|
]
|
|
466
467
|
|
|
@@ -482,6 +483,7 @@ requires-dist = [
|
|
|
482
483
|
{ name = "mnemonic", specifier = "==0.21" },
|
|
483
484
|
{ name = "socksio", specifier = ">=1.0.0" },
|
|
484
485
|
{ name = "solana", specifier = "~=0.36.6" },
|
|
486
|
+
{ name = "solders", specifier = "~=0.26.0" },
|
|
485
487
|
{ name = "typer", specifier = ">=0.15.2" },
|
|
486
488
|
]
|
|
487
489
|
|
|
@@ -979,22 +981,22 @@ wheels = [
|
|
|
979
981
|
|
|
980
982
|
[[package]]
|
|
981
983
|
name = "solders"
|
|
982
|
-
version = "0.
|
|
984
|
+
version = "0.26.0"
|
|
983
985
|
source = { registry = "https://pypi.org/simple" }
|
|
984
986
|
dependencies = [
|
|
985
987
|
{ name = "jsonalias" },
|
|
986
988
|
{ name = "typing-extensions" },
|
|
987
989
|
]
|
|
988
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
990
|
+
sdist = { url = "https://files.pythonhosted.org/packages/87/96/23ad2e43e2676b78834064fe051e3db3ce1899336ecd4797f92fcd06113a/solders-0.26.0.tar.gz", hash = "sha256:057533892d6fa432c1ce1e2f5e3428802964666c10b57d3d1bcaab86295f046c", size = 181123 }
|
|
989
991
|
wheels = [
|
|
990
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
991
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
992
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
993
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
994
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
995
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
996
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
997
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
992
|
+
{ url = "https://files.pythonhosted.org/packages/a5/ce/58bbb4d2c696e770cdd37e5f6dc2891ef7610c0c085bf400f9c42dcff1ad/solders-0.26.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:9c1a0ef5daa1a05934af5fb6e7e32eab7c42cede406c80067fee006f461ffc4a", size = 24344472 },
|
|
993
|
+
{ url = "https://files.pythonhosted.org/packages/5a/35/221cec0e5900c2202833e7e9110c3405a2d96ed25e110b247f88b8782e29/solders-0.26.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1b964efbd7c0b38aef3bf4293ea5938517ae649b9a23e7cd147d889931775aab", size = 6674734 },
|
|
994
|
+
{ url = "https://files.pythonhosted.org/packages/41/33/d17b7dbc92672351d59fc65cdb93b8924fc682deba09f6d96f25440187ae/solders-0.26.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36e6a769c5298b887b7588edb171d93709a89302aef75913fe893d11c653739d", size = 13472961 },
|
|
995
|
+
{ url = "https://files.pythonhosted.org/packages/bb/e7/533367d815ab000587ccc37d89e154132f63347f02dcaaac5df72bd851de/solders-0.26.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:b3cc55b971ec6ed1b4466fa7e7e09eee9baba492b8cd9e3204e3e1a0c5a0c4aa", size = 6886198 },
|
|
996
|
+
{ url = "https://files.pythonhosted.org/packages/52/e0/ab41ab3df5fdf3b0e55613be93a43c2fe58b15a6ea8ceca26d3fba02e3c6/solders-0.26.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3e3973074c17265921c70246a17bcf80972c5b96a3e1ed7f5049101f11865092", size = 7319170 },
|
|
997
|
+
{ url = "https://files.pythonhosted.org/packages/7d/34/5174ce592607e0ac020aff203217f2f113a55eec49af3db12945fea42d89/solders-0.26.0-cp37-abi3-musllinux_1_2_i686.whl", hash = "sha256:59b52419452602f697e659199a25acacda8365971c376ef3c0687aecdd929e07", size = 7134977 },
|
|
998
|
+
{ url = "https://files.pythonhosted.org/packages/ba/5e/822faabda0d473c29bdf59fe8869a411fd436af8ca6f5d6e89f7513f682f/solders-0.26.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:5946ec3f2a340afa9ce5c2b8ab628ae1dea2ad2235551b1297cafdd7e3e5c51a", size = 6984222 },
|
|
999
|
+
{ url = "https://files.pythonhosted.org/packages/23/e8/dc992f677762ea2de44b7768120d95887ef39fab10d6f29fb53e6a9882c1/solders-0.26.0-cp37-abi3-win_amd64.whl", hash = "sha256:5466616610170aab08c627ae01724e425bcf90085bc574da682e9f3bd954900b", size = 5480492 },
|
|
998
1000
|
]
|
|
999
1001
|
|
|
1000
1002
|
[[package]]
|
|
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
|
|
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
|