@algorandfoundation/algorand-typescript 0.0.1-alpha.3 → 0.0.1-alpha.5
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/impl/encoding-util.d.ts +2 -0
- package/impl/primitives.d.ts +1 -1
- package/{index-CAZZKmeS.js → index-BMWt0XtP.js} +19 -6
- package/index-BMWt0XtP.js.map +1 -0
- package/index.mjs +3 -2
- package/index.mjs.map +1 -1
- package/index2.mjs +2 -1
- package/index2.mjs.map +1 -1
- package/package.json +1 -1
- package/primitives.d.ts +1 -0
- package/index-CAZZKmeS.js.map +0 -1
package/impl/encoding-util.d.ts
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
export declare const uint8ArrayToBigInt: (v: Uint8Array) => bigint;
|
2
|
+
export declare const hexToUint8Array: (value: string) => Uint8Array;
|
3
|
+
export declare const base64ToUint8Array: (value: string) => Uint8Array;
|
2
4
|
export declare const bigIntToUint8Array: (val: bigint, fixedSize?: number | "dynamic") => Uint8Array;
|
3
5
|
export declare const utf8ToUint8Array: (value: string) => Uint8Array;
|
4
6
|
export declare const uint8ArrayToUtf8: (value: Uint8Array) => string;
|
package/impl/primitives.d.ts
CHANGED
@@ -25,7 +25,7 @@ export declare class Uint64Cls extends AlgoTsPrimitiveCls {
|
|
25
25
|
static fromCompat(v: StubUint64Compat): Uint64Cls;
|
26
26
|
static getNumber(v: StubUint64Compat): number;
|
27
27
|
valueOf(): bigint;
|
28
|
-
toBytes(
|
28
|
+
toBytes(): BytesCls;
|
29
29
|
asAlgoTs(): uint64;
|
30
30
|
asBigInt(): bigint;
|
31
31
|
asNumber(): number;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Buffer } from 'node:buffer';
|
1
2
|
import { TextDecoder } from 'node:util';
|
2
3
|
|
3
4
|
const BASE32_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'.split('');
|
@@ -42,7 +43,7 @@ const uint8ArrayToBase32 = (value) => {
|
|
42
43
|
if (allBytes.length < 1)
|
43
44
|
break;
|
44
45
|
base32str += BASE32_ALPHABET[a >>> 3];
|
45
|
-
base32str += BASE32_ALPHABET[((a << 2) | ((b || 0) >>> 6)) &
|
46
|
+
base32str += BASE32_ALPHABET[((a << 2) | ((b || 0) >>> 6)) & 31];
|
46
47
|
if (allBytes.length < 2)
|
47
48
|
break;
|
48
49
|
base32str += BASE32_ALPHABET[(b >>> 1) & 31];
|
@@ -123,6 +124,16 @@ const uint8ArrayToBigInt = (v) => {
|
|
123
124
|
.map((byte_value, i) => BigInt(byte_value) << BigInt(i * 8))
|
124
125
|
.reduce((a, b) => a + b, 0n);
|
125
126
|
};
|
127
|
+
const hexToUint8Array = (value) => {
|
128
|
+
if (value.length % 2 !== 0) {
|
129
|
+
// TODO: Verify AVM behaviour is to fail
|
130
|
+
throw new AvmError('Hex string must have even number of characters');
|
131
|
+
}
|
132
|
+
return Uint8Array.from(Buffer.from(value, 'hex'));
|
133
|
+
};
|
134
|
+
const base64ToUint8Array = (value) => {
|
135
|
+
return Uint8Array.from(Buffer.from(value, 'base64'));
|
136
|
+
};
|
126
137
|
const bigIntToUint8Array = (val, fixedSize = 'dynamic') => {
|
127
138
|
if (val === 0n && fixedSize === 'dynamic') {
|
128
139
|
return new Uint8Array(0);
|
@@ -160,7 +171,9 @@ const uint8ArrayToBase64Url = (value) => Buffer.from(value).toString('base64url'
|
|
160
171
|
|
161
172
|
var encodingUtil = /*#__PURE__*/Object.freeze({
|
162
173
|
__proto__: null,
|
174
|
+
base64ToUint8Array: base64ToUint8Array,
|
163
175
|
bigIntToUint8Array: bigIntToUint8Array,
|
176
|
+
hexToUint8Array: hexToUint8Array,
|
164
177
|
uint8ArrayToBase32: uint8ArrayToBase32,
|
165
178
|
uint8ArrayToBase64: uint8ArrayToBase64,
|
166
179
|
uint8ArrayToBase64Url: uint8ArrayToBase64Url,
|
@@ -302,8 +315,8 @@ class Uint64Cls extends AlgoTsPrimitiveCls {
|
|
302
315
|
valueOf() {
|
303
316
|
return this.#value;
|
304
317
|
}
|
305
|
-
toBytes(
|
306
|
-
return new BytesCls(bigIntToUint8Array(this.#value,
|
318
|
+
toBytes() {
|
319
|
+
return new BytesCls(bigIntToUint8Array(this.#value, 8));
|
307
320
|
}
|
308
321
|
asAlgoTs() {
|
309
322
|
return this;
|
@@ -467,10 +480,10 @@ class BytesCls extends AlgoTsPrimitiveCls {
|
|
467
480
|
.reduce((a, b) => a.concat(b));
|
468
481
|
}
|
469
482
|
static fromHex(hex) {
|
470
|
-
return new BytesCls(
|
483
|
+
return new BytesCls(hexToUint8Array(hex));
|
471
484
|
}
|
472
485
|
static fromBase64(b64) {
|
473
|
-
return new BytesCls(
|
486
|
+
return new BytesCls(base64ToUint8Array(b64));
|
474
487
|
}
|
475
488
|
static fromBase32(b32) {
|
476
489
|
return new BytesCls(base32ToUint8Array(b32));
|
@@ -769,4 +782,4 @@ var index = /*#__PURE__*/Object.freeze({
|
|
769
782
|
});
|
770
783
|
|
771
784
|
export { AssertError as A, BytesCls as B, Contract as C, DynamicArray as D, OpUpFeeSource as O, Str as S, Tuple as T, Uint64 as U, errors as a, err as b, ctxMgr as c, assert as d, encodingUtil as e, assertMatch as f, ensureBudget as g, abimethod as h, index as i, BaseContract as j, BigUint as k, log as l, match as m, Bytes as n, OnCompleteAction as o, primitives as p, baremethod as q, UintN as r, UFixedNxM as s, Byte as t, urange as u, Bool as v, StaticArray as w, Address as x };
|
772
|
-
//# sourceMappingURL=index-
|
785
|
+
//# sourceMappingURL=index-BMWt0XtP.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-BMWt0XtP.js","sources":["../src/impl/base-32.ts","../src/impl/errors.ts","../src/impl/encoding-util.ts","../src/impl/name-of-type.ts","../src/impl/primitives.ts","../src/primitives.ts","../src/execution-context.ts","../src/util.ts","../src/base-contract.ts","../src/arc4/encoded-types.ts","../src/arc4/index.ts"],"sourcesContent":["const BASE32_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'.split('')\n\nconst CHAR_TO_NUM = BASE32_ALPHABET.reduce((acc, cur, index) => ((acc[cur] = index), acc), {} as Record<string, number>)\n\nexport const base32ToUint8Array = (value: string): Uint8Array => {\n let allChars = value\n .split('')\n .filter((c) => c !== '=')\n .map((c) => {\n const cUpper = c.toUpperCase()\n if (cUpper in CHAR_TO_NUM) return CHAR_TO_NUM[cUpper]\n throw new Error(`Invalid base32 char ${c}`)\n })\n const bytes = new Array<number>()\n while (allChars.length) {\n const [a, b, c, d, e, f, g, h, ...rest] = allChars\n if (a === undefined || b === undefined) break\n bytes.push(((a << 3) | (b >>> 2)) & 255)\n if (c === undefined || d === undefined) break\n bytes.push(((b << 6) | (c << 1) | (d >>> 4)) & 255)\n if (e === undefined) break\n bytes.push(((d << 4) | (e >>> 1)) & 255)\n if (f === undefined || g === undefined) break\n bytes.push(((e << 7) | (f << 2) | (g >>> 3)) & 255)\n if (h === undefined) break\n bytes.push(((g << 5) | h) & 255)\n allChars = rest\n }\n return new Uint8Array(bytes)\n}\n\nexport const uint8ArrayToBase32 = (value: Uint8Array): string => {\n let allBytes = Array.from(value)\n let base32str = ''\n while (allBytes.length) {\n const [a, b, c, d, e, ...rest] = allBytes ?? [0, 0, 0, 0, 0]\n\n if (allBytes.length < 1) break\n base32str += BASE32_ALPHABET[a >>> 3]\n base32str += BASE32_ALPHABET[((a << 2) | ((b || 0) >>> 6)) & 31]\n if (allBytes.length < 2) break\n base32str += BASE32_ALPHABET[(b >>> 1) & 31]\n base32str += BASE32_ALPHABET[((b << 4) | (c >>> 4)) & 31]\n if (allBytes.length < 3) break\n base32str += BASE32_ALPHABET[((c << 1) | (d >>> 7)) & 31]\n if (allBytes.length < 4) break\n base32str += BASE32_ALPHABET[(d >>> 2) & 31]\n base32str += BASE32_ALPHABET[((d << 3) | (e >>> 5)) & 31]\n if (allBytes.length < 5) break\n base32str += BASE32_ALPHABET[e & 31]\n allBytes = rest\n }\n return base32str\n}\n","/**\n * Raised when an `err` op is encountered, or when the testing VM is asked to do something that would cause\n * the AVM to fail.\n */\nexport class AvmError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\nexport function avmError(message: string): never {\n throw new AvmError(message)\n}\n/**\n * Raised when an assertion fails\n */\nexport class AssertError extends AvmError {\n constructor(message: string) {\n super(message)\n }\n}\n\n/**\n * Raised when testing code errors\n */\nexport class InternalError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(message, options)\n }\n}\n\nexport function internalError(message: string): never {\n throw new InternalError(message)\n}\n\n/**\n * Raised when unsupported user code is encountered\n */\nexport class CodeError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(message, options)\n }\n}\n\nexport function codeError(message: string): never {\n throw new CodeError(message)\n}\n","import { Buffer } from 'node:buffer'\nimport { TextDecoder } from 'node:util'\nimport { AvmError } from './errors'\n\nexport const uint8ArrayToBigInt = (v: Uint8Array): bigint => {\n // Assume big-endian\n return Array.from(v)\n .toReversed()\n .map((byte_value, i): bigint => BigInt(byte_value) << BigInt(i * 8))\n .reduce((a, b) => a + b, 0n)\n}\n\nexport const hexToUint8Array = (value: string): Uint8Array => {\n if (value.length % 2 !== 0) {\n // TODO: Verify AVM behaviour is to fail\n throw new AvmError('Hex string must have even number of characters')\n }\n return Uint8Array.from(Buffer.from(value, 'hex'))\n}\n\nexport const base64ToUint8Array = (value: string): Uint8Array => {\n return Uint8Array.from(Buffer.from(value, 'base64'))\n}\n\nexport const bigIntToUint8Array = (val: bigint, fixedSize: number | 'dynamic' = 'dynamic'): Uint8Array => {\n if (val === 0n && fixedSize === 'dynamic') {\n return new Uint8Array(0)\n }\n const maxBytes = fixedSize === 'dynamic' ? undefined : fixedSize\n\n let hex = val.toString(16)\n\n // Pad the hex with zeros so it matches the size in bytes\n if (fixedSize !== 'dynamic' && hex.length !== fixedSize * 2) {\n hex = hex.padStart(fixedSize * 2, '0')\n } else if (hex.length % 2 == 1) {\n // Pad to 'whole' byte\n hex = `0${hex}`\n }\n if (maxBytes && hex.length > maxBytes * 2) {\n throw new AvmError(`Cannot encode ${val} as ${maxBytes} bytes as it would overflow`)\n }\n const byteArray = new Uint8Array(hex.length / 2)\n for (let i = 0, j = 0; i < hex.length / 2; i++, j += 2) {\n byteArray[i] = parseInt(hex.slice(j, j + 2), 16)\n }\n return byteArray\n}\n\nexport const utf8ToUint8Array = (value: string): Uint8Array => {\n const encoder = new TextEncoder()\n return encoder.encode(value)\n}\n\nexport const uint8ArrayToUtf8 = (value: Uint8Array): string => {\n const decoder = new TextDecoder()\n return decoder.decode(value)\n}\n\nexport const uint8ArrayToHex = (value: Uint8Array): string => Buffer.from(value).toString('hex')\n\nexport const uint8ArrayToBase64 = (value: Uint8Array): string => Buffer.from(value).toString('base64')\n\nexport const uint8ArrayToBase64Url = (value: Uint8Array): string => Buffer.from(value).toString('base64url')\n\nexport { uint8ArrayToBase32 } from './base-32'\n","export const nameOfType = (x: unknown) => {\n if (typeof x === 'object') {\n if (x === null) return 'Null'\n if (x === undefined) return 'undefined'\n if ('constructor' in x) {\n return x.constructor.name\n }\n }\n return typeof x\n}\n","import type { biguint, BigUintCompat, bytes, BytesCompat, uint64, Uint64Compat } from '../index'\nimport { DeliberateAny } from '../typescript-helpers'\nimport { base32ToUint8Array } from './base-32'\nimport {\n base64ToUint8Array,\n bigIntToUint8Array,\n hexToUint8Array,\n uint8ArrayToBigInt,\n uint8ArrayToHex,\n uint8ArrayToUtf8,\n utf8ToUint8Array,\n} from './encoding-util'\nimport { avmError, AvmError, internalError } from './errors'\nimport { nameOfType } from './name-of-type'\n\nconst MAX_UINT8 = 2 ** 8 - 1\nconst MAX_BYTES_SIZE = 4096\n\nexport type StubBigUintCompat = BigUintCompat | BigUintCls | Uint64Cls\nexport type StubBytesCompat = BytesCompat | BytesCls\nexport type StubUint64Compat = Uint64Compat | Uint64Cls\n\nexport function toExternalValue(val: uint64): bigint\nexport function toExternalValue(val: biguint): bigint\nexport function toExternalValue(val: bytes): Uint8Array\nexport function toExternalValue(val: string): string\nexport function toExternalValue(val: uint64 | biguint | bytes | string) {\n const instance = val as unknown\n if (instance instanceof BytesCls) return instance.asUint8Array()\n if (instance instanceof Uint64Cls) return instance.asBigInt()\n if (instance instanceof BigUintCls) return instance.asBigInt()\n if (typeof val === 'string') return val\n}\nexport const toBytes = (val: unknown): bytes => {\n if (val instanceof AlgoTsPrimitiveCls) return val.toBytes().asAlgoTs()\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 const isBytes = (v: unknown): v is StubBytesCompat => {\n if (typeof v === 'string') return true\n if (v instanceof BytesCls) return true\n return v instanceof Uint8Array\n}\n\nexport const isUint64 = (v: unknown): v is StubUint64Compat => {\n if (typeof v == 'boolean') return true\n if (typeof v == 'number') return true\n if (typeof v == 'bigint') return true\n return v instanceof Uint64Cls\n}\n\nexport const isBigUint = (v: unknown): v is biguint => {\n return v instanceof BigUintCls\n}\n\nexport const checkUint64 = (v: bigint): bigint => {\n const u64 = BigInt.asUintN(64, v)\n if (u64 !== v) throw new AvmError(`Uint64 over or underflow`)\n return u64\n}\nexport const checkBigUint = (v: bigint): bigint => {\n const uBig = BigInt.asUintN(64 * 8, v)\n if (uBig !== v) throw new AvmError(`BigUint over or underflow`)\n return uBig\n}\n\nexport const checkBytes = (v: Uint8Array): Uint8Array => {\n if (v.length > MAX_BYTES_SIZE) throw new AvmError(`Bytes length ${v.length} exceeds maximum length ${MAX_BYTES_SIZE}`)\n return v\n}\n\n/**\n * Verifies that an object is an instance of a type based on its name rather than reference equality.\n *\n * This is useful in scenarios where a module loader has loaded a module twice and hence two instances of a\n * type do not have reference equality on their constructors.\n * @param subject The object to check\n * @param typeCtor The ctor of the type\n */\nfunction isInstanceOfTypeByName(subject: unknown, typeCtor: { name: string }): boolean {\n if (subject === null || typeof subject !== 'object') return false\n\n let ctor = subject.constructor\n while (typeof ctor === 'function') {\n if (ctor.name === typeCtor.name) return true\n ctor = Object.getPrototypeOf(ctor)\n }\n return false\n}\n\nexport abstract class AlgoTsPrimitiveCls {\n static [Symbol.hasInstance](x: unknown): x is AlgoTsPrimitiveCls {\n return isInstanceOfTypeByName(x, AlgoTsPrimitiveCls)\n }\n\n abstract valueOf(): bigint | string\n abstract toBytes(): BytesCls\n}\n\nexport class Uint64Cls extends AlgoTsPrimitiveCls {\n readonly #value: bigint\n constructor(value: bigint | number | string) {\n super()\n this.#value = BigInt(value)\n checkUint64(this.#value)\n\n Object.defineProperty(this, 'uint64', {\n value: this.#value.toString(),\n writable: false,\n enumerable: true,\n })\n }\n static [Symbol.hasInstance](x: unknown): x is Uint64Cls {\n return isInstanceOfTypeByName(x, Uint64Cls)\n }\n static fromCompat(v: StubUint64Compat): Uint64Cls {\n if (typeof v == 'boolean') return new Uint64Cls(v ? 1n : 0n)\n if (typeof v == 'number') return new Uint64Cls(BigInt(v))\n if (typeof v == 'bigint') return new Uint64Cls(v)\n if (v instanceof Uint64Cls) return v\n internalError(`Cannot convert ${v} to uint64`)\n }\n\n static getNumber(v: StubUint64Compat): number {\n return Uint64Cls.fromCompat(v).asNumber()\n }\n\n valueOf(): bigint {\n return this.#value\n }\n\n toBytes(): BytesCls {\n return new BytesCls(bigIntToUint8Array(this.#value, 8))\n }\n\n asAlgoTs(): uint64 {\n return this as unknown as uint64\n }\n\n asBigInt(): bigint {\n return this.#value\n }\n asNumber(): number {\n if (this.#value > Number.MAX_SAFE_INTEGER) {\n throw new AvmError('value cannot be safely converted to a number')\n }\n return Number(this.#value)\n }\n}\n\nexport class BigUintCls extends AlgoTsPrimitiveCls {\n readonly #value: bigint\n constructor(value: bigint) {\n super()\n this.#value = value\n Object.defineProperty(this, 'biguint', {\n value: value.toString(),\n writable: false,\n enumerable: true,\n })\n }\n valueOf(): bigint {\n return this.#value\n }\n\n toBytes(): BytesCls {\n return new BytesCls(bigIntToUint8Array(this.#value))\n }\n\n asAlgoTs(): biguint {\n return this as unknown as biguint\n }\n\n asBigInt(): bigint {\n return this.#value\n }\n asNumber(): number {\n if (this.#value > Number.MAX_SAFE_INTEGER) {\n throw new AvmError('value cannot be safely converted to a number')\n }\n return Number(this.#value)\n }\n static [Symbol.hasInstance](x: unknown): x is BigUintCls {\n return isInstanceOfTypeByName(x, BigUintCls)\n }\n static fromCompat(v: StubBigUintCompat): BigUintCls {\n if (typeof v == 'boolean') return new BigUintCls(v ? 1n : 0n)\n if (typeof v == 'number') return new BigUintCls(BigInt(v))\n if (typeof v == 'bigint') return new BigUintCls(v)\n if (v instanceof Uint64Cls) return new BigUintCls(v.valueOf())\n if (v instanceof BytesCls) return v.toBigUint()\n if (v instanceof BigUintCls) return v\n internalError(`Cannot convert ${nameOfType(v)} to BigUint`)\n }\n}\n\nexport class BytesCls extends AlgoTsPrimitiveCls {\n readonly #v: Uint8Array\n constructor(v: Uint8Array) {\n super()\n this.#v = v\n checkBytes(this.#v)\n // Add an enumerable property for debugging code to show\n Object.defineProperty(this, 'bytes', {\n value: uint8ArrayToHex(this.#v),\n writable: false,\n enumerable: true,\n })\n }\n\n get length() {\n return new Uint64Cls(this.#v.length)\n }\n\n toBytes(): BytesCls {\n return this\n }\n\n at(i: StubUint64Compat): BytesCls {\n const start = Uint64Cls.fromCompat(i).asNumber()\n return new BytesCls(this.#v.slice(start, start + 1))\n }\n\n slice(start: StubUint64Compat, end: StubUint64Compat): BytesCls {\n const startNumber = start instanceof Uint64Cls ? start.asNumber() : start\n const endNumber = end instanceof Uint64Cls ? end.asNumber() : end\n const sliced = arrayUtil.arraySlice(this.#v, startNumber, endNumber)\n return new BytesCls(sliced)\n }\n\n concat(other: StubBytesCompat): BytesCls {\n const otherArray = BytesCls.fromCompat(other).asUint8Array()\n const mergedArray = new Uint8Array(this.#v.length + otherArray.length)\n mergedArray.set(this.#v)\n mergedArray.set(otherArray, this.#v.length)\n return new BytesCls(mergedArray)\n }\n\n bitwiseAnd(other: StubBytesCompat): BytesCls {\n return this.bitwiseOp(other, (a, b) => a & b)\n }\n\n bitwiseOr(other: StubBytesCompat): BytesCls {\n return this.bitwiseOp(other, (a, b) => a | b)\n }\n\n bitwiseXor(other: StubBytesCompat): BytesCls {\n return this.bitwiseOp(other, (a, b) => a ^ b)\n }\n\n bitwiseInvert(): BytesCls {\n const result = new Uint8Array(this.#v.length)\n this.#v.forEach((v, i) => {\n result[i] = ~v & MAX_UINT8\n })\n return new BytesCls(result)\n }\n\n equals(other: StubBytesCompat): boolean {\n const otherArray = BytesCls.fromCompat(other).asUint8Array()\n if (this.#v.length !== otherArray.length) return false\n for (let i = 0; i < this.#v.length; i++) {\n if (this.#v[i] !== otherArray[i]) return false\n }\n return true\n }\n\n private bitwiseOp(other: StubBytesCompat, op: (a: number, b: number) => number): BytesCls {\n const otherArray = BytesCls.fromCompat(other).asUint8Array()\n const result = new Uint8Array(Math.max(this.#v.length, otherArray.length))\n for (let i = result.length - 1; i >= 0; i--) {\n const thisIndex = i - (result.length - this.#v.length)\n const otherIndex = i - (result.length - otherArray.length)\n result[i] = op(this.#v[thisIndex] ?? 0, otherArray[otherIndex] ?? 0)\n }\n return new BytesCls(result)\n }\n\n valueOf(): string {\n return uint8ArrayToHex(this.#v)\n }\n\n static [Symbol.hasInstance](x: unknown): x is BytesCls {\n return isInstanceOfTypeByName(x, BytesCls)\n }\n\n static fromCompat(v: StubBytesCompat | undefined): BytesCls {\n if (v === undefined) return new BytesCls(new Uint8Array())\n if (typeof v === 'string') return new BytesCls(utf8ToUint8Array(v))\n if (v instanceof BytesCls) return v\n if (v instanceof Uint8Array) return new BytesCls(v)\n internalError(`Cannot convert ${nameOfType(v)} to bytes`)\n }\n\n static fromInterpolation(template: TemplateStringsArray, replacements: StubBytesCompat[]) {\n return template\n .flatMap((templateText, index) => {\n const replacement = replacements[index]\n if (replacement) {\n return [BytesCls.fromCompat(templateText), BytesCls.fromCompat(replacement)]\n }\n return [BytesCls.fromCompat(templateText)]\n })\n .reduce((a, b) => a.concat(b))\n }\n\n static fromHex(hex: string): BytesCls {\n return new BytesCls(hexToUint8Array(hex))\n }\n\n static fromBase64(b64: string): BytesCls {\n return new BytesCls(base64ToUint8Array(b64))\n }\n\n static fromBase32(b32: string): BytesCls {\n return new BytesCls(base32ToUint8Array(b32))\n }\n\n toUint64(): Uint64Cls {\n return new Uint64Cls(uint8ArrayToBigInt(this.#v))\n }\n\n toBigUint(): BigUintCls {\n return new BigUintCls(uint8ArrayToBigInt(this.#v))\n }\n\n toString(): string {\n return uint8ArrayToUtf8(this.#v)\n }\n\n asAlgoTs(): bytes {\n return this as unknown as bytes\n }\n\n asUint8Array(): Uint8Array {\n return this.#v\n }\n}\n\nexport const arrayUtil = new (class {\n arrayAt<T>(arrayLike: T[], index: StubUint64Compat): T {\n return arrayLike.at(Uint64Cls.fromCompat(index).asNumber()) ?? avmError('Index out of bounds')\n }\n arraySlice(arrayLike: Uint8Array, start: StubUint64Compat, end: StubUint64Compat): Uint8Array\n arraySlice<T>(arrayLike: T[], start: StubUint64Compat, end: StubUint64Compat): T[]\n arraySlice<T>(arrayLike: T[] | Uint8Array, start: StubUint64Compat, end: StubUint64Compat) {\n return arrayLike.slice(Uint64Cls.getNumber(start), Uint64Cls.getNumber(end)) as DeliberateAny\n }\n})()\n","import { BigUintCls, BytesCls, Uint64Cls } from './impl/primitives'\n\nexport type Uint64Compat = uint64 | bigint | boolean | number\nexport type BigUintCompat = Uint64Compat | bigint | bytes | number\nexport type StringCompat = string\nexport type BytesCompat = bytes | string | Uint8Array\n\n/**\n * An unsigned integer of exactly 64 bits\n */\nexport type uint64 = {\n __type?: 'uint64'\n} & number\n\n/**\n * Create a uint64 value\n * @param v The value to use\n */\nexport function Uint64(v: bigint): uint64\nexport function Uint64(v: number): uint64\nexport function Uint64(v: boolean): uint64\nexport function Uint64(v: Uint64Compat): uint64 {\n return Uint64Cls.fromCompat(v).asAlgoTs()\n}\n\n/**\n * An unsigned integer of up to 512 bits\n *\n * Stored as a big-endian variable byte array\n */\nexport type biguint = {\n __type?: 'biguint'\n} & bigint\n\n/**\n * Create a biguint value\n * @param v The value to use\n */\nexport function BigUint(v: bigint): biguint\nexport function BigUint(v: boolean): biguint\nexport function BigUint(v: number): biguint\nexport function BigUint(v: bytes): biguint\nexport function BigUint(v: BigUintCompat): biguint {\n return BigUintCls.fromCompat(v).asAlgoTs()\n}\n\nexport type bytes = {\n readonly length: uint64\n\n at(i: Uint64Compat): bytes\n\n concat(other: BytesCompat): bytes\n\n bitwiseAnd(other: BytesCompat): bytes\n\n bitwiseOr(other: BytesCompat): bytes\n\n bitwiseXor(other: BytesCompat): bytes\n\n bitwiseInvert(): bytes\n\n equals(other: BytesCompat): boolean\n\n slice(start?: Uint64Compat, end?: Uint64Compat): bytes\n\n toString(): string\n}\n\nexport function Bytes(value: TemplateStringsArray, ...replacements: BytesCompat[]): bytes\nexport function Bytes(value: BytesCompat): bytes\nexport function Bytes(): bytes\nexport function Bytes(value?: BytesCompat | TemplateStringsArray, ...replacements: BytesCompat[]): bytes {\n if (isTemplateStringsArray(value)) {\n return BytesCls.fromInterpolation(value, replacements).asAlgoTs()\n } else {\n return BytesCls.fromCompat(value).asAlgoTs()\n }\n}\n\n/**\n * Create a new bytes value from a hexadecimal encoded string\n * @param hex\n */\nBytes.fromHex = (hex: string): bytes => {\n return BytesCls.fromHex(hex).asAlgoTs()\n}\n/**\n * Create a new bytes value from a base 64 encoded string\n * @param b64\n */\nBytes.fromBase64 = (b64: string): bytes => {\n return BytesCls.fromBase64(b64).asAlgoTs()\n}\n\n/**\n * Create a new bytes value from a base 32 encoded string\n * @param b32\n */\nBytes.fromBase32 = (b32: string): bytes => {\n return BytesCls.fromBase32(b32).asAlgoTs()\n}\n\nfunction isTemplateStringsArray(v: unknown): v is TemplateStringsArray {\n return Boolean(v) && Array.isArray(v) && typeof v[0] === 'string'\n}\n\nexport interface BytesBacked {\n get bytes(): bytes\n}\n","import { Contract, gtxn, itxn } 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}\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 { biguint, BigUintCompat, BytesCompat, StringCompat, uint64, Uint64Compat } from './primitives'\nimport { ctxMgr } from './execution-context'\nimport { AssertError, AvmError } from './impl/errors'\nimport { toBytes } from './impl/primitives'\n\nexport function log(...args: Array<Uint64Compat | BytesCompat | BigUintCompat | StringCompat>): 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')\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 { uint64 } from './primitives'\n\nexport abstract class BaseContract {\n public abstract approvalProgram(): boolean | uint64\n public clearStateProgram(): boolean | uint64 {\n return true\n }\n}\n","import { biguint, BigUintCompat, Bytes, bytes, BytesBacked, StringCompat, uint64, Uint64Compat } from '../primitives'\nimport { err } from '../util'\nimport { Account } from '../reference'\nimport { arrayUtil } from '../impl/primitives'\n\nexport type BitSize = 8 | 16 | 32 | 64 | 128 | 256 | 512\ntype NativeForArc4Int<N extends BitSize> = N extends 8 | 16 | 32 | 64 ? uint64 : biguint\ntype CompatForArc4Int<N extends BitSize> = N extends 8 | 16 | 32 | 64 ? Uint64Compat : BigUintCompat\n\nabstract class AbiEncoded implements BytesBacked {\n get bytes(): bytes {\n throw new Error('todo')\n }\n}\n\nexport class Str extends AbiEncoded {\n constructor(s: StringCompat) {\n super()\n }\n get native(): string {\n throw new Error('TODO')\n }\n}\nexport class UintN<N extends BitSize> extends AbiEncoded {\n constructor(v?: CompatForArc4Int<N>) {\n super()\n }\n get native(): NativeForArc4Int<N> {\n throw new Error('TODO')\n }\n}\nexport class UFixedNxM<N extends BitSize, M extends number> {\n constructor(v: `${number}:${number}`, n?: N, m?: M) {}\n\n get native(): NativeForArc4Int<N> {\n throw new Error('TODO')\n }\n}\n\nexport class Byte extends UintN<8> {\n constructor(v: Uint64Compat) {\n super(v)\n }\n get native(): uint64 {\n throw new Error('TODO')\n }\n}\nexport class Bool {\n #v: boolean\n constructor(v: boolean) {\n this.#v = v\n }\n\n get native(): boolean {\n return this.#v\n }\n}\n\nabstract class Arc4Array<TItem> extends AbiEncoded {\n protected constructor(protected items: TItem[]) {\n super()\n }\n get length(): uint64 {\n throw new Error('TODO')\n }\n at(index: Uint64Compat): TItem {\n return arrayUtil.arrayAt(this.items, index)\n }\n slice(start: Uint64Compat, end: Uint64Compat): DynamicArray<TItem> {\n return new DynamicArray(...arrayUtil.arraySlice(this.items, start, end))\n }\n [Symbol.iterator](): IterableIterator<TItem> {\n return this.items[Symbol.iterator]()\n }\n entries(): IterableIterator<readonly [uint64, TItem]> {\n throw new Error('TODO')\n }\n keys(): IterableIterator<uint64> {\n throw new Error('TODO')\n }\n}\n\nexport class StaticArray<TItem, TLength extends number> extends Arc4Array<TItem> {\n constructor()\n constructor(...items: TItem[] & { length: TLength })\n constructor(...items: TItem[])\n constructor(...items: TItem[] & { length: TLength }) {\n super(items)\n }\n\n copy(): StaticArray<TItem, TLength> {\n return new StaticArray<TItem, TLength>(...this.items)\n }\n}\n\nexport class DynamicArray<TItem> extends Arc4Array<TItem> {\n constructor(...items: TItem[]) {\n super(items)\n }\n push(...items: TItem[]): void {}\n pop(): TItem {\n throw new Error('Not implemented')\n }\n\n copy(): DynamicArray<TItem> {\n return new DynamicArray<TItem>(...this.items)\n }\n}\n\ntype ItemAt<TTuple extends unknown[], TIndex extends number> = undefined extends TTuple[TIndex] ? never : TTuple[TIndex]\n\nexport class Tuple<TTuple extends unknown[]> {\n #items: TTuple\n constructor(...items: TTuple) {\n this.#items = items\n }\n\n at<TIndex extends number>(index: TIndex): ItemAt<TTuple, TIndex> {\n return (this.#items[index] ?? err('Index out of bounds')) as ItemAt<TTuple, TIndex>\n }\n\n get native(): TTuple {\n return this.#items\n }\n}\n\nexport class Address extends StaticArray<Byte, 32> {\n constructor(value: Account | string | bytes) {\n super()\n }\n\n get native(): Account {\n throw new Error('TODO')\n }\n}\n","import { BaseContract } from '../base-contract'\nimport { ctxMgr } from '../execution-context'\nimport { Uint64 } from '../primitives'\nimport { DeliberateAny } from '../typescript-helpers'\n\nexport * from './encoded-types'\n\nexport class Contract extends BaseContract {\n override approvalProgram(): boolean {\n return true\n }\n}\n\nexport type CreateOptions = 'allow' | 'disallow' | 'require'\nexport type OnCompleteActionStr = 'NoOp' | 'OptIn' | 'ClearState' | 'CloseOut' | 'UpdateApplication' | 'DeleteApplication'\n\nexport enum OnCompleteAction {\n NoOp = Uint64(0),\n OptIn = Uint64(1),\n CloseOut = Uint64(2),\n ClearState = Uint64(3),\n UpdateApplication = Uint64(4),\n DeleteApplication = Uint64(5),\n}\n\nexport type DefaultArgument<TContract extends Contract> = { constant: string | boolean | number | bigint } | { from: keyof TContract }\nexport type AbiMethodConfig<TContract extends Contract> = {\n /**\n * Which on complete action(s) are allowed when invoking this method.\n * @default 'NoOp'\n */\n allowActions?: OnCompleteActionStr | OnCompleteActionStr[]\n /**\n * Whether this method should be callable when creating the application.\n * @default 'disallow'\n */\n onCreate?: CreateOptions\n /**\n * Does the method only perform read operations (no mutation of chain state)\n * @default false\n */\n readonly?: boolean\n /**\n * Override the name used to generate the abi method selector\n */\n name?: string\n\n defaultArguments?: Record<string, DefaultArgument<TContract>>\n}\nexport function abimethod<TContract extends Contract>(config?: AbiMethodConfig<TContract>) {\n return function <TArgs extends DeliberateAny[], TReturn>(\n target: (this: TContract, ...args: TArgs) => TReturn,\n ctx: ClassMethodDecoratorContext<TContract>,\n ): (this: TContract, ...args: TArgs) => TReturn {\n ctx.addInitializer(function () {\n ctxMgr.instance.abiMetadata.captureMethodConfig(this, target.name, config)\n })\n return target\n }\n}\n\nexport type BareMethodConfig = {\n /**\n * Which on complete action(s) are allowed when invoking this method.\n * @default 'NoOp'\n */\n allowActions?: OnCompleteActionStr | OnCompleteActionStr[]\n /**\n * Whether this method should be callable when creating the application.\n * @default 'disallow'\n */\n onCreate?: CreateOptions\n}\nexport function baremethod<TContract extends Contract>(config?: BareMethodConfig) {\n return function <TArgs extends DeliberateAny[], TReturn>(\n target: (this: TContract, ...args: TArgs) => TReturn,\n ctx: ClassMethodDecoratorContext<TContract>,\n ): (this: TContract, ...args: TArgs) => TReturn {\n ctx.addInitializer(function () {\n ctxMgr.instance.abiMetadata.captureMethodConfig(this, target.name, config)\n })\n return target\n }\n}\n"],"names":[],"mappings":";;;AAAA,MAAM,eAAe,GAAG,kCAAkC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;AAEpE,MAAM,WAAW,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,GAAG,CAAC,EAAE,EAA4B,CAAC,CAAA;AAEjH,MAAM,kBAAkB,GAAG,CAAC,KAAa,KAAgB;IAC9D,IAAI,QAAQ,GAAG,KAAK;SACjB,KAAK,CAAC,EAAE,CAAC;SACT,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC;AACxB,SAAA,GAAG,CAAC,CAAC,CAAC,KAAI;AACT,QAAA,MAAM,MAAM,GAAG,CAAC,CAAC,WAA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B,EAAA,CAAA,CAAA,CAAA;AA0BK,SAAU,SAAS,CAA6B,MAAmC,EAAA;IACvF,OAAO,UACL,MAAoD,EACpD,GAA2C,EAAA;QAE3C,GAAG,CAAC,cAAc,CAAC,YAAA;AACjB,YAAA,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;AAC5E,SAAC,CAAC,CAAA;AACF,QAAA,OAAO,MAAM,CAAA;AACf,KAAC,CAAA;AACH,CAAC;AAcK,SAAU,UAAU,CAA6B,MAAyB,EAAA;IAC9E,OAAO,UACL,MAAoD,EACpD,GAA2C,EAAA;QAE3C,GAAG,CAAC,cAAc,CAAC,YAAA;AACjB,YAAA,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;AAC5E,SAAC,CAAC,CAAA;AACF,QAAA,OAAO,MAAM,CAAA;AACf,KAAC,CAAA;AACH;;;;;;;;;;;;;;;;;;;;;"}
|
package/index.mjs
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
import { c as ctxMgr, A as AssertError, B as BytesCls, e as encodingUtil, a as errors, p as primitives } from './index-
|
2
|
-
export { j as BaseContract, k as BigUint, n as Bytes, C as Contract, O as OpUpFeeSource, U as Uint64, h as abimethod, i as arc4, d as assert, f as assertMatch, g as ensureBudget, b as err, l as log, m as match, u as urange } from './index-
|
1
|
+
import { c as ctxMgr, A as AssertError, B as BytesCls, e as encodingUtil, a as errors, p as primitives } from './index-BMWt0XtP.js';
|
2
|
+
export { j as BaseContract, k as BigUint, n as Bytes, C as Contract, O as OpUpFeeSource, U as Uint64, h as abimethod, i as arc4, d as assert, f as assertMatch, g as ensureBudget, b as err, l as log, m as match, u as urange } from './index-BMWt0XtP.js';
|
3
|
+
import 'node:buffer';
|
3
4
|
import 'node:util';
|
4
5
|
|
5
6
|
function Account(address) {
|
package/index.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/reference.ts","../src/op-types.ts","../src/op.ts","../src/impl/state.ts","../src/box.ts","../src/state.ts","../src/itxn.ts","../src/gtxn.ts","../src/transactions.ts"],"sourcesContent":["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","export 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 */\n acctBalance(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * Minimum required balance for account, in microalgos\n */\n acctMinBalance(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * Address the account is rekeyed to.\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 */\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 */\n acctTotalNumByteSlice(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of extra app code pages used by this account.\n */\n acctTotalExtraAppPages(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of existing apps created by this account.\n */\n acctTotalAppsCreated(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of apps this account is opted into.\n */\n acctTotalAppsOptedIn(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of existing ASAs created by this account.\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 */\n acctTotalAssets(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of existing boxes created by this account's app.\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 */\n acctTotalBoxBytes(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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\nexport type AppOptedInType = (a: Account | uint64, b: Application | uint64) => boolean\n\nexport type AppParamsType = {\n /**\n * Bytecode of Approval Program\n */\n appApprovalProgram(a: Application | uint64): readonly [bytes, boolean]\n\n /**\n * Bytecode of Clear State Program\n */\n appClearStateProgram(a: Application | uint64): readonly [bytes, boolean]\n\n /**\n * Number of uint64 values allowed in Global State\n */\n appGlobalNumUint(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of byte array values allowed in Global State\n */\n appGlobalNumByteSlice(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of uint64 values allowed in Local State\n */\n appLocalNumUint(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of byte array values allowed in Local State\n */\n appLocalNumByteSlice(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of Extra Program Pages of code space\n */\n appExtraProgramPages(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Creator address\n */\n appCreator(a: Application | uint64): readonly [Account, boolean]\n\n /**\n * Address for which this application has authority\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 */\nexport type ArgType = (a: uint64) => bytes\n\nexport type AssetHoldingType = {\n /**\n * Amount of the asset unit held by this account\n */\n assetBalance(a: Account | uint64, b: Asset | uint64): readonly [uint64, boolean]\n\n /**\n * Is the asset frozen or not\n */\n assetFrozen(a: Account | uint64, b: Asset | uint64): readonly [boolean, boolean]\n}\n\nexport type AssetParamsType = {\n /**\n * Total number of units of this asset\n */\n assetTotal(a: Asset | uint64): readonly [uint64, boolean]\n\n /**\n * See AssetParams.Decimals\n */\n assetDecimals(a: Asset | uint64): readonly [uint64, boolean]\n\n /**\n * Frozen by default or not\n */\n assetDefaultFrozen(a: Asset | uint64): readonly [boolean, boolean]\n\n /**\n * Asset unit name\n */\n assetUnitName(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * Asset name\n */\n assetName(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * URL with additional info about the asset\n */\n assetUrl(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * Arbitrary commitment\n */\n assetMetadataHash(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * Manager address\n */\n assetManager(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Reserve address\n */\n assetReserve(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Freeze address\n */\n assetFreeze(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Clawback address\n */\n assetClawback(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Creator address\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 */\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 */\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 */\nexport type BitLengthType = (a: uint64 | bytes) => uint64\n\nexport type BlockType = {\n blkSeed(a: uint64): bytes\n\n blkTimestamp(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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\nexport type ExtractUint64Type = (a: bytes, b: uint64) => uint64\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 */\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 */\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 */\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 */\n sender(t: uint64): Account\n\n /**\n * microalgos\n */\n fee(t: uint64): uint64\n\n /**\n * round number\n */\n firstValid(t: uint64): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime(t: uint64): uint64\n\n /**\n * round number\n */\n lastValid(t: uint64): uint64\n\n /**\n * Any data up to 1024 bytes\n */\n note(t: uint64): bytes\n\n /**\n * 32 byte lease value\n */\n lease(t: uint64): bytes\n\n /**\n * 32 byte address\n */\n receiver(t: uint64): Account\n\n /**\n * microalgos\n */\n amount(t: uint64): uint64\n\n /**\n * 32 byte address\n */\n closeRemainderTo(t: uint64): Account\n\n /**\n * 32 byte address\n */\n votePk(t: uint64): bytes\n\n /**\n * 32 byte address\n */\n selectionPk(t: uint64): bytes\n\n /**\n * The first round that the participation key is valid.\n */\n voteFirst(t: uint64): uint64\n\n /**\n * The last round that the participation key is valid.\n */\n voteLast(t: uint64): uint64\n\n /**\n * Dilution for the 2-level participation key\n */\n voteKeyDilution(t: uint64): uint64\n\n /**\n * Transaction type as bytes\n */\n type(t: uint64): bytes\n\n /**\n * Transaction type as integer\n */\n typeEnum(t: uint64): uint64\n\n /**\n * Asset ID\n */\n xferAsset(t: uint64): Asset\n\n /**\n * value in Asset's units\n */\n assetAmount(t: uint64): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n assetSender(t: uint64): Account\n\n /**\n * 32 byte address\n */\n assetReceiver(t: uint64): Account\n\n /**\n * 32 byte address\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 */\n groupIndex(t: uint64): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n txId(t: uint64): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n */\n applicationId(t: uint64): Application\n\n /**\n * ApplicationCall transaction on completion action\n */\n onCompletion(t: uint64): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n */\n applicationArgs(t: uint64, a: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n */\n numAppArgs(t: uint64): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n */\n accounts(t: uint64, a: uint64): Account\n\n /**\n * Number of Accounts\n */\n numAccounts(t: uint64): uint64\n\n /**\n * Approval program\n */\n approvalProgram(t: uint64): bytes\n\n /**\n * Clear state program\n */\n clearStateProgram(t: uint64): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo(t: uint64): Account\n\n /**\n * Asset ID in asset config transaction\n */\n configAsset(t: uint64): Asset\n\n /**\n * Total number of units of this asset created\n */\n configAssetTotal(t: uint64): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n configAssetDecimals(t: uint64): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n configAssetDefaultFrozen(t: uint64): boolean\n\n /**\n * Unit name of the asset\n */\n configAssetUnitName(t: uint64): bytes\n\n /**\n * The asset name\n */\n configAssetName(t: uint64): bytes\n\n /**\n * URL\n */\n configAssetUrl(t: uint64): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n configAssetMetadataHash(t: uint64): bytes\n\n /**\n * 32 byte address\n */\n configAssetManager(t: uint64): Account\n\n /**\n * 32 byte address\n */\n configAssetReserve(t: uint64): Account\n\n /**\n * 32 byte address\n */\n configAssetFreeze(t: uint64): Account\n\n /**\n * 32 byte address\n */\n configAssetClawback(t: uint64): Account\n\n /**\n * Asset ID being frozen or un-frozen\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 */\n freezeAssetAccount(t: uint64): Account\n\n /**\n * The new frozen value, 0 or 1\n */\n freezeAssetFrozen(t: uint64): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n */\n assets(t: uint64, a: uint64): Asset\n\n /**\n * Number of Assets\n */\n numAssets(t: uint64): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n */\n applications(t: uint64, a: uint64): Application\n\n /**\n * Number of Applications\n */\n numApplications(t: uint64): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n */\n globalNumUint(t: uint64): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n */\n globalNumByteSlice(t: uint64): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n */\n localNumUint(t: uint64): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\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 */\n extraProgramPages(t: uint64): uint64\n\n /**\n * Marks an account nonparticipating for rewards\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 */\n logs(t: uint64, a: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\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 */\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 */\n createdApplicationId(t: uint64): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n */\n lastLog(t: uint64): bytes\n\n /**\n * 64 byte state proof public key\n */\n stateProofPk(t: uint64): bytes\n\n /**\n * Approval Program as an array of pages\n */\n approvalProgramPages(t: uint64, a: uint64): bytes\n\n /**\n * Number of Approval Program pages\n */\n numApprovalProgramPages(t: uint64): uint64\n\n /**\n * ClearState Program as an array of pages\n */\n clearStateProgramPages(t: uint64, a: uint64): bytes\n\n /**\n * Number of ClearState Program pages\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 */\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 */\nexport type GloadUint64Type = (a: uint64, b: uint64) => uint64\n\nexport type GlobalType = {\n /**\n * microalgos\n */\n get minTxnFee(): uint64\n\n /**\n * microalgos\n */\n get minBalance(): uint64\n\n /**\n * rounds\n */\n get maxTxnLife(): uint64\n\n /**\n * 32 byte address of all zero bytes\n */\n get zeroAddress(): Account\n\n /**\n * Number of transactions in this atomic transaction group. At least 1\n */\n get groupSize(): uint64\n\n /**\n * Maximum supported version\n */\n get logicSigVersion(): uint64\n\n /**\n * Current round number. Application mode only.\n */\n get round(): uint64\n\n /**\n * Last confirmed block UNIX timestamp. Fails if negative. Application mode only.\n */\n get latestTimestamp(): uint64\n\n /**\n * ID of current application executing. Application mode only.\n */\n get currentApplicationId(): Application\n\n /**\n * Address of the creator of the current application. Application mode only.\n */\n get creatorAddress(): Account\n\n /**\n * Address that the current application controls. Application mode only.\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 */\n get groupId(): bytes\n\n /**\n * The remaining cost that can be spent by opcodes in this program.\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 */\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 */\n get callerApplicationAddress(): Account\n\n /**\n * The additional minimum balance required to create (and opt-in to) an asset.\n */\n get assetCreateMinBalance(): uint64\n\n /**\n * The additional minimum balance required to opt-in to an asset.\n */\n get assetOptInMinBalance(): uint64\n\n /**\n * The Genesis Hash for the network.\n */\n get genesisHash(): bytes\n}\n\n/**\n * Get values for transactions in the current group\n */\nexport type GTxnType = {\n /**\n * 32 byte address\n */\n sender(t: uint64): Account\n\n /**\n * microalgos\n */\n fee(t: uint64): uint64\n\n /**\n * round number\n */\n firstValid(t: uint64): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime(t: uint64): uint64\n\n /**\n * round number\n */\n lastValid(t: uint64): uint64\n\n /**\n * Any data up to 1024 bytes\n */\n note(t: uint64): bytes\n\n /**\n * 32 byte lease value\n */\n lease(t: uint64): bytes\n\n /**\n * 32 byte address\n */\n receiver(t: uint64): Account\n\n /**\n * microalgos\n */\n amount(t: uint64): uint64\n\n /**\n * 32 byte address\n */\n closeRemainderTo(t: uint64): Account\n\n /**\n * 32 byte address\n */\n votePk(t: uint64): bytes\n\n /**\n * 32 byte address\n */\n selectionPk(t: uint64): bytes\n\n /**\n * The first round that the participation key is valid.\n */\n voteFirst(t: uint64): uint64\n\n /**\n * The last round that the participation key is valid.\n */\n voteLast(t: uint64): uint64\n\n /**\n * Dilution for the 2-level participation key\n */\n voteKeyDilution(t: uint64): uint64\n\n /**\n * Transaction type as bytes\n */\n type(t: uint64): bytes\n\n /**\n * Transaction type as integer\n */\n typeEnum(t: uint64): uint64\n\n /**\n * Asset ID\n */\n xferAsset(t: uint64): Asset\n\n /**\n * value in Asset's units\n */\n assetAmount(t: uint64): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n assetSender(t: uint64): Account\n\n /**\n * 32 byte address\n */\n assetReceiver(t: uint64): Account\n\n /**\n * 32 byte address\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 */\n groupIndex(t: uint64): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n txId(t: uint64): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n */\n applicationId(t: uint64): Application\n\n /**\n * ApplicationCall transaction on completion action\n */\n onCompletion(t: uint64): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n */\n applicationArgs(a: uint64, b: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n */\n numAppArgs(t: uint64): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n */\n accounts(a: uint64, b: uint64): Account\n\n /**\n * Number of Accounts\n */\n numAccounts(t: uint64): uint64\n\n /**\n * Approval program\n */\n approvalProgram(t: uint64): bytes\n\n /**\n * Clear state program\n */\n clearStateProgram(t: uint64): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo(t: uint64): Account\n\n /**\n * Asset ID in asset config transaction\n */\n configAsset(t: uint64): Asset\n\n /**\n * Total number of units of this asset created\n */\n configAssetTotal(t: uint64): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n configAssetDecimals(t: uint64): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n configAssetDefaultFrozen(t: uint64): boolean\n\n /**\n * Unit name of the asset\n */\n configAssetUnitName(t: uint64): bytes\n\n /**\n * The asset name\n */\n configAssetName(t: uint64): bytes\n\n /**\n * URL\n */\n configAssetUrl(t: uint64): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n configAssetMetadataHash(t: uint64): bytes\n\n /**\n * 32 byte address\n */\n configAssetManager(t: uint64): Account\n\n /**\n * 32 byte address\n */\n configAssetReserve(t: uint64): Account\n\n /**\n * 32 byte address\n */\n configAssetFreeze(t: uint64): Account\n\n /**\n * 32 byte address\n */\n configAssetClawback(t: uint64): Account\n\n /**\n * Asset ID being frozen or un-frozen\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 */\n freezeAssetAccount(t: uint64): Account\n\n /**\n * The new frozen value, 0 or 1\n */\n freezeAssetFrozen(t: uint64): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n */\n assets(a: uint64, b: uint64): Asset\n\n /**\n * Number of Assets\n */\n numAssets(t: uint64): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n */\n applications(a: uint64, b: uint64): Application\n\n /**\n * Number of Applications\n */\n numApplications(t: uint64): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n */\n globalNumUint(t: uint64): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n */\n globalNumByteSlice(t: uint64): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n */\n localNumUint(t: uint64): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\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 */\n extraProgramPages(t: uint64): uint64\n\n /**\n * Marks an account nonparticipating for rewards\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 */\n logs(a: uint64, b: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\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 */\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 */\n createdApplicationId(t: uint64): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n */\n lastLog(t: uint64): bytes\n\n /**\n * 64 byte state proof public key\n */\n stateProofPk(t: uint64): bytes\n\n /**\n * Approval Program as an array of pages\n */\n approvalProgramPages(a: uint64, b: uint64): bytes\n\n /**\n * Number of Approval Program pages\n */\n numApprovalProgramPages(t: uint64): uint64\n\n /**\n * ClearState Program as an array of pages\n */\n clearStateProgramPages(a: uint64, b: uint64): bytes\n\n /**\n * Number of ClearState Program pages\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 */\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 */\n get sender(): Account\n\n /**\n * microalgos\n */\n get fee(): uint64\n\n /**\n * round number\n */\n get firstValid(): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n get firstValidTime(): uint64\n\n /**\n * round number\n */\n get lastValid(): uint64\n\n /**\n * Any data up to 1024 bytes\n */\n get note(): bytes\n\n /**\n * 32 byte lease value\n */\n get lease(): bytes\n\n /**\n * 32 byte address\n */\n get receiver(): Account\n\n /**\n * microalgos\n */\n get amount(): uint64\n\n /**\n * 32 byte address\n */\n get closeRemainderTo(): Account\n\n /**\n * 32 byte address\n */\n get votePk(): bytes\n\n /**\n * 32 byte address\n */\n get selectionPk(): bytes\n\n /**\n * The first round that the participation key is valid.\n */\n get voteFirst(): uint64\n\n /**\n * The last round that the participation key is valid.\n */\n get voteLast(): uint64\n\n /**\n * Dilution for the 2-level participation key\n */\n get voteKeyDilution(): uint64\n\n /**\n * Transaction type as bytes\n */\n get type(): bytes\n\n /**\n * Transaction type as integer\n */\n get typeEnum(): uint64\n\n /**\n * Asset ID\n */\n get xferAsset(): Asset\n\n /**\n * value in Asset's units\n */\n get assetAmount(): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n get assetSender(): Account\n\n /**\n * 32 byte address\n */\n get assetReceiver(): Account\n\n /**\n * 32 byte address\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 */\n get groupIndex(): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n get txId(): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n */\n get applicationId(): Application\n\n /**\n * ApplicationCall transaction on completion action\n */\n get onCompletion(): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n */\n applicationArgs(a: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n */\n get numAppArgs(): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n */\n accounts(a: uint64): Account\n\n /**\n * Number of Accounts\n */\n get numAccounts(): uint64\n\n /**\n * Approval program\n */\n get approvalProgram(): bytes\n\n /**\n * Clear state program\n */\n get clearStateProgram(): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n get rekeyTo(): Account\n\n /**\n * Asset ID in asset config transaction\n */\n get configAsset(): Asset\n\n /**\n * Total number of units of this asset created\n */\n get configAssetTotal(): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n get configAssetDecimals(): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n get configAssetDefaultFrozen(): boolean\n\n /**\n * Unit name of the asset\n */\n get configAssetUnitName(): bytes\n\n /**\n * The asset name\n */\n get configAssetName(): bytes\n\n /**\n * URL\n */\n get configAssetUrl(): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n get configAssetMetadataHash(): bytes\n\n /**\n * 32 byte address\n */\n get configAssetManager(): Account\n\n /**\n * 32 byte address\n */\n get configAssetReserve(): Account\n\n /**\n * 32 byte address\n */\n get configAssetFreeze(): Account\n\n /**\n * 32 byte address\n */\n get configAssetClawback(): Account\n\n /**\n * Asset ID being frozen or un-frozen\n */\n get freezeAsset(): Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n */\n get freezeAssetAccount(): Account\n\n /**\n * The new frozen value, 0 or 1\n */\n get freezeAssetFrozen(): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n */\n assets(a: uint64): Asset\n\n /**\n * Number of Assets\n */\n get numAssets(): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n */\n applications(a: uint64): Application\n\n /**\n * Number of Applications\n */\n get numApplications(): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n */\n get globalNumUint(): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n */\n get globalNumByteSlice(): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n */\n get localNumUint(): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\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 */\n get extraProgramPages(): uint64\n\n /**\n * Marks an account nonparticipating for rewards\n */\n get nonparticipation(): boolean\n\n /**\n * Log messages emitted by an application call (only with `itxn` in v5). Application mode only\n */\n logs(a: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\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 */\n get createdAssetId(): Asset\n\n /**\n * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only\n */\n get createdApplicationId(): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n */\n get lastLog(): bytes\n\n /**\n * 64 byte state proof public key\n */\n get stateProofPk(): bytes\n\n /**\n * Approval Program as an array of pages\n */\n approvalProgramPages(a: uint64): bytes\n\n /**\n * Number of Approval Program pages\n */\n get numApprovalProgramPages(): uint64\n\n /**\n * ClearState Program as an array of pages\n */\n clearStateProgramPages(a: uint64): bytes\n\n /**\n * Number of ClearState Program pages\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 */\n begin(): void\n\n /**\n * 32 byte address\n */\n setSender(a: Account): void\n\n /**\n * microalgos\n */\n setFee(a: uint64): void\n\n /**\n * Any data up to 1024 bytes\n */\n setNote(a: bytes): void\n\n /**\n * 32 byte address\n */\n setReceiver(a: Account): void\n\n /**\n * microalgos\n */\n setAmount(a: uint64): void\n\n /**\n * 32 byte address\n */\n setCloseRemainderTo(a: Account): void\n\n /**\n * 32 byte address\n */\n setVotePk(a: bytes): void\n\n /**\n * 32 byte address\n */\n setSelectionPk(a: bytes): void\n\n /**\n * The first round that the participation key is valid.\n */\n setVoteFirst(a: uint64): void\n\n /**\n * The last round that the participation key is valid.\n */\n setVoteLast(a: uint64): void\n\n /**\n * Dilution for the 2-level participation key\n */\n setVoteKeyDilution(a: uint64): void\n\n /**\n * Transaction type as bytes\n */\n setType(a: bytes): void\n\n /**\n * Transaction type as integer\n */\n setTypeEnum(a: uint64): void\n\n /**\n * Asset ID\n */\n setXferAsset(a: Asset | uint64): void\n\n /**\n * value in Asset's units\n */\n setAssetAmount(a: uint64): void\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n setAssetSender(a: Account): void\n\n /**\n * 32 byte address\n */\n setAssetReceiver(a: Account): void\n\n /**\n * 32 byte address\n */\n setAssetCloseTo(a: Account): void\n\n /**\n * ApplicationID from ApplicationCall transaction\n */\n setApplicationId(a: Application | uint64): void\n\n /**\n * ApplicationCall transaction on completion action\n */\n setOnCompletion(a: uint64): void\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n */\n setApplicationArgs(a: bytes): void\n\n /**\n * Accounts listed in the ApplicationCall transaction\n */\n setAccounts(a: Account): void\n\n /**\n * Approval program\n */\n setApprovalProgram(a: bytes): void\n\n /**\n * Clear state program\n */\n setClearStateProgram(a: bytes): void\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n setRekeyTo(a: Account): void\n\n /**\n * Asset ID in asset config transaction\n */\n setConfigAsset(a: Asset | uint64): void\n\n /**\n * Total number of units of this asset created\n */\n setConfigAssetTotal(a: uint64): void\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n setConfigAssetDecimals(a: uint64): void\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n setConfigAssetDefaultFrozen(a: boolean): void\n\n /**\n * Unit name of the asset\n */\n setConfigAssetUnitName(a: bytes): void\n\n /**\n * The asset name\n */\n setConfigAssetName(a: bytes): void\n\n /**\n * URL\n */\n setConfigAssetUrl(a: bytes): void\n\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n setConfigAssetMetadataHash(a: bytes): void\n\n /**\n * 32 byte address\n */\n setConfigAssetManager(a: Account): void\n\n /**\n * 32 byte address\n */\n setConfigAssetReserve(a: Account): void\n\n /**\n * 32 byte address\n */\n setConfigAssetFreeze(a: Account): void\n\n /**\n * 32 byte address\n */\n setConfigAssetClawback(a: Account): void\n\n /**\n * Asset ID being frozen or un-frozen\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 */\n setFreezeAssetAccount(a: Account): void\n\n /**\n * The new frozen value, 0 or 1\n */\n setFreezeAssetFrozen(a: boolean): void\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n */\n setAssets(a: uint64): void\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n */\n setApplications(a: uint64): void\n\n /**\n * Number of global state integers in ApplicationCall\n */\n setGlobalNumUint(a: uint64): void\n\n /**\n * Number of global state byteslices in ApplicationCall\n */\n setGlobalNumByteSlice(a: uint64): void\n\n /**\n * Number of local state integers in ApplicationCall\n */\n setLocalNumUint(a: uint64): void\n\n /**\n * Number of local state byteslices in ApplicationCall\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 */\n setExtraProgramPages(a: uint64): void\n\n /**\n * Marks an account nonparticipating for rewards\n */\n setNonparticipation(a: boolean): void\n\n /**\n * 64 byte state proof public key\n */\n setStateProofPk(a: bytes): void\n\n /**\n * Approval Program as an array of pages\n */\n setApprovalProgramPages(a: bytes): void\n\n /**\n * ClearState Program as an array of pages\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 */\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 */\n submit(): void\n}\n\nexport type JsonRefType = {\n jsonString(a: bytes, b: bytes): bytes\n\n jsonUint64(a: bytes, b: bytes): uint64\n\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 */\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 */\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 */\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 */\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 */\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 */\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 */\nexport type MulwType = (a: uint64, b: uint64) => readonly [uint64, 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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\nexport type SubstringType = (a: bytes, b: uint64, c: uint64) => bytes\n\n/**\n * Get values for the current executing transaction\n */\nexport type TxnType = {\n /**\n * 32 byte address\n */\n get sender(): Account\n\n /**\n * microalgos\n */\n get fee(): uint64\n\n /**\n * round number\n */\n get firstValid(): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n get firstValidTime(): uint64\n\n /**\n * round number\n */\n get lastValid(): uint64\n\n /**\n * Any data up to 1024 bytes\n */\n get note(): bytes\n\n /**\n * 32 byte lease value\n */\n get lease(): bytes\n\n /**\n * 32 byte address\n */\n get receiver(): Account\n\n /**\n * microalgos\n */\n get amount(): uint64\n\n /**\n * 32 byte address\n */\n get closeRemainderTo(): Account\n\n /**\n * 32 byte address\n */\n get votePk(): bytes\n\n /**\n * 32 byte address\n */\n get selectionPk(): bytes\n\n /**\n * The first round that the participation key is valid.\n */\n get voteFirst(): uint64\n\n /**\n * The last round that the participation key is valid.\n */\n get voteLast(): uint64\n\n /**\n * Dilution for the 2-level participation key\n */\n get voteKeyDilution(): uint64\n\n /**\n * Transaction type as bytes\n */\n get type(): bytes\n\n /**\n * Transaction type as integer\n */\n get typeEnum(): uint64\n\n /**\n * Asset ID\n */\n get xferAsset(): Asset\n\n /**\n * value in Asset's units\n */\n get assetAmount(): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n get assetSender(): Account\n\n /**\n * 32 byte address\n */\n get assetReceiver(): Account\n\n /**\n * 32 byte address\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 */\n get groupIndex(): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n get txId(): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n */\n get applicationId(): Application\n\n /**\n * ApplicationCall transaction on completion action\n */\n get onCompletion(): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n */\n applicationArgs(a: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n */\n get numAppArgs(): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n */\n accounts(a: uint64): Account\n\n /**\n * Number of Accounts\n */\n get numAccounts(): uint64\n\n /**\n * Approval program\n */\n get approvalProgram(): bytes\n\n /**\n * Clear state program\n */\n get clearStateProgram(): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n get rekeyTo(): Account\n\n /**\n * Asset ID in asset config transaction\n */\n get configAsset(): Asset\n\n /**\n * Total number of units of this asset created\n */\n get configAssetTotal(): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n get configAssetDecimals(): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n get configAssetDefaultFrozen(): boolean\n\n /**\n * Unit name of the asset\n */\n get configAssetUnitName(): bytes\n\n /**\n * The asset name\n */\n get configAssetName(): bytes\n\n /**\n * URL\n */\n get configAssetUrl(): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n get configAssetMetadataHash(): bytes\n\n /**\n * 32 byte address\n */\n get configAssetManager(): Account\n\n /**\n * 32 byte address\n */\n get configAssetReserve(): Account\n\n /**\n * 32 byte address\n */\n get configAssetFreeze(): Account\n\n /**\n * 32 byte address\n */\n get configAssetClawback(): Account\n\n /**\n * Asset ID being frozen or un-frozen\n */\n get freezeAsset(): Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n */\n get freezeAssetAccount(): Account\n\n /**\n * The new frozen value, 0 or 1\n */\n get freezeAssetFrozen(): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n */\n assets(a: uint64): Asset\n\n /**\n * Number of Assets\n */\n get numAssets(): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n */\n applications(a: uint64): Application\n\n /**\n * Number of Applications\n */\n get numApplications(): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n */\n get globalNumUint(): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n */\n get globalNumByteSlice(): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n */\n get localNumUint(): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\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 */\n get extraProgramPages(): uint64\n\n /**\n * Marks an account nonparticipating for rewards\n */\n get nonparticipation(): boolean\n\n /**\n * Log messages emitted by an application call (only with `itxn` in v5). Application mode only\n */\n logs(a: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\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 */\n get createdAssetId(): Asset\n\n /**\n * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only\n */\n get createdApplicationId(): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n */\n get lastLog(): bytes\n\n /**\n * 64 byte state proof public key\n */\n get stateProofPk(): bytes\n\n /**\n * Approval Program as an array of pages\n */\n approvalProgramPages(a: uint64): bytes\n\n /**\n * Number of Approval Program pages\n */\n get numApprovalProgramPages(): uint64\n\n /**\n * ClearState Program as an array of pages\n */\n clearStateProgramPages(a: uint64): bytes\n\n /**\n * Number of ClearState Program pages\n */\n get numClearStateProgramPages(): uint64\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 */\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)\n/* THIS FILE IS GENERATED BY ~/scripts/generate-op-types.ts - DO NOT MODIFY DIRECTLY */\nimport { bytes, BytesCompat, uint64, Uint64Compat, biguint } from './primitives'\nimport { Account, Application, Asset } from './reference'\n\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 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 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 Txn: TxnType\n vrfVerify: VrfVerifyType\n select: SelectType\n setBit: SetBitType\n}\n","import { ctxMgr } from './execution-context'\n\nimport {\n AddwType,\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 GaidType,\n GetBitType,\n GetByteType,\n GITxnType,\n GlobalType,\n GTxnType,\n ItobType,\n ITxnCreateType,\n ITxnType,\n JsonRefType,\n Keccak256Type,\n MulwType,\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 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 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 itob: ItobType = createFunctionProxy('itob')\nexport const keccak256: Keccak256Type = createFunctionProxy('keccak256')\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')\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 AppParams = createObjectProxy('AppParams')\nexport const AssetHolding = createObjectProxy('AssetHolding')\nexport const AssetParams = createObjectProxy('AssetParams')\n\nexport { VrfVerify } from './op-types'\n","import { bytes } from '../primitives'\nimport { Account } from '../reference'\nimport { AssertError } from './errors'\nimport { BytesCls } from './primitives'\n\nexport class GlobalStateCls<ValueType> {\n private readonly _type: string = GlobalStateCls.name\n\n #value: ValueType | undefined\n key: bytes | undefined\n\n delete: () => void = () => {\n this.#value = undefined\n }\n\n static [Symbol.hasInstance](x: unknown): x is GlobalStateCls<unknown> {\n return x instanceof Object && '_type' in x && (x as { _type: string })['_type'] === GlobalStateCls.name\n }\n\n get value(): ValueType {\n if (this.#value === undefined) {\n throw new AssertError('value is not set')\n }\n return this.#value\n }\n\n set value(v: ValueType) {\n this.#value = v\n }\n\n get hasValue(): boolean {\n return this.#value !== undefined\n }\n\n constructor(key?: bytes | string, value?: ValueType) {\n this.key = BytesCls.fromCompat(key).asAlgoTs()\n this.#value = value\n }\n}\n\nexport class LocalStateCls<ValueType> {\n #value: ValueType | undefined\n delete: () => void = () => {\n this.#value = undefined\n }\n get value(): ValueType {\n if (this.#value === undefined) {\n throw new AssertError('value is not set')\n }\n return this.#value\n }\n\n set value(v: ValueType) {\n this.#value = v\n }\n\n get hasValue(): boolean {\n return this.#value !== undefined\n }\n}\n\nexport class LocalStateMapCls<ValueType> {\n #value = new Map<bytes, LocalStateCls<ValueType>>()\n\n getValue(account: Account): LocalStateCls<ValueType> {\n if (!this.#value.has(account.bytes)) {\n this.#value.set(account.bytes, new LocalStateCls<ValueType>())\n }\n return this.#value.get(account.bytes)!\n }\n}\n","import { 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\n readonly exists: boolean\n value: bytes\n get(options: { default: bytes }): bytes\n put(value: bytes): bytes\n splice(start: uint64, end: 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 throw new Error('Not implemented')\n}\n\nexport function BoxMap<TKey, TValue>(options: { keyPrefix: bytes | string }): BoxMap<TKey, TValue> {\n throw new Error('Not implemented')\n}\n\nexport function BoxRef(options: { key: bytes | string }): BoxRef {\n throw new Error('Not implemented')\n}\n","import { GlobalStateCls, LocalStateMapCls } from './impl/state'\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\ntype 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 new GlobalStateCls(options?.key, options?.initialValue)\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 function localStateInternal(account: Account): LocalStateForAccount<ValueType> {\n return localStateInternal.map.getValue(account)\n }\n localStateInternal.key = options?.key\n localStateInternal.map = new LocalStateMapCls<ValueType>()\n return localStateInternal\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"],"names":[],"mappings":";;;;AAqGM,SAAU,OAAO,CAAC,OAAe,EAAA;IACrC,OAAO,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;AACzC,CAAC;AAIK,SAAU,KAAK,CAAC,OAAgB,EAAA;IACpC,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;AACvC,CAAC;AA2FK,SAAU,WAAW,CAAC,aAAsB,EAAA;IAChD,OAAO,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,aAAa,CAAC,CAAA;AACnD;;AC1MA,IAAY,MAGX,CAAA;AAHD,CAAA,UAAY,MAAM,EAAA;AAChB,IAAA,MAAA,CAAA,aA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mjs","sources":["../src/reference.ts","../src/op-types.ts","../src/op.ts","../src/impl/state.ts","../src/box.ts","../src/state.ts","../src/itxn.ts","../src/gtxn.ts","../src/transactions.ts"],"sourcesContent":["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","export 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 */\n acctBalance(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * Minimum required balance for account, in microalgos\n */\n acctMinBalance(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * Address the account is rekeyed to.\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 */\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 */\n acctTotalNumByteSlice(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of extra app code pages used by this account.\n */\n acctTotalExtraAppPages(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of existing apps created by this account.\n */\n acctTotalAppsCreated(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of apps this account is opted into.\n */\n acctTotalAppsOptedIn(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of existing ASAs created by this account.\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 */\n acctTotalAssets(a: Account | uint64): readonly [uint64, boolean]\n\n /**\n * The number of existing boxes created by this account's app.\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 */\n acctTotalBoxBytes(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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\nexport type AppOptedInType = (a: Account | uint64, b: Application | uint64) => boolean\n\nexport type AppParamsType = {\n /**\n * Bytecode of Approval Program\n */\n appApprovalProgram(a: Application | uint64): readonly [bytes, boolean]\n\n /**\n * Bytecode of Clear State Program\n */\n appClearStateProgram(a: Application | uint64): readonly [bytes, boolean]\n\n /**\n * Number of uint64 values allowed in Global State\n */\n appGlobalNumUint(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of byte array values allowed in Global State\n */\n appGlobalNumByteSlice(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of uint64 values allowed in Local State\n */\n appLocalNumUint(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of byte array values allowed in Local State\n */\n appLocalNumByteSlice(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Number of Extra Program Pages of code space\n */\n appExtraProgramPages(a: Application | uint64): readonly [uint64, boolean]\n\n /**\n * Creator address\n */\n appCreator(a: Application | uint64): readonly [Account, boolean]\n\n /**\n * Address for which this application has authority\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 */\nexport type ArgType = (a: uint64) => bytes\n\nexport type AssetHoldingType = {\n /**\n * Amount of the asset unit held by this account\n */\n assetBalance(a: Account | uint64, b: Asset | uint64): readonly [uint64, boolean]\n\n /**\n * Is the asset frozen or not\n */\n assetFrozen(a: Account | uint64, b: Asset | uint64): readonly [boolean, boolean]\n}\n\nexport type AssetParamsType = {\n /**\n * Total number of units of this asset\n */\n assetTotal(a: Asset | uint64): readonly [uint64, boolean]\n\n /**\n * See AssetParams.Decimals\n */\n assetDecimals(a: Asset | uint64): readonly [uint64, boolean]\n\n /**\n * Frozen by default or not\n */\n assetDefaultFrozen(a: Asset | uint64): readonly [boolean, boolean]\n\n /**\n * Asset unit name\n */\n assetUnitName(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * Asset name\n */\n assetName(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * URL with additional info about the asset\n */\n assetUrl(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * Arbitrary commitment\n */\n assetMetadataHash(a: Asset | uint64): readonly [bytes, boolean]\n\n /**\n * Manager address\n */\n assetManager(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Reserve address\n */\n assetReserve(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Freeze address\n */\n assetFreeze(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Clawback address\n */\n assetClawback(a: Asset | uint64): readonly [Account, boolean]\n\n /**\n * Creator address\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 */\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 */\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 */\nexport type BitLengthType = (a: uint64 | bytes) => uint64\n\nexport type BlockType = {\n blkSeed(a: uint64): bytes\n\n blkTimestamp(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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\nexport type ExtractUint64Type = (a: bytes, b: uint64) => uint64\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 */\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 */\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 */\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 */\n sender(t: uint64): Account\n\n /**\n * microalgos\n */\n fee(t: uint64): uint64\n\n /**\n * round number\n */\n firstValid(t: uint64): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime(t: uint64): uint64\n\n /**\n * round number\n */\n lastValid(t: uint64): uint64\n\n /**\n * Any data up to 1024 bytes\n */\n note(t: uint64): bytes\n\n /**\n * 32 byte lease value\n */\n lease(t: uint64): bytes\n\n /**\n * 32 byte address\n */\n receiver(t: uint64): Account\n\n /**\n * microalgos\n */\n amount(t: uint64): uint64\n\n /**\n * 32 byte address\n */\n closeRemainderTo(t: uint64): Account\n\n /**\n * 32 byte address\n */\n votePk(t: uint64): bytes\n\n /**\n * 32 byte address\n */\n selectionPk(t: uint64): bytes\n\n /**\n * The first round that the participation key is valid.\n */\n voteFirst(t: uint64): uint64\n\n /**\n * The last round that the participation key is valid.\n */\n voteLast(t: uint64): uint64\n\n /**\n * Dilution for the 2-level participation key\n */\n voteKeyDilution(t: uint64): uint64\n\n /**\n * Transaction type as bytes\n */\n type(t: uint64): bytes\n\n /**\n * Transaction type as integer\n */\n typeEnum(t: uint64): uint64\n\n /**\n * Asset ID\n */\n xferAsset(t: uint64): Asset\n\n /**\n * value in Asset's units\n */\n assetAmount(t: uint64): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n assetSender(t: uint64): Account\n\n /**\n * 32 byte address\n */\n assetReceiver(t: uint64): Account\n\n /**\n * 32 byte address\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 */\n groupIndex(t: uint64): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n txId(t: uint64): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n */\n applicationId(t: uint64): Application\n\n /**\n * ApplicationCall transaction on completion action\n */\n onCompletion(t: uint64): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n */\n applicationArgs(t: uint64, a: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n */\n numAppArgs(t: uint64): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n */\n accounts(t: uint64, a: uint64): Account\n\n /**\n * Number of Accounts\n */\n numAccounts(t: uint64): uint64\n\n /**\n * Approval program\n */\n approvalProgram(t: uint64): bytes\n\n /**\n * Clear state program\n */\n clearStateProgram(t: uint64): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo(t: uint64): Account\n\n /**\n * Asset ID in asset config transaction\n */\n configAsset(t: uint64): Asset\n\n /**\n * Total number of units of this asset created\n */\n configAssetTotal(t: uint64): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n configAssetDecimals(t: uint64): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n configAssetDefaultFrozen(t: uint64): boolean\n\n /**\n * Unit name of the asset\n */\n configAssetUnitName(t: uint64): bytes\n\n /**\n * The asset name\n */\n configAssetName(t: uint64): bytes\n\n /**\n * URL\n */\n configAssetUrl(t: uint64): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n configAssetMetadataHash(t: uint64): bytes\n\n /**\n * 32 byte address\n */\n configAssetManager(t: uint64): Account\n\n /**\n * 32 byte address\n */\n configAssetReserve(t: uint64): Account\n\n /**\n * 32 byte address\n */\n configAssetFreeze(t: uint64): Account\n\n /**\n * 32 byte address\n */\n configAssetClawback(t: uint64): Account\n\n /**\n * Asset ID being frozen or un-frozen\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 */\n freezeAssetAccount(t: uint64): Account\n\n /**\n * The new frozen value, 0 or 1\n */\n freezeAssetFrozen(t: uint64): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n */\n assets(t: uint64, a: uint64): Asset\n\n /**\n * Number of Assets\n */\n numAssets(t: uint64): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n */\n applications(t: uint64, a: uint64): Application\n\n /**\n * Number of Applications\n */\n numApplications(t: uint64): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n */\n globalNumUint(t: uint64): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n */\n globalNumByteSlice(t: uint64): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n */\n localNumUint(t: uint64): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\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 */\n extraProgramPages(t: uint64): uint64\n\n /**\n * Marks an account nonparticipating for rewards\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 */\n logs(t: uint64, a: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\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 */\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 */\n createdApplicationId(t: uint64): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n */\n lastLog(t: uint64): bytes\n\n /**\n * 64 byte state proof public key\n */\n stateProofPk(t: uint64): bytes\n\n /**\n * Approval Program as an array of pages\n */\n approvalProgramPages(t: uint64, a: uint64): bytes\n\n /**\n * Number of Approval Program pages\n */\n numApprovalProgramPages(t: uint64): uint64\n\n /**\n * ClearState Program as an array of pages\n */\n clearStateProgramPages(t: uint64, a: uint64): bytes\n\n /**\n * Number of ClearState Program pages\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 */\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 */\nexport type GloadUint64Type = (a: uint64, b: uint64) => uint64\n\nexport type GlobalType = {\n /**\n * microalgos\n */\n get minTxnFee(): uint64\n\n /**\n * microalgos\n */\n get minBalance(): uint64\n\n /**\n * rounds\n */\n get maxTxnLife(): uint64\n\n /**\n * 32 byte address of all zero bytes\n */\n get zeroAddress(): Account\n\n /**\n * Number of transactions in this atomic transaction group. At least 1\n */\n get groupSize(): uint64\n\n /**\n * Maximum supported version\n */\n get logicSigVersion(): uint64\n\n /**\n * Current round number. Application mode only.\n */\n get round(): uint64\n\n /**\n * Last confirmed block UNIX timestamp. Fails if negative. Application mode only.\n */\n get latestTimestamp(): uint64\n\n /**\n * ID of current application executing. Application mode only.\n */\n get currentApplicationId(): Application\n\n /**\n * Address of the creator of the current application. Application mode only.\n */\n get creatorAddress(): Account\n\n /**\n * Address that the current application controls. Application mode only.\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 */\n get groupId(): bytes\n\n /**\n * The remaining cost that can be spent by opcodes in this program.\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 */\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 */\n get callerApplicationAddress(): Account\n\n /**\n * The additional minimum balance required to create (and opt-in to) an asset.\n */\n get assetCreateMinBalance(): uint64\n\n /**\n * The additional minimum balance required to opt-in to an asset.\n */\n get assetOptInMinBalance(): uint64\n\n /**\n * The Genesis Hash for the network.\n */\n get genesisHash(): bytes\n}\n\n/**\n * Get values for transactions in the current group\n */\nexport type GTxnType = {\n /**\n * 32 byte address\n */\n sender(t: uint64): Account\n\n /**\n * microalgos\n */\n fee(t: uint64): uint64\n\n /**\n * round number\n */\n firstValid(t: uint64): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n firstValidTime(t: uint64): uint64\n\n /**\n * round number\n */\n lastValid(t: uint64): uint64\n\n /**\n * Any data up to 1024 bytes\n */\n note(t: uint64): bytes\n\n /**\n * 32 byte lease value\n */\n lease(t: uint64): bytes\n\n /**\n * 32 byte address\n */\n receiver(t: uint64): Account\n\n /**\n * microalgos\n */\n amount(t: uint64): uint64\n\n /**\n * 32 byte address\n */\n closeRemainderTo(t: uint64): Account\n\n /**\n * 32 byte address\n */\n votePk(t: uint64): bytes\n\n /**\n * 32 byte address\n */\n selectionPk(t: uint64): bytes\n\n /**\n * The first round that the participation key is valid.\n */\n voteFirst(t: uint64): uint64\n\n /**\n * The last round that the participation key is valid.\n */\n voteLast(t: uint64): uint64\n\n /**\n * Dilution for the 2-level participation key\n */\n voteKeyDilution(t: uint64): uint64\n\n /**\n * Transaction type as bytes\n */\n type(t: uint64): bytes\n\n /**\n * Transaction type as integer\n */\n typeEnum(t: uint64): uint64\n\n /**\n * Asset ID\n */\n xferAsset(t: uint64): Asset\n\n /**\n * value in Asset's units\n */\n assetAmount(t: uint64): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n assetSender(t: uint64): Account\n\n /**\n * 32 byte address\n */\n assetReceiver(t: uint64): Account\n\n /**\n * 32 byte address\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 */\n groupIndex(t: uint64): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n txId(t: uint64): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n */\n applicationId(t: uint64): Application\n\n /**\n * ApplicationCall transaction on completion action\n */\n onCompletion(t: uint64): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n */\n applicationArgs(a: uint64, b: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n */\n numAppArgs(t: uint64): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n */\n accounts(a: uint64, b: uint64): Account\n\n /**\n * Number of Accounts\n */\n numAccounts(t: uint64): uint64\n\n /**\n * Approval program\n */\n approvalProgram(t: uint64): bytes\n\n /**\n * Clear state program\n */\n clearStateProgram(t: uint64): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n rekeyTo(t: uint64): Account\n\n /**\n * Asset ID in asset config transaction\n */\n configAsset(t: uint64): Asset\n\n /**\n * Total number of units of this asset created\n */\n configAssetTotal(t: uint64): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n configAssetDecimals(t: uint64): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n configAssetDefaultFrozen(t: uint64): boolean\n\n /**\n * Unit name of the asset\n */\n configAssetUnitName(t: uint64): bytes\n\n /**\n * The asset name\n */\n configAssetName(t: uint64): bytes\n\n /**\n * URL\n */\n configAssetUrl(t: uint64): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n configAssetMetadataHash(t: uint64): bytes\n\n /**\n * 32 byte address\n */\n configAssetManager(t: uint64): Account\n\n /**\n * 32 byte address\n */\n configAssetReserve(t: uint64): Account\n\n /**\n * 32 byte address\n */\n configAssetFreeze(t: uint64): Account\n\n /**\n * 32 byte address\n */\n configAssetClawback(t: uint64): Account\n\n /**\n * Asset ID being frozen or un-frozen\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 */\n freezeAssetAccount(t: uint64): Account\n\n /**\n * The new frozen value, 0 or 1\n */\n freezeAssetFrozen(t: uint64): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n */\n assets(a: uint64, b: uint64): Asset\n\n /**\n * Number of Assets\n */\n numAssets(t: uint64): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n */\n applications(a: uint64, b: uint64): Application\n\n /**\n * Number of Applications\n */\n numApplications(t: uint64): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n */\n globalNumUint(t: uint64): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n */\n globalNumByteSlice(t: uint64): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n */\n localNumUint(t: uint64): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\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 */\n extraProgramPages(t: uint64): uint64\n\n /**\n * Marks an account nonparticipating for rewards\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 */\n logs(a: uint64, b: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\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 */\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 */\n createdApplicationId(t: uint64): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n */\n lastLog(t: uint64): bytes\n\n /**\n * 64 byte state proof public key\n */\n stateProofPk(t: uint64): bytes\n\n /**\n * Approval Program as an array of pages\n */\n approvalProgramPages(a: uint64, b: uint64): bytes\n\n /**\n * Number of Approval Program pages\n */\n numApprovalProgramPages(t: uint64): uint64\n\n /**\n * ClearState Program as an array of pages\n */\n clearStateProgramPages(a: uint64, b: uint64): bytes\n\n /**\n * Number of ClearState Program pages\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 */\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 */\n get sender(): Account\n\n /**\n * microalgos\n */\n get fee(): uint64\n\n /**\n * round number\n */\n get firstValid(): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n get firstValidTime(): uint64\n\n /**\n * round number\n */\n get lastValid(): uint64\n\n /**\n * Any data up to 1024 bytes\n */\n get note(): bytes\n\n /**\n * 32 byte lease value\n */\n get lease(): bytes\n\n /**\n * 32 byte address\n */\n get receiver(): Account\n\n /**\n * microalgos\n */\n get amount(): uint64\n\n /**\n * 32 byte address\n */\n get closeRemainderTo(): Account\n\n /**\n * 32 byte address\n */\n get votePk(): bytes\n\n /**\n * 32 byte address\n */\n get selectionPk(): bytes\n\n /**\n * The first round that the participation key is valid.\n */\n get voteFirst(): uint64\n\n /**\n * The last round that the participation key is valid.\n */\n get voteLast(): uint64\n\n /**\n * Dilution for the 2-level participation key\n */\n get voteKeyDilution(): uint64\n\n /**\n * Transaction type as bytes\n */\n get type(): bytes\n\n /**\n * Transaction type as integer\n */\n get typeEnum(): uint64\n\n /**\n * Asset ID\n */\n get xferAsset(): Asset\n\n /**\n * value in Asset's units\n */\n get assetAmount(): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n get assetSender(): Account\n\n /**\n * 32 byte address\n */\n get assetReceiver(): Account\n\n /**\n * 32 byte address\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 */\n get groupIndex(): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n get txId(): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n */\n get applicationId(): Application\n\n /**\n * ApplicationCall transaction on completion action\n */\n get onCompletion(): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n */\n applicationArgs(a: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n */\n get numAppArgs(): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n */\n accounts(a: uint64): Account\n\n /**\n * Number of Accounts\n */\n get numAccounts(): uint64\n\n /**\n * Approval program\n */\n get approvalProgram(): bytes\n\n /**\n * Clear state program\n */\n get clearStateProgram(): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n get rekeyTo(): Account\n\n /**\n * Asset ID in asset config transaction\n */\n get configAsset(): Asset\n\n /**\n * Total number of units of this asset created\n */\n get configAssetTotal(): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n get configAssetDecimals(): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n get configAssetDefaultFrozen(): boolean\n\n /**\n * Unit name of the asset\n */\n get configAssetUnitName(): bytes\n\n /**\n * The asset name\n */\n get configAssetName(): bytes\n\n /**\n * URL\n */\n get configAssetUrl(): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n get configAssetMetadataHash(): bytes\n\n /**\n * 32 byte address\n */\n get configAssetManager(): Account\n\n /**\n * 32 byte address\n */\n get configAssetReserve(): Account\n\n /**\n * 32 byte address\n */\n get configAssetFreeze(): Account\n\n /**\n * 32 byte address\n */\n get configAssetClawback(): Account\n\n /**\n * Asset ID being frozen or un-frozen\n */\n get freezeAsset(): Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n */\n get freezeAssetAccount(): Account\n\n /**\n * The new frozen value, 0 or 1\n */\n get freezeAssetFrozen(): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n */\n assets(a: uint64): Asset\n\n /**\n * Number of Assets\n */\n get numAssets(): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n */\n applications(a: uint64): Application\n\n /**\n * Number of Applications\n */\n get numApplications(): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n */\n get globalNumUint(): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n */\n get globalNumByteSlice(): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n */\n get localNumUint(): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\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 */\n get extraProgramPages(): uint64\n\n /**\n * Marks an account nonparticipating for rewards\n */\n get nonparticipation(): boolean\n\n /**\n * Log messages emitted by an application call (only with `itxn` in v5). Application mode only\n */\n logs(a: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\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 */\n get createdAssetId(): Asset\n\n /**\n * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only\n */\n get createdApplicationId(): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n */\n get lastLog(): bytes\n\n /**\n * 64 byte state proof public key\n */\n get stateProofPk(): bytes\n\n /**\n * Approval Program as an array of pages\n */\n approvalProgramPages(a: uint64): bytes\n\n /**\n * Number of Approval Program pages\n */\n get numApprovalProgramPages(): uint64\n\n /**\n * ClearState Program as an array of pages\n */\n clearStateProgramPages(a: uint64): bytes\n\n /**\n * Number of ClearState Program pages\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 */\n begin(): void\n\n /**\n * 32 byte address\n */\n setSender(a: Account): void\n\n /**\n * microalgos\n */\n setFee(a: uint64): void\n\n /**\n * Any data up to 1024 bytes\n */\n setNote(a: bytes): void\n\n /**\n * 32 byte address\n */\n setReceiver(a: Account): void\n\n /**\n * microalgos\n */\n setAmount(a: uint64): void\n\n /**\n * 32 byte address\n */\n setCloseRemainderTo(a: Account): void\n\n /**\n * 32 byte address\n */\n setVotePk(a: bytes): void\n\n /**\n * 32 byte address\n */\n setSelectionPk(a: bytes): void\n\n /**\n * The first round that the participation key is valid.\n */\n setVoteFirst(a: uint64): void\n\n /**\n * The last round that the participation key is valid.\n */\n setVoteLast(a: uint64): void\n\n /**\n * Dilution for the 2-level participation key\n */\n setVoteKeyDilution(a: uint64): void\n\n /**\n * Transaction type as bytes\n */\n setType(a: bytes): void\n\n /**\n * Transaction type as integer\n */\n setTypeEnum(a: uint64): void\n\n /**\n * Asset ID\n */\n setXferAsset(a: Asset | uint64): void\n\n /**\n * value in Asset's units\n */\n setAssetAmount(a: uint64): void\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n setAssetSender(a: Account): void\n\n /**\n * 32 byte address\n */\n setAssetReceiver(a: Account): void\n\n /**\n * 32 byte address\n */\n setAssetCloseTo(a: Account): void\n\n /**\n * ApplicationID from ApplicationCall transaction\n */\n setApplicationId(a: Application | uint64): void\n\n /**\n * ApplicationCall transaction on completion action\n */\n setOnCompletion(a: uint64): void\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n */\n setApplicationArgs(a: bytes): void\n\n /**\n * Accounts listed in the ApplicationCall transaction\n */\n setAccounts(a: Account): void\n\n /**\n * Approval program\n */\n setApprovalProgram(a: bytes): void\n\n /**\n * Clear state program\n */\n setClearStateProgram(a: bytes): void\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n setRekeyTo(a: Account): void\n\n /**\n * Asset ID in asset config transaction\n */\n setConfigAsset(a: Asset | uint64): void\n\n /**\n * Total number of units of this asset created\n */\n setConfigAssetTotal(a: uint64): void\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n setConfigAssetDecimals(a: uint64): void\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n setConfigAssetDefaultFrozen(a: boolean): void\n\n /**\n * Unit name of the asset\n */\n setConfigAssetUnitName(a: bytes): void\n\n /**\n * The asset name\n */\n setConfigAssetName(a: bytes): void\n\n /**\n * URL\n */\n setConfigAssetUrl(a: bytes): void\n\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n setConfigAssetMetadataHash(a: bytes): void\n\n /**\n * 32 byte address\n */\n setConfigAssetManager(a: Account): void\n\n /**\n * 32 byte address\n */\n setConfigAssetReserve(a: Account): void\n\n /**\n * 32 byte address\n */\n setConfigAssetFreeze(a: Account): void\n\n /**\n * 32 byte address\n */\n setConfigAssetClawback(a: Account): void\n\n /**\n * Asset ID being frozen or un-frozen\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 */\n setFreezeAssetAccount(a: Account): void\n\n /**\n * The new frozen value, 0 or 1\n */\n setFreezeAssetFrozen(a: boolean): void\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n */\n setAssets(a: uint64): void\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n */\n setApplications(a: uint64): void\n\n /**\n * Number of global state integers in ApplicationCall\n */\n setGlobalNumUint(a: uint64): void\n\n /**\n * Number of global state byteslices in ApplicationCall\n */\n setGlobalNumByteSlice(a: uint64): void\n\n /**\n * Number of local state integers in ApplicationCall\n */\n setLocalNumUint(a: uint64): void\n\n /**\n * Number of local state byteslices in ApplicationCall\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 */\n setExtraProgramPages(a: uint64): void\n\n /**\n * Marks an account nonparticipating for rewards\n */\n setNonparticipation(a: boolean): void\n\n /**\n * 64 byte state proof public key\n */\n setStateProofPk(a: bytes): void\n\n /**\n * Approval Program as an array of pages\n */\n setApprovalProgramPages(a: bytes): void\n\n /**\n * ClearState Program as an array of pages\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 */\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 */\n submit(): void\n}\n\nexport type JsonRefType = {\n jsonString(a: bytes, b: bytes): bytes\n\n jsonUint64(a: bytes, b: bytes): uint64\n\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 */\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 */\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 */\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 */\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 */\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 */\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 */\nexport type MulwType = (a: uint64, b: uint64) => readonly [uint64, 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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\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 */\nexport type SubstringType = (a: bytes, b: uint64, c: uint64) => bytes\n\n/**\n * Get values for the current executing transaction\n */\nexport type TxnType = {\n /**\n * 32 byte address\n */\n get sender(): Account\n\n /**\n * microalgos\n */\n get fee(): uint64\n\n /**\n * round number\n */\n get firstValid(): uint64\n\n /**\n * UNIX timestamp of block before txn.FirstValid. Fails if negative\n */\n get firstValidTime(): uint64\n\n /**\n * round number\n */\n get lastValid(): uint64\n\n /**\n * Any data up to 1024 bytes\n */\n get note(): bytes\n\n /**\n * 32 byte lease value\n */\n get lease(): bytes\n\n /**\n * 32 byte address\n */\n get receiver(): Account\n\n /**\n * microalgos\n */\n get amount(): uint64\n\n /**\n * 32 byte address\n */\n get closeRemainderTo(): Account\n\n /**\n * 32 byte address\n */\n get votePk(): bytes\n\n /**\n * 32 byte address\n */\n get selectionPk(): bytes\n\n /**\n * The first round that the participation key is valid.\n */\n get voteFirst(): uint64\n\n /**\n * The last round that the participation key is valid.\n */\n get voteLast(): uint64\n\n /**\n * Dilution for the 2-level participation key\n */\n get voteKeyDilution(): uint64\n\n /**\n * Transaction type as bytes\n */\n get type(): bytes\n\n /**\n * Transaction type as integer\n */\n get typeEnum(): uint64\n\n /**\n * Asset ID\n */\n get xferAsset(): Asset\n\n /**\n * value in Asset's units\n */\n get assetAmount(): uint64\n\n /**\n * 32 byte address. Source of assets if Sender is the Asset's Clawback address.\n */\n get assetSender(): Account\n\n /**\n * 32 byte address\n */\n get assetReceiver(): Account\n\n /**\n * 32 byte address\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 */\n get groupIndex(): uint64\n\n /**\n * The computed ID for this transaction. 32 bytes.\n */\n get txId(): bytes\n\n /**\n * ApplicationID from ApplicationCall transaction\n */\n get applicationId(): Application\n\n /**\n * ApplicationCall transaction on completion action\n */\n get onCompletion(): uint64\n\n /**\n * Arguments passed to the application in the ApplicationCall transaction\n */\n applicationArgs(a: uint64): bytes\n\n /**\n * Number of ApplicationArgs\n */\n get numAppArgs(): uint64\n\n /**\n * Accounts listed in the ApplicationCall transaction\n */\n accounts(a: uint64): Account\n\n /**\n * Number of Accounts\n */\n get numAccounts(): uint64\n\n /**\n * Approval program\n */\n get approvalProgram(): bytes\n\n /**\n * Clear state program\n */\n get clearStateProgram(): bytes\n\n /**\n * 32 byte Sender's new AuthAddr\n */\n get rekeyTo(): Account\n\n /**\n * Asset ID in asset config transaction\n */\n get configAsset(): Asset\n\n /**\n * Total number of units of this asset created\n */\n get configAssetTotal(): uint64\n\n /**\n * Number of digits to display after the decimal place when displaying the asset\n */\n get configAssetDecimals(): uint64\n\n /**\n * Whether the asset's slots are frozen by default or not, 0 or 1\n */\n get configAssetDefaultFrozen(): boolean\n\n /**\n * Unit name of the asset\n */\n get configAssetUnitName(): bytes\n\n /**\n * The asset name\n */\n get configAssetName(): bytes\n\n /**\n * URL\n */\n get configAssetUrl(): bytes\n\n /**\n * 32 byte commitment to unspecified asset metadata\n */\n get configAssetMetadataHash(): bytes\n\n /**\n * 32 byte address\n */\n get configAssetManager(): Account\n\n /**\n * 32 byte address\n */\n get configAssetReserve(): Account\n\n /**\n * 32 byte address\n */\n get configAssetFreeze(): Account\n\n /**\n * 32 byte address\n */\n get configAssetClawback(): Account\n\n /**\n * Asset ID being frozen or un-frozen\n */\n get freezeAsset(): Asset\n\n /**\n * 32 byte address of the account whose asset slot is being frozen or un-frozen\n */\n get freezeAssetAccount(): Account\n\n /**\n * The new frozen value, 0 or 1\n */\n get freezeAssetFrozen(): boolean\n\n /**\n * Foreign Assets listed in the ApplicationCall transaction\n */\n assets(a: uint64): Asset\n\n /**\n * Number of Assets\n */\n get numAssets(): uint64\n\n /**\n * Foreign Apps listed in the ApplicationCall transaction\n */\n applications(a: uint64): Application\n\n /**\n * Number of Applications\n */\n get numApplications(): uint64\n\n /**\n * Number of global state integers in ApplicationCall\n */\n get globalNumUint(): uint64\n\n /**\n * Number of global state byteslices in ApplicationCall\n */\n get globalNumByteSlice(): uint64\n\n /**\n * Number of local state integers in ApplicationCall\n */\n get localNumUint(): uint64\n\n /**\n * Number of local state byteslices in ApplicationCall\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 */\n get extraProgramPages(): uint64\n\n /**\n * Marks an account nonparticipating for rewards\n */\n get nonparticipation(): boolean\n\n /**\n * Log messages emitted by an application call (only with `itxn` in v5). Application mode only\n */\n logs(a: uint64): bytes\n\n /**\n * Number of Logs (only with `itxn` in v5). Application mode only\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 */\n get createdAssetId(): Asset\n\n /**\n * ApplicationID allocated by the creation of an application (only with `itxn` in v5). Application mode only\n */\n get createdApplicationId(): Application\n\n /**\n * The last message emitted. Empty bytes if none were emitted. Application mode only\n */\n get lastLog(): bytes\n\n /**\n * 64 byte state proof public key\n */\n get stateProofPk(): bytes\n\n /**\n * Approval Program as an array of pages\n */\n approvalProgramPages(a: uint64): bytes\n\n /**\n * Number of Approval Program pages\n */\n get numApprovalProgramPages(): uint64\n\n /**\n * ClearState Program as an array of pages\n */\n clearStateProgramPages(a: uint64): bytes\n\n /**\n * Number of ClearState Program pages\n */\n get numClearStateProgramPages(): uint64\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 */\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)\n/* THIS FILE IS GENERATED BY ~/scripts/generate-op-types.ts - DO NOT MODIFY DIRECTLY */\nimport { bytes, BytesCompat, uint64, Uint64Compat, biguint } from './primitives'\nimport { Account, Application, Asset } from './reference'\n\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 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 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 Txn: TxnType\n vrfVerify: VrfVerifyType\n select: SelectType\n setBit: SetBitType\n}\n","import { ctxMgr } from './execution-context'\n\nimport {\n AddwType,\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 GaidType,\n GetBitType,\n GetByteType,\n GITxnType,\n GlobalType,\n GTxnType,\n ItobType,\n ITxnCreateType,\n ITxnType,\n JsonRefType,\n Keccak256Type,\n MulwType,\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 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 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 itob: ItobType = createFunctionProxy('itob')\nexport const keccak256: Keccak256Type = createFunctionProxy('keccak256')\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')\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 AppParams = createObjectProxy('AppParams')\nexport const AssetHolding = createObjectProxy('AssetHolding')\nexport const AssetParams = createObjectProxy('AssetParams')\n\nexport { VrfVerify } from './op-types'\n","import { bytes } from '../primitives'\nimport { Account } from '../reference'\nimport { AssertError } from './errors'\nimport { BytesCls } from './primitives'\n\nexport class GlobalStateCls<ValueType> {\n private readonly _type: string = GlobalStateCls.name\n\n #value: ValueType | undefined\n key: bytes | undefined\n\n delete: () => void = () => {\n this.#value = undefined\n }\n\n static [Symbol.hasInstance](x: unknown): x is GlobalStateCls<unknown> {\n return x instanceof Object && '_type' in x && (x as { _type: string })['_type'] === GlobalStateCls.name\n }\n\n get value(): ValueType {\n if (this.#value === undefined) {\n throw new AssertError('value is not set')\n }\n return this.#value\n }\n\n set value(v: ValueType) {\n this.#value = v\n }\n\n get hasValue(): boolean {\n return this.#value !== undefined\n }\n\n constructor(key?: bytes | string, value?: ValueType) {\n this.key = BytesCls.fromCompat(key).asAlgoTs()\n this.#value = value\n }\n}\n\nexport class LocalStateCls<ValueType> {\n #value: ValueType | undefined\n delete: () => void = () => {\n this.#value = undefined\n }\n get value(): ValueType {\n if (this.#value === undefined) {\n throw new AssertError('value is not set')\n }\n return this.#value\n }\n\n set value(v: ValueType) {\n this.#value = v\n }\n\n get hasValue(): boolean {\n return this.#value !== undefined\n }\n}\n\nexport class LocalStateMapCls<ValueType> {\n #value = new Map<bytes, LocalStateCls<ValueType>>()\n\n getValue(account: Account): LocalStateCls<ValueType> {\n if (!this.#value.has(account.bytes)) {\n this.#value.set(account.bytes, new LocalStateCls<ValueType>())\n }\n return this.#value.get(account.bytes)!\n }\n}\n","import { 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\n readonly exists: boolean\n value: bytes\n get(options: { default: bytes }): bytes\n put(value: bytes): bytes\n splice(start: uint64, end: 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 throw new Error('Not implemented')\n}\n\nexport function BoxMap<TKey, TValue>(options: { keyPrefix: bytes | string }): BoxMap<TKey, TValue> {\n throw new Error('Not implemented')\n}\n\nexport function BoxRef(options: { key: bytes | string }): BoxRef {\n throw new Error('Not implemented')\n}\n","import { GlobalStateCls, LocalStateMapCls } from './impl/state'\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\ntype 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 new GlobalStateCls(options?.key, options?.initialValue)\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 function localStateInternal(account: Account): LocalStateForAccount<ValueType> {\n return localStateInternal.map.getValue(account)\n }\n localStateInternal.key = options?.key\n localStateInternal.map = new LocalStateMapCls<ValueType>()\n return localStateInternal\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"],"names":[],"mappings":";;;;;AAqGM,SAAU,OAAO,CAAC,OAAe,EAAA;IACrC,OAAO,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;AACzC,CAAC;AAIK,SAAU,KAAK,CAAC,OAAgB,EAAA;IACpC,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;AACvC,CAAC;AA2FK,SAAU,WAAW,CAAC,aAAsB,EAAA;IAChD,OAAO,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,aAAa,CAAC,CAAA;AACnD;;AC1MA,IAAY,MAGX,CAAA;AAHD,CAAA,UAAY,MAAM,EAAA;AAChB,IAAA,MAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,MAAA,CAAA,aAAA,CAAA,GAAA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OnCompleteAction, w as StaticArray, S as Str, T as Tuple, s as UFixedNxM, r as UintN, h as abimethod, q as baremethod } from './index-
|
1
|
+
export { x as Address, v as Bool, t as Byte, C as Contract, D as DynamicArray, o as OnCompleteAction, w as StaticArray, S as Str, T as Tuple, s as UFixedNxM, r as UintN, h as abimethod, q as baremethod } from './index-BMWt0XtP.js';
|
2
|
+
import 'node:buffer';
|
2
3
|
import 'node:util';
|
3
4
|
//# sourceMappingURL=index2.mjs.map
|
package/index2.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/package.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"**"
|
5
5
|
],
|
6
6
|
"name": "@algorandfoundation/algorand-typescript",
|
7
|
-
"version": "0.0.1-alpha.
|
7
|
+
"version": "0.0.1-alpha.5",
|
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": {
|
package/primitives.d.ts
CHANGED
@@ -40,6 +40,7 @@ export type bytes = {
|
|
40
40
|
bitwiseXor(other: BytesCompat): bytes;
|
41
41
|
bitwiseInvert(): bytes;
|
42
42
|
equals(other: BytesCompat): boolean;
|
43
|
+
slice(start?: Uint64Compat, end?: Uint64Compat): bytes;
|
43
44
|
toString(): string;
|
44
45
|
};
|
45
46
|
export declare function Bytes(value: TemplateStringsArray, ...replacements: BytesCompat[]): bytes;
|
package/index-CAZZKmeS.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index-CAZZKmeS.js","sources":["../src/impl/base-32.ts","../src/impl/errors.ts","../src/impl/encoding-util.ts","../src/impl/name-of-type.ts","../src/impl/primitives.ts","../src/primitives.ts","../src/execution-context.ts","../src/util.ts","../src/base-contract.ts","../src/arc4/encoded-types.ts","../src/arc4/index.ts"],"sourcesContent":["const BASE32_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'.split('')\n\nconst CHAR_TO_NUM = BASE32_ALPHABET.reduce((acc, cur, index) => ((acc[cur] = index), acc), {} as Record<string, number>)\n\nexport const base32ToUint8Array = (value: string): Uint8Array => {\n let allChars = value\n .split('')\n .filter((c) => c !== '=')\n .map((c) => {\n const cUpper = c.toUpperCase()\n if (cUpper in CHAR_TO_NUM) return CHAR_TO_NUM[cUpper]\n throw new Error(`Invalid base32 char ${c}`)\n })\n const bytes = new Array<number>()\n while (allChars.length) {\n const [a, b, c, d, e, f, g, h, ...rest] = allChars\n if (a === undefined || b === undefined) break\n bytes.push(((a << 3) | (b >>> 2)) & 255)\n if (c === undefined || d === undefined) break\n bytes.push(((b << 6) | (c << 1) | (d >>> 4)) & 255)\n if (e === undefined) break\n bytes.push(((d << 4) | (e >>> 1)) & 255)\n if (f === undefined || g === undefined) break\n bytes.push(((e << 7) | (f << 2) | (g >>> 3)) & 255)\n if (h === undefined) break\n bytes.push(((g << 5) | h) & 255)\n allChars = rest\n }\n return new Uint8Array(bytes)\n}\n\nexport const uint8ArrayToBase32 = (value: Uint8Array): string => {\n let allBytes = Array.from(value)\n let base32str = ''\n while (allBytes.length) {\n const [a, b, c, d, e, ...rest] = allBytes ?? [0, 0, 0, 0, 0]\n\n if (allBytes.length < 1) break\n base32str += BASE32_ALPHABET[a >>> 3]\n base32str += BASE32_ALPHABET[((a << 2) | ((b || 0) >>> 6)) & 32]\n if (allBytes.length < 2) break\n base32str += BASE32_ALPHABET[(b >>> 1) & 31]\n base32str += BASE32_ALPHABET[((b << 4) | (c >>> 4)) & 31]\n if (allBytes.length < 3) break\n base32str += BASE32_ALPHABET[((c << 1) | (d >>> 7)) & 31]\n if (allBytes.length < 4) break\n base32str += BASE32_ALPHABET[(d >>> 2) & 31]\n base32str += BASE32_ALPHABET[((d << 3) | (e >>> 5)) & 31]\n if (allBytes.length < 5) break\n base32str += BASE32_ALPHABET[e & 31]\n allBytes = rest\n }\n return base32str\n}\n","/**\n * Raised when an `err` op is encountered, or when the testing VM is asked to do something that would cause\n * the AVM to fail.\n */\nexport class AvmError extends Error {\n constructor(message: string) {\n super(message)\n }\n}\nexport function avmError(message: string): never {\n throw new AvmError(message)\n}\n/**\n * Raised when an assertion fails\n */\nexport class AssertError extends AvmError {\n constructor(message: string) {\n super(message)\n }\n}\n\n/**\n * Raised when testing code errors\n */\nexport class InternalError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(message, options)\n }\n}\n\nexport function internalError(message: string): never {\n throw new InternalError(message)\n}\n\n/**\n * Raised when unsupported user code is encountered\n */\nexport class CodeError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(message, options)\n }\n}\n\nexport function codeError(message: string): never {\n throw new CodeError(message)\n}\n","import { TextDecoder } from 'node:util'\nimport { AvmError } from './errors'\n\nexport const uint8ArrayToBigInt = (v: Uint8Array): bigint => {\n // Assume big-endian\n return Array.from(v)\n .toReversed()\n .map((byte_value, i): bigint => BigInt(byte_value) << BigInt(i * 8))\n .reduce((a, b) => a + b, 0n)\n}\n\nexport const bigIntToUint8Array = (val: bigint, fixedSize: number | 'dynamic' = 'dynamic'): Uint8Array => {\n if (val === 0n && fixedSize === 'dynamic') {\n return new Uint8Array(0)\n }\n const maxBytes = fixedSize === 'dynamic' ? undefined : fixedSize\n\n let hex = val.toString(16)\n\n // Pad the hex with zeros so it matches the size in bytes\n if (fixedSize !== 'dynamic' && hex.length !== fixedSize * 2) {\n hex = hex.padStart(fixedSize * 2, '0')\n } else if (hex.length % 2 == 1) {\n // Pad to 'whole' byte\n hex = `0${hex}`\n }\n if (maxBytes && hex.length > maxBytes * 2) {\n throw new AvmError(`Cannot encode ${val} as ${maxBytes} bytes as it would overflow`)\n }\n const byteArray = new Uint8Array(hex.length / 2)\n for (let i = 0, j = 0; i < hex.length / 2; i++, j += 2) {\n byteArray[i] = parseInt(hex.slice(j, j + 2), 16)\n }\n return byteArray\n}\n\nexport const utf8ToUint8Array = (value: string): Uint8Array => {\n const encoder = new TextEncoder()\n return encoder.encode(value)\n}\n\nexport const uint8ArrayToUtf8 = (value: Uint8Array): string => {\n const decoder = new TextDecoder()\n return decoder.decode(value)\n}\n\nexport const uint8ArrayToHex = (value: Uint8Array): string => Buffer.from(value).toString('hex')\n\nexport const uint8ArrayToBase64 = (value: Uint8Array): string => Buffer.from(value).toString('base64')\n\nexport const uint8ArrayToBase64Url = (value: Uint8Array): string => Buffer.from(value).toString('base64url')\n\nexport { uint8ArrayToBase32 } from './base-32'\n","export const nameOfType = (x: unknown) => {\n if (typeof x === 'object') {\n if (x === null) return 'Null'\n if (x === undefined) return 'undefined'\n if ('constructor' in x) {\n return x.constructor.name\n }\n }\n return typeof x\n}\n","import type { biguint, BigUintCompat, bytes, BytesCompat, uint64, Uint64Compat } from '../index'\nimport { DeliberateAny } from '../typescript-helpers'\nimport { base32ToUint8Array } from './base-32'\nimport { bigIntToUint8Array, uint8ArrayToBigInt, uint8ArrayToHex, uint8ArrayToUtf8, utf8ToUint8Array } from './encoding-util'\nimport { avmError, AvmError, internalError } from './errors'\nimport { nameOfType } from './name-of-type'\n\nconst MAX_UINT8 = 2 ** 8 - 1\nconst MAX_BYTES_SIZE = 4096\n\nexport type StubBigUintCompat = BigUintCompat | BigUintCls | Uint64Cls\nexport type StubBytesCompat = BytesCompat | BytesCls\nexport type StubUint64Compat = Uint64Compat | Uint64Cls\n\nexport function toExternalValue(val: uint64): bigint\nexport function toExternalValue(val: biguint): bigint\nexport function toExternalValue(val: bytes): Uint8Array\nexport function toExternalValue(val: string): string\nexport function toExternalValue(val: uint64 | biguint | bytes | string) {\n const instance = val as unknown\n if (instance instanceof BytesCls) return instance.asUint8Array()\n if (instance instanceof Uint64Cls) return instance.asBigInt()\n if (instance instanceof BigUintCls) return instance.asBigInt()\n if (typeof val === 'string') return val\n}\nexport const toBytes = (val: unknown): bytes => {\n if (val instanceof AlgoTsPrimitiveCls) return val.toBytes().asAlgoTs()\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 const isBytes = (v: unknown): v is StubBytesCompat => {\n if (typeof v === 'string') return true\n if (v instanceof BytesCls) return true\n return v instanceof Uint8Array\n}\n\nexport const isUint64 = (v: unknown): v is StubUint64Compat => {\n if (typeof v == 'boolean') return true\n if (typeof v == 'number') return true\n if (typeof v == 'bigint') return true\n return v instanceof Uint64Cls\n}\n\nexport const isBigUint = (v: unknown): v is biguint => {\n return v instanceof BigUintCls\n}\n\nexport const checkUint64 = (v: bigint): bigint => {\n const u64 = BigInt.asUintN(64, v)\n if (u64 !== v) throw new AvmError(`Uint64 over or underflow`)\n return u64\n}\nexport const checkBigUint = (v: bigint): bigint => {\n const uBig = BigInt.asUintN(64 * 8, v)\n if (uBig !== v) throw new AvmError(`BigUint over or underflow`)\n return uBig\n}\n\nexport const checkBytes = (v: Uint8Array): Uint8Array => {\n if (v.length > MAX_BYTES_SIZE) throw new AvmError(`Bytes length ${v.length} exceeds maximum length ${MAX_BYTES_SIZE}`)\n return v\n}\n\n/**\n * Verifies that an object is an instance of a type based on its name rather than reference equality.\n *\n * This is useful in scenarios where a module loader has loaded a module twice and hence two instances of a\n * type do not have reference equality on their constructors.\n * @param subject The object to check\n * @param typeCtor The ctor of the type\n */\nfunction isInstanceOfTypeByName(subject: unknown, typeCtor: { name: string }): boolean {\n if (subject === null || typeof subject !== 'object') return false\n\n let ctor = subject.constructor\n while (typeof ctor === 'function') {\n if (ctor.name === typeCtor.name) return true\n ctor = Object.getPrototypeOf(ctor)\n }\n return false\n}\n\nexport abstract class AlgoTsPrimitiveCls {\n static [Symbol.hasInstance](x: unknown): x is AlgoTsPrimitiveCls {\n return isInstanceOfTypeByName(x, AlgoTsPrimitiveCls)\n }\n\n abstract valueOf(): bigint | string\n abstract toBytes(): BytesCls\n}\n\nexport class Uint64Cls extends AlgoTsPrimitiveCls {\n readonly #value: bigint\n constructor(value: bigint | number | string) {\n super()\n this.#value = BigInt(value)\n checkUint64(this.#value)\n\n Object.defineProperty(this, 'uint64', {\n value: this.#value.toString(),\n writable: false,\n enumerable: true,\n })\n }\n static [Symbol.hasInstance](x: unknown): x is Uint64Cls {\n return isInstanceOfTypeByName(x, Uint64Cls)\n }\n static fromCompat(v: StubUint64Compat): Uint64Cls {\n if (typeof v == 'boolean') return new Uint64Cls(v ? 1n : 0n)\n if (typeof v == 'number') return new Uint64Cls(BigInt(v))\n if (typeof v == 'bigint') return new Uint64Cls(v)\n if (v instanceof Uint64Cls) return v\n internalError(`Cannot convert ${v} to uint64`)\n }\n\n static getNumber(v: StubUint64Compat): number {\n return Uint64Cls.fromCompat(v).asNumber()\n }\n\n valueOf(): bigint {\n return this.#value\n }\n\n toBytes(isDynamic: boolean = false): BytesCls {\n return new BytesCls(bigIntToUint8Array(this.#value, isDynamic ? 'dynamic' : 8))\n }\n\n asAlgoTs(): uint64 {\n return this as unknown as uint64\n }\n\n asBigInt(): bigint {\n return this.#value\n }\n asNumber(): number {\n if (this.#value > Number.MAX_SAFE_INTEGER) {\n throw new AvmError('value cannot be safely converted to a number')\n }\n return Number(this.#value)\n }\n}\n\nexport class BigUintCls extends AlgoTsPrimitiveCls {\n readonly #value: bigint\n constructor(value: bigint) {\n super()\n this.#value = value\n Object.defineProperty(this, 'biguint', {\n value: value.toString(),\n writable: false,\n enumerable: true,\n })\n }\n valueOf(): bigint {\n return this.#value\n }\n\n toBytes(): BytesCls {\n return new BytesCls(bigIntToUint8Array(this.#value))\n }\n\n asAlgoTs(): biguint {\n return this as unknown as biguint\n }\n\n asBigInt(): bigint {\n return this.#value\n }\n asNumber(): number {\n if (this.#value > Number.MAX_SAFE_INTEGER) {\n throw new AvmError('value cannot be safely converted to a number')\n }\n return Number(this.#value)\n }\n static [Symbol.hasInstance](x: unknown): x is BigUintCls {\n return isInstanceOfTypeByName(x, BigUintCls)\n }\n static fromCompat(v: StubBigUintCompat): BigUintCls {\n if (typeof v == 'boolean') return new BigUintCls(v ? 1n : 0n)\n if (typeof v == 'number') return new BigUintCls(BigInt(v))\n if (typeof v == 'bigint') return new BigUintCls(v)\n if (v instanceof Uint64Cls) return new BigUintCls(v.valueOf())\n if (v instanceof BytesCls) return v.toBigUint()\n if (v instanceof BigUintCls) return v\n internalError(`Cannot convert ${nameOfType(v)} to BigUint`)\n }\n}\n\nexport class BytesCls extends AlgoTsPrimitiveCls {\n readonly #v: Uint8Array\n constructor(v: Uint8Array) {\n super()\n this.#v = v\n checkBytes(this.#v)\n // Add an enumerable property for debugging code to show\n Object.defineProperty(this, 'bytes', {\n value: uint8ArrayToHex(this.#v),\n writable: false,\n enumerable: true,\n })\n }\n\n get length() {\n return new Uint64Cls(this.#v.length)\n }\n\n toBytes(): BytesCls {\n return this\n }\n\n at(i: StubUint64Compat): BytesCls {\n const start = Uint64Cls.fromCompat(i).asNumber()\n return new BytesCls(this.#v.slice(start, start + 1))\n }\n\n slice(start: StubUint64Compat, end: StubUint64Compat): BytesCls {\n const startNumber = start instanceof Uint64Cls ? start.asNumber() : start\n const endNumber = end instanceof Uint64Cls ? end.asNumber() : end\n const sliced = arrayUtil.arraySlice(this.#v, startNumber, endNumber)\n return new BytesCls(sliced)\n }\n\n concat(other: StubBytesCompat): BytesCls {\n const otherArray = BytesCls.fromCompat(other).asUint8Array()\n const mergedArray = new Uint8Array(this.#v.length + otherArray.length)\n mergedArray.set(this.#v)\n mergedArray.set(otherArray, this.#v.length)\n return new BytesCls(mergedArray)\n }\n\n bitwiseAnd(other: StubBytesCompat): BytesCls {\n return this.bitwiseOp(other, (a, b) => a & b)\n }\n\n bitwiseOr(other: StubBytesCompat): BytesCls {\n return this.bitwiseOp(other, (a, b) => a | b)\n }\n\n bitwiseXor(other: StubBytesCompat): BytesCls {\n return this.bitwiseOp(other, (a, b) => a ^ b)\n }\n\n bitwiseInvert(): BytesCls {\n const result = new Uint8Array(this.#v.length)\n this.#v.forEach((v, i) => {\n result[i] = ~v & MAX_UINT8\n })\n return new BytesCls(result)\n }\n\n equals(other: StubBytesCompat): boolean {\n const otherArray = BytesCls.fromCompat(other).asUint8Array()\n if (this.#v.length !== otherArray.length) return false\n for (let i = 0; i < this.#v.length; i++) {\n if (this.#v[i] !== otherArray[i]) return false\n }\n return true\n }\n\n private bitwiseOp(other: StubBytesCompat, op: (a: number, b: number) => number): BytesCls {\n const otherArray = BytesCls.fromCompat(other).asUint8Array()\n const result = new Uint8Array(Math.max(this.#v.length, otherArray.length))\n for (let i = result.length - 1; i >= 0; i--) {\n const thisIndex = i - (result.length - this.#v.length)\n const otherIndex = i - (result.length - otherArray.length)\n result[i] = op(this.#v[thisIndex] ?? 0, otherArray[otherIndex] ?? 0)\n }\n return new BytesCls(result)\n }\n\n valueOf(): string {\n return uint8ArrayToHex(this.#v)\n }\n\n static [Symbol.hasInstance](x: unknown): x is BytesCls {\n return isInstanceOfTypeByName(x, BytesCls)\n }\n\n static fromCompat(v: StubBytesCompat | undefined): BytesCls {\n if (v === undefined) return new BytesCls(new Uint8Array())\n if (typeof v === 'string') return new BytesCls(utf8ToUint8Array(v))\n if (v instanceof BytesCls) return v\n if (v instanceof Uint8Array) return new BytesCls(v)\n internalError(`Cannot convert ${nameOfType(v)} to bytes`)\n }\n\n static fromInterpolation(template: TemplateStringsArray, replacements: StubBytesCompat[]) {\n return template\n .flatMap((templateText, index) => {\n const replacement = replacements[index]\n if (replacement) {\n return [BytesCls.fromCompat(templateText), BytesCls.fromCompat(replacement)]\n }\n return [BytesCls.fromCompat(templateText)]\n })\n .reduce((a, b) => a.concat(b))\n }\n\n static fromHex(hex: string): BytesCls {\n return new BytesCls(Uint8Array.from(Buffer.from(hex, 'hex')))\n }\n\n static fromBase64(b64: string): BytesCls {\n return new BytesCls(Uint8Array.from(Buffer.from(b64, 'base64')))\n }\n\n static fromBase32(b32: string): BytesCls {\n return new BytesCls(base32ToUint8Array(b32))\n }\n\n toUint64(): Uint64Cls {\n return new Uint64Cls(uint8ArrayToBigInt(this.#v))\n }\n toBigUint(): BigUintCls {\n return new BigUintCls(uint8ArrayToBigInt(this.#v))\n }\n toString(): string {\n return uint8ArrayToUtf8(this.#v)\n }\n\n asAlgoTs(): bytes {\n return this as unknown as bytes\n }\n\n asUint8Array(): Uint8Array {\n return this.#v\n }\n}\n\nexport const arrayUtil = new (class {\n arrayAt<T>(arrayLike: T[], index: StubUint64Compat): T {\n return arrayLike.at(Uint64Cls.fromCompat(index).asNumber()) ?? avmError('Index out of bounds')\n }\n arraySlice(arrayLike: Uint8Array, start: StubUint64Compat, end: StubUint64Compat): Uint8Array\n arraySlice<T>(arrayLike: T[], start: StubUint64Compat, end: StubUint64Compat): T[]\n arraySlice<T>(arrayLike: T[] | Uint8Array, start: StubUint64Compat, end: StubUint64Compat) {\n return arrayLike.slice(Uint64Cls.getNumber(start), Uint64Cls.getNumber(end)) as DeliberateAny\n }\n})()\n","import { BigUintCls, BytesCls, Uint64Cls } from './impl/primitives'\n\nexport type Uint64Compat = uint64 | bigint | boolean | number\nexport type BigUintCompat = Uint64Compat | bigint | bytes | number\nexport type StringCompat = string\nexport type BytesCompat = bytes | string | Uint8Array\n\n/**\n * An unsigned integer of exactly 64 bits\n */\nexport type uint64 = {\n __type?: 'uint64'\n} & number\n\n/**\n * Create a uint64 value\n * @param v The value to use\n */\nexport function Uint64(v: bigint): uint64\nexport function Uint64(v: number): uint64\nexport function Uint64(v: boolean): uint64\nexport function Uint64(v: Uint64Compat): uint64 {\n return Uint64Cls.fromCompat(v).asAlgoTs()\n}\n\n/**\n * An unsigned integer of up to 512 bits\n *\n * Stored as a big-endian variable byte array\n */\nexport type biguint = {\n __type?: 'biguint'\n} & bigint\n\n/**\n * Create a biguint value\n * @param v The value to use\n */\nexport function BigUint(v: bigint): biguint\nexport function BigUint(v: boolean): biguint\nexport function BigUint(v: number): biguint\nexport function BigUint(v: bytes): biguint\nexport function BigUint(v: BigUintCompat): biguint {\n return BigUintCls.fromCompat(v).asAlgoTs()\n}\n\nexport type bytes = {\n readonly length: uint64\n\n at(i: Uint64Compat): bytes\n\n concat(other: BytesCompat): bytes\n\n bitwiseAnd(other: BytesCompat): bytes\n\n bitwiseOr(other: BytesCompat): bytes\n\n bitwiseXor(other: BytesCompat): bytes\n\n bitwiseInvert(): bytes\n\n equals(other: BytesCompat): boolean\n\n toString(): string\n}\n\nexport function Bytes(value: TemplateStringsArray, ...replacements: BytesCompat[]): bytes\nexport function Bytes(value: BytesCompat): bytes\nexport function Bytes(): bytes\nexport function Bytes(value?: BytesCompat | TemplateStringsArray, ...replacements: BytesCompat[]): bytes {\n if (isTemplateStringsArray(value)) {\n return BytesCls.fromInterpolation(value, replacements).asAlgoTs()\n } else {\n return BytesCls.fromCompat(value).asAlgoTs()\n }\n}\n\n/**\n * Create a new bytes value from a hexadecimal encoded string\n * @param hex\n */\nBytes.fromHex = (hex: string): bytes => {\n return BytesCls.fromHex(hex).asAlgoTs()\n}\n/**\n * Create a new bytes value from a base 64 encoded string\n * @param b64\n */\nBytes.fromBase64 = (b64: string): bytes => {\n return BytesCls.fromBase64(b64).asAlgoTs()\n}\n\n/**\n * Create a new bytes value from a base 32 encoded string\n * @param b32\n */\nBytes.fromBase32 = (b32: string): bytes => {\n return BytesCls.fromBase32(b32).asAlgoTs()\n}\n\nfunction isTemplateStringsArray(v: unknown): v is TemplateStringsArray {\n return Boolean(v) && Array.isArray(v) && typeof v[0] === 'string'\n}\n\nexport interface BytesBacked {\n get bytes(): bytes\n}\n","import { Contract, gtxn, itxn } 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}\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 { biguint, BigUintCompat, BytesCompat, StringCompat, uint64, Uint64Compat } from './primitives'\nimport { ctxMgr } from './execution-context'\nimport { AssertError, AvmError } from './impl/errors'\nimport { toBytes } from './impl/primitives'\n\nexport function log(...args: Array<Uint64Compat | BytesCompat | BigUintCompat | StringCompat>): 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')\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 { uint64 } from './primitives'\n\nexport abstract class BaseContract {\n public abstract approvalProgram(): boolean | uint64\n public clearStateProgram(): boolean | uint64 {\n return true\n }\n}\n","import { biguint, BigUintCompat, Bytes, bytes, BytesBacked, StringCompat, uint64, Uint64Compat } from '../primitives'\nimport { err } from '../util'\nimport { Account } from '../reference'\nimport { arrayUtil } from '../impl/primitives'\n\nexport type BitSize = 8 | 16 | 32 | 64 | 128 | 256 | 512\ntype NativeForArc4Int<N extends BitSize> = N extends 8 | 16 | 32 | 64 ? uint64 : biguint\ntype CompatForArc4Int<N extends BitSize> = N extends 8 | 16 | 32 | 64 ? Uint64Compat : BigUintCompat\n\nabstract class AbiEncoded implements BytesBacked {\n get bytes(): bytes {\n throw new Error('todo')\n }\n}\n\nexport class Str extends AbiEncoded {\n constructor(s: StringCompat) {\n super()\n }\n get native(): string {\n throw new Error('TODO')\n }\n}\nexport class UintN<N extends BitSize> extends AbiEncoded {\n constructor(v?: CompatForArc4Int<N>) {\n super()\n }\n get native(): NativeForArc4Int<N> {\n throw new Error('TODO')\n }\n}\nexport class UFixedNxM<N extends BitSize, M extends number> {\n constructor(v: `${number}:${number}`, n?: N, m?: M) {}\n\n get native(): NativeForArc4Int<N> {\n throw new Error('TODO')\n }\n}\n\nexport class Byte extends UintN<8> {\n constructor(v: Uint64Compat) {\n super(v)\n }\n get native(): uint64 {\n throw new Error('TODO')\n }\n}\nexport class Bool {\n #v: boolean\n constructor(v: boolean) {\n this.#v = v\n }\n\n get native(): boolean {\n return this.#v\n }\n}\n\nabstract class Arc4Array<TItem> extends AbiEncoded {\n protected constructor(protected items: TItem[]) {\n super()\n }\n get length(): uint64 {\n throw new Error('TODO')\n }\n at(index: Uint64Compat): TItem {\n return arrayUtil.arrayAt(this.items, index)\n }\n slice(start: Uint64Compat, end: Uint64Compat): DynamicArray<TItem> {\n return new DynamicArray(...arrayUtil.arraySlice(this.items, start, end))\n }\n [Symbol.iterator](): IterableIterator<TItem> {\n return this.items[Symbol.iterator]()\n }\n entries(): IterableIterator<readonly [uint64, TItem]> {\n throw new Error('TODO')\n }\n keys(): IterableIterator<uint64> {\n throw new Error('TODO')\n }\n}\n\nexport class StaticArray<TItem, TLength extends number> extends Arc4Array<TItem> {\n constructor()\n constructor(...items: TItem[] & { length: TLength })\n constructor(...items: TItem[])\n constructor(...items: TItem[] & { length: TLength }) {\n super(items)\n }\n\n copy(): StaticArray<TItem, TLength> {\n return new StaticArray<TItem, TLength>(...this.items)\n }\n}\n\nexport class DynamicArray<TItem> extends Arc4Array<TItem> {\n constructor(...items: TItem[]) {\n super(items)\n }\n push(...items: TItem[]): void {}\n pop(): TItem {\n throw new Error('Not implemented')\n }\n\n copy(): DynamicArray<TItem> {\n return new DynamicArray<TItem>(...this.items)\n }\n}\n\ntype ItemAt<TTuple extends unknown[], TIndex extends number> = undefined extends TTuple[TIndex] ? never : TTuple[TIndex]\n\nexport class Tuple<TTuple extends unknown[]> {\n #items: TTuple\n constructor(...items: TTuple) {\n this.#items = items\n }\n\n at<TIndex extends number>(index: TIndex): ItemAt<TTuple, TIndex> {\n return (this.#items[index] ?? err('Index out of bounds')) as ItemAt<TTuple, TIndex>\n }\n\n get native(): TTuple {\n return this.#items\n }\n}\n\nexport class Address extends StaticArray<Byte, 32> {\n constructor(value: Account | string | bytes) {\n super()\n }\n\n get native(): Account {\n throw new Error('TODO')\n }\n}\n","import { BaseContract } from '../base-contract'\nimport { ctxMgr } from '../execution-context'\nimport { Uint64 } from '../primitives'\nimport { DeliberateAny } from '../typescript-helpers'\n\nexport * from './encoded-types'\n\nexport class Contract extends BaseContract {\n override approvalProgram(): boolean {\n return true\n }\n}\n\nexport type CreateOptions = 'allow' | 'disallow' | 'require'\nexport type OnCompleteActionStr = 'NoOp' | 'OptIn' | 'ClearState' | 'CloseOut' | 'UpdateApplication' | 'DeleteApplication'\n\nexport enum OnCompleteAction {\n NoOp = Uint64(0),\n OptIn = Uint64(1),\n CloseOut = Uint64(2),\n ClearState = Uint64(3),\n UpdateApplication = Uint64(4),\n DeleteApplication = Uint64(5),\n}\n\nexport type DefaultArgument<TContract extends Contract> = { constant: string | boolean | number | bigint } | { from: keyof TContract }\nexport type AbiMethodConfig<TContract extends Contract> = {\n /**\n * Which on complete action(s) are allowed when invoking this method.\n * @default 'NoOp'\n */\n allowActions?: OnCompleteActionStr | OnCompleteActionStr[]\n /**\n * Whether this method should be callable when creating the application.\n * @default 'disallow'\n */\n onCreate?: CreateOptions\n /**\n * Does the method only perform read operations (no mutation of chain state)\n * @default false\n */\n readonly?: boolean\n /**\n * Override the name used to generate the abi method selector\n */\n name?: string\n\n defaultArguments?: Record<string, DefaultArgument<TContract>>\n}\nexport function abimethod<TContract extends Contract>(config?: AbiMethodConfig<TContract>) {\n return function <TArgs extends DeliberateAny[], TReturn>(\n target: (this: TContract, ...args: TArgs) => TReturn,\n ctx: ClassMethodDecoratorContext<TContract>,\n ): (this: TContract, ...args: TArgs) => TReturn {\n ctx.addInitializer(function () {\n ctxMgr.instance.abiMetadata.captureMethodConfig(this, target.name, config)\n })\n return target\n }\n}\n\nexport type BareMethodConfig = {\n /**\n * Which on complete action(s) are allowed when invoking this method.\n * @default 'NoOp'\n */\n allowActions?: OnCompleteActionStr | OnCompleteActionStr[]\n /**\n * Whether this method should be callable when creating the application.\n * @default 'disallow'\n */\n onCreate?: CreateOptions\n}\nexport function baremethod<TContract extends Contract>(config?: BareMethodConfig) {\n return function <TArgs extends DeliberateAny[], TReturn>(\n target: (this: TContract, ...args: TArgs) => TReturn,\n ctx: ClassMethodDecoratorContext<TContract>,\n ): (this: TContract, ...args: TArgs) => TReturn {\n ctx.addInitializer(function () {\n ctxMgr.instance.abiMetadata.captureMethodConfig(this, target.name, config)\n })\n return target\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,eAAe,GAAG,kCAAkC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;AAEpE,MAAM,WAAW,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,GAAG,CAAC,EAAE,EAA4B,CAAC,CAAA;AAEjH,MAAM,kBAAkB,GAAG,CAAC,KAAa,KAAgB;IAC9D,IAAI,QAAQ,GAAG,KAAK;SACjB,KAAK,CAAC,EAAE,CAAC;SACT,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC;AACxB,SAAA,GAAG,CAAC,CAAC,CAAC,KAAI;AACT,QAAA,MAAM,MAAM,GAAG,CAAC,CAAC,WAAW,EAAE,CAAA;QAC9B,IAAI,MAAM,IAAI,WAAW;AAAE,YAAA,OAAO,WAAW,CAAC,MAAM,CAAC,CAAA;AACrD,QAAA,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAA,CAAE,CAAC,CAAA;AAC7C,KAAC,CAAC,CAA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