hippius 0.2.4__py3-none-any.whl → 0.2.5__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.
- {hippius-0.2.4.dist-info → hippius-0.2.5.dist-info}/METADATA +1 -1
- hippius-0.2.5.dist-info/RECORD +17 -0
- hippius_sdk/__init__.py +21 -10
- hippius_sdk/cli.py +11 -0
- hippius_sdk/cli_handlers.py +256 -48
- hippius_sdk/cli_parser.py +20 -0
- hippius_sdk/cli_rich.py +8 -2
- hippius_sdk/client.py +5 -3
- hippius_sdk/errors.py +77 -0
- hippius_sdk/ipfs.py +237 -297
- hippius_sdk/ipfs_core.py +209 -9
- hippius_sdk/substrate.py +101 -14
- hippius-0.2.4.dist-info/RECORD +0 -16
- {hippius-0.2.4.dist-info → hippius-0.2.5.dist-info}/WHEEL +0 -0
- {hippius-0.2.4.dist-info → hippius-0.2.5.dist-info}/entry_points.txt +0 -0
hippius_sdk/errors.py
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
"""
|
2
|
+
Custom exceptions for the Hippius SDK.
|
3
|
+
"""
|
4
|
+
|
5
|
+
|
6
|
+
class HippiusError(Exception):
|
7
|
+
"""Base exception for all Hippius-specific errors."""
|
8
|
+
|
9
|
+
pass
|
10
|
+
|
11
|
+
|
12
|
+
class HippiusSubstrateError(HippiusError):
|
13
|
+
"""Base exception for Substrate-related errors."""
|
14
|
+
|
15
|
+
pass
|
16
|
+
|
17
|
+
|
18
|
+
class HippiusIPFSError(HippiusError):
|
19
|
+
"""Base exception for IPFS-related errors."""
|
20
|
+
|
21
|
+
pass
|
22
|
+
|
23
|
+
|
24
|
+
# Specific blockchain errors
|
25
|
+
class HippiusNotFoundError(HippiusSubstrateError):
|
26
|
+
"""Raised when a resource is not found on the blockchain."""
|
27
|
+
|
28
|
+
pass
|
29
|
+
|
30
|
+
|
31
|
+
class HippiusAlreadyDeletedError(HippiusSubstrateError):
|
32
|
+
"""Raised when trying to delete a file that's already deleted from the blockchain."""
|
33
|
+
|
34
|
+
pass
|
35
|
+
|
36
|
+
|
37
|
+
class HippiusSubstrateConnectionError(HippiusSubstrateError):
|
38
|
+
"""Raised when there's an issue connecting to the Substrate node."""
|
39
|
+
|
40
|
+
pass
|
41
|
+
|
42
|
+
|
43
|
+
class HippiusSubstrateAuthError(HippiusSubstrateError):
|
44
|
+
"""Raised when there's an authentication issue with the Substrate client."""
|
45
|
+
|
46
|
+
pass
|
47
|
+
|
48
|
+
|
49
|
+
class HippiusFailedSubstrateDelete(HippiusSubstrateError):
|
50
|
+
"""Raised when deletion from blockchain storage fails."""
|
51
|
+
|
52
|
+
pass
|
53
|
+
|
54
|
+
|
55
|
+
# IPFS-specific errors
|
56
|
+
class HippiusIPFSConnectionError(HippiusIPFSError):
|
57
|
+
"""Raised when there's an issue connecting to IPFS."""
|
58
|
+
|
59
|
+
pass
|
60
|
+
|
61
|
+
|
62
|
+
class HippiusFailedIPFSUnpin(HippiusIPFSError):
|
63
|
+
"""Raised when unpinning from IPFS fails."""
|
64
|
+
|
65
|
+
pass
|
66
|
+
|
67
|
+
|
68
|
+
class HippiusMetadataError(HippiusIPFSError):
|
69
|
+
"""Raised when there's an issue with the metadata file."""
|
70
|
+
|
71
|
+
pass
|
72
|
+
|
73
|
+
|
74
|
+
class HippiusInvalidCIDError(HippiusIPFSError):
|
75
|
+
"""Raised when an invalid CID is provided."""
|
76
|
+
|
77
|
+
pass
|