@algorandfoundation/algorand-typescript 1.0.0-beta.6 → 1.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs.map +1 -1
- package/op-Mj11EGRt.js.map +1 -1
- package/op-types.d.ts +2 -8
- package/package.json +1 -1
package/index.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/op-types.ts","../src/util.ts","../src/reference.ts","../src/box.ts","../src/state.ts","../src/itxn.ts","../src/gtxn.ts","../src/transactions.ts","../src/logic-sig.ts","../src/template-var.ts","../src/compiled.ts","../src/mutable-array.ts","../src/arc-28.ts"],"sourcesContent":["/* THIS FILE IS GENERATED BY ~/scripts/generate-op-types.ts - DO NOT MODIFY DIRECTLY */\nimport { bytes, uint64, biguint } from './primitives'\nimport { Account, Application, Asset } from './reference'\n\nexport enum Base64 {\n URLEncoding = 'URLEncoding',\n StdEncoding = 'StdEncoding',\n}\nexport enum Ec {\n BN254g1 = 'BN254g1',\n BN254g2 = 'BN254g2',\n BLS12_381g1 = 'BLS12_381g1',\n BLS12_381g2 = 'BLS12_381g2',\n}\nexport enum Ecdsa {\n Secp256k1 = 'Secp256k1',\n Secp256r1 = 'Secp256r1',\n}\nexport enum VrfVerify {\n VrfAlgorand = 'VrfAlgorand',\n}\nexport type AcctParamsType = {\n /**\n * Account balance in microalgos\n * Min AVM version: 6\n */\n acctBalance(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * Minimum required balance for account, in microalgos\n * Min AVM version: 6\n */\n acctMinBalance(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * Address the account is rekeyed to.\n * Min AVM version: 6\n */\n acctAuthAddr(a: Account | uint64): readonly [Account, boolean]\n\n /**\n * The total number of uint64 values allocated by this account in Global and Local States.\n * Min AVM version: 8\n */\n acctTotalNumUint(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The total number of byte array values allocated by this account in Global and Local States.\n * Min AVM version: 8\n */\n acctTotalNumByteSlice(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of extra app code pages used by this account.\n * Min AVM version: 8\n */\n acctTotalExtraAppPages(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of existing apps created by this account.\n * Min AVM version: 8\n */\n acctTotalAppsCreated(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of apps this account is opted into.\n * Min AVM version: 8\n */\n acctTotalAppsOptedIn(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of existing ASAs created by this account.\n * Min AVM version: 8\n */\n acctTotalAssetsCreated(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The numbers of ASAs held by this account (including ASAs this account created).\n * Min AVM version: 8\n */\n acctTotalAssets(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of existing boxes created by this account's app.\n * Min AVM version: 8\n */\n acctTotalBoxes(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The total number of bytes used by this account's app's box keys and values.\n * Min AVM version: 8\n */\n acctTotalBoxBytes(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * Has this account opted into block payouts\n * Min AVM version: 11\n */\n acctIncentiveEligible(a: Account | uint64): readonly [boolean, boolean]\n\n /**\n * The round number of the last block this account proposed.\n * Min AVM version: 11\n */\n acctLastProposed(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The round number of the last block this account sent a heartbeat.\n * Min AVM version: 11\n */\n acctLastHeartbeat(a: Account | uint64): readonly [uint64, boolean]\n}\n\n/**\n * A plus B as a 128-bit result. X is the carry-bit, Y is the low-order 64 bits.\n * @see Native TEAL opcode: [`addw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#addw)\n * Min AVM version: 2\n */\nexport type AddwType = (a: uint64, b: uint64) => readonly [uint64, uint64]\n\n/**\n * Get or modify Global app state\n */\nexport type AppGlobalType = {\n /**\n * delete key A from the global state of the current application\n * @param state key.\n * 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.)\n * @see Native TEAL opcode: [`app_global_del`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_del)\n * Min AVM version: 2\n */\n delete(a: bytes): void\n\n /**\n * global state of the key A in the current application\n * @param state key.\n * * @return value. The value is zero (of type uint64) if the key does not exist.\n * @see Native TEAL opcode: [`app_global_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_get)\n * Min AVM version: 2\n */\n getBytes(a: bytes): bytes\n\n /**\n * global state of the key A in the current application\n * @param state key.\n * * @return value. The value is zero (of type uint64) if the key does not exist.\n * @see Native TEAL opcode: [`app_global_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_get)\n * Min AVM version: 2\n */\n getUint64(a: bytes): uint64\n\n /**\n * X is the global state of application A, key B. Y is 1 if key existed, else 0\n * @param Txn.ForeignApps offset (or, since v4, an _available_ application id), state key.\n * * @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.\n * @see Native TEAL opcode: [`app_global_get_ex`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_get_ex)\n * Min AVM version: 2\n */\n getExBytes(a: Application | uint64, b: bytes): readonly [bytes, boolean]\n\n /**\n * X is the global state of application A, key B. Y is 1 if key existed, else 0\n * @param Txn.ForeignApps offset (or, since v4, an _available_ application id), state key.\n * * @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.\n * @see Native TEAL opcode: [`app_global_get_ex`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_get_ex)\n * Min AVM version: 2\n */\n getExUint64(a: Application | uint64, b: bytes): readonly [uint64, boolean]\n\n /**\n * write B to key A in the global state of the current application\n * @see Native TEAL opcode: [`app_global_put`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_put)\n * Min AVM version: 2\n */\n put(a: bytes, b: uint64 | bytes): void\n}\n\n/**\n * Get or modify Local app state\n */\nexport type AppLocalType = {\n /**\n * delete key B from account A's local state of the current application\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), state key.\n * 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.)\n * @see Native TEAL opcode: [`app_local_del`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_del)\n * Min AVM version: 2\n */\n delete(a: Account | uint64, b: bytes): void\n\n /**\n * local state of the key B in the current application in account A\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), state key.\n * * @return value. The value is zero (of type uint64) if the key does not exist.\n * @see Native TEAL opcode: [`app_local_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_get)\n * Min AVM version: 2\n */\n getBytes(a: Account | uint64, b: bytes): bytes\n\n /**\n * local state of the key B in the current application in account A\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), state key.\n * * @return value. The value is zero (of type uint64) if the key does not exist.\n * @see Native TEAL opcode: [`app_local_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_get)\n * Min AVM version: 2\n */\n getUint64(a: Account | uint64, b: bytes): uint64\n\n /**\n * X is the local state of application B, key C in account A. Y is 1 if key existed, else 0\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset), state key.\n * * @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.\n * @see Native TEAL opcode: [`app_local_get_ex`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_get_ex)\n * Min AVM version: 2\n */\n getExBytes(a: Account | uint64, b: Application | uint64, c: bytes): readonly [bytes, boolean]\n\n /**\n * X is the local state of application B, key C in account A. Y is 1 if key existed, else 0\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset), state key.\n * * @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.\n * @see Native TEAL opcode: [`app_local_get_ex`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_get_ex)\n * Min AVM version: 2\n */\n getExUint64(a: Account | uint64, b: Application | uint64, c: bytes): readonly [uint64, boolean]\n\n /**\n * write C to key B in account A's local state of the current application\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), state key, value.\n * @see Native TEAL opcode: [`app_local_put`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_put)\n * Min AVM version: 2\n */\n put(a: Account | uint64, b: bytes, c: uint64 | bytes): void\n}\n\n/**\n * 1 if account A is opted in to application B, else 0\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset).\n * * @return 1 if opted in and 0 otherwise.\n * @see Native TEAL opcode: [`app_opted_in`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_opted_in)\n * Min AVM version: 2\n */\nexport type AppOptedInType = (a: Account | uint64, b: Application | uint64) => boolean\nexport type AppParamsType = {\n /**\n * Bytecode of Approval Program\n * Min AVM version: 5\n */\n appApprovalProgram(a: Application | uint64): readonly [bytes, boolean]\n\n /**\n * Bytecode of Clear State Program\n * Min AVM version: 5\n */\n appClearStateProgram(a: Application | uint64): readonly [bytes, boolean]\n\n /**\n * Number of uint64 values allowed in Global State\n * Min AVM version: 5\n */\n appGlobalNumUint(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of byte array values allowed in Global State\n * Min AVM version: 5\n */\n appGlobalNumByteSlice(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of uint64 values allowed in Local State\n * Min AVM version: 5\n */\n appLocalNumUint(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of byte array values allowed in Local State\n * Min AVM version: 5\n */\n appLocalNumByteSlice(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of Extra Program Pages of code space\n * Min AVM version: 5\n */\n appExtraProgramPages(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Creator address\n * Min AVM version: 5\n */\n appCreator(a: Application | uint64): readonly [Account, boolean]\n\n /**\n * Address for which this application has authority\n * Min AVM version: 5\n */\n appAddress(a: Application | uint64): readonly [Account, boolean]\n}\n\n/**\n * Ath LogicSig argument\n * @see Native TEAL opcode: [`args`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#args)\n * Min AVM version: 5\n */\nexport type ArgType = (a: uint64) => bytes\nexport type AssetHoldingType = {\n /**\n * Amount of the asset unit held by this account\n * Min AVM version: 2\n */\n assetBalance(a: Account | uint64, b: Asset | uint64): readonly [uint64, boolean]\n\n /**\n * Is the asset frozen or not\n * Min AVM version: 2\n */\n assetFrozen(a: Account | uint64, b: Asset | uint64): readonly [boolean, boolean]\n}\nexport type AssetParamsType = {\n /**\n * Total number of units of this asset\n * Min AVM version: 2\n */\n assetTotal(a: Asset | uint64): readonly [uint64, boolean]\n\n /**\n * See AssetParams.Decimals\n * Min AVM version: 2\n */\n assetDecimals(a: Asset | uint64): readonly [uint64, boolean]\n\n /**\n * Frozen by default or not\n * Min AVM version: 2\n */\n assetDefaultFrozen(a: Asset | uint64): readonly [boolean, boolean]\n\n /**\n * Asset unit name\n * Min AVM version: 2\n */\n assetUnitName(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * Asset name\n * Min AVM version: 2\n */\n assetName(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * URL with additional info about the asset\n * Min AVM version: 2\n */\n assetUrl(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * Arbitrary commitment\n * Min AVM version: 2\n */\n assetMetadataHash(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * Manager address\n * Min AVM version: 2\n */\n assetManager(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Reserve address\n * Min AVM version: 2\n */\n assetReserve(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Freeze address\n * Min AVM version: 2\n */\n assetFreeze(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Clawback address\n * Min AVM version: 2\n */\n assetClawback(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Creator address\n * Min AVM version: 5\n */\n assetCreator(a: Asset | uint64): readonly [Account, boolean]\n}\n\n/**\n * 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`\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset).\n * * @return value.\n * @see Native TEAL opcode: [`balance`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#balance)\n * Min AVM version: 2\n */\nexport type BalanceType = (a: Account | uint64) => uint64\n\n/**\n * decode A which was base64-encoded using _encoding_ E. Fail if A is not base64 encoded with encoding E\n * *Warning*: Usage should be restricted to very rare use cases. In almost all cases, smart contracts should directly handle non-encoded byte-strings.\tThis 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.\n * 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](https://rfc-editor.org/rfc/rfc4648.html#section-4). 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 `\\n` and `\\r` are 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`.\n * @see Native TEAL opcode: [`base64_decode`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#base64_decode)\n * Min AVM version: 7\n */\nexport type Base64DecodeType = (e: Base64, a: bytes) => bytes\n\n/**\n * 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\n * bitlen interprets arrays as big-endian integers, unlike setbit/getbit\n * @see Native TEAL opcode: [`bitlen`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#bitlen)\n * Min AVM version: 4\n */\nexport type BitLengthType = (a: uint64 | bytes) => uint64\nexport type BlockType = {\n blkSeed(a: uint64): bytes\n blkTimestamp(a: uint64): uint64\n blkProposer(a: uint64): Account\n blkFeesCollected(a: uint64): uint64\n blkBonus(a: uint64): uint64\n blkBranch(a: uint64): bytes\n blkFeeSink(a: uint64): Account\n blkProtocol(a: uint64): bytes\n blkTxnCounter(a: uint64): uint64\n blkProposerPayout(a: uint64): uint64\n}\n\n/**\n * Get or modify box state\n */\nexport type BoxType = {\n /**\n * 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\n * 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`.\n * @see Native TEAL opcode: [`box_create`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_create)\n * Min AVM version: 8\n */\n create(a: bytes, b: uint64): boolean\n\n /**\n * delete box named A if it exists. Return 1 if A existed, 0 otherwise\n * @see Native TEAL opcode: [`box_del`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_del)\n * Min AVM version: 8\n */\n delete(a: bytes): boolean\n\n /**\n * 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.\n * @see Native TEAL opcode: [`box_extract`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_extract)\n * Min AVM version: 8\n */\n extract(a: bytes, b: uint64, c: uint64): bytes\n\n /**\n * X is the contents of box A if A exists, else ''. Y is 1 if A exists, else 0.\n * For boxes that exceed 4,096 bytes, consider `box_create`, `box_extract`, and `box_replace`\n * @see Native TEAL opcode: [`box_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_get)\n * Min AVM version: 8\n */\n get(a: bytes): readonly [bytes, boolean]\n\n /**\n * X is the length of box A if A exists, else 0. Y is 1 if A exists, else 0.\n * @see Native TEAL opcode: [`box_len`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_len)\n * Min AVM version: 8\n */\n length(a: bytes): readonly [uint64, boolean]\n\n /**\n * 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\n * For boxes that exceed 4,096 bytes, consider `box_create`, `box_extract`, and `box_replace`\n * @see Native TEAL opcode: [`box_put`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_put)\n * Min AVM version: 8\n */\n put(a: bytes, b: bytes): void\n\n /**\n * 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.\n * @see Native TEAL opcode: [`box_replace`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_replace)\n * Min AVM version: 8\n */\n replace(a: bytes, b: uint64, c: bytes): void\n\n /**\n * 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.\n * @see Native TEAL opcode: [`box_resize`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_resize)\n * Min AVM version: 10\n */\n resize(a: bytes, b: uint64): void\n\n /**\n * 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.\n * 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.\n * @see Native TEAL opcode: [`box_splice`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_splice)\n * Min AVM version: 10\n */\n splice(a: bytes, b: uint64, c: uint64, d: bytes): void\n}\n\n/**\n * The largest integer I such that I^2 <= A. A and I are interpreted as big-endian unsigned integers\n * @see Native TEAL opcode: [`bsqrt`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#bsqrt)\n * Min AVM version: 6\n */\nexport type BsqrtType = (a: biguint) => biguint\n\n/**\n * converts big-endian byte array A to uint64. Fails if len(A) > 8. Padded by leading 0s if len(A) < 8.\n * `btoi` fails if the input is longer than 8 bytes.\n * @see Native TEAL opcode: [`btoi`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#btoi)\n * Min AVM version: 1\n */\nexport type BtoiType = (a: bytes) => uint64\n\n/**\n * zero filled byte-array of length A\n * @see Native TEAL opcode: [`bzero`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#bzero)\n * Min AVM version: 4\n */\nexport type BzeroType = (a: uint64) => bytes\n\n/**\n * join A and B\n * `concat` fails if the result would be greater than 4096 bytes.\n * @see Native TEAL opcode: [`concat`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#concat)\n * Min AVM version: 2\n */\nexport type ConcatType = (a: bytes, b: bytes) => bytes\n\n/**\n * W,X = (A,B / C,D); Y,Z = (A,B modulo C,D)\n * 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.\n * @see Native TEAL opcode: [`divmodw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#divmodw)\n * Min AVM version: 4\n */\nexport type DivmodwType = (a: uint64, b: uint64, c: uint64, d: uint64) => readonly [uint64, uint64, uint64, uint64]\n\n/**\n * A,B / C. Fail if C == 0 or if result overflows.\n * 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.\n * @see Native TEAL opcode: [`divw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#divw)\n * Min AVM version: 6\n */\nexport type DivwType = (a: uint64, b: uint64, c: uint64) => uint64\n\n/**\n * Elliptic Curve functions\n */\nexport type EllipticCurveType = {\n /**\n * for curve points A and B, return the curve point A + B\n * A and B are curve points in affine representation: field element X concatenated with field element Y. Field element `Z` is encoded as follows.\n * For the base field elements (Fp), `Z` is encoded as a big-endian number and must be lower than the field modulus.\n * 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).\n * The point at infinity is encoded as `(X,Y) = (0,0)`.\n * Groups G1 and G2 are denoted additively.\n * Fails if A or B is not in G.\n * A and/or B are allowed to be the point at infinity.\n * Does _not_ check if A and B are in the main prime-order subgroup.\n * @see Native TEAL opcode: [`ec_add`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_add)\n * Min AVM version: 10\n */\n add(g: Ec, a: bytes, b: bytes): bytes\n\n /**\n * maps field element A to group G\n * BN254 points are mapped by the SVDW map. BLS12-381 points are mapped by the SSWU map.\n * 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.\n * @see Native TEAL opcode: [`ec_map_to`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_map_to)\n * Min AVM version: 10\n */\n mapTo(g: Ec, a: bytes): bytes\n\n /**\n * for curve points A and scalars B, return curve point B0A0 + B1A1 + B2A2 + ... + BnAn\n * 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.\n * 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.\n * @see Native TEAL opcode: [`ec_multi_scalar_mul`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_multi_scalar_mul)\n * Min AVM version: 10\n */\n scalarMulMulti(g: Ec, a: bytes, b: bytes): bytes\n\n /**\n * 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\n * 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.\n * @see Native TEAL opcode: [`ec_pairing_check`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_pairing_check)\n * Min AVM version: 10\n */\n pairingCheck(g: Ec, a: bytes, b: bytes): boolean\n\n /**\n * for curve point A and scalar B, return the curve point BA, the point A multiplied by the scalar B.\n * 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.\n * @see Native TEAL opcode: [`ec_scalar_mul`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_scalar_mul)\n * Min AVM version: 10\n */\n scalarMul(g: Ec, a: bytes, b: bytes): bytes\n\n /**\n * 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.\n * @see Native TEAL opcode: [`ec_subgroup_check`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_subgroup_check)\n * Min AVM version: 10\n */\n subgroupCheck(g: Ec, a: bytes): boolean\n}\n\n/**\n * decompress pubkey A into components X, Y\n * The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.\n * @see Native TEAL opcode: [`ecdsa_pk_decompress`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ecdsa_pk_decompress)\n * Min AVM version: 5\n */\nexport type EcdsaPkDecompressType = (v: Ecdsa, a: bytes) => readonly [bytes, bytes]\n\n/**\n * for (data A, recovery id B, signature C, D) recover a public key\n * 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.\n * @see Native TEAL opcode: [`ecdsa_pk_recover`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ecdsa_pk_recover)\n * Min AVM version: 5\n */\nexport type EcdsaPkRecoverType = (v: Ecdsa, a: bytes, b: uint64, c: bytes, d: bytes) => readonly [bytes, bytes]\n\n/**\n * for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1}\n * 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.\n * @see Native TEAL opcode: [`ecdsa_verify`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ecdsa_verify)\n * Min AVM version: 5\n */\nexport type EcdsaVerifyType = (v: Ecdsa, a: bytes, b: bytes, c: bytes, d: bytes, e: bytes) => boolean\n\n/**\n * for (data A, signature B, pubkey C) verify the signature of (\"ProgData\" || program_hash || data) against the pubkey => {0 or 1}\n * 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.\n * @see Native TEAL opcode: [`ed25519verify`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ed25519verify)\n * Min AVM version: 1\n */\nexport type Ed25519verifyType = (a: bytes, b: bytes, c: bytes) => boolean\n\n/**\n * for (data A, signature B, pubkey C) verify the signature of the data against the pubkey => {0 or 1}\n * @see Native TEAL opcode: [`ed25519verify_bare`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ed25519verify_bare)\n * Min AVM version: 7\n */\nexport type Ed25519verifyBareType = (a: bytes, b: bytes, c: bytes) => boolean\n\n/**\n * A raised to the Bth power. Fail if A == B == 0 and on overflow\n * @see Native TEAL opcode: [`exp`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#exp)\n * Min AVM version: 4\n */\nexport type ExpType = (a: uint64, b: uint64) => uint64\n\n/**\n * 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\n * @see Native TEAL opcode: [`expw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#expw)\n * Min AVM version: 4\n */\nexport type ExpwType = (a: uint64, b: uint64) => readonly [uint64, uint64]\n\n/**\n * 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\n * `extract3` can be called using `extract` with no immediates.\n * @see Native TEAL opcode: [`extract3`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract3)\n * Min AVM version: 5\n */\nexport type ExtractType = (a: bytes, b: uint64, c: uint64) => bytes\n\n/**\n * 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\n * @see Native TEAL opcode: [`extract_uint16`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract_uint16)\n * Min AVM version: 5\n */\nexport type ExtractUint16Type = (a: bytes, b: uint64) => uint64\n\n/**\n * 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\n * @see Native TEAL opcode: [`extract_uint32`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract_uint32)\n * Min AVM version: 5\n */\nexport type ExtractUint32Type = (a: bytes, b: uint64) => uint64\n\n/**\n * 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\n * @see Native TEAL opcode: [`extract_uint64`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract_uint64)\n * Min AVM version: 5\n */\nexport type ExtractUint64Type = (a: bytes, b: uint64) => uint64\n\n/**\n * for (data A, compressed-format signature B, pubkey C) verify the signature of data against the pubkey\n * @see Native TEAL opcode: [`falcon_verify`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#falcon_verify)\n * Min AVM version: 11\n */\nexport type FalconVerifyType = (a: bytes, b: bytes, c: bytes) => boolean\n\n/**\n * ID of the asset or application created in the Ath transaction of the current group\n * `gaids` fails unless the requested transaction created an asset or application and A < GroupIndex.\n * @see Native TEAL opcode: [`gaids`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#gaids)\n * Min AVM version: 4\n */\nexport type GaidType = (a: uint64) => uint64\n\n/**\n * 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\n * see explanation of bit ordering in setbit\n * @see Native TEAL opcode: [`getbit`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#getbit)\n * Min AVM version: 3\n */\nexport type GetBitType = (a: uint64 | bytes, b: uint64) => uint64\n\n/**\n * Bth byte of A, as an integer. If B is greater than or equal to the array length, the program fails\n * @see Native TEAL opcode: [`getbyte`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#getbyte)\n * Min AVM version: 3\n */\nexport type GetByteType = (a: bytes, b: uint64) => uint64\n\n/**\n * Get values for inner transaction in the last group submitted\n */\nexport type GITxnType = {\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n sender(t: uint64): Account\n\n /**\n * microalgos\n * Min AVM version: 6\n */\n fee(t: uint64): uint64\n\n /**\n * round number\n * Min AVM version: 6\n */\n firstValid(t: uint64): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n * Min AVM version: 7\n */\n firstValidTime(t: uint64): uint64\n\n /**\n * round number\n * Min AVM version: 6\n */\n lastValid(t: uint64): uint64\n\n /**\n * Any data up to 1024 bytes\n * Min AVM version: 6\n */\n note(t: uint64): bytes\n\n /**\n * 32 byte lease value\n * Min AVM version: 6\n */\n lease(t: uint64): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n receiver(t: uint64): Account\n\n /**\n * microalgos\n * Min AVM version: 6\n */\n amount(t: uint64): uint64\n\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n closeRemainderTo(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n votePk(t: uint64): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n selectionPk(t: uint64): bytes\n\n /**\n * The first round that the participation key is valid.\n * Min AVM version: 6\n */\n voteFirst(t: uint64): uint64\n\n /**\n * The last round that the participation key is valid.\n * Min AVM version: 6\n */\n voteLast(t: uint64): uint64\n\n /**\n * Dilution for the 2-level participation key\n * Min AVM version: 6\n */\n voteKeyDilution(t: uint64): uint64\n\n /**\n * Transaction type as bytes\n * Min AVM version: 6\n */\n type(t: uint64): bytes\n\n /**\n * Transaction type as integer\n * Min AVM version: 6\n */\n typeEnum(t: uint64): uint64\n\n /**\n * Asset ID\n * Min AVM version: 6\n */\n xferAsset(t: uint64): Asset\n\n /**\n * value in Asset's units\n * Min AVM version: 6\n */\n assetAmount(t: uint64): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n * Min AVM version: 6\n */\n assetSender(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n assetReceiver(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n assetCloseTo(t: uint64): Account\n\n /**\n * Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1\n * Min AVM version: 6\n */\n groupIndex(t: uint64): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n * Min AVM version: 6\n */\n txId(t: uint64): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n * Min AVM version: 2\n */\n applicationId(t: uint64): Application\n\n /**\n * ApplicationCall transaction on completion action\n * Min AVM version: 2\n */\n onCompletion(t: uint64): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * Min AVM version: 2\n */\n applicationArgs(t: uint64, a: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n * Min AVM version: 2\n */\n numAppArgs(t: uint64): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n * Min AVM version: 2\n */\n accounts(t: uint64, a: uint64): Account\n\n /**\n * Number of Accounts\n * Min AVM version: 2\n */\n numAccounts(t: uint64): uint64\n\n /**\n * Approval program\n * Min AVM version: 2\n */\n approvalProgram(t: uint64): bytes\n\n /**\n * Clear state program\n * Min AVM version: 2\n */\n clearStateProgram(t: uint64): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n * Min AVM version: 2\n */\n rekeyTo(t: uint64): Account\n\n /**\n * Asset ID in asset config transaction\n * Min AVM version: 2\n */\n configAsset(t: uint64): Asset\n\n /**\n * Total number of units of this asset created\n * Min AVM version: 2\n */\n configAssetTotal(t: uint64): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n * Min AVM version: 2\n */\n configAssetDecimals(t: uint64): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n * Min AVM version: 2\n */\n configAssetDefaultFrozen(t: uint64): boolean\n\n /**\n * Unit name of the asset\n * Min AVM version: 2\n */\n configAssetUnitName(t: uint64): bytes\n\n /**\n * The asset name\n * Min AVM version: 2\n */\n configAssetName(t: uint64): bytes\n\n /**\n * URL\n * Min AVM version: 2\n */\n configAssetUrl(t: uint64): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n * Min AVM version: 2\n */\n configAssetMetadataHash(t: uint64): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetManager(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetReserve(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetFreeze(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetClawback(t: uint64): Account\n\n /**\n * Asset ID being frozen or un-frozen\n * Min AVM version: 2\n */\n freezeAsset(t: uint64): Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n * Min AVM version: 2\n */\n freezeAssetAccount(t: uint64): Account\n\n /**\n * The new frozen value, 0 or 1\n * Min AVM version: 2\n */\n freezeAssetFrozen(t: uint64): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n assets(t: uint64, a: uint64): Asset\n\n /**\n * Number of Assets\n * Min AVM version: 3\n */\n numAssets(t: uint64): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n applications(t: uint64, a: uint64): Application\n\n /**\n * Number of Applications\n * Min AVM version: 3\n */\n numApplications(t: uint64): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n * Min AVM version: 3\n */\n globalNumUint(t: uint64): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n globalNumByteSlice(t: uint64): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n * Min AVM version: 3\n */\n localNumUint(t: uint64): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n localNumByteSlice(t: uint64): uint64\n\n /**\n * 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.\n * Min AVM version: 4\n */\n extraProgramPages(t: uint64): uint64\n\n /**\n * Marks an account nonparticipating for rewards\n * Min AVM version: 5\n */\n nonparticipation(t: uint64): boolean\n\n /**\n * Log messages emitted by an application call (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n logs(t: uint64, a: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n numLogs(t: uint64): uint64\n\n /**\n * Asset ID allocated by the creation of an ASA (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n createdAssetId(t: uint64): Asset\n\n /**\n * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n createdApplicationId(t: uint64): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n * Min AVM version: 6\n */\n lastLog(t: uint64): bytes\n\n /**\n * 64 byte state proof public key\n * Min AVM version: 6\n */\n stateProofPk(t: uint64): bytes\n\n /**\n * Approval Program as an array of pages\n * Min AVM version: 7\n */\n approvalProgramPages(t: uint64, a: uint64): bytes\n\n /**\n * Number of Approval Program pages\n * Min AVM version: 7\n */\n numApprovalProgramPages(t: uint64): uint64\n\n /**\n * ClearState Program as an array of pages\n * Min AVM version: 7\n */\n clearStateProgramPages(t: uint64, a: uint64): bytes\n\n /**\n * Number of ClearState Program pages\n * Min AVM version: 7\n */\n numClearStateProgramPages(t: uint64): uint64\n}\n\n/**\n * Bth scratch space value of the Ath transaction in the current group\n * @see Native TEAL opcode: [`gloadss`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#gloadss)\n * Min AVM version: 6\n */\nexport type GloadBytesType = (a: uint64, b: uint64) => bytes\n\n/**\n * Bth scratch space value of the Ath transaction in the current group\n * @see Native TEAL opcode: [`gloadss`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#gloadss)\n * Min AVM version: 6\n */\nexport type GloadUint64Type = (a: uint64, b: uint64) => uint64\nexport type GlobalType = {\n /**\n * microalgos\n * Min AVM version: 1\n */\n get minTxnFee(): uint64\n\n /**\n * microalgos\n * Min AVM version: 1\n */\n get minBalance(): uint64\n\n /**\n * rounds\n * Min AVM version: 1\n */\n get maxTxnLife(): uint64\n\n /**\n * 32 byte address of all zero bytes\n * Min AVM version: 1\n */\n get zeroAddress(): Account\n\n /**\n * Number of transactions in this atomic transaction group. At least 1\n * Min AVM version: 1\n */\n get groupSize(): uint64\n\n /**\n * Maximum supported version\n * Min AVM version: 2\n */\n get logicSigVersion(): uint64\n\n /**\n * Current round number. Application mode only.\n * Min AVM version: 2\n */\n get round(): uint64\n\n /**\n * Last confirmed block UNIX timestamp. Fails if negative. Application mode only.\n * Min AVM version: 2\n */\n get latestTimestamp(): uint64\n\n /**\n * ID of current application executing. Application mode only.\n * Min AVM version: 2\n */\n get currentApplicationId(): Application\n\n /**\n * Address of the creator of the current application. Application mode only.\n * Min AVM version: 3\n */\n get creatorAddress(): Account\n\n /**\n * Address that the current application controls. Application mode only.\n * Min AVM version: 5\n */\n get currentApplicationAddress(): Account\n\n /**\n * ID of the transaction group. 32 zero bytes if the transaction is not part of a group.\n * Min AVM version: 5\n */\n get groupId(): bytes\n\n /**\n * The remaining cost that can be spent by opcodes in this program.\n * Min AVM version: 6\n */\n get opcodeBudget(): uint64\n\n /**\n * The application ID of the application that called this application. 0 if this application is at the top-level. Application mode only.\n * Min AVM version: 6\n */\n get callerApplicationId(): uint64\n\n /**\n * The application address of the application that called this application. ZeroAddress if this application is at the top-level. Application mode only.\n * Min AVM version: 6\n */\n get callerApplicationAddress(): Account\n\n /**\n * The additional minimum balance required to create (and opt-in to) an asset.\n * Min AVM version: 10\n */\n get assetCreateMinBalance(): uint64\n\n /**\n * The additional minimum balance required to opt-in to an asset.\n * Min AVM version: 10\n */\n get assetOptInMinBalance(): uint64\n\n /**\n * The Genesis Hash for the network.\n * Min AVM version: 10\n */\n get genesisHash(): bytes\n\n /**\n * Whether block proposal payouts are enabled.\n * Min AVM version: 11\n */\n get payoutsEnabled(): boolean\n\n /**\n * The fee required in a keyreg transaction to make an account incentive eligible.\n * Min AVM version: 11\n */\n get payoutsGoOnlineFee(): uint64\n\n /**\n * The percentage of transaction fees in a block that can be paid to the block proposer.\n * Min AVM version: 11\n */\n get payoutsPercent(): uint64\n\n /**\n * The minimum algo balance an account must have in the agreement round to receive block payouts in the proposal round.\n * Min AVM version: 11\n */\n get payoutsMinBalance(): uint64\n\n /**\n * The maximum algo balance an account can have in the agreement round to receive block payouts in the proposal round.\n * Min AVM version: 11\n */\n get payoutsMaxBalance(): uint64\n}\n\n/**\n * Get values for transactions in the current group\n */\nexport type GTxnType = {\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n sender(t: uint64): Account\n\n /**\n * microalgos\n * Min AVM version: 1\n */\n fee(t: uint64): uint64\n\n /**\n * round number\n * Min AVM version: 1\n */\n firstValid(t: uint64): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n * Min AVM version: 7\n */\n firstValidTime(t: uint64): uint64\n\n /**\n * round number\n * Min AVM version: 1\n */\n lastValid(t: uint64): uint64\n\n /**\n * Any data up to 1024 bytes\n * Min AVM version: 1\n */\n note(t: uint64): bytes\n\n /**\n * 32 byte lease value\n * Min AVM version: 1\n */\n lease(t: uint64): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n receiver(t: uint64): Account\n\n /**\n * microalgos\n * Min AVM version: 1\n */\n amount(t: uint64): uint64\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n closeRemainderTo(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n votePk(t: uint64): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n selectionPk(t: uint64): bytes\n\n /**\n * The first round that the participation key is valid.\n * Min AVM version: 1\n */\n voteFirst(t: uint64): uint64\n\n /**\n * The last round that the participation key is valid.\n * Min AVM version: 1\n */\n voteLast(t: uint64): uint64\n\n /**\n * Dilution for the 2-level participation key\n * Min AVM version: 1\n */\n voteKeyDilution(t: uint64): uint64\n\n /**\n * Transaction type as bytes\n * Min AVM version: 1\n */\n type(t: uint64): bytes\n\n /**\n * Transaction type as integer\n * Min AVM version: 1\n */\n typeEnum(t: uint64): uint64\n\n /**\n * Asset ID\n * Min AVM version: 1\n */\n xferAsset(t: uint64): Asset\n\n /**\n * value in Asset's units\n * Min AVM version: 1\n */\n assetAmount(t: uint64): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n * Min AVM version: 1\n */\n assetSender(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n assetReceiver(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n assetCloseTo(t: uint64): Account\n\n /**\n * Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1\n * Min AVM version: 1\n */\n groupIndex(t: uint64): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n * Min AVM version: 1\n */\n txId(t: uint64): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n * Min AVM version: 2\n */\n applicationId(t: uint64): Application\n\n /**\n * ApplicationCall transaction on completion action\n * Min AVM version: 2\n */\n onCompletion(t: uint64): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * Min AVM version: 2\n */\n applicationArgs(a: uint64, b: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n * Min AVM version: 2\n */\n numAppArgs(t: uint64): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n * Min AVM version: 2\n */\n accounts(a: uint64, b: uint64): Account\n\n /**\n * Number of Accounts\n * Min AVM version: 2\n */\n numAccounts(t: uint64): uint64\n\n /**\n * Approval program\n * Min AVM version: 2\n */\n approvalProgram(t: uint64): bytes\n\n /**\n * Clear state program\n * Min AVM version: 2\n */\n clearStateProgram(t: uint64): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n * Min AVM version: 2\n */\n rekeyTo(t: uint64): Account\n\n /**\n * Asset ID in asset config transaction\n * Min AVM version: 2\n */\n configAsset(t: uint64): Asset\n\n /**\n * Total number of units of this asset created\n * Min AVM version: 2\n */\n configAssetTotal(t: uint64): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n * Min AVM version: 2\n */\n configAssetDecimals(t: uint64): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n * Min AVM version: 2\n */\n configAssetDefaultFrozen(t: uint64): boolean\n\n /**\n * Unit name of the asset\n * Min AVM version: 2\n */\n configAssetUnitName(t: uint64): bytes\n\n /**\n * The asset name\n * Min AVM version: 2\n */\n configAssetName(t: uint64): bytes\n\n /**\n * URL\n * Min AVM version: 2\n */\n configAssetUrl(t: uint64): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n * Min AVM version: 2\n */\n configAssetMetadataHash(t: uint64): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetManager(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetReserve(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetFreeze(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetClawback(t: uint64): Account\n\n /**\n * Asset ID being frozen or un-frozen\n * Min AVM version: 2\n */\n freezeAsset(t: uint64): Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n * Min AVM version: 2\n */\n freezeAssetAccount(t: uint64): Account\n\n /**\n * The new frozen value, 0 or 1\n * Min AVM version: 2\n */\n freezeAssetFrozen(t: uint64): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n assets(a: uint64, b: uint64): Asset\n\n /**\n * Number of Assets\n * Min AVM version: 3\n */\n numAssets(t: uint64): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n applications(a: uint64, b: uint64): Application\n\n /**\n * Number of Applications\n * Min AVM version: 3\n */\n numApplications(t: uint64): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n * Min AVM version: 3\n */\n globalNumUint(t: uint64): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n globalNumByteSlice(t: uint64): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n * Min AVM version: 3\n */\n localNumUint(t: uint64): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n localNumByteSlice(t: uint64): uint64\n\n /**\n * 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.\n * Min AVM version: 4\n */\n extraProgramPages(t: uint64): uint64\n\n /**\n * Marks an account nonparticipating for rewards\n * Min AVM version: 5\n */\n nonparticipation(t: uint64): boolean\n\n /**\n * Log messages emitted by an application call (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n logs(a: uint64, b: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n numLogs(t: uint64): uint64\n\n /**\n * Asset ID allocated by the creation of an ASA (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n createdAssetId(t: uint64): Asset\n\n /**\n * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n createdApplicationId(t: uint64): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n * Min AVM version: 6\n */\n lastLog(t: uint64): bytes\n\n /**\n * 64 byte state proof public key\n * Min AVM version: 6\n */\n stateProofPk(t: uint64): bytes\n\n /**\n * Approval Program as an array of pages\n * Min AVM version: 7\n */\n approvalProgramPages(a: uint64, b: uint64): bytes\n\n /**\n * Number of Approval Program pages\n * Min AVM version: 7\n */\n numApprovalProgramPages(t: uint64): uint64\n\n /**\n * ClearState Program as an array of pages\n * Min AVM version: 7\n */\n clearStateProgramPages(a: uint64, b: uint64): bytes\n\n /**\n * Number of ClearState Program pages\n * Min AVM version: 7\n */\n numClearStateProgramPages(t: uint64): uint64\n}\n\n/**\n * converts uint64 A to big-endian byte array, always of length 8\n * @see Native TEAL opcode: [`itob`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#itob)\n * Min AVM version: 1\n */\nexport type ItobType = (a: uint64) => bytes\n\n/**\n * Get values for the last inner transaction\n */\nexport type ITxnType = {\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get sender(): Account\n\n /**\n * microalgos\n * Min AVM version: 5\n */\n get fee(): uint64\n\n /**\n * round number\n * Min AVM version: 5\n */\n get firstValid(): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n * Min AVM version: 7\n */\n get firstValidTime(): uint64\n\n /**\n * round number\n * Min AVM version: 5\n */\n get lastValid(): uint64\n\n /**\n * Any data up to 1024 bytes\n * Min AVM version: 5\n */\n get note(): bytes\n\n /**\n * 32 byte lease value\n * Min AVM version: 5\n */\n get lease(): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get receiver(): Account\n\n /**\n * microalgos\n * Min AVM version: 5\n */\n get amount(): uint64\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get closeRemainderTo(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get votePk(): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get selectionPk(): bytes\n\n /**\n * The first round that the participation key is valid.\n * Min AVM version: 5\n */\n get voteFirst(): uint64\n\n /**\n * The last round that the participation key is valid.\n * Min AVM version: 5\n */\n get voteLast(): uint64\n\n /**\n * Dilution for the 2-level participation key\n * Min AVM version: 5\n */\n get voteKeyDilution(): uint64\n\n /**\n * Transaction type as bytes\n * Min AVM version: 5\n */\n get type(): bytes\n\n /**\n * Transaction type as integer\n * Min AVM version: 5\n */\n get typeEnum(): uint64\n\n /**\n * Asset ID\n * Min AVM version: 5\n */\n get xferAsset(): Asset\n\n /**\n * value in Asset's units\n * Min AVM version: 5\n */\n get assetAmount(): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n * Min AVM version: 5\n */\n get assetSender(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get assetReceiver(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get assetCloseTo(): Account\n\n /**\n * Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1\n * Min AVM version: 5\n */\n get groupIndex(): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n * Min AVM version: 5\n */\n get txId(): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n * Min AVM version: 2\n */\n get applicationId(): Application\n\n /**\n * ApplicationCall transaction on completion action\n * Min AVM version: 2\n */\n get onCompletion(): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * Min AVM version: 2\n */\n applicationArgs(a: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n * Min AVM version: 2\n */\n get numAppArgs(): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n * Min AVM version: 2\n */\n accounts(a: uint64): Account\n\n /**\n * Number of Accounts\n * Min AVM version: 2\n */\n get numAccounts(): uint64\n\n /**\n * Approval program\n * Min AVM version: 2\n */\n get approvalProgram(): bytes\n\n /**\n * Clear state program\n * Min AVM version: 2\n */\n get clearStateProgram(): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n * Min AVM version: 2\n */\n get rekeyTo(): Account\n\n /**\n * Asset ID in asset config transaction\n * Min AVM version: 2\n */\n get configAsset(): Asset\n\n /**\n * Total number of units of this asset created\n * Min AVM version: 2\n */\n get configAssetTotal(): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n * Min AVM version: 2\n */\n get configAssetDecimals(): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n * Min AVM version: 2\n */\n get configAssetDefaultFrozen(): boolean\n\n /**\n * Unit name of the asset\n * Min AVM version: 2\n */\n get configAssetUnitName(): bytes\n\n /**\n * The asset name\n * Min AVM version: 2\n */\n get configAssetName(): bytes\n\n /**\n * URL\n * Min AVM version: 2\n */\n get configAssetUrl(): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n * Min AVM version: 2\n */\n get configAssetMetadataHash(): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetManager(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetReserve(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetFreeze(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetClawback(): Account\n\n /**\n * Asset ID being frozen or un-frozen\n * Min AVM version: 2\n */\n get freezeAsset(): Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n * Min AVM version: 2\n */\n get freezeAssetAccount(): Account\n\n /**\n * The new frozen value, 0 or 1\n * Min AVM version: 2\n */\n get freezeAssetFrozen(): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n assets(a: uint64): Asset\n\n /**\n * Number of Assets\n * Min AVM version: 3\n */\n get numAssets(): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n applications(a: uint64): Application\n\n /**\n * Number of Applications\n * Min AVM version: 3\n */\n get numApplications(): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n * Min AVM version: 3\n */\n get globalNumUint(): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n get globalNumByteSlice(): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n * Min AVM version: 3\n */\n get localNumUint(): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n get localNumByteSlice(): uint64\n\n /**\n * 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.\n * Min AVM version: 4\n */\n get extraProgramPages(): uint64\n\n /**\n * Marks an account nonparticipating for rewards\n * Min AVM version: 5\n */\n get nonparticipation(): boolean\n\n /**\n * Log messages emitted by an application call (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n logs(a: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n get numLogs(): uint64\n\n /**\n * Asset ID allocated by the creation of an ASA (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n get createdAssetId(): Asset\n\n /**\n * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n get createdApplicationId(): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n * Min AVM version: 6\n */\n get lastLog(): bytes\n\n /**\n * 64 byte state proof public key\n * Min AVM version: 6\n */\n get stateProofPk(): bytes\n\n /**\n * Approval Program as an array of pages\n * Min AVM version: 7\n */\n approvalProgramPages(a: uint64): bytes\n\n /**\n * Number of Approval Program pages\n * Min AVM version: 7\n */\n get numApprovalProgramPages(): uint64\n\n /**\n * ClearState Program as an array of pages\n * Min AVM version: 7\n */\n clearStateProgramPages(a: uint64): bytes\n\n /**\n * Number of ClearState Program pages\n * Min AVM version: 7\n */\n get numClearStateProgramPages(): uint64\n}\n\n/**\n * Create inner transactions\n */\nexport type ITxnCreateType = {\n /**\n * begin preparation of a new inner transaction in a new transaction group\n * `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.\n * @see Native TEAL opcode: [`itxn_begin`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#itxn_begin)\n * Min AVM version: 5\n */\n begin(): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setSender(a: Account): void\n\n /**\n * microalgos\n * Min AVM version: 5\n */\n setFee(a: uint64): void\n\n /**\n * Any data up to 1024 bytes\n * Min AVM version: 5\n */\n setNote(a: bytes): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setReceiver(a: Account): void\n\n /**\n * microalgos\n * Min AVM version: 5\n */\n setAmount(a: uint64): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setCloseRemainderTo(a: Account): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setVotePk(a: bytes): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setSelectionPk(a: bytes): void\n\n /**\n * The first round that the participation key is valid.\n * Min AVM version: 5\n */\n setVoteFirst(a: uint64): void\n\n /**\n * The last round that the participation key is valid.\n * Min AVM version: 5\n */\n setVoteLast(a: uint64): void\n\n /**\n * Dilution for the 2-level participation key\n * Min AVM version: 5\n */\n setVoteKeyDilution(a: uint64): void\n\n /**\n * Transaction type as bytes\n * Min AVM version: 5\n */\n setType(a: bytes): void\n\n /**\n * Transaction type as integer\n * Min AVM version: 5\n */\n setTypeEnum(a: uint64): void\n\n /**\n * Asset ID\n * Min AVM version: 5\n */\n setXferAsset(a: Asset | uint64): void\n\n /**\n * value in Asset's units\n * Min AVM version: 5\n */\n setAssetAmount(a: uint64): void\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n * Min AVM version: 5\n */\n setAssetSender(a: Account): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setAssetReceiver(a: Account): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setAssetCloseTo(a: Account): void\n\n /**\n * ApplicationID from ApplicationCall transaction\n * Min AVM version: 2\n */\n setApplicationId(a: Application | uint64): void\n\n /**\n * ApplicationCall transaction on completion action\n * Min AVM version: 2\n */\n setOnCompletion(a: uint64): void\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * Min AVM version: 2\n */\n setApplicationArgs(a: bytes): void\n\n /**\n * Accounts listed in the ApplicationCall transaction\n * Min AVM version: 2\n */\n setAccounts(a: Account): void\n\n /**\n * Approval program\n * Min AVM version: 2\n */\n setApprovalProgram(a: bytes): void\n\n /**\n * Clear state program\n * Min AVM version: 2\n */\n setClearStateProgram(a: bytes): void\n\n /**\n * 32 byte Sender's new AuthAddr\n * Min AVM version: 2\n */\n setRekeyTo(a: Account): void\n\n /**\n * Asset ID in asset config transaction\n * Min AVM version: 2\n */\n setConfigAsset(a: Asset | uint64): void\n\n /**\n * Total number of units of this asset created\n * Min AVM version: 2\n */\n setConfigAssetTotal(a: uint64): void\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n * Min AVM version: 2\n */\n setConfigAssetDecimals(a: uint64): void\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n * Min AVM version: 2\n */\n setConfigAssetDefaultFrozen(a: boolean): void\n\n /**\n * Unit name of the asset\n * Min AVM version: 2\n */\n setConfigAssetUnitName(a: bytes): void\n\n /**\n * The asset name\n * Min AVM version: 2\n */\n setConfigAssetName(a: bytes): void\n\n /**\n * URL\n * Min AVM version: 2\n */\n setConfigAssetUrl(a: bytes): void\n\n /**\n * 32 byte commitment to unspecified asset metadata\n * Min AVM version: 2\n */\n setConfigAssetMetadataHash(a: bytes): void\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n setConfigAssetManager(a: Account): void\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n setConfigAssetReserve(a: Account): void\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n setConfigAssetFreeze(a: Account): void\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n setConfigAssetClawback(a: Account): void\n\n /**\n * Asset ID being frozen or un-frozen\n * Min AVM version: 2\n */\n setFreezeAsset(a: Asset | uint64): void\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n * Min AVM version: 2\n */\n setFreezeAssetAccount(a: Account): void\n\n /**\n * The new frozen value, 0 or 1\n * Min AVM version: 2\n */\n setFreezeAssetFrozen(a: boolean): void\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n setAssets(a: uint64): void\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n setApplications(a: uint64): void\n\n /**\n * Number of global state integers in ApplicationCall\n * Min AVM version: 3\n */\n setGlobalNumUint(a: uint64): void\n\n /**\n * Number of global state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n setGlobalNumByteSlice(a: uint64): void\n\n /**\n * Number of local state integers in ApplicationCall\n * Min AVM version: 3\n */\n setLocalNumUint(a: uint64): void\n\n /**\n * Number of local state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n setLocalNumByteSlice(a: uint64): void\n\n /**\n * 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.\n * Min AVM version: 4\n */\n setExtraProgramPages(a: uint64): void\n\n /**\n * Marks an account nonparticipating for rewards\n * Min AVM version: 5\n */\n setNonparticipation(a: boolean): void\n\n /**\n * 64 byte state proof public key\n * Min AVM version: 6\n */\n setStateProofPk(a: bytes): void\n\n /**\n * Approval Program as an array of pages\n * Min AVM version: 7\n */\n setApprovalProgramPages(a: bytes): void\n\n /**\n * ClearState Program as an array of pages\n * Min AVM version: 7\n */\n setClearStateProgramPages(a: bytes): void\n\n /**\n * begin preparation of a new inner transaction in the same transaction group\n * `itxn_next` initializes the transaction exactly as `itxn_begin` does\n * @see Native TEAL opcode: [`itxn_next`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#itxn_next)\n * Min AVM version: 6\n */\n next(): void\n\n /**\n * 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.\n * `itxn_submit` resets the current transaction so that it can not be resubmitted. A new `itxn_begin` is required to prepare another inner transaction.\n * @see Native TEAL opcode: [`itxn_submit`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#itxn_submit)\n * Min AVM version: 5\n */\n submit(): void\n}\nexport type JsonRefType = {\n jsonString(a: bytes, b: bytes): bytes\n jsonUint64(a: bytes, b: bytes): uint64\n jsonObject(a: bytes, b: bytes): bytes\n}\n\n/**\n * Keccak256 hash of value A, yields [32]byte\n * @see Native TEAL opcode: [`keccak256`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#keccak256)\n * Min AVM version: 1\n */\nexport type Keccak256Type = (a: bytes) => bytes\n\n/**\n * yields length of byte value A\n * @see Native TEAL opcode: [`len`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#len)\n * Min AVM version: 1\n */\nexport type LenType = (a: bytes) => uint64\n\n/**\n * Load or store scratch values\n */\nexport type ScratchType = {\n /**\n * Ath scratch space value. All scratch spaces are 0 at program start.\n * @see Native TEAL opcode: [`loads`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#loads)\n * Min AVM version: 5\n */\n loadBytes(a: uint64): bytes\n\n /**\n * Ath scratch space value. All scratch spaces are 0 at program start.\n * @see Native TEAL opcode: [`loads`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#loads)\n * Min AVM version: 5\n */\n loadUint64(a: uint64): uint64\n\n /**\n * store B to the Ath scratch space\n * @see Native TEAL opcode: [`stores`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#stores)\n * Min AVM version: 5\n */\n store(a: uint64, b: uint64 | bytes): void\n}\n\n/**\n * 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.\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset).\n * * @return value.\n * @see Native TEAL opcode: [`min_balance`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#min_balance)\n * Min AVM version: 3\n */\nexport type MinBalanceType = (a: Account | uint64) => uint64\n\n/**\n * A times B as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low\n * @see Native TEAL opcode: [`mulw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#mulw)\n * Min AVM version: 1\n */\nexport type MulwType = (a: uint64, b: uint64) => readonly [uint64, uint64]\n\n/**\n * the total online stake in the agreement round\n * @see Native TEAL opcode: [`online_stake`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#online_stake)\n * Min AVM version: 11\n */\nexport type OnlineStakeType = () => uint64\n\n/**\n * Copy of A with the bytes starting at B replaced by the bytes of C. Fails if B+len(C) exceeds len(A)\n * `replace3` can be called using `replace` with no immediates.\n * @see Native TEAL opcode: [`replace3`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#replace3)\n * Min AVM version: 7\n */\nexport type ReplaceType = (a: bytes, b: uint64, c: bytes) => bytes\n\n/**\n * 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\n * @see Native TEAL opcode: [`setbyte`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#setbyte)\n * Min AVM version: 3\n */\nexport type SetByteType = (a: bytes, b: uint64, c: uint64) => bytes\n\n/**\n * SHA256 hash of value A, yields [32]byte\n * @see Native TEAL opcode: [`sha256`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sha256)\n * Min AVM version: 1\n */\nexport type Sha256Type = (a: bytes) => bytes\n\n/**\n * SHA3_256 hash of value A, yields [32]byte\n * @see Native TEAL opcode: [`sha3_256`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sha3_256)\n * Min AVM version: 7\n */\nexport type Sha3_256Type = (a: bytes) => bytes\n\n/**\n * SHA512_256 hash of value A, yields [32]byte\n * @see Native TEAL opcode: [`sha512_256`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sha512_256)\n * Min AVM version: 1\n */\nexport type Sha512_256Type = (a: bytes) => bytes\n\n/**\n * A times 2^B, modulo 2^64\n * @see Native TEAL opcode: [`shl`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#shl)\n * Min AVM version: 4\n */\nexport type ShlType = (a: uint64, b: uint64) => uint64\n\n/**\n * A divided by 2^B\n * @see Native TEAL opcode: [`shr`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#shr)\n * Min AVM version: 4\n */\nexport type ShrType = (a: uint64, b: uint64) => uint64\n\n/**\n * The largest integer I such that I^2 <= A\n * @see Native TEAL opcode: [`sqrt`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sqrt)\n * Min AVM version: 4\n */\nexport type SqrtType = (a: uint64) => uint64\n\n/**\n * 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\n * @see Native TEAL opcode: [`substring3`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#substring3)\n * Min AVM version: 2\n */\nexport type SubstringType = (a: bytes, b: uint64, c: uint64) => bytes\n\n/**\n * sumhash512 of value A, yields [64]byte\n * @see Native TEAL opcode: [`sumhash512`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sumhash512)\n * Min AVM version: 11\n */\nexport type Sumhash512Type = (a: bytes) => bytes\n\n/**\n * Get values for the current executing transaction\n */\nexport type TxnType = {\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get sender(): Account\n\n /**\n * microalgos\n * Min AVM version: 1\n */\n get fee(): uint64\n\n /**\n * round number\n * Min AVM version: 1\n */\n get firstValid(): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n * Min AVM version: 7\n */\n get firstValidTime(): uint64\n\n /**\n * round number\n * Min AVM version: 1\n */\n get lastValid(): uint64\n\n /**\n * Any data up to 1024 bytes\n * Min AVM version: 1\n */\n get note(): bytes\n\n /**\n * 32 byte lease value\n * Min AVM version: 1\n */\n get lease(): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get receiver(): Account\n\n /**\n * microalgos\n * Min AVM version: 1\n */\n get amount(): uint64\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get closeRemainderTo(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get votePk(): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get selectionPk(): bytes\n\n /**\n * The first round that the participation key is valid.\n * Min AVM version: 1\n */\n get voteFirst(): uint64\n\n /**\n * The last round that the participation key is valid.\n * Min AVM version: 1\n */\n get voteLast(): uint64\n\n /**\n * Dilution for the 2-level participation key\n * Min AVM version: 1\n */\n get voteKeyDilution(): uint64\n\n /**\n * Transaction type as bytes\n * Min AVM version: 1\n */\n get type(): bytes\n\n /**\n * Transaction type as integer\n * Min AVM version: 1\n */\n get typeEnum(): uint64\n\n /**\n * Asset ID\n * Min AVM version: 1\n */\n get xferAsset(): Asset\n\n /**\n * value in Asset's units\n * Min AVM version: 1\n */\n get assetAmount(): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n * Min AVM version: 1\n */\n get assetSender(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get assetReceiver(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get assetCloseTo(): Account\n\n /**\n * Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1\n * Min AVM version: 1\n */\n get groupIndex(): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n * Min AVM version: 1\n */\n get txId(): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n * Min AVM version: 2\n */\n get applicationId(): Application\n\n /**\n * ApplicationCall transaction on completion action\n * Min AVM version: 2\n */\n get onCompletion(): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * Min AVM version: 2\n */\n applicationArgs(a: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n * Min AVM version: 2\n */\n get numAppArgs(): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n * Min AVM version: 2\n */\n accounts(a: uint64): Account\n\n /**\n * Number of Accounts\n * Min AVM version: 2\n */\n get numAccounts(): uint64\n\n /**\n * Approval program\n * Min AVM version: 2\n */\n get approvalProgram(): bytes\n\n /**\n * Clear state program\n * Min AVM version: 2\n */\n get clearStateProgram(): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n * Min AVM version: 2\n */\n get rekeyTo(): Account\n\n /**\n * Asset ID in asset config transaction\n * Min AVM version: 2\n */\n get configAsset(): Asset\n\n /**\n * Total number of units of this asset created\n * Min AVM version: 2\n */\n get configAssetTotal(): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n * Min AVM version: 2\n */\n get configAssetDecimals(): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n * Min AVM version: 2\n */\n get configAssetDefaultFrozen(): boolean\n\n /**\n * Unit name of the asset\n * Min AVM version: 2\n */\n get configAssetUnitName(): bytes\n\n /**\n * The asset name\n * Min AVM version: 2\n */\n get configAssetName(): bytes\n\n /**\n * URL\n * Min AVM version: 2\n */\n get configAssetUrl(): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n * Min AVM version: 2\n */\n get configAssetMetadataHash(): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetManager(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetReserve(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetFreeze(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetClawback(): Account\n\n /**\n * Asset ID being frozen or un-frozen\n * Min AVM version: 2\n */\n get freezeAsset(): Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n * Min AVM version: 2\n */\n get freezeAssetAccount(): Account\n\n /**\n * The new frozen value, 0 or 1\n * Min AVM version: 2\n */\n get freezeAssetFrozen(): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n assets(a: uint64): Asset\n\n /**\n * Number of Assets\n * Min AVM version: 3\n */\n get numAssets(): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n applications(a: uint64): Application\n\n /**\n * Number of Applications\n * Min AVM version: 3\n */\n get numApplications(): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n * Min AVM version: 3\n */\n get globalNumUint(): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n get globalNumByteSlice(): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n * Min AVM version: 3\n */\n get localNumUint(): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n get localNumByteSlice(): uint64\n\n /**\n * 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.\n * Min AVM version: 4\n */\n get extraProgramPages(): uint64\n\n /**\n * Marks an account nonparticipating for rewards\n * Min AVM version: 5\n */\n get nonparticipation(): boolean\n\n /**\n * Log messages emitted by an application call (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n logs(a: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n get numLogs(): uint64\n\n /**\n * Asset ID allocated by the creation of an ASA (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n get createdAssetId(): Asset\n\n /**\n * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n get createdApplicationId(): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n * Min AVM version: 6\n */\n get lastLog(): bytes\n\n /**\n * 64 byte state proof public key\n * Min AVM version: 6\n */\n get stateProofPk(): bytes\n\n /**\n * Approval Program as an array of pages\n * Min AVM version: 7\n */\n approvalProgramPages(a: uint64): bytes\n\n /**\n * Number of Approval Program pages\n * Min AVM version: 7\n */\n get numApprovalProgramPages(): uint64\n\n /**\n * ClearState Program as an array of pages\n * Min AVM version: 7\n */\n clearStateProgramPages(a: uint64): bytes\n\n /**\n * Number of ClearState Program pages\n * Min AVM version: 7\n */\n get numClearStateProgramPages(): uint64\n}\nexport type VoterParamsType = {\n /**\n * Online stake in microalgos\n * Min AVM version: 6\n */\n voterBalance(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * Had this account opted into block payouts\n * Min AVM version: 11\n */\n voterIncentiveEligible(a: Account | uint64): readonly [boolean, boolean]\n}\n\n/**\n * Verify the proof B of message A against pubkey C. Returns vrf output and verification flag.\n * `VrfAlgorand` is the VRF used in Algorand. It is ECVRF-ED25519-SHA512-Elligator2, specified in the IETF internet draft [draft-irtf-cfrg-vrf-03](https://datatracker.ietf.org/doc/draft-irtf-cfrg-vrf/03/).\n * @see Native TEAL opcode: [`vrf_verify`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#vrf_verify)\n * Min AVM version: 7\n */\nexport type VrfVerifyType = (s: VrfVerify, a: bytes, b: bytes, c: bytes) => readonly [bytes, boolean]\nexport type SelectType = ((a: bytes, b: bytes, c: uint64) => bytes) & ((a: uint64, b: uint64, c: uint64) => uint64)\nexport type SetBitType = ((target: bytes, n: uint64, c: uint64) => bytes) & ((target: uint64, n: uint64, c: uint64) => uint64)\nexport type OpsNamespace = {\n AcctParams: AcctParamsType\n addw: AddwType\n AppGlobal: AppGlobalType\n AppLocal: AppLocalType\n appOptedIn: AppOptedInType\n AppParams: AppParamsType\n arg: ArgType\n AssetHolding: AssetHoldingType\n AssetParams: AssetParamsType\n balance: BalanceType\n base64Decode: Base64DecodeType\n bitLength: BitLengthType\n Block: BlockType\n Box: BoxType\n bsqrt: BsqrtType\n btoi: BtoiType\n bzero: BzeroType\n concat: ConcatType\n divmodw: DivmodwType\n divw: DivwType\n EllipticCurve: EllipticCurveType\n ecdsaPkDecompress: EcdsaPkDecompressType\n ecdsaPkRecover: EcdsaPkRecoverType\n ecdsaVerify: EcdsaVerifyType\n ed25519verify: Ed25519verifyType\n ed25519verifyBare: Ed25519verifyBareType\n exp: ExpType\n expw: ExpwType\n extract: ExtractType\n extractUint16: ExtractUint16Type\n extractUint32: ExtractUint32Type\n extractUint64: ExtractUint64Type\n falconVerify: FalconVerifyType\n gaid: GaidType\n getBit: GetBitType\n getByte: GetByteType\n GITxn: GITxnType\n gloadBytes: GloadBytesType\n gloadUint64: GloadUint64Type\n Global: GlobalType\n GTxn: GTxnType\n itob: ItobType\n ITxn: ITxnType\n ITxnCreate: ITxnCreateType\n JsonRef: JsonRefType\n keccak256: Keccak256Type\n len: LenType\n Scratch: ScratchType\n minBalance: MinBalanceType\n mulw: MulwType\n onlineStake: OnlineStakeType\n replace: ReplaceType\n setByte: SetByteType\n sha256: Sha256Type\n sha3_256: Sha3_256Type\n sha512_256: Sha512_256Type\n shl: ShlType\n shr: ShrType\n sqrt: SqrtType\n substring: SubstringType\n sumhash512: Sumhash512Type\n Txn: TxnType\n VoterParams: VoterParamsType\n vrfVerify: VrfVerifyType\n select: SelectType\n setBit: SetBitType\n}\n","import { ARC4Encoded } from './arc4'\nimport { ctxMgr } from './execution-context'\nimport { AssertError, AvmError, internalError } from './impl/errors'\nimport { nameOfType } from './impl/name-of-type'\nimport { AlgoTsPrimitiveCls, BigUintCls, BytesCls, Uint64Cls } from './impl/primitives'\nimport { biguint, BigUintCompat, bytes, BytesBacked, BytesCompat, StringCompat, uint64, Uint64Compat } from './primitives'\n\nexport const toBytes = (val: unknown): bytes => {\n if (val instanceof AlgoTsPrimitiveCls) return val.toBytes().asAlgoTs()\n if (val instanceof ARC4Encoded) return val.bytes\n\n switch (typeof val) {\n case 'string':\n return BytesCls.fromCompat(val).asAlgoTs()\n case 'bigint':\n return BigUintCls.fromCompat(val).toBytes().asAlgoTs()\n case 'number':\n return Uint64Cls.fromCompat(val).toBytes().asAlgoTs()\n default:\n internalError(`Unsupported arg type ${nameOfType(val)}`)\n }\n}\n\nexport function log(...args: Array<Uint64Compat | BytesCompat | BigUintCompat | StringCompat | BytesBacked>): void {\n ctxMgr.instance.log(args.map(toBytes).reduce((left, right) => left.concat(right)))\n}\n\nexport function assert(condition: unknown, message?: string): asserts condition {\n if (!condition) {\n throw new AssertError(message ?? 'Assertion failed')\n }\n}\n\nexport function err(message?: string): never {\n throw new AvmError(message ?? 'err opcode executed')\n}\n\ntype NumericComparison<T> = T | { lessThan: T } | { greaterThan: T } | { greaterThanEq: T } | { lessThanEq: T } | { between: [T, T] }\n\ntype ComparisonFor<T> = T extends uint64 | biguint ? NumericComparison<T> : T\n\ntype MatchTest<T> = {\n [key in keyof T]?: ComparisonFor<T[key]>\n}\n\nexport function match<T>(subject: T, test: MatchTest<T>): boolean {\n return true\n}\nexport function assertMatch<T>(subject: T, test: MatchTest<T>, message?: string): boolean {\n return true\n}\n\nexport enum OpUpFeeSource {\n GroupCredit = 0,\n AppAccount = 1,\n Any = 2,\n}\n\nexport function ensureBudget(budget: uint64, feeSource: OpUpFeeSource = OpUpFeeSource.GroupCredit) {\n throw new Error('Not implemented')\n}\n\nexport function urange(stop: Uint64Compat): IterableIterator<uint64>\nexport function urange(start: Uint64Compat, stop: Uint64Compat): IterableIterator<uint64>\nexport function urange(start: Uint64Compat, stop: Uint64Compat, step: Uint64Compat): IterableIterator<uint64>\nexport function urange(a: Uint64Compat, b?: Uint64Compat, c?: Uint64Compat): IterableIterator<uint64> {\n throw new Error('Not implemented')\n}\n","import { ctxMgr } from './execution-context'\nimport { bytes, uint64 } from './primitives'\n\nexport type Account = {\n readonly bytes: bytes\n\n /**\n * Account balance in microalgos\n *\n * Account must be an available resource\n */\n readonly balance: uint64\n\n /**\n * Minimum required balance for account, in microalgos\n *\n * Account must be an available resource\n */\n readonly minBalance: uint64\n\n /**\n * Address the account is rekeyed to\n *\n * Account must be an available resource\n */\n readonly authAddress: Account\n\n /**\n * The total number of uint64 values allocated by this account in Global and Local States.\n *\n * Account must be an available resource\n */\n readonly totalNumUint: uint64\n\n /**\n * The total number of byte array values allocated by this account in Global and Local States.\n *\n * Account must be an available resource\n */\n readonly totalNumByteSlice: uint64\n\n /**\n * The number of extra app code pages used by this account.\n *\n * Account must be an available resource\n */\n readonly totalExtraAppPages: uint64\n\n /**\n * The number of existing apps created by this account.\n *\n * Account must be an available resource\n */\n readonly totalAppsCreated: uint64\n\n /**\n * The number of apps this account is opted into.\n *\n * Account must be an available resource\n */\n readonly totalAppsOptedIn: uint64\n\n /**\n * The number of existing ASAs created by this account.\n *\n * Account must be an available resource\n */\n readonly totalAssetsCreated: uint64\n\n /**\n * The numbers of ASAs held by this account (including ASAs this account created).\n *\n * Account must be an available resource\n */\n readonly totalAssets: uint64\n\n /**\n * The number of existing boxes created by this account's app.\n *\n * Account must be an available resource\n */\n readonly totalBoxes: uint64\n\n /**\n * The total number of bytes used by this account's app's box keys and values.\n *\n * Account must be an available resource\n */\n readonly totalBoxBytes: uint64\n\n /**\n * Returns true if this account is opted in to the specified Asset or Application.\n * Note: Account and Asset/Application must be an available resource\n *\n * @param assetOrApp\n */\n isOptedIn(assetOrApp: Asset | Application): boolean\n}\n\nexport function Account(): Account\nexport function Account(address: bytes): Account\nexport function Account(address?: bytes): Account {\n return ctxMgr.instance.account(address)\n}\n\nexport function Asset(): Asset\nexport function Asset(assetId: uint64): Asset\nexport function Asset(assetId?: uint64): Asset {\n return ctxMgr.instance.asset(assetId)\n}\n/**\n * An Asset on the Algorand network.\n */\nexport type Asset = {\n /**\n * Returns the id of the Asset\n */\n readonly id: uint64\n\n /**\n * Total number of units of this asset\n */\n readonly total: uint64\n\n /**\n * @see AssetParams.decimals\n */\n readonly decimals: uint64\n\n /**\n * Frozen by default or not\n */\n readonly defaultFrozen: boolean\n\n /**\n * Asset unit name\n */\n readonly unitName: bytes\n\n /**\n * Asset name\n */\n readonly name: bytes\n\n /**\n * URL with additional info about the asset\n */\n readonly url: bytes\n\n /**\n * Arbitrary commitment\n */\n readonly metadataHash: bytes\n\n /**\n * Manager address\n */\n readonly manager: Account\n\n /**\n * Reserve address\n */\n readonly reserve: Account\n\n /**\n * Freeze address\n */\n readonly freeze: Account\n\n /**\n * Clawback address\n */\n readonly clawback: Account\n\n /**\n * Creator address\n */\n readonly creator: Account\n\n /**\n * Amount of the asset unit held by this account. Fails if the account has not\n * opted in to the asset.\n * Asset and supplied Account must be an available resource\n * @param account Account\n * @return balance: uint64\n */\n balance(account: Account): uint64\n\n /**\n * Is the asset frozen or not. Fails if the account has not\n * opted in to the asset.\n * Asset and supplied Account must be an available resource\n * @param account Account\n * @return isFrozen: boolean\n */\n frozen(account: Account): boolean\n}\n\nexport function Application(): Application\nexport function Application(applicationId: uint64): Application\nexport function Application(applicationId?: uint64): Application {\n return ctxMgr.instance.application(applicationId)\n}\n\n/**\n * An Application on the Algorand network.\n */\nexport type Application = {\n /**\n * The id of this application on the current network\n */\n readonly id: uint64\n /**\n * Bytecode of Approval Program\n */\n readonly approvalProgram: bytes\n\n /**\n * Bytecode of Clear State Program\n */\n readonly clearStateProgram: bytes\n\n /**\n * Number of uint64 values allowed in Global State\n */\n readonly globalNumUint: uint64\n\n /**\n * Number of byte array values allowed in Global State\n */\n readonly globalNumBytes: uint64\n\n /**\n * Number of uint64 values allowed in Local State\n */\n readonly localNumUint: uint64\n\n /**\n * Number of byte array values allowed in Local State\n */\n readonly localNumBytes: uint64\n\n /**\n * Number of Extra Program Pages of code space\n */\n readonly extraProgramPages: uint64\n\n /**\n * Creator address\n */\n readonly creator: Account\n\n /**\n * Address for which this application has authority\n */\n readonly address: Account\n}\n","import { ctxMgr } from './execution-context'\nimport { bytes, uint64 } from './primitives'\n\nexport type Box<TValue> = {\n readonly key: bytes\n value: TValue\n\n readonly exists: boolean\n get(options: { default: TValue }): TValue\n delete(): boolean\n maybe(): readonly [TValue, boolean]\n readonly length: uint64\n}\n\nexport type BoxMap<TKey, TValue> = {\n readonly keyPrefix: bytes\n get(key: TKey): TValue\n get(key: TKey, options: { default: TValue }): TValue\n set(key: TKey, value: TValue): void\n delete(key: TKey): boolean\n has(key: TKey): boolean\n maybe(key: TKey): readonly [TValue, boolean]\n length(key: TKey): uint64\n}\n\nexport type BoxRef = {\n readonly key: bytes\n readonly exists: boolean\n value: bytes\n get(options: { default: bytes }): bytes\n put(value: bytes): void\n splice(start: uint64, length: uint64, value: bytes): void\n replace(start: uint64, value: bytes): void\n extract(start: uint64, length: uint64): bytes\n delete(): boolean\n create(options: { size: uint64 }): boolean\n resize(newSize: uint64): void\n maybe(): readonly [bytes, boolean]\n readonly length: uint64\n}\n\nexport function Box<TValue>(options: { key: bytes | string }): Box<TValue> {\n return ctxMgr.instance.state.Box(options)\n}\n\nexport function BoxMap<TKey, TValue>(options: { keyPrefix: bytes | string }): BoxMap<TKey, TValue> {\n return ctxMgr.instance.state.BoxMap(options)\n}\n\nexport function BoxRef(options: { key: bytes | string }): BoxRef {\n return ctxMgr.instance.state.BoxRef(options)\n}\n","import { ctxMgr } from './execution-context'\nimport { bytes } from './primitives'\nimport { Account } from './reference'\n\n/** A value saved in global state */\nexport type GlobalState<ValueType> = {\n value: ValueType\n delete: () => void\n hasValue: boolean\n}\n\nexport type GlobalStateOptions<ValueType> = { key?: bytes | string; initialValue?: ValueType }\n\n/** A single key in global state */\nexport function GlobalState<ValueType>(options?: GlobalStateOptions<ValueType>): GlobalState<ValueType> {\n return ctxMgr.instance.state.GlobalState(options)\n}\n\n/** A value saved in local state */\nexport type LocalStateForAccount<ValueType> = {\n value: ValueType\n hasValue: boolean\n delete: () => void\n}\n\nexport type LocalState<ValueType> = {\n (account: Account): LocalStateForAccount<ValueType>\n}\n\n/** A single key in local state */\nexport function LocalState<ValueType>(options?: { key?: bytes | string }): LocalState<ValueType> {\n return ctxMgr.instance.state.LocalState(options)\n}\n","import { OnCompleteAction } from './arc4'\nimport { ctxMgr } from './execution-context'\nimport { bytes, uint64 } from './primitives'\nimport type { Account, Application, Asset } from './reference'\nimport type * as txnTypes from './transactions'\nimport { DeliberateAny } from './typescript-helpers'\n\nconst isItxn = Symbol('isItxn')\n\nexport interface PaymentInnerTxn extends txnTypes.PaymentTxn {\n [isItxn]?: true\n}\nexport interface KeyRegistrationInnerTxn extends txnTypes.KeyRegistrationTxn {\n [isItxn]?: true\n}\nexport interface AssetConfigInnerTxn extends txnTypes.AssetConfigTxn {\n [isItxn]?: true\n}\nexport interface AssetTransferInnerTxn extends txnTypes.AssetTransferTxn {\n [isItxn]?: true\n}\nexport interface AssetFreezeInnerTxn extends txnTypes.AssetFreezeTxn {\n [isItxn]?: true\n}\nexport interface ApplicationInnerTxn extends txnTypes.ApplicationTxn {\n [isItxn]?: true\n}\n\nexport interface CommonTransactionFields {\n /**\n * 32 byte address\n */\n sender?: Account | string\n\n /**\n * microalgos\n */\n fee?: uint64\n\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n\n /**\n * 32 byte lease value\n */\n lease?: bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | string\n}\n\nexport interface PaymentFields extends CommonTransactionFields {\n /**\n * The amount, in microALGO, to transfer\n *\n */\n amount?: uint64\n /**\n * The address of the receiver\n */\n receiver?: Account\n /**\n * If set, bring the sender balance to 0 and send all remaining balance to this address\n */\n closeRemainderTo?: Account\n}\nexport interface KeyRegistrationFields extends CommonTransactionFields {\n /**\n * 32 byte address\n */\n voteKey?: bytes\n\n /**\n * 32 byte address\n */\n selectionKey?: bytes\n\n /**\n * The first round that the participation key is valid.\n */\n voteFirst?: uint64\n\n /**\n * The last round that the participation key is valid.\n */\n voteLast?: uint64\n\n /**\n * Dilution for the 2-level participation key\n */\n voteKeyDilution?: uint64\n\n /**\n * Marks an account nonparticipating for rewards\n */\n nonparticipation?: boolean\n\n /**\n * 64 byte state proof public key\n */\n stateProofKey?: bytes\n}\nexport interface AssetTransferFields extends CommonTransactionFields {\n /** The asset being transferred */\n xferAsset: Asset\n /** The amount of the asset being transferred */\n assetAmount?: uint64\n /** The clawback target */\n assetSender?: Account\n /** The receiver of the asset */\n assetReceiver?: Account\n /** The address to close the asset to */\n assetCloseTo?: Account\n}\nexport interface AssetConfigFields extends CommonTransactionFields {\n configAsset?: Asset\n manager?: Account\n reserve?: Account\n freeze?: Account\n clawback?: Account\n assetName?: string | bytes\n unitName?: string | bytes\n total?: uint64\n decimals?: uint64\n defaultFrozen?: boolean\n url?: string | bytes\n metadataHash?: bytes\n}\nexport interface AssetFreezeFields extends CommonTransactionFields {\n freezeAsset: Asset | uint64\n freezeAccount?: Account | string\n frozen?: boolean\n}\nexport interface ApplicationCallFields extends CommonTransactionFields {\n appId?: Application | uint64\n approvalProgram?: bytes | readonly [...bytes[]]\n clearStateProgram?: bytes | readonly [...bytes[]]\n onCompletion?: OnCompleteAction | uint64\n globalNumUint?: uint64\n globalNumBytes?: uint64\n localNumUint?: uint64\n localNumBytes?: uint64\n extraProgramPages?: uint64\n appArgs?: readonly [...unknown[]]\n accounts?: readonly [...Account[]]\n assets?: readonly [...Asset[]]\n apps?: readonly [...Application[]]\n}\n\nexport type InnerTransaction<TFields, TTransaction> = {\n submit(): TTransaction\n set(p: Partial<TFields>): void\n copy(): InnerTransaction<TFields, TTransaction>\n}\n\nexport type InnerTxnList = [...InnerTransaction<DeliberateAny, DeliberateAny>[]]\n\nexport type TxnFor<TFields extends InnerTxnList> = TFields extends [\n InnerTransaction<DeliberateAny, infer TTxn>,\n ...infer TRest extends InnerTxnList,\n]\n ? [TTxn, ...TxnFor<TRest>]\n : []\n\nexport type PaymentItxnParams = InnerTransaction<PaymentFields, PaymentInnerTxn>\nexport type KeyRegistrationItxnParams = InnerTransaction<KeyRegistrationFields, KeyRegistrationInnerTxn>\nexport type AssetConfigItxnParams = InnerTransaction<AssetConfigFields, AssetConfigInnerTxn>\nexport type AssetTransferItxnParams = InnerTransaction<AssetTransferFields, AssetTransferInnerTxn>\nexport type AssetFreezeItxnParams = InnerTransaction<AssetFreezeFields, AssetFreezeInnerTxn>\nexport type ApplicationCallItxnParams = InnerTransaction<ApplicationCallFields, ApplicationInnerTxn>\n\nexport function submitGroup<TFields extends InnerTxnList>(...transactionFields: TFields): TxnFor<TFields> {\n return ctxMgr.instance.itxn.submitGroup(...transactionFields)\n}\nexport function payment(fields: PaymentFields): PaymentItxnParams {\n return ctxMgr.instance.itxn.payment(fields)\n}\nexport function keyRegistration(fields: KeyRegistrationFields): KeyRegistrationItxnParams {\n return ctxMgr.instance.itxn.keyRegistration(fields)\n}\nexport function assetConfig(fields: AssetConfigFields): AssetConfigItxnParams {\n return ctxMgr.instance.itxn.assetConfig(fields)\n}\nexport function assetTransfer(fields: AssetTransferFields): AssetTransferItxnParams {\n return ctxMgr.instance.itxn.assetTransfer(fields)\n}\nexport function assetFreeze(fields: AssetFreezeFields): AssetFreezeItxnParams {\n return ctxMgr.instance.itxn.assetFreeze(fields)\n}\nexport function applicationCall(fields: ApplicationCallFields): ApplicationCallItxnParams {\n return ctxMgr.instance.itxn.applicationCall(fields)\n}\n","import { ctxMgr } from './execution-context'\nimport { uint64 } from './primitives'\nimport type * as txnTypes from './transactions'\n\nconst isGtxn = Symbol('isGtxn')\nexport interface PaymentTxn extends txnTypes.PaymentTxn {\n [isGtxn]?: true\n}\nexport interface KeyRegistrationTxn extends txnTypes.KeyRegistrationTxn {\n [isGtxn]?: true\n}\nexport interface AssetConfigTxn extends txnTypes.AssetConfigTxn {\n [isGtxn]?: true\n}\nexport interface AssetTransferTxn extends txnTypes.AssetTransferTxn {\n [isGtxn]?: true\n}\nexport interface AssetFreezeTxn extends txnTypes.AssetFreezeTxn {\n [isGtxn]?: true\n}\nexport interface ApplicationTxn extends txnTypes.ApplicationTxn {\n [isGtxn]?: true\n}\n\nexport type Transaction = PaymentTxn | KeyRegistrationTxn | AssetConfigTxn | AssetTransferTxn | AssetFreezeTxn | ApplicationTxn\n\nexport function Transaction(groupIndex: uint64): Transaction {\n return ctxMgr.instance.gtxn.Transaction(groupIndex)\n}\nexport function PaymentTxn(groupIndex: uint64): PaymentTxn {\n return ctxMgr.instance.gtxn.PaymentTxn(groupIndex)\n}\nexport function KeyRegistrationTxn(groupIndex: uint64): KeyRegistrationTxn {\n return ctxMgr.instance.gtxn.KeyRegistrationTxn(groupIndex)\n}\nexport function AssetConfigTxn(groupIndex: uint64): AssetConfigTxn {\n return ctxMgr.instance.gtxn.AssetConfigTxn(groupIndex)\n}\nexport function AssetTransferTxn(groupIndex: uint64): AssetTransferTxn {\n return ctxMgr.instance.gtxn.AssetTransferTxn(groupIndex)\n}\nexport function AssetFreezeTxn(groupIndex: uint64): AssetFreezeTxn {\n return ctxMgr.instance.gtxn.AssetFreezeTxn(groupIndex)\n}\nexport function ApplicationTxn(groupIndex: uint64): ApplicationTxn {\n return ctxMgr.instance.gtxn.ApplicationTxn(groupIndex)\n}\n","import { OnCompleteActionStr } from './arc4'\nimport { bytes, uint64 } from './primitives'\nimport { Account, Application, Asset } from './reference'\n\n/**\n * The different transaction types available in a transaction\n */\nexport enum TransactionType {\n /**\n * A Payment transaction\n */\n Payment = 1,\n /**\n * A Key Registration transaction\n */\n KeyRegistration = 2,\n /**\n * An Asset Config transaction\n */\n AssetConfig = 3,\n /**\n * An Asset Transfer transaction\n */\n AssetTransfer = 4,\n /**\n * An Asset Freeze transaction\n */\n AssetFreeze = 5,\n /**\n * An Application Call transaction\n */\n ApplicationCall = 6,\n}\n\ninterface TransactionBase {\n /**\n * 32 byte address\n */\n readonly sender: Account\n\n /**\n * microalgos\n */\n readonly fee: uint64\n\n /**\n * round number\n */\n readonly firstValid: uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n\n /**\n * round number\n */\n readonly lastValid: uint64\n\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n\n /**\n * 32 byte lease value\n */\n readonly lease: bytes\n\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n}\n\nexport interface PaymentTxn extends TransactionBase {\n /**\n * 32 byte address\n */\n readonly receiver: Account\n\n /**\n * microalgos\n */\n readonly amount: uint64\n\n /**\n * 32 byte address\n */\n readonly closeRemainderTo: Account\n\n /**\n * Transaction type as integer\n */\n readonly type: TransactionType.Payment\n}\n\nexport interface KeyRegistrationTxn extends TransactionBase {\n /**\n * 32 byte address\n */\n readonly voteKey: bytes\n\n /**\n * 32 byte address\n */\n readonly selectionKey: bytes\n\n /**\n * The first round that the participation key is valid.\n */\n readonly voteFirst: uint64\n\n /**\n * The last round that the participation key is valid.\n */\n readonly voteLast: uint64\n\n /**\n * Dilution for the 2-level participation key\n */\n readonly voteKeyDilution: uint64\n\n /**\n * Marks an account nonparticipating for rewards\n */\n readonly nonparticipation: boolean\n\n /**\n * 64 byte state proof public key\n */\n readonly stateProofKey: bytes\n /**\n * Transaction type as integer\n */\n readonly type: TransactionType.KeyRegistration\n}\n\nexport interface AssetConfigTxn extends TransactionBase {\n /**\n * Asset ID in asset config transaction\n */\n readonly configAsset: Asset\n\n /**\n * Total number of units of this asset created\n */\n readonly total: uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n readonly decimals: uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n readonly defaultFrozen: boolean\n\n /**\n * Unit name of the asset\n */\n readonly unitName: bytes\n\n /**\n * The asset name\n */\n readonly assetName: bytes\n\n /**\n * URL\n */\n readonly url: bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n readonly metadataHash: bytes\n\n /**\n * 32 byte address\n */\n readonly manager: Account\n\n /**\n * 32 byte address\n */\n readonly reserve: Account\n\n /**\n * 32 byte address\n */\n readonly freeze: Account\n\n /**\n * 32 byte address\n */\n readonly clawback: Account\n /**\n * Asset ID allocated by the creation of an ASA\n */\n createdAsset: Asset\n\n /**\n * Transaction type as integer\n */\n readonly type: TransactionType.AssetConfig\n}\n\nexport interface AssetTransferTxn extends TransactionBase {\n /**\n * Asset ID\n */\n readonly xferAsset: Asset\n\n /**\n * value in Asset's units\n */\n readonly assetAmount: uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n readonly assetSender: Account\n\n /**\n * 32 byte address\n */\n readonly assetReceiver: Account\n\n /**\n * 32 byte address\n */\n readonly assetCloseTo: Account\n /**\n * Transaction type as integer\n */\n readonly type: TransactionType.AssetTransfer\n}\n\nexport interface AssetFreezeTxn extends TransactionBase {\n /**\n * Asset ID being frozen or un-frozen\n */\n readonly freezeAsset: Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n */\n readonly freezeAccount: Account\n\n /**\n * The new frozen value\n */\n readonly frozen: boolean\n /**\n * Transaction type as integer\n */\n readonly type: TransactionType.AssetFreeze\n}\n\nexport interface ApplicationTxn extends TransactionBase {\n /**\n * ApplicationID from ApplicationCall transaction\n */\n readonly appId: Application\n\n /**\n * ApplicationCall transaction on completion action\n */\n readonly onCompletion: OnCompleteActionStr\n\n /**\n * Number of ApplicationArgs\n */\n readonly numAppArgs: uint64\n\n /**\n * Number of ApplicationArgs\n */\n readonly numAccounts: uint64\n\n /**\n * Approval program\n */\n readonly approvalProgram: bytes\n\n /**\n * Clear State program\n */\n readonly clearStateProgram: bytes\n\n /**\n * Number of Assets\n */\n readonly numAssets: uint64\n\n /**\n * Number of Applications\n */\n readonly numApps: uint64\n\n /**\n * Number of global state integers in ApplicationCall\n */\n readonly globalNumUint: uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n */\n readonly globalNumBytes: uint64\n\n /**\n * Number of local state integers in ApplicationCall\n */\n readonly localNumUint: uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\n */\n readonly localNumBytes: uint64\n\n /**\n * 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.\n */\n readonly extraProgramPages: uint64\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n */\n readonly lastLog: bytes\n\n /**\n * Log messages emitted by an application call\n */\n logs(index: uint64): bytes\n\n /**\n * Number of logs\n */\n readonly numLogs: uint64\n\n /**\n * ApplicationID allocated by the creation of an application\n */\n readonly createdApp: Application\n\n /**\n * Number of Approval Program pages\n */\n readonly numApprovalProgramPages: uint64\n\n /**\n * Number of Clear State Program pages\n */\n readonly numClearStateProgramPages: uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * @param index\n */\n appArgs(index: uint64): bytes\n\n /**\n * Accounts listed in the ApplicationCall transaction\n */\n accounts(index: uint64): Account\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n */\n assets(index: uint64): Asset\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n */\n apps(index: uint64): Application\n\n /**\n * Approval Program as an array of pages\n */\n approvalProgramPages(index: uint64): bytes\n\n /**\n * Clear State Program as an array of pages\n */\n clearStateProgramPages(index: uint64): bytes\n /**\n * Transaction type as integer\n */\n readonly type: TransactionType.ApplicationCall\n}\n\nexport type Transaction = PaymentTxn | KeyRegistrationTxn | AssetConfigTxn | AssetTransferTxn | AssetFreezeTxn | ApplicationTxn\n","import { uint64 } from './primitives'\nimport { ConstructorFor } from './typescript-helpers'\n\nexport abstract class LogicSig {\n abstract program(): boolean | uint64\n}\n\n/**\n * Defines optional configuration for a logic signature\n */\ntype LogicSigOptions = {\n /**\n * Determines which AVM version to use, this affects what operations are supported.\n * Defaults to value provided supplied on command line (which defaults to current mainnet version)\n */\n avmVersion?: 10 | 11\n /**\n * Override the name of the logic signature when generating build artifacts.\n * Defaults to the class name\n */\n name?: string\n}\n\n/**\n * The logicsig decorator can be used to specify additional configuration options for a logic signature\n * @param options An object containing the configuration options\n */\nexport function logicsig(options: LogicSigOptions) {\n return <T extends ConstructorFor<LogicSig>>(logicSig: T) => logicSig\n}\n","import { NoImplementation } from './impl/errors'\n\nexport function TemplateVar<T>(variableName: string, prefix = 'TMPL_'): T {\n throw NoImplementation\n}\n","import { BaseContract } from './base-contract'\nimport { NoImplementation } from './impl/errors'\nimport { LogicSig } from './logic-sig'\nimport { bytes, uint64 } from './primitives'\nimport { Account } from './reference'\nimport { ConstructorFor, DeliberateAny } from './typescript-helpers'\n\n/**\n * Provides compiled programs and state allocation values for a Contract. Created by calling `compile(ExampleContractType)`\n */\nexport type CompiledContract = {\n /**\n * Approval program pages for a contract, after template variables have been replaced and compiled to AVM bytecode\n */\n approvalProgram: [bytes, bytes]\n /**\n * Clear state program pages for a contract, after template variables have been replaced and compiled to AVM bytecode\n */\n clearStateProgram: [bytes, bytes]\n /**\n * By default, provides extra program pages required based on approval and clear state program size, can be overridden when calling `compile(ExampleContractType, { extraProgramPages: ... })`\n */\n extraProgramPages: uint64\n /**\n * By default, provides global num uints based on contract state totals, can be overridden when calling `compile(ExampleContractType, { globalUints: ... })`\n */\n globalUints: uint64\n /**\n * By default, provides global num bytes based on contract state totals, can be overridden when calling `compile(ExampleContractType, { globalBytes: ... })`\n */\n globalBytes: uint64\n /**\n * By default, provides local num uints based on contract state totals, can be overridden when calling `compile(ExampleContractType, { localUints: ... })`\n */\n localUints: uint64\n /**\n * By default, provides local num bytes based on contract state totals, can be overridden when calling `compile(ExampleContractType, { localBytes: ... })`\n */\n localBytes: uint64\n}\n\n/**\n * Provides account for a Logic Signature. Created by calling `compile(LogicSigType)`\n */\nexport type CompiledLogicSig = {\n /**\n * Address of a logic sig program, after template variables have been replaced and compiled to AVM bytecode\n */\n account: Account\n}\n\n/**\n * Options for compiling a contract\n */\nexport type CompileContractOptions = {\n /**\n * Number of extra program pages, defaults to minimum required for contract\n */\n extraProgramPages?: uint64\n /**\n * Number of global uint64s, defaults to value defined for contract\n */\n globalUints?: uint64\n /**\n * Number of global bytes, defaults to value defined for contract\n */\n globalBytes?: uint64\n /**\n * Number of local uint64s, defaults to value defined for contract\n */\n localUints?: uint64\n /**\n * Number of local bytes, defaults to value defined for contract\n */\n localBytes?: uint64\n /**\n * Template variables to substitute into the contract, key should be without the prefix, must evaluate to a compile time constant\n * and match the type of the template var declaration\n */\n templateVars?: Record<string, DeliberateAny>\n /**\n * Prefix to add to provided template vars, defaults to the prefix supplied on command line (which defaults to TMPL_)\n */\n templateVarsPrefix?: string\n}\n\n/**\n * Options for compiling a logic signature\n */\nexport type CompileLogicSigOptions = {\n /**\n * Template variables to substitute into the contract, key should be without the prefix, must evaluate to a compile time constant\n * and match the type of the template var declaration\n */\n templateVars?: Record<string, DeliberateAny>\n /**\n * Prefix to add to provided template vars, defaults to the prefix supplied on command line (which defaults to TMPL_)\n */\n templateVarsPrefix?: string\n}\n\n/**\n * Compile a contract and return the resulting byte code for approval and clear state programs.\n * @param contract The contract class to compile\n * @param options Options for compiling the contract\n */\nexport function compile(contract: ConstructorFor<BaseContract>, options?: CompileContractOptions): CompiledContract\n/**\n * Compile a logic signature and return an account ready for signing transactions.\n * @param logicSig The logic sig class to compile\n * @param options Options for compiling the logic sig\n */\nexport function compile(logicSig: ConstructorFor<LogicSig>, options?: CompileLogicSigOptions): CompiledLogicSig\nexport function compile(artefact: ConstructorFor<BaseContract> | ConstructorFor<LogicSig>): CompiledLogicSig | CompiledContract {\n throw new NoImplementation()\n}\n","import { NoImplementation } from './impl/errors'\nimport { uint64, Uint64Compat } from './primitives'\n\nexport class MutableArray<TItem> {\n constructor(...items: TItem[]) {}\n\n /**\n * Returns the current length of this array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Returns the item at the given index.\n * Negative indexes are taken from the end.\n * @param index The index of the item to retrieve\n */\n at(index: Uint64Compat): TItem {\n throw new NoImplementation()\n }\n\n /**\n * Create a new Dynamic array with all items from this array\n */\n slice(): MutableArray<TItem>\n /**\n * Create a new MutableArray with all items up till `end`.\n * Negative indexes are taken from the end.\n * @param end An index in which to stop copying items.\n */\n slice(end: Uint64Compat): MutableArray<TItem>\n /**\n * Create a new MutableArray with items from `start`, up until `end`\n * Negative indexes are taken from the end.\n * @param start An index in which to start copying items.\n * @param end An index in which to stop copying items\n */\n slice(start: Uint64Compat, end: Uint64Compat): MutableArray<TItem>\n slice(start?: Uint64Compat, end?: Uint64Compat): MutableArray<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the items in this array\n */\n [Symbol.iterator](): IterableIterator<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for a tuple of the indexes and items in this array\n */\n entries(): IterableIterator<readonly [uint64, TItem]> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the indexes in this array\n */\n keys(): IterableIterator<uint64> {\n throw new NoImplementation()\n }\n\n /**\n * Get or set the item at the specified index.\n * Negative indexes are not supported\n */\n [index: uint64]: TItem\n\n /**\n * Push a number of items into this array\n * @param items The items to be added to this array\n */\n push(...items: TItem[]): void {\n throw new NoImplementation()\n }\n\n /**\n * Pop a single item from this array\n */\n pop(): TItem {\n throw new NoImplementation()\n }\n\n copy(): MutableArray<TItem> {\n throw new NoImplementation()\n }\n}\n","import { NoImplementation } from './impl/errors'\nimport { DeliberateAny } from './typescript-helpers'\n\n/**\n * Emit an arc28 event log using either an ARC4Struct type or a named object type.\n * Object types must have an ARC4 equivalent type.\n *\n * Anonymous types cannot be used as the type name is used to determine the event prefix\n * @param event An ARC4Struct instance, or a plain object with a named type\n *\n * @example\n * class Demo extends Struct<{ a: UintN64 }> {}\n * emit(new Demo({ a: new UintN64(123) }))\n *\n * @example\n * type Demo = { a: uint64 }\n * emit<Demo>({a: 123})\n * // or\n * const d: Demo = { a: 123 }\n * emit(d)\n */\nexport function emit<TEvent extends Record<string, DeliberateAny>>(event: TEvent): void\n/**\n * Emit an arc28 event log using an explicit name and inferred property/field types.\n * Property types must be ARC4 or have an ARC4 equivalent type.\n * @param eventName The name of the event (must be a compile time constant)\n * @param eventProps A set of event properties (order is significant)\n *\n * @example\n * emit(\"Demo\", new UintN64(123))\n *\n * @example\n * const a: uint64 = 123\n * emit(\"Demo\", a)\n */\nexport function emit<TProps extends [...DeliberateAny[]]>(eventName: string, ...eventProps: TProps): void\nexport function emit<T>(event: T | string, ...eventProps: unknown[]): void {\n throw new NoImplementation()\n}\n"],"names":[],"mappings":";;;;;;;IAIY;AAAZ,CAAA,UAAY,MAAM,EAAA;AAChB,IAAA,MAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,MAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC7B,CAAC,EAHW,MAAM,KAAN,MAAM,GAGjB,EAAA,CAAA,CAAA;IACW;AAAZ,CAAA,UAAY,EAAE,EAAA;AACZ,IAAA,EAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,EAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,EAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,EAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC7B,CAAC,EALW,EAAE,KAAF,EAAE,GAKb,EAAA,CAAA,CAAA;IACW;AAAZ,CAAA,U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MAAM,IAAI,gBAAgB,EAAE;;AAG9B;;AAEG;IACH,OAAO,GAAA;QACL,MAAM,IAAI,gBAAgB,EAAE;;AAG9B;;AAEG;IACH,IAAI,GAAA;QACF,MAAM,IAAI,gBAAgB,EAAE;;AAS9B;;;AAGG;IACH,IAAI,CAAC,GAAG,KAAc,EAAA;QACpB,MAAM,IAAI,gBAAgB,EAAE;;AAG9B;;AAEG;IACH,GAAG,GAAA;QACD,MAAM,IAAI,gBAAgB,EAAE;;IAG9B,IAAI,GAAA;QACF,MAAM,IAAI,gBAAgB,EAAE;;AAE/B;;SCpDe,IAAI,CAAI,KAAiB,EAAE,GAAG,UAAqB,EAAA;IACjE,MAAM,IAAI,gBAAgB,EAAE;AAC9B;;;;"}
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/op-types.ts","../src/util.ts","../src/reference.ts","../src/box.ts","../src/state.ts","../src/itxn.ts","../src/gtxn.ts","../src/transactions.ts","../src/logic-sig.ts","../src/template-var.ts","../src/compiled.ts","../src/mutable-array.ts","../src/arc-28.ts"],"sourcesContent":["/* THIS FILE IS GENERATED BY ~/scripts/generate-op-types.ts - DO NOT MODIFY DIRECTLY */\nimport { bytes, uint64, biguint } from './primitives'\nimport { Account, Application, Asset } from './reference'\n\nexport enum Base64 {\n URLEncoding = 'URLEncoding',\n StdEncoding = 'StdEncoding',\n}\nexport enum Ec {\n BN254g1 = 'BN254g1',\n BN254g2 = 'BN254g2',\n BLS12_381g1 = 'BLS12_381g1',\n BLS12_381g2 = 'BLS12_381g2',\n}\nexport enum Ecdsa {\n Secp256k1 = 'Secp256k1',\n Secp256r1 = 'Secp256r1',\n}\nexport enum VrfVerify {\n VrfAlgorand = 'VrfAlgorand',\n}\nexport type AcctParamsType = {\n /**\n * Account balance in microalgos\n * Min AVM version: 6\n */\n acctBalance(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * Minimum required balance for account, in microalgos\n * Min AVM version: 6\n */\n acctMinBalance(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * Address the account is rekeyed to.\n * Min AVM version: 6\n */\n acctAuthAddr(a: Account | uint64): readonly [Account, boolean]\n\n /**\n * The total number of uint64 values allocated by this account in Global and Local States.\n * Min AVM version: 8\n */\n acctTotalNumUint(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The total number of byte array values allocated by this account in Global and Local States.\n * Min AVM version: 8\n */\n acctTotalNumByteSlice(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of extra app code pages used by this account.\n * Min AVM version: 8\n */\n acctTotalExtraAppPages(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of existing apps created by this account.\n * Min AVM version: 8\n */\n acctTotalAppsCreated(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of apps this account is opted into.\n * Min AVM version: 8\n */\n acctTotalAppsOptedIn(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of existing ASAs created by this account.\n * Min AVM version: 8\n */\n acctTotalAssetsCreated(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The numbers of ASAs held by this account (including ASAs this account created).\n * Min AVM version: 8\n */\n acctTotalAssets(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of existing boxes created by this account's app.\n * Min AVM version: 8\n */\n acctTotalBoxes(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The total number of bytes used by this account's app's box keys and values.\n * Min AVM version: 8\n */\n acctTotalBoxBytes(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * Has this account opted into block payouts\n * Min AVM version: 11\n */\n acctIncentiveEligible(a: Account | uint64): readonly [boolean, boolean]\n\n /**\n * The round number of the last block this account proposed.\n * Min AVM version: 11\n */\n acctLastProposed(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The round number of the last block this account sent a heartbeat.\n * Min AVM version: 11\n */\n acctLastHeartbeat(a: Account | uint64): readonly [uint64, boolean]\n}\n\n/**\n * A plus B as a 128-bit result. X is the carry-bit, Y is the low-order 64 bits.\n * @see Native TEAL opcode: [`addw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#addw)\n * Min AVM version: 2\n */\nexport type AddwType = (a: uint64, b: uint64) => readonly [uint64, uint64]\n\n/**\n * Get or modify Global app state\n */\nexport type AppGlobalType = {\n /**\n * delete key A from the global state of the current application\n * @param state key.\n * 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.)\n * @see Native TEAL opcode: [`app_global_del`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_del)\n * Min AVM version: 2\n */\n delete(a: bytes): void\n\n /**\n * global state of the key A in the current application\n * @param state key.\n * * @return value. The value is zero (of type uint64) if the key does not exist.\n * @see Native TEAL opcode: [`app_global_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_get)\n * Min AVM version: 2\n */\n getBytes(a: bytes): bytes\n\n /**\n * global state of the key A in the current application\n * @param state key.\n * * @return value. The value is zero (of type uint64) if the key does not exist.\n * @see Native TEAL opcode: [`app_global_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_get)\n * Min AVM version: 2\n */\n getUint64(a: bytes): uint64\n\n /**\n * X is the global state of application A, key B. Y is 1 if key existed, else 0\n * @param Txn.ForeignApps offset (or, since v4, an _available_ application id), state key.\n * * @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.\n * @see Native TEAL opcode: [`app_global_get_ex`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_get_ex)\n * Min AVM version: 2\n */\n getExBytes(a: Application | uint64, b: bytes): readonly [bytes, boolean]\n\n /**\n * X is the global state of application A, key B. Y is 1 if key existed, else 0\n * @param Txn.ForeignApps offset (or, since v4, an _available_ application id), state key.\n * * @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.\n * @see Native TEAL opcode: [`app_global_get_ex`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_get_ex)\n * Min AVM version: 2\n */\n getExUint64(a: Application | uint64, b: bytes): readonly [uint64, boolean]\n\n /**\n * write B to key A in the global state of the current application\n * @see Native TEAL opcode: [`app_global_put`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_global_put)\n * Min AVM version: 2\n */\n put(a: bytes, b: uint64 | bytes): void\n}\n\n/**\n * Get or modify Local app state\n */\nexport type AppLocalType = {\n /**\n * delete key B from account A's local state of the current application\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), state key.\n * 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.)\n * @see Native TEAL opcode: [`app_local_del`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_del)\n * Min AVM version: 2\n */\n delete(a: Account | uint64, b: bytes): void\n\n /**\n * local state of the key B in the current application in account A\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), state key.\n * * @return value. The value is zero (of type uint64) if the key does not exist.\n * @see Native TEAL opcode: [`app_local_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_get)\n * Min AVM version: 2\n */\n getBytes(a: Account | uint64, b: bytes): bytes\n\n /**\n * local state of the key B in the current application in account A\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), state key.\n * * @return value. The value is zero (of type uint64) if the key does not exist.\n * @see Native TEAL opcode: [`app_local_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_get)\n * Min AVM version: 2\n */\n getUint64(a: Account | uint64, b: bytes): uint64\n\n /**\n * X is the local state of application B, key C in account A. Y is 1 if key existed, else 0\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset), state key.\n * * @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.\n * @see Native TEAL opcode: [`app_local_get_ex`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_get_ex)\n * Min AVM version: 2\n */\n getExBytes(a: Account | uint64, b: Application | uint64, c: bytes): readonly [bytes, boolean]\n\n /**\n * X is the local state of application B, key C in account A. Y is 1 if key existed, else 0\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset), state key.\n * * @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.\n * @see Native TEAL opcode: [`app_local_get_ex`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_get_ex)\n * Min AVM version: 2\n */\n getExUint64(a: Account | uint64, b: Application | uint64, c: bytes): readonly [uint64, boolean]\n\n /**\n * write C to key B in account A's local state of the current application\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), state key, value.\n * @see Native TEAL opcode: [`app_local_put`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_local_put)\n * Min AVM version: 2\n */\n put(a: Account | uint64, b: bytes, c: uint64 | bytes): void\n}\n\n/**\n * 1 if account A is opted in to application B, else 0\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset).\n * * @return 1 if opted in and 0 otherwise.\n * @see Native TEAL opcode: [`app_opted_in`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#app_opted_in)\n * Min AVM version: 2\n */\nexport type AppOptedInType = (a: Account | uint64, b: Application | uint64) => boolean\nexport type AppParamsType = {\n /**\n * Bytecode of Approval Program\n * Min AVM version: 5\n */\n appApprovalProgram(a: Application | uint64): readonly [bytes, boolean]\n\n /**\n * Bytecode of Clear State Program\n * Min AVM version: 5\n */\n appClearStateProgram(a: Application | uint64): readonly [bytes, boolean]\n\n /**\n * Number of uint64 values allowed in Global State\n * Min AVM version: 5\n */\n appGlobalNumUint(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of byte array values allowed in Global State\n * Min AVM version: 5\n */\n appGlobalNumByteSlice(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of uint64 values allowed in Local State\n * Min AVM version: 5\n */\n appLocalNumUint(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of byte array values allowed in Local State\n * Min AVM version: 5\n */\n appLocalNumByteSlice(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of Extra Program Pages of code space\n * Min AVM version: 5\n */\n appExtraProgramPages(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Creator address\n * Min AVM version: 5\n */\n appCreator(a: Application | uint64): readonly [Account, boolean]\n\n /**\n * Address for which this application has authority\n * Min AVM version: 5\n */\n appAddress(a: Application | uint64): readonly [Account, boolean]\n}\n\n/**\n * Ath LogicSig argument\n * @see Native TEAL opcode: [`args`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#args)\n * Min AVM version: 5\n */\nexport type ArgType = (a: uint64) => bytes\nexport type AssetHoldingType = {\n /**\n * Amount of the asset unit held by this account\n * Min AVM version: 2\n */\n assetBalance(a: Account | uint64, b: Asset | uint64): readonly [uint64, boolean]\n\n /**\n * Is the asset frozen or not\n * Min AVM version: 2\n */\n assetFrozen(a: Account | uint64, b: Asset | uint64): readonly [boolean, boolean]\n}\nexport type AssetParamsType = {\n /**\n * Total number of units of this asset\n * Min AVM version: 2\n */\n assetTotal(a: Asset | uint64): readonly [uint64, boolean]\n\n /**\n * See AssetParams.Decimals\n * Min AVM version: 2\n */\n assetDecimals(a: Asset | uint64): readonly [uint64, boolean]\n\n /**\n * Frozen by default or not\n * Min AVM version: 2\n */\n assetDefaultFrozen(a: Asset | uint64): readonly [boolean, boolean]\n\n /**\n * Asset unit name\n * Min AVM version: 2\n */\n assetUnitName(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * Asset name\n * Min AVM version: 2\n */\n assetName(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * URL with additional info about the asset\n * Min AVM version: 2\n */\n assetUrl(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * Arbitrary commitment\n * Min AVM version: 2\n */\n assetMetadataHash(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * Manager address\n * Min AVM version: 2\n */\n assetManager(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Reserve address\n * Min AVM version: 2\n */\n assetReserve(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Freeze address\n * Min AVM version: 2\n */\n assetFreeze(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Clawback address\n * Min AVM version: 2\n */\n assetClawback(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Creator address\n * Min AVM version: 5\n */\n assetCreator(a: Asset | uint64): readonly [Account, boolean]\n}\n\n/**\n * 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`\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset).\n * * @return value.\n * @see Native TEAL opcode: [`balance`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#balance)\n * Min AVM version: 2\n */\nexport type BalanceType = (a: Account | uint64) => uint64\n\n/**\n * decode A which was base64-encoded using _encoding_ E. Fail if A is not base64 encoded with encoding E\n * *Warning*: Usage should be restricted to very rare use cases. In almost all cases, smart contracts should directly handle non-encoded byte-strings.\tThis 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.\n * 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](https://rfc-editor.org/rfc/rfc4648.html#section-4). 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 `\\n` and `\\r` are 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`.\n * @see Native TEAL opcode: [`base64_decode`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#base64_decode)\n * Min AVM version: 7\n */\nexport type Base64DecodeType = (e: Base64, a: bytes) => bytes\n\n/**\n * 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\n * bitlen interprets arrays as big-endian integers, unlike setbit/getbit\n * @see Native TEAL opcode: [`bitlen`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#bitlen)\n * Min AVM version: 4\n */\nexport type BitLengthType = (a: uint64 | bytes) => uint64\nexport type BlockType = {\n blkSeed(a: uint64): bytes\n blkTimestamp(a: uint64): uint64\n blkProposer(a: uint64): Account\n blkFeesCollected(a: uint64): uint64\n blkBonus(a: uint64): uint64\n blkBranch(a: uint64): bytes\n blkFeeSink(a: uint64): Account\n blkProtocol(a: uint64): bytes\n blkTxnCounter(a: uint64): uint64\n blkProposerPayout(a: uint64): uint64\n}\n\n/**\n * Get or modify box state\n */\nexport type BoxType = {\n /**\n * 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\n * 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`.\n * @see Native TEAL opcode: [`box_create`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_create)\n * Min AVM version: 8\n */\n create(a: bytes, b: uint64): boolean\n\n /**\n * delete box named A if it exists. Return 1 if A existed, 0 otherwise\n * @see Native TEAL opcode: [`box_del`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_del)\n * Min AVM version: 8\n */\n delete(a: bytes): boolean\n\n /**\n * 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.\n * @see Native TEAL opcode: [`box_extract`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_extract)\n * Min AVM version: 8\n */\n extract(a: bytes, b: uint64, c: uint64): bytes\n\n /**\n * X is the contents of box A if A exists, else ''. Y is 1 if A exists, else 0.\n * For boxes that exceed 4,096 bytes, consider `box_create`, `box_extract`, and `box_replace`\n * @see Native TEAL opcode: [`box_get`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_get)\n * Min AVM version: 8\n */\n get(a: bytes): readonly [bytes, boolean]\n\n /**\n * X is the length of box A if A exists, else 0. Y is 1 if A exists, else 0.\n * @see Native TEAL opcode: [`box_len`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_len)\n * Min AVM version: 8\n */\n length(a: bytes): readonly [uint64, boolean]\n\n /**\n * 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\n * For boxes that exceed 4,096 bytes, consider `box_create`, `box_extract`, and `box_replace`\n * @see Native TEAL opcode: [`box_put`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_put)\n * Min AVM version: 8\n */\n put(a: bytes, b: bytes): void\n\n /**\n * 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.\n * @see Native TEAL opcode: [`box_replace`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_replace)\n * Min AVM version: 8\n */\n replace(a: bytes, b: uint64, c: bytes): void\n\n /**\n * 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.\n * @see Native TEAL opcode: [`box_resize`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_resize)\n * Min AVM version: 10\n */\n resize(a: bytes, b: uint64): void\n\n /**\n * 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.\n * 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.\n * @see Native TEAL opcode: [`box_splice`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#box_splice)\n * Min AVM version: 10\n */\n splice(a: bytes, b: uint64, c: uint64, d: bytes): void\n}\n\n/**\n * The largest integer I such that I^2 <= A. A and I are interpreted as big-endian unsigned integers\n * @see Native TEAL opcode: [`bsqrt`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#bsqrt)\n * Min AVM version: 6\n */\nexport type BsqrtType = (a: biguint) => biguint\n\n/**\n * converts big-endian byte array A to uint64. Fails if len(A) > 8. Padded by leading 0s if len(A) < 8.\n * `btoi` fails if the input is longer than 8 bytes.\n * @see Native TEAL opcode: [`btoi`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#btoi)\n * Min AVM version: 1\n */\nexport type BtoiType = (a: bytes) => uint64\n\n/**\n * zero filled byte-array of length A\n * @see Native TEAL opcode: [`bzero`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#bzero)\n * Min AVM version: 4\n */\nexport type BzeroType = (a: uint64) => bytes\n\n/**\n * join A and B\n * `concat` fails if the result would be greater than 4096 bytes.\n * @see Native TEAL opcode: [`concat`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#concat)\n * Min AVM version: 2\n */\nexport type ConcatType = (a: bytes, b: bytes) => bytes\n\n/**\n * W,X = (A,B / C,D); Y,Z = (A,B modulo C,D)\n * 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.\n * @see Native TEAL opcode: [`divmodw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#divmodw)\n * Min AVM version: 4\n */\nexport type DivmodwType = (a: uint64, b: uint64, c: uint64, d: uint64) => readonly [uint64, uint64, uint64, uint64]\n\n/**\n * A,B / C. Fail if C == 0 or if result overflows.\n * 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.\n * @see Native TEAL opcode: [`divw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#divw)\n * Min AVM version: 6\n */\nexport type DivwType = (a: uint64, b: uint64, c: uint64) => uint64\n\n/**\n * Elliptic Curve functions\n */\nexport type EllipticCurveType = {\n /**\n * for curve points A and B, return the curve point A + B\n * A and B are curve points in affine representation: field element X concatenated with field element Y. Field element `Z` is encoded as follows.\n * For the base field elements (Fp), `Z` is encoded as a big-endian number and must be lower than the field modulus.\n * 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).\n * The point at infinity is encoded as `(X,Y) = (0,0)`.\n * Groups G1 and G2 are denoted additively.\n * Fails if A or B is not in G.\n * A and/or B are allowed to be the point at infinity.\n * Does _not_ check if A and B are in the main prime-order subgroup.\n * @see Native TEAL opcode: [`ec_add`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_add)\n * Min AVM version: 10\n */\n add(g: Ec, a: bytes, b: bytes): bytes\n\n /**\n * maps field element A to group G\n * BN254 points are mapped by the SVDW map. BLS12-381 points are mapped by the SSWU map.\n * 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.\n * @see Native TEAL opcode: [`ec_map_to`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_map_to)\n * Min AVM version: 10\n */\n mapTo(g: Ec, a: bytes): bytes\n\n /**\n * for curve points A and scalars B, return curve point B0A0 + B1A1 + B2A2 + ... + BnAn\n * 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.\n * 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.\n * @see Native TEAL opcode: [`ec_multi_scalar_mul`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_multi_scalar_mul)\n * Min AVM version: 10\n */\n scalarMulMulti(g: Ec, a: bytes, b: bytes): bytes\n\n /**\n * 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\n * 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.\n * @see Native TEAL opcode: [`ec_pairing_check`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_pairing_check)\n * Min AVM version: 10\n */\n pairingCheck(g: Ec, a: bytes, b: bytes): boolean\n\n /**\n * for curve point A and scalar B, return the curve point BA, the point A multiplied by the scalar B.\n * 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.\n * @see Native TEAL opcode: [`ec_scalar_mul`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_scalar_mul)\n * Min AVM version: 10\n */\n scalarMul(g: Ec, a: bytes, b: bytes): bytes\n\n /**\n * 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.\n * @see Native TEAL opcode: [`ec_subgroup_check`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ec_subgroup_check)\n * Min AVM version: 10\n */\n subgroupCheck(g: Ec, a: bytes): boolean\n}\n\n/**\n * decompress pubkey A into components X, Y\n * The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.\n * @see Native TEAL opcode: [`ecdsa_pk_decompress`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ecdsa_pk_decompress)\n * Min AVM version: 5\n */\nexport type EcdsaPkDecompressType = (v: Ecdsa, a: bytes) => readonly [bytes, bytes]\n\n/**\n * for (data A, recovery id B, signature C, D) recover a public key\n * 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.\n * @see Native TEAL opcode: [`ecdsa_pk_recover`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ecdsa_pk_recover)\n * Min AVM version: 5\n */\nexport type EcdsaPkRecoverType = (v: Ecdsa, a: bytes, b: uint64, c: bytes, d: bytes) => readonly [bytes, bytes]\n\n/**\n * for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1}\n * 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.\n * @see Native TEAL opcode: [`ecdsa_verify`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ecdsa_verify)\n * Min AVM version: 5\n */\nexport type EcdsaVerifyType = (v: Ecdsa, a: bytes, b: bytes, c: bytes, d: bytes, e: bytes) => boolean\n\n/**\n * for (data A, signature B, pubkey C) verify the signature of (\"ProgData\" || program_hash || data) against the pubkey => {0 or 1}\n * 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.\n * @see Native TEAL opcode: [`ed25519verify`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ed25519verify)\n * Min AVM version: 1\n */\nexport type Ed25519verifyType = (a: bytes, b: bytes, c: bytes) => boolean\n\n/**\n * for (data A, signature B, pubkey C) verify the signature of the data against the pubkey => {0 or 1}\n * @see Native TEAL opcode: [`ed25519verify_bare`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#ed25519verify_bare)\n * Min AVM version: 7\n */\nexport type Ed25519verifyBareType = (a: bytes, b: bytes, c: bytes) => boolean\n\n/**\n * A raised to the Bth power. Fail if A == B == 0 and on overflow\n * @see Native TEAL opcode: [`exp`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#exp)\n * Min AVM version: 4\n */\nexport type ExpType = (a: uint64, b: uint64) => uint64\n\n/**\n * 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\n * @see Native TEAL opcode: [`expw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#expw)\n * Min AVM version: 4\n */\nexport type ExpwType = (a: uint64, b: uint64) => readonly [uint64, uint64]\n\n/**\n * 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\n * @see Native TEAL opcode: [`extract_uint16`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract_uint16)\n * Min AVM version: 5\n */\nexport type ExtractUint16Type = (a: bytes, b: uint64) => uint64\n\n/**\n * 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\n * @see Native TEAL opcode: [`extract_uint32`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract_uint32)\n * Min AVM version: 5\n */\nexport type ExtractUint32Type = (a: bytes, b: uint64) => uint64\n\n/**\n * 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\n * @see Native TEAL opcode: [`extract_uint64`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract_uint64)\n * Min AVM version: 5\n */\nexport type ExtractUint64Type = (a: bytes, b: uint64) => uint64\n\n/**\n * for (data A, compressed-format signature B, pubkey C) verify the signature of data against the pubkey\n * @see Native TEAL opcode: [`falcon_verify`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#falcon_verify)\n * Min AVM version: 11\n */\nexport type FalconVerifyType = (a: bytes, b: bytes, c: bytes) => boolean\n\n/**\n * ID of the asset or application created in the Ath transaction of the current group\n * `gaids` fails unless the requested transaction created an asset or application and A < GroupIndex.\n * @see Native TEAL opcode: [`gaids`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#gaids)\n * Min AVM version: 4\n */\nexport type GaidType = (a: uint64) => uint64\n\n/**\n * 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\n * see explanation of bit ordering in setbit\n * @see Native TEAL opcode: [`getbit`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#getbit)\n * Min AVM version: 3\n */\nexport type GetBitType = (a: uint64 | bytes, b: uint64) => uint64\n\n/**\n * Bth byte of A, as an integer. If B is greater than or equal to the array length, the program fails\n * @see Native TEAL opcode: [`getbyte`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#getbyte)\n * Min AVM version: 3\n */\nexport type GetByteType = (a: bytes, b: uint64) => uint64\n\n/**\n * Get values for inner transaction in the last group submitted\n */\nexport type GITxnType = {\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n sender(t: uint64): Account\n\n /**\n * microalgos\n * Min AVM version: 6\n */\n fee(t: uint64): uint64\n\n /**\n * round number\n * Min AVM version: 6\n */\n firstValid(t: uint64): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n * Min AVM version: 7\n */\n firstValidTime(t: uint64): uint64\n\n /**\n * round number\n * Min AVM version: 6\n */\n lastValid(t: uint64): uint64\n\n /**\n * Any data up to 1024 bytes\n * Min AVM version: 6\n */\n note(t: uint64): bytes\n\n /**\n * 32 byte lease value\n * Min AVM version: 6\n */\n lease(t: uint64): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n receiver(t: uint64): Account\n\n /**\n * microalgos\n * Min AVM version: 6\n */\n amount(t: uint64): uint64\n\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n closeRemainderTo(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n votePk(t: uint64): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n selectionPk(t: uint64): bytes\n\n /**\n * The first round that the participation key is valid.\n * Min AVM version: 6\n */\n voteFirst(t: uint64): uint64\n\n /**\n * The last round that the participation key is valid.\n * Min AVM version: 6\n */\n voteLast(t: uint64): uint64\n\n /**\n * Dilution for the 2-level participation key\n * Min AVM version: 6\n */\n voteKeyDilution(t: uint64): uint64\n\n /**\n * Transaction type as bytes\n * Min AVM version: 6\n */\n type(t: uint64): bytes\n\n /**\n * Transaction type as integer\n * Min AVM version: 6\n */\n typeEnum(t: uint64): uint64\n\n /**\n * Asset ID\n * Min AVM version: 6\n */\n xferAsset(t: uint64): Asset\n\n /**\n * value in Asset's units\n * Min AVM version: 6\n */\n assetAmount(t: uint64): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n * Min AVM version: 6\n */\n assetSender(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n assetReceiver(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 6\n */\n assetCloseTo(t: uint64): Account\n\n /**\n * Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1\n * Min AVM version: 6\n */\n groupIndex(t: uint64): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n * Min AVM version: 6\n */\n txId(t: uint64): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n * Min AVM version: 2\n */\n applicationId(t: uint64): Application\n\n /**\n * ApplicationCall transaction on completion action\n * Min AVM version: 2\n */\n onCompletion(t: uint64): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * Min AVM version: 2\n */\n applicationArgs(t: uint64, a: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n * Min AVM version: 2\n */\n numAppArgs(t: uint64): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n * Min AVM version: 2\n */\n accounts(t: uint64, a: uint64): Account\n\n /**\n * Number of Accounts\n * Min AVM version: 2\n */\n numAccounts(t: uint64): uint64\n\n /**\n * Approval program\n * Min AVM version: 2\n */\n approvalProgram(t: uint64): bytes\n\n /**\n * Clear state program\n * Min AVM version: 2\n */\n clearStateProgram(t: uint64): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n * Min AVM version: 2\n */\n rekeyTo(t: uint64): Account\n\n /**\n * Asset ID in asset config transaction\n * Min AVM version: 2\n */\n configAsset(t: uint64): Asset\n\n /**\n * Total number of units of this asset created\n * Min AVM version: 2\n */\n configAssetTotal(t: uint64): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n * Min AVM version: 2\n */\n configAssetDecimals(t: uint64): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n * Min AVM version: 2\n */\n configAssetDefaultFrozen(t: uint64): boolean\n\n /**\n * Unit name of the asset\n * Min AVM version: 2\n */\n configAssetUnitName(t: uint64): bytes\n\n /**\n * The asset name\n * Min AVM version: 2\n */\n configAssetName(t: uint64): bytes\n\n /**\n * URL\n * Min AVM version: 2\n */\n configAssetUrl(t: uint64): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n * Min AVM version: 2\n */\n configAssetMetadataHash(t: uint64): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetManager(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetReserve(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetFreeze(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetClawback(t: uint64): Account\n\n /**\n * Asset ID being frozen or un-frozen\n * Min AVM version: 2\n */\n freezeAsset(t: uint64): Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n * Min AVM version: 2\n */\n freezeAssetAccount(t: uint64): Account\n\n /**\n * The new frozen value, 0 or 1\n * Min AVM version: 2\n */\n freezeAssetFrozen(t: uint64): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n assets(t: uint64, a: uint64): Asset\n\n /**\n * Number of Assets\n * Min AVM version: 3\n */\n numAssets(t: uint64): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n applications(t: uint64, a: uint64): Application\n\n /**\n * Number of Applications\n * Min AVM version: 3\n */\n numApplications(t: uint64): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n * Min AVM version: 3\n */\n globalNumUint(t: uint64): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n globalNumByteSlice(t: uint64): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n * Min AVM version: 3\n */\n localNumUint(t: uint64): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n localNumByteSlice(t: uint64): uint64\n\n /**\n * 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.\n * Min AVM version: 4\n */\n extraProgramPages(t: uint64): uint64\n\n /**\n * Marks an account nonparticipating for rewards\n * Min AVM version: 5\n */\n nonparticipation(t: uint64): boolean\n\n /**\n * Log messages emitted by an application call (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n logs(t: uint64, a: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n numLogs(t: uint64): uint64\n\n /**\n * Asset ID allocated by the creation of an ASA (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n createdAssetId(t: uint64): Asset\n\n /**\n * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n createdApplicationId(t: uint64): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n * Min AVM version: 6\n */\n lastLog(t: uint64): bytes\n\n /**\n * 64 byte state proof public key\n * Min AVM version: 6\n */\n stateProofPk(t: uint64): bytes\n\n /**\n * Approval Program as an array of pages\n * Min AVM version: 7\n */\n approvalProgramPages(t: uint64, a: uint64): bytes\n\n /**\n * Number of Approval Program pages\n * Min AVM version: 7\n */\n numApprovalProgramPages(t: uint64): uint64\n\n /**\n * ClearState Program as an array of pages\n * Min AVM version: 7\n */\n clearStateProgramPages(t: uint64, a: uint64): bytes\n\n /**\n * Number of ClearState Program pages\n * Min AVM version: 7\n */\n numClearStateProgramPages(t: uint64): uint64\n}\n\n/**\n * Bth scratch space value of the Ath transaction in the current group\n * @see Native TEAL opcode: [`gloadss`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#gloadss)\n * Min AVM version: 6\n */\nexport type GloadBytesType = (a: uint64, b: uint64) => bytes\n\n/**\n * Bth scratch space value of the Ath transaction in the current group\n * @see Native TEAL opcode: [`gloadss`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#gloadss)\n * Min AVM version: 6\n */\nexport type GloadUint64Type = (a: uint64, b: uint64) => uint64\nexport type GlobalType = {\n /**\n * microalgos\n * Min AVM version: 1\n */\n get minTxnFee(): uint64\n\n /**\n * microalgos\n * Min AVM version: 1\n */\n get minBalance(): uint64\n\n /**\n * rounds\n * Min AVM version: 1\n */\n get maxTxnLife(): uint64\n\n /**\n * 32 byte address of all zero bytes\n * Min AVM version: 1\n */\n get zeroAddress(): Account\n\n /**\n * Number of transactions in this atomic transaction group. At least 1\n * Min AVM version: 1\n */\n get groupSize(): uint64\n\n /**\n * Maximum supported version\n * Min AVM version: 2\n */\n get logicSigVersion(): uint64\n\n /**\n * Current round number. Application mode only.\n * Min AVM version: 2\n */\n get round(): uint64\n\n /**\n * Last confirmed block UNIX timestamp. Fails if negative. Application mode only.\n * Min AVM version: 2\n */\n get latestTimestamp(): uint64\n\n /**\n * ID of current application executing. Application mode only.\n * Min AVM version: 2\n */\n get currentApplicationId(): Application\n\n /**\n * Address of the creator of the current application. Application mode only.\n * Min AVM version: 3\n */\n get creatorAddress(): Account\n\n /**\n * Address that the current application controls. Application mode only.\n * Min AVM version: 5\n */\n get currentApplicationAddress(): Account\n\n /**\n * ID of the transaction group. 32 zero bytes if the transaction is not part of a group.\n * Min AVM version: 5\n */\n get groupId(): bytes\n\n /**\n * The remaining cost that can be spent by opcodes in this program.\n * Min AVM version: 6\n */\n get opcodeBudget(): uint64\n\n /**\n * The application ID of the application that called this application. 0 if this application is at the top-level. Application mode only.\n * Min AVM version: 6\n */\n get callerApplicationId(): uint64\n\n /**\n * The application address of the application that called this application. ZeroAddress if this application is at the top-level. Application mode only.\n * Min AVM version: 6\n */\n get callerApplicationAddress(): Account\n\n /**\n * The additional minimum balance required to create (and opt-in to) an asset.\n * Min AVM version: 10\n */\n get assetCreateMinBalance(): uint64\n\n /**\n * The additional minimum balance required to opt-in to an asset.\n * Min AVM version: 10\n */\n get assetOptInMinBalance(): uint64\n\n /**\n * The Genesis Hash for the network.\n * Min AVM version: 10\n */\n get genesisHash(): bytes\n\n /**\n * Whether block proposal payouts are enabled.\n * Min AVM version: 11\n */\n get payoutsEnabled(): boolean\n\n /**\n * The fee required in a keyreg transaction to make an account incentive eligible.\n * Min AVM version: 11\n */\n get payoutsGoOnlineFee(): uint64\n\n /**\n * The percentage of transaction fees in a block that can be paid to the block proposer.\n * Min AVM version: 11\n */\n get payoutsPercent(): uint64\n\n /**\n * The minimum algo balance an account must have in the agreement round to receive block payouts in the proposal round.\n * Min AVM version: 11\n */\n get payoutsMinBalance(): uint64\n\n /**\n * The maximum algo balance an account can have in the agreement round to receive block payouts in the proposal round.\n * Min AVM version: 11\n */\n get payoutsMaxBalance(): uint64\n}\n\n/**\n * Get values for transactions in the current group\n */\nexport type GTxnType = {\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n sender(t: uint64): Account\n\n /**\n * microalgos\n * Min AVM version: 1\n */\n fee(t: uint64): uint64\n\n /**\n * round number\n * Min AVM version: 1\n */\n firstValid(t: uint64): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n * Min AVM version: 7\n */\n firstValidTime(t: uint64): uint64\n\n /**\n * round number\n * Min AVM version: 1\n */\n lastValid(t: uint64): uint64\n\n /**\n * Any data up to 1024 bytes\n * Min AVM version: 1\n */\n note(t: uint64): bytes\n\n /**\n * 32 byte lease value\n * Min AVM version: 1\n */\n lease(t: uint64): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n receiver(t: uint64): Account\n\n /**\n * microalgos\n * Min AVM version: 1\n */\n amount(t: uint64): uint64\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n closeRemainderTo(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n votePk(t: uint64): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n selectionPk(t: uint64): bytes\n\n /**\n * The first round that the participation key is valid.\n * Min AVM version: 1\n */\n voteFirst(t: uint64): uint64\n\n /**\n * The last round that the participation key is valid.\n * Min AVM version: 1\n */\n voteLast(t: uint64): uint64\n\n /**\n * Dilution for the 2-level participation key\n * Min AVM version: 1\n */\n voteKeyDilution(t: uint64): uint64\n\n /**\n * Transaction type as bytes\n * Min AVM version: 1\n */\n type(t: uint64): bytes\n\n /**\n * Transaction type as integer\n * Min AVM version: 1\n */\n typeEnum(t: uint64): uint64\n\n /**\n * Asset ID\n * Min AVM version: 1\n */\n xferAsset(t: uint64): Asset\n\n /**\n * value in Asset's units\n * Min AVM version: 1\n */\n assetAmount(t: uint64): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n * Min AVM version: 1\n */\n assetSender(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n assetReceiver(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n assetCloseTo(t: uint64): Account\n\n /**\n * Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1\n * Min AVM version: 1\n */\n groupIndex(t: uint64): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n * Min AVM version: 1\n */\n txId(t: uint64): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n * Min AVM version: 2\n */\n applicationId(t: uint64): Application\n\n /**\n * ApplicationCall transaction on completion action\n * Min AVM version: 2\n */\n onCompletion(t: uint64): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * Min AVM version: 2\n */\n applicationArgs(a: uint64, b: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n * Min AVM version: 2\n */\n numAppArgs(t: uint64): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n * Min AVM version: 2\n */\n accounts(a: uint64, b: uint64): Account\n\n /**\n * Number of Accounts\n * Min AVM version: 2\n */\n numAccounts(t: uint64): uint64\n\n /**\n * Approval program\n * Min AVM version: 2\n */\n approvalProgram(t: uint64): bytes\n\n /**\n * Clear state program\n * Min AVM version: 2\n */\n clearStateProgram(t: uint64): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n * Min AVM version: 2\n */\n rekeyTo(t: uint64): Account\n\n /**\n * Asset ID in asset config transaction\n * Min AVM version: 2\n */\n configAsset(t: uint64): Asset\n\n /**\n * Total number of units of this asset created\n * Min AVM version: 2\n */\n configAssetTotal(t: uint64): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n * Min AVM version: 2\n */\n configAssetDecimals(t: uint64): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n * Min AVM version: 2\n */\n configAssetDefaultFrozen(t: uint64): boolean\n\n /**\n * Unit name of the asset\n * Min AVM version: 2\n */\n configAssetUnitName(t: uint64): bytes\n\n /**\n * The asset name\n * Min AVM version: 2\n */\n configAssetName(t: uint64): bytes\n\n /**\n * URL\n * Min AVM version: 2\n */\n configAssetUrl(t: uint64): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n * Min AVM version: 2\n */\n configAssetMetadataHash(t: uint64): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetManager(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetReserve(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetFreeze(t: uint64): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n configAssetClawback(t: uint64): Account\n\n /**\n * Asset ID being frozen or un-frozen\n * Min AVM version: 2\n */\n freezeAsset(t: uint64): Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n * Min AVM version: 2\n */\n freezeAssetAccount(t: uint64): Account\n\n /**\n * The new frozen value, 0 or 1\n * Min AVM version: 2\n */\n freezeAssetFrozen(t: uint64): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n assets(a: uint64, b: uint64): Asset\n\n /**\n * Number of Assets\n * Min AVM version: 3\n */\n numAssets(t: uint64): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n applications(a: uint64, b: uint64): Application\n\n /**\n * Number of Applications\n * Min AVM version: 3\n */\n numApplications(t: uint64): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n * Min AVM version: 3\n */\n globalNumUint(t: uint64): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n globalNumByteSlice(t: uint64): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n * Min AVM version: 3\n */\n localNumUint(t: uint64): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n localNumByteSlice(t: uint64): uint64\n\n /**\n * 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.\n * Min AVM version: 4\n */\n extraProgramPages(t: uint64): uint64\n\n /**\n * Marks an account nonparticipating for rewards\n * Min AVM version: 5\n */\n nonparticipation(t: uint64): boolean\n\n /**\n * Log messages emitted by an application call (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n logs(a: uint64, b: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n numLogs(t: uint64): uint64\n\n /**\n * Asset ID allocated by the creation of an ASA (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n createdAssetId(t: uint64): Asset\n\n /**\n * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n createdApplicationId(t: uint64): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n * Min AVM version: 6\n */\n lastLog(t: uint64): bytes\n\n /**\n * 64 byte state proof public key\n * Min AVM version: 6\n */\n stateProofPk(t: uint64): bytes\n\n /**\n * Approval Program as an array of pages\n * Min AVM version: 7\n */\n approvalProgramPages(a: uint64, b: uint64): bytes\n\n /**\n * Number of Approval Program pages\n * Min AVM version: 7\n */\n numApprovalProgramPages(t: uint64): uint64\n\n /**\n * ClearState Program as an array of pages\n * Min AVM version: 7\n */\n clearStateProgramPages(a: uint64, b: uint64): bytes\n\n /**\n * Number of ClearState Program pages\n * Min AVM version: 7\n */\n numClearStateProgramPages(t: uint64): uint64\n}\n\n/**\n * converts uint64 A to big-endian byte array, always of length 8\n * @see Native TEAL opcode: [`itob`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#itob)\n * Min AVM version: 1\n */\nexport type ItobType = (a: uint64) => bytes\n\n/**\n * Get values for the last inner transaction\n */\nexport type ITxnType = {\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get sender(): Account\n\n /**\n * microalgos\n * Min AVM version: 5\n */\n get fee(): uint64\n\n /**\n * round number\n * Min AVM version: 5\n */\n get firstValid(): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n * Min AVM version: 7\n */\n get firstValidTime(): uint64\n\n /**\n * round number\n * Min AVM version: 5\n */\n get lastValid(): uint64\n\n /**\n * Any data up to 1024 bytes\n * Min AVM version: 5\n */\n get note(): bytes\n\n /**\n * 32 byte lease value\n * Min AVM version: 5\n */\n get lease(): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get receiver(): Account\n\n /**\n * microalgos\n * Min AVM version: 5\n */\n get amount(): uint64\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get closeRemainderTo(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get votePk(): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get selectionPk(): bytes\n\n /**\n * The first round that the participation key is valid.\n * Min AVM version: 5\n */\n get voteFirst(): uint64\n\n /**\n * The last round that the participation key is valid.\n * Min AVM version: 5\n */\n get voteLast(): uint64\n\n /**\n * Dilution for the 2-level participation key\n * Min AVM version: 5\n */\n get voteKeyDilution(): uint64\n\n /**\n * Transaction type as bytes\n * Min AVM version: 5\n */\n get type(): bytes\n\n /**\n * Transaction type as integer\n * Min AVM version: 5\n */\n get typeEnum(): uint64\n\n /**\n * Asset ID\n * Min AVM version: 5\n */\n get xferAsset(): Asset\n\n /**\n * value in Asset's units\n * Min AVM version: 5\n */\n get assetAmount(): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n * Min AVM version: 5\n */\n get assetSender(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get assetReceiver(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n get assetCloseTo(): Account\n\n /**\n * Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1\n * Min AVM version: 5\n */\n get groupIndex(): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n * Min AVM version: 5\n */\n get txId(): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n * Min AVM version: 2\n */\n get applicationId(): Application\n\n /**\n * ApplicationCall transaction on completion action\n * Min AVM version: 2\n */\n get onCompletion(): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * Min AVM version: 2\n */\n applicationArgs(a: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n * Min AVM version: 2\n */\n get numAppArgs(): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n * Min AVM version: 2\n */\n accounts(a: uint64): Account\n\n /**\n * Number of Accounts\n * Min AVM version: 2\n */\n get numAccounts(): uint64\n\n /**\n * Approval program\n * Min AVM version: 2\n */\n get approvalProgram(): bytes\n\n /**\n * Clear state program\n * Min AVM version: 2\n */\n get clearStateProgram(): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n * Min AVM version: 2\n */\n get rekeyTo(): Account\n\n /**\n * Asset ID in asset config transaction\n * Min AVM version: 2\n */\n get configAsset(): Asset\n\n /**\n * Total number of units of this asset created\n * Min AVM version: 2\n */\n get configAssetTotal(): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n * Min AVM version: 2\n */\n get configAssetDecimals(): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n * Min AVM version: 2\n */\n get configAssetDefaultFrozen(): boolean\n\n /**\n * Unit name of the asset\n * Min AVM version: 2\n */\n get configAssetUnitName(): bytes\n\n /**\n * The asset name\n * Min AVM version: 2\n */\n get configAssetName(): bytes\n\n /**\n * URL\n * Min AVM version: 2\n */\n get configAssetUrl(): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n * Min AVM version: 2\n */\n get configAssetMetadataHash(): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetManager(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetReserve(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetFreeze(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetClawback(): Account\n\n /**\n * Asset ID being frozen or un-frozen\n * Min AVM version: 2\n */\n get freezeAsset(): Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n * Min AVM version: 2\n */\n get freezeAssetAccount(): Account\n\n /**\n * The new frozen value, 0 or 1\n * Min AVM version: 2\n */\n get freezeAssetFrozen(): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n assets(a: uint64): Asset\n\n /**\n * Number of Assets\n * Min AVM version: 3\n */\n get numAssets(): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n applications(a: uint64): Application\n\n /**\n * Number of Applications\n * Min AVM version: 3\n */\n get numApplications(): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n * Min AVM version: 3\n */\n get globalNumUint(): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n get globalNumByteSlice(): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n * Min AVM version: 3\n */\n get localNumUint(): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n get localNumByteSlice(): uint64\n\n /**\n * 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.\n * Min AVM version: 4\n */\n get extraProgramPages(): uint64\n\n /**\n * Marks an account nonparticipating for rewards\n * Min AVM version: 5\n */\n get nonparticipation(): boolean\n\n /**\n * Log messages emitted by an application call (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n logs(a: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n get numLogs(): uint64\n\n /**\n * Asset ID allocated by the creation of an ASA (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n get createdAssetId(): Asset\n\n /**\n * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n get createdApplicationId(): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n * Min AVM version: 6\n */\n get lastLog(): bytes\n\n /**\n * 64 byte state proof public key\n * Min AVM version: 6\n */\n get stateProofPk(): bytes\n\n /**\n * Approval Program as an array of pages\n * Min AVM version: 7\n */\n approvalProgramPages(a: uint64): bytes\n\n /**\n * Number of Approval Program pages\n * Min AVM version: 7\n */\n get numApprovalProgramPages(): uint64\n\n /**\n * ClearState Program as an array of pages\n * Min AVM version: 7\n */\n clearStateProgramPages(a: uint64): bytes\n\n /**\n * Number of ClearState Program pages\n * Min AVM version: 7\n */\n get numClearStateProgramPages(): uint64\n}\n\n/**\n * Create inner transactions\n */\nexport type ITxnCreateType = {\n /**\n * begin preparation of a new inner transaction in a new transaction group\n * `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.\n * @see Native TEAL opcode: [`itxn_begin`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#itxn_begin)\n * Min AVM version: 5\n */\n begin(): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setSender(a: Account): void\n\n /**\n * microalgos\n * Min AVM version: 5\n */\n setFee(a: uint64): void\n\n /**\n * Any data up to 1024 bytes\n * Min AVM version: 5\n */\n setNote(a: bytes): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setReceiver(a: Account): void\n\n /**\n * microalgos\n * Min AVM version: 5\n */\n setAmount(a: uint64): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setCloseRemainderTo(a: Account): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setVotePk(a: bytes): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setSelectionPk(a: bytes): void\n\n /**\n * The first round that the participation key is valid.\n * Min AVM version: 5\n */\n setVoteFirst(a: uint64): void\n\n /**\n * The last round that the participation key is valid.\n * Min AVM version: 5\n */\n setVoteLast(a: uint64): void\n\n /**\n * Dilution for the 2-level participation key\n * Min AVM version: 5\n */\n setVoteKeyDilution(a: uint64): void\n\n /**\n * Transaction type as bytes\n * Min AVM version: 5\n */\n setType(a: bytes): void\n\n /**\n * Transaction type as integer\n * Min AVM version: 5\n */\n setTypeEnum(a: uint64): void\n\n /**\n * Asset ID\n * Min AVM version: 5\n */\n setXferAsset(a: Asset | uint64): void\n\n /**\n * value in Asset's units\n * Min AVM version: 5\n */\n setAssetAmount(a: uint64): void\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n * Min AVM version: 5\n */\n setAssetSender(a: Account): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setAssetReceiver(a: Account): void\n\n /**\n * 32 byte address\n * Min AVM version: 5\n */\n setAssetCloseTo(a: Account): void\n\n /**\n * ApplicationID from ApplicationCall transaction\n * Min AVM version: 2\n */\n setApplicationId(a: Application | uint64): void\n\n /**\n * ApplicationCall transaction on completion action\n * Min AVM version: 2\n */\n setOnCompletion(a: uint64): void\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * Min AVM version: 2\n */\n setApplicationArgs(a: bytes): void\n\n /**\n * Accounts listed in the ApplicationCall transaction\n * Min AVM version: 2\n */\n setAccounts(a: Account): void\n\n /**\n * Approval program\n * Min AVM version: 2\n */\n setApprovalProgram(a: bytes): void\n\n /**\n * Clear state program\n * Min AVM version: 2\n */\n setClearStateProgram(a: bytes): void\n\n /**\n * 32 byte Sender's new AuthAddr\n * Min AVM version: 2\n */\n setRekeyTo(a: Account): void\n\n /**\n * Asset ID in asset config transaction\n * Min AVM version: 2\n */\n setConfigAsset(a: Asset | uint64): void\n\n /**\n * Total number of units of this asset created\n * Min AVM version: 2\n */\n setConfigAssetTotal(a: uint64): void\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n * Min AVM version: 2\n */\n setConfigAssetDecimals(a: uint64): void\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n * Min AVM version: 2\n */\n setConfigAssetDefaultFrozen(a: boolean): void\n\n /**\n * Unit name of the asset\n * Min AVM version: 2\n */\n setConfigAssetUnitName(a: bytes): void\n\n /**\n * The asset name\n * Min AVM version: 2\n */\n setConfigAssetName(a: bytes): void\n\n /**\n * URL\n * Min AVM version: 2\n */\n setConfigAssetUrl(a: bytes): void\n\n /**\n * 32 byte commitment to unspecified asset metadata\n * Min AVM version: 2\n */\n setConfigAssetMetadataHash(a: bytes): void\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n setConfigAssetManager(a: Account): void\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n setConfigAssetReserve(a: Account): void\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n setConfigAssetFreeze(a: Account): void\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n setConfigAssetClawback(a: Account): void\n\n /**\n * Asset ID being frozen or un-frozen\n * Min AVM version: 2\n */\n setFreezeAsset(a: Asset | uint64): void\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n * Min AVM version: 2\n */\n setFreezeAssetAccount(a: Account): void\n\n /**\n * The new frozen value, 0 or 1\n * Min AVM version: 2\n */\n setFreezeAssetFrozen(a: boolean): void\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n setAssets(a: uint64): void\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n setApplications(a: uint64): void\n\n /**\n * Number of global state integers in ApplicationCall\n * Min AVM version: 3\n */\n setGlobalNumUint(a: uint64): void\n\n /**\n * Number of global state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n setGlobalNumByteSlice(a: uint64): void\n\n /**\n * Number of local state integers in ApplicationCall\n * Min AVM version: 3\n */\n setLocalNumUint(a: uint64): void\n\n /**\n * Number of local state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n setLocalNumByteSlice(a: uint64): void\n\n /**\n * 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.\n * Min AVM version: 4\n */\n setExtraProgramPages(a: uint64): void\n\n /**\n * Marks an account nonparticipating for rewards\n * Min AVM version: 5\n */\n setNonparticipation(a: boolean): void\n\n /**\n * 64 byte state proof public key\n * Min AVM version: 6\n */\n setStateProofPk(a: bytes): void\n\n /**\n * Approval Program as an array of pages\n * Min AVM version: 7\n */\n setApprovalProgramPages(a: bytes): void\n\n /**\n * ClearState Program as an array of pages\n * Min AVM version: 7\n */\n setClearStateProgramPages(a: bytes): void\n\n /**\n * begin preparation of a new inner transaction in the same transaction group\n * `itxn_next` initializes the transaction exactly as `itxn_begin` does\n * @see Native TEAL opcode: [`itxn_next`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#itxn_next)\n * Min AVM version: 6\n */\n next(): void\n\n /**\n * 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.\n * `itxn_submit` resets the current transaction so that it can not be resubmitted. A new `itxn_begin` is required to prepare another inner transaction.\n * @see Native TEAL opcode: [`itxn_submit`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#itxn_submit)\n * Min AVM version: 5\n */\n submit(): void\n}\nexport type JsonRefType = {\n jsonString(a: bytes, b: bytes): bytes\n jsonUint64(a: bytes, b: bytes): uint64\n jsonObject(a: bytes, b: bytes): bytes\n}\n\n/**\n * Keccak256 hash of value A, yields [32]byte\n * @see Native TEAL opcode: [`keccak256`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#keccak256)\n * Min AVM version: 1\n */\nexport type Keccak256Type = (a: bytes) => bytes\n\n/**\n * yields length of byte value A\n * @see Native TEAL opcode: [`len`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#len)\n * Min AVM version: 1\n */\nexport type LenType = (a: bytes) => uint64\n\n/**\n * Load or store scratch values\n */\nexport type ScratchType = {\n /**\n * Ath scratch space value. All scratch spaces are 0 at program start.\n * @see Native TEAL opcode: [`loads`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#loads)\n * Min AVM version: 5\n */\n loadBytes(a: uint64): bytes\n\n /**\n * Ath scratch space value. All scratch spaces are 0 at program start.\n * @see Native TEAL opcode: [`loads`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#loads)\n * Min AVM version: 5\n */\n loadUint64(a: uint64): uint64\n\n /**\n * store B to the Ath scratch space\n * @see Native TEAL opcode: [`stores`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#stores)\n * Min AVM version: 5\n */\n store(a: uint64, b: uint64 | bytes): void\n}\n\n/**\n * 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.\n * @param Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset).\n * * @return value.\n * @see Native TEAL opcode: [`min_balance`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#min_balance)\n * Min AVM version: 3\n */\nexport type MinBalanceType = (a: Account | uint64) => uint64\n\n/**\n * A times B as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low\n * @see Native TEAL opcode: [`mulw`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#mulw)\n * Min AVM version: 1\n */\nexport type MulwType = (a: uint64, b: uint64) => readonly [uint64, uint64]\n\n/**\n * the total online stake in the agreement round\n * @see Native TEAL opcode: [`online_stake`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#online_stake)\n * Min AVM version: 11\n */\nexport type OnlineStakeType = () => uint64\n\n/**\n * Copy of A with the bytes starting at B replaced by the bytes of C. Fails if B+len(C) exceeds len(A)\n * `replace3` can be called using `replace` with no immediates.\n * @see Native TEAL opcode: [`replace3`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#replace3)\n * Min AVM version: 7\n */\nexport type ReplaceType = (a: bytes, b: uint64, c: bytes) => bytes\n\n/**\n * 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\n * @see Native TEAL opcode: [`setbyte`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#setbyte)\n * Min AVM version: 3\n */\nexport type SetByteType = (a: bytes, b: uint64, c: uint64) => bytes\n\n/**\n * SHA256 hash of value A, yields [32]byte\n * @see Native TEAL opcode: [`sha256`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sha256)\n * Min AVM version: 1\n */\nexport type Sha256Type = (a: bytes) => bytes\n\n/**\n * SHA3_256 hash of value A, yields [32]byte\n * @see Native TEAL opcode: [`sha3_256`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sha3_256)\n * Min AVM version: 7\n */\nexport type Sha3_256Type = (a: bytes) => bytes\n\n/**\n * SHA512_256 hash of value A, yields [32]byte\n * @see Native TEAL opcode: [`sha512_256`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sha512_256)\n * Min AVM version: 1\n */\nexport type Sha512_256Type = (a: bytes) => bytes\n\n/**\n * A times 2^B, modulo 2^64\n * @see Native TEAL opcode: [`shl`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#shl)\n * Min AVM version: 4\n */\nexport type ShlType = (a: uint64, b: uint64) => uint64\n\n/**\n * A divided by 2^B\n * @see Native TEAL opcode: [`shr`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#shr)\n * Min AVM version: 4\n */\nexport type ShrType = (a: uint64, b: uint64) => uint64\n\n/**\n * The largest integer I such that I^2 <= A\n * @see Native TEAL opcode: [`sqrt`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sqrt)\n * Min AVM version: 4\n */\nexport type SqrtType = (a: uint64) => uint64\n\n/**\n * 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\n * @see Native TEAL opcode: [`substring3`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#substring3)\n * Min AVM version: 2\n */\nexport type SubstringType = (a: bytes, b: uint64, c: uint64) => bytes\n\n/**\n * sumhash512 of value A, yields [64]byte\n * @see Native TEAL opcode: [`sumhash512`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#sumhash512)\n * Min AVM version: 11\n */\nexport type Sumhash512Type = (a: bytes) => bytes\n\n/**\n * Get values for the current executing transaction\n */\nexport type TxnType = {\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get sender(): Account\n\n /**\n * microalgos\n * Min AVM version: 1\n */\n get fee(): uint64\n\n /**\n * round number\n * Min AVM version: 1\n */\n get firstValid(): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n * Min AVM version: 7\n */\n get firstValidTime(): uint64\n\n /**\n * round number\n * Min AVM version: 1\n */\n get lastValid(): uint64\n\n /**\n * Any data up to 1024 bytes\n * Min AVM version: 1\n */\n get note(): bytes\n\n /**\n * 32 byte lease value\n * Min AVM version: 1\n */\n get lease(): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get receiver(): Account\n\n /**\n * microalgos\n * Min AVM version: 1\n */\n get amount(): uint64\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get closeRemainderTo(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get votePk(): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get selectionPk(): bytes\n\n /**\n * The first round that the participation key is valid.\n * Min AVM version: 1\n */\n get voteFirst(): uint64\n\n /**\n * The last round that the participation key is valid.\n * Min AVM version: 1\n */\n get voteLast(): uint64\n\n /**\n * Dilution for the 2-level participation key\n * Min AVM version: 1\n */\n get voteKeyDilution(): uint64\n\n /**\n * Transaction type as bytes\n * Min AVM version: 1\n */\n get type(): bytes\n\n /**\n * Transaction type as integer\n * Min AVM version: 1\n */\n get typeEnum(): uint64\n\n /**\n * Asset ID\n * Min AVM version: 1\n */\n get xferAsset(): Asset\n\n /**\n * value in Asset's units\n * Min AVM version: 1\n */\n get assetAmount(): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n * Min AVM version: 1\n */\n get assetSender(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get assetReceiver(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 1\n */\n get assetCloseTo(): Account\n\n /**\n * Position of this transaction within an atomic transaction group. A stand-alone transaction is implicitly element 0 in a group of 1\n * Min AVM version: 1\n */\n get groupIndex(): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n * Min AVM version: 1\n */\n get txId(): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n * Min AVM version: 2\n */\n get applicationId(): Application\n\n /**\n * ApplicationCall transaction on completion action\n * Min AVM version: 2\n */\n get onCompletion(): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * Min AVM version: 2\n */\n applicationArgs(a: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n * Min AVM version: 2\n */\n get numAppArgs(): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n * Min AVM version: 2\n */\n accounts(a: uint64): Account\n\n /**\n * Number of Accounts\n * Min AVM version: 2\n */\n get numAccounts(): uint64\n\n /**\n * Approval program\n * Min AVM version: 2\n */\n get approvalProgram(): bytes\n\n /**\n * Clear state program\n * Min AVM version: 2\n */\n get clearStateProgram(): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n * Min AVM version: 2\n */\n get rekeyTo(): Account\n\n /**\n * Asset ID in asset config transaction\n * Min AVM version: 2\n */\n get configAsset(): Asset\n\n /**\n * Total number of units of this asset created\n * Min AVM version: 2\n */\n get configAssetTotal(): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n * Min AVM version: 2\n */\n get configAssetDecimals(): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n * Min AVM version: 2\n */\n get configAssetDefaultFrozen(): boolean\n\n /**\n * Unit name of the asset\n * Min AVM version: 2\n */\n get configAssetUnitName(): bytes\n\n /**\n * The asset name\n * Min AVM version: 2\n */\n get configAssetName(): bytes\n\n /**\n * URL\n * Min AVM version: 2\n */\n get configAssetUrl(): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n * Min AVM version: 2\n */\n get configAssetMetadataHash(): bytes\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetManager(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetReserve(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetFreeze(): Account\n\n /**\n * 32 byte address\n * Min AVM version: 2\n */\n get configAssetClawback(): Account\n\n /**\n * Asset ID being frozen or un-frozen\n * Min AVM version: 2\n */\n get freezeAsset(): Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n * Min AVM version: 2\n */\n get freezeAssetAccount(): Account\n\n /**\n * The new frozen value, 0 or 1\n * Min AVM version: 2\n */\n get freezeAssetFrozen(): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n assets(a: uint64): Asset\n\n /**\n * Number of Assets\n * Min AVM version: 3\n */\n get numAssets(): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n * Min AVM version: 3\n */\n applications(a: uint64): Application\n\n /**\n * Number of Applications\n * Min AVM version: 3\n */\n get numApplications(): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n * Min AVM version: 3\n */\n get globalNumUint(): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n get globalNumByteSlice(): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n * Min AVM version: 3\n */\n get localNumUint(): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\n * Min AVM version: 3\n */\n get localNumByteSlice(): uint64\n\n /**\n * 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.\n * Min AVM version: 4\n */\n get extraProgramPages(): uint64\n\n /**\n * Marks an account nonparticipating for rewards\n * Min AVM version: 5\n */\n get nonparticipation(): boolean\n\n /**\n * Log messages emitted by an application call (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n logs(a: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n get numLogs(): uint64\n\n /**\n * Asset ID allocated by the creation of an ASA (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n get createdAssetId(): Asset\n\n /**\n * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only\n * Min AVM version: 5\n */\n get createdApplicationId(): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n * Min AVM version: 6\n */\n get lastLog(): bytes\n\n /**\n * 64 byte state proof public key\n * Min AVM version: 6\n */\n get stateProofPk(): bytes\n\n /**\n * Approval Program as an array of pages\n * Min AVM version: 7\n */\n approvalProgramPages(a: uint64): bytes\n\n /**\n * Number of Approval Program pages\n * Min AVM version: 7\n */\n get numApprovalProgramPages(): uint64\n\n /**\n * ClearState Program as an array of pages\n * Min AVM version: 7\n */\n clearStateProgramPages(a: uint64): bytes\n\n /**\n * Number of ClearState Program pages\n * Min AVM version: 7\n */\n get numClearStateProgramPages(): uint64\n}\nexport type VoterParamsType = {\n /**\n * Online stake in microalgos\n * Min AVM version: 6\n */\n voterBalance(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * Had this account opted into block payouts\n * Min AVM version: 11\n */\n voterIncentiveEligible(a: Account | uint64): readonly [boolean, boolean]\n}\n\n/**\n * Verify the proof B of message A against pubkey C. Returns vrf output and verification flag.\n * `VrfAlgorand` is the VRF used in Algorand. It is ECVRF-ED25519-SHA512-Elligator2, specified in the IETF internet draft [draft-irtf-cfrg-vrf-03](https://datatracker.ietf.org/doc/draft-irtf-cfrg-vrf/03/).\n * @see Native TEAL opcode: [`vrf_verify`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#vrf_verify)\n * Min AVM version: 7\n */\nexport type VrfVerifyType = (s: VrfVerify, a: bytes, b: bytes, c: bytes) => readonly [bytes, boolean]\nexport type ExtractType = ((a: bytes, b: uint64) => bytes) & ((a: bytes, b: uint64, c: uint64) => bytes)\nexport type SelectType = ((a: bytes, b: bytes, c: uint64) => bytes) & ((a: uint64, b: uint64, c: uint64) => uint64)\nexport type SetBitType = ((target: bytes, n: uint64, c: uint64) => bytes) & ((target: uint64, n: uint64, c: uint64) => uint64)\nexport type OpsNamespace = {\n AcctParams: AcctParamsType\n addw: AddwType\n AppGlobal: AppGlobalType\n AppLocal: AppLocalType\n appOptedIn: AppOptedInType\n AppParams: AppParamsType\n arg: ArgType\n AssetHolding: AssetHoldingType\n AssetParams: AssetParamsType\n balance: BalanceType\n base64Decode: Base64DecodeType\n bitLength: BitLengthType\n Block: BlockType\n Box: BoxType\n bsqrt: BsqrtType\n btoi: BtoiType\n bzero: BzeroType\n concat: ConcatType\n divmodw: DivmodwType\n divw: DivwType\n EllipticCurve: EllipticCurveType\n ecdsaPkDecompress: EcdsaPkDecompressType\n ecdsaPkRecover: EcdsaPkRecoverType\n ecdsaVerify: EcdsaVerifyType\n ed25519verify: Ed25519verifyType\n ed25519verifyBare: Ed25519verifyBareType\n exp: ExpType\n expw: ExpwType\n extractUint16: ExtractUint16Type\n extractUint32: ExtractUint32Type\n extractUint64: ExtractUint64Type\n falconVerify: FalconVerifyType\n gaid: GaidType\n getBit: GetBitType\n getByte: GetByteType\n GITxn: GITxnType\n gloadBytes: GloadBytesType\n gloadUint64: GloadUint64Type\n Global: GlobalType\n GTxn: GTxnType\n itob: ItobType\n ITxn: ITxnType\n ITxnCreate: ITxnCreateType\n JsonRef: JsonRefType\n keccak256: Keccak256Type\n len: LenType\n Scratch: ScratchType\n minBalance: MinBalanceType\n mulw: MulwType\n onlineStake: OnlineStakeType\n replace: ReplaceType\n setByte: SetByteType\n sha256: Sha256Type\n sha3_256: Sha3_256Type\n sha512_256: Sha512_256Type\n shl: ShlType\n shr: ShrType\n sqrt: SqrtType\n substring: SubstringType\n sumhash512: Sumhash512Type\n Txn: TxnType\n VoterParams: VoterParamsType\n vrfVerify: VrfVerifyType\n extract: ExtractType\n select: SelectType\n setBit: SetBitType\n}\n","import { ARC4Encoded } from './arc4'\nimport { ctxMgr } from './execution-context'\nimport { AssertError, AvmError, internalError } from './impl/errors'\nimport { nameOfType } from './impl/name-of-type'\nimport { AlgoTsPrimitiveCls, BigUintCls, BytesCls, Uint64Cls } from './impl/primitives'\nimport { biguint, BigUintCompat, bytes, BytesBacked, BytesCompat, StringCompat, uint64, Uint64Compat } from './primitives'\n\nexport const toBytes = (val: unknown): bytes => {\n if (val instanceof AlgoTsPrimitiveCls) return val.toBytes().asAlgoTs()\n if (val instanceof ARC4Encoded) return val.bytes\n\n switch (typeof val) {\n case 'string':\n return BytesCls.fromCompat(val).asAlgoTs()\n case 'bigint':\n return BigUintCls.fromCompat(val).toBytes().asAlgoTs()\n case 'number':\n return Uint64Cls.fromCompat(val).toBytes().asAlgoTs()\n default:\n internalError(`Unsupported arg type ${nameOfType(val)}`)\n }\n}\n\nexport function log(...args: Array<Uint64Compat | BytesCompat | BigUintCompat | StringCompat | BytesBacked>): void {\n ctxMgr.instance.log(args.map(toBytes).reduce((left, right) => left.concat(right)))\n}\n\nexport function assert(condition: unknown, message?: string): asserts condition {\n if (!condition) {\n throw new AssertError(message ?? 'Assertion failed')\n }\n}\n\nexport function err(message?: string): never {\n throw new AvmError(message ?? 'err opcode executed')\n}\n\ntype NumericComparison<T> = T | { lessThan: T } | { greaterThan: T } | { greaterThanEq: T } | { lessThanEq: T } | { between: [T, T] }\n\ntype ComparisonFor<T> = T extends uint64 | biguint ? NumericComparison<T> : T\n\ntype MatchTest<T> = {\n [key in keyof T]?: ComparisonFor<T[key]>\n}\n\nexport function match<T>(subject: T, test: MatchTest<T>): boolean {\n return true\n}\nexport function assertMatch<T>(subject: T, test: MatchTest<T>, message?: string): boolean {\n return true\n}\n\nexport enum OpUpFeeSource {\n GroupCredit = 0,\n AppAccount = 1,\n Any = 2,\n}\n\nexport function ensureBudget(budget: uint64, feeSource: OpUpFeeSource = OpUpFeeSource.GroupCredit) {\n throw new Error('Not implemented')\n}\n\nexport function urange(stop: Uint64Compat): IterableIterator<uint64>\nexport function urange(start: Uint64Compat, stop: Uint64Compat): IterableIterator<uint64>\nexport function urange(start: Uint64Compat, stop: Uint64Compat, step: Uint64Compat): IterableIterator<uint64>\nexport function urange(a: Uint64Compat, b?: Uint64Compat, c?: Uint64Compat): IterableIterator<uint64> {\n throw new Error('Not implemented')\n}\n","import { ctxMgr } from './execution-context'\nimport { bytes, uint64 } from './primitives'\n\nexport type Account = {\n readonly bytes: bytes\n\n /**\n * Account balance in microalgos\n *\n * Account must be an available resource\n */\n readonly balance: uint64\n\n /**\n * Minimum required balance for account, in microalgos\n *\n * Account must be an available resource\n */\n readonly minBalance: uint64\n\n /**\n * Address the account is rekeyed to\n *\n * Account must be an available resource\n */\n readonly authAddress: Account\n\n /**\n * The total number of uint64 values allocated by this account in Global and Local States.\n *\n * Account must be an available resource\n */\n readonly totalNumUint: uint64\n\n /**\n * The total number of byte array values allocated by this account in Global and Local States.\n *\n * Account must be an available resource\n */\n readonly totalNumByteSlice: uint64\n\n /**\n * The number of extra app code pages used by this account.\n *\n * Account must be an available resource\n */\n readonly totalExtraAppPages: uint64\n\n /**\n * The number of existing apps created by this account.\n *\n * Account must be an available resource\n */\n readonly totalAppsCreated: uint64\n\n /**\n * The number of apps this account is opted into.\n *\n * Account must be an available resource\n */\n readonly totalAppsOptedIn: uint64\n\n /**\n * The number of existing ASAs created by this account.\n *\n * Account must be an available resource\n */\n readonly totalAssetsCreated: uint64\n\n /**\n * The numbers of ASAs held by this account (including ASAs this account created).\n *\n * Account must be an available resource\n */\n readonly totalAssets: uint64\n\n /**\n * The number of existing boxes created by this account's app.\n *\n * Account must be an available resource\n */\n readonly totalBoxes: uint64\n\n /**\n * The total number of bytes used by this account's app's box keys and values.\n *\n * Account must be an available resource\n */\n readonly totalBoxBytes: uint64\n\n /**\n * Returns true if this account is opted in to the specified Asset or Application.\n * Note: Account and Asset/Application must be an available resource\n *\n * @param assetOrApp\n */\n isOptedIn(assetOrApp: Asset | Application): boolean\n}\n\nexport function Account(): Account\nexport function Account(address: bytes): Account\nexport function Account(address?: bytes): Account {\n return ctxMgr.instance.account(address)\n}\n\nexport function Asset(): Asset\nexport function Asset(assetId: uint64): Asset\nexport function Asset(assetId?: uint64): Asset {\n return ctxMgr.instance.asset(assetId)\n}\n/**\n * An Asset on the Algorand network.\n */\nexport type Asset = {\n /**\n * Returns the id of the Asset\n */\n readonly id: uint64\n\n /**\n * Total number of units of this asset\n */\n readonly total: uint64\n\n /**\n * @see AssetParams.decimals\n */\n readonly decimals: uint64\n\n /**\n * Frozen by default or not\n */\n readonly defaultFrozen: boolean\n\n /**\n * Asset unit name\n */\n readonly unitName: bytes\n\n /**\n * Asset name\n */\n readonly name: bytes\n\n /**\n * URL with additional info about the asset\n */\n readonly url: bytes\n\n /**\n * Arbitrary commitment\n */\n readonly metadataHash: bytes\n\n /**\n * Manager address\n */\n readonly manager: Account\n\n /**\n * Reserve address\n */\n readonly reserve: Account\n\n /**\n * Freeze address\n */\n readonly freeze: Account\n\n /**\n * Clawback address\n */\n readonly clawback: Account\n\n /**\n * Creator address\n */\n readonly creator: Account\n\n /**\n * Amount of the asset unit held by this account. Fails if the account has not\n * opted in to the asset.\n * Asset and supplied Account must be an available resource\n * @param account Account\n * @return balance: uint64\n */\n balance(account: Account): uint64\n\n /**\n * Is the asset frozen or not. Fails if the account has not\n * opted in to the asset.\n * Asset and supplied Account must be an available resource\n * @param account Account\n * @return isFrozen: boolean\n */\n frozen(account: Account): boolean\n}\n\nexport function Application(): Application\nexport function Application(applicationId: uint64): Application\nexport function Application(applicationId?: uint64): Application {\n return ctxMgr.instance.application(applicationId)\n}\n\n/**\n * An Application on the Algorand network.\n */\nexport type Application = {\n /**\n * The id of this application on the current network\n */\n readonly id: uint64\n /**\n * Bytecode of Approval Program\n */\n readonly approvalProgram: bytes\n\n /**\n * Bytecode of Clear State Program\n */\n readonly clearStateProgram: bytes\n\n /**\n * Number of uint64 values allowed in Global State\n */\n readonly globalNumUint: uint64\n\n /**\n * Number of byte array values allowed in Global State\n */\n readonly globalNumBytes: uint64\n\n /**\n * Number of uint64 values allowed in Local State\n */\n readonly localNumUint: uint64\n\n /**\n * Number of byte array values allowed in Local State\n */\n readonly localNumBytes: uint64\n\n /**\n * Number of Extra Program Pages of code space\n */\n readonly extraProgramPages: uint64\n\n /**\n * Creator address\n */\n readonly creator: Account\n\n /**\n * Address for which this application has authority\n */\n readonly address: Account\n}\n","import { ctxMgr } from './execution-context'\nimport { bytes, uint64 } from './primitives'\n\nexport type Box<TValue> = {\n readonly key: bytes\n value: TValue\n\n readonly exists: boolean\n get(options: { default: TValue }): TValue\n delete(): boolean\n maybe(): readonly [TValue, boolean]\n readonly length: uint64\n}\n\nexport type BoxMap<TKey, TValue> = {\n readonly keyPrefix: bytes\n get(key: TKey): TValue\n get(key: TKey, options: { default: TValue }): TValue\n set(key: TKey, value: TValue): void\n delete(key: TKey): boolean\n has(key: TKey): boolean\n maybe(key: TKey): readonly [TValue, boolean]\n length(key: TKey): uint64\n}\n\nexport type BoxRef = {\n readonly key: bytes\n readonly exists: boolean\n value: bytes\n get(options: { default: bytes }): bytes\n put(value: bytes): void\n splice(start: uint64, length: uint64, value: bytes): void\n replace(start: uint64, value: bytes): void\n extract(start: uint64, length: uint64): bytes\n delete(): boolean\n create(options: { size: uint64 }): boolean\n resize(newSize: uint64): void\n maybe(): readonly [bytes, boolean]\n readonly length: uint64\n}\n\nexport function Box<TValue>(options: { key: bytes | string }): Box<TValue> {\n return ctxMgr.instance.state.Box(options)\n}\n\nexport function BoxMap<TKey, TValue>(options: { keyPrefix: bytes | string }): BoxMap<TKey, TValue> {\n return ctxMgr.instance.state.BoxMap(options)\n}\n\nexport function BoxRef(options: { key: bytes | string }): BoxRef {\n return ctxMgr.instance.state.BoxRef(options)\n}\n","import { ctxMgr } from './execution-context'\nimport { bytes } from './primitives'\nimport { Account } from './reference'\n\n/** A value saved in global state */\nexport type GlobalState<ValueType> = {\n value: ValueType\n delete: () => void\n hasValue: boolean\n}\n\nexport type GlobalStateOptions<ValueType> = { key?: bytes | string; initialValue?: ValueType }\n\n/** A single key in global state */\nexport function GlobalState<ValueType>(options?: GlobalStateOptions<ValueType>): GlobalState<ValueType> {\n return ctxMgr.instance.state.GlobalState(options)\n}\n\n/** A value saved in local state */\nexport type LocalStateForAccount<ValueType> = {\n value: ValueType\n hasValue: boolean\n delete: () => void\n}\n\nexport type LocalState<ValueType> = {\n (account: Account): LocalStateForAccount<ValueType>\n}\n\n/** A single key in local state */\nexport function LocalState<ValueType>(options?: { key?: bytes | string }): LocalState<ValueType> {\n return ctxMgr.instance.state.LocalState(options)\n}\n","import { OnCompleteAction } from './arc4'\nimport { ctxMgr } from './execution-context'\nimport { bytes, uint64 } from './primitives'\nimport type { Account, Application, Asset } from './reference'\nimport type * as txnTypes from './transactions'\nimport { DeliberateAny } from './typescript-helpers'\n\nconst isItxn = Symbol('isItxn')\n\nexport interface PaymentInnerTxn extends txnTypes.PaymentTxn {\n [isItxn]?: true\n}\nexport interface KeyRegistrationInnerTxn extends txnTypes.KeyRegistrationTxn {\n [isItxn]?: true\n}\nexport interface AssetConfigInnerTxn extends txnTypes.AssetConfigTxn {\n [isItxn]?: true\n}\nexport interface AssetTransferInnerTxn extends txnTypes.AssetTransferTxn {\n [isItxn]?: true\n}\nexport interface AssetFreezeInnerTxn extends txnTypes.AssetFreezeTxn {\n [isItxn]?: true\n}\nexport interface ApplicationInnerTxn extends txnTypes.ApplicationTxn {\n [isItxn]?: true\n}\n\nexport interface CommonTransactionFields {\n /**\n * 32 byte address\n */\n sender?: Account | string\n\n /**\n * microalgos\n */\n fee?: uint64\n\n /**\n * Any data up to 1024 bytes\n */\n note?: bytes | string\n\n /**\n * 32 byte lease value\n */\n lease?: bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo?: Account | string\n}\n\nexport interface PaymentFields extends CommonTransactionFields {\n /**\n * The amount, in microALGO, to transfer\n *\n */\n amount?: uint64\n /**\n * The address of the receiver\n */\n receiver?: Account\n /**\n * If set, bring the sender balance to 0 and send all remaining balance to this address\n */\n closeRemainderTo?: Account\n}\nexport interface KeyRegistrationFields extends CommonTransactionFields {\n /**\n * 32 byte address\n */\n voteKey?: bytes\n\n /**\n * 32 byte address\n */\n selectionKey?: bytes\n\n /**\n * The first round that the participation key is valid.\n */\n voteFirst?: uint64\n\n /**\n * The last round that the participation key is valid.\n */\n voteLast?: uint64\n\n /**\n * Dilution for the 2-level participation key\n */\n voteKeyDilution?: uint64\n\n /**\n * Marks an account nonparticipating for rewards\n */\n nonparticipation?: boolean\n\n /**\n * 64 byte state proof public key\n */\n stateProofKey?: bytes\n}\nexport interface AssetTransferFields extends CommonTransactionFields {\n /** The asset being transferred */\n xferAsset: Asset\n /** The amount of the asset being transferred */\n assetAmount?: uint64\n /** The clawback target */\n assetSender?: Account\n /** The receiver of the asset */\n assetReceiver?: Account\n /** The address to close the asset to */\n assetCloseTo?: Account\n}\nexport interface AssetConfigFields extends CommonTransactionFields {\n configAsset?: Asset\n manager?: Account\n reserve?: Account\n freeze?: Account\n clawback?: Account\n assetName?: string | bytes\n unitName?: string | bytes\n total?: uint64\n decimals?: uint64\n defaultFrozen?: boolean\n url?: string | bytes\n metadataHash?: bytes\n}\nexport interface AssetFreezeFields extends CommonTransactionFields {\n freezeAsset: Asset | uint64\n freezeAccount?: Account | string\n frozen?: boolean\n}\nexport interface ApplicationCallFields extends CommonTransactionFields {\n appId?: Application | uint64\n approvalProgram?: bytes | readonly [...bytes[]]\n clearStateProgram?: bytes | readonly [...bytes[]]\n onCompletion?: OnCompleteAction | uint64\n globalNumUint?: uint64\n globalNumBytes?: uint64\n localNumUint?: uint64\n localNumBytes?: uint64\n extraProgramPages?: uint64\n appArgs?: readonly [...unknown[]]\n accounts?: readonly [...Account[]]\n assets?: readonly [...Asset[]]\n apps?: readonly [...Application[]]\n}\n\nexport type InnerTransaction<TFields, TTransaction> = {\n submit(): TTransaction\n set(p: Partial<TFields>): void\n copy(): InnerTransaction<TFields, TTransaction>\n}\n\nexport type InnerTxnList = [...InnerTransaction<DeliberateAny, DeliberateAny>[]]\n\nexport type TxnFor<TFields extends InnerTxnList> = TFields extends [\n InnerTransaction<DeliberateAny, infer TTxn>,\n ...infer TRest extends InnerTxnList,\n]\n ? [TTxn, ...TxnFor<TRest>]\n : []\n\nexport type PaymentItxnParams = InnerTransaction<PaymentFields, PaymentInnerTxn>\nexport type KeyRegistrationItxnParams = InnerTransaction<KeyRegistrationFields, KeyRegistrationInnerTxn>\nexport type AssetConfigItxnParams = InnerTransaction<AssetConfigFields, AssetConfigInnerTxn>\nexport type AssetTransferItxnParams = InnerTransaction<AssetTransferFields, AssetTransferInnerTxn>\nexport type AssetFreezeItxnParams = InnerTransaction<AssetFreezeFields, AssetFreezeInnerTxn>\nexport type ApplicationCallItxnParams = InnerTransaction<ApplicationCallFields, ApplicationInnerTxn>\n\nexport function submitGroup<TFields extends InnerTxnList>(...transactionFields: TFields): TxnFor<TFields> {\n return ctxMgr.instance.itxn.submitGroup(...transactionFields)\n}\nexport function payment(fields: PaymentFields): PaymentItxnParams {\n return ctxMgr.instance.itxn.payment(fields)\n}\nexport function keyRegistration(fields: KeyRegistrationFields): KeyRegistrationItxnParams {\n return ctxMgr.instance.itxn.keyRegistration(fields)\n}\nexport function assetConfig(fields: AssetConfigFields): AssetConfigItxnParams {\n return ctxMgr.instance.itxn.assetConfig(fields)\n}\nexport function assetTransfer(fields: AssetTransferFields): AssetTransferItxnParams {\n return ctxMgr.instance.itxn.assetTransfer(fields)\n}\nexport function assetFreeze(fields: AssetFreezeFields): AssetFreezeItxnParams {\n return ctxMgr.instance.itxn.assetFreeze(fields)\n}\nexport function applicationCall(fields: ApplicationCallFields): ApplicationCallItxnParams {\n return ctxMgr.instance.itxn.applicationCall(fields)\n}\n","import { ctxMgr } from './execution-context'\nimport { uint64 } from './primitives'\nimport type * as txnTypes from './transactions'\n\nconst isGtxn = Symbol('isGtxn')\nexport interface PaymentTxn extends txnTypes.PaymentTxn {\n [isGtxn]?: true\n}\nexport interface KeyRegistrationTxn extends txnTypes.KeyRegistrationTxn {\n [isGtxn]?: true\n}\nexport interface AssetConfigTxn extends txnTypes.AssetConfigTxn {\n [isGtxn]?: true\n}\nexport interface AssetTransferTxn extends txnTypes.AssetTransferTxn {\n [isGtxn]?: true\n}\nexport interface AssetFreezeTxn extends txnTypes.AssetFreezeTxn {\n [isGtxn]?: true\n}\nexport interface ApplicationTxn extends txnTypes.ApplicationTxn {\n [isGtxn]?: true\n}\n\nexport type Transaction = PaymentTxn | KeyRegistrationTxn | AssetConfigTxn | AssetTransferTxn | AssetFreezeTxn | ApplicationTxn\n\nexport function Transaction(groupIndex: uint64): Transaction {\n return ctxMgr.instance.gtxn.Transaction(groupIndex)\n}\nexport function PaymentTxn(groupIndex: uint64): PaymentTxn {\n return ctxMgr.instance.gtxn.PaymentTxn(groupIndex)\n}\nexport function KeyRegistrationTxn(groupIndex: uint64): KeyRegistrationTxn {\n return ctxMgr.instance.gtxn.KeyRegistrationTxn(groupIndex)\n}\nexport function AssetConfigTxn(groupIndex: uint64): AssetConfigTxn {\n return ctxMgr.instance.gtxn.AssetConfigTxn(groupIndex)\n}\nexport function AssetTransferTxn(groupIndex: uint64): AssetTransferTxn {\n return ctxMgr.instance.gtxn.AssetTransferTxn(groupIndex)\n}\nexport function AssetFreezeTxn(groupIndex: uint64): AssetFreezeTxn {\n return ctxMgr.instance.gtxn.AssetFreezeTxn(groupIndex)\n}\nexport function ApplicationTxn(groupIndex: uint64): ApplicationTxn {\n return ctxMgr.instance.gtxn.ApplicationTxn(groupIndex)\n}\n","import { OnCompleteActionStr } from './arc4'\nimport { bytes, uint64 } from './primitives'\nimport { Account, Application, Asset } from './reference'\n\n/**\n * The different transaction types available in a transaction\n */\nexport enum TransactionType {\n /**\n * A Payment transaction\n */\n Payment = 1,\n /**\n * A Key Registration transaction\n */\n KeyRegistration = 2,\n /**\n * An Asset Config transaction\n */\n AssetConfig = 3,\n /**\n * An Asset Transfer transaction\n */\n AssetTransfer = 4,\n /**\n * An Asset Freeze transaction\n */\n AssetFreeze = 5,\n /**\n * An Application Call transaction\n */\n ApplicationCall = 6,\n}\n\ninterface TransactionBase {\n /**\n * 32 byte address\n */\n readonly sender: Account\n\n /**\n * microalgos\n */\n readonly fee: uint64\n\n /**\n * round number\n */\n readonly firstValid: uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n readonly firstValidTime: uint64\n\n /**\n * round number\n */\n readonly lastValid: uint64\n\n /**\n * Any data up to 1024 bytes\n */\n readonly note: bytes\n\n /**\n * 32 byte lease value\n */\n readonly lease: bytes\n\n /**\n * Transaction type as bytes\n */\n readonly typeBytes: bytes\n\n /**\n * Position of this transaction within an atomic group\n * A stand-alone transaction is implicitly element 0 in a group of 1\n */\n readonly groupIndex: uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n readonly txnId: bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n readonly rekeyTo: Account\n}\n\nexport interface PaymentTxn extends TransactionBase {\n /**\n * 32 byte address\n */\n readonly receiver: Account\n\n /**\n * microalgos\n */\n readonly amount: uint64\n\n /**\n * 32 byte address\n */\n readonly closeRemainderTo: Account\n\n /**\n * Transaction type as integer\n */\n readonly type: TransactionType.Payment\n}\n\nexport interface KeyRegistrationTxn extends TransactionBase {\n /**\n * 32 byte address\n */\n readonly voteKey: bytes\n\n /**\n * 32 byte address\n */\n readonly selectionKey: bytes\n\n /**\n * The first round that the participation key is valid.\n */\n readonly voteFirst: uint64\n\n /**\n * The last round that the participation key is valid.\n */\n readonly voteLast: uint64\n\n /**\n * Dilution for the 2-level participation key\n */\n readonly voteKeyDilution: uint64\n\n /**\n * Marks an account nonparticipating for rewards\n */\n readonly nonparticipation: boolean\n\n /**\n * 64 byte state proof public key\n */\n readonly stateProofKey: bytes\n /**\n * Transaction type as integer\n */\n readonly type: TransactionType.KeyRegistration\n}\n\nexport interface AssetConfigTxn extends TransactionBase {\n /**\n * Asset ID in asset config transaction\n */\n readonly configAsset: Asset\n\n /**\n * Total number of units of this asset created\n */\n readonly total: uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n readonly decimals: uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n readonly defaultFrozen: boolean\n\n /**\n * Unit name of the asset\n */\n readonly unitName: bytes\n\n /**\n * The asset name\n */\n readonly assetName: bytes\n\n /**\n * URL\n */\n readonly url: bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n readonly metadataHash: bytes\n\n /**\n * 32 byte address\n */\n readonly manager: Account\n\n /**\n * 32 byte address\n */\n readonly reserve: Account\n\n /**\n * 32 byte address\n */\n readonly freeze: Account\n\n /**\n * 32 byte address\n */\n readonly clawback: Account\n /**\n * Asset ID allocated by the creation of an ASA\n */\n createdAsset: Asset\n\n /**\n * Transaction type as integer\n */\n readonly type: TransactionType.AssetConfig\n}\n\nexport interface AssetTransferTxn extends TransactionBase {\n /**\n * Asset ID\n */\n readonly xferAsset: Asset\n\n /**\n * value in Asset's units\n */\n readonly assetAmount: uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n readonly assetSender: Account\n\n /**\n * 32 byte address\n */\n readonly assetReceiver: Account\n\n /**\n * 32 byte address\n */\n readonly assetCloseTo: Account\n /**\n * Transaction type as integer\n */\n readonly type: TransactionType.AssetTransfer\n}\n\nexport interface AssetFreezeTxn extends TransactionBase {\n /**\n * Asset ID being frozen or un-frozen\n */\n readonly freezeAsset: Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n */\n readonly freezeAccount: Account\n\n /**\n * The new frozen value\n */\n readonly frozen: boolean\n /**\n * Transaction type as integer\n */\n readonly type: TransactionType.AssetFreeze\n}\n\nexport interface ApplicationTxn extends TransactionBase {\n /**\n * ApplicationID from ApplicationCall transaction\n */\n readonly appId: Application\n\n /**\n * ApplicationCall transaction on completion action\n */\n readonly onCompletion: OnCompleteActionStr\n\n /**\n * Number of ApplicationArgs\n */\n readonly numAppArgs: uint64\n\n /**\n * Number of ApplicationArgs\n */\n readonly numAccounts: uint64\n\n /**\n * Approval program\n */\n readonly approvalProgram: bytes\n\n /**\n * Clear State program\n */\n readonly clearStateProgram: bytes\n\n /**\n * Number of Assets\n */\n readonly numAssets: uint64\n\n /**\n * Number of Applications\n */\n readonly numApps: uint64\n\n /**\n * Number of global state integers in ApplicationCall\n */\n readonly globalNumUint: uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n */\n readonly globalNumBytes: uint64\n\n /**\n * Number of local state integers in ApplicationCall\n */\n readonly localNumUint: uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\n */\n readonly localNumBytes: uint64\n\n /**\n * 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.\n */\n readonly extraProgramPages: uint64\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n */\n readonly lastLog: bytes\n\n /**\n * Log messages emitted by an application call\n */\n logs(index: uint64): bytes\n\n /**\n * Number of logs\n */\n readonly numLogs: uint64\n\n /**\n * ApplicationID allocated by the creation of an application\n */\n readonly createdApp: Application\n\n /**\n * Number of Approval Program pages\n */\n readonly numApprovalProgramPages: uint64\n\n /**\n * Number of Clear State Program pages\n */\n readonly numClearStateProgramPages: uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n * @param index\n */\n appArgs(index: uint64): bytes\n\n /**\n * Accounts listed in the ApplicationCall transaction\n */\n accounts(index: uint64): Account\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n */\n assets(index: uint64): Asset\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n */\n apps(index: uint64): Application\n\n /**\n * Approval Program as an array of pages\n */\n approvalProgramPages(index: uint64): bytes\n\n /**\n * Clear State Program as an array of pages\n */\n clearStateProgramPages(index: uint64): bytes\n /**\n * Transaction type as integer\n */\n readonly type: TransactionType.ApplicationCall\n}\n\nexport type Transaction = PaymentTxn | KeyRegistrationTxn | AssetConfigTxn | AssetTransferTxn | AssetFreezeTxn | ApplicationTxn\n","import { uint64 } from './primitives'\nimport { ConstructorFor } from './typescript-helpers'\n\nexport abstract class LogicSig {\n abstract program(): boolean | uint64\n}\n\n/**\n * Defines optional configuration for a logic signature\n */\ntype LogicSigOptions = {\n /**\n * Determines which AVM version to use, this affects what operations are supported.\n * Defaults to value provided supplied on command line (which defaults to current mainnet version)\n */\n avmVersion?: 10 | 11\n /**\n * Override the name of the logic signature when generating build artifacts.\n * Defaults to the class name\n */\n name?: string\n}\n\n/**\n * The logicsig decorator can be used to specify additional configuration options for a logic signature\n * @param options An object containing the configuration options\n */\nexport function logicsig(options: LogicSigOptions) {\n return <T extends ConstructorFor<LogicSig>>(logicSig: T) => logicSig\n}\n","import { NoImplementation } from './impl/errors'\n\nexport function TemplateVar<T>(variableName: string, prefix = 'TMPL_'): T {\n throw NoImplementation\n}\n","import { BaseContract } from './base-contract'\nimport { NoImplementation } from './impl/errors'\nimport { LogicSig } from './logic-sig'\nimport { bytes, uint64 } from './primitives'\nimport { Account } from './reference'\nimport { ConstructorFor, DeliberateAny } from './typescript-helpers'\n\n/**\n * Provides compiled programs and state allocation values for a Contract. Created by calling `compile(ExampleContractType)`\n */\nexport type CompiledContract = {\n /**\n * Approval program pages for a contract, after template variables have been replaced and compiled to AVM bytecode\n */\n approvalProgram: [bytes, bytes]\n /**\n * Clear state program pages for a contract, after template variables have been replaced and compiled to AVM bytecode\n */\n clearStateProgram: [bytes, bytes]\n /**\n * By default, provides extra program pages required based on approval and clear state program size, can be overridden when calling `compile(ExampleContractType, { extraProgramPages: ... })`\n */\n extraProgramPages: uint64\n /**\n * By default, provides global num uints based on contract state totals, can be overridden when calling `compile(ExampleContractType, { globalUints: ... })`\n */\n globalUints: uint64\n /**\n * By default, provides global num bytes based on contract state totals, can be overridden when calling `compile(ExampleContractType, { globalBytes: ... })`\n */\n globalBytes: uint64\n /**\n * By default, provides local num uints based on contract state totals, can be overridden when calling `compile(ExampleContractType, { localUints: ... })`\n */\n localUints: uint64\n /**\n * By default, provides local num bytes based on contract state totals, can be overridden when calling `compile(ExampleContractType, { localBytes: ... })`\n */\n localBytes: uint64\n}\n\n/**\n * Provides account for a Logic Signature. Created by calling `compile(LogicSigType)`\n */\nexport type CompiledLogicSig = {\n /**\n * Address of a logic sig program, after template variables have been replaced and compiled to AVM bytecode\n */\n account: Account\n}\n\n/**\n * Options for compiling a contract\n */\nexport type CompileContractOptions = {\n /**\n * Number of extra program pages, defaults to minimum required for contract\n */\n extraProgramPages?: uint64\n /**\n * Number of global uint64s, defaults to value defined for contract\n */\n globalUints?: uint64\n /**\n * Number of global bytes, defaults to value defined for contract\n */\n globalBytes?: uint64\n /**\n * Number of local uint64s, defaults to value defined for contract\n */\n localUints?: uint64\n /**\n * Number of local bytes, defaults to value defined for contract\n */\n localBytes?: uint64\n /**\n * Template variables to substitute into the contract, key should be without the prefix, must evaluate to a compile time constant\n * and match the type of the template var declaration\n */\n templateVars?: Record<string, DeliberateAny>\n /**\n * Prefix to add to provided template vars, defaults to the prefix supplied on command line (which defaults to TMPL_)\n */\n templateVarsPrefix?: string\n}\n\n/**\n * Options for compiling a logic signature\n */\nexport type CompileLogicSigOptions = {\n /**\n * Template variables to substitute into the contract, key should be without the prefix, must evaluate to a compile time constant\n * and match the type of the template var declaration\n */\n templateVars?: Record<string, DeliberateAny>\n /**\n * Prefix to add to provided template vars, defaults to the prefix supplied on command line (which defaults to TMPL_)\n */\n templateVarsPrefix?: string\n}\n\n/**\n * Compile a contract and return the resulting byte code for approval and clear state programs.\n * @param contract The contract class to compile\n * @param options Options for compiling the contract\n */\nexport function compile(contract: ConstructorFor<BaseContract>, options?: CompileContractOptions): CompiledContract\n/**\n * Compile a logic signature and return an account ready for signing transactions.\n * @param logicSig The logic sig class to compile\n * @param options Options for compiling the logic sig\n */\nexport function compile(logicSig: ConstructorFor<LogicSig>, options?: CompileLogicSigOptions): CompiledLogicSig\nexport function compile(artefact: ConstructorFor<BaseContract> | ConstructorFor<LogicSig>): CompiledLogicSig | CompiledContract {\n throw new NoImplementation()\n}\n","import { NoImplementation } from './impl/errors'\nimport { uint64, Uint64Compat } from './primitives'\n\nexport class MutableArray<TItem> {\n constructor(...items: TItem[]) {}\n\n /**\n * Returns the current length of this array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Returns the item at the given index.\n * Negative indexes are taken from the end.\n * @param index The index of the item to retrieve\n */\n at(index: Uint64Compat): TItem {\n throw new NoImplementation()\n }\n\n /**\n * Create a new Dynamic array with all items from this array\n */\n slice(): MutableArray<TItem>\n /**\n * Create a new MutableArray with all items up till `end`.\n * Negative indexes are taken from the end.\n * @param end An index in which to stop copying items.\n */\n slice(end: Uint64Compat): MutableArray<TItem>\n /**\n * Create a new MutableArray with items from `start`, up until `end`\n * Negative indexes are taken from the end.\n * @param start An index in which to start copying items.\n * @param end An index in which to stop copying items\n */\n slice(start: Uint64Compat, end: Uint64Compat): MutableArray<TItem>\n slice(start?: Uint64Compat, end?: Uint64Compat): MutableArray<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the items in this array\n */\n [Symbol.iterator](): IterableIterator<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for a tuple of the indexes and items in this array\n */\n entries(): IterableIterator<readonly [uint64, TItem]> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the indexes in this array\n */\n keys(): IterableIterator<uint64> {\n throw new NoImplementation()\n }\n\n /**\n * Get or set the item at the specified index.\n * Negative indexes are not supported\n */\n [index: uint64]: TItem\n\n /**\n * Push a number of items into this array\n * @param items The items to be added to this array\n */\n push(...items: TItem[]): void {\n throw new NoImplementation()\n }\n\n /**\n * Pop a single item from this array\n */\n pop(): TItem {\n throw new NoImplementation()\n }\n\n copy(): MutableArray<TItem> {\n throw new NoImplementation()\n }\n}\n","import { NoImplementation } from './impl/errors'\nimport { DeliberateAny } from './typescript-helpers'\n\n/**\n * Emit an arc28 event log using either an ARC4Struct type or a named object type.\n * Object types must have an ARC4 equivalent type.\n *\n * Anonymous types cannot be used as the type name is used to determine the event prefix\n * @param event An ARC4Struct instance, or a plain object with a named type\n *\n * @example\n * class Demo extends Struct<{ a: UintN64 }> {}\n * emit(new Demo({ a: new UintN64(123) }))\n *\n * @example\n * type Demo = { a: uint64 }\n * emit<Demo>({a: 123})\n * // or\n * const d: Demo = { a: 123 }\n * emit(d)\n */\nexport function emit<TEvent extends Record<string, DeliberateAny>>(event: TEvent): void\n/**\n * Emit an arc28 event log using an explicit name and inferred property/field types.\n * Property types must be ARC4 or have an ARC4 equivalent type.\n * @param eventName The name of the event (must be a compile time constant)\n * @param eventProps A set of event properties (order is significant)\n *\n * @example\n * emit(\"Demo\", new UintN64(123))\n *\n * @example\n * const a: uint64 = 123\n * emit(\"Demo\", a)\n */\nexport function emit<TProps extends [...DeliberateAny[]]>(eventName: string, ...eventProps: TProps): void\nexport function emit<T>(event: T | string, ...eventProps: unknown[]): void {\n throw new NoImplementation()\n}\n"],"names":[],"mappings":";;;;;;;IAIY;AAAZ,CAAA,UAAY,MAAM,EAAA;AAChB,IAAA,MAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,MAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC7B,CAAC,EAHW,MAAM,KAAN,MAAM,GAGjB,EAAA,CAAA,CAAA;IACW;AAAZ,CAAA,UAAY,EAAE,EAAA;AACZ,IAAA,EAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,EAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,EAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,EAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC7B,CAAC,EALW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;AAG9B;;AAEG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAA;QACf,MAAM,IAAI,gBAAgB,EAAE;;AAG9B;;AAEG;IACH,OAAO,GAAA;QACL,MAAM,IAAI,gBAAgB,EAAE;;AAG9B;;AAEG;IACH,IAAI,GAAA;QACF,MAAM,IAAI,gBAAgB,EAAE;;AAS9B;;;AAGG;IACH,IAAI,CAAC,GAAG,KAAc,EAAA;QACpB,MAAM,IAAI,gBAAgB,EAAE;;AAG9B;;AAEG;IACH,GAAG,GAAA;QACD,MAAM,IAAI,gBAAgB,EAAE;;IAG9B,IAAI,GAAA;QACF,MAAM,IAAI,gBAAgB,EAAE;;AAE/B;;SCpDe,IAAI,CAAI,KAAiB,EAAE,GAAG,UAAqB,EAAA;IACjE,MAAM,IAAI,gBAAgB,EAAE;AAC9B;;;;"}
|
package/op-Mj11EGRt.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"op-Mj11EGRt.js","sources":["../src/execution-context.ts","../src/op.ts"],"sourcesContent":["import { Box, BoxMap, BoxRef, Contract, GlobalState, gtxn, itxn, LocalState } from '.'\nimport { AbiMethodConfig, BareMethodConfig } from './arc4'\nimport { OpsNamespace } from './op-types'\nimport { bytes, uint64 } from './primitives'\nimport { Account, Application, Asset } from './reference'\n\nexport type ExecutionContext = {\n log(value: bytes): void\n application(id?: uint64): Application\n asset(id?: uint64): Asset\n account(address?: bytes): Account\n op: Partial<OpsNamespace>\n abiMetadata: {\n captureMethodConfig<T extends Contract>(contract: T, methodName: string, config?: AbiMethodConfig<T> | BareMethodConfig): void\n }\n gtxn: {\n Transaction: typeof gtxn.Transaction\n PaymentTxn: typeof gtxn.PaymentTxn\n KeyRegistrationTxn: typeof gtxn.KeyRegistrationTxn\n AssetConfigTxn: typeof gtxn.AssetConfigTxn\n AssetTransferTxn: typeof gtxn.AssetTransferTxn\n AssetFreezeTxn: typeof gtxn.AssetFreezeTxn\n ApplicationTxn: typeof gtxn.ApplicationTxn\n }\n itxn: {\n submitGroup: typeof itxn.submitGroup\n payment: typeof itxn.payment\n keyRegistration: typeof itxn.keyRegistration\n assetConfig: typeof itxn.assetConfig\n assetTransfer: typeof itxn.assetTransfer\n assetFreeze: typeof itxn.assetFreeze\n applicationCall: typeof itxn.applicationCall\n }\n state: {\n GlobalState: typeof GlobalState\n LocalState: typeof LocalState\n Box: typeof Box\n BoxMap: typeof BoxMap\n BoxRef: typeof BoxRef\n }\n}\n\ndeclare global {\n // eslint-disable-next-line no-var\n var puyaTsExecutionContext: ExecutionContext | undefined\n}\n\nexport const ctxMgr = {\n set instance(ctx: ExecutionContext) {\n const instance = global.puyaTsExecutionContext\n if (instance != undefined) throw new Error('Execution context has already been set')\n global.puyaTsExecutionContext = ctx\n },\n get instance() {\n const instance = global.puyaTsExecutionContext\n if (instance == undefined) throw new Error('No execution context has been set')\n return instance\n },\n reset() {\n global.puyaTsExecutionContext = undefined\n },\n}\n","import { ctxMgr } from './execution-context'\n\nimport {\n AddwType,\n AppOptedInType,\n ArgType,\n BalanceType,\n Base64DecodeType,\n BitLengthType,\n BsqrtType,\n BtoiType,\n BzeroType,\n ConcatType,\n DivmodwType,\n DivwType,\n EcdsaPkDecompressType,\n EcdsaPkRecoverType,\n EcdsaVerifyType,\n Ed25519verifyBareType,\n Ed25519verifyType,\n EllipticCurveType,\n ExpType,\n ExpwType,\n ExtractType,\n ExtractUint16Type,\n ExtractUint32Type,\n ExtractUint64Type,\n FalconVerifyType,\n GaidType,\n GetBitType,\n GetByteType,\n GITxnType,\n GloadBytesType,\n GloadUint64Type,\n GlobalType,\n GTxnType,\n ItobType,\n ITxnCreateType,\n ITxnType,\n JsonRefType,\n Keccak256Type,\n LenType,\n MulwType,\n OnlineStakeType,\n OpsNamespace,\n ReplaceType,\n ScratchType,\n SelectType,\n SetBitType,\n SetByteType,\n Sha256Type,\n Sha3_256Type,\n Sha512_256Type,\n ShlType,\n ShrType,\n SqrtType,\n SubstringType,\n Sumhash512Type,\n TxnType,\n VrfVerifyType,\n} from './op-types'\nimport { AnyFunction, DeliberateAny } from './typescript-helpers'\n\ntype KeyIsFunction<TKey extends keyof TObj, TObj> = TKey extends DeliberateAny ? (TObj[TKey] extends AnyFunction ? TKey : never) : never\ntype KeyIsNotFunction<TKey extends keyof TObj, TObj> = TKey extends DeliberateAny ? (TObj[TKey] extends AnyFunction ? never : TKey) : never\ntype ObjectKeys = KeyIsNotFunction<keyof OpsNamespace, OpsNamespace>\ntype FunctionKeys = KeyIsFunction<keyof OpsNamespace, OpsNamespace>\n\nconst createFunctionProxy = <TName extends FunctionKeys>(name: TName) => {\n return (...args: Parameters<OpsNamespace[TName]>): ReturnType<OpsNamespace[TName]> => {\n const implementation: AnyFunction = (ctxMgr.instance.op as OpsNamespace)[name] as OpsNamespace[TName]\n return implementation(...args) as ReturnType<OpsNamespace[TName]>\n }\n}\n\nconst createObjectProxy = <TName extends ObjectKeys>(name: TName) => {\n return new Proxy(\n {} as OpsNamespace[TName],\n {\n get<TProperty extends keyof OpsNamespace[TName]>(_target: OpsNamespace[TName], property: TProperty): OpsNamespace[TName][TProperty] {\n return Reflect.get(ctxMgr.instance.op[name]!, property)\n },\n } as ProxyHandler<OpsNamespace[TName]>,\n )\n}\n\nexport const addw: AddwType = createFunctionProxy('addw')\nexport const appOptedIn: AppOptedInType = createFunctionProxy('appOptedIn')\nexport const arg: ArgType = createFunctionProxy('arg')\nexport const balance: BalanceType = createFunctionProxy('balance')\nexport const base64Decode: Base64DecodeType = createFunctionProxy('base64Decode')\nexport const bitLength: BitLengthType = createFunctionProxy('bitLength')\nexport const bsqrt: BsqrtType = createFunctionProxy('bsqrt')\nexport const btoi: BtoiType = createFunctionProxy('btoi')\nexport const bzero: BzeroType = createFunctionProxy('bzero')\nexport const concat: ConcatType = createFunctionProxy('concat')\nexport const divmodw: DivmodwType = createFunctionProxy('divmodw')\nexport const divw: DivwType = createFunctionProxy('divw')\nexport const ecdsaPkDecompress: EcdsaPkDecompressType = createFunctionProxy('ecdsaPkDecompress')\nexport const ecdsaPkRecover: EcdsaPkRecoverType = createFunctionProxy('ecdsaPkRecover')\nexport const ecdsaVerify: EcdsaVerifyType = createFunctionProxy('ecdsaVerify')\nexport const ed25519verifyBare: Ed25519verifyBareType = createFunctionProxy('ed25519verifyBare')\nexport const ed25519verify: Ed25519verifyType = createFunctionProxy('ed25519verify')\nexport const exp: ExpType = createFunctionProxy('exp')\nexport const expw: ExpwType = createFunctionProxy('expw')\nexport const extract: ExtractType = createFunctionProxy('extract')\nexport const extractUint16: ExtractUint16Type = createFunctionProxy('extractUint16')\nexport const extractUint32: ExtractUint32Type = createFunctionProxy('extractUint32')\nexport const extractUint64: ExtractUint64Type = createFunctionProxy('extractUint64')\nexport const gaid: GaidType = createFunctionProxy('gaid')\nexport const getBit: GetBitType = createFunctionProxy('getBit')\nexport const getByte: GetByteType = createFunctionProxy('getByte')\nexport const gloadBytes: GloadBytesType = createFunctionProxy('gloadBytes')\nexport const gloadUint64: GloadUint64Type = createFunctionProxy('gloadUint64')\nexport const itob: ItobType = createFunctionProxy('itob')\nexport const keccak256: Keccak256Type = createFunctionProxy('keccak256')\nexport const len: LenType = createFunctionProxy('len')\nexport const minBalance: BalanceType = createFunctionProxy('minBalance')\nexport const mulw: MulwType = createFunctionProxy('mulw')\nexport const replace: ReplaceType = createFunctionProxy('replace')\nexport const select: SelectType = createFunctionProxy('select') as SelectType\nexport const setBit: SetBitType = createFunctionProxy('setBit') as SetBitType\nexport const setByte: SetByteType = createFunctionProxy('setByte')\nexport const sha256: Sha256Type = createFunctionProxy('sha256')\nexport const sha3_256: Sha3_256Type = createFunctionProxy('sha3_256')\nexport const sha512_256: Sha512_256Type = createFunctionProxy('sha512_256')\nexport const shl: ShlType = createFunctionProxy('shl')\nexport const shr: ShrType = createFunctionProxy('shr')\nexport const sqrt: SqrtType = createFunctionProxy('sqrt')\nexport const substring: SubstringType = createFunctionProxy('substring')\nexport const vrfVerify: VrfVerifyType = createFunctionProxy('vrfVerify')\nexport const onlineStake: OnlineStakeType = createFunctionProxy('onlineStake')\nexport const falconVerify: FalconVerifyType = createFunctionProxy('falconVerify')\nexport const sumhash512: Sumhash512Type = createFunctionProxy('sumhash512')\n\nexport const EllipticCurve: EllipticCurveType = createObjectProxy('EllipticCurve')\nexport const Global: GlobalType = createObjectProxy('Global')\nexport const GTxn: GTxnType = createObjectProxy('GTxn')\nexport const JsonRef: JsonRefType = createObjectProxy('JsonRef')\nexport const Txn: TxnType = createObjectProxy('Txn')\nexport const GITxn: GITxnType = createObjectProxy('GITxn')\nexport const ITxn: ITxnType = createObjectProxy('ITxn')\nexport const ITxnCreate: ITxnCreateType = createObjectProxy('ITxnCreate')\nexport const Scratch: ScratchType = createObjectProxy('Scratch')\n\nexport const AcctParams = createObjectProxy('AcctParams')\nexport const AppGlobal = createObjectProxy('AppGlobal')\nexport const AppLocal = createObjectProxy('AppLocal')\nexport const AppParams = createObjectProxy('AppParams')\nexport const AssetHolding = createObjectProxy('AssetHolding')\nexport const AssetParams = createObjectProxy('AssetParams')\nexport const Block = createObjectProxy('Block')\nexport const Box = createObjectProxy('Box')\nexport const VoterParams = createObjectProxy('VoterParams')\n"],"names":[],"mappings":"AA+Ca,MAAA,MAAM,GAAG;IACpB,IAAI,QAAQ,CAAC,GAAqB,EAAA;AAChC,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,sBAAsB;QAC9C,IAAI,QAAQ,IAAI,SAAS;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC;AACpF,QAAA,MAAM,CAAC,sBAAsB,GAAG,GAAG;KACpC;AACD,IAAA,IAAI,QAAQ,GAAA;AACV,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,sBAAsB;QAC9C,IAAI,QAAQ,IAAI,SAAS;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC;AAC/E,QAAA,OAAO,QAAQ;KAChB;IACD,KAAK,GAAA;AACH,QAAA,MAAM,CAAC,sBA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,YAAY;MAE7D,aAAa,GAAsB,iBAAiB,CAAC,eAAe;MACpE,MAAM,GAAe,iBAAiB,CAAC,QAAQ;MAC/C,IAAI,GAAa,iBAAiB,CAAC,MAAM;MACzC,OAAO,GAAgB,iBAAiB,CAAC,SAAS;MAClD,GAAG,GAAY,iBAAiB,CAAC,KAAK;MACtC,KAAK,GAAc,iBAAiB,CAAC,OAAO;MAC5C,IAAI,GAAa,iBAAiB,CAAC,MAAM;MACzC,UAAU,GAAmB,iBAAiB,CAAC,YAAY;MAC3D,OAAO,GAAgB,iBAAiB,CAAC,SAAS;MAElD,UAAU,GAAG,iBAAiB,CAAC,YAAY;MAC3C,SAAS,GAAG,iBAAiB,CAAC,WAAW;MACzC,QAAQ,GAAG,iBAAiB,CAAC,UAAU;MACvC,SAAS,GAAG,iBAAiB,CAAC,WAAW;MACzC,YAAY,GAAG,iBAAiB,CAAC,cAAc;MAC/C,WAAW,GAAG,iBAAiB,CAAC,aAAa;MAC7C,KAAK,GAAG,iBAAiB,CAAC,OAAO;MACjC,GAAG,GAAG,iBAAiB,CAAC,KAAK;MAC7B,WAAW,GAAG,iBAAiB,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"op-Mj11EGRt.js","sources":["../src/execution-context.ts","../src/op.ts"],"sourcesContent":["import { Box, BoxMap, BoxRef, Contract, GlobalState, gtxn, itxn, LocalState } from '.'\nimport { AbiMethodConfig, BareMethodConfig } from './arc4'\nimport { OpsNamespace } from './op-types'\nimport { bytes, uint64 } from './primitives'\nimport { Account, Application, Asset } from './reference'\n\nexport type ExecutionContext = {\n log(value: bytes): void\n application(id?: uint64): Application\n asset(id?: uint64): Asset\n account(address?: bytes): Account\n op: Partial<OpsNamespace>\n abiMetadata: {\n captureMethodConfig<T extends Contract>(contract: T, methodName: string, config?: AbiMethodConfig<T> | BareMethodConfig): void\n }\n gtxn: {\n Transaction: typeof gtxn.Transaction\n PaymentTxn: typeof gtxn.PaymentTxn\n KeyRegistrationTxn: typeof gtxn.KeyRegistrationTxn\n AssetConfigTxn: typeof gtxn.AssetConfigTxn\n AssetTransferTxn: typeof gtxn.AssetTransferTxn\n AssetFreezeTxn: typeof gtxn.AssetFreezeTxn\n ApplicationTxn: typeof gtxn.ApplicationTxn\n }\n itxn: {\n submitGroup: typeof itxn.submitGroup\n payment: typeof itxn.payment\n keyRegistration: typeof itxn.keyRegistration\n assetConfig: typeof itxn.assetConfig\n assetTransfer: typeof itxn.assetTransfer\n assetFreeze: typeof itxn.assetFreeze\n applicationCall: typeof itxn.applicationCall\n }\n state: {\n GlobalState: typeof GlobalState\n LocalState: typeof LocalState\n Box: typeof Box\n BoxMap: typeof BoxMap\n BoxRef: typeof BoxRef\n }\n}\n\ndeclare global {\n // eslint-disable-next-line no-var\n var puyaTsExecutionContext: ExecutionContext | undefined\n}\n\nexport const ctxMgr = {\n set instance(ctx: ExecutionContext) {\n const instance = global.puyaTsExecutionContext\n if (instance != undefined) throw new Error('Execution context has already been set')\n global.puyaTsExecutionContext = ctx\n },\n get instance() {\n const instance = global.puyaTsExecutionContext\n if (instance == undefined) throw new Error('No execution context has been set')\n return instance\n },\n reset() {\n global.puyaTsExecutionContext = undefined\n },\n}\n","import { ctxMgr } from './execution-context'\n\nimport {\n AddwType,\n AppOptedInType,\n ArgType,\n BalanceType,\n Base64DecodeType,\n BitLengthType,\n BsqrtType,\n BtoiType,\n BzeroType,\n ConcatType,\n DivmodwType,\n DivwType,\n EcdsaPkDecompressType,\n EcdsaPkRecoverType,\n EcdsaVerifyType,\n Ed25519verifyBareType,\n Ed25519verifyType,\n EllipticCurveType,\n ExpType,\n ExpwType,\n ExtractType,\n ExtractUint16Type,\n ExtractUint32Type,\n ExtractUint64Type,\n FalconVerifyType,\n GaidType,\n GetBitType,\n GetByteType,\n GITxnType,\n GloadBytesType,\n GloadUint64Type,\n GlobalType,\n GTxnType,\n ItobType,\n ITxnCreateType,\n ITxnType,\n JsonRefType,\n Keccak256Type,\n LenType,\n MulwType,\n OnlineStakeType,\n OpsNamespace,\n ReplaceType,\n ScratchType,\n SelectType,\n SetBitType,\n SetByteType,\n Sha256Type,\n Sha3_256Type,\n Sha512_256Type,\n ShlType,\n ShrType,\n SqrtType,\n SubstringType,\n Sumhash512Type,\n TxnType,\n VrfVerifyType,\n} from './op-types'\nimport { AnyFunction, DeliberateAny } from './typescript-helpers'\n\ntype KeyIsFunction<TKey extends keyof TObj, TObj> = TKey extends DeliberateAny ? (TObj[TKey] extends AnyFunction ? TKey : never) : never\ntype KeyIsNotFunction<TKey extends keyof TObj, TObj> = TKey extends DeliberateAny ? (TObj[TKey] extends AnyFunction ? never : TKey) : never\ntype ObjectKeys = KeyIsNotFunction<keyof OpsNamespace, OpsNamespace>\ntype FunctionKeys = KeyIsFunction<keyof OpsNamespace, OpsNamespace>\n\nconst createFunctionProxy = <TName extends FunctionKeys>(name: TName) => {\n return (...args: Parameters<OpsNamespace[TName]>): ReturnType<OpsNamespace[TName]> => {\n const implementation: AnyFunction = (ctxMgr.instance.op as OpsNamespace)[name] as OpsNamespace[TName]\n return implementation(...args) as ReturnType<OpsNamespace[TName]>\n }\n}\n\nconst createObjectProxy = <TName extends ObjectKeys>(name: TName) => {\n return new Proxy(\n {} as OpsNamespace[TName],\n {\n get<TProperty extends keyof OpsNamespace[TName]>(_target: OpsNamespace[TName], property: TProperty): OpsNamespace[TName][TProperty] {\n return Reflect.get(ctxMgr.instance.op[name]!, property)\n },\n } as ProxyHandler<OpsNamespace[TName]>,\n )\n}\n\nexport const addw: AddwType = createFunctionProxy('addw')\nexport const appOptedIn: AppOptedInType = createFunctionProxy('appOptedIn')\nexport const arg: ArgType = createFunctionProxy('arg')\nexport const balance: BalanceType = createFunctionProxy('balance')\nexport const base64Decode: Base64DecodeType = createFunctionProxy('base64Decode')\nexport const bitLength: BitLengthType = createFunctionProxy('bitLength')\nexport const bsqrt: BsqrtType = createFunctionProxy('bsqrt')\nexport const btoi: BtoiType = createFunctionProxy('btoi')\nexport const bzero: BzeroType = createFunctionProxy('bzero')\nexport const concat: ConcatType = createFunctionProxy('concat')\nexport const divmodw: DivmodwType = createFunctionProxy('divmodw')\nexport const divw: DivwType = createFunctionProxy('divw')\nexport const ecdsaPkDecompress: EcdsaPkDecompressType = createFunctionProxy('ecdsaPkDecompress')\nexport const ecdsaPkRecover: EcdsaPkRecoverType = createFunctionProxy('ecdsaPkRecover')\nexport const ecdsaVerify: EcdsaVerifyType = createFunctionProxy('ecdsaVerify')\nexport const ed25519verifyBare: Ed25519verifyBareType = createFunctionProxy('ed25519verifyBare')\nexport const ed25519verify: Ed25519verifyType = createFunctionProxy('ed25519verify')\nexport const exp: ExpType = createFunctionProxy('exp')\nexport const expw: ExpwType = createFunctionProxy('expw')\nexport const extract: ExtractType = createFunctionProxy('extract') as ExtractType\nexport const extractUint16: ExtractUint16Type = createFunctionProxy('extractUint16')\nexport const extractUint32: ExtractUint32Type = createFunctionProxy('extractUint32')\nexport const extractUint64: ExtractUint64Type = createFunctionProxy('extractUint64')\nexport const gaid: GaidType = createFunctionProxy('gaid')\nexport const getBit: GetBitType = createFunctionProxy('getBit')\nexport const getByte: GetByteType = createFunctionProxy('getByte')\nexport const gloadBytes: GloadBytesType = createFunctionProxy('gloadBytes')\nexport const gloadUint64: GloadUint64Type = createFunctionProxy('gloadUint64')\nexport const itob: ItobType = createFunctionProxy('itob')\nexport const keccak256: Keccak256Type = createFunctionProxy('keccak256')\nexport const len: LenType = createFunctionProxy('len')\nexport const minBalance: BalanceType = createFunctionProxy('minBalance')\nexport const mulw: MulwType = createFunctionProxy('mulw')\nexport const replace: ReplaceType = createFunctionProxy('replace')\nexport const select: SelectType = createFunctionProxy('select') as SelectType\nexport const setBit: SetBitType = createFunctionProxy('setBit') as SetBitType\nexport const setByte: SetByteType = createFunctionProxy('setByte')\nexport const sha256: Sha256Type = createFunctionProxy('sha256')\nexport const sha3_256: Sha3_256Type = createFunctionProxy('sha3_256')\nexport const sha512_256: Sha512_256Type = createFunctionProxy('sha512_256')\nexport const shl: ShlType = createFunctionProxy('shl')\nexport const shr: ShrType = createFunctionProxy('shr')\nexport const sqrt: SqrtType = createFunctionProxy('sqrt')\nexport const substring: SubstringType = createFunctionProxy('substring')\nexport const vrfVerify: VrfVerifyType = createFunctionProxy('vrfVerify')\nexport const onlineStake: OnlineStakeType = createFunctionProxy('onlineStake')\nexport const falconVerify: FalconVerifyType = createFunctionProxy('falconVerify')\nexport const sumhash512: Sumhash512Type = createFunctionProxy('sumhash512')\n\nexport const EllipticCurve: EllipticCurveType = createObjectProxy('EllipticCurve')\nexport const Global: GlobalType = createObjectProxy('Global')\nexport const GTxn: GTxnType = createObjectProxy('GTxn')\nexport const JsonRef: JsonRefType = createObjectProxy('JsonRef')\nexport const Txn: TxnType = createObjectProxy('Txn')\nexport const GITxn: GITxnType = createObjectProxy('GITxn')\nexport const ITxn: ITxnType = createObjectProxy('ITxn')\nexport const ITxnCreate: ITxnCreateType = createObjectProxy('ITxnCreate')\nexport const Scratch: ScratchType = createObjectProxy('Scratch')\n\nexport const AcctParams = createObjectProxy('AcctParams')\nexport const AppGlobal = createObjectProxy('AppGlobal')\nexport const AppLocal = createObjectProxy('AppLocal')\nexport const AppParams = createObjectProxy('AppParams')\nexport const AssetHolding = createObjectProxy('AssetHolding')\nexport const AssetParams = createObjectProxy('AssetParams')\nexport const Block = createObjectProxy('Block')\nexport const Box = createObjectProxy('Box')\nexport const VoterParams = createObjectProxy('VoterParams')\n"],"names":[],"mappings":"AA+Ca,MAAA,MAAM,GAAG;IACpB,IAAI,QAAQ,CAAC,GAAqB,EAAA;AAChC,QAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,sBAAsB;QAC9C,IAAI,QAAQ,IAAI,SAAS;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC;AACpF,QAAA,MAAM,CAAC,sBAAsB,GAAG,GAAG;K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AAC,KAAK;MACxC,IAAI,GAAa,mBAAmB,CAAC,MAAM;MAC3C,SAAS,GAAkB,mBAAmB,CAAC,WAAW;MAC1D,SAAS,GAAkB,mBAAmB,CAAC,WAAW;MAC1D,WAAW,GAAoB,mBAAmB,CAAC,aAAa;MAChE,YAAY,GAAqB,mBAAmB,CAAC,cAAc;MACnE,UAAU,GAAmB,mBAAmB,CAAC,YAAY;MAE7D,aAAa,GAAsB,iBAAiB,CAAC,eAAe;MACpE,MAAM,GAAe,iBAAiB,CAAC,QAAQ;MAC/C,IAAI,GAAa,iBAAiB,CAAC,MAAM;MACzC,OAAO,GAAgB,iBAAiB,CAAC,SAAS;MAClD,GAAG,GAAY,iBAAiB,CAAC,KAAK;MACtC,KAAK,GAAc,iBAAiB,CAAC,OAAO;MAC5C,IAAI,GAAa,iBAAiB,CAAC,MAAM;MACzC,UAAU,GAAmB,iBAAiB,CAAC,YAAY;MAC3D,OAAO,GAAgB,iBAAiB,CAAC,SAAS;MAElD,UAAU,GAAG,iBAAiB,CAAC,YAAY;MAC3C,SAAS,GAAG,iBAAiB,CAAC,WAAW;MACzC,QAAQ,GAAG,iBAAiB,CAAC,UAAU;MACvC,SAAS,GAAG,iBAAiB,CAAC,WAAW;MACzC,YAAY,GAAG,iBAAiB,CAAC,cAAc;MAC/C,WAAW,GAAG,iBAAiB,CAAC,aAAa;MAC7C,KAAK,GAAG,iBAAiB,CAAC,OAAO;MACjC,GAAG,GAAG,iBAAiB,CAAC,KAAK;MAC7B,WAAW,GAAG,iBAAiB,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/op-types.d.ts
CHANGED
@@ -577,13 +577,6 @@ export type ExpType = (a: uint64, b: uint64) => uint64;
|
|
577
577
|
* Min AVM version: 4
|
578
578
|
*/
|
579
579
|
export type ExpwType = (a: uint64, b: uint64) => readonly [uint64, uint64];
|
580
|
-
/**
|
581
|
-
* 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
|
582
|
-
* `extract3` can be called using `extract` with no immediates.
|
583
|
-
* @see Native TEAL opcode: [`extract3`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract3)
|
584
|
-
* Min AVM version: 5
|
585
|
-
*/
|
586
|
-
export type ExtractType = (a: bytes, b: uint64, c: uint64) => bytes;
|
587
580
|
/**
|
588
581
|
* 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
|
589
582
|
* @see Native TEAL opcode: [`extract_uint16`](https://developer.algorand.org/docs/get-details/dapps/avm/teal/opcodes/v10/#extract_uint16)
|
@@ -2564,6 +2557,7 @@ export type VoterParamsType = {
|
|
2564
2557
|
* Min AVM version: 7
|
2565
2558
|
*/
|
2566
2559
|
export type VrfVerifyType = (s: VrfVerify, a: bytes, b: bytes, c: bytes) => readonly [bytes, boolean];
|
2560
|
+
export type ExtractType = ((a: bytes, b: uint64) => bytes) & ((a: bytes, b: uint64, c: uint64) => bytes);
|
2567
2561
|
export type SelectType = ((a: bytes, b: bytes, c: uint64) => bytes) & ((a: uint64, b: uint64, c: uint64) => uint64);
|
2568
2562
|
export type SetBitType = ((target: bytes, n: uint64, c: uint64) => bytes) & ((target: uint64, n: uint64, c: uint64) => uint64);
|
2569
2563
|
export type OpsNamespace = {
|
@@ -2595,7 +2589,6 @@ export type OpsNamespace = {
|
|
2595
2589
|
ed25519verifyBare: Ed25519verifyBareType;
|
2596
2590
|
exp: ExpType;
|
2597
2591
|
expw: ExpwType;
|
2598
|
-
extract: ExtractType;
|
2599
2592
|
extractUint16: ExtractUint16Type;
|
2600
2593
|
extractUint32: ExtractUint32Type;
|
2601
2594
|
extractUint64: ExtractUint64Type;
|
@@ -2631,6 +2624,7 @@ export type OpsNamespace = {
|
|
2631
2624
|
Txn: TxnType;
|
2632
2625
|
VoterParams: VoterParamsType;
|
2633
2626
|
vrfVerify: VrfVerifyType;
|
2627
|
+
extract: ExtractType;
|
2634
2628
|
select: SelectType;
|
2635
2629
|
setBit: SetBitType;
|
2636
2630
|
};
|
package/package.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"**"
|
5
5
|
],
|
6
6
|
"name": "@algorandfoundation/algorand-typescript",
|
7
|
-
"version": "1.0.0-beta.
|
7
|
+
"version": "1.0.0-beta.7",
|
8
8
|
"description": "This package contains definitions for the types which comprise Algorand TypeScript which can be compiled to run on the Algorand Virtual Machine using the Puya compiler.",
|
9
9
|
"private": false,
|
10
10
|
"overrides": {
|