Skip to content

Commit

Permalink
Minor improvements to boxes branch (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonpaulos committed Sep 30, 2022
1 parent 9ebde7d commit 54dd40f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
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

0 comments on commit 54dd40f

Please sign in to comment.