mm-sol 0.2.10__tar.gz → 0.3.1__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 (54) hide show
  1. {mm_sol-0.2.10 → mm_sol-0.3.1}/PKG-INFO +2 -2
  2. {mm_sol-0.2.10 → mm_sol-0.3.1}/pyproject.toml +2 -3
  3. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/cli.py +4 -3
  4. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/cmd/balances_cmd.py +3 -2
  5. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/cmd/example_cmd.py +1 -1
  6. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/cmd/transfer_sol_cmd.py +2 -2
  7. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/cmd/transfer_token_cmd.py +2 -2
  8. mm_sol-0.3.1/src/mm_sol/cli/examples/balances.toml +9 -0
  9. mm_sol-0.3.1/src/mm_sol/cli/examples/transfer-sol.toml +8 -0
  10. mm_sol-0.3.1/src/mm_sol/cli/examples/transfer-token.toml +9 -0
  11. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/validators.py +3 -3
  12. {mm_sol-0.2.10 → mm_sol-0.3.1}/uv.lock +6 -17
  13. mm_sol-0.2.10/src/mm_sol/cli/examples/balances.yml +0 -11
  14. mm_sol-0.2.10/src/mm_sol/cli/examples/transfer-sol.yml +0 -9
  15. mm_sol-0.2.10/src/mm_sol/cli/examples/transfer-token.yml +0 -11
  16. {mm_sol-0.2.10 → mm_sol-0.3.1}/.env.example +0 -0
  17. {mm_sol-0.2.10 → mm_sol-0.3.1}/.gitignore +0 -0
  18. {mm_sol-0.2.10 → mm_sol-0.3.1}/README.txt +0 -0
  19. {mm_sol-0.2.10 → mm_sol-0.3.1}/dict.dic +0 -0
  20. {mm_sol-0.2.10 → mm_sol-0.3.1}/justfile +0 -0
  21. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/__init__.py +0 -0
  22. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/account.py +0 -0
  23. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/balance.py +0 -0
  24. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/block.py +0 -0
  25. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/__init__.py +0 -0
  26. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/calcs.py +0 -0
  27. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/cli_utils.py +0 -0
  28. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/cmd/__init__.py +0 -0
  29. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/cmd/balance_cmd.py +0 -0
  30. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/cmd/node_cmd.py +0 -0
  31. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/cmd/wallet/__init__.py +0 -0
  32. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/cmd/wallet/keypair_cmd.py +0 -0
  33. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/cli/cmd/wallet/new_cmd.py +0 -0
  34. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/constants.py +0 -0
  35. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/converters.py +0 -0
  36. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/py.typed +0 -0
  37. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/rpc.py +0 -0
  38. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/solana_cli.py +0 -0
  39. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/token.py +0 -0
  40. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/transfer.py +0 -0
  41. {mm_sol-0.2.10 → mm_sol-0.3.1}/src/mm_sol/utils.py +0 -0
  42. {mm_sol-0.2.10 → mm_sol-0.3.1}/tests/__init__.py +0 -0
  43. {mm_sol-0.2.10 → mm_sol-0.3.1}/tests/cli/__init__.py +0 -0
  44. {mm_sol-0.2.10 → mm_sol-0.3.1}/tests/cli/cmd/__init__.py +0 -0
  45. {mm_sol-0.2.10 → mm_sol-0.3.1}/tests/cli/cmd/wallet/__init__.py +0 -0
  46. {mm_sol-0.2.10 → mm_sol-0.3.1}/tests/cli/cmd/wallet/test_keypair_cmd.py +0 -0
  47. {mm_sol-0.2.10 → mm_sol-0.3.1}/tests/cli/cmd/wallet/test_new_cmd.py +0 -0
  48. {mm_sol-0.2.10 → mm_sol-0.3.1}/tests/conftest.py +0 -0
  49. {mm_sol-0.2.10 → mm_sol-0.3.1}/tests/test_account.py +0 -0
  50. {mm_sol-0.2.10 → mm_sol-0.3.1}/tests/test_balance.py +0 -0
  51. {mm_sol-0.2.10 → mm_sol-0.3.1}/tests/test_client.py +0 -0
  52. {mm_sol-0.2.10 → mm_sol-0.3.1}/tests/test_converters.py +0 -0
  53. {mm_sol-0.2.10 → mm_sol-0.3.1}/tests/test_rpc.py +0 -0
  54. {mm_sol-0.2.10 → mm_sol-0.3.1}/tests/test_token.py +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mm-sol
3
- Version: 0.2.10
3
+ Version: 0.3.1
4
4
  Requires-Python: >=3.12
5
5
  Requires-Dist: base58~=2.1.1
6
6
  Requires-Dist: jinja2>=3.1.5
7
- Requires-Dist: mm-crypto-utils>=0.0.19
7
+ Requires-Dist: mm-crypto-utils>=0.1.4
8
8
  Requires-Dist: solana~=0.36.3
9
9
  Requires-Dist: typer>=0.15.1
@@ -1,10 +1,10 @@
1
1
  [project]
2
2
  name = "mm-sol"
3
- version = "0.2.10"
3
+ version = "0.3.1"
4
4
  description = ""
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
7
- "mm-crypto-utils>=0.0.19",
7
+ "mm-crypto-utils>=0.1.4",
8
8
  "solana~=0.36.3",
9
9
  "base58~=2.1.1",
10
10
  "typer>=0.15.1",
@@ -25,7 +25,6 @@ dev-dependencies = [
25
25
  "pip-audit~=2.7.3",
26
26
  "bandit~=1.8.2",
27
27
  "mypy~=1.14.1",
28
- "types-PyYAML~=6.0.12.20241230",
29
28
  ]
30
29
 
31
30
  [tool.mypy]
@@ -1,4 +1,5 @@
1
1
  from enum import Enum
2
+ from pathlib import Path
2
3
  from typing import Annotated
3
4
 
4
5
  import typer
@@ -50,14 +51,14 @@ def balance_command(
50
51
 
51
52
  @app.command(name="balances", help="Print SOL and token balances for accounts")
52
53
  def balances_command(
53
- config_path: str, print_config: Annotated[bool, typer.Option("--config", "-c", help="Print config and exit")] = False
54
+ config_path: Path, print_config: Annotated[bool, typer.Option("--config", "-c", help="Print config and exit")] = False
54
55
  ) -> None:
55
56
  balances_cmd.run(config_path, print_config)
56
57
 
57
58
 
58
59
  @app.command(name="transfer-sol", help="Transfer SOL from one or many accounts")
59
60
  def transfer_sol_command(
60
- config_path: str,
61
+ config_path: Path,
61
62
  print_balances: bool = typer.Option(False, "--balances", "-b", help="Print balances and exit"),
62
63
  print_config: bool = typer.Option(False, "--config", "-c", help="Print config and exit"),
63
64
  emulate: bool = typer.Option(False, "--emulate", "-e", help="Emulate transaction posting"),
@@ -76,7 +77,7 @@ def transfer_sol_command(
76
77
 
77
78
  @app.command(name="transfer-token", help="Transfer token from one or many accounts")
78
79
  def transfer_token_command(
79
- config_path: str,
80
+ config_path: Path,
80
81
  print_balances: bool = typer.Option(False, "--balances", "-b", help="Print balances and exit"),
81
82
  print_config: bool = typer.Option(False, "--config", "-c", help="Print config and exit"),
82
83
  emulate: bool = typer.Option(False, "--emulate", "-e", help="Emulate transaction posting"),
@@ -1,5 +1,6 @@
1
1
  import random
2
2
  from decimal import Decimal
3
+ from pathlib import Path
3
4
  from typing import Annotated, Any
4
5
 
5
6
  from mm_crypto_utils import ConfigValidators
@@ -23,8 +24,8 @@ class Config(BaseConfig):
23
24
  return random.choice(self.nodes)
24
25
 
25
26
 
26
- def run(config_path: str, print_config: bool) -> None:
27
- config = Config.read_config_or_exit(config_path)
27
+ def run(config_path: Path, print_config: bool) -> None:
28
+ config = Config.read_toml_config_or_exit(config_path)
28
29
  if print_config:
29
30
  config.print_and_exit()
30
31
 
@@ -4,5 +4,5 @@ from mm_std import print_plain
4
4
 
5
5
 
6
6
  def run(module: str) -> None:
7
- example_file = Path(Path(__file__).parent.absolute(), "../examples", f"{module}.yml")
7
+ example_file = Path(Path(__file__).parent.absolute(), "../examples", f"{module}.toml")
8
8
  print_plain(example_file.read_text())
@@ -42,7 +42,7 @@ class Config(BaseConfig):
42
42
 
43
43
 
44
44
  def run(
45
- config_path: str,
45
+ config_path: Path,
46
46
  *,
47
47
  print_balances: bool,
48
48
  print_config: bool,
@@ -50,7 +50,7 @@ def run(
50
50
  no_confirmation: bool,
51
51
  emulate: bool,
52
52
  ) -> None:
53
- config = Config.read_config_or_exit(config_path)
53
+ config = Config.read_toml_config_or_exit(config_path)
54
54
 
55
55
  if print_config:
56
56
  config.print_and_exit({"private_keys"})
@@ -44,7 +44,7 @@ class Config(BaseConfig):
44
44
 
45
45
 
46
46
  def run(
47
- config_path: str,
47
+ config_path: Path,
48
48
  *,
49
49
  print_balances: bool,
50
50
  print_config: bool,
@@ -52,7 +52,7 @@ def run(
52
52
  no_confirmation: bool,
53
53
  emulate: bool,
54
54
  ) -> None:
55
- config = Config.read_config_or_exit(config_path)
55
+ config = Config.read_toml_config_or_exit(config_path)
56
56
 
57
57
  if print_config:
58
58
  config.print_and_exit({"private_keys"})
@@ -0,0 +1,9 @@
1
+ accounts = """
2
+ 5BJ9ViMj4gi2BBX3wbCEJ4p4vpVWKpG6ja2aQP2ACBUv
3
+ HbSAUDjzpr44fWzf9Ynj3V1jq3wBsgg88N88P4vzeGPX
4
+ """
5
+ tokens = """
6
+ 7XtmNSHJDHTZdx2K1S8D529kHsBbt3Civxt6vUHrGxBR
7
+ 65FKbLPtrssmc8aVn9DEBY8VTGB85vsgadrmaW9H4nEB
8
+ """
9
+ nodes = "https://api.mainnet-beta.solana.com"
@@ -0,0 +1,8 @@
1
+ routes = """
2
+ Bd8CxCTLez2ckVTqEJjuZkWjYFSRbo8fA1qYbd7yFVP9 Eaft9xXzfgbRqsHd65WspoaxTtH7pkznM9YA8tsDKGwj
3
+ Fc2TRJVCpFZpRz56mFnQETctib1zwFnwHcS7HoQSgUzZ EVJctTWikt29rUXBf49tyQdK87x837HtvpCwqeSjp1Ur
4
+ """
5
+ private_keys = "file: ./path/to/privates.txt"
6
+ value = "0.012 sol"
7
+ proxies = "url: https://site.com/api/get-proxies"
8
+ nodes = "https://api.devnet.solana.com"
@@ -0,0 +1,9 @@
1
+ routes = """
2
+ Bd8CxCTLez2ckVTqEJjuZkWjYFSRbo8fA1qYbd7yFVP9 Eaft9xXzfgbRqsHd65WspoaxTtH7pkznM9YA8tsDKGwj
3
+ Fc2TRJVCpFZpRz56mFnQETctib1zwFnwHcS7HoQSgUzZ EVJctTWikt29rUXBf49tyQdK87x837HtvpCwqeSjp1Ur
4
+ """
5
+ token = "6VBTMLgv256c7scudNf8T5GoTJcEE8WfgcJhxbGYPQ8G"
6
+ private_keys = "file: ./path/to/privates.txt"
7
+ value = "0.012 t"
8
+ proxies = "https://site.com/api/get-proxies"
9
+ nodes = "https://api.devnet.solana.com"
@@ -12,15 +12,15 @@ class Validators(ConfigValidators):
12
12
  return ConfigValidators.address(is_address)
13
13
 
14
14
  @staticmethod
15
- def sol_addresses(unique: bool) -> Callable[[str | list[str] | None], list[str]]:
15
+ def sol_addresses(unique: bool) -> Callable[[str], list[str]]:
16
16
  return ConfigValidators.addresses(unique, is_address=is_address)
17
17
 
18
18
  @staticmethod
19
- def sol_routes() -> Callable[[str | None], list[TxRoute]]:
19
+ def sol_routes() -> Callable[[str], list[TxRoute]]:
20
20
  return ConfigValidators.routes(is_address)
21
21
 
22
22
  @staticmethod
23
- def sol_private_keys() -> Callable[[str | list[str] | None], AddressToPrivate]:
23
+ def sol_private_keys() -> Callable[[str], AddressToPrivate]:
24
24
  return ConfigValidators.private_keys(get_public_key)
25
25
 
26
26
  @staticmethod
@@ -481,19 +481,19 @@ wheels = [
481
481
 
482
482
  [[package]]
483
483
  name = "mm-crypto-utils"
484
- version = "0.0.19"
484
+ version = "0.1.4"
485
485
  source = { registry = "https://pypi.org/simple" }
486
486
  dependencies = [
487
487
  { name = "loguru" },
488
488
  { name = "mm-std" },
489
489
  ]
490
490
  wheels = [
491
- { url = "https://files.pythonhosted.org/packages/49/0b/408f661aba09bfc3625652a6cf2ba516874aaaa4f6c9eaaeca450cf70004/mm_crypto_utils-0.0.19-py3-none-any.whl", hash = "sha256:b51184a53aa78cb70253c3c2e0ad56a98a214a854ffb74a4130a4401cd025538", size = 6992 },
491
+ { url = "https://files.pythonhosted.org/packages/b8/29/fb0a382faadf0ba377747a551e9136c0ad7f64286163de5d0e1e64ae3456/mm_crypto_utils-0.1.4-py3-none-any.whl", hash = "sha256:3b2e011959fa70f3498ea27b0e741d5e3915be771ec1de63729d8bd97b4d0ff4", size = 7733 },
492
492
  ]
493
493
 
494
494
  [[package]]
495
495
  name = "mm-sol"
496
- version = "0.2.10"
496
+ version = "0.3.1"
497
497
  source = { editable = "." }
498
498
  dependencies = [
499
499
  { name = "base58" },
@@ -511,14 +511,13 @@ dev = [
511
511
  { name = "pytest" },
512
512
  { name = "pytest-xdist" },
513
513
  { name = "ruff" },
514
- { name = "types-pyyaml" },
515
514
  ]
516
515
 
517
516
  [package.metadata]
518
517
  requires-dist = [
519
518
  { name = "base58", specifier = "~=2.1.1" },
520
519
  { name = "jinja2", specifier = ">=3.1.5" },
521
- { name = "mm-crypto-utils", specifier = ">=0.0.19" },
520
+ { name = "mm-crypto-utils", specifier = ">=0.1.4" },
522
521
  { name = "solana", specifier = "~=0.36.3" },
523
522
  { name = "typer", specifier = ">=0.15.1" },
524
523
  ]
@@ -531,12 +530,11 @@ dev = [
531
530
  { name = "pytest", specifier = "~=8.3.4" },
532
531
  { name = "pytest-xdist", specifier = "~=3.6.1" },
533
532
  { name = "ruff", specifier = "~=0.9.4" },
534
- { name = "types-pyyaml", specifier = "~=6.0.12.20241230" },
535
533
  ]
536
534
 
537
535
  [[package]]
538
536
  name = "mm-std"
539
- version = "0.1.15"
537
+ version = "0.2.1"
540
538
  source = { registry = "https://pypi.org/simple" }
541
539
  dependencies = [
542
540
  { name = "cryptography" },
@@ -548,7 +546,7 @@ dependencies = [
548
546
  { name = "rich" },
549
547
  ]
550
548
  wheels = [
551
- { url = "https://files.pythonhosted.org/packages/ee/b7/6c713eb013fd2d0b2d5dca0f96b1ecb25f464f43f00f172f0c8314c4e82a/mm_std-0.1.15-py3-none-any.whl", hash = "sha256:2138cd0606f85fa3b56172218b19dfdcfb192600a762bcb0b50e13dba3cf75fe", size = 14850 },
549
+ { url = "https://files.pythonhosted.org/packages/f3/ef/cb423cc357cc116313fcd97e9d0ff673234f5f1725f4a73929ced27b1d00/mm_std-0.2.1-py3-none-any.whl", hash = "sha256:71fa84f2fa897901c925614327123e8d0bc6ae61ff7873479dc9a53889442237", size = 14620 },
552
550
  ]
553
551
 
554
552
  [[package]]
@@ -1042,15 +1040,6 @@ wheels = [
1042
1040
  { url = "https://files.pythonhosted.org/packages/d0/cc/0a838ba5ca64dc832aa43f727bd586309846b0ffb2ce52422543e6075e8a/typer-0.15.1-py3-none-any.whl", hash = "sha256:7994fb7b8155b64d3402518560648446072864beefd44aa2dc36972a5972e847", size = 44908 },
1043
1041
  ]
1044
1042
 
1045
- [[package]]
1046
- name = "types-pyyaml"
1047
- version = "6.0.12.20241230"
1048
- source = { registry = "https://pypi.org/simple" }
1049
- sdist = { url = "https://files.pythonhosted.org/packages/9a/f9/4d566925bcf9396136c0a2e5dc7e230ff08d86fa011a69888dd184469d80/types_pyyaml-6.0.12.20241230.tar.gz", hash = "sha256:7f07622dbd34bb9c8b264fe860a17e0efcad00d50b5f27e93984909d9363498c", size = 17078 }
1050
- wheels = [
1051
- { url = "https://files.pythonhosted.org/packages/e8/c1/48474fbead512b70ccdb4f81ba5eb4a58f69d100ba19f17c92c0c4f50ae6/types_PyYAML-6.0.12.20241230-py3-none-any.whl", hash = "sha256:fa4d32565219b68e6dee5f67534c722e53c00d1cfc09c435ef04d7353e1e96e6", size = 20029 },
1052
- ]
1053
-
1054
1043
  [[package]]
1055
1044
  name = "typing-extensions"
1056
1045
  version = "4.12.2"
@@ -1,11 +0,0 @@
1
- accounts: |
2
- 5BJ9ViMj4gi2BBX3wbCEJ4p4vpVWKpG6ja2aQP2ACBUv
3
- HbSAUDjzpr44fWzf9Ynj3V1jq3wBsgg88N88P4vzeGPX
4
-
5
- tokens: |
6
- 7XtmNSHJDHTZdx2K1S8D529kHsBbt3Civxt6vUHrGxBR
7
- 65FKbLPtrssmc8aVn9DEBY8VTGB85vsgadrmaW9H4nEB
8
-
9
- nodes: |
10
- https://api.mainnet-beta.solana.com
11
- # https://rpc.ankr.com/solana
@@ -1,9 +0,0 @@
1
- routes: |
2
- Bd8CxCTLez2ckVTqEJjuZkWjYFSRbo8fA1qYbd7yFVP9 Eaft9xXzfgbRqsHd65WspoaxTtH7pkznM9YA8tsDKGwj
3
- Fc2TRJVCpFZpRz56mFnQETctib1zwFnwHcS7HoQSgUzZ EVJctTWikt29rUXBf49tyQdK87x837HtvpCwqeSjp1Ur
4
- private_keys: "file: ./path/to/privates.txt"
5
- value: 0.012 sol
6
-
7
- proxies: "url: https://site.com/api/get-proxies"
8
- nodes: |
9
- https://api.devnet.solana.com
@@ -1,11 +0,0 @@
1
- routes: |
2
- Bd8CxCTLez2ckVTqEJjuZkWjYFSRbo8fA1qYbd7yFVP9 Eaft9xXzfgbRqsHd65WspoaxTtH7pkznM9YA8tsDKGwj
3
- Fc2TRJVCpFZpRz56mFnQETctib1zwFnwHcS7HoQSgUzZ EVJctTWikt29rUXBf49tyQdK87x837HtvpCwqeSjp1Ur
4
- token: 6VBTMLgv256c7scudNf8T5GoTJcEE8WfgcJhxbGYPQ8G
5
-
6
- private_keys_file: ./path/to/privates.txt
7
- value: 0.012 t
8
-
9
- proxies_url: https://site.com/api/get-proxies
10
- nodes: |
11
- https://api.devnet.solana.com
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