algokit-utils 2.2.2b5__py3-none-any.whl → 2.3.0b1__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.

@@ -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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: algokit-utils
3
- Version: 2.2.2b5
3
+ Version: 2.3.0b1
4
4
  Summary: Utilities for Algorand development for use by AlgoKit
5
5
  License: MIT
6
6
  Author: Algorand Foundation
@@ -6,15 +6,19 @@ algokit_utils/account.py,sha256=UIuOQZe28pQxjEP9TzhtYlOU20tUdzzS-nIIZM9Bp6Y,7364
6
6
  algokit_utils/application_client.py,sha256=qylA2aI4Ecs532bIs6fyc6FgLnWey9PBzZBZW_jnYtk,59092
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=BxIFPtZd1lO8o_JmQQDIKk0O93E_bE-ZzglEWXwbefw,35110
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=iJUiV6eLq5N_FKki4X5ll5rYQslU_wSPiSTtl61Z1CI,12803
15
- algokit_utils/network_clients.py,sha256=sj5y_g5uclddWCEyUCptA-KjWuAtLV06hZH4QIGM1yE,5313
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.2.2b5.dist-info/LICENSE,sha256=J5i7U1Q9Q2c7saUzlvFRmrCCFhQyXb5Juz_LO5omNUw,1076
18
- algokit_utils-2.2.2b5.dist-info/METADATA,sha256=8mkuN9VkBEa_Z2oH1GmzccM-SH63NFZmlBsXxc5CHQ4,2207
19
- algokit_utils-2.2.2b5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
20
- algokit_utils-2.2.2b5.dist-info/RECORD,,
21
+ algokit_utils-2.3.0b1.dist-info/LICENSE,sha256=J5i7U1Q9Q2c7saUzlvFRmrCCFhQyXb5Juz_LO5omNUw,1076
22
+ algokit_utils-2.3.0b1.dist-info/METADATA,sha256=dybj019jKMUl-xvnqX0pKgaKzNT2snOiY_APCekP21Q,2207
23
+ algokit_utils-2.3.0b1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
24
+ algokit_utils-2.3.0b1.dist-info/RECORD,,