mm-btc 0.0.4__tar.gz → 0.0.5__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_btc-0.0.4 → mm_btc-0.0.5}/PKG-INFO +1 -1
- {mm_btc-0.0.4 → mm_btc-0.0.5}/pyproject.toml +1 -1
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc/cli/cli.py +13 -3
- mm_btc-0.0.5/src/mm_btc/cli/cmd/address_cmd.py +10 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc/wallet.py +4 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc.egg-info/PKG-INFO +1 -1
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc.egg-info/SOURCES.txt +1 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/README.txt +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/setup.cfg +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc/__init__.py +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc/blockstream.py +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc/cli/__init__.py +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc/cli/cli_utils.py +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc/cli/cmd/__init__.py +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc/cli/cmd/mnemonic_cmd.py +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc/py.typed +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc.egg-info/dependency_links.txt +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc.egg-info/entry_points.txt +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc.egg-info/requires.txt +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/src/mm_btc.egg-info/top_level.txt +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/tests/test_blockstream.py +0 -0
- {mm_btc-0.0.4 → mm_btc-0.0.5}/tests/test_wallet.py +0 -0
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
from typing import Annotated
|
|
2
2
|
|
|
3
3
|
import typer
|
|
4
|
+
import typer.core
|
|
4
5
|
from mm_std import print_plain
|
|
5
6
|
|
|
6
7
|
from mm_btc.cli import cli_utils
|
|
7
|
-
from mm_btc.cli.cmd import mnemonic_cmd
|
|
8
|
+
from mm_btc.cli.cmd import address_cmd, mnemonic_cmd
|
|
8
9
|
|
|
9
10
|
app = typer.Typer(no_args_is_help=True, pretty_exceptions_enable=False, add_completion=False)
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
@app.command(
|
|
13
|
+
@app.command("mnemonic")
|
|
14
|
+
@app.command(name="m", hidden=True)
|
|
13
15
|
def mnemonic_command( # nosec B107:hardcoded_password_default
|
|
14
16
|
mnemonic: Annotated[str, typer.Option("--mnemonic", "-m", help="")] = "",
|
|
15
17
|
passphrase: Annotated[str, typer.Option("--passphrase", "-p")] = "",
|
|
@@ -19,6 +21,7 @@ def mnemonic_command( # nosec B107:hardcoded_password_default
|
|
|
19
21
|
limit: int = typer.Option(10, "--limit", "-l"),
|
|
20
22
|
testnet: bool = typer.Option(False, "--testnet", "-t", help="Testnet network"),
|
|
21
23
|
) -> None:
|
|
24
|
+
"""Generate keys based on a mnemonic"""
|
|
22
25
|
mnemonic_cmd.run(
|
|
23
26
|
mnemonic_cmd.Args(
|
|
24
27
|
mnemonic=mnemonic,
|
|
@@ -32,9 +35,16 @@ def mnemonic_command( # nosec B107:hardcoded_password_default
|
|
|
32
35
|
)
|
|
33
36
|
|
|
34
37
|
|
|
38
|
+
@app.command(name="address")
|
|
39
|
+
@app.command(name="a", hidden=True)
|
|
40
|
+
def address_command(address: str) -> None:
|
|
41
|
+
"""Get address info from Blockstream API"""
|
|
42
|
+
address_cmd.run(address)
|
|
43
|
+
|
|
44
|
+
|
|
35
45
|
def version_callback(value: bool) -> None:
|
|
36
46
|
if value:
|
|
37
|
-
print_plain(f"mm-
|
|
47
|
+
print_plain(f"mm-btc: v{cli_utils.get_version()}")
|
|
38
48
|
raise typer.Exit()
|
|
39
49
|
|
|
40
50
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from mm_std import print_json
|
|
2
|
+
|
|
3
|
+
from mm_btc import blockstream
|
|
4
|
+
from mm_btc.wallet import is_testnet_address
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def run(address: str) -> None:
|
|
8
|
+
testnet = is_testnet_address(address)
|
|
9
|
+
res = blockstream.get_address(address, testnet=testnet)
|
|
10
|
+
print_json(res)
|
|
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
|