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.
Files changed (51) hide show
  1. {mm_sol-0.5.5 → mm_sol-0.5.6}/PKG-INFO +2 -1
  2. {mm_sol-0.5.5 → mm_sol-0.5.6}/pyproject.toml +2 -1
  3. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/account.py +5 -5
  4. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/balance.py +5 -8
  5. {mm_sol-0.5.5 → mm_sol-0.5.6}/uv.lock +13 -11
  6. {mm_sol-0.5.5 → mm_sol-0.5.6}/.env.example +0 -0
  7. {mm_sol-0.5.5 → mm_sol-0.5.6}/.gitignore +0 -0
  8. {mm_sol-0.5.5 → mm_sol-0.5.6}/README.md +0 -0
  9. {mm_sol-0.5.5 → mm_sol-0.5.6}/dict.dic +0 -0
  10. {mm_sol-0.5.5 → mm_sol-0.5.6}/justfile +0 -0
  11. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/__init__.py +0 -0
  12. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/async_rpc.py +0 -0
  13. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/block.py +0 -0
  14. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/__init__.py +0 -0
  15. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/calcs.py +0 -0
  16. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cli.py +0 -0
  17. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cli_utils.py +0 -0
  18. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/__init__.py +0 -0
  19. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/balance_cmd.py +0 -0
  20. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/balances_cmd.py +0 -0
  21. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/example_cmd.py +0 -0
  22. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/node_cmd.py +0 -0
  23. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/transfer_cmd.py +0 -0
  24. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/wallet/__init__.py +0 -0
  25. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/wallet/keypair_cmd.py +0 -0
  26. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/cmd/wallet/mnemonic_cmd.py +0 -0
  27. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/examples/balances.toml +0 -0
  28. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/examples/transfer.toml +0 -0
  29. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/cli/validators.py +0 -0
  30. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/constants.py +0 -0
  31. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/converters.py +0 -0
  32. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/py.typed +0 -0
  33. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/rpc.py +0 -0
  34. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/solana_cli.py +0 -0
  35. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/token.py +0 -0
  36. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/transfer.py +0 -0
  37. {mm_sol-0.5.5 → mm_sol-0.5.6}/src/mm_sol/utils.py +0 -0
  38. {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/__init__.py +0 -0
  39. {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/cli/__init__.py +0 -0
  40. {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/cli/cmd/__init__.py +0 -0
  41. {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/cli/cmd/wallet/__init__.py +0 -0
  42. {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/cli/cmd/wallet/test_keypair_cmd.py +0 -0
  43. {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/cli/cmd/wallet/test_mnemonic_cmd.py +0 -0
  44. {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/conftest.py +0 -0
  45. {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/test_account.py +0 -0
  46. {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/test_async_rpc.py +0 -0
  47. {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/test_balance.py +0 -0
  48. {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/test_client.py +0 -0
  49. {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/test_converters.py +0 -0
  50. {mm_sol-0.5.5 → mm_sol-0.5.6}/tests/test_rpc.py +0 -0
  51. {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.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.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.to_bytes_array())).decode("utf-8"),
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.to_bytes_array())).decode("utf-8")
65
- private_key_arr = list(keypair.to_bytes_array())
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.to_bytes_array())).decode("utf-8")
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.to_bytes_array()) # noqa: C400
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 len(e.args) > 1:
67
- s = e.args[0]
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 len(e.args) > 1:
102
- s = e.args[0]
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.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.23.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/fc/ab/9942f251097ea262bea3a2d0b6c45040442c10c5787b71240c2820eaccda/solders-0.23.0.tar.gz", hash = "sha256:f25e8908cca40a766a99dee1aa983fb7816949201b40ec927d0802debd3ec0e4", size = 182285 }
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/06/d6/c1eb92ea5549cfee8f62a3488de29923008c10e87898bba39d6201f845ed/solders-0.23.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:87c2865f4f634abf56cc3fe9cfea985ddd0a09097d01b7716ed83ff6ef2ad1c6", size = 27236077 },
991
- { url = "https://files.pythonhosted.org/packages/4b/6c/f63ef9925a053a013d45c1ec4a67ae485ea221d911d124454bef0368a85d/solders-0.23.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:183fdc05ed0d6004d24bef17c01794a17be4a90f71c31429207bf33ec2e7738d", size = 6926426 },
992
- { url = "https://files.pythonhosted.org/packages/32/5d/867a0769783046051fa745df21a3b0ef00ea8b6d9671657f490d20e9dda1/solders-0.23.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1ba84ec23fc7af821dc7e5b48a6d247ae36b86457f930cbc64afa79587e4caf", size = 15470544 },
993
- { url = "https://files.pythonhosted.org/packages/c6/69/a33543e8ffa399e34aae46272d41a810d9ea5e1285f66e3547da7c70e359/solders-0.23.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:37d097f4a3e55e8870b9a81e7675834aa9b516e956c8b0c18adcac742573378c", size = 7133781 },
994
- { url = "https://files.pythonhosted.org/packages/e1/21/44ec75b4c6ffa56f5a1bb09046156f41b5e05a397bbaf7289027de1bc551/solders-0.23.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6319929399fdd04d10c5cebbd76993e58d92ade05febec5a488eed7810aae270", size = 7457170 },
995
- { url = "https://files.pythonhosted.org/packages/ea/e6/ffee411c48ca3ffeedf1bf9a633eac5d26240092a7e551a206a51495a992/solders-0.23.0-cp37-abi3-musllinux_1_2_i686.whl", hash = "sha256:67514b6dc2ecec9e15198e70eac329eac7b191f0f063c6ab80748b9ff921c3d5", size = 7259632 },
996
- { url = "https://files.pythonhosted.org/packages/f9/14/902c802f44e09989feee5f750f5d5621041a681c222153cddb21c2dbe3f8/solders-0.23.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9cb2360a47f3f4772903dfb3314ec57b637f7fc8ac30690fec28d48e16edacf4", size = 7205242 },
997
- { url = "https://files.pythonhosted.org/packages/0d/6b/fd205612876b489f9c70bad04d8d7a98d462fb338a142e02991822f4f359/solders-0.23.0-cp37-abi3-win_amd64.whl", hash = "sha256:2976f6589a5a0a45600aee83b34312ad0d96ea03f8d358493143fc01223997c3", size = 5530329 },
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