mm-sol 0.5.8__tar.gz → 0.5.9__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.
Files changed (53) hide show
  1. {mm_sol-0.5.8 → mm_sol-0.5.9}/PKG-INFO +2 -2
  2. {mm_sol-0.5.8 → mm_sol-0.5.9}/pyproject.toml +2 -3
  3. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/rpc_async.py +5 -5
  4. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/token_async.py +12 -12
  5. {mm_sol-0.5.8 → mm_sol-0.5.9}/uv.lock +7 -6
  6. {mm_sol-0.5.8 → mm_sol-0.5.9}/.env.example +0 -0
  7. {mm_sol-0.5.8 → mm_sol-0.5.9}/.gitignore +0 -0
  8. {mm_sol-0.5.8 → mm_sol-0.5.9}/README.md +0 -0
  9. {mm_sol-0.5.8 → mm_sol-0.5.9}/dict.dic +0 -0
  10. {mm_sol-0.5.8 → mm_sol-0.5.9}/justfile +0 -0
  11. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/__init__.py +0 -0
  12. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/account.py +0 -0
  13. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/async_rpc.py +0 -0
  14. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/balance.py +0 -0
  15. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/block.py +0 -0
  16. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/__init__.py +0 -0
  17. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/calcs.py +0 -0
  18. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/cli.py +0 -0
  19. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/cli_utils.py +0 -0
  20. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/cmd/__init__.py +0 -0
  21. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/cmd/balance_cmd.py +0 -0
  22. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/cmd/balances_cmd.py +0 -0
  23. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/cmd/example_cmd.py +0 -0
  24. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/cmd/node_cmd.py +0 -0
  25. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/cmd/transfer_cmd.py +0 -0
  26. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/cmd/wallet/__init__.py +0 -0
  27. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/cmd/wallet/keypair_cmd.py +0 -0
  28. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/cmd/wallet/mnemonic_cmd.py +0 -0
  29. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/examples/balances.toml +0 -0
  30. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/examples/transfer.toml +0 -0
  31. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/cli/validators.py +0 -0
  32. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/constants.py +0 -0
  33. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/converters.py +0 -0
  34. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/py.typed +0 -0
  35. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/rpc.py +0 -0
  36. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/solana_cli.py +0 -0
  37. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/token.py +0 -0
  38. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/transfer.py +0 -0
  39. {mm_sol-0.5.8 → mm_sol-0.5.9}/src/mm_sol/utils.py +0 -0
  40. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/__init__.py +0 -0
  41. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/cli/__init__.py +0 -0
  42. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/cli/cmd/__init__.py +0 -0
  43. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/cli/cmd/wallet/__init__.py +0 -0
  44. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/cli/cmd/wallet/test_keypair_cmd.py +0 -0
  45. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/cli/cmd/wallet/test_mnemonic_cmd.py +0 -0
  46. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/conftest.py +0 -0
  47. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/test_account.py +0 -0
  48. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/test_async_rpc.py +0 -0
  49. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/test_balance.py +0 -0
  50. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/test_client.py +0 -0
  51. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/test_converters.py +0 -0
  52. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/test_rpc.py +0 -0
  53. {mm_sol-0.5.8 → mm_sol-0.5.9}/tests/test_token.py +0 -0
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mm-sol
3
- Version: 0.5.8
3
+ Version: 0.5.9
4
4
  Requires-Python: >=3.12
5
5
  Requires-Dist: base58~=2.1.1
6
6
  Requires-Dist: jinja2>=3.1.6
7
- Requires-Dist: mm-crypto-utils>=0.2.13
7
+ Requires-Dist: mm-crypto-utils>=0.2.15
8
8
  Requires-Dist: mnemonic==0.21
9
9
  Requires-Dist: socksio>=1.0.0
10
10
  Requires-Dist: solana~=0.36.6
@@ -1,10 +1,10 @@
1
1
  [project]
2
2
  name = "mm-sol"
3
- version = "0.5.8"
3
+ version = "0.5.9"
4
4
  description = ""
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
7
- "mm-crypto-utils>=0.2.13",
7
+ "mm-crypto-utils>=0.2.15",
8
8
  "solana~=0.36.6",
9
9
  "solders~=0.26.0",
10
10
  "base58~=2.1.1",
@@ -12,7 +12,6 @@ dependencies = [
12
12
  "typer>=0.15.2",
13
13
  "jinja2>=3.1.6",
14
14
  "socksio>=1.0.0",
15
- # "websockets~=15.0.1"
16
15
  ]
17
16
  [project.scripts]
18
17
  mm-sol = "mm_sol.cli.cli:app"
@@ -44,14 +44,14 @@ async def _ws_call(node: str, data: dict[str, object], timeout: float) -> DataRe
44
44
 
45
45
  err = response.get("error", {}).get("message", "")
46
46
  if err:
47
- return DataResult(err=f"service_error: {err}", data=response)
47
+ return DataResult.err(f"service_error: {err}", {"res": response})
48
48
  if "result" in response:
49
- return DataResult(ok=response["result"], data=response)
50
- return DataResult(err="unknown_response", data=response)
49
+ return DataResult.ok(response["result"], {"res": response})
50
+ return DataResult.err("unknown_response", {"res": response})
51
51
  except TimeoutError:
52
- return DataResult(err="timeout")
52
+ return DataResult.err("timeout")
53
53
  except Exception as err:
54
- return DataResult(err=f"exception: {err}")
54
+ return DataResult.exception(err)
55
55
 
56
56
 
57
57
  async def get_block_height(node: str, timeout: float = 10, proxy: str | None = None) -> DataResult[int]:
@@ -26,15 +26,15 @@ async def get_token_balance(
26
26
 
27
27
  # Sometimes it not raise an error, but it returns this :(
28
28
  if isinstance(res, InvalidParamsMessage) and "could not find account" in res.message:
29
- return DataResult(ok=0, data=res.to_json())
30
- return DataResult(ok=int(res.value.amount), data=res.to_json())
31
- except RPCException as e:
32
- if "could not find account" in str(e):
33
- return DataResult(ok=0, data={"rpc_exception": str(e)})
34
- return DataResult(err="error", data={"rpc_exception": str(e)})
35
- except httpx.HTTPStatusError as e:
36
- return DataResult(err=f"http error: {e}")
37
- except SolanaRpcException as e:
38
- return DataResult(err=e.error_msg)
39
- except Exception as e:
40
- return DataResult(err="exception", data={"exception": str(e)})
29
+ return DataResult.ok(0, {"res": res.to_json()})
30
+ return DataResult.ok(int(res.value.amount), {"res": res.to_json()})
31
+ except RPCException as err:
32
+ if "could not find account" in str(err):
33
+ return DataResult.ok(0, {"rpc_exception": str(err)})
34
+ return DataResult.exception(err)
35
+ except httpx.HTTPStatusError as err:
36
+ return DataResult.err(f"http error: {err}")
37
+ except SolanaRpcException as err:
38
+ return DataResult.err(err.error_msg)
39
+ except Exception as err:
40
+ return DataResult.exception(err)
@@ -562,19 +562,19 @@ wheels = [
562
562
 
563
563
  [[package]]
564
564
  name = "mm-crypto-utils"
565
- version = "0.2.13"
565
+ version = "0.2.15"
566
566
  source = { registry = "https://pypi.org/simple" }
567
567
  dependencies = [
568
568
  { name = "loguru" },
569
569
  { name = "mm-std" },
570
570
  ]
571
571
  wheels = [
572
- { url = "https://files.pythonhosted.org/packages/84/00/5bf801eba9d5af8f4bb330993db85c12dec8df13b15e984d83ffccbc60ce/mm_crypto_utils-0.2.13-py3-none-any.whl", hash = "sha256:dc79cf3767ca1a9f56900d1a2b9c1d8016e6334026fa27271b4fd109fae9ff72", size = 9708 },
572
+ { url = "https://files.pythonhosted.org/packages/71/2d/d454b33604f43efeea62fe2830933bc666cdd7d1e47c5904671b4ddcc836/mm_crypto_utils-0.2.15-py3-none-any.whl", hash = "sha256:a87560b5314d8cf6b387d9330d5d47ea10bd3073d5d5f43e54b1e10a4f0a799e", size = 9708 },
573
573
  ]
574
574
 
575
575
  [[package]]
576
576
  name = "mm-sol"
577
- version = "0.5.8"
577
+ version = "0.5.9"
578
578
  source = { editable = "." }
579
579
  dependencies = [
580
580
  { name = "base58" },
@@ -601,7 +601,7 @@ dev = [
601
601
  requires-dist = [
602
602
  { name = "base58", specifier = "~=2.1.1" },
603
603
  { name = "jinja2", specifier = ">=3.1.6" },
604
- { name = "mm-crypto-utils", specifier = ">=0.2.13" },
604
+ { name = "mm-crypto-utils", specifier = ">=0.2.15" },
605
605
  { name = "mnemonic", specifier = "==0.21" },
606
606
  { name = "socksio", specifier = ">=1.0.0" },
607
607
  { name = "solana", specifier = "~=0.36.6" },
@@ -621,12 +621,13 @@ dev = [
621
621
 
622
622
  [[package]]
623
623
  name = "mm-std"
624
- version = "0.3.29"
624
+ version = "0.3.30"
625
625
  source = { registry = "https://pypi.org/simple" }
626
626
  dependencies = [
627
627
  { name = "aiohttp" },
628
628
  { name = "aiohttp-socks" },
629
629
  { name = "cryptography" },
630
+ { name = "multidict" },
630
631
  { name = "pydantic" },
631
632
  { name = "pydantic-settings" },
632
633
  { name = "pydash" },
@@ -636,7 +637,7 @@ dependencies = [
636
637
  { name = "tomlkit" },
637
638
  ]
638
639
  wheels = [
639
- { url = "https://files.pythonhosted.org/packages/da/9e/8770e2e05e7276307c9159148bb034addf735d33937fdae904ff2df4df7f/mm_std-0.3.29-py3-none-any.whl", hash = "sha256:35904c4e891d8ee6ad47dcb847bd3e5124c595ba284e46d3ad00b7d3cbf89256", size = 26542 },
640
+ { url = "https://files.pythonhosted.org/packages/4f/44/639f0d9b9663c7a8357b13668c31dfbf3b0e0c7aa617f072757a1b53ecbc/mm_std-0.3.30-py3-none-any.whl", hash = "sha256:2ea26c9f3850fc47ba4873bebb3ffaa17c0b1d991f7c7d890f688e0e76730dbc", size = 26624 },
640
641
  ]
641
642
 
642
643
  [[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