algokit-utils 2.2.2b4__py3-none-any.whl → 2.3.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.
Potentially problematic release.
This version of algokit-utils might be problematic. Click here for more details.
- algokit_utils/_transfer.py +11 -6
- algokit_utils/beta/account_manager.py +200 -0
- algokit_utils/beta/algorand_client.py +319 -0
- algokit_utils/beta/client_manager.py +78 -0
- algokit_utils/beta/composer.py +716 -0
- algokit_utils/network_clients.py +17 -0
- {algokit_utils-2.2.2b4.dist-info → algokit_utils-2.3.0.dist-info}/METADATA +1 -1
- {algokit_utils-2.2.2b4.dist-info → algokit_utils-2.3.0.dist-info}/RECORD +10 -6
- {algokit_utils-2.2.2b4.dist-info → algokit_utils-2.3.0.dist-info}/LICENSE +0 -0
- {algokit_utils-2.2.2b4.dist-info → algokit_utils-2.3.0.dist-info}/WHEEL +0 -0
algokit_utils/network_clients.py
CHANGED
|
@@ -18,6 +18,8 @@ __all__ = [
|
|
|
18
18
|
"is_localnet",
|
|
19
19
|
"is_mainnet",
|
|
20
20
|
"is_testnet",
|
|
21
|
+
"AlgoClientConfigs",
|
|
22
|
+
"get_kmd_client",
|
|
21
23
|
]
|
|
22
24
|
|
|
23
25
|
_PURE_STAKE_HOST = "purestake.io"
|
|
@@ -34,6 +36,13 @@ class AlgoClientConfig:
|
|
|
34
36
|
"""API Token to authenticate with the service"""
|
|
35
37
|
|
|
36
38
|
|
|
39
|
+
@dataclasses.dataclass
|
|
40
|
+
class AlgoClientConfigs:
|
|
41
|
+
algod_config: AlgoClientConfig
|
|
42
|
+
indexer_config: AlgoClientConfig
|
|
43
|
+
kmd_config: AlgoClientConfig | None
|
|
44
|
+
|
|
45
|
+
|
|
37
46
|
def get_default_localnet_config(config: Literal["algod", "indexer", "kmd"]) -> AlgoClientConfig:
|
|
38
47
|
"""Returns the client configuration to point to the default LocalNet"""
|
|
39
48
|
port = {"algod": 4001, "indexer": 8980, "kmd": 4002}[config]
|
|
@@ -69,6 +78,14 @@ def get_algod_client(config: AlgoClientConfig | None = None) -> AlgodClient:
|
|
|
69
78
|
return AlgodClient(config.token, config.server, headers)
|
|
70
79
|
|
|
71
80
|
|
|
81
|
+
def get_kmd_client(config: AlgoClientConfig | None = None) -> KMDClient:
|
|
82
|
+
"""Returns an {py:class}`algosdk.kmd.KMDClient` from `config` or environment
|
|
83
|
+
|
|
84
|
+
If no configuration provided will use environment variables `KMD_SERVER`, `KMD_PORT` and `KMD_TOKEN`"""
|
|
85
|
+
config = config or _get_config_from_environment("KMD")
|
|
86
|
+
return KMDClient(config.token, config.server) # type: ignore[no-untyped-call]
|
|
87
|
+
|
|
88
|
+
|
|
72
89
|
def get_indexer_client(config: AlgoClientConfig | None = None) -> IndexerClient:
|
|
73
90
|
"""Returns an {py:class}`algosdk.v2client.indexer.IndexerClient` from `config` or environment.
|
|
74
91
|
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
algokit_utils/__init__.py,sha256=yeufbE_5wjRILZs_10UD5B3_sjdwAfPXskdFKskzXhg,4963
|
|
2
2
|
algokit_utils/_debugging.py,sha256=4UC5NZGqxF32y742TUB34rX9kWaObXCCPOs-lbkQjGQ,10732
|
|
3
3
|
algokit_utils/_ensure_funded.py,sha256=ZdEdUB43QGIQrg7cSSgNrDmWaLSUhli9x9I6juwKfgo,6786
|
|
4
|
-
algokit_utils/_transfer.py,sha256=
|
|
4
|
+
algokit_utils/_transfer.py,sha256=R9q8RoMHiwtqcwQjuGHEluMxIzmYqAsI5WrTsQd24Ds,6021
|
|
5
5
|
algokit_utils/account.py,sha256=UIuOQZe28pQxjEP9TzhtYlOU20tUdzzS-nIIZM9Bp6Y,7364
|
|
6
6
|
algokit_utils/application_client.py,sha256=xOZJ8i3y8wDJL0Uvaw1o-UmJKvSmbv8ib5RwGl4ar0w,58661
|
|
7
7
|
algokit_utils/application_specification.py,sha256=XusOe7VrGPun2UoNspC9Ei202NzPkxRNx5USXiABuXc,7466
|
|
8
8
|
algokit_utils/asset.py,sha256=jsc7T1dH9HZA3Yve2gRLObwUlK6xLDoQz0NxLLnqaGs,7216
|
|
9
|
+
algokit_utils/beta/account_manager.py,sha256=dSb-jpBAWRfmKFYzG6T8t5vkh6ysX2NkZXl5UcZY5WA,8015
|
|
10
|
+
algokit_utils/beta/algorand_client.py,sha256=y1CYYn_ADwgOLTVID9BFMvdubDgKqUfx9R6XH3PrzsA,12649
|
|
11
|
+
algokit_utils/beta/client_manager.py,sha256=rW58VVBdYAV_5QwXNyt3VMP8NGon_IRhq1Dr35Mp31g,3117
|
|
12
|
+
algokit_utils/beta/composer.py,sha256=qpIWQ6Xeysk1FzqW8AntHJ_go_W2qIEDB4uvGFOOdgM,28627
|
|
9
13
|
algokit_utils/common.py,sha256=K6-3_9dv2clDn0WMYb8AWE_N46kWWIXglZIPfHIowDs,812
|
|
10
14
|
algokit_utils/config.py,sha256=oY3o1kPzVPRiQH--f4HzrMMNPojT078CSudqS9WQaEc,4279
|
|
11
15
|
algokit_utils/deploy.py,sha256=ydE3QSq1lRkjXQC9zdFclywx8q1UgV9l-l3Mx-shbHg,34668
|
|
12
16
|
algokit_utils/dispenser_api.py,sha256=BpwEhKDig6qz54wbO-htG8hmLxFIrvdzXpESUb7Y1zw,5584
|
|
13
17
|
algokit_utils/logic_error.py,sha256=YeE70qHZ6WBeoKCXqnto3uBg8R4ODXiNZkLmfEmASQo,2617
|
|
14
18
|
algokit_utils/models.py,sha256=GWpZQ2bTGfkldM12VZntGlVJTFBTtWf5SM7ZYXC_LHE,8238
|
|
15
|
-
algokit_utils/network_clients.py,sha256=
|
|
19
|
+
algokit_utils/network_clients.py,sha256=O4nJ3ECms4hFbuB1X64nzTMNOfK1Uj2oyjKxeieri-g,5929
|
|
16
20
|
algokit_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
algokit_utils-2.
|
|
18
|
-
algokit_utils-2.
|
|
19
|
-
algokit_utils-2.
|
|
20
|
-
algokit_utils-2.
|
|
21
|
+
algokit_utils-2.3.0.dist-info/LICENSE,sha256=J5i7U1Q9Q2c7saUzlvFRmrCCFhQyXb5Juz_LO5omNUw,1076
|
|
22
|
+
algokit_utils-2.3.0.dist-info/METADATA,sha256=jAqL6L3gHaVkXH9jzsWn7o9JePrVCTstcLhP3c8heqk,2205
|
|
23
|
+
algokit_utils-2.3.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
24
|
+
algokit_utils-2.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|