algokit-utils 4.0.0b2__py3-none-any.whl → 4.0.1__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/applications/app_manager.py +10 -1
- algokit_utils/models/state.py +2 -1
- {algokit_utils-4.0.0b2.dist-info → algokit_utils-4.0.1.dist-info}/METADATA +2 -2
- {algokit_utils-4.0.0b2.dist-info → algokit_utils-4.0.1.dist-info}/RECORD +6 -6
- {algokit_utils-4.0.0b2.dist-info → algokit_utils-4.0.1.dist-info}/WHEEL +1 -1
- {algokit_utils-4.0.0b2.dist-info → algokit_utils-4.0.1.dist-info}/LICENSE +0 -0
|
@@ -261,6 +261,8 @@ class AppManager:
|
|
|
261
261
|
def get_box_names(self, app_id: int) -> list[BoxName]:
|
|
262
262
|
"""Get names of all boxes for an application.
|
|
263
263
|
|
|
264
|
+
If the box name can't be decoded from UTF-8, the string representation of the bytes is returned.
|
|
265
|
+
|
|
264
266
|
:param app_id: The application ID
|
|
265
267
|
:return: List of box names
|
|
266
268
|
|
|
@@ -270,13 +272,20 @@ class AppManager:
|
|
|
270
272
|
>>> box_names = app_manager.get_box_names(app_id)
|
|
271
273
|
"""
|
|
272
274
|
|
|
275
|
+
def utf8_decode_or_string_cast(b: bytes) -> str:
|
|
276
|
+
"""Return the UTF-8 encoding or return the string representation of the bytes."""
|
|
277
|
+
try:
|
|
278
|
+
return b.decode("utf-8")
|
|
279
|
+
except UnicodeDecodeError:
|
|
280
|
+
return str(b)
|
|
281
|
+
|
|
273
282
|
box_result = self._algod.application_boxes(app_id)
|
|
274
283
|
assert isinstance(box_result, dict)
|
|
275
284
|
return [
|
|
276
285
|
BoxName(
|
|
277
286
|
name_raw=base64.b64decode(b["name"]),
|
|
278
287
|
name_base64=b["name"],
|
|
279
|
-
name=base64.b64decode(b["name"])
|
|
288
|
+
name=utf8_decode_or_string_cast(base64.b64decode(b["name"])),
|
|
280
289
|
)
|
|
281
290
|
for b in box_result["boxes"]
|
|
282
291
|
]
|
algokit_utils/models/state.py
CHANGED
|
@@ -22,7 +22,8 @@ class BoxName:
|
|
|
22
22
|
"""The name of the box"""
|
|
23
23
|
|
|
24
24
|
name: str
|
|
25
|
-
"""The name of the box as a string
|
|
25
|
+
"""The name of the box as a string.
|
|
26
|
+
If the name can't be decoded from UTF-8, the string representation of the bytes is returned instead."""
|
|
26
27
|
name_raw: bytes
|
|
27
28
|
"""The name of the box as raw bytes"""
|
|
28
29
|
name_base64: str
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: algokit-utils
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.1
|
|
4
4
|
Summary: Utilities for Algorand development for use by AlgoKit
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Algorand Foundation
|
|
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
-
Requires-Dist: httpx (>=0.23.1
|
|
15
|
+
Requires-Dist: httpx (>=0.23.1,<=0.28.1)
|
|
16
16
|
Requires-Dist: py-algorand-sdk (>=2.4.0,<3.0.0)
|
|
17
17
|
Requires-Dist: typing-extensions (>=4.6.0)
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
@@ -24,7 +24,7 @@ algokit_utils/applications/abi.py,sha256=OjTdn4szJPPeC8XmosdDYtkIIVgQSWAnqz2DHw5
|
|
|
24
24
|
algokit_utils/applications/app_client.py,sha256=wM3tH0-oW6uQG_W0RLiL3iULnvAPpNM-O9BiPw5wfiU,88470
|
|
25
25
|
algokit_utils/applications/app_deployer.py,sha256=kAypS20VM-yAwosCcYdMwTmXntGOt_6EN_i5nIYN5rw,30627
|
|
26
26
|
algokit_utils/applications/app_factory.py,sha256=PPJnR-fs1hNkEMlIqwY7jx63hPnOkdyiIK6l4-A3d10,45383
|
|
27
|
-
algokit_utils/applications/app_manager.py,sha256=
|
|
27
|
+
algokit_utils/applications/app_manager.py,sha256=8bboIswlwBQhPIqilSBMaxd83yHjIpkloezmtgcAdZY,22301
|
|
28
28
|
algokit_utils/applications/app_spec/__init__.py,sha256=HtjAhAqHNFml9WbRKGmhJnwyJeW8AztPRO_BriQ84vs,140
|
|
29
29
|
algokit_utils/applications/app_spec/arc32.py,sha256=8MMGUopPzkWq48rl5sYbc2Awf-RKnxSX8F0P0UibK5M,7523
|
|
30
30
|
algokit_utils/applications/app_spec/arc56.py,sha256=v6OnNnOzVpjS61TyFNwqym2tBEXHXXj6NZhounZmXjQ,32330
|
|
@@ -53,7 +53,7 @@ algokit_utils/models/amount.py,sha256=PcjzqRY5ThcUuSYHk1yeYgUooos1j2-54hBIJJcipd
|
|
|
53
53
|
algokit_utils/models/application.py,sha256=YhSrDGJ3iZRzxcYvazD40WKwID-1WQQZHtwwkGfExNw,2377
|
|
54
54
|
algokit_utils/models/network.py,sha256=3QNcZ9jVmckv3CCxrD2Y1jiwBdBGdaaziiRgOpsqhwI,904
|
|
55
55
|
algokit_utils/models/simulate.py,sha256=F9OSEfA9QGFGe5po24h8IGLor5z1ogu5Cwm3l6cHnAs,236
|
|
56
|
-
algokit_utils/models/state.py,sha256=
|
|
56
|
+
algokit_utils/models/state.py,sha256=UEpxLcsN0TJREVoKnJ1w-oHSuVNb78aKSC1oRNai4v4,1863
|
|
57
57
|
algokit_utils/models/transaction.py,sha256=2JJLDbbbKEWaXkfx3rtcSjsQNVH6f8kyhY1iFBVW-Uc,3019
|
|
58
58
|
algokit_utils/network_clients.py,sha256=Nd096NpRM7z9iLLdLSC9HV9jl_8Y7sT9ft54mqfyxLA,251
|
|
59
59
|
algokit_utils/protocols/__init__.py,sha256=yD7ZxPEiERQ5ecJuz7BSM9uz1_GhamIaQWCnuVikgro,126
|
|
@@ -64,7 +64,7 @@ algokit_utils/transactions/__init__.py,sha256=7fYF3m6DyOGzbV36MT5svo0wSkj9AIz496
|
|
|
64
64
|
algokit_utils/transactions/transaction_composer.py,sha256=66_vY6DNs4gDhLRAamtzzo7oeLM8nxS9QKwZY_tidYc,104138
|
|
65
65
|
algokit_utils/transactions/transaction_creator.py,sha256=cuP6Xm-fhGoCc2FNSbLiEg3iQRwW38rfdTzsqPyEcpM,29053
|
|
66
66
|
algokit_utils/transactions/transaction_sender.py,sha256=foK_2S-gUl9D7xkWG3lD526qIKz5mVibHNKVREQCgoA,50079
|
|
67
|
-
algokit_utils-4.0.
|
|
68
|
-
algokit_utils-4.0.
|
|
69
|
-
algokit_utils-4.0.
|
|
70
|
-
algokit_utils-4.0.
|
|
67
|
+
algokit_utils-4.0.1.dist-info/LICENSE,sha256=J5i7U1Q9Q2c7saUzlvFRmrCCFhQyXb5Juz_LO5omNUw,1076
|
|
68
|
+
algokit_utils-4.0.1.dist-info/METADATA,sha256=bzOfktBiYPiDso6zD9KdGbCATLWMMmA7Mk57N9nfibo,2419
|
|
69
|
+
algokit_utils-4.0.1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
70
|
+
algokit_utils-4.0.1.dist-info/RECORD,,
|
|
File without changes
|