Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor improvements to boxes branch #388

Merged
merged 1 commit into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions algosdk/box_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def dictify(self):
@staticmethod
def undictify(d):
return BoxReference(
d["i"] if "i" in d else None,
d["n"] if "n" in d else None,
d["i"] if "i" in d else 0,
d["n"] if "n" in d else b"",
)

def __eq__(self, other):
Expand Down
4 changes: 4 additions & 0 deletions algosdk/v2client/algod.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ def application_box_by_name(
"""
Return the value of an application's box.

NOTE: box values are returned as base64-encoded strings.

Args:
application_id (int): The ID of the application to look up.
box_name (bytes): The name or key of the box.
Expand All @@ -146,6 +148,8 @@ def application_boxes(self, application_id: int, limit: int = 0, **kwargs):
"""
Return a list of all the application's boxes.

NOTE: box names are returned as base64-encoded strings.

Args:
application_id (int): The ID of the application to look up.
limit (int, optional): Max number of box names to return.
Expand Down
4 changes: 4 additions & 0 deletions algosdk/v2client/indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,8 @@ def application_box_by_name(
"""
Return the value of an application's box.

NOTE: box values are returned as base64-encoded strings.

Args:
application_id (int): application index
box_name (bytes): The name (key) of the box.
Expand All @@ -949,6 +951,8 @@ def application_boxes(
"""
Return a list of all the application's boxes.

NOTE: box names are returned as base64-encoded strings.

Args:
application_id (int): The ID of the application to look up.
limit (int, optional): Max number of box names to return.
Expand Down