zhlink 0.1.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.
zhlink/__init__.py ADDED
@@ -0,0 +1,36 @@
1
+ """Internal implementation package for the public :mod:`zhlink` API."""
2
+
3
+ from . import _rawtx_bridge # noqa: F401
4
+ from .api import (
5
+ Balance,
6
+ admin_gas_wallet_info,
7
+ create_address,
8
+ get_balance,
9
+ send_zhc,
10
+ send_usdz_gas_free,
11
+ )
12
+ from .config import (
13
+ ZHLinkConfig,
14
+ )
15
+ from .mnemonic import (
16
+ Bip39Wallet,
17
+ derive_bip39_zhc_wallet,
18
+ generate_bip39_mnemonic,
19
+ generate_bip39_zhc_wallet,
20
+ validate_bip39_mnemonic,
21
+ )
22
+
23
+ __all__ = [
24
+ "Bip39Wallet",
25
+ "Balance",
26
+ "ZHLinkConfig",
27
+ "admin_gas_wallet_info",
28
+ "create_address",
29
+ "derive_bip39_zhc_wallet",
30
+ "generate_bip39_mnemonic",
31
+ "generate_bip39_zhc_wallet",
32
+ "get_balance",
33
+ "send_usdz_gas_free",
34
+ "send_zhc",
35
+ "validate_bip39_mnemonic",
36
+ ]
@@ -0,0 +1,29 @@
1
+ from __future__ import annotations
2
+
3
+ import sys
4
+ from pathlib import Path
5
+
6
+
7
+ def ensure_zhc_rawtx_path() -> None:
8
+ """Make the bundled or sibling zhc_rawtx importable.
9
+
10
+ `zhlink` vendors `zhc_rawtx` under `_vendor` so it can be copied or
11
+ zipped as one self-contained library. The sibling source-tree package stays
12
+ as a development fallback.
13
+ """
14
+
15
+ package_dir = Path(__file__).resolve().parent
16
+ candidates = [
17
+ package_dir / "_vendor",
18
+ package_dir.parents[0] / "zhc_rawtx",
19
+ ]
20
+ for root in reversed(candidates):
21
+ if root.exists():
22
+ path = str(root)
23
+ if path not in sys.path:
24
+ sys.path.insert(0, path)
25
+
26
+
27
+ ensure_zhc_rawtx_path()
28
+
29
+ import zhc_rawtx # noqa: F401,E402