peaq-os-cli 0.0.2__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.
- peaq_os_cli/__init__.py +67 -0
- peaq_os_cli/commands/__init__.py +7 -0
- peaq_os_cli/commands/activate.py +1846 -0
- peaq_os_cli/commands/init_cmd.py +344 -0
- peaq_os_cli/commands/qualify.py +387 -0
- peaq_os_cli/commands/show.py +253 -0
- peaq_os_cli/commands/wallet.py +438 -0
- peaq_os_cli/commands/whoami.py +73 -0
- peaq_os_cli/config.py +373 -0
- peaq_os_cli/constants/__init__.py +29 -0
- peaq_os_cli/constants/formatting.py +21 -0
- peaq_os_cli/constants/patterns.py +12 -0
- peaq_os_cli/enums/__init__.py +19 -0
- peaq_os_cli/enums/env.py +37 -0
- peaq_os_cli/enums/events.py +91 -0
- peaq_os_cli/enums/exit_code.py +20 -0
- peaq_os_cli/enums/network.py +19 -0
- peaq_os_cli/errors.py +212 -0
- peaq_os_cli/formatting.py +295 -0
- peaq_os_cli/main.py +114 -0
- peaq_os_cli/messages.py +124 -0
- peaq_os_cli/networks.py +171 -0
- peaq_os_cli/qr.py +145 -0
- peaq_os_cli/utils.py +186 -0
- peaq_os_cli-0.0.2.dist-info/METADATA +611 -0
- peaq_os_cli-0.0.2.dist-info/RECORD +29 -0
- peaq_os_cli-0.0.2.dist-info/WHEEL +5 -0
- peaq_os_cli-0.0.2.dist-info/entry_points.txt +2 -0
- peaq_os_cli-0.0.2.dist-info/top_level.txt +1 -0
peaq_os_cli/__init__.py
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""Public package surface for the peaqOS command-line interface."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import logging
|
|
6
|
+
|
|
7
|
+
from peaq_os_cli.config import get_network_defaults, load_client
|
|
8
|
+
from peaq_os_cli.enums import CliFlag, EnvVar, ExitCode, Network, PeaqNetwork
|
|
9
|
+
from peaq_os_cli.errors import (
|
|
10
|
+
handle_sdk_error,
|
|
11
|
+
map_faucet_error,
|
|
12
|
+
map_ows_error,
|
|
13
|
+
map_revert_reason,
|
|
14
|
+
raise_config_error,
|
|
15
|
+
raise_network_error,
|
|
16
|
+
raise_user_error,
|
|
17
|
+
)
|
|
18
|
+
from peaq_os_cli.formatting import (
|
|
19
|
+
format_chain_label,
|
|
20
|
+
format_key_value,
|
|
21
|
+
format_table,
|
|
22
|
+
format_timestamp,
|
|
23
|
+
print_json,
|
|
24
|
+
print_step,
|
|
25
|
+
truncate_address,
|
|
26
|
+
)
|
|
27
|
+
from peaq_os_cli.main import cli
|
|
28
|
+
from peaq_os_cli.utils import (
|
|
29
|
+
parse_timestamp,
|
|
30
|
+
read_key_file,
|
|
31
|
+
validate_address_format,
|
|
32
|
+
validate_did_format,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
__version__ = "0.0.1"
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
"CliFlag",
|
|
39
|
+
"EnvVar",
|
|
40
|
+
"ExitCode",
|
|
41
|
+
"Network",
|
|
42
|
+
"PeaqNetwork",
|
|
43
|
+
"__version__",
|
|
44
|
+
"cli",
|
|
45
|
+
"format_chain_label",
|
|
46
|
+
"format_key_value",
|
|
47
|
+
"format_table",
|
|
48
|
+
"format_timestamp",
|
|
49
|
+
"get_network_defaults",
|
|
50
|
+
"handle_sdk_error",
|
|
51
|
+
"load_client",
|
|
52
|
+
"map_faucet_error",
|
|
53
|
+
"map_ows_error",
|
|
54
|
+
"map_revert_reason",
|
|
55
|
+
"parse_timestamp",
|
|
56
|
+
"print_json",
|
|
57
|
+
"print_step",
|
|
58
|
+
"raise_config_error",
|
|
59
|
+
"raise_network_error",
|
|
60
|
+
"raise_user_error",
|
|
61
|
+
"read_key_file",
|
|
62
|
+
"truncate_address",
|
|
63
|
+
"validate_address_format",
|
|
64
|
+
"validate_did_format",
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
logging.getLogger("peaq_os_cli").addHandler(logging.NullHandler())
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"""Subcommand package for the peaqOS CLI.
|
|
2
|
+
|
|
3
|
+
Each module under ``commands`` exposes a Click command or group that the
|
|
4
|
+
root ``cli`` group in :mod:`peaq_os_cli.main` registers. Keeping commands
|
|
5
|
+
in their own package lets validation and dispatch logic live near the
|
|
6
|
+
surface that uses them.
|
|
7
|
+
"""
|