mm-sol 0.2.10__py3-none-any.whl → 0.3.0__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_sol/cli/cli.py +4 -3
- mm_sol/cli/cmd/balances_cmd.py +3 -2
- mm_sol/cli/cmd/example_cmd.py +1 -1
- mm_sol/cli/cmd/transfer_sol_cmd.py +2 -2
- mm_sol/cli/cmd/transfer_token_cmd.py +2 -2
- mm_sol/cli/examples/balances.toml +9 -0
- mm_sol/cli/examples/transfer-sol.toml +8 -0
- mm_sol/cli/examples/transfer-token.toml +9 -0
- {mm_sol-0.2.10.dist-info → mm_sol-0.3.0.dist-info}/METADATA +2 -2
- {mm_sol-0.2.10.dist-info → mm_sol-0.3.0.dist-info}/RECORD +12 -12
- mm_sol/cli/examples/balances.yml +0 -11
- mm_sol/cli/examples/transfer-sol.yml +0 -9
- mm_sol/cli/examples/transfer-token.yml +0 -11
- {mm_sol-0.2.10.dist-info → mm_sol-0.3.0.dist-info}/WHEEL +0 -0
- {mm_sol-0.2.10.dist-info → mm_sol-0.3.0.dist-info}/entry_points.txt +0 -0
mm_sol/cli/cli.py
CHANGED
|
@@ -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:
|
|
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:
|
|
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:
|
|
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"),
|
mm_sol/cli/cmd/balances_cmd.py
CHANGED
|
@@ -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:
|
|
27
|
-
config = Config.
|
|
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
|
|
mm_sol/cli/cmd/example_cmd.py
CHANGED
|
@@ -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}.
|
|
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:
|
|
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.
|
|
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:
|
|
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.
|
|
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"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mm-sol
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
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
|
|
7
|
+
Requires-Dist: mm-crypto-utils~=0.1.1
|
|
8
8
|
Requires-Dist: solana~=0.36.3
|
|
9
9
|
Requires-Dist: typer>=0.15.1
|
|
@@ -12,23 +12,23 @@ mm_sol/transfer.py,sha256=Gu6UYEjY5OECSusKJO-VA8C3B7W6ZJGjegUv67EQdfs,5809
|
|
|
12
12
|
mm_sol/utils.py,sha256=NE0G564GiT9d7rW_lPPxUb1eq62WiXh28xtvtzNQIqw,556
|
|
13
13
|
mm_sol/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
mm_sol/cli/calcs.py,sha256=-r9RlsQyOziTDf84uIsvTgZmsUdNrVeazu3vTj9hhNA,1887
|
|
15
|
-
mm_sol/cli/cli.py,sha256=
|
|
15
|
+
mm_sol/cli/cli.py,sha256=CWzpH96zmODarCm4gfrj6_jXCPdPI-tMmbtqMYdnMqA,4584
|
|
16
16
|
mm_sol/cli/cli_utils.py,sha256=Skj0SCHPWMHGr2ag-em1JtIK9Qdh7xeJafMzvCgChnc,2254
|
|
17
17
|
mm_sol/cli/validators.py,sha256=_HEMOG7ojGKNp8AHX9tXpo9ZDCeRJ85coI-5MO3u95s,1209
|
|
18
18
|
mm_sol/cli/cmd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
mm_sol/cli/cmd/balance_cmd.py,sha256=DfUZY3-Hr-F7Y0xp1faol0yLnPu6iDU3b839VhdwAbw,2587
|
|
20
|
-
mm_sol/cli/cmd/balances_cmd.py,sha256=
|
|
21
|
-
mm_sol/cli/cmd/example_cmd.py,sha256=
|
|
20
|
+
mm_sol/cli/cmd/balances_cmd.py,sha256=mLKulZnmWGixzbzYYvb4dUvJcNPKFHnNyk3WnuAmKio,2215
|
|
21
|
+
mm_sol/cli/cmd/example_cmd.py,sha256=M5dvRg9jvpVUwxvMRiRnO77aKR7c57bMY9booxMAswM,222
|
|
22
22
|
mm_sol/cli/cmd/node_cmd.py,sha256=2AEAjq2M9f8-RZiI0rif6wITdns9QUb4Kr34QPsI2CA,238
|
|
23
|
-
mm_sol/cli/cmd/transfer_sol_cmd.py,sha256=
|
|
24
|
-
mm_sol/cli/cmd/transfer_token_cmd.py,sha256=
|
|
23
|
+
mm_sol/cli/cmd/transfer_sol_cmd.py,sha256=ZBdkb7YrR88foT3zobMZGnDYAHWgx8ljkxRKpkWyM0w,5313
|
|
24
|
+
mm_sol/cli/cmd/transfer_token_cmd.py,sha256=NCaSdO-eud-ef7SdWyTwWdSLiBegYAHySvKz22_j1cg,5911
|
|
25
25
|
mm_sol/cli/cmd/wallet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
mm_sol/cli/cmd/wallet/keypair_cmd.py,sha256=cRHVVTs9zNYmUozZ8ZlJoutn9V6r8I1AEHBrszR7dTE,538
|
|
27
27
|
mm_sol/cli/cmd/wallet/new_cmd.py,sha256=hcP9NZPkwYkTBEvT5rBntFtCIvx1QnPGn5FUDnvz5sM,425
|
|
28
|
-
mm_sol/cli/examples/balances.
|
|
29
|
-
mm_sol/cli/examples/transfer-sol.
|
|
30
|
-
mm_sol/cli/examples/transfer-token.
|
|
31
|
-
mm_sol-0.
|
|
32
|
-
mm_sol-0.
|
|
33
|
-
mm_sol-0.
|
|
34
|
-
mm_sol-0.
|
|
28
|
+
mm_sol/cli/examples/balances.toml,sha256=8WvnKD1yUz51K1Rd3kkDQI5uOmRwE7DH8paibI-i1uM,262
|
|
29
|
+
mm_sol/cli/examples/transfer-sol.toml,sha256=1LdkhSBC0y5oMJXjm8MVIMyZruIrYSIm3LBDGmcS5Iw,353
|
|
30
|
+
mm_sol/cli/examples/transfer-token.toml,sha256=I_Wof-APv-h6xeYVq0zbWfLbpDny2kz9U0xJifVNEtU,401
|
|
31
|
+
mm_sol-0.3.0.dist-info/METADATA,sha256=RVZeWBCGk30AhpqEFhuXZ8g4DcrmHelApVVa-9PgecY,229
|
|
32
|
+
mm_sol-0.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
33
|
+
mm_sol-0.3.0.dist-info/entry_points.txt,sha256=MrYnosumy9nsITSAw5TiR3WXDwsdoF0YvUIlZ38TLLs,46
|
|
34
|
+
mm_sol-0.3.0.dist-info/RECORD,,
|
mm_sol/cli/examples/balances.yml
DELETED
|
@@ -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
|