hippius 0.2.4__tar.gz → 0.2.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.
- {hippius-0.2.4 → hippius-0.2.6}/PKG-INFO +1 -1
- {hippius-0.2.4 → hippius-0.2.6}/hippius_sdk/__init__.py +21 -10
- {hippius-0.2.4 → hippius-0.2.6}/hippius_sdk/cli.py +12 -0
- {hippius-0.2.4 → hippius-0.2.6}/hippius_sdk/cli_handlers.py +413 -57
- {hippius-0.2.4 → hippius-0.2.6}/hippius_sdk/cli_parser.py +20 -0
- {hippius-0.2.4 → hippius-0.2.6}/hippius_sdk/cli_rich.py +8 -2
- {hippius-0.2.4 → hippius-0.2.6}/hippius_sdk/client.py +5 -3
- hippius-0.2.6/hippius_sdk/errors.py +77 -0
- {hippius-0.2.4 → hippius-0.2.6}/hippius_sdk/ipfs.py +249 -298
- hippius-0.2.6/hippius_sdk/ipfs_core.py +443 -0
- {hippius-0.2.4 → hippius-0.2.6}/hippius_sdk/substrate.py +101 -14
- {hippius-0.2.4 → hippius-0.2.6}/pyproject.toml +1 -1
- hippius-0.2.4/hippius_sdk/ipfs_core.py +0 -237
- {hippius-0.2.4 → hippius-0.2.6}/README.md +0 -0
- {hippius-0.2.4 → hippius-0.2.6}/hippius_sdk/cli_assets.py +0 -0
- {hippius-0.2.4 → hippius-0.2.6}/hippius_sdk/config.py +0 -0
- {hippius-0.2.4 → hippius-0.2.6}/hippius_sdk/utils.py +0 -0
@@ -3,19 +3,30 @@ Hippius SDK - Python interface for Hippius blockchain storage
|
|
3
3
|
"""
|
4
4
|
|
5
5
|
from hippius_sdk.client import HippiusClient
|
6
|
-
from hippius_sdk.config import (
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
6
|
+
from hippius_sdk.config import (
|
7
|
+
decrypt_seed_phrase,
|
8
|
+
delete_account,
|
9
|
+
encrypt_seed_phrase,
|
10
|
+
get_account_address,
|
11
|
+
get_active_account,
|
12
|
+
get_all_config,
|
13
|
+
get_config_value,
|
14
|
+
get_encryption_key,
|
15
|
+
get_seed_phrase,
|
16
|
+
initialize_from_env,
|
17
|
+
list_accounts,
|
18
|
+
load_config,
|
19
|
+
reset_config,
|
20
|
+
save_config,
|
21
|
+
set_active_account,
|
22
|
+
set_config_value,
|
23
|
+
set_encryption_key,
|
24
|
+
set_seed_phrase,
|
25
|
+
)
|
15
26
|
from hippius_sdk.ipfs import IPFSClient
|
16
27
|
from hippius_sdk.utils import format_cid, format_size, hex_to_ipfs_cid
|
17
28
|
|
18
|
-
__version__ = "0.2.
|
29
|
+
__version__ = "0.2.6"
|
19
30
|
__all__ = [
|
20
31
|
"HippiusClient",
|
21
32
|
"IPFSClient",
|
@@ -113,6 +113,16 @@ def main():
|
|
113
113
|
encrypt = True if args.encrypt else (False if args.no_encrypt else None)
|
114
114
|
decrypt = True if args.decrypt else (False if args.no_decrypt else None)
|
115
115
|
|
116
|
+
# For erasure-code specifically, the password may have been requested and cached already
|
117
|
+
# We need to preserve it if it was set by handle_erasure_code
|
118
|
+
if (
|
119
|
+
args.command == "erasure-code"
|
120
|
+
and hasattr(client.substrate_client, "_seed_phrase")
|
121
|
+
and client.substrate_client._seed_phrase
|
122
|
+
):
|
123
|
+
# Password has already been handled by the command handler
|
124
|
+
pass
|
125
|
+
|
116
126
|
# Handle commands with the helper function
|
117
127
|
if args.command == "download":
|
118
128
|
return run_async_handler(
|
@@ -142,6 +152,7 @@ def main():
|
|
142
152
|
args.file_path,
|
143
153
|
miner_ids,
|
144
154
|
encrypt=encrypt,
|
155
|
+
publish=not args.no_publish if hasattr(args, "no_publish") else True,
|
145
156
|
)
|
146
157
|
|
147
158
|
elif args.command == "store-dir":
|
@@ -151,6 +162,7 @@ def main():
|
|
151
162
|
args.dir_path,
|
152
163
|
miner_ids,
|
153
164
|
encrypt=encrypt,
|
165
|
+
publish=not args.no_publish if hasattr(args, "no_publish") else True,
|
154
166
|
)
|
155
167
|
|
156
168
|
elif args.command == "credits":
|