We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not entirely sure how to decode the b64 string that get_box returns when the content is a struct type
I think the title is pretty self explanatory but if examples needed lmk ;)
The text was updated successfully, but these errors were encountered:
Super drafty helper I'm using for now for this, this assumes that tealish compiler's compile was executed outside of this util:
def decode_struct(struct_name: str, byte_string: bytes): struct = tealish_builtins.structs[struct_name] decoded = {} fields = struct.fields for name in fields: decoded[name] = int.from_bytes( byte_string[fields[name].offset : fields[name].offset + fields[name].size], byteorder="big", signed=False, ) return decoded
Also i know that my struct is only int fields so this won't work for identifying the type dynamically
Sorry, something went wrong.
thanks for hints with this so far @fergalwalsh ;)
No branches or pull requests
Not entirely sure how to decode the b64 string that get_box returns when the content is a struct type
I think the title is pretty self explanatory but if examples needed lmk ;)
The text was updated successfully, but these errors were encountered: