utils¶
- algofipy.utils.base64_to_utf8(b64_str)¶
Convert base64 to utf8. :param b64_str: base64 string to convert :type b64_str: str :return: utf8 string :rtype: str
- algofipy.utils.bytes_to_int(bytes)¶
Bytes to convert to int.
- Parameters:
bytes (bytes) – bytes to convert
- Returns:
int conversion of bytes
- Return type:
int
- algofipy.utils.encode_value(value, type)¶
Encode a value of a given type.
- Parameters:
value (int) – value to encode
type (str) – int or bytes
- Returns:
int conversion of bytes
- Return type:
int
- algofipy.utils.encode_varint(number)¶
Encode an int.
- Parameters:
number (int) – number to encode
- Returns:
encoded int
- Return type:
bytes
- algofipy.utils.get_new_account()¶
Generate a random Algorand account.
- Returns:
A newly generated Algorand account (private_key, public_key, passphrase)
- Return type:
(str, str, str)
- algofipy.utils.int_to_bytes(num)¶
Int to convert to bytes.
- Parameters:
num (int) – int to convert
- Returns:
bytes conversion of int
- Return type:
bytes