algopy.op
Module Contents
Section titled “Module Contents”Classes
Section titled “Classes”| Name | Description |
|---|---|
EC | Available values for the EC enum |
Base64 | Available values for the base64 enum |
ECDSA | Available values for the ECDSA enum |
MiMCConfigurations | Available values for the Mimc Configurations enum |
VrfVerify | Available values for the vrf_verify enum |
AcctParamsGet | X is field F from account A. Y is 1 if A owns positive algos, else 0 Native TEAL op: acct_params_get |
AppGlobal | Get or modify Global app state Native TEAL ops: app_global_del, app_global_get, app_global_get_ex, app_global_put |
AppLocal | Get or modify Local app state Native TEAL ops: app_local_del, app_local_get, app_local_get_ex, app_local_put |
AppParamsGet | X is field F from app A. Y is 1 if A exists, else 0 params: Txn.ForeignApps offset or an _available_ app id. Return: did_exist flag (1 if the application existed and 0 otherwise), value. Native TEAL op: app_params_get |
AssetHoldingGet | X is field F from account A’s holding of asset B. Y is 1 if A is opted into B, else 0 params: Txn.Accounts offset (or, since v4, an _available_ address), asset id (or, since v4, a Txn.ForeignAssets offset). Return: did_exist flag (1 if the asset existed and 0 otherwise), value. Native TEAL op: asset_holding_get |
AssetParamsGet | X is field F from asset A. Y is 1 if A exists, else 0 params: Txn.ForeignAssets offset (or, since v4, an _available_ asset id. Return: did_exist flag (1 if the asset existed and 0 otherwise), value. Native TEAL op: asset_params_get |
Block | field F of block A. Fail unless A falls between txn.LastValid-1002 and txn.FirstValid (exclusive) Native TEAL op: block |
Box | Get or modify box state Native TEAL ops: box_create, box_del, box_extract, box_get, box_len, box_put, box_replace, box_resize, box_splice |
EllipticCurve | Elliptic Curve functions Native TEAL ops: ec_add, ec_map_to, ec_multi_scalar_mul, ec_pairing_check, ec_scalar_mul, ec_subgroup_check |
GITxn | Get values for inner transaction in the last group submitted Native TEAL ops: gitxn, gitxnas |
GTxn | Get values for transactions in the current group Native TEAL ops: gtxns, gtxnsas |
Global | Get Global values Native TEAL op: global |
ITxn | Get values for the last inner transaction Native TEAL ops: itxn, itxnas |
ITxnCreate | Create inner transactions Native TEAL ops: itxn_begin, itxn_field, itxn_next, itxn_submit |
JsonRef | key B’s value, of type R, from a valid utf-8 encoded json object A Warning: Usage should be restricted to very rare use cases, as JSON decoding is expensive and quite limited. In addition, JSON objects are large and not optimized for size. Almost all smart contracts should use simpler and smaller methods (such as the ABI. This opcode should only be used in cases where JSON is only available option, e.g. when a third-party only signs JSON. Native TEAL op: json_ref |
Scratch | Load or store scratch values Native TEAL ops: loads, stores |
Txn | Get values for the current executing transaction Native TEAL ops: txn, txnas |
VoterParamsGet | X is field F from online account A as of the balance round: 320 rounds before the current round. Y is 1 if A had positive algos online in the agreement round, else Y is 0 and X is a type specific zero-value Native TEAL op: voter_params_get |
Functions
Section titled “Functions”| Name | Description |
|---|---|
addw | A plus B as a 128-bit result. X is the carry-bit, Y is the low-order 64 bits. |
app_opted_in | 1 if account A is opted in to application B, else 0 params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: 1 if opted in and 0 otherwise. |
arg | Ath LogicSig argument |
balance | balance for account A, in microalgos. The balance is observed after the effects of previous transactions in the group, and after the fee for the current transaction is deducted. Changes caused by inner transactions are observable immediately following itxn_submitparams: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value. |
base64_decode | decode A which was base64-encoded using _encoding_ E. Fail if A is not base64 encoded with encoding E Warning: Usage should be restricted to very rare use cases. In almost all cases, smart contracts should directly handle non-encoded byte-strings. This opcode should only be used in cases where base64 is the only available option, e.g. interoperability with a third-party that only signs base64 strings. |
bitlen | The highest set bit in A. If A is a byte-array, it is interpreted as a big-endian unsigned integer. bitlen of 0 is 0, bitlen of 8 is 4 bitlen interprets arrays as big-endian integers, unlike setbit/getbit |
bsqrt | The largest integer I such that I^2 <= A. A and I are interpreted as big-endian unsigned integers |
btoi | converts big-endian byte array A to uint64. Fails if len(A) > 8. Padded by leading 0s if len(A) < 8.btoi fails if the input is longer than 8 bytes. |
bzero | zero filled byte-array of length A |
concat | join A and Bconcat fails if the result would be greater than 4096 bytes. |
divmodw | W,X = (A,B / C,D); Y,Z = (A,B modulo C,D) The notation J,K indicates that two uint64 values J and K are interpreted as a uint128 value, with J as the high uint64 and K the low. |
divw | A,B / C. Fail if C == 0 or if result overflows. The notation A,B indicates that A and B are interpreted as a uint128 value, with A as the high uint64 and B the low. |
ecdsa_pk_decompress | decompress pubkey A into components X, Y The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded. |
ecdsa_pk_recover | for (data A, recovery id B, signature C, D) recover a public key S (top) and R elements of a signature, recovery id and data (bottom) are expected on the stack and used to deriver a public key. All values are big-endian encoded. The signed data must be 32 bytes long. |
ecdsa_verify | for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1} The 32 byte Y-component of a public key is the last element on the stack, preceded by X-component of a pubkey, preceded by S and R components of a signature, preceded by the data that is fifth element on the stack. All values are big-endian encoded. The signed data must be 32 bytes long, and signatures in lower-S form are only accepted. |
ed25519verify | for (data A, signature B, pubkey C) verify the signature of (“ProgData” |
ed25519verify_bare | for (data A, signature B, pubkey C) verify the signature of the data against the pubkey => {0 or 1} |
err | Fail immediately. |
exit | use A as success value; end |
exp | A raised to the Bth power. Fail if A == B == 0 and on overflow |
expw | A raised to the Bth power as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low. Fail if A == B == 0 or if the results exceeds 2^128-1 |
extract | A range of bytes from A starting at B up to but not including B+C. If B+C is larger than the array length, the program failsextract3 can be called using extract with no immediates. |
extract_uint16 | A uint16 formed from a range of big-endian bytes from A starting at B up to but not including B+2. If B+2 is larger than the array length, the program fails |
extract_uint32 | A uint32 formed from a range of big-endian bytes from A starting at B up to but not including B+4. If B+4 is larger than the array length, the program fails |
extract_uint64 | A uint64 formed from a range of big-endian bytes from A starting at B up to but not including B+8. If B+8 is larger than the array length, the program fails |
falcon_verify | for (data A, compressed-format signature B, pubkey C) verify the signature of data against the pubkey => {0 or 1} Min AVM version: 12 |
gaid | ID of the asset or application created in the Ath transaction of the current groupgaids fails unless the requested transaction created an asset or application and A < GroupIndex. |
getbit | Bth bit of (byte-array or integer) A. If B is greater than or equal to the bit length of the value (8*byte length), the program fails see explanation of bit ordering in setbit |
getbyte | Bth byte of A, as an integer. If B is greater than or equal to the array length, the program fails |
gload_bytes | Bth scratch space value of the Ath transaction in the current group |
gload_uint64 | Bth scratch space value of the Ath transaction in the current group |
itob | converts uint64 A to big-endian byte array, always of length 8 |
keccak256 | Keccak256 hash of value A, yields [32]byte |
mimc | MiMC hash of scalars A, using curve and parameters specified by configuration C A is a list of concatenated 32 byte big-endian unsigned integer scalars. Fail if A’s length is not a multiple of 32 or any element exceeds the curve modulus. |
min_balance | minimum required balance for account A, in microalgos. Required balance is affected by ASA, App, and Box usage. When creating or opting into an app, the minimum balance grows before the app code runs, therefore the increase is visible there. When deleting or closing out, the minimum balance decreases after the app executes. Changes caused by inner transactions or box usage are observable immediately following the opcode effecting the change. params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value. |
mulw | A times B as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low |
online_stake | the total online stake in the agreement round Min AVM version: 11 |
replace | Copy of A with the bytes starting at B replaced by the bytes of C. Fails if B+len(C) exceeds len(A)replace3 can be called using replace with no immediates. |
select_bytes | selects one of two values based on top-of-stack: B if C != 0, else A |
select_uint64 | selects one of two values based on top-of-stack: B if C != 0, else A |
setbit_bytes | Copy of (byte-array or integer) A, with the Bth bit set to (0 or 1) C. If B is greater than or equal to the bit length of the value (8*byte length), the program fails When A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on the integer 0 yields 8, or 2^3. When A is a byte array, index 0 is the leftmost bit of the leftmost byte. Setting bits 0 through 11 to 1 in a 4-byte-array of 0s yields the byte array 0xfff00000. Setting bit 3 to 1 on the 1-byte-array 0x00 yields the byte array 0x10. |
setbit_uint64 | Copy of (byte-array or integer) A, with the Bth bit set to (0 or 1) C. If B is greater than or equal to the bit length of the value (8*byte length), the program fails When A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on the integer 0 yields 8, or 2^3. When A is a byte array, index 0 is the leftmost bit of the leftmost byte. Setting bits 0 through 11 to 1 in a 4-byte-array of 0s yields the byte array 0xfff00000. Setting bit 3 to 1 on the 1-byte-array 0x00 yields the byte array 0x10. |
setbyte | Copy of A with the Bth byte set to small integer (between 0..255) C. If B is greater than or equal to the array length, the program fails |
sha256 | SHA256 hash of value A, yields [32]byte |
sha3_256 | SHA3_256 hash of value A, yields [32]byte |
sha512_256 | SHA512_256 hash of value A, yields [32]byte |
shl | A times 2^B, modulo 2^64 |
shr | A divided by 2^B |
sqrt | The largest integer I such that I^2 <= A |
substring | A range of bytes from A starting at B up to but not including C. If C < B, or either is larger than the array length, the program fails |
sumhash512 | sumhash512 of value A, yields [64]byte Min AVM version: 13 |
vrf_verify | Verify the proof B of message A against pubkey C. Returns vrf output and verification flag.VrfAlgorand is the VRF used in Algorand. It is ECVRF-ED25519-SHA512-Elligator2, specified in the IETF internet draft draft-irtf-cfrg-vrf-03. |
class EC
Section titled “class EC”Bases: str
Available values for the EC enum
Initialization
Section titled “Initialization”Initialize self. See help(type(self)) for accurate signature.
EC.BN254g1 : EC
Section titled “EC.BN254g1 : EC”G1 of the BN254 curve. Points encoded as 32 byte X following by 32 byte Y
EC.BN254g2 : EC
Section titled “EC.BN254g2 : EC”G2 of the BN254 curve. Points encoded as 64 byte X following by 64 byte Y
EC.BLS12_381g1 : EC
Section titled “EC.BLS12_381g1 : EC”G1 of the BLS 12-381 curve. Points encoded as 48 byte X following by 48 byte Y
EC.BLS12_381g2 : EC
Section titled “EC.BLS12_381g2 : EC”G2 of the BLS 12-381 curve. Points encoded as 96 byte X following by 96 byte Y
EC.capitalize
Section titled “EC.capitalize”EC.capitalize()
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
EC.casefold
Section titled “EC.casefold”EC.casefold()
Return a version of the string suitable for caseless comparisons.
EC.center
Section titled “EC.center”EC.center()
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
EC.count
Section titled “EC.count”EC.count()
Return the number of non-overlapping occurrences of substring sub in string S[start:end].
Optional arguments start and end are interpreted as in slice notation.
EC.encode
Section titled “EC.encode”EC.encode()
Encode the string using the codec registered for encoding.
encoding : The encoding in which to encode the string.
errors : The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
EC.endswith
Section titled “EC.endswith”EC.endswith()
Return True if the string ends with the specified suffix, False otherwise.
suffix : A string or a tuple of strings to try.
start : Optional start position. Default: start of the string.
end : Optional stop position. Default: end of the string.
EC.expandtabs
Section titled “EC.expandtabs”EC.expandtabs()
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
EC.find
Section titled “EC.find”EC.find()
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
EC.format
Section titled “EC.format”EC.format()
Return a formatted version of the string, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
EC.format_map
Section titled “EC.format_map”EC.format_map()
Return a formatted version of the string, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
EC.index
Section titled “EC.index”EC.index()
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
EC.isalnum
Section titled “EC.isalnum”EC.isalnum()
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
EC.isalpha
Section titled “EC.isalpha”EC.isalpha()
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
EC.isascii
Section titled “EC.isascii”EC.isascii()
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
EC.isdecimal
Section titled “EC.isdecimal”EC.isdecimal()
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
EC.isdigit
Section titled “EC.isdigit”EC.isdigit()
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
EC.isidentifier
Section titled “EC.isidentifier”EC.isidentifier()
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
EC.islower
Section titled “EC.islower”EC.islower()
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
EC.isnumeric
Section titled “EC.isnumeric”EC.isnumeric()
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
EC.isprintable
Section titled “EC.isprintable”EC.isprintable()
Return True if all characters in the string are printable, False otherwise.
A character is printable if repr() may use it in its output.
EC.isspace
Section titled “EC.isspace”EC.isspace()
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
EC.istitle
Section titled “EC.istitle”EC.istitle()
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
EC.isupper
Section titled “EC.isupper”EC.isupper()
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
EC.join
Section titled “EC.join”EC.join()
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
EC.ljust
Section titled “EC.ljust”EC.ljust()
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
EC.lower
Section titled “EC.lower”EC.lower()
Return a copy of the string converted to lowercase.
EC.lstrip
Section titled “EC.lstrip”EC.lstrip()
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
EC.partition
Section titled “EC.partition”EC.partition()
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
EC.removeprefix
Section titled “EC.removeprefix”EC.removeprefix()
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
EC.removesuffix
Section titled “EC.removesuffix”EC.removesuffix()
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
EC.replace
Section titled “EC.replace”EC.replace()
Return a copy with all occurrences of substring old replaced by new.
count : Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
EC.rfind
Section titled “EC.rfind”EC.rfind()
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
EC.rindex
Section titled “EC.rindex”EC.rindex()
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
EC.rjust
Section titled “EC.rjust”EC.rjust()
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
EC.rpartition
Section titled “EC.rpartition”EC.rpartition()
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
EC.rsplit
Section titled “EC.rsplit”EC.rsplit()
Return a list of the substrings in the string, using sep as the separator string.
sep : The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
maxsplit : Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
EC.rstrip
Section titled “EC.rstrip”EC.rstrip()
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
EC.split
Section titled “EC.split”EC.split()
Return a list of the substrings in the string, using sep as the separator string.
sep : The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
maxsplit : Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
EC.splitlines
Section titled “EC.splitlines”EC.splitlines()
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
EC.startswith
Section titled “EC.startswith”EC.startswith()
Return True if the string starts with the specified prefix, False otherwise.
prefix : A string or a tuple of strings to try.
start : Optional start position. Default: start of the string.
end : Optional stop position. Default: end of the string.
EC.strip
Section titled “EC.strip”EC.strip()
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
EC.swapcase
Section titled “EC.swapcase”EC.swapcase()
Convert uppercase characters to lowercase and lowercase characters to uppercase.
EC.title
Section titled “EC.title”EC.title()
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
EC.translate
Section titled “EC.translate”EC.translate()
Replace each character in the string using the given translation table.
table : Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
EC.upper
Section titled “EC.upper”EC.upper()
Return a copy of the string converted to uppercase.
EC.zfill
Section titled “EC.zfill”EC.zfill()
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
class Base64
Section titled “class Base64”Bases: str
Available values for the base64 enum
Initialization
Section titled “Initialization”Initialize self. See help(type(self)) for accurate signature.
Base64.URLEncoding : Base64
Section titled “Base64.URLEncoding : Base64”Base64.StdEncoding : Base64
Section titled “Base64.StdEncoding : Base64”Base64.capitalize
Section titled “Base64.capitalize”Base64.capitalize()
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
Base64.casefold
Section titled “Base64.casefold”Base64.casefold()
Return a version of the string suitable for caseless comparisons.
Base64.center
Section titled “Base64.center”Base64.center()
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
Base64.count
Section titled “Base64.count”Base64.count()
Return the number of non-overlapping occurrences of substring sub in string S[start:end].
Optional arguments start and end are interpreted as in slice notation.
Base64.encode
Section titled “Base64.encode”Base64.encode()
Encode the string using the codec registered for encoding.
encoding : The encoding in which to encode the string.
errors : The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
Base64.endswith
Section titled “Base64.endswith”Base64.endswith()
Return True if the string ends with the specified suffix, False otherwise.
suffix : A string or a tuple of strings to try.
start : Optional start position. Default: start of the string.
end : Optional stop position. Default: end of the string.
Base64.expandtabs
Section titled “Base64.expandtabs”Base64.expandtabs()
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
Base64.find
Section titled “Base64.find”Base64.find()
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Base64.format
Section titled “Base64.format”Base64.format()
Return a formatted version of the string, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
Base64.format_map
Section titled “Base64.format_map”Base64.format_map()
Return a formatted version of the string, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
Base64.index
Section titled “Base64.index”Base64.index()
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Base64.isalnum
Section titled “Base64.isalnum”Base64.isalnum()
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
Base64.isalpha
Section titled “Base64.isalpha”Base64.isalpha()
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
Base64.isascii
Section titled “Base64.isascii”Base64.isascii()
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
Base64.isdecimal
Section titled “Base64.isdecimal”Base64.isdecimal()
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
Base64.isdigit
Section titled “Base64.isdigit”Base64.isdigit()
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
Base64.isidentifier
Section titled “Base64.isidentifier”Base64.isidentifier()
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
Base64.islower
Section titled “Base64.islower”Base64.islower()
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
Base64.isnumeric
Section titled “Base64.isnumeric”Base64.isnumeric()
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
Base64.isprintable
Section titled “Base64.isprintable”Base64.isprintable()
Return True if all characters in the string are printable, False otherwise.
A character is printable if repr() may use it in its output.
Base64.isspace
Section titled “Base64.isspace”Base64.isspace()
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
Base64.istitle
Section titled “Base64.istitle”Base64.istitle()
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
Base64.isupper
Section titled “Base64.isupper”Base64.isupper()
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
Base64.join
Section titled “Base64.join”Base64.join()
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
Base64.ljust
Section titled “Base64.ljust”Base64.ljust()
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
Base64.lower
Section titled “Base64.lower”Base64.lower()
Return a copy of the string converted to lowercase.
Base64.lstrip
Section titled “Base64.lstrip”Base64.lstrip()
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
Base64.partition
Section titled “Base64.partition”Base64.partition()
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
Base64.removeprefix
Section titled “Base64.removeprefix”Base64.removeprefix()
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
Base64.removesuffix
Section titled “Base64.removesuffix”Base64.removesuffix()
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
Base64.replace
Section titled “Base64.replace”Base64.replace()
Return a copy with all occurrences of substring old replaced by new.
count : Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
Base64.rfind
Section titled “Base64.rfind”Base64.rfind()
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Base64.rindex
Section titled “Base64.rindex”Base64.rindex()
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Base64.rjust
Section titled “Base64.rjust”Base64.rjust()
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
Base64.rpartition
Section titled “Base64.rpartition”Base64.rpartition()
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
Base64.rsplit
Section titled “Base64.rsplit”Base64.rsplit()
Return a list of the substrings in the string, using sep as the separator string.
sep : The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
maxsplit : Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
Base64.rstrip
Section titled “Base64.rstrip”Base64.rstrip()
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Base64.split
Section titled “Base64.split”Base64.split()
Return a list of the substrings in the string, using sep as the separator string.
sep : The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
maxsplit : Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
Base64.splitlines
Section titled “Base64.splitlines”Base64.splitlines()
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
Base64.startswith
Section titled “Base64.startswith”Base64.startswith()
Return True if the string starts with the specified prefix, False otherwise.
prefix : A string or a tuple of strings to try.
start : Optional start position. Default: start of the string.
end : Optional stop position. Default: end of the string.
Base64.strip
Section titled “Base64.strip”Base64.strip()
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Base64.swapcase
Section titled “Base64.swapcase”Base64.swapcase()
Convert uppercase characters to lowercase and lowercase characters to uppercase.
Base64.title
Section titled “Base64.title”Base64.title()
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
Base64.translate
Section titled “Base64.translate”Base64.translate()
Replace each character in the string using the given translation table.
table : Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
Base64.upper
Section titled “Base64.upper”Base64.upper()
Return a copy of the string converted to uppercase.
Base64.zfill
Section titled “Base64.zfill”Base64.zfill()
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
class ECDSA
Section titled “class ECDSA”Bases: str
Available values for the ECDSA enum
Initialization
Section titled “Initialization”Initialize self. See help(type(self)) for accurate signature.
ECDSA.Secp256k1 : ECDSA
Section titled “ECDSA.Secp256k1 : ECDSA”secp256k1 curve, used in Bitcoin
ECDSA.Secp256r1 : ECDSA
Section titled “ECDSA.Secp256r1 : ECDSA”secp256r1 curve, NIST standard
ECDSA.capitalize
Section titled “ECDSA.capitalize”ECDSA.capitalize()
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
ECDSA.casefold
Section titled “ECDSA.casefold”ECDSA.casefold()
Return a version of the string suitable for caseless comparisons.
ECDSA.center
Section titled “ECDSA.center”ECDSA.center()
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
ECDSA.count
Section titled “ECDSA.count”ECDSA.count()
Return the number of non-overlapping occurrences of substring sub in string S[start:end].
Optional arguments start and end are interpreted as in slice notation.
ECDSA.encode
Section titled “ECDSA.encode”ECDSA.encode()
Encode the string using the codec registered for encoding.
encoding : The encoding in which to encode the string.
errors : The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
ECDSA.endswith
Section titled “ECDSA.endswith”ECDSA.endswith()
Return True if the string ends with the specified suffix, False otherwise.
suffix : A string or a tuple of strings to try.
start : Optional start position. Default: start of the string.
end : Optional stop position. Default: end of the string.
ECDSA.expandtabs
Section titled “ECDSA.expandtabs”ECDSA.expandtabs()
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
ECDSA.find
Section titled “ECDSA.find”ECDSA.find()
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
ECDSA.format
Section titled “ECDSA.format”ECDSA.format()
Return a formatted version of the string, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
ECDSA.format_map
Section titled “ECDSA.format_map”ECDSA.format_map()
Return a formatted version of the string, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
ECDSA.index
Section titled “ECDSA.index”ECDSA.index()
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
ECDSA.isalnum
Section titled “ECDSA.isalnum”ECDSA.isalnum()
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
ECDSA.isalpha
Section titled “ECDSA.isalpha”ECDSA.isalpha()
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
ECDSA.isascii
Section titled “ECDSA.isascii”ECDSA.isascii()
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
ECDSA.isdecimal
Section titled “ECDSA.isdecimal”ECDSA.isdecimal()
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
ECDSA.isdigit
Section titled “ECDSA.isdigit”ECDSA.isdigit()
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
ECDSA.isidentifier
Section titled “ECDSA.isidentifier”ECDSA.isidentifier()
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
ECDSA.islower
Section titled “ECDSA.islower”ECDSA.islower()
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
ECDSA.isnumeric
Section titled “ECDSA.isnumeric”ECDSA.isnumeric()
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
ECDSA.isprintable
Section titled “ECDSA.isprintable”ECDSA.isprintable()
Return True if all characters in the string are printable, False otherwise.
A character is printable if repr() may use it in its output.
ECDSA.isspace
Section titled “ECDSA.isspace”ECDSA.isspace()
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
ECDSA.istitle
Section titled “ECDSA.istitle”ECDSA.istitle()
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
ECDSA.isupper
Section titled “ECDSA.isupper”ECDSA.isupper()
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
ECDSA.join
Section titled “ECDSA.join”ECDSA.join()
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
ECDSA.ljust
Section titled “ECDSA.ljust”ECDSA.ljust()
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
ECDSA.lower
Section titled “ECDSA.lower”ECDSA.lower()
Return a copy of the string converted to lowercase.
ECDSA.lstrip
Section titled “ECDSA.lstrip”ECDSA.lstrip()
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
ECDSA.partition
Section titled “ECDSA.partition”ECDSA.partition()
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
ECDSA.removeprefix
Section titled “ECDSA.removeprefix”ECDSA.removeprefix()
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
ECDSA.removesuffix
Section titled “ECDSA.removesuffix”ECDSA.removesuffix()
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
ECDSA.replace
Section titled “ECDSA.replace”ECDSA.replace()
Return a copy with all occurrences of substring old replaced by new.
count : Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
ECDSA.rfind
Section titled “ECDSA.rfind”ECDSA.rfind()
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
ECDSA.rindex
Section titled “ECDSA.rindex”ECDSA.rindex()
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
ECDSA.rjust
Section titled “ECDSA.rjust”ECDSA.rjust()
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
ECDSA.rpartition
Section titled “ECDSA.rpartition”ECDSA.rpartition()
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
ECDSA.rsplit
Section titled “ECDSA.rsplit”ECDSA.rsplit()
Return a list of the substrings in the string, using sep as the separator string.
sep : The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
maxsplit : Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
ECDSA.rstrip
Section titled “ECDSA.rstrip”ECDSA.rstrip()
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
ECDSA.split
Section titled “ECDSA.split”ECDSA.split()
Return a list of the substrings in the string, using sep as the separator string.
sep : The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
maxsplit : Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
ECDSA.splitlines
Section titled “ECDSA.splitlines”ECDSA.splitlines()
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
ECDSA.startswith
Section titled “ECDSA.startswith”ECDSA.startswith()
Return True if the string starts with the specified prefix, False otherwise.
prefix : A string or a tuple of strings to try.
start : Optional start position. Default: start of the string.
end : Optional stop position. Default: end of the string.
ECDSA.strip
Section titled “ECDSA.strip”ECDSA.strip()
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
ECDSA.swapcase
Section titled “ECDSA.swapcase”ECDSA.swapcase()
Convert uppercase characters to lowercase and lowercase characters to uppercase.
ECDSA.title
Section titled “ECDSA.title”ECDSA.title()
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
ECDSA.translate
Section titled “ECDSA.translate”ECDSA.translate()
Replace each character in the string using the given translation table.
table : Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
ECDSA.upper
Section titled “ECDSA.upper”ECDSA.upper()
Return a copy of the string converted to uppercase.
ECDSA.zfill
Section titled “ECDSA.zfill”ECDSA.zfill()
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
class MiMCConfigurations
Section titled “class MiMCConfigurations”Bases: str
Available values for the Mimc Configurations enum
Initialization
Section titled “Initialization”Initialize self. See help(type(self)) for accurate signature.
MiMCConfigurations.BN254Mp110 : MiMCConfigurations
Section titled “MiMCConfigurations.BN254Mp110 : MiMCConfigurations”MiMC configuration for the BN254 curve with Miyaguchi-Preneel mode, 110 rounds, exponent 5, seed “seed” Min AVM version: 11
MiMCConfigurations.BLS12_381Mp111 : MiMCConfigurations
Section titled “MiMCConfigurations.BLS12_381Mp111 : MiMCConfigurations”MiMC configuration for the BLS12-381 curve with Miyaguchi-Preneel mode, 111 rounds, exponent 5, seed “seed” Min AVM version: 11
MiMCConfigurations.capitalize
Section titled “MiMCConfigurations.capitalize”MiMCConfigurations.capitalize()
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
MiMCConfigurations.casefold
Section titled “MiMCConfigurations.casefold”MiMCConfigurations.casefold()
Return a version of the string suitable for caseless comparisons.
MiMCConfigurations.center
Section titled “MiMCConfigurations.center”MiMCConfigurations.center()
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
MiMCConfigurations.count
Section titled “MiMCConfigurations.count”MiMCConfigurations.count()
Return the number of non-overlapping occurrences of substring sub in string S[start:end].
Optional arguments start and end are interpreted as in slice notation.
MiMCConfigurations.encode
Section titled “MiMCConfigurations.encode”MiMCConfigurations.encode()
Encode the string using the codec registered for encoding.
encoding : The encoding in which to encode the string.
errors : The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
MiMCConfigurations.endswith
Section titled “MiMCConfigurations.endswith”MiMCConfigurations.endswith()
Return True if the string ends with the specified suffix, False otherwise.
suffix : A string or a tuple of strings to try.
start : Optional start position. Default: start of the string.
end : Optional stop position. Default: end of the string.
MiMCConfigurations.expandtabs
Section titled “MiMCConfigurations.expandtabs”MiMCConfigurations.expandtabs()
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
MiMCConfigurations.find
Section titled “MiMCConfigurations.find”MiMCConfigurations.find()
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
MiMCConfigurations.format
Section titled “MiMCConfigurations.format”MiMCConfigurations.format()
Return a formatted version of the string, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
MiMCConfigurations.format_map
Section titled “MiMCConfigurations.format_map”MiMCConfigurations.format_map()
Return a formatted version of the string, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
MiMCConfigurations.index
Section titled “MiMCConfigurations.index”MiMCConfigurations.index()
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
MiMCConfigurations.isalnum
Section titled “MiMCConfigurations.isalnum”MiMCConfigurations.isalnum()
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
MiMCConfigurations.isalpha
Section titled “MiMCConfigurations.isalpha”MiMCConfigurations.isalpha()
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
MiMCConfigurations.isascii
Section titled “MiMCConfigurations.isascii”MiMCConfigurations.isascii()
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
MiMCConfigurations.isdecimal
Section titled “MiMCConfigurations.isdecimal”MiMCConfigurations.isdecimal()
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
MiMCConfigurations.isdigit
Section titled “MiMCConfigurations.isdigit”MiMCConfigurations.isdigit()
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
MiMCConfigurations.isidentifier
Section titled “MiMCConfigurations.isidentifier”MiMCConfigurations.isidentifier()
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
MiMCConfigurations.islower
Section titled “MiMCConfigurations.islower”MiMCConfigurations.islower()
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
MiMCConfigurations.isnumeric
Section titled “MiMCConfigurations.isnumeric”MiMCConfigurations.isnumeric()
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
MiMCConfigurations.isprintable
Section titled “MiMCConfigurations.isprintable”MiMCConfigurations.isprintable()
Return True if all characters in the string are printable, False otherwise.
A character is printable if repr() may use it in its output.
MiMCConfigurations.isspace
Section titled “MiMCConfigurations.isspace”MiMCConfigurations.isspace()
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
MiMCConfigurations.istitle
Section titled “MiMCConfigurations.istitle”MiMCConfigurations.istitle()
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
MiMCConfigurations.isupper
Section titled “MiMCConfigurations.isupper”MiMCConfigurations.isupper()
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
MiMCConfigurations.join
Section titled “MiMCConfigurations.join”MiMCConfigurations.join()
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
MiMCConfigurations.ljust
Section titled “MiMCConfigurations.ljust”MiMCConfigurations.ljust()
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
MiMCConfigurations.lower
Section titled “MiMCConfigurations.lower”MiMCConfigurations.lower()
Return a copy of the string converted to lowercase.
MiMCConfigurations.lstrip
Section titled “MiMCConfigurations.lstrip”MiMCConfigurations.lstrip()
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
MiMCConfigurations.partition
Section titled “MiMCConfigurations.partition”MiMCConfigurations.partition()
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
MiMCConfigurations.removeprefix
Section titled “MiMCConfigurations.removeprefix”MiMCConfigurations.removeprefix()
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
MiMCConfigurations.removesuffix
Section titled “MiMCConfigurations.removesuffix”MiMCConfigurations.removesuffix()
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
MiMCConfigurations.replace
Section titled “MiMCConfigurations.replace”MiMCConfigurations.replace()
Return a copy with all occurrences of substring old replaced by new.
count : Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
MiMCConfigurations.rfind
Section titled “MiMCConfigurations.rfind”MiMCConfigurations.rfind()
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
MiMCConfigurations.rindex
Section titled “MiMCConfigurations.rindex”MiMCConfigurations.rindex()
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
MiMCConfigurations.rjust
Section titled “MiMCConfigurations.rjust”MiMCConfigurations.rjust()
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
MiMCConfigurations.rpartition
Section titled “MiMCConfigurations.rpartition”MiMCConfigurations.rpartition()
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
MiMCConfigurations.rsplit
Section titled “MiMCConfigurations.rsplit”MiMCConfigurations.rsplit()
Return a list of the substrings in the string, using sep as the separator string.
sep : The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
maxsplit : Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
MiMCConfigurations.rstrip
Section titled “MiMCConfigurations.rstrip”MiMCConfigurations.rstrip()
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
MiMCConfigurations.split
Section titled “MiMCConfigurations.split”MiMCConfigurations.split()
Return a list of the substrings in the string, using sep as the separator string.
sep : The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
maxsplit : Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
MiMCConfigurations.splitlines
Section titled “MiMCConfigurations.splitlines”MiMCConfigurations.splitlines()
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
MiMCConfigurations.startswith
Section titled “MiMCConfigurations.startswith”MiMCConfigurations.startswith()
Return True if the string starts with the specified prefix, False otherwise.
prefix : A string or a tuple of strings to try.
start : Optional start position. Default: start of the string.
end : Optional stop position. Default: end of the string.
MiMCConfigurations.strip
Section titled “MiMCConfigurations.strip”MiMCConfigurations.strip()
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
MiMCConfigurations.swapcase
Section titled “MiMCConfigurations.swapcase”MiMCConfigurations.swapcase()
Convert uppercase characters to lowercase and lowercase characters to uppercase.
MiMCConfigurations.title
Section titled “MiMCConfigurations.title”MiMCConfigurations.title()
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
MiMCConfigurations.translate
Section titled “MiMCConfigurations.translate”MiMCConfigurations.translate()
Replace each character in the string using the given translation table.
table : Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
MiMCConfigurations.upper
Section titled “MiMCConfigurations.upper”MiMCConfigurations.upper()
Return a copy of the string converted to uppercase.
MiMCConfigurations.zfill
Section titled “MiMCConfigurations.zfill”MiMCConfigurations.zfill()
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
class VrfVerify
Section titled “class VrfVerify”Bases: str
Available values for the vrf_verify enum
Initialization
Section titled “Initialization”Initialize self. See help(type(self)) for accurate signature.
VrfVerify.VrfAlgorand : VrfVerify
Section titled “VrfVerify.VrfAlgorand : VrfVerify”VrfVerify.capitalize
Section titled “VrfVerify.capitalize”VrfVerify.capitalize()
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
VrfVerify.casefold
Section titled “VrfVerify.casefold”VrfVerify.casefold()
Return a version of the string suitable for caseless comparisons.
VrfVerify.center
Section titled “VrfVerify.center”VrfVerify.center()
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
VrfVerify.count
Section titled “VrfVerify.count”VrfVerify.count()
Return the number of non-overlapping occurrences of substring sub in string S[start:end].
Optional arguments start and end are interpreted as in slice notation.
VrfVerify.encode
Section titled “VrfVerify.encode”VrfVerify.encode()
Encode the string using the codec registered for encoding.
encoding : The encoding in which to encode the string.
errors : The error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
VrfVerify.endswith
Section titled “VrfVerify.endswith”VrfVerify.endswith()
Return True if the string ends with the specified suffix, False otherwise.
suffix : A string or a tuple of strings to try.
start : Optional start position. Default: start of the string.
end : Optional stop position. Default: end of the string.
VrfVerify.expandtabs
Section titled “VrfVerify.expandtabs”VrfVerify.expandtabs()
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
VrfVerify.find
Section titled “VrfVerify.find”VrfVerify.find()
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
VrfVerify.format
Section titled “VrfVerify.format”VrfVerify.format()
Return a formatted version of the string, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’).
VrfVerify.format_map
Section titled “VrfVerify.format_map”VrfVerify.format_map()
Return a formatted version of the string, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’).
VrfVerify.index
Section titled “VrfVerify.index”VrfVerify.index()
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
VrfVerify.isalnum
Section titled “VrfVerify.isalnum”VrfVerify.isalnum()
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
VrfVerify.isalpha
Section titled “VrfVerify.isalpha”VrfVerify.isalpha()
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
VrfVerify.isascii
Section titled “VrfVerify.isascii”VrfVerify.isascii()
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
VrfVerify.isdecimal
Section titled “VrfVerify.isdecimal”VrfVerify.isdecimal()
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
VrfVerify.isdigit
Section titled “VrfVerify.isdigit”VrfVerify.isdigit()
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
VrfVerify.isidentifier
Section titled “VrfVerify.isidentifier”VrfVerify.isidentifier()
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”.
VrfVerify.islower
Section titled “VrfVerify.islower”VrfVerify.islower()
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
VrfVerify.isnumeric
Section titled “VrfVerify.isnumeric”VrfVerify.isnumeric()
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
VrfVerify.isprintable
Section titled “VrfVerify.isprintable”VrfVerify.isprintable()
Return True if all characters in the string are printable, False otherwise.
A character is printable if repr() may use it in its output.
VrfVerify.isspace
Section titled “VrfVerify.isspace”VrfVerify.isspace()
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
VrfVerify.istitle
Section titled “VrfVerify.istitle”VrfVerify.istitle()
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
VrfVerify.isupper
Section titled “VrfVerify.isupper”VrfVerify.isupper()
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
VrfVerify.join
Section titled “VrfVerify.join”VrfVerify.join()
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’
VrfVerify.ljust
Section titled “VrfVerify.ljust”VrfVerify.ljust()
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
VrfVerify.lower
Section titled “VrfVerify.lower”VrfVerify.lower()
Return a copy of the string converted to lowercase.
VrfVerify.lstrip
Section titled “VrfVerify.lstrip”VrfVerify.lstrip()
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
VrfVerify.partition
Section titled “VrfVerify.partition”VrfVerify.partition()
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
VrfVerify.removeprefix
Section titled “VrfVerify.removeprefix”VrfVerify.removeprefix()
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
VrfVerify.removesuffix
Section titled “VrfVerify.removesuffix”VrfVerify.removesuffix()
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
VrfVerify.replace
Section titled “VrfVerify.replace”VrfVerify.replace()
Return a copy with all occurrences of substring old replaced by new.
count : Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
VrfVerify.rfind
Section titled “VrfVerify.rfind”VrfVerify.rfind()
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
VrfVerify.rindex
Section titled “VrfVerify.rindex”VrfVerify.rindex()
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
VrfVerify.rjust
Section titled “VrfVerify.rjust”VrfVerify.rjust()
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
VrfVerify.rpartition
Section titled “VrfVerify.rpartition”VrfVerify.rpartition()
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
VrfVerify.rsplit
Section titled “VrfVerify.rsplit”VrfVerify.rsplit()
Return a list of the substrings in the string, using sep as the separator string.
sep : The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
maxsplit : Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
VrfVerify.rstrip
Section titled “VrfVerify.rstrip”VrfVerify.rstrip()
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
VrfVerify.split
Section titled “VrfVerify.split”VrfVerify.split()
Return a list of the substrings in the string, using sep as the separator string.
sep : The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
maxsplit : Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
VrfVerify.splitlines
Section titled “VrfVerify.splitlines”VrfVerify.splitlines()
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
VrfVerify.startswith
Section titled “VrfVerify.startswith”VrfVerify.startswith()
Return True if the string starts with the specified prefix, False otherwise.
prefix : A string or a tuple of strings to try.
start : Optional start position. Default: start of the string.
end : Optional stop position. Default: end of the string.
VrfVerify.strip
Section titled “VrfVerify.strip”VrfVerify.strip()
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
VrfVerify.swapcase
Section titled “VrfVerify.swapcase”VrfVerify.swapcase()
Convert uppercase characters to lowercase and lowercase characters to uppercase.
VrfVerify.title
Section titled “VrfVerify.title”VrfVerify.title()
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
VrfVerify.translate
Section titled “VrfVerify.translate”VrfVerify.translate()
Replace each character in the string using the given translation table.
table : Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
VrfVerify.upper
Section titled “VrfVerify.upper”VrfVerify.upper()
Return a copy of the string converted to uppercase.
VrfVerify.zfill
Section titled “VrfVerify.zfill”VrfVerify.zfill()
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
A plus B as a 128-bit result. X is the carry-bit, Y is the low-order 64 bits.
Native TEAL opcode: addw
app_opted_in
Section titled “app_opted_in”app_opted_in(a: Account | UInt64 | int, b: Application | UInt64 | int, /) → bool
1 if account A is opted in to application B, else 0 params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: 1 if opted in and 0 otherwise.
Native TEAL opcode: app_opted_in
Ath LogicSig argument
balance
Section titled “balance”balance for account A, in microalgos. The balance is observed after the effects of previous transactions in the group, and after the fee for the current transaction is deducted. Changes caused by inner transactions are observable immediately following itxn_submit
params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value.
Native TEAL opcode: balance
base64_decode
Section titled “base64_decode”base64_decode(e: Base64, a: BytesBacked | bytes, /) → Bytes
decode A which was base64-encoded using _encoding_ E. Fail if A is not base64 encoded with encoding E Warning: Usage should be restricted to very rare use cases. In almost all cases, smart contracts should directly handle non-encoded byte-strings. This opcode should only be used in cases where base64 is the only available option, e.g. interoperability with a third-party that only signs base64 strings.
Decodes A using the base64 encoding E. Specify the encoding with an immediate arg either as URL and Filename Safe (
URLEncoding) or Standard (StdEncoding). See RFC 4648 sections 4 and 5. It is assumed that the encoding ends with the exact number of=padding characters as required by the RFC. When padding occurs, any unused pad bits in the encoding must be set to zero or the decoding will fail. The special cases of\nand\rare allowed but completely ignored. An error will result when attempting to decode a string with a character that is not in the encoding alphabet or not one of=,\r, or\n.
- Parameters: e (Base64) – encoding index
Native TEAL opcode: base64_decode
bitlen
Section titled “bitlen”bitlen(a: UInt64 | BytesBacked | int | bytes, /) → UInt64
The highest set bit in A. If A is a byte-array, it is interpreted as a big-endian unsigned integer. bitlen of 0 is 0, bitlen of 8 is 4 bitlen interprets arrays as big-endian integers, unlike setbit/getbit
Native TEAL opcode: bitlen
The largest integer I such that I^2 <= A. A and I are interpreted as big-endian unsigned integers
Native TEAL opcode: bsqrt
btoi(a: BytesBacked | bytes, /) → UInt64
converts big-endian byte array A to uint64. Fails if len(A) > 8. Padded by leading 0s if len(A) < 8.
btoi fails if the input is longer than 8 bytes.
Native TEAL opcode: btoi
zero filled byte-array of length A
Native TEAL opcode: bzero
concat
Section titled “concat”concat(a: BytesBacked | bytes, b: BytesBacked | bytes, /) → Bytes
join A and B
concat fails if the result would be greater than 4096 bytes.
Native TEAL opcode: concat
divmodw
Section titled “divmodw”divmodw(a: UInt64 | int, b: UInt64 | int, c: UInt64 | int, d: UInt64 | int, /) → tuple[UInt64, UInt64, UInt64, UInt64]
W,X = (A,B / C,D); Y,Z = (A,B modulo C,D) The notation J,K indicates that two uint64 values J and K are interpreted as a uint128 value, with J as the high uint64 and K the low.
Native TEAL opcode: divmodw
A,B / C. Fail if C == 0 or if result overflows. The notation A,B indicates that A and B are interpreted as a uint128 value, with A as the high uint64 and B the low.
Native TEAL opcode: divw
ecdsa_pk_decompress
Section titled “ecdsa_pk_decompress”ecdsa_pk_decompress(v: ECDSA, a: BytesBacked | bytes, /) → tuple[Bytes, Bytes]
decompress pubkey A into components X, Y The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.
- Parameters: v (ECDSA) – curve index
Native TEAL opcode: ecdsa_pk_decompress
ecdsa_pk_recover
Section titled “ecdsa_pk_recover”ecdsa_pk_recover(v: ECDSA, a: BytesBacked | bytes, b: UInt64 | int, c: BytesBacked | bytes, d: BytesBacked | bytes, /) → tuple[Bytes, Bytes]
for (data A, recovery id B, signature C, D) recover a public key S (top) and R elements of a signature, recovery id and data (bottom) are expected on the stack and used to deriver a public key. All values are big-endian encoded. The signed data must be 32 bytes long.
- Parameters: v (ECDSA) – curve index
Native TEAL opcode: ecdsa_pk_recover
ecdsa_verify
Section titled “ecdsa_verify”ecdsa_verify(v: ECDSA, a: BytesBacked | bytes, b: BytesBacked | bytes, c: BytesBacked | bytes, d: BytesBacked | bytes, e: BytesBacked | bytes, /) → bool
for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1} The 32 byte Y-component of a public key is the last element on the stack, preceded by X-component of a pubkey, preceded by S and R components of a signature, preceded by the data that is fifth element on the stack. All values are big-endian encoded. The signed data must be 32 bytes long, and signatures in lower-S form are only accepted.
- Parameters: v (ECDSA) – curve index
Native TEAL opcode: ecdsa_verify
ed25519verify
Section titled “ed25519verify”ed25519verify(a: BytesBacked | bytes, b: BytesBacked | bytes, c: BytesBacked | bytes, /) → bool
for (data A, signature B, pubkey C) verify the signature of (“ProgData” || program_hash || data) against the pubkey => {0 or 1} The 32 byte public key is the last element on the stack, preceded by the 64 byte signature at the second-to-last element on the stack, preceded by the data which was signed at the third-to-last element on the stack.
Native TEAL opcode: ed25519verify
ed25519verify_bare
Section titled “ed25519verify_bare”ed25519verify_bare(a: BytesBacked | bytes, b: BytesBacked | bytes, c: BytesBacked | bytes, /) → bool
for (data A, signature B, pubkey C) verify the signature of the data against the pubkey => {0 or 1}
Native TEAL opcode: ed25519verify_bare
err(message: LiteralString | None = None, /) → Never
Fail immediately.
- Returns typing.Never: Halts program
Native TEAL opcode: err
exit(a: UInt64 | int, /) → Never
use A as success value; end
- Returns typing.Never: Halts program
Native TEAL opcode: return
A raised to the Bth power. Fail if A == B == 0 and on overflow
Native TEAL opcode: exp
A raised to the Bth power as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low. Fail if A == B == 0 or if the results exceeds 2^128-1
Native TEAL opcode: expw
extract
Section titled “extract”extract(a: BytesBacked | bytes, b: UInt64 | int, c: UInt64 | int, /) → Bytes
A range of bytes from A starting at B up to but not including B+C. If B+C is larger than the array length, the program fails
extract3 can be called using extract with no immediates.
Native TEAL opcode: extract, extract3
extract_uint16
Section titled “extract_uint16”extract_uint16(a: BytesBacked | bytes, b: UInt64 | int, /) → UInt64
A uint16 formed from a range of big-endian bytes from A starting at B up to but not including B+2. If B+2 is larger than the array length, the program fails
Native TEAL opcode: extract_uint16
extract_uint32
Section titled “extract_uint32”extract_uint32(a: BytesBacked | bytes, b: UInt64 | int, /) → UInt64
A uint32 formed from a range of big-endian bytes from A starting at B up to but not including B+4. If B+4 is larger than the array length, the program fails
Native TEAL opcode: extract_uint32
extract_uint64
Section titled “extract_uint64”extract_uint64(a: BytesBacked | bytes, b: UInt64 | int, /) → UInt64
A uint64 formed from a range of big-endian bytes from A starting at B up to but not including B+8. If B+8 is larger than the array length, the program fails
Native TEAL opcode: extract_uint64
falcon_verify
Section titled “falcon_verify”falcon_verify(a: BytesBacked | bytes, b: BytesBacked | bytes, c: BytesBacked | bytes, /) → bool
for (data A, compressed-format signature B, pubkey C) verify the signature of data against the pubkey => {0 or 1} Min AVM version: 12
Native TEAL opcode: falcon_verify
ID of the asset or application created in the Ath transaction of the current group
gaids fails unless the requested transaction created an asset or application and A < GroupIndex.
Native TEAL opcode: gaid, gaids
getbit
Section titled “getbit”getbit(a: UInt64 | BytesBacked | int | bytes, b: UInt64 | int, /) → bool
Bth bit of (byte-array or integer) A. If B is greater than or equal to the bit length of the value (8*byte length), the program fails see explanation of bit ordering in setbit
Native TEAL opcode: getbit
getbyte
Section titled “getbyte”getbyte(a: BytesBacked | bytes, b: UInt64 | int, /) → UInt64
Bth byte of A, as an integer. If B is greater than or equal to the array length, the program fails
Native TEAL opcode: getbyte
gload_bytes
Section titled “gload_bytes”Bth scratch space value of the Ath transaction in the current group
Native TEAL opcode: gload, gloads, gloadss
gload_uint64
Section titled “gload_uint64”Bth scratch space value of the Ath transaction in the current group
Native TEAL opcode: gload, gloads, gloadss
converts uint64 A to big-endian byte array, always of length 8
Native TEAL opcode: itob
keccak256
Section titled “keccak256”keccak256(a: BytesBacked | bytes, /) → Bytes
Keccak256 hash of value A, yields [32]byte
Native TEAL opcode: keccak256
mimc(c: MiMCConfigurations, a: BytesBacked | bytes, /) → Bytes
MiMC hash of scalars A, using curve and parameters specified by configuration C A is a list of concatenated 32 byte big-endian unsigned integer scalars. Fail if A’s length is not a multiple of 32 or any element exceeds the curve modulus.
The MiMC hash function has known collisions since any input which is a multiple of the elliptic curve modulus will hash to the same value. MiMC is thus not a general purpose hash function, but meant to be used in zero knowledge applications to match a zk-circuit implementation. Min AVM version: 11
- Parameters: c (MiMCConfigurations) – configuration index
Native TEAL opcode: mimc
min_balance
Section titled “min_balance”minimum required balance for account A, in microalgos. Required balance is affected by ASA, App, and Box usage. When creating or opting into an app, the minimum balance grows before the app code runs, therefore the increase is visible there. When deleting or closing out, the minimum balance decreases after the app executes. Changes caused by inner transactions or box usage are observable immediately following the opcode effecting the change. params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value.
Native TEAL opcode: min_balance
A times B as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low
Native TEAL opcode: mulw
online_stake
Section titled “online_stake”online_stake() → UInt64
the total online stake in the agreement round Min AVM version: 11
Native TEAL opcode: online_stake
replace
Section titled “replace”replace(a: BytesBacked | bytes, b: UInt64 | int, c: BytesBacked | bytes, /) → Bytes
Copy of A with the bytes starting at B replaced by the bytes of C. Fails if B+len(C) exceeds len(A)
replace3 can be called using replace with no immediates.
Native TEAL opcode: replace2, replace3
select_bytes
Section titled “select_bytes”select_bytes(a: BytesBacked | bytes, b: BytesBacked | bytes, c: bool | UInt64 | int, /) → Bytes
selects one of two values based on top-of-stack: B if C != 0, else A
Native TEAL opcode: select
select_uint64
Section titled “select_uint64”selects one of two values based on top-of-stack: B if C != 0, else A
Native TEAL opcode: select
setbit_bytes
Section titled “setbit_bytes”setbit_bytes(a: BytesBacked | bytes, b: UInt64 | int, c: bool, /) → Bytes
Copy of (byte-array or integer) A, with the Bth bit set to (0 or 1) C. If B is greater than or equal to the bit length of the value (8*byte length), the program fails When A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on the integer 0 yields 8, or 2^3. When A is a byte array, index 0 is the leftmost bit of the leftmost byte. Setting bits 0 through 11 to 1 in a 4-byte-array of 0s yields the byte array 0xfff00000. Setting bit 3 to 1 on the 1-byte-array 0x00 yields the byte array 0x10.
Native TEAL opcode: setbit
setbit_uint64
Section titled “setbit_uint64”Copy of (byte-array or integer) A, with the Bth bit set to (0 or 1) C. If B is greater than or equal to the bit length of the value (8*byte length), the program fails When A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on the integer 0 yields 8, or 2^3. When A is a byte array, index 0 is the leftmost bit of the leftmost byte. Setting bits 0 through 11 to 1 in a 4-byte-array of 0s yields the byte array 0xfff00000. Setting bit 3 to 1 on the 1-byte-array 0x00 yields the byte array 0x10.
Native TEAL opcode: setbit
setbyte
Section titled “setbyte”setbyte(a: BytesBacked | bytes, b: UInt64 | int, c: UInt64 | int, /) → Bytes
Copy of A with the Bth byte set to small integer (between 0..255) C. If B is greater than or equal to the array length, the program fails
Native TEAL opcode: setbyte
sha256
Section titled “sha256”sha256(a: BytesBacked | bytes, /) → Bytes
SHA256 hash of value A, yields [32]byte
Native TEAL opcode: sha256
sha3_256
Section titled “sha3_256”sha3_256(a: BytesBacked | bytes, /) → Bytes
SHA3_256 hash of value A, yields [32]byte
Native TEAL opcode: sha3_256
sha512_256
Section titled “sha512_256”sha512_256(a: BytesBacked | bytes, /) → Bytes
SHA512_256 hash of value A, yields [32]byte
Native TEAL opcode: sha512_256
A times 2^B, modulo 2^64
Native TEAL opcode: shl
A divided by 2^B
Native TEAL opcode: shr
The largest integer I such that I^2 <= A
Native TEAL opcode: sqrt
substring
Section titled “substring”substring(a: BytesBacked | bytes, b: UInt64 | int, c: UInt64 | int, /) → Bytes
A range of bytes from A starting at B up to but not including C. If C < B, or either is larger than the array length, the program fails
Native TEAL opcode: substring, substring3
sumhash512
Section titled “sumhash512”sumhash512(a: BytesBacked | bytes, /) → Bytes
sumhash512 of value A, yields [64]byte Min AVM version: 13
Native TEAL opcode: sumhash512
vrf_verify
Section titled “vrf_verify”vrf_verify(s: VrfVerify, a: BytesBacked | bytes, b: BytesBacked | bytes, c: BytesBacked | bytes, /) → tuple[Bytes, bool]
Verify the proof B of message A against pubkey C. Returns vrf output and verification flag.
VrfAlgorand is the VRF used in Algorand. It is ECVRF-ED25519-SHA512-Elligator2, specified in the IETF internet draft draft-irtf-cfrg-vrf-03.
- Parameters: s (VrfVerify) – parameters index
Native TEAL opcode: vrf_verify
class AcctParamsGet
Section titled “class AcctParamsGet”X is field F from account A. Y is 1 if A owns positive algos, else 0
Native TEAL op: acct_params_get
static AcctParamsGet.acct_balance(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AcctParamsGet.acct_balance(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”Account balance in microalgos
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_min_balance(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AcctParamsGet.acct_min_balance(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”Minimum required balance for account, in microalgos
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_auth_addr(a: Account | UInt64 | int, /) → tuple[Account, bool]
Section titled “static AcctParamsGet.acct_auth_addr(a: Account | UInt64 | int, /) → tuple[Account, bool]”Address the account is rekeyed to.
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_total_num_uint(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AcctParamsGet.acct_total_num_uint(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”The total number of uint64 values allocated by this account in Global and Local States.
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_total_num_byte_slice(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AcctParamsGet.acct_total_num_byte_slice(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”The total number of byte array values allocated by this account in Global and Local States.
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_total_extra_app_pages(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AcctParamsGet.acct_total_extra_app_pages(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”The number of extra app code pages used by this account.
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_total_apps_created(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AcctParamsGet.acct_total_apps_created(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”The number of existing apps created by this account.
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_total_apps_opted_in(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AcctParamsGet.acct_total_apps_opted_in(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”The number of apps this account is opted into.
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_total_assets_created(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AcctParamsGet.acct_total_assets_created(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”The number of existing ASAs created by this account.
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_total_assets(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AcctParamsGet.acct_total_assets(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”The numbers of ASAs held by this account (including ASAs this account created).
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_total_boxes(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AcctParamsGet.acct_total_boxes(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”The number of existing boxes created by this account’s app.
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_total_box_bytes(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AcctParamsGet.acct_total_box_bytes(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”The total number of bytes used by this account’s app’s box keys and values.
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_incentive_eligible(a: Account | UInt64 | int, /) → tuple[bool, bool]
Section titled “static AcctParamsGet.acct_incentive_eligible(a: Account | UInt64 | int, /) → tuple[bool, bool]”Min AVM version: 11
- Returns tuple[bool, bool]: Has this account opted into block payouts
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_last_proposed(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AcctParamsGet.acct_last_proposed(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”Min AVM version: 11
- Returns tuple[UInt64, bool]: The round number of the last block this account proposed.
Native TEAL opcode: acct_params_get
static AcctParamsGet.acct_last_heartbeat(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AcctParamsGet.acct_last_heartbeat(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”Min AVM version: 11
- Returns tuple[UInt64, bool]: The round number of the last block this account sent a heartbeat.
Native TEAL opcode: acct_params_get
class AppGlobal
Section titled “class AppGlobal”Get or modify Global app state
Native TEAL ops: app_global_del, app_global_get, app_global_get_ex, app_global_put
static AppGlobal.get_bytes(a: BytesBacked | bytes, /) → Bytes
Section titled “static AppGlobal.get_bytes(a: BytesBacked | bytes, /) → Bytes”global state of the key A in the current application params: state key. Return: value. The value is zero (of type uint64) if the key does not exist.
Native TEAL opcode: app_global_get
static AppGlobal.get_uint64(a: BytesBacked | bytes, /) → UInt64
Section titled “static AppGlobal.get_uint64(a: BytesBacked | bytes, /) → UInt64”global state of the key A in the current application params: state key. Return: value. The value is zero (of type uint64) if the key does not exist.
Native TEAL opcode: app_global_get
static AppGlobal.get_ex_bytes(a: Application | UInt64 | int, b: BytesBacked | bytes, /) → tuple[Bytes, bool]
Section titled “static AppGlobal.get_ex_bytes(a: Application | UInt64 | int, b: BytesBacked | bytes, /) → tuple[Bytes, bool]”X is the global state of application A, key B. Y is 1 if key existed, else 0 params: Txn.ForeignApps offset (or, since v4, an _available_ application id), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.
Native TEAL opcode: app_global_get_ex
static AppGlobal.get_ex_uint64(a: Application | UInt64 | int, b: BytesBacked | bytes, /) → tuple[UInt64, bool]
Section titled “static AppGlobal.get_ex_uint64(a: Application | UInt64 | int, b: BytesBacked | bytes, /) → tuple[UInt64, bool]”X is the global state of application A, key B. Y is 1 if key existed, else 0 params: Txn.ForeignApps offset (or, since v4, an _available_ application id), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.
Native TEAL opcode: app_global_get_ex
static AppGlobal.delete(a: BytesBacked | bytes, /) → None
Section titled “static AppGlobal.delete(a: BytesBacked | bytes, /) → None”delete key A from the global state of the current application params: state key.
Deleting a key which is already absent has no effect on the application global state. (In particular, it does _not_ cause the program to fail.)
Native TEAL opcode: app_global_del
static AppGlobal.put(a: BytesBacked | bytes, b: UInt64 | BytesBacked | int | bytes, /) → None
Section titled “static AppGlobal.put(a: BytesBacked | bytes, b: UInt64 | BytesBacked | int | bytes, /) → None”write B to key A in the global state of the current application
Native TEAL opcode: app_global_put
class AppLocal
Section titled “class AppLocal”Get or modify Local app state
Native TEAL ops: app_local_del, app_local_get, app_local_get_ex, app_local_put
static AppLocal.get_bytes(a: Account | UInt64 | int, b: BytesBacked | bytes, /) → Bytes
Section titled “static AppLocal.get_bytes(a: Account | UInt64 | int, b: BytesBacked | bytes, /) → Bytes”local state of the key B in the current application in account A params: Txn.Accounts offset (or, since v4, an _available_ account address), state key. Return: value. The value is zero (of type uint64) if the key does not exist.
Native TEAL opcode: app_local_get
static AppLocal.get_uint64(a: Account | UInt64 | int, b: BytesBacked | bytes, /) → UInt64
Section titled “static AppLocal.get_uint64(a: Account | UInt64 | int, b: BytesBacked | bytes, /) → UInt64”local state of the key B in the current application in account A params: Txn.Accounts offset (or, since v4, an _available_ account address), state key. Return: value. The value is zero (of type uint64) if the key does not exist.
Native TEAL opcode: app_local_get
static AppLocal.get_ex_bytes(a: Account | UInt64 | int, b: Application | UInt64 | int, c: BytesBacked | bytes, /) → tuple[Bytes, bool]
Section titled “static AppLocal.get_ex_bytes(a: Account | UInt64 | int, b: Application | UInt64 | int, c: BytesBacked | bytes, /) → tuple[Bytes, bool]”X is the local state of application B, key C in account A. Y is 1 if key existed, else 0 params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.
Native TEAL opcode: app_local_get_ex
static AppLocal.get_ex_uint64(a: Account | UInt64 | int, b: Application | UInt64 | int, c: BytesBacked | bytes, /) → tuple[UInt64, bool]
Section titled “static AppLocal.get_ex_uint64(a: Account | UInt64 | int, b: Application | UInt64 | int, c: BytesBacked | bytes, /) → tuple[UInt64, bool]”X is the local state of application B, key C in account A. Y is 1 if key existed, else 0 params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.
Native TEAL opcode: app_local_get_ex
static AppLocal.delete(a: Account | UInt64 | int, b: BytesBacked | bytes, /) → None
Section titled “static AppLocal.delete(a: Account | UInt64 | int, b: BytesBacked | bytes, /) → None”delete key B from account A’s local state of the current application params: Txn.Accounts offset (or, since v4, an _available_ account address), state key.
Deleting a key which is already absent has no effect on the application local state. (In particular, it does _not_ cause the program to fail.)
Native TEAL opcode: app_local_del
static AppLocal.put(a: Account | UInt64 | int, b: BytesBacked | bytes, c: UInt64 | BytesBacked | int | bytes, /) → None
Section titled “static AppLocal.put(a: Account | UInt64 | int, b: BytesBacked | bytes, c: UInt64 | BytesBacked | int | bytes, /) → None”write C to key B in account A’s local state of the current application params: Txn.Accounts offset (or, since v4, an _available_ account address), state key, value.
Native TEAL opcode: app_local_put
class AppParamsGet
Section titled “class AppParamsGet”X is field F from app A. Y is 1 if A exists, else 0 params: Txn.ForeignApps offset or an _available_ app id. Return: did_exist flag (1 if the application existed and 0 otherwise), value.
Native TEAL op: app_params_get
static AppParamsGet.app_approval_program(a: Application | UInt64 | int, /) → tuple[Bytes, bool]
Section titled “static AppParamsGet.app_approval_program(a: Application | UInt64 | int, /) → tuple[Bytes, bool]”Bytecode of Approval Program
Native TEAL opcode: app_params_get
static AppParamsGet.app_clear_state_program(a: Application | UInt64 | int, /) → tuple[Bytes, bool]
Section titled “static AppParamsGet.app_clear_state_program(a: Application | UInt64 | int, /) → tuple[Bytes, bool]”Bytecode of Clear State Program
Native TEAL opcode: app_params_get
static AppParamsGet.app_global_num_uint(a: Application | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AppParamsGet.app_global_num_uint(a: Application | UInt64 | int, /) → tuple[UInt64, bool]”Number of uint64 values allowed in Global State
Native TEAL opcode: app_params_get
static AppParamsGet.app_global_num_byte_slice(a: Application | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AppParamsGet.app_global_num_byte_slice(a: Application | UInt64 | int, /) → tuple[UInt64, bool]”Number of byte array values allowed in Global State
Native TEAL opcode: app_params_get
static AppParamsGet.app_local_num_uint(a: Application | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AppParamsGet.app_local_num_uint(a: Application | UInt64 | int, /) → tuple[UInt64, bool]”Number of uint64 values allowed in Local State
Native TEAL opcode: app_params_get
static AppParamsGet.app_local_num_byte_slice(a: Application | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AppParamsGet.app_local_num_byte_slice(a: Application | UInt64 | int, /) → tuple[UInt64, bool]”Number of byte array values allowed in Local State
Native TEAL opcode: app_params_get
static AppParamsGet.app_extra_program_pages(a: Application | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AppParamsGet.app_extra_program_pages(a: Application | UInt64 | int, /) → tuple[UInt64, bool]”Number of Extra Program Pages of code space
Native TEAL opcode: app_params_get
static AppParamsGet.app_creator(a: Application | UInt64 | int, /) → tuple[Account, bool]
Section titled “static AppParamsGet.app_creator(a: Application | UInt64 | int, /) → tuple[Account, bool]”Creator address
Native TEAL opcode: app_params_get
static AppParamsGet.app_address(a: Application | UInt64 | int, /) → tuple[Account, bool]
Section titled “static AppParamsGet.app_address(a: Application | UInt64 | int, /) → tuple[Account, bool]”Address for which this application has authority
Native TEAL opcode: app_params_get
static AppParamsGet.app_version(a: Application | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AppParamsGet.app_version(a: Application | UInt64 | int, /) → tuple[UInt64, bool]”Min AVM version: 12
- Returns tuple[UInt64, bool]: Version of the app, incremented each time the approval or clear program changes
Native TEAL opcode: app_params_get
class AssetHoldingGet
Section titled “class AssetHoldingGet”X is field F from account A’s holding of asset B. Y is 1 if A is opted into B, else 0 params: Txn.Accounts offset (or, since v4, an _available_ address), asset id (or, since v4, a Txn.ForeignAssets offset). Return: did_exist flag (1 if the asset existed and 0 otherwise), value.
Native TEAL op: asset_holding_get
static AssetHoldingGet.asset_balance(a: Account | UInt64 | int, b: Asset | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AssetHoldingGet.asset_balance(a: Account | UInt64 | int, b: Asset | UInt64 | int, /) → tuple[UInt64, bool]”Amount of the asset unit held by this account
Native TEAL opcode: asset_holding_get
static AssetHoldingGet.asset_frozen(a: Account | UInt64 | int, b: Asset | UInt64 | int, /) → tuple[bool, bool]
Section titled “static AssetHoldingGet.asset_frozen(a: Account | UInt64 | int, b: Asset | UInt64 | int, /) → tuple[bool, bool]”Is the asset frozen or not
Native TEAL opcode: asset_holding_get
class AssetParamsGet
Section titled “class AssetParamsGet”X is field F from asset A. Y is 1 if A exists, else 0 params: Txn.ForeignAssets offset (or, since v4, an _available_ asset id. Return: did_exist flag (1 if the asset existed and 0 otherwise), value.
Native TEAL op: asset_params_get
static AssetParamsGet.asset_total(a: Asset | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AssetParamsGet.asset_total(a: Asset | UInt64 | int, /) → tuple[UInt64, bool]”Total number of units of this asset
Native TEAL opcode: asset_params_get
static AssetParamsGet.asset_decimals(a: Asset | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static AssetParamsGet.asset_decimals(a: Asset | UInt64 | int, /) → tuple[UInt64, bool]”See AssetParams.Decimals
Native TEAL opcode: asset_params_get
static AssetParamsGet.asset_default_frozen(a: Asset | UInt64 | int, /) → tuple[bool, bool]
Section titled “static AssetParamsGet.asset_default_frozen(a: Asset | UInt64 | int, /) → tuple[bool, bool]”Frozen by default or not
Native TEAL opcode: asset_params_get
static AssetParamsGet.asset_unit_name(a: Asset | UInt64 | int, /) → tuple[Bytes, bool]
Section titled “static AssetParamsGet.asset_unit_name(a: Asset | UInt64 | int, /) → tuple[Bytes, bool]”Asset unit name
Native TEAL opcode: asset_params_get
static AssetParamsGet.asset_name(a: Asset | UInt64 | int, /) → tuple[Bytes, bool]
Section titled “static AssetParamsGet.asset_name(a: Asset | UInt64 | int, /) → tuple[Bytes, bool]”Asset name
Native TEAL opcode: asset_params_get
static AssetParamsGet.asset_url(a: Asset | UInt64 | int, /) → tuple[Bytes, bool]
Section titled “static AssetParamsGet.asset_url(a: Asset | UInt64 | int, /) → tuple[Bytes, bool]”URL with additional info about the asset
Native TEAL opcode: asset_params_get
static AssetParamsGet.asset_metadata_hash(a: Asset | UInt64 | int, /) → tuple[Bytes, bool]
Section titled “static AssetParamsGet.asset_metadata_hash(a: Asset | UInt64 | int, /) → tuple[Bytes, bool]”Arbitrary commitment
Native TEAL opcode: asset_params_get
static AssetParamsGet.asset_manager(a: Asset | UInt64 | int, /) → tuple[Account, bool]
Section titled “static AssetParamsGet.asset_manager(a: Asset | UInt64 | int, /) → tuple[Account, bool]”Manager address
Native TEAL opcode: asset_params_get
static AssetParamsGet.asset_reserve(a: Asset | UInt64 | int, /) → tuple[Account, bool]
Section titled “static AssetParamsGet.asset_reserve(a: Asset | UInt64 | int, /) → tuple[Account, bool]”Reserve address
Native TEAL opcode: asset_params_get
static AssetParamsGet.asset_freeze(a: Asset | UInt64 | int, /) → tuple[Account, bool]
Section titled “static AssetParamsGet.asset_freeze(a: Asset | UInt64 | int, /) → tuple[Account, bool]”Freeze address
Native TEAL opcode: asset_params_get
static AssetParamsGet.asset_clawback(a: Asset | UInt64 | int, /) → tuple[Account, bool]
Section titled “static AssetParamsGet.asset_clawback(a: Asset | UInt64 | int, /) → tuple[Account, bool]”Clawback address
Native TEAL opcode: asset_params_get
static AssetParamsGet.asset_creator(a: Asset | UInt64 | int, /) → tuple[Account, bool]
Section titled “static AssetParamsGet.asset_creator(a: Asset | UInt64 | int, /) → tuple[Account, bool]”Creator address
Native TEAL opcode: asset_params_get
class Block
Section titled “class Block”field F of block A. Fail unless A falls between txn.LastValid-1002 and txn.FirstValid (exclusive)
Native TEAL op: block
static Block.blk_seed(a: UInt64 | int, /) → Bytes
Section titled “static Block.blk_seed(a: UInt64 | int, /) → Bytes”Native TEAL opcode: block
static Block.blk_timestamp(a: UInt64 | int, /) → UInt64
Section titled “static Block.blk_timestamp(a: UInt64 | int, /) → UInt64”Native TEAL opcode: block
static Block.blk_proposer(a: UInt64 | int, /) → Account
Section titled “static Block.blk_proposer(a: UInt64 | int, /) → Account”Min AVM version: 11
Native TEAL opcode: block
static Block.blk_fees_collected(a: UInt64 | int, /) → UInt64
Section titled “static Block.blk_fees_collected(a: UInt64 | int, /) → UInt64”Min AVM version: 11
Native TEAL opcode: block
static Block.blk_bonus(a: UInt64 | int, /) → UInt64
Section titled “static Block.blk_bonus(a: UInt64 | int, /) → UInt64”Min AVM version: 11
Native TEAL opcode: block
static Block.blk_branch(a: UInt64 | int, /) → Bytes
Section titled “static Block.blk_branch(a: UInt64 | int, /) → Bytes”Min AVM version: 11
Native TEAL opcode: block
static Block.blk_fee_sink(a: UInt64 | int, /) → Account
Section titled “static Block.blk_fee_sink(a: UInt64 | int, /) → Account”Min AVM version: 11
Native TEAL opcode: block
static Block.blk_protocol(a: UInt64 | int, /) → Bytes
Section titled “static Block.blk_protocol(a: UInt64 | int, /) → Bytes”Min AVM version: 11
Native TEAL opcode: block
static Block.blk_txn_counter(a: UInt64 | int, /) → UInt64
Section titled “static Block.blk_txn_counter(a: UInt64 | int, /) → UInt64”Min AVM version: 11
Native TEAL opcode: block
static Block.blk_proposer_payout(a: UInt64 | int, /) → UInt64
Section titled “static Block.blk_proposer_payout(a: UInt64 | int, /) → UInt64”Min AVM version: 11
Native TEAL opcode: block
class Box
Section titled “class Box”Get or modify box state
Native TEAL ops: box_create, box_del, box_extract, box_get, box_len, box_put, box_replace, box_resize, box_splice
static Box.create(a: BytesBacked | bytes, b: UInt64 | int, /) → bool
Section titled “static Box.create(a: BytesBacked | bytes, b: UInt64 | int, /) → bool”create a box named A, of length B. Fail if the name A is empty or B exceeds 32,768. Returns 0 if A already existed, else 1
Newly created boxes are filled with 0 bytes. box_create will fail if the referenced box already exists with a different size. Otherwise, existing boxes are unchanged by box_create.
Native TEAL opcode: box_create
static Box.delete(a: BytesBacked | bytes, /) → bool
Section titled “static Box.delete(a: BytesBacked | bytes, /) → bool”delete box named A if it exists. Return 1 if A existed, 0 otherwise
Native TEAL opcode: box_del
static Box.extract(a: BytesBacked | bytes, b: UInt64 | int, c: UInt64 | int, /) → Bytes
Section titled “static Box.extract(a: BytesBacked | bytes, b: UInt64 | int, c: UInt64 | int, /) → Bytes”read C bytes from box A, starting at offset B. Fail if A does not exist, or the byte range is outside A’s size.
Native TEAL opcode: box_extract
static Box.get(a: BytesBacked | bytes, /) → tuple[Bytes, bool]
Section titled “static Box.get(a: BytesBacked | bytes, /) → tuple[Bytes, bool]”X is the contents of box A if A exists, else ‘’. Y is 1 if A exists, else 0.
For boxes that exceed 4,096 bytes, consider box_create, box_extract, and box_replace
Native TEAL opcode: box_get
static Box.length(a: BytesBacked | bytes, /) → tuple[UInt64, bool]
Section titled “static Box.length(a: BytesBacked | bytes, /) → tuple[UInt64, bool]”X is the length of box A if A exists, else 0. Y is 1 if A exists, else 0.
Native TEAL opcode: box_len
static Box.put(a: BytesBacked | bytes, b: BytesBacked | bytes, /) → None
Section titled “static Box.put(a: BytesBacked | bytes, b: BytesBacked | bytes, /) → None”replaces the contents of box A with byte-array B. Fails if A exists and len(B) != len(box A). Creates A if it does not exist
For boxes that exceed 4,096 bytes, consider box_create, box_extract, and box_replace
Native TEAL opcode: box_put
static Box.replace(a: BytesBacked | bytes, b: UInt64 | int, c: BytesBacked | bytes, /) → None
Section titled “static Box.replace(a: BytesBacked | bytes, b: UInt64 | int, c: BytesBacked | bytes, /) → None”write byte-array C into box A, starting at offset B. Fail if A does not exist, or the byte range is outside A’s size.
Native TEAL opcode: box_replace
static Box.resize(a: BytesBacked | bytes, b: UInt64 | int, /) → None
Section titled “static Box.resize(a: BytesBacked | bytes, b: UInt64 | int, /) → None”change the size of box named A to be of length B, adding zero bytes to end or removing bytes from the end, as needed. Fail if the name A is empty, A is not an existing box, or B exceeds 32,768.
Native TEAL opcode: box_resize
static Box.splice(a: BytesBacked | bytes, b: UInt64 | int, c: UInt64 | int, d: BytesBacked | bytes, /) → None
Section titled “static Box.splice(a: BytesBacked | bytes, b: UInt64 | int, c: UInt64 | int, d: BytesBacked | bytes, /) → None”set box A to contain its previous bytes up to index B, followed by D, followed by the original bytes of A that began at index B+C. Boxes are of constant length. If C < len(D), then len(D)-C bytes will be removed from the end. If C > len(D), zero bytes will be appended to the end to reach the box length.
Native TEAL opcode: box_splice
class EllipticCurve
Section titled “class EllipticCurve”Elliptic Curve functions
Native TEAL ops: ec_add, ec_map_to, ec_multi_scalar_mul, ec_pairing_check, ec_scalar_mul, ec_subgroup_check
static EllipticCurve.add(g: EC, a: BytesBacked | bytes, b: BytesBacked | bytes, /) → Bytes
Section titled “static EllipticCurve.add(g: EC, a: BytesBacked | bytes, b: BytesBacked | bytes, /) → Bytes”for curve points A and B, return the curve point A + B
A and B are curve points in affine representation: field element X concatenated with field element Y. Field element Z is encoded as follows.
For the base field elements (Fp), Z is encoded as a big-endian number and must be lower than the field modulus.
For the quadratic field extension (Fp2), Z is encoded as the concatenation of the individual encoding of the coefficients. For an Fp2 element of the form Z = Z0 + Z1 i, where i is a formal quadratic non-residue, the encoding of Z is the concatenation of the encoding of Z0 and Z1 in this order. (Z0 and Z1 must be less than the field modulus).
The point at infinity is encoded as (X,Y) = (0,0).
Groups G1 and G2 are denoted additively.
Fails if A or B is not in G. A and/or B are allowed to be the point at infinity. Does _not_ check if A and B are in the main prime-order subgroup.
- Parameters: g (EC) – curve index
Native TEAL opcode: ec_add
static EllipticCurve.map_to(g: EC, a: BytesBacked | bytes, /) → Bytes
Section titled “static EllipticCurve.map_to(g: EC, a: BytesBacked | bytes, /) → Bytes”maps field element A to group G
BN254 points are mapped by the SVDW map. BLS12-381 points are mapped by the SSWU map.
G1 element inputs are base field elements and G2 element inputs are quadratic field elements, with nearly the same encoding rules (for field elements) as defined in ec_add. There is one difference of encoding rule: G1 element inputs do not need to be 0-padded if they fit in less than 32 bytes for BN254 and less than 48 bytes for BLS12-381. (As usual, the empty byte array represents 0.) G2 elements inputs need to be always have the required size.
- Parameters: g (EC) – curve index
Native TEAL opcode: ec_map_to
static EllipticCurve.scalar_mul_multi(g: EC, a: BytesBacked | bytes, b: BytesBacked | bytes, /) → Bytes
Section titled “static EllipticCurve.scalar_mul_multi(g: EC, a: BytesBacked | bytes, b: BytesBacked | bytes, /) → Bytes”for curve points A and scalars B, return curve point B0A0 + B1A1 + B2A2 + … + BnAn
A is a list of concatenated points, encoded and checked as described in ec_add. B is a list of concatenated scalars which, unlike ec_scalar_mul, must all be exactly 32 bytes long.
The name ec_multi_scalar_mul was chosen to reflect common usage, but a more consistent name would be ec_multi_scalar_mul. AVM values are limited to 4096 bytes, so ec_multi_scalar_mul is limited by the size of the points in the group being operated upon.
- Parameters: g (EC) – curve index
Native TEAL opcode: ec_multi_scalar_mul
static EllipticCurve.pairing_check(g: EC, a: BytesBacked | bytes, b: BytesBacked | bytes, /) → bool
Section titled “static EllipticCurve.pairing_check(g: EC, a: BytesBacked | bytes, b: BytesBacked | bytes, /) → bool”1 if the product of the pairing of each point in A with its respective point in B is equal to the identity element of the target group Gt, else 0
A and B are concatenated points, encoded and checked as described in ec_add. A contains points of the group G, B contains points of the associated group (G2 if G is G1, and vice versa). Fails if A and B have a different number of points, or if any point is not in its described group or outside the main prime-order subgroup - a stronger condition than other opcodes. AVM values are limited to 4096 bytes, so ec_pairing_check is limited by the size of the points in the groups being operated upon.
- Parameters: g (EC) – curve index
Native TEAL opcode: ec_pairing_check
static EllipticCurve.scalar_mul(g: EC, a: BytesBacked | bytes, b: BytesBacked | bytes, /) → Bytes
Section titled “static EllipticCurve.scalar_mul(g: EC, a: BytesBacked | bytes, b: BytesBacked | bytes, /) → Bytes”for curve point A and scalar B, return the curve point BA, the point A multiplied by the scalar B.
A is a curve point encoded and checked as described in ec_add. Scalar B is interpreted as a big-endian unsigned integer. Fails if B exceeds 32 bytes.
- Parameters: g (EC) – curve index
Native TEAL opcode: ec_scalar_mul
static EllipticCurve.subgroup_check(g: EC, a: BytesBacked | bytes, /) → bool
Section titled “static EllipticCurve.subgroup_check(g: EC, a: BytesBacked | bytes, /) → bool”1 if A is in the main prime-order subgroup of G (including the point at infinity) else 0. Program fails if A is not in G at all.
- Parameters: g (EC) – curve index
Native TEAL opcode: ec_subgroup_check
class GITxn
Section titled “class GITxn”Get values for inner transaction in the last group submitted
Native TEAL ops: gitxn, gitxnas
static GITxn.sender(t: int, /) → Account
Section titled “static GITxn.sender(t: int, /) → Account”- Parameters: t (int) – transaction group index
- Returns Account: 32 byte address
Native TEAL opcode: gitxn
static GITxn.fee(t: int, /) → UInt64
Section titled “static GITxn.fee(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: microalgos
Native TEAL opcode: gitxn
static GITxn.first_valid(t: int, /) → UInt64
Section titled “static GITxn.first_valid(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: round number
Native TEAL opcode: gitxn
static GITxn.first_valid_time(t: int, /) → UInt64
Section titled “static GITxn.first_valid_time(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: UNIX timestamp of block before txn.FirstValid. Fails if negative
Native TEAL opcode: gitxn
static GITxn.last_valid(t: int, /) → UInt64
Section titled “static GITxn.last_valid(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: round number
Native TEAL opcode: gitxn
static GITxn.note(t: int, /) → Bytes
Section titled “static GITxn.note(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: Any data up to 1024 bytes
Native TEAL opcode: gitxn
static GITxn.lease(t: int, /) → Bytes
Section titled “static GITxn.lease(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: 32 byte lease value
Native TEAL opcode: gitxn
static GITxn.receiver(t: int, /) → Account
Section titled “static GITxn.receiver(t: int, /) → Account”- Parameters: t (int) – transaction group index
- Returns Account: 32 byte address
Native TEAL opcode: gitxn
static GITxn.amount(t: int, /) → UInt64
Section titled “static GITxn.amount(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: microalgos
Native TEAL opcode: gitxn
static GITxn.close_remainder_to(t: int, /) → Account
Section titled “static GITxn.close_remainder_to(t: int, /) → Account”- Parameters: t (int) – transaction group index
- Returns Account: 32 byte address
Native TEAL opcode: gitxn
static GITxn.vote_pk(t: int, /) → Bytes
Section titled “static GITxn.vote_pk(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: 32 byte address
Native TEAL opcode: gitxn
static GITxn.selection_pk(t: int, /) → Bytes
Section titled “static GITxn.selection_pk(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: 32 byte address
Native TEAL opcode: gitxn
static GITxn.vote_first(t: int, /) → UInt64
Section titled “static GITxn.vote_first(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: The first round that the participation key is valid.
Native TEAL opcode: gitxn
static GITxn.vote_last(t: int, /) → UInt64
Section titled “static GITxn.vote_last(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: The last round that the participation key is valid.
Native TEAL opcode: gitxn
static GITxn.vote_key_dilution(t: int, /) → UInt64
Section titled “static GITxn.vote_key_dilution(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Dilution for the 2-level participation key
Native TEAL opcode: gitxn
static GITxn.type(t: int, /) → Bytes
Section titled “static GITxn.type(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: Transaction type as bytes
Native TEAL opcode: gitxn
static GITxn.type_enum(t: int, /) → TransactionType
Section titled “static GITxn.type_enum(t: int, /) → TransactionType”- Parameters: t (int) – transaction group index
- Returns TransactionType: Transaction type as integer
Native TEAL opcode: gitxn
static GITxn.xfer_asset(t: int, /) → Asset
Section titled “static GITxn.xfer_asset(t: int, /) → Asset”- Parameters: t (int) – transaction group index
- Returns Asset: Asset ID
Native TEAL opcode: gitxn
static GITxn.asset_amount(t: int, /) → UInt64
Section titled “static GITxn.asset_amount(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: value in Asset’s units
Native TEAL opcode: gitxn
static GITxn.asset_sender(t: int, /) → Account
Section titled “static GITxn.asset_sender(t: int, /) → Account”- Parameters: t (int) – transaction group index
- Returns Account: 32 byte address. Source of assets if Sender is the Asset’s Clawback address.
Native TEAL opcode: gitxn
static GITxn.asset_receiver(t: int, /) → Account
Section titled “static GITxn.asset_receiver(t: int, /) → Account”- Parameters: t (int) – transaction group index
- Returns Account: 32 byte address
Native TEAL opcode: gitxn
static GITxn.asset_close_to(t: int, /) → Account
Section titled “static GITxn.asset_close_to(t: int, /) → Account”- Parameters: t (int) – transaction group index
- Returns Account: 32 byte address
Native TEAL opcode: gitxn
static GITxn.group_index(t: int, /) → UInt64
Section titled “static GITxn.group_index(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1
Native TEAL opcode: gitxn
static GITxn.tx_id(t: int, /) → Bytes
Section titled “static GITxn.tx_id(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: The computed ID for this transaction. 32 bytes.
Native TEAL opcode: gitxn
static GITxn.application_id(t: int, /) → Application
Section titled “static GITxn.application_id(t: int, /) → Application”- Parameters: t (int) – transaction group index
- Returns Application: ApplicationID from ApplicationCall transaction
Native TEAL opcode: gitxn
static GITxn.on_completion(t: int, /) → OnCompleteAction
Section titled “static GITxn.on_completion(t: int, /) → OnCompleteAction”- Parameters: t (int) – transaction group index
- Returns OnCompleteAction: ApplicationCall transaction on completion action
Native TEAL opcode: gitxn
static GITxn.application_args(t: int, a: UInt64 | int, /) → Bytes
Section titled “static GITxn.application_args(t: int, a: UInt64 | int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: Arguments passed to the application in the ApplicationCall transaction
Native TEAL opcode: gitxna, gitxnas
static GITxn.num_app_args(t: int, /) → UInt64
Section titled “static GITxn.num_app_args(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Number of ApplicationArgs
Native TEAL opcode: gitxn
static GITxn.accounts(t: int, a: UInt64 | int, /) → Account
Section titled “static GITxn.accounts(t: int, a: UInt64 | int, /) → Account”- Parameters: t (int) – transaction group index
- Returns Account: Accounts listed in the ApplicationCall transaction
Native TEAL opcode: gitxna, gitxnas
static GITxn.num_accounts(t: int, /) → UInt64
Section titled “static GITxn.num_accounts(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Number of Accounts
Native TEAL opcode: gitxn
static GITxn.approval_program(t: int, /) → Bytes
Section titled “static GITxn.approval_program(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: Approval program
Native TEAL opcode: gitxn
static GITxn.clear_state_program(t: int, /) → Bytes
Section titled “static GITxn.clear_state_program(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: Clear state program
Native TEAL opcode: gitxn
static GITxn.rekey_to(t: int, /) → Account
Section titled “static GITxn.rekey_to(t: int, /) → Account”- Parameters: t (int) – transaction group index
- Returns Account: 32 byte Sender’s new AuthAddr
Native TEAL opcode: gitxn
static GITxn.config_asset(t: int, /) → Asset
Section titled “static GITxn.config_asset(t: int, /) → Asset”- Parameters: t (int) – transaction group index
- Returns Asset: Asset ID in asset config transaction
Native TEAL opcode: gitxn
static GITxn.config_asset_total(t: int, /) → UInt64
Section titled “static GITxn.config_asset_total(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Total number of units of this asset created
Native TEAL opcode: gitxn
static GITxn.config_asset_decimals(t: int, /) → UInt64
Section titled “static GITxn.config_asset_decimals(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Number of digits to display after the decimal place when displaying the asset
Native TEAL opcode: gitxn
static GITxn.config_asset_default_frozen(t: int, /) → bool
Section titled “static GITxn.config_asset_default_frozen(t: int, /) → bool”- Parameters: t (int) – transaction group index
- Returns bool: Whether the asset’s slots are frozen by default or not, 0 or 1
Native TEAL opcode: gitxn
static GITxn.config_asset_unit_name(t: int, /) → Bytes
Section titled “static GITxn.config_asset_unit_name(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: Unit name of the asset
Native TEAL opcode: gitxn
static GITxn.config_asset_name(t: int, /) → Bytes
Section titled “static GITxn.config_asset_name(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: The asset name
Native TEAL opcode: gitxn
static GITxn.config_asset_url(t: int, /) → Bytes
Section titled “static GITxn.config_asset_url(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: URL
Native TEAL opcode: gitxn
static GITxn.config_asset_metadata_hash(t: int, /) → Bytes
Section titled “static GITxn.config_asset_metadata_hash(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: 32 byte commitment to unspecified asset metadata
Native TEAL opcode: gitxn
static GITxn.config_asset_manager(t: int, /) → Account
Section titled “static GITxn.config_asset_manager(t: int, /) → Account”- Parameters: t (int) – transaction group index
- Returns Account: 32 byte address
Native TEAL opcode: gitxn
static GITxn.config_asset_reserve(t: int, /) → Account
Section titled “static GITxn.config_asset_reserve(t: int, /) → Account”- Parameters: t (int) – transaction group index
- Returns Account: 32 byte address
Native TEAL opcode: gitxn
static GITxn.config_asset_freeze(t: int, /) → Account
Section titled “static GITxn.config_asset_freeze(t: int, /) → Account”- Parameters: t (int) – transaction group index
- Returns Account: 32 byte address
Native TEAL opcode: gitxn
static GITxn.config_asset_clawback(t: int, /) → Account
Section titled “static GITxn.config_asset_clawback(t: int, /) → Account”- Parameters: t (int) – transaction group index
- Returns Account: 32 byte address
Native TEAL opcode: gitxn
static GITxn.freeze_asset(t: int, /) → Asset
Section titled “static GITxn.freeze_asset(t: int, /) → Asset”- Parameters: t (int) – transaction group index
- Returns Asset: Asset ID being frozen or un-frozen
Native TEAL opcode: gitxn
static GITxn.freeze_asset_account(t: int, /) → Account
Section titled “static GITxn.freeze_asset_account(t: int, /) → Account”- Parameters: t (int) – transaction group index
- Returns Account: 32 byte address of the account whose asset slot is being frozen or un-frozen
Native TEAL opcode: gitxn
static GITxn.freeze_asset_frozen(t: int, /) → bool
Section titled “static GITxn.freeze_asset_frozen(t: int, /) → bool”- Parameters: t (int) – transaction group index
- Returns bool: The new frozen value, 0 or 1
Native TEAL opcode: gitxn
static GITxn.assets(t: int, a: UInt64 | int, /) → Asset
Section titled “static GITxn.assets(t: int, a: UInt64 | int, /) → Asset”- Parameters: t (int) – transaction group index
- Returns Asset: Foreign Assets listed in the ApplicationCall transaction
Native TEAL opcode: gitxna, gitxnas
static GITxn.num_assets(t: int, /) → UInt64
Section titled “static GITxn.num_assets(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Number of Assets
Native TEAL opcode: gitxn
static GITxn.applications(t: int, a: UInt64 | int, /) → Application
Section titled “static GITxn.applications(t: int, a: UInt64 | int, /) → Application”- Parameters: t (int) – transaction group index
- Returns Application: Foreign Apps listed in the ApplicationCall transaction
Native TEAL opcode: gitxna, gitxnas
static GITxn.num_applications(t: int, /) → UInt64
Section titled “static GITxn.num_applications(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Number of Applications
Native TEAL opcode: gitxn
static GITxn.global_num_uint(t: int, /) → UInt64
Section titled “static GITxn.global_num_uint(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Number of global state integers in ApplicationCall
Native TEAL opcode: gitxn
static GITxn.global_num_byte_slice(t: int, /) → UInt64
Section titled “static GITxn.global_num_byte_slice(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Number of global state byteslices in ApplicationCall
Native TEAL opcode: gitxn
static GITxn.local_num_uint(t: int, /) → UInt64
Section titled “static GITxn.local_num_uint(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Number of local state integers in ApplicationCall
Native TEAL opcode: gitxn
static GITxn.local_num_byte_slice(t: int, /) → UInt64
Section titled “static GITxn.local_num_byte_slice(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Number of local state byteslices in ApplicationCall
Native TEAL opcode: gitxn
static GITxn.extra_program_pages(t: int, /) → UInt64
Section titled “static GITxn.extra_program_pages(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Number of additional pages for each of the application’s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.
Native TEAL opcode: gitxn
static GITxn.nonparticipation(t: int, /) → bool
Section titled “static GITxn.nonparticipation(t: int, /) → bool”- Parameters: t (int) – transaction group index
- Returns bool: Marks an account nonparticipating for rewards
Native TEAL opcode: gitxn
static GITxn.logs(t: int, a: UInt64 | int, /) → Bytes
Section titled “static GITxn.logs(t: int, a: UInt64 | int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes:
Log messages emitted by an application call (only with
itxnin v5). Application mode only
Native TEAL opcode: gitxna, gitxnas
static GITxn.num_logs(t: int, /) → UInt64
Section titled “static GITxn.num_logs(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64:
Number of Logs (only with
itxnin v5). Application mode only
Native TEAL opcode: gitxn
static GITxn.created_asset_id(t: int, /) → Asset
Section titled “static GITxn.created_asset_id(t: int, /) → Asset”- Parameters: t (int) – transaction group index
- Returns Asset:
Asset ID allocated by the creation of an ASA (only with
itxnin v5). Application mode only
Native TEAL opcode: gitxn
static GITxn.created_application_id(t: int, /) → Application
Section titled “static GITxn.created_application_id(t: int, /) → Application”- Parameters: t (int) – transaction group index
- Returns Application:
ApplicationID allocated by the creation of an application (only with
itxnin v5). Application mode only
Native TEAL opcode: gitxn
static GITxn.last_log(t: int, /) → Bytes
Section titled “static GITxn.last_log(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: The last message emitted. Empty bytes if none were emitted. Application mode only
Native TEAL opcode: gitxn
static GITxn.state_proof_pk(t: int, /) → Bytes
Section titled “static GITxn.state_proof_pk(t: int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: State proof public key
Native TEAL opcode: gitxn
static GITxn.approval_program_pages(t: int, a: UInt64 | int, /) → Bytes
Section titled “static GITxn.approval_program_pages(t: int, a: UInt64 | int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: Approval Program as an array of pages
Native TEAL opcode: gitxna, gitxnas
static GITxn.num_approval_program_pages(t: int, /) → UInt64
Section titled “static GITxn.num_approval_program_pages(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Number of Approval Program pages
Native TEAL opcode: gitxn
static GITxn.clear_state_program_pages(t: int, a: UInt64 | int, /) → Bytes
Section titled “static GITxn.clear_state_program_pages(t: int, a: UInt64 | int, /) → Bytes”- Parameters: t (int) – transaction group index
- Returns Bytes: ClearState Program as an array of pages
Native TEAL opcode: gitxna, gitxnas
static GITxn.num_clear_state_program_pages(t: int, /) → UInt64
Section titled “static GITxn.num_clear_state_program_pages(t: int, /) → UInt64”- Parameters: t (int) – transaction group index
- Returns UInt64: Number of ClearState Program pages
Native TEAL opcode: gitxn
static GITxn.reject_version(t: int, /) → UInt64
Section titled “static GITxn.reject_version(t: int, /) → UInt64”Min AVM version: 12
- Parameters: t (int) – transaction group index
- Returns UInt64: Application version for which the txn must reject
Native TEAL opcode: gitxn
class GTxn
Section titled “class GTxn”Get values for transactions in the current group
Native TEAL ops: gtxns, gtxnsas
static GTxn.sender(a: UInt64 | int, /) → Account
Section titled “static GTxn.sender(a: UInt64 | int, /) → Account”32 byte address
Native TEAL opcode: gtxn, gtxns
static GTxn.fee(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.fee(a: UInt64 | int, /) → UInt64”microalgos
Native TEAL opcode: gtxn, gtxns
static GTxn.first_valid(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.first_valid(a: UInt64 | int, /) → UInt64”round number
Native TEAL opcode: gtxn, gtxns
static GTxn.first_valid_time(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.first_valid_time(a: UInt64 | int, /) → UInt64”UNIX timestamp of block before txn.FirstValid. Fails if negative
Native TEAL opcode: gtxn, gtxns
static GTxn.last_valid(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.last_valid(a: UInt64 | int, /) → UInt64”round number
Native TEAL opcode: gtxn, gtxns
static GTxn.note(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.note(a: UInt64 | int, /) → Bytes”Any data up to 1024 bytes
Native TEAL opcode: gtxn, gtxns
static GTxn.lease(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.lease(a: UInt64 | int, /) → Bytes”32 byte lease value
Native TEAL opcode: gtxn, gtxns
static GTxn.receiver(a: UInt64 | int, /) → Account
Section titled “static GTxn.receiver(a: UInt64 | int, /) → Account”32 byte address
Native TEAL opcode: gtxn, gtxns
static GTxn.amount(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.amount(a: UInt64 | int, /) → UInt64”microalgos
Native TEAL opcode: gtxn, gtxns
static GTxn.close_remainder_to(a: UInt64 | int, /) → Account
Section titled “static GTxn.close_remainder_to(a: UInt64 | int, /) → Account”32 byte address
Native TEAL opcode: gtxn, gtxns
static GTxn.vote_pk(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.vote_pk(a: UInt64 | int, /) → Bytes”32 byte address
Native TEAL opcode: gtxn, gtxns
static GTxn.selection_pk(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.selection_pk(a: UInt64 | int, /) → Bytes”32 byte address
Native TEAL opcode: gtxn, gtxns
static GTxn.vote_first(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.vote_first(a: UInt64 | int, /) → UInt64”The first round that the participation key is valid.
Native TEAL opcode: gtxn, gtxns
static GTxn.vote_last(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.vote_last(a: UInt64 | int, /) → UInt64”The last round that the participation key is valid.
Native TEAL opcode: gtxn, gtxns
static GTxn.vote_key_dilution(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.vote_key_dilution(a: UInt64 | int, /) → UInt64”Dilution for the 2-level participation key
Native TEAL opcode: gtxn, gtxns
static GTxn.type(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.type(a: UInt64 | int, /) → Bytes”Transaction type as bytes
Native TEAL opcode: gtxn, gtxns
static GTxn.type_enum(a: UInt64 | int, /) → TransactionType
Section titled “static GTxn.type_enum(a: UInt64 | int, /) → TransactionType”Transaction type as integer
Native TEAL opcode: gtxn, gtxns
static GTxn.xfer_asset(a: UInt64 | int, /) → Asset
Section titled “static GTxn.xfer_asset(a: UInt64 | int, /) → Asset”Asset ID
Native TEAL opcode: gtxn, gtxns
static GTxn.asset_amount(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.asset_amount(a: UInt64 | int, /) → UInt64”value in Asset’s units
Native TEAL opcode: gtxn, gtxns
static GTxn.asset_sender(a: UInt64 | int, /) → Account
Section titled “static GTxn.asset_sender(a: UInt64 | int, /) → Account”32 byte address. Source of assets if Sender is the Asset’s Clawback address.
Native TEAL opcode: gtxn, gtxns
static GTxn.asset_receiver(a: UInt64 | int, /) → Account
Section titled “static GTxn.asset_receiver(a: UInt64 | int, /) → Account”32 byte address
Native TEAL opcode: gtxn, gtxns
static GTxn.asset_close_to(a: UInt64 | int, /) → Account
Section titled “static GTxn.asset_close_to(a: UInt64 | int, /) → Account”32 byte address
Native TEAL opcode: gtxn, gtxns
static GTxn.group_index(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.group_index(a: UInt64 | int, /) → UInt64”Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1
Native TEAL opcode: gtxn, gtxns
static GTxn.tx_id(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.tx_id(a: UInt64 | int, /) → Bytes”The computed ID for this transaction. 32 bytes.
Native TEAL opcode: gtxn, gtxns
static GTxn.application_id(a: UInt64 | int, /) → Application
Section titled “static GTxn.application_id(a: UInt64 | int, /) → Application”ApplicationID from ApplicationCall transaction
Native TEAL opcode: gtxn, gtxns
static GTxn.on_completion(a: UInt64 | int, /) → OnCompleteAction
Section titled “static GTxn.on_completion(a: UInt64 | int, /) → OnCompleteAction”ApplicationCall transaction on completion action
Native TEAL opcode: gtxn, gtxns
static GTxn.application_args(a: UInt64 | int, b: UInt64 | int, /) → Bytes
Section titled “static GTxn.application_args(a: UInt64 | int, b: UInt64 | int, /) → Bytes”Arguments passed to the application in the ApplicationCall transaction
Native TEAL opcode: gtxna, gtxnas, gtxnsa, gtxnsas
static GTxn.num_app_args(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.num_app_args(a: UInt64 | int, /) → UInt64”Number of ApplicationArgs
Native TEAL opcode: gtxn, gtxns
static GTxn.accounts(a: UInt64 | int, b: UInt64 | int, /) → Account
Section titled “static GTxn.accounts(a: UInt64 | int, b: UInt64 | int, /) → Account”Accounts listed in the ApplicationCall transaction
Native TEAL opcode: gtxna, gtxnas, gtxnsa, gtxnsas
static GTxn.num_accounts(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.num_accounts(a: UInt64 | int, /) → UInt64”Number of Accounts
Native TEAL opcode: gtxn, gtxns
static GTxn.approval_program(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.approval_program(a: UInt64 | int, /) → Bytes”Approval program
Native TEAL opcode: gtxn, gtxns
static GTxn.clear_state_program(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.clear_state_program(a: UInt64 | int, /) → Bytes”Clear state program
Native TEAL opcode: gtxn, gtxns
static GTxn.rekey_to(a: UInt64 | int, /) → Account
Section titled “static GTxn.rekey_to(a: UInt64 | int, /) → Account”32 byte Sender’s new AuthAddr
Native TEAL opcode: gtxn, gtxns
static GTxn.config_asset(a: UInt64 | int, /) → Asset
Section titled “static GTxn.config_asset(a: UInt64 | int, /) → Asset”Asset ID in asset config transaction
Native TEAL opcode: gtxn, gtxns
static GTxn.config_asset_total(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.config_asset_total(a: UInt64 | int, /) → UInt64”Total number of units of this asset created
Native TEAL opcode: gtxn, gtxns
static GTxn.config_asset_decimals(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.config_asset_decimals(a: UInt64 | int, /) → UInt64”Number of digits to display after the decimal place when displaying the asset
Native TEAL opcode: gtxn, gtxns
static GTxn.config_asset_default_frozen(a: UInt64 | int, /) → bool
Section titled “static GTxn.config_asset_default_frozen(a: UInt64 | int, /) → bool”Whether the asset’s slots are frozen by default or not, 0 or 1
Native TEAL opcode: gtxn, gtxns
static GTxn.config_asset_unit_name(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.config_asset_unit_name(a: UInt64 | int, /) → Bytes”Unit name of the asset
Native TEAL opcode: gtxn, gtxns
static GTxn.config_asset_name(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.config_asset_name(a: UInt64 | int, /) → Bytes”The asset name
Native TEAL opcode: gtxn, gtxns
static GTxn.config_asset_url(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.config_asset_url(a: UInt64 | int, /) → Bytes”URL
Native TEAL opcode: gtxn, gtxns
static GTxn.config_asset_metadata_hash(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.config_asset_metadata_hash(a: UInt64 | int, /) → Bytes”32 byte commitment to unspecified asset metadata
Native TEAL opcode: gtxn, gtxns
static GTxn.config_asset_manager(a: UInt64 | int, /) → Account
Section titled “static GTxn.config_asset_manager(a: UInt64 | int, /) → Account”32 byte address
Native TEAL opcode: gtxn, gtxns
static GTxn.config_asset_reserve(a: UInt64 | int, /) → Account
Section titled “static GTxn.config_asset_reserve(a: UInt64 | int, /) → Account”32 byte address
Native TEAL opcode: gtxn, gtxns
static GTxn.config_asset_freeze(a: UInt64 | int, /) → Account
Section titled “static GTxn.config_asset_freeze(a: UInt64 | int, /) → Account”32 byte address
Native TEAL opcode: gtxn, gtxns
static GTxn.config_asset_clawback(a: UInt64 | int, /) → Account
Section titled “static GTxn.config_asset_clawback(a: UInt64 | int, /) → Account”32 byte address
Native TEAL opcode: gtxn, gtxns
static GTxn.freeze_asset(a: UInt64 | int, /) → Asset
Section titled “static GTxn.freeze_asset(a: UInt64 | int, /) → Asset”Asset ID being frozen or un-frozen
Native TEAL opcode: gtxn, gtxns
static GTxn.freeze_asset_account(a: UInt64 | int, /) → Account
Section titled “static GTxn.freeze_asset_account(a: UInt64 | int, /) → Account”32 byte address of the account whose asset slot is being frozen or un-frozen
Native TEAL opcode: gtxn, gtxns
static GTxn.freeze_asset_frozen(a: UInt64 | int, /) → bool
Section titled “static GTxn.freeze_asset_frozen(a: UInt64 | int, /) → bool”The new frozen value, 0 or 1
Native TEAL opcode: gtxn, gtxns
static GTxn.assets(a: UInt64 | int, b: UInt64 | int, /) → Asset
Section titled “static GTxn.assets(a: UInt64 | int, b: UInt64 | int, /) → Asset”Foreign Assets listed in the ApplicationCall transaction
Native TEAL opcode: gtxna, gtxnas, gtxnsa, gtxnsas
static GTxn.num_assets(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.num_assets(a: UInt64 | int, /) → UInt64”Number of Assets
Native TEAL opcode: gtxn, gtxns
static GTxn.applications(a: UInt64 | int, b: UInt64 | int, /) → Application
Section titled “static GTxn.applications(a: UInt64 | int, b: UInt64 | int, /) → Application”Foreign Apps listed in the ApplicationCall transaction
Native TEAL opcode: gtxna, gtxnas, gtxnsa, gtxnsas
static GTxn.num_applications(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.num_applications(a: UInt64 | int, /) → UInt64”Number of Applications
Native TEAL opcode: gtxn, gtxns
static GTxn.global_num_uint(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.global_num_uint(a: UInt64 | int, /) → UInt64”Number of global state integers in ApplicationCall
Native TEAL opcode: gtxn, gtxns
static GTxn.global_num_byte_slice(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.global_num_byte_slice(a: UInt64 | int, /) → UInt64”Number of global state byteslices in ApplicationCall
Native TEAL opcode: gtxn, gtxns
static GTxn.local_num_uint(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.local_num_uint(a: UInt64 | int, /) → UInt64”Number of local state integers in ApplicationCall
Native TEAL opcode: gtxn, gtxns
static GTxn.local_num_byte_slice(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.local_num_byte_slice(a: UInt64 | int, /) → UInt64”Number of local state byteslices in ApplicationCall
Native TEAL opcode: gtxn, gtxns
static GTxn.extra_program_pages(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.extra_program_pages(a: UInt64 | int, /) → UInt64”Number of additional pages for each of the application’s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.
Native TEAL opcode: gtxn, gtxns
static GTxn.nonparticipation(a: UInt64 | int, /) → bool
Section titled “static GTxn.nonparticipation(a: UInt64 | int, /) → bool”Marks an account nonparticipating for rewards
Native TEAL opcode: gtxn, gtxns
static GTxn.logs(a: UInt64 | int, b: UInt64 | int, /) → Bytes
Section titled “static GTxn.logs(a: UInt64 | int, b: UInt64 | int, /) → Bytes”Log messages emitted by an application call (only with itxn in v5). Application mode only
Native TEAL opcode: gtxna, gtxnas, gtxnsa, gtxnsas
static GTxn.num_logs(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.num_logs(a: UInt64 | int, /) → UInt64”Number of Logs (only with itxn in v5). Application mode only
Native TEAL opcode: gtxn, gtxns
static GTxn.created_asset_id(a: UInt64 | int, /) → Asset
Section titled “static GTxn.created_asset_id(a: UInt64 | int, /) → Asset”Asset ID allocated by the creation of an ASA (only with itxn in v5). Application mode only
Native TEAL opcode: gtxn, gtxns
static GTxn.created_application_id(a: UInt64 | int, /) → Application
Section titled “static GTxn.created_application_id(a: UInt64 | int, /) → Application”ApplicationID allocated by the creation of an application (only with itxn in v5). Application mode only
Native TEAL opcode: gtxn, gtxns
static GTxn.last_log(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.last_log(a: UInt64 | int, /) → Bytes”The last message emitted. Empty bytes if none were emitted. Application mode only
Native TEAL opcode: gtxn, gtxns
static GTxn.state_proof_pk(a: UInt64 | int, /) → Bytes
Section titled “static GTxn.state_proof_pk(a: UInt64 | int, /) → Bytes”State proof public key
Native TEAL opcode: gtxn, gtxns
static GTxn.approval_program_pages(a: UInt64 | int, b: UInt64 | int, /) → Bytes
Section titled “static GTxn.approval_program_pages(a: UInt64 | int, b: UInt64 | int, /) → Bytes”Approval Program as an array of pages
Native TEAL opcode: gtxna, gtxnas, gtxnsa, gtxnsas
static GTxn.num_approval_program_pages(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.num_approval_program_pages(a: UInt64 | int, /) → UInt64”Number of Approval Program pages
Native TEAL opcode: gtxn, gtxns
static GTxn.clear_state_program_pages(a: UInt64 | int, b: UInt64 | int, /) → Bytes
Section titled “static GTxn.clear_state_program_pages(a: UInt64 | int, b: UInt64 | int, /) → Bytes”ClearState Program as an array of pages
Native TEAL opcode: gtxna, gtxnas, gtxnsa, gtxnsas
static GTxn.num_clear_state_program_pages(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.num_clear_state_program_pages(a: UInt64 | int, /) → UInt64”Number of ClearState Program pages
Native TEAL opcode: gtxn, gtxns
static GTxn.reject_version(a: UInt64 | int, /) → UInt64
Section titled “static GTxn.reject_version(a: UInt64 | int, /) → UInt64”Min AVM version: 12
- Returns UInt64: Application version for which the txn must reject
Native TEAL opcode: gtxn, gtxns
class Global
Section titled “class Global”Get Global values
Native TEAL op: global
Global.min_txn_fee : Final[UInt64]
Section titled “Global.min_txn_fee : Final[UInt64]”microalgos
Global.min_balance : Final[UInt64]
Section titled “Global.min_balance : Final[UInt64]”microalgos
Global.max_txn_life : Final[UInt64]
Section titled “Global.max_txn_life : Final[UInt64]”rounds
Global.zero_address : Final[Account]
Section titled “Global.zero_address : Final[Account]”32 byte address of all zero bytes
Global.group_size : Final[UInt64]
Section titled “Global.group_size : Final[UInt64]”Number of transactions in this atomic transaction group. At least 1
Global.logic_sig_version : Final[UInt64]
Section titled “Global.logic_sig_version : Final[UInt64]”Maximum supported version
Global.round : Final[UInt64]
Section titled “Global.round : Final[UInt64]”Current round number. Application mode only.
Global.latest_timestamp : Final[UInt64]
Section titled “Global.latest_timestamp : Final[UInt64]”Last confirmed block UNIX timestamp. Fails if negative. Application mode only.
Global.current_application_id : Final[Application]
Section titled “Global.current_application_id : Final[Application]”ID of current application executing. Application mode only.
Global.creator_address : Final[Account]
Section titled “Global.creator_address : Final[Account]”Address of the creator of the current application. Application mode only.
Global.current_application_address : Final[Account]
Section titled “Global.current_application_address : Final[Account]”Address that the current application controls. Application mode only.
Global.group_id : Final[Bytes]
Section titled “Global.group_id : Final[Bytes]”ID of the transaction group. 32 zero bytes if the transaction is not part of a group.
static Global.opcode_budget() → UInt64
Section titled “static Global.opcode_budget() → UInt64”The remaining cost that can be spent by opcodes in this program.
Native TEAL opcode: global
Global.caller_application_id : Final[UInt64]
Section titled “Global.caller_application_id : Final[UInt64]”The application ID of the application that called this application. 0 if this application is at the top-level. Application mode only.
Global.caller_application_address : Final[Account]
Section titled “Global.caller_application_address : Final[Account]”The application address of the application that called this application. ZeroAddress if this application is at the top-level. Application mode only.
Global.asset_create_min_balance : Final[UInt64]
Section titled “Global.asset_create_min_balance : Final[UInt64]”The additional minimum balance required to create (and opt-in to) an asset.
Global.asset_opt_in_min_balance : Final[UInt64]
Section titled “Global.asset_opt_in_min_balance : Final[UInt64]”The additional minimum balance required to opt-in to an asset.
Global.genesis_hash : Final[Bytes]
Section titled “Global.genesis_hash : Final[Bytes]”The Genesis Hash for the network.
Global.payouts_enabled : Final[bool]
Section titled “Global.payouts_enabled : Final[bool]”Whether block proposal payouts are enabled. Min AVM version: 11
Global.payouts_go_online_fee : Final[UInt64]
Section titled “Global.payouts_go_online_fee : Final[UInt64]”The fee required in a keyreg transaction to make an account incentive eligible. Min AVM version: 11
Global.payouts_percent : Final[UInt64]
Section titled “Global.payouts_percent : Final[UInt64]”The percentage of transaction fees in a block that can be paid to the block proposer. Min AVM version: 11
Global.payouts_min_balance : Final[UInt64]
Section titled “Global.payouts_min_balance : Final[UInt64]”The minimum balance an account must have in the agreement round to receive block payouts in the proposal round. Min AVM version: 11
Global.payouts_max_balance : Final[UInt64]
Section titled “Global.payouts_max_balance : Final[UInt64]”The maximum balance an account can have in the agreement round to receive block payouts in the proposal round. Min AVM version: 11
class ITxn
Section titled “class ITxn”Get values for the last inner transaction
Native TEAL ops: itxn, itxnas
static ITxn.sender() → Account
Section titled “static ITxn.sender() → Account”32 byte address
Native TEAL opcode: itxn
static ITxn.fee() → UInt64
Section titled “static ITxn.fee() → UInt64”microalgos
Native TEAL opcode: itxn
static ITxn.first_valid() → UInt64
Section titled “static ITxn.first_valid() → UInt64”round number
Native TEAL opcode: itxn
static ITxn.first_valid_time() → UInt64
Section titled “static ITxn.first_valid_time() → UInt64”UNIX timestamp of block before txn.FirstValid. Fails if negative
Native TEAL opcode: itxn
static ITxn.last_valid() → UInt64
Section titled “static ITxn.last_valid() → UInt64”round number
Native TEAL opcode: itxn
static ITxn.note() → Bytes
Section titled “static ITxn.note() → Bytes”Any data up to 1024 bytes
Native TEAL opcode: itxn
static ITxn.lease() → Bytes
Section titled “static ITxn.lease() → Bytes”32 byte lease value
Native TEAL opcode: itxn
static ITxn.receiver() → Account
Section titled “static ITxn.receiver() → Account”32 byte address
Native TEAL opcode: itxn
static ITxn.amount() → UInt64
Section titled “static ITxn.amount() → UInt64”microalgos
Native TEAL opcode: itxn
static ITxn.close_remainder_to() → Account
Section titled “static ITxn.close_remainder_to() → Account”32 byte address
Native TEAL opcode: itxn
static ITxn.vote_pk() → Bytes
Section titled “static ITxn.vote_pk() → Bytes”32 byte address
Native TEAL opcode: itxn
static ITxn.selection_pk() → Bytes
Section titled “static ITxn.selection_pk() → Bytes”32 byte address
Native TEAL opcode: itxn
static ITxn.vote_first() → UInt64
Section titled “static ITxn.vote_first() → UInt64”The first round that the participation key is valid.
Native TEAL opcode: itxn
static ITxn.vote_last() → UInt64
Section titled “static ITxn.vote_last() → UInt64”The last round that the participation key is valid.
Native TEAL opcode: itxn
static ITxn.vote_key_dilution() → UInt64
Section titled “static ITxn.vote_key_dilution() → UInt64”Dilution for the 2-level participation key
Native TEAL opcode: itxn
static ITxn.type() → Bytes
Section titled “static ITxn.type() → Bytes”Transaction type as bytes
Native TEAL opcode: itxn
static ITxn.type_enum() → TransactionType
Section titled “static ITxn.type_enum() → TransactionType”Transaction type as integer
Native TEAL opcode: itxn
static ITxn.xfer_asset() → Asset
Section titled “static ITxn.xfer_asset() → Asset”Asset ID
Native TEAL opcode: itxn
static ITxn.asset_amount() → UInt64
Section titled “static ITxn.asset_amount() → UInt64”value in Asset’s units
Native TEAL opcode: itxn
static ITxn.asset_sender() → Account
Section titled “static ITxn.asset_sender() → Account”32 byte address. Source of assets if Sender is the Asset’s Clawback address.
Native TEAL opcode: itxn
static ITxn.asset_receiver() → Account
Section titled “static ITxn.asset_receiver() → Account”32 byte address
Native TEAL opcode: itxn
static ITxn.asset_close_to() → Account
Section titled “static ITxn.asset_close_to() → Account”32 byte address
Native TEAL opcode: itxn
static ITxn.group_index() → UInt64
Section titled “static ITxn.group_index() → UInt64”Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1
Native TEAL opcode: itxn
static ITxn.tx_id() → Bytes
Section titled “static ITxn.tx_id() → Bytes”The computed ID for this transaction. 32 bytes.
Native TEAL opcode: itxn
static ITxn.application_id() → Application
Section titled “static ITxn.application_id() → Application”ApplicationID from ApplicationCall transaction
Native TEAL opcode: itxn
static ITxn.on_completion() → OnCompleteAction
Section titled “static ITxn.on_completion() → OnCompleteAction”ApplicationCall transaction on completion action
Native TEAL opcode: itxn
static ITxn.application_args(a: UInt64 | int, /) → Bytes
Section titled “static ITxn.application_args(a: UInt64 | int, /) → Bytes”Arguments passed to the application in the ApplicationCall transaction
Native TEAL opcode: itxna, itxnas
static ITxn.num_app_args() → UInt64
Section titled “static ITxn.num_app_args() → UInt64”Number of ApplicationArgs
Native TEAL opcode: itxn
static ITxn.accounts(a: UInt64 | int, /) → Account
Section titled “static ITxn.accounts(a: UInt64 | int, /) → Account”Accounts listed in the ApplicationCall transaction
Native TEAL opcode: itxna, itxnas
static ITxn.num_accounts() → UInt64
Section titled “static ITxn.num_accounts() → UInt64”Number of Accounts
Native TEAL opcode: itxn
static ITxn.approval_program() → Bytes
Section titled “static ITxn.approval_program() → Bytes”Approval program
Native TEAL opcode: itxn
static ITxn.clear_state_program() → Bytes
Section titled “static ITxn.clear_state_program() → Bytes”Clear state program
Native TEAL opcode: itxn
static ITxn.rekey_to() → Account
Section titled “static ITxn.rekey_to() → Account”32 byte Sender’s new AuthAddr
Native TEAL opcode: itxn
static ITxn.config_asset() → Asset
Section titled “static ITxn.config_asset() → Asset”Asset ID in asset config transaction
Native TEAL opcode: itxn
static ITxn.config_asset_total() → UInt64
Section titled “static ITxn.config_asset_total() → UInt64”Total number of units of this asset created
Native TEAL opcode: itxn
static ITxn.config_asset_decimals() → UInt64
Section titled “static ITxn.config_asset_decimals() → UInt64”Number of digits to display after the decimal place when displaying the asset
Native TEAL opcode: itxn
static ITxn.config_asset_default_frozen() → bool
Section titled “static ITxn.config_asset_default_frozen() → bool”Whether the asset’s slots are frozen by default or not, 0 or 1
Native TEAL opcode: itxn
static ITxn.config_asset_unit_name() → Bytes
Section titled “static ITxn.config_asset_unit_name() → Bytes”Unit name of the asset
Native TEAL opcode: itxn
static ITxn.config_asset_name() → Bytes
Section titled “static ITxn.config_asset_name() → Bytes”The asset name
Native TEAL opcode: itxn
static ITxn.config_asset_url() → Bytes
Section titled “static ITxn.config_asset_url() → Bytes”URL
Native TEAL opcode: itxn
static ITxn.config_asset_metadata_hash() → Bytes
Section titled “static ITxn.config_asset_metadata_hash() → Bytes”32 byte commitment to unspecified asset metadata
Native TEAL opcode: itxn
static ITxn.config_asset_manager() → Account
Section titled “static ITxn.config_asset_manager() → Account”32 byte address
Native TEAL opcode: itxn
static ITxn.config_asset_reserve() → Account
Section titled “static ITxn.config_asset_reserve() → Account”32 byte address
Native TEAL opcode: itxn
static ITxn.config_asset_freeze() → Account
Section titled “static ITxn.config_asset_freeze() → Account”32 byte address
Native TEAL opcode: itxn
static ITxn.config_asset_clawback() → Account
Section titled “static ITxn.config_asset_clawback() → Account”32 byte address
Native TEAL opcode: itxn
static ITxn.freeze_asset() → Asset
Section titled “static ITxn.freeze_asset() → Asset”Asset ID being frozen or un-frozen
Native TEAL opcode: itxn
static ITxn.freeze_asset_account() → Account
Section titled “static ITxn.freeze_asset_account() → Account”32 byte address of the account whose asset slot is being frozen or un-frozen
Native TEAL opcode: itxn
static ITxn.freeze_asset_frozen() → bool
Section titled “static ITxn.freeze_asset_frozen() → bool”The new frozen value, 0 or 1
Native TEAL opcode: itxn
static ITxn.assets(a: UInt64 | int, /) → Asset
Section titled “static ITxn.assets(a: UInt64 | int, /) → Asset”Foreign Assets listed in the ApplicationCall transaction
Native TEAL opcode: itxna, itxnas
static ITxn.num_assets() → UInt64
Section titled “static ITxn.num_assets() → UInt64”Number of Assets
Native TEAL opcode: itxn
static ITxn.applications(a: UInt64 | int, /) → Application
Section titled “static ITxn.applications(a: UInt64 | int, /) → Application”Foreign Apps listed in the ApplicationCall transaction
Native TEAL opcode: itxna, itxnas
static ITxn.num_applications() → UInt64
Section titled “static ITxn.num_applications() → UInt64”Number of Applications
Native TEAL opcode: itxn
static ITxn.global_num_uint() → UInt64
Section titled “static ITxn.global_num_uint() → UInt64”Number of global state integers in ApplicationCall
Native TEAL opcode: itxn
static ITxn.global_num_byte_slice() → UInt64
Section titled “static ITxn.global_num_byte_slice() → UInt64”Number of global state byteslices in ApplicationCall
Native TEAL opcode: itxn
static ITxn.local_num_uint() → UInt64
Section titled “static ITxn.local_num_uint() → UInt64”Number of local state integers in ApplicationCall
Native TEAL opcode: itxn
static ITxn.local_num_byte_slice() → UInt64
Section titled “static ITxn.local_num_byte_slice() → UInt64”Number of local state byteslices in ApplicationCall
Native TEAL opcode: itxn
static ITxn.extra_program_pages() → UInt64
Section titled “static ITxn.extra_program_pages() → UInt64”Number of additional pages for each of the application’s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.
Native TEAL opcode: itxn
static ITxn.nonparticipation() → bool
Section titled “static ITxn.nonparticipation() → bool”Marks an account nonparticipating for rewards
Native TEAL opcode: itxn
static ITxn.logs(a: UInt64 | int, /) → Bytes
Section titled “static ITxn.logs(a: UInt64 | int, /) → Bytes”Log messages emitted by an application call (only with itxn in v5). Application mode only
Native TEAL opcode: itxna, itxnas
static ITxn.num_logs() → UInt64
Section titled “static ITxn.num_logs() → UInt64”Number of Logs (only with itxn in v5). Application mode only
Native TEAL opcode: itxn
static ITxn.created_asset_id() → Asset
Section titled “static ITxn.created_asset_id() → Asset”Asset ID allocated by the creation of an ASA (only with itxn in v5). Application mode only
Native TEAL opcode: itxn
static ITxn.created_application_id() → Application
Section titled “static ITxn.created_application_id() → Application”ApplicationID allocated by the creation of an application (only with itxn in v5). Application mode only
Native TEAL opcode: itxn
static ITxn.last_log() → Bytes
Section titled “static ITxn.last_log() → Bytes”The last message emitted. Empty bytes if none were emitted. Application mode only
Native TEAL opcode: itxn
static ITxn.state_proof_pk() → Bytes
Section titled “static ITxn.state_proof_pk() → Bytes”State proof public key
Native TEAL opcode: itxn
static ITxn.approval_program_pages(a: UInt64 | int, /) → Bytes
Section titled “static ITxn.approval_program_pages(a: UInt64 | int, /) → Bytes”Approval Program as an array of pages
Native TEAL opcode: itxna, itxnas
static ITxn.num_approval_program_pages() → UInt64
Section titled “static ITxn.num_approval_program_pages() → UInt64”Number of Approval Program pages
Native TEAL opcode: itxn
static ITxn.clear_state_program_pages(a: UInt64 | int, /) → Bytes
Section titled “static ITxn.clear_state_program_pages(a: UInt64 | int, /) → Bytes”ClearState Program as an array of pages
Native TEAL opcode: itxna, itxnas
static ITxn.num_clear_state_program_pages() → UInt64
Section titled “static ITxn.num_clear_state_program_pages() → UInt64”Number of ClearState Program pages
Native TEAL opcode: itxn
static ITxn.reject_version() → UInt64
Section titled “static ITxn.reject_version() → UInt64”Min AVM version: 12
- Returns UInt64: Application version for which the txn must reject
Native TEAL opcode: itxn
class ITxnCreate
Section titled “class ITxnCreate”Create inner transactions
Native TEAL ops: itxn_begin, itxn_field, itxn_next, itxn_submit
static ITxnCreate.begin() → None
Section titled “static ITxnCreate.begin() → None”begin preparation of a new inner transaction in a new transaction group
itxn_begin initializes Sender to the application address; Fee to the minimum allowable, taking into account MinTxnFee and credit from overpaying in earlier transactions; FirstValid/LastValid to the values in the invoking transaction, and all other fields to zero or empty values.
Native TEAL opcode: itxn_begin
static ITxnCreate.next() → None
Section titled “static ITxnCreate.next() → None”begin preparation of a new inner transaction in the same transaction group
itxn_next initializes the transaction exactly as itxn_begin does
Native TEAL opcode: itxn_next
static ITxnCreate.submit() → None
Section titled “static ITxnCreate.submit() → None”execute the current inner transaction group. Fail if executing this group would exceed the inner transaction limit, or if any transaction in the group fails.
itxn_submit resets the current transaction so that it can not be resubmitted. A new itxn_begin is required to prepare another inner transaction.
Native TEAL opcode: itxn_submit
static ITxnCreate.set_sender(a: Account, /) → None
Section titled “static ITxnCreate.set_sender(a: Account, /) → None”- Parameters: a (Account) – 32 byte address
Native TEAL opcode: itxn_field
static ITxnCreate.set_fee(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_fee(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – microalgos
Native TEAL opcode: itxn_field
static ITxnCreate.set_note(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_note(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – Any data up to 1024 bytes
Native TEAL opcode: itxn_field
static ITxnCreate.set_receiver(a: Account, /) → None
Section titled “static ITxnCreate.set_receiver(a: Account, /) → None”- Parameters: a (Account) – 32 byte address
Native TEAL opcode: itxn_field
static ITxnCreate.set_amount(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_amount(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – microalgos
Native TEAL opcode: itxn_field
static ITxnCreate.set_close_remainder_to(a: Account, /) → None
Section titled “static ITxnCreate.set_close_remainder_to(a: Account, /) → None”- Parameters: a (Account) – 32 byte address
Native TEAL opcode: itxn_field
static ITxnCreate.set_vote_pk(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_vote_pk(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – 32 byte address
Native TEAL opcode: itxn_field
static ITxnCreate.set_selection_pk(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_selection_pk(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – 32 byte address
Native TEAL opcode: itxn_field
static ITxnCreate.set_vote_first(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_vote_first(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – The first round that the participation key is valid.
Native TEAL opcode: itxn_field
static ITxnCreate.set_vote_last(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_vote_last(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – The last round that the participation key is valid.
Native TEAL opcode: itxn_field
static ITxnCreate.set_vote_key_dilution(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_vote_key_dilution(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – Dilution for the 2-level participation key
Native TEAL opcode: itxn_field
static ITxnCreate.set_type(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_type(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – Transaction type as bytes
Native TEAL opcode: itxn_field
static ITxnCreate.set_type_enum(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_type_enum(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – Transaction type as integer
Native TEAL opcode: itxn_field
static ITxnCreate.set_xfer_asset(a: Asset | UInt64 | int, /) → None
Section titled “static ITxnCreate.set_xfer_asset(a: Asset | UInt64 | int, /) → None”Native TEAL opcode: itxn_field
static ITxnCreate.set_asset_amount(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_asset_amount(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – value in Asset’s units
Native TEAL opcode: itxn_field
static ITxnCreate.set_asset_sender(a: Account, /) → None
Section titled “static ITxnCreate.set_asset_sender(a: Account, /) → None”- Parameters: a (Account) – 32 byte address. Source of assets if Sender is the Asset’s Clawback address.
Native TEAL opcode: itxn_field
static ITxnCreate.set_asset_receiver(a: Account, /) → None
Section titled “static ITxnCreate.set_asset_receiver(a: Account, /) → None”- Parameters: a (Account) – 32 byte address
Native TEAL opcode: itxn_field
static ITxnCreate.set_asset_close_to(a: Account, /) → None
Section titled “static ITxnCreate.set_asset_close_to(a: Account, /) → None”- Parameters: a (Account) – 32 byte address
Native TEAL opcode: itxn_field
static ITxnCreate.set_application_id(a: Application | UInt64 | int, /) → None
Section titled “static ITxnCreate.set_application_id(a: Application | UInt64 | int, /) → None”- Parameters: a (Application | UInt64 | int) – ApplicationID from ApplicationCall transaction
Native TEAL opcode: itxn_field
static ITxnCreate.set_on_completion(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_on_completion(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – ApplicationCall transaction on completion action
Native TEAL opcode: itxn_field
static ITxnCreate.set_application_args(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_application_args(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – Arguments passed to the application in the ApplicationCall transaction
Native TEAL opcode: itxn_field
static ITxnCreate.set_accounts(a: Account, /) → None
Section titled “static ITxnCreate.set_accounts(a: Account, /) → None”- Parameters: a (Account) – Accounts listed in the ApplicationCall transaction
Native TEAL opcode: itxn_field
static ITxnCreate.set_approval_program(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_approval_program(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – Approval program
Native TEAL opcode: itxn_field
static ITxnCreate.set_clear_state_program(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_clear_state_program(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – Clear state program
Native TEAL opcode: itxn_field
static ITxnCreate.set_rekey_to(a: Account, /) → None
Section titled “static ITxnCreate.set_rekey_to(a: Account, /) → None”- Parameters: a (Account) – 32 byte Sender’s new AuthAddr
Native TEAL opcode: itxn_field
static ITxnCreate.set_config_asset(a: Asset | UInt64 | int, /) → None
Section titled “static ITxnCreate.set_config_asset(a: Asset | UInt64 | int, /) → None”Native TEAL opcode: itxn_field
static ITxnCreate.set_config_asset_total(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_config_asset_total(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – Total number of units of this asset created
Native TEAL opcode: itxn_field
static ITxnCreate.set_config_asset_decimals(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_config_asset_decimals(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – Number of digits to display after the decimal place when displaying the asset
Native TEAL opcode: itxn_field
static ITxnCreate.set_config_asset_default_frozen(a: bool, /) → None
Section titled “static ITxnCreate.set_config_asset_default_frozen(a: bool, /) → None”- Parameters: a (bool) – Whether the asset’s slots are frozen by default or not, 0 or 1
Native TEAL opcode: itxn_field
static ITxnCreate.set_config_asset_unit_name(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_config_asset_unit_name(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – Unit name of the asset
Native TEAL opcode: itxn_field
static ITxnCreate.set_config_asset_name(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_config_asset_name(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – The asset name
Native TEAL opcode: itxn_field
static ITxnCreate.set_config_asset_url(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_config_asset_url(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – URL
Native TEAL opcode: itxn_field
static ITxnCreate.set_config_asset_metadata_hash(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_config_asset_metadata_hash(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – 32 byte commitment to unspecified asset metadata
Native TEAL opcode: itxn_field
static ITxnCreate.set_config_asset_manager(a: Account, /) → None
Section titled “static ITxnCreate.set_config_asset_manager(a: Account, /) → None”- Parameters: a (Account) – 32 byte address
Native TEAL opcode: itxn_field
static ITxnCreate.set_config_asset_reserve(a: Account, /) → None
Section titled “static ITxnCreate.set_config_asset_reserve(a: Account, /) → None”- Parameters: a (Account) – 32 byte address
Native TEAL opcode: itxn_field
static ITxnCreate.set_config_asset_freeze(a: Account, /) → None
Section titled “static ITxnCreate.set_config_asset_freeze(a: Account, /) → None”- Parameters: a (Account) – 32 byte address
Native TEAL opcode: itxn_field
static ITxnCreate.set_config_asset_clawback(a: Account, /) → None
Section titled “static ITxnCreate.set_config_asset_clawback(a: Account, /) → None”- Parameters: a (Account) – 32 byte address
Native TEAL opcode: itxn_field
static ITxnCreate.set_freeze_asset(a: Asset | UInt64 | int, /) → None
Section titled “static ITxnCreate.set_freeze_asset(a: Asset | UInt64 | int, /) → None”Native TEAL opcode: itxn_field
static ITxnCreate.set_freeze_asset_account(a: Account, /) → None
Section titled “static ITxnCreate.set_freeze_asset_account(a: Account, /) → None”- Parameters: a (Account) – 32 byte address of the account whose asset slot is being frozen or un-frozen
Native TEAL opcode: itxn_field
static ITxnCreate.set_freeze_asset_frozen(a: bool, /) → None
Section titled “static ITxnCreate.set_freeze_asset_frozen(a: bool, /) → None”- Parameters: a (bool) – The new frozen value, 0 or 1
Native TEAL opcode: itxn_field
static ITxnCreate.set_assets(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_assets(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – Foreign Assets listed in the ApplicationCall transaction
Native TEAL opcode: itxn_field
static ITxnCreate.set_applications(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_applications(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – Foreign Apps listed in the ApplicationCall transaction
Native TEAL opcode: itxn_field
static ITxnCreate.set_global_num_uint(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_global_num_uint(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – Number of global state integers in ApplicationCall
Native TEAL opcode: itxn_field
static ITxnCreate.set_global_num_byte_slice(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_global_num_byte_slice(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – Number of global state byteslices in ApplicationCall
Native TEAL opcode: itxn_field
static ITxnCreate.set_local_num_uint(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_local_num_uint(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – Number of local state integers in ApplicationCall
Native TEAL opcode: itxn_field
static ITxnCreate.set_local_num_byte_slice(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_local_num_byte_slice(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – Number of local state byteslices in ApplicationCall
Native TEAL opcode: itxn_field
static ITxnCreate.set_extra_program_pages(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_extra_program_pages(a: UInt64 | int, /) → None”- Parameters: a (UInt64 | int) – Number of additional pages for each of the application’s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.
Native TEAL opcode: itxn_field
static ITxnCreate.set_nonparticipation(a: bool, /) → None
Section titled “static ITxnCreate.set_nonparticipation(a: bool, /) → None”- Parameters: a (bool) – Marks an account nonparticipating for rewards
Native TEAL opcode: itxn_field
static ITxnCreate.set_state_proof_pk(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_state_proof_pk(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – State proof public key
Native TEAL opcode: itxn_field
static ITxnCreate.set_approval_program_pages(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_approval_program_pages(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – Approval Program as an array of pages
Native TEAL opcode: itxn_field
static ITxnCreate.set_clear_state_program_pages(a: BytesBacked | bytes, /) → None
Section titled “static ITxnCreate.set_clear_state_program_pages(a: BytesBacked | bytes, /) → None”- Parameters: a (BytesBacked | bytes) – ClearState Program as an array of pages
Native TEAL opcode: itxn_field
static ITxnCreate.set_reject_version(a: UInt64 | int, /) → None
Section titled “static ITxnCreate.set_reject_version(a: UInt64 | int, /) → None”Min AVM version: 12
- Parameters: a (UInt64 | int) – Application version for which the txn must reject
Native TEAL opcode: itxn_field
class JsonRef
Section titled “class JsonRef”key B’s value, of type R, from a valid utf-8 encoded json object A Warning: Usage should be restricted to very rare use cases, as JSON decoding is expensive and quite limited. In addition, JSON objects are large and not optimized for size. Almost all smart contracts should use simpler and smaller methods (such as the ABI. This opcode should only be used in cases where JSON is only available option, e.g. when a third-party only signs JSON.
Native TEAL op: json_ref
static JsonRef.json_string(a: BytesBacked | bytes, b: BytesBacked | bytes, /) → Bytes
Section titled “static JsonRef.json_string(a: BytesBacked | bytes, b: BytesBacked | bytes, /) → Bytes”Native TEAL opcode: json_ref
static JsonRef.json_uint64(a: BytesBacked | bytes, b: BytesBacked | bytes, /) → UInt64
Section titled “static JsonRef.json_uint64(a: BytesBacked | bytes, b: BytesBacked | bytes, /) → UInt64”Native TEAL opcode: json_ref
static JsonRef.json_object(a: BytesBacked | bytes, b: BytesBacked | bytes, /) → Bytes
Section titled “static JsonRef.json_object(a: BytesBacked | bytes, b: BytesBacked | bytes, /) → Bytes”Native TEAL opcode: json_ref
class Scratch
Section titled “class Scratch”Load or store scratch values
Native TEAL ops: loads, stores
static Scratch.load_bytes(a: UInt64 | int, /) → Bytes
Section titled “static Scratch.load_bytes(a: UInt64 | int, /) → Bytes”Ath scratch space value. All scratch spaces are 0 at program start.
Native TEAL opcode: loads
static Scratch.load_uint64(a: UInt64 | int, /) → UInt64
Section titled “static Scratch.load_uint64(a: UInt64 | int, /) → UInt64”Ath scratch space value. All scratch spaces are 0 at program start.
Native TEAL opcode: loads
static Scratch.store(a: UInt64 | int, b: UInt64 | BytesBacked | int | bytes, /) → None
Section titled “static Scratch.store(a: UInt64 | int, b: UInt64 | BytesBacked | int | bytes, /) → None”store B to the Ath scratch space
Native TEAL opcode: stores
class Txn
Section titled “class Txn”Get values for the current executing transaction
Native TEAL ops: txn, txnas
Txn.sender : Final[Account]
Section titled “Txn.sender : Final[Account]”32 byte address
Txn.fee : Final[UInt64]
Section titled “Txn.fee : Final[UInt64]”microalgos
Txn.first_valid : Final[UInt64]
Section titled “Txn.first_valid : Final[UInt64]”round number
Txn.first_valid_time : Final[UInt64]
Section titled “Txn.first_valid_time : Final[UInt64]”UNIX timestamp of block before txn.FirstValid. Fails if negative
Txn.last_valid : Final[UInt64]
Section titled “Txn.last_valid : Final[UInt64]”round number
Txn.note : Final[Bytes]
Section titled “Txn.note : Final[Bytes]”Any data up to 1024 bytes
Txn.lease : Final[Bytes]
Section titled “Txn.lease : Final[Bytes]”32 byte lease value
Txn.receiver : Final[Account]
Section titled “Txn.receiver : Final[Account]”32 byte address
Txn.amount : Final[UInt64]
Section titled “Txn.amount : Final[UInt64]”microalgos
Txn.close_remainder_to : Final[Account]
Section titled “Txn.close_remainder_to : Final[Account]”32 byte address
Txn.vote_pk : Final[Bytes]
Section titled “Txn.vote_pk : Final[Bytes]”32 byte address
Txn.selection_pk : Final[Bytes]
Section titled “Txn.selection_pk : Final[Bytes]”32 byte address
Txn.vote_first : Final[UInt64]
Section titled “Txn.vote_first : Final[UInt64]”The first round that the participation key is valid.
Txn.vote_last : Final[UInt64]
Section titled “Txn.vote_last : Final[UInt64]”The last round that the participation key is valid.
Txn.vote_key_dilution : Final[UInt64]
Section titled “Txn.vote_key_dilution : Final[UInt64]”Dilution for the 2-level participation key
Txn.type : Final[Bytes]
Section titled “Txn.type : Final[Bytes]”Transaction type as bytes
Txn.type_enum : Final[TransactionType]
Section titled “Txn.type_enum : Final[TransactionType]”Transaction type as integer
Txn.xfer_asset : Final[Asset]
Section titled “Txn.xfer_asset : Final[Asset]”Asset ID
Txn.asset_amount : Final[UInt64]
Section titled “Txn.asset_amount : Final[UInt64]”value in Asset’s units
Txn.asset_sender : Final[Account]
Section titled “Txn.asset_sender : Final[Account]”32 byte address. Source of assets if Sender is the Asset’s Clawback address.
Txn.asset_receiver : Final[Account]
Section titled “Txn.asset_receiver : Final[Account]”32 byte address
Txn.asset_close_to : Final[Account]
Section titled “Txn.asset_close_to : Final[Account]”32 byte address
Txn.group_index : Final[UInt64]
Section titled “Txn.group_index : Final[UInt64]”Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1
Txn.tx_id : Final[Bytes]
Section titled “Txn.tx_id : Final[Bytes]”The computed ID for this transaction. 32 bytes.
Txn.application_id : Final[Application]
Section titled “Txn.application_id : Final[Application]”ApplicationID from ApplicationCall transaction
Txn.on_completion : Final[OnCompleteAction]
Section titled “Txn.on_completion : Final[OnCompleteAction]”ApplicationCall transaction on completion action
static Txn.application_args(a: UInt64 | int, /) → Bytes
Section titled “static Txn.application_args(a: UInt64 | int, /) → Bytes”Arguments passed to the application in the ApplicationCall transaction
Native TEAL opcode: txna, txnas
Txn.num_app_args : Final[UInt64]
Section titled “Txn.num_app_args : Final[UInt64]”Number of ApplicationArgs
static Txn.accounts(a: UInt64 | int, /) → Account
Section titled “static Txn.accounts(a: UInt64 | int, /) → Account”Accounts listed in the ApplicationCall transaction
Native TEAL opcode: txna, txnas
Txn.num_accounts : Final[UInt64]
Section titled “Txn.num_accounts : Final[UInt64]”Number of Accounts
Txn.approval_program : Final[Bytes]
Section titled “Txn.approval_program : Final[Bytes]”Approval program
Txn.clear_state_program : Final[Bytes]
Section titled “Txn.clear_state_program : Final[Bytes]”Clear state program
Txn.rekey_to : Final[Account]
Section titled “Txn.rekey_to : Final[Account]”32 byte Sender’s new AuthAddr
Txn.config_asset : Final[Asset]
Section titled “Txn.config_asset : Final[Asset]”Asset ID in asset config transaction
Txn.config_asset_total : Final[UInt64]
Section titled “Txn.config_asset_total : Final[UInt64]”Total number of units of this asset created
Txn.config_asset_decimals : Final[UInt64]
Section titled “Txn.config_asset_decimals : Final[UInt64]”Number of digits to display after the decimal place when displaying the asset
Txn.config_asset_default_frozen : Final[bool]
Section titled “Txn.config_asset_default_frozen : Final[bool]”Whether the asset’s slots are frozen by default or not, 0 or 1
Txn.config_asset_unit_name : Final[Bytes]
Section titled “Txn.config_asset_unit_name : Final[Bytes]”Unit name of the asset
Txn.config_asset_name : Final[Bytes]
Section titled “Txn.config_asset_name : Final[Bytes]”The asset name
Txn.config_asset_url : Final[Bytes]
Section titled “Txn.config_asset_url : Final[Bytes]”URL
Txn.config_asset_metadata_hash : Final[Bytes]
Section titled “Txn.config_asset_metadata_hash : Final[Bytes]”32 byte commitment to unspecified asset metadata
Txn.config_asset_manager : Final[Account]
Section titled “Txn.config_asset_manager : Final[Account]”32 byte address
Txn.config_asset_reserve : Final[Account]
Section titled “Txn.config_asset_reserve : Final[Account]”32 byte address
Txn.config_asset_freeze : Final[Account]
Section titled “Txn.config_asset_freeze : Final[Account]”32 byte address
Txn.config_asset_clawback : Final[Account]
Section titled “Txn.config_asset_clawback : Final[Account]”32 byte address
Txn.freeze_asset : Final[Asset]
Section titled “Txn.freeze_asset : Final[Asset]”Asset ID being frozen or un-frozen
Txn.freeze_asset_account : Final[Account]
Section titled “Txn.freeze_asset_account : Final[Account]”32 byte address of the account whose asset slot is being frozen or un-frozen
Txn.freeze_asset_frozen : Final[bool]
Section titled “Txn.freeze_asset_frozen : Final[bool]”The new frozen value, 0 or 1
static Txn.assets(a: UInt64 | int, /) → Asset
Section titled “static Txn.assets(a: UInt64 | int, /) → Asset”Foreign Assets listed in the ApplicationCall transaction
Native TEAL opcode: txna, txnas
Txn.num_assets : Final[UInt64]
Section titled “Txn.num_assets : Final[UInt64]”Number of Assets
static Txn.applications(a: UInt64 | int, /) → Application
Section titled “static Txn.applications(a: UInt64 | int, /) → Application”Foreign Apps listed in the ApplicationCall transaction
Native TEAL opcode: txna, txnas
Txn.num_applications : Final[UInt64]
Section titled “Txn.num_applications : Final[UInt64]”Number of Applications
Txn.global_num_uint : Final[UInt64]
Section titled “Txn.global_num_uint : Final[UInt64]”Number of global state integers in ApplicationCall
Txn.global_num_byte_slice : Final[UInt64]
Section titled “Txn.global_num_byte_slice : Final[UInt64]”Number of global state byteslices in ApplicationCall
Txn.local_num_uint : Final[UInt64]
Section titled “Txn.local_num_uint : Final[UInt64]”Number of local state integers in ApplicationCall
Txn.local_num_byte_slice : Final[UInt64]
Section titled “Txn.local_num_byte_slice : Final[UInt64]”Number of local state byteslices in ApplicationCall
Txn.extra_program_pages : Final[UInt64]
Section titled “Txn.extra_program_pages : Final[UInt64]”Number of additional pages for each of the application’s approval and clear state programs. An ExtraProgramPages of 1 means 2048 more total bytes, or 1024 for each program.
Txn.nonparticipation : Final[bool]
Section titled “Txn.nonparticipation : Final[bool]”Marks an account nonparticipating for rewards
static Txn.logs(a: UInt64 | int, /) → Bytes
Section titled “static Txn.logs(a: UInt64 | int, /) → Bytes”Log messages emitted by an application call (only with itxn in v5). Application mode only
Native TEAL opcode: txna, txnas
Txn.num_logs : Final[UInt64]
Section titled “Txn.num_logs : Final[UInt64]”Number of Logs (only with itxn in v5). Application mode only
Txn.created_asset_id : Final[Asset]
Section titled “Txn.created_asset_id : Final[Asset]”Asset ID allocated by the creation of an ASA (only with itxn in v5). Application mode only
Txn.created_application_id : Final[Application]
Section titled “Txn.created_application_id : Final[Application]”ApplicationID allocated by the creation of an application (only with itxn in v5). Application mode only
Txn.last_log : Final[Bytes]
Section titled “Txn.last_log : Final[Bytes]”The last message emitted. Empty bytes if none were emitted. Application mode only
Txn.state_proof_pk : Final[Bytes]
Section titled “Txn.state_proof_pk : Final[Bytes]”State proof public key
static Txn.approval_program_pages(a: UInt64 | int, /) → Bytes
Section titled “static Txn.approval_program_pages(a: UInt64 | int, /) → Bytes”Approval Program as an array of pages
Native TEAL opcode: txna, txnas
Txn.num_approval_program_pages : Final[UInt64]
Section titled “Txn.num_approval_program_pages : Final[UInt64]”Number of Approval Program pages
static Txn.clear_state_program_pages(a: UInt64 | int, /) → Bytes
Section titled “static Txn.clear_state_program_pages(a: UInt64 | int, /) → Bytes”ClearState Program as an array of pages
Native TEAL opcode: txna, txnas
Txn.num_clear_state_program_pages : Final[UInt64]
Section titled “Txn.num_clear_state_program_pages : Final[UInt64]”Number of ClearState Program pages
Txn.reject_version : Final[UInt64]
Section titled “Txn.reject_version : Final[UInt64]”Application version for which the txn must reject Min AVM version: 12
class VoterParamsGet
Section titled “class VoterParamsGet”X is field F from online account A as of the balance round: 320 rounds before the current round. Y is 1 if A had positive algos online in the agreement round, else Y is 0 and X is a type specific zero-value
Native TEAL op: voter_params_get
static VoterParamsGet.voter_balance(a: Account | UInt64 | int, /) → tuple[UInt64, bool]
Section titled “static VoterParamsGet.voter_balance(a: Account | UInt64 | int, /) → tuple[UInt64, bool]”Min AVM version: 11
- Returns tuple[UInt64, bool]: Online stake in microalgos
Native TEAL opcode: voter_params_get
static VoterParamsGet.voter_incentive_eligible(a: Account | UInt64 | int, /) → tuple[bool, bool]
Section titled “static VoterParamsGet.voter_incentive_eligible(a: Account | UInt64 | int, /) → tuple[bool, bool]”Min AVM version: 11
- Returns tuple[bool, bool]: Had this account opted into block payouts
Native TEAL opcode: voter_params_get