@algorandfoundation/algorand-typescript 1.0.0-beta.6 → 1.0.0-beta.8

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/arc4/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { d as ARC4Encoded, I as Address, F as Bool, u as Byte, h as Contract, H as DynamicArray, K as DynamicBytes, O as OnCompleteAction, G as StaticArray, L as StaticBytes, S as Str, J as Struct, T as Tuple, E as UFixedNxM, t as UintN, z as UintN128, w as UintN16, D as UintN256, x as UintN32, y as UintN64, v as UintN8, j as abimethod, r as baremethod, P as decodeArc4, Q as encodeArc4, M as interpretAsArc4, s as methodSelector } from '../index-CLBMQ4-B.js';
2
- import '../op-Mj11EGRt.js';
1
+ export { d as ARC4Encoded, I as Address, F as Bool, u as Byte, h as Contract, H as DynamicArray, K as DynamicBytes, O as OnCompleteAction, G as StaticArray, L as StaticBytes, S as Str, J as Struct, T as Tuple, E as UFixedNxM, t as UintN, z as UintN128, w as UintN16, D as UintN256, x as UintN32, y as UintN64, v as UintN8, j as abimethod, r as baremethod, P as decodeArc4, Q as encodeArc4, M as interpretAsArc4, s as methodSelector } from '../index-BbcZ73FR.js';
2
+ import '../op-DWxTNVRm.js';
3
3
  import 'node:buffer';
4
4
  import 'node:util';
5
5
  //# sourceMappingURL=index.mjs.map
@@ -1,4 +1,4 @@
1
- import { c as ctxMgr, s as sha512_256 } from './op-Mj11EGRt.js';
1
+ import { c as ctxMgr, s as sha512_256 } from './op-DWxTNVRm.js';
2
2
  import { Buffer } from 'node:buffer';
3
3
  import { TextDecoder } from 'node:util';
4
4
 
@@ -923,4 +923,4 @@ var index = /*#__PURE__*/Object.freeze({
923
923
  });
924
924
 
925
925
  export { AssertError as A, BigUintCls as B, ContractOptionsSymbol as C, UintN256 as D, UFixedNxM as E, Bool as F, StaticArray as G, DynamicArray as H, Address as I, Struct as J, DynamicBytes as K, StaticBytes as L, interpretAsArc4 as M, NoImplementation as N, OnCompleteAction as O, decodeArc4 as P, encodeArc4 as Q, Str as S, Tuple as T, Uint64Cls as U, errors as a, AvmError as b, AlgoTsPrimitiveCls as c, ARC4Encoded as d, encodingUtil as e, BytesCls as f, index as g, Contract as h, internalError as i, abimethod as j, BaseContract as k, contract as l, Uint64 as m, nameOfType as n, BigUint as o, primitives as p, Bytes as q, baremethod as r, methodSelector as s, UintN as t, Byte as u, UintN8 as v, UintN16 as w, UintN32 as x, UintN64 as y, UintN128 as z };
926
- //# sourceMappingURL=index-CLBMQ4-B.js.map
926
+ //# sourceMappingURL=index-BbcZ73FR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CLBMQ4-B.js","sources":["../src/impl/errors.ts","../src/impl/base-32.ts","../src/impl/encoding-util.ts","../src/impl/name-of-type.ts","../src/impl/primitives.ts","../src/primitives.ts","../src/base-contract.ts","../src/arc4/encoded-types.ts","../src/arc4/index.ts"],"sourcesContent":["/**\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\nexport function avmInvariant(condition: unknown, message: string): asserts condition {\n if (!condition) {\n throw new AvmError(message)\n }\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\n/**\n * This error can be used in stub implementations that are expected to be overridden\n * by the testing framework\n */\nexport class NoImplementation extends Error {\n constructor() {\n super('This method is intentionally not implemented')\n }\n}\n","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","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 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 { 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, avmInvariant, 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}\n\n/**\n * Convert a StubUint64Compat value into a 'number' if possible.\n * This value may be negative\n * @param v\n */\nexport const getNumber = (v: StubUint64Compat): number => {\n if (typeof v == 'boolean') return v ? 1 : 0\n if (typeof v == 'number') return v\n if (typeof v == 'bigint') {\n avmInvariant(\n v <= BigInt(Number.MAX_SAFE_INTEGER) && v >= BigInt(Number.MIN_SAFE_INTEGER),\n 'value cannot be safely converted to a number',\n )\n return Number(v)\n }\n if (v instanceof Uint64Cls) return v.asNumber()\n internalError(`Cannot convert ${v} to number`)\n}\n\nexport const getUint8Array = (v: StubBytesCompat): Uint8Array => {\n return BytesCls.fromCompat(v).asUint8Array()\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 == 'number') return true\n if (typeof v == 'bigint') return true\n return v instanceof Uint64Cls\n}\n\nexport const checkUint64 = (v: bigint): bigint => {\n const u64 = BigInt.asUintN(64, v)\n if (u64 !== v) throw new AvmError(`Uint64 overflow 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 overflow 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 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 return new BytesCls(arrayUtil.arrayAt(this.#v, i))\n }\n\n slice(start?: StubUint64Compat, end?: StubUint64Compat): BytesCls {\n const sliced = arrayUtil.arraySlice(this.#v, start, end)\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 | Uint8Array | 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 ArrayUtil {\n arrayAt(arrayLike: Uint8Array, index: StubUint64Compat): Uint8Array\n arrayAt<T>(arrayLike: T[], index: StubUint64Compat): T\n arrayAt<T>(arrayLike: T[] | Uint8Array, index: StubUint64Compat): T | Uint8Array\n arrayAt<T>(arrayLike: T[] | Uint8Array, index: StubUint64Compat): T | Uint8Array {\n const indexNum = getNumber(index)\n if (arrayLike instanceof Uint8Array) {\n const res = arrayLike.slice(indexNum, indexNum === -1 ? undefined : indexNum + 1)\n avmInvariant(res.length, 'Index out of bounds')\n return res\n }\n return arrayLike.at(indexNum) ?? avmError('Index out of bounds')\n }\n arraySlice(arrayLike: Uint8Array, start: undefined | StubUint64Compat, end: undefined | StubUint64Compat): Uint8Array\n arraySlice<T>(arrayLike: T[], start: undefined | StubUint64Compat, end: undefined | StubUint64Compat): T[]\n arraySlice<T>(arrayLike: T[] | Uint8Array, start: undefined | StubUint64Compat, end: undefined | StubUint64Compat): Uint8Array | T[] {\n const startNum = start === undefined ? undefined : getNumber(start)\n const endNum = end === undefined ? undefined : getNumber(end)\n if (arrayLike instanceof Uint8Array) {\n return arrayLike.slice(startNum, endNum)\n } else {\n return arrayLike.slice(startNum, endNum)\n }\n }\n})()\n","import { CodeError } from './impl/errors'\nimport { BigUintCls, BytesCls, getNumber, Uint64Cls } from './impl/primitives'\n\nexport type Uint64Compat = uint64 | bigint | boolean | number\nexport type BigUintCompat = bigint | bytes | number | boolean\nexport type StringCompat = string\nexport type BytesCompat = bytes | string\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 with the default value of 0\n */\nexport function Uint64(): uint64\n/**\n * Create a uint64 from a string literal\n */\nexport function Uint64(v: string): uint64\n/**\n * Create a uint64 from a bigint literal\n */\nexport function Uint64(v: bigint): uint64\n/**\n * Create a uint64 from a number literal\n */\nexport function Uint64(v: number): uint64\n/**\n * Create a uint64 from a boolean value. True is 1, False is 0\n */\nexport function Uint64(v: boolean): uint64\nexport function Uint64(v?: Uint64Compat | string): uint64 {\n if (typeof v === 'string') {\n v = BigInt(v)\n }\n return Uint64Cls.fromCompat(v ?? 0).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 from a bigint literal\n */\nexport function BigUint(v: bigint): biguint\n/**\n * Create a biguint from a boolean value (true = 1, false = 0)\n */\nexport function BigUint(v: boolean): biguint\n/**\n * Create a biguint from a uint64 value\n */\nexport function BigUint(v: uint64): biguint\n/**\n * Create a biguint from a number literal\n */\nexport function BigUint(v: number): biguint\n/**\n * Create a biguint from a byte array interpreted as a big-endian number\n */\nexport function BigUint(v: bytes): biguint\n/**\n * Create a biguint from a string literal containing the decimal digits\n */\nexport function BigUint(v: string): biguint\n/**\n * Create a biguint with the default value of 0\n */\nexport function BigUint(): biguint\nexport function BigUint(v?: BigUintCompat | string): biguint {\n if (typeof v === 'string') v = BigInt(v)\n else if (v === undefined) v = 0n\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(): bytes\n slice(start: Uint64Compat): bytes\n slice(start: Uint64Compat, end: Uint64Compat): bytes\n slice(start?: Uint64Compat, end?: Uint64Compat): bytes\n\n toString(): string\n}\n\n/**\n * Create a byte array from a string interpolation template and compatible replacements\n * @param value\n * @param replacements\n */\nexport function Bytes(value: TemplateStringsArray, ...replacements: BytesCompat[]): bytes\n/**\n * Create a byte array from a utf8 string\n */\nexport function Bytes(value: string): bytes\n/**\n * No op, returns the provided byte array.\n */\nexport function Bytes(value: bytes): bytes\n/**\n * Create a byte array from a biguint value encoded as a variable length big-endian number\n */\nexport function Bytes(value: biguint): bytes\n/**\n * Create a byte array from a uint64 value encoded as a fixed length 64-bit number\n */\nexport function Bytes(value: uint64): bytes\n/**\n * Create a byte array from an Iterable<uint64> where each item is interpreted as a single byte and must be between 0 and 255 inclusively\n */\nexport function Bytes(value: Iterable<uint64>): bytes\n/**\n * Create an empty byte array\n */\nexport function Bytes(): bytes\nexport function Bytes(\n value?: BytesCompat | TemplateStringsArray | biguint | uint64 | Iterable<number>,\n ...replacements: BytesCompat[]\n): bytes {\n if (isTemplateStringsArray(value)) {\n return BytesCls.fromInterpolation(value, replacements).asAlgoTs()\n } else if (typeof value === 'bigint' || value instanceof BigUintCls) {\n return BigUintCls.fromCompat(value).toBytes().asAlgoTs()\n } else if (typeof value === 'number' || value instanceof Uint64Cls) {\n return Uint64Cls.fromCompat(value).toBytes().asAlgoTs()\n } else if (typeof value === 'object' && Symbol.iterator in value) {\n const valueItems = Array.from(value).map((v) => getNumber(v))\n const invalidValue = valueItems.find((v) => v < 0 && v > 255)\n if (invalidValue) {\n throw new CodeError(`Cannot convert ${invalidValue} to a byte`)\n }\n return new BytesCls(new Uint8Array(value)).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 } from './arc4'\nimport { uint64 } from './primitives'\nimport { ConstructorFor } from './typescript-helpers'\n\nexport abstract class BaseContract {\n static isArc4 = false\n\n public abstract approvalProgram(): boolean | uint64\n public clearStateProgram(): boolean | uint64 {\n return true\n }\n}\n\ntype NumberRange = { from: number; to: number }\n\n/**\n * Options class to manually define the total amount of global and local state contract will use.\n *\n * This is not required when all state is assigned to `this.`, but is required if a\n * contract dynamically interacts with state via `AppGlobal.getBytes` etc, or if you want\n * to reserve additional state storage for future contract updates, since the Algorand protocol\n * doesn't allow increasing them after creation.\n */\ntype StateTotals = {\n globalUints?: number\n globalBytes?: number\n localUints?: number\n localBytes?: number\n}\n\ntype ContractOptions = {\n /**\n * Determines which AVM version to use, this affects what operations are supported.\n * Defaults to value provided supplied on command line (which defaults to current mainnet version)\n */\n avmVersion?: 10 | 11\n\n /**\n * Override the name of the logic signature when generating build artifacts.\n * Defaults to the class name\n */\n name?: string\n /**\n * Allows you to mark a slot ID or range of slot IDs as \"off limits\" to Puya.\n * These slot ID(s) will never be written to or otherwise manipulating by the compiler itself.\n * This is particularly useful in combination with `op.gload_bytes` / `op.gload_uint64`\n * which lets a contract in a group transaction read from the scratch slots of another contract\n * that occurs earlier in the transaction group.\n *\n * In the case of inheritance, scratch slots reserved become cumulative. It is not an error\n * to have overlapping ranges or values either, so if a base class contract reserves slots\n * 0-5 inclusive and the derived contract reserves 5-10 inclusive, then within the derived\n * contract all slots 0-10 will be marked as reserved.\n */\n scratchSlots?: Array<number | NumberRange>\n /**\n * Allows defining what values should be used for global and local uint and bytes storage\n * values when creating a contract. Used when outputting ARC-32 application.json schemas.\n *\n * If left unspecified, the totals will be determined by the compiler based on state\n * variables assigned to `this`.\n *\n * This setting is not inherited, and only applies to the exact `Contract` it is specified\n * on. If a base class does specify this setting, and a derived class does not, a warning\n * will be emitted for the derived class. To resolve this warning, `stateTotals` must be\n * specified. An empty object may be provided in order to indicate that this contract should\n * revert to the default behaviour\n */\n stateTotals?: StateTotals\n}\n\n/**\n * The contract decorator can be used to specify additional configuration options for a smart contract\n * @param options An object containing the configuration options\n */\nexport const ContractOptionsSymbol = Symbol('ContractOptions')\nexport function contract(options: ContractOptions) {\n return <T extends ConstructorFor<Contract>>(contract: T, ctx: ClassDecoratorContext) => {\n ctx.addInitializer(function () {\n Object.defineProperty(this, ContractOptionsSymbol, {\n value: options,\n writable: false,\n enumerable: false,\n })\n })\n return contract\n }\n}\n","import { NoImplementation } from '../impl/errors'\nimport { biguint, BigUintCompat, bytes, BytesBacked, BytesCompat, StringCompat, uint64, Uint64Compat } from '../primitives'\nimport { Account } from '../reference'\n\ntype UintBitSize = 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64\ntype BigUintBitSize =\n | 72\n | 80\n | 88\n | 96\n | 104\n | 112\n | 120\n | 128\n | 136\n | 144\n | 152\n | 160\n | 168\n | 176\n | 184\n | 192\n | 200\n | 208\n | 216\n | 224\n | 232\n | 240\n | 248\n | 256\n | 264\n | 272\n | 280\n | 288\n | 296\n | 304\n | 312\n | 320\n | 328\n | 336\n | 344\n | 352\n | 360\n | 368\n | 376\n | 384\n | 392\n | 400\n | 408\n | 416\n | 424\n | 432\n | 440\n | 448\n | 456\n | 464\n | 472\n | 480\n | 488\n | 496\n | 504\n | 512\nexport type BitSize = UintBitSize | BigUintBitSize\ntype NativeForArc4Int<N extends BitSize> = N extends UintBitSize ? uint64 : biguint\ntype CompatForArc4Int<N extends BitSize> = N extends UintBitSize ? Uint64Compat : BigUintCompat\n\nconst TypeProperty = Symbol('ARC4Type')\n\nexport abstract class ARC4Encoded implements BytesBacked {\n abstract [TypeProperty]?: string\n get bytes(): bytes {\n throw new NoImplementation()\n }\n}\n\nexport class Str extends ARC4Encoded {\n [TypeProperty]?: 'arc4.Str'\n #value: string\n constructor(s?: StringCompat) {\n super()\n this.#value = s ?? ''\n }\n get native(): string {\n return this.#value\n }\n}\nexport class UintN<N extends BitSize> extends ARC4Encoded {\n [TypeProperty]?: `arc4.UintN<${N}>`\n\n constructor(v?: CompatForArc4Int<N>) {\n super()\n }\n get native(): NativeForArc4Int<N> {\n throw new NoImplementation()\n }\n}\nexport class Byte extends UintN<8> {}\nexport class UintN8 extends UintN<8> {}\nexport class UintN16 extends UintN<16> {}\nexport class UintN32 extends UintN<32> {}\nexport class UintN64 extends UintN<64> {}\nexport class UintN128 extends UintN<128> {}\nexport class UintN256 extends UintN<256> {}\nexport class UFixedNxM<N extends BitSize, M extends number> extends ARC4Encoded {\n [TypeProperty]?: `arc4.UFixedNxM<${N}x${M}>`\n constructor(v: `${number}.${number}`) {\n super()\n }\n\n get native(): NativeForArc4Int<N> {\n throw new NoImplementation()\n }\n}\nexport class Bool extends ARC4Encoded {\n [TypeProperty]?: `arc4.Bool`\n\n constructor(v?: boolean) {\n super()\n }\n\n get native(): boolean {\n throw new NoImplementation()\n }\n}\n\nabstract class Arc4ReadonlyArray<TItem extends ARC4Encoded> extends ARC4Encoded {\n protected constructor() {\n super()\n }\n\n /**\n * Returns the current length of this array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Returns the item at the given index.\n * Negative indexes are taken from the end.\n * @param index The index of the item to retrieve\n */\n at(index: Uint64Compat): TItem {\n throw new NoImplementation()\n }\n\n /** @internal\n * Create a new Dynamic array with all items from this array\n */\n slice(): DynamicArray<TItem>\n /** @internal\n * Create a new DynamicArray with all items up till `end`.\n * Negative indexes are taken from the end.\n * @param end An index in which to stop copying items.\n */\n slice(end: Uint64Compat): DynamicArray<TItem>\n /** @internal\n * Create a new DynamicArray with items from `start`, up until `end`\n * Negative indexes are taken from the end.\n * @param start An index in which to start copying items.\n * @param end An index in which to stop copying items\n */\n slice(start: Uint64Compat, end: Uint64Compat): DynamicArray<TItem>\n slice(start?: Uint64Compat, end?: Uint64Compat): DynamicArray<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the items in this array\n */\n [Symbol.iterator](): IterableIterator<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for a tuple of the indexes and items in this array\n */\n entries(): IterableIterator<readonly [uint64, TItem]> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the indexes in this array\n */\n keys(): IterableIterator<uint64> {\n throw new NoImplementation()\n }\n\n /**\n * Get or set the item at the specified index.\n * Negative indexes are not supported\n */\n [index: uint64]: TItem\n}\n\nexport class StaticArray<TItem extends ARC4Encoded, TLength extends number> extends Arc4ReadonlyArray<TItem> {\n [TypeProperty]?: `arc4.StaticArray<${TItem[typeof TypeProperty]}, ${TLength}>`\n constructor()\n constructor(...items: TItem[] & { length: TLength })\n constructor(...items: TItem[])\n constructor(...items: TItem[] & { length: TLength }) {\n super()\n }\n\n copy(): StaticArray<TItem, TLength> {\n throw new NoImplementation()\n }\n}\nexport class DynamicArray<TItem extends ARC4Encoded> extends Arc4ReadonlyArray<TItem> {\n [TypeProperty]?: `arc4.DynamicArray<${TItem[typeof TypeProperty]}>`\n constructor(...items: TItem[]) {\n super()\n }\n\n /**\n * Push a number of items into this array\n * @param items The items to be added to this array\n */\n push(...items: TItem[]): void {\n throw new NoImplementation()\n }\n\n /**\n * Pop a single item from this array\n */\n pop(): TItem {\n throw new NoImplementation()\n }\n\n copy(): DynamicArray<TItem> {\n throw new NoImplementation()\n }\n}\ntype ExpandTupleType<T extends ARC4Encoded[]> = T extends [infer T1 extends ARC4Encoded, ...infer TRest extends ARC4Encoded[]]\n ? TRest extends []\n ? `${T1[typeof TypeProperty]}`\n : `${T1[typeof TypeProperty]},${ExpandTupleType<TRest>}`\n : ''\n\nexport class Tuple<TTuple extends [ARC4Encoded, ...ARC4Encoded[]]> extends ARC4Encoded {\n [TypeProperty]?: `arc4.Tuple<${ExpandTupleType<TTuple>}>`\n constructor(...items: TTuple) {\n super()\n }\n\n at<TIndex extends keyof TTuple>(index: TIndex): TTuple[TIndex] {\n throw new NoImplementation()\n }\n\n get length(): TTuple['length'] & uint64 {\n throw new NoImplementation()\n }\n\n get native(): TTuple {\n throw new NoImplementation()\n }\n}\n\nexport class Address extends Arc4ReadonlyArray<Byte> {\n [TypeProperty]?: `arc4.Address`\n constructor(value?: Account | string | bytes) {\n super()\n }\n\n get native(): Account {\n throw new NoImplementation()\n }\n}\n\ntype StructConstraint = Record<string, ARC4Encoded>\n\nclass StructBase extends ARC4Encoded {\n [TypeProperty] = 'arc4.Struct'\n}\nclass StructImpl<T extends StructConstraint> extends StructBase {\n constructor(initial: T) {\n super()\n for (const [prop, val] of Object.entries(initial)) {\n Object.defineProperty(this, prop, {\n value: val,\n writable: true,\n enumerable: true,\n })\n }\n }\n}\n\ntype StructConstructor = new <T extends StructConstraint>(initial: T) => StructBase & T\n\nexport const Struct = StructImpl as StructConstructor\n\nexport class DynamicBytes extends Arc4ReadonlyArray<Byte> {\n [TypeProperty]?: `arc4.DynamicBytes`\n\n constructor(value?: bytes | string) {\n super()\n }\n\n get native(): bytes {\n throw new NoImplementation()\n }\n}\n\nexport class StaticBytes<TLength extends number = 0> extends Arc4ReadonlyArray<Byte> {\n [TypeProperty]?: `arc4.StaticBytes<${TLength}>`\n\n constructor(value?: bytes | string) {\n super()\n }\n\n get native(): bytes {\n throw new NoImplementation()\n }\n}\n\n/**\n * Interpret the provided bytes as an ARC4 encoded type with no validation\n * @param bytes An arc4 encoded bytes value\n * @param prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed\n */\nexport function interpretAsArc4<T extends ARC4Encoded>(bytes: BytesCompat, prefix: 'none' | 'log' = 'none'): T {\n throw new NoImplementation()\n}\n\n/**\n * Decode the provided bytes to a native Algorand TypeScript value\n * @param bytes An arc4 encoded bytes value\n * @param prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed\n */\nexport function decodeArc4<T>(bytes: BytesCompat, prefix: 'none' | 'log' = 'none'): T {\n throw new NoImplementation()\n}\n\n/**\n * Encode the provided Algorand TypeScript value as ARC4 bytes\n * @param value Any native Algorand TypeScript value with a supported ARC4 encoding\n */\nexport function encodeArc4<T>(value: T): bytes {\n throw new NoImplementation()\n}\n","import { BaseContract } from '../base-contract'\nimport { ctxMgr } from '../execution-context'\nimport { encodingUtil } from '../internal'\nimport { sha512_256 } from '../op'\nimport { Bytes, bytes, Uint64 } from '../primitives'\nimport { DeliberateAny } from '../typescript-helpers'\n\nexport * from './encoded-types'\n\nexport class Contract extends BaseContract {\n static isArc4 = true\n\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\n/**\n * Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first\n * 4 bytes of the SHA512/256 hash of the method signature.\n * @param methodSignature An ARC4 method signature. Eg. `hello(string)string`. Must be a compile time constant.\n * @returns The ARC4 method selector. Eg. `02BECE11`\n */\nexport function methodSelector(methodSignature: string): bytes {\n return sha512_256(Bytes(encodingUtil.utf8ToUint8Array(methodSignature))).slice(0, 4)\n}\n"],"names":["encodingUtil.utf8ToUint8Array"],"mappings":";;;;AAAA;;;AAGG;AACG,MAAO,QAAS,SAAQ,KAAK,CAAA;AACjC,IAAA,WAAA,CAAY,OAAe,EAAA;QACzB,KAAK,CAAC,OAAO,CAAC;;AAEjB;AACK,SAAU,QAAQ,CAAC,OAAe,EAAA;AACtC,IAAA,MAAM,IAAI,QAAQ,CAAC,OAAO,CAAC;AAC7B;AAEgB,SAAA,YAAY,CAAC,SAAkB,EAAE,OAAe,EAAA;IAC9D,IAAI,CAAC,SAAS,EAAE;AACd,QAAA,MAAM,IAAI,QAAQ,CAAC,OAAO,CAAC;;AAE/B;AACA;;AAEG;AACG,MAAO,WAAY,SAAQ,QAAQ,CAAA;AACvC,IAAA,WAAA,CAAY,OAAe,EAAA;QACzB,KAAK,CAAC,OAAO,CAAC;;AAEjB;AAED;;AAEG;AACG,MAAO,aAAc,SAAQ,KAAK,CAAA;IACtC,WAAY,CAAA,OAAe,EAAE,OAAsB,EAAA;AACjD,QAAA,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC;;AAE1B;AAEK,SAAU,aAAa,CAAC,OAAe,EAAA;AAC3C,IAAA,MAAM,IAAI,aAAa,CAAC,OAAO,CAAC;AACl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,IAAA,gBAAA,CAAA,gBAAA,CAAA,mBAAA,CAAA,GAAoB,MAAM,CAAC,CAAC,CAAC,uBAAA;AAC7B,IAAA,gBAAA,CAAA,gBAAA,CAAA,mBAAA,CAAA,GAAoB,MAAM,CAAC,CAAC,CAAC,uBAAA;AAC/B,CAAC,EAPW,gBAAgB,KAAhB,gBAAgB,GAO3B,EAAA,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;AAC5E,SAAC,CAAC;AACF,QAAA,OAAO,MAAM;AACf,KAAC;AACH;AAcM,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;AAC5E,SAAC,CAAC;AACF,QAAA,OAAO,MAAM;AACf,KAAC;AACH;AAEA;;;;;AAKG;AACG,SAAU,cAAc,CAAC,eAAuB,EAAA;AACpD,IAAA,OAAO,UAAU,CAAC,KAAK,CAACA,gBAA6B,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;AACtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index-BbcZ73FR.js","sources":["../src/impl/errors.ts","../src/impl/base-32.ts","../src/impl/encoding-util.ts","../src/impl/name-of-type.ts","../src/impl/primitives.ts","../src/primitives.ts","../src/base-contract.ts","../src/arc4/encoded-types.ts","../src/arc4/index.ts"],"sourcesContent":["/**\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\nexport function avmInvariant(condition: unknown, message: string): asserts condition {\n if (!condition) {\n throw new AvmError(message)\n }\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\n/**\n * This error can be used in stub implementations that are expected to be overridden\n * by the testing framework\n */\nexport class NoImplementation extends Error {\n constructor() {\n super('This method is intentionally not implemented')\n }\n}\n","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","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 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 { 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, avmInvariant, 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}\n\n/**\n * Convert a StubUint64Compat value into a 'number' if possible.\n * This value may be negative\n * @param v\n */\nexport const getNumber = (v: StubUint64Compat): number => {\n if (typeof v == 'boolean') return v ? 1 : 0\n if (typeof v == 'number') return v\n if (typeof v == 'bigint') {\n avmInvariant(\n v <= BigInt(Number.MAX_SAFE_INTEGER) && v >= BigInt(Number.MIN_SAFE_INTEGER),\n 'value cannot be safely converted to a number',\n )\n return Number(v)\n }\n if (v instanceof Uint64Cls) return v.asNumber()\n internalError(`Cannot convert ${v} to number`)\n}\n\nexport const getUint8Array = (v: StubBytesCompat): Uint8Array => {\n return BytesCls.fromCompat(v).asUint8Array()\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 == 'number') return true\n if (typeof v == 'bigint') return true\n return v instanceof Uint64Cls\n}\n\nexport const checkUint64 = (v: bigint): bigint => {\n const u64 = BigInt.asUintN(64, v)\n if (u64 !== v) throw new AvmError(`Uint64 overflow 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 overflow 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 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 return new BytesCls(arrayUtil.arrayAt(this.#v, i))\n }\n\n slice(start?: StubUint64Compat, end?: StubUint64Compat): BytesCls {\n const sliced = arrayUtil.arraySlice(this.#v, start, end)\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 | Uint8Array | 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 ArrayUtil {\n arrayAt(arrayLike: Uint8Array, index: StubUint64Compat): Uint8Array\n arrayAt<T>(arrayLike: T[], index: StubUint64Compat): T\n arrayAt<T>(arrayLike: T[] | Uint8Array, index: StubUint64Compat): T | Uint8Array\n arrayAt<T>(arrayLike: T[] | Uint8Array, index: StubUint64Compat): T | Uint8Array {\n const indexNum = getNumber(index)\n if (arrayLike instanceof Uint8Array) {\n const res = arrayLike.slice(indexNum, indexNum === -1 ? undefined : indexNum + 1)\n avmInvariant(res.length, 'Index out of bounds')\n return res\n }\n return arrayLike.at(indexNum) ?? avmError('Index out of bounds')\n }\n arraySlice(arrayLike: Uint8Array, start: undefined | StubUint64Compat, end: undefined | StubUint64Compat): Uint8Array\n arraySlice<T>(arrayLike: T[], start: undefined | StubUint64Compat, end: undefined | StubUint64Compat): T[]\n arraySlice<T>(arrayLike: T[] | Uint8Array, start: undefined | StubUint64Compat, end: undefined | StubUint64Compat): Uint8Array | T[] {\n const startNum = start === undefined ? undefined : getNumber(start)\n const endNum = end === undefined ? undefined : getNumber(end)\n if (arrayLike instanceof Uint8Array) {\n return arrayLike.slice(startNum, endNum)\n } else {\n return arrayLike.slice(startNum, endNum)\n }\n }\n})()\n","import { CodeError } from './impl/errors'\nimport { BigUintCls, BytesCls, getNumber, Uint64Cls } from './impl/primitives'\n\nexport type Uint64Compat = uint64 | bigint | boolean | number\nexport type BigUintCompat = bigint | bytes | number | boolean\nexport type StringCompat = string\nexport type BytesCompat = bytes | string\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 with the default value of 0\n */\nexport function Uint64(): uint64\n/**\n * Create a uint64 from a string literal\n */\nexport function Uint64(v: string): uint64\n/**\n * Create a uint64 from a bigint literal\n */\nexport function Uint64(v: bigint): uint64\n/**\n * Create a uint64 from a number literal\n */\nexport function Uint64(v: number): uint64\n/**\n * Create a uint64 from a boolean value. True is 1, False is 0\n */\nexport function Uint64(v: boolean): uint64\nexport function Uint64(v?: Uint64Compat | string): uint64 {\n if (typeof v === 'string') {\n v = BigInt(v)\n }\n return Uint64Cls.fromCompat(v ?? 0).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 from a bigint literal\n */\nexport function BigUint(v: bigint): biguint\n/**\n * Create a biguint from a boolean value (true = 1, false = 0)\n */\nexport function BigUint(v: boolean): biguint\n/**\n * Create a biguint from a uint64 value\n */\nexport function BigUint(v: uint64): biguint\n/**\n * Create a biguint from a number literal\n */\nexport function BigUint(v: number): biguint\n/**\n * Create a biguint from a byte array interpreted as a big-endian number\n */\nexport function BigUint(v: bytes): biguint\n/**\n * Create a biguint from a string literal containing the decimal digits\n */\nexport function BigUint(v: string): biguint\n/**\n * Create a biguint with the default value of 0\n */\nexport function BigUint(): biguint\nexport function BigUint(v?: BigUintCompat | string): biguint {\n if (typeof v === 'string') v = BigInt(v)\n else if (v === undefined) v = 0n\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(): bytes\n slice(start: Uint64Compat): bytes\n slice(start: Uint64Compat, end: Uint64Compat): bytes\n slice(start?: Uint64Compat, end?: Uint64Compat): bytes\n\n toString(): string\n}\n\n/**\n * Create a byte array from a string interpolation template and compatible replacements\n * @param value\n * @param replacements\n */\nexport function Bytes(value: TemplateStringsArray, ...replacements: BytesCompat[]): bytes\n/**\n * Create a byte array from a utf8 string\n */\nexport function Bytes(value: string): bytes\n/**\n * No op, returns the provided byte array.\n */\nexport function Bytes(value: bytes): bytes\n/**\n * Create a byte array from a biguint value encoded as a variable length big-endian number\n */\nexport function Bytes(value: biguint): bytes\n/**\n * Create a byte array from a uint64 value encoded as a fixed length 64-bit number\n */\nexport function Bytes(value: uint64): bytes\n/**\n * Create a byte array from an Iterable<uint64> where each item is interpreted as a single byte and must be between 0 and 255 inclusively\n */\nexport function Bytes(value: Iterable<uint64>): bytes\n/**\n * Create an empty byte array\n */\nexport function Bytes(): bytes\nexport function Bytes(\n value?: BytesCompat | TemplateStringsArray | biguint | uint64 | Iterable<number>,\n ...replacements: BytesCompat[]\n): bytes {\n if (isTemplateStringsArray(value)) {\n return BytesCls.fromInterpolation(value, replacements).asAlgoTs()\n } else if (typeof value === 'bigint' || value instanceof BigUintCls) {\n return BigUintCls.fromCompat(value).toBytes().asAlgoTs()\n } else if (typeof value === 'number' || value instanceof Uint64Cls) {\n return Uint64Cls.fromCompat(value).toBytes().asAlgoTs()\n } else if (typeof value === 'object' && Symbol.iterator in value) {\n const valueItems = Array.from(value).map((v) => getNumber(v))\n const invalidValue = valueItems.find((v) => v < 0 && v > 255)\n if (invalidValue) {\n throw new CodeError(`Cannot convert ${invalidValue} to a byte`)\n }\n return new BytesCls(new Uint8Array(value)).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 } from './arc4'\nimport { uint64 } from './primitives'\nimport { ConstructorFor } from './typescript-helpers'\n\nexport abstract class BaseContract {\n static isArc4 = false\n\n public abstract approvalProgram(): boolean | uint64\n public clearStateProgram(): boolean | uint64 {\n return true\n }\n}\n\ntype NumberRange = { from: number; to: number }\n\n/**\n * Options class to manually define the total amount of global and local state contract will use.\n *\n * This is not required when all state is assigned to `this.`, but is required if a\n * contract dynamically interacts with state via `AppGlobal.getBytes` etc, or if you want\n * to reserve additional state storage for future contract updates, since the Algorand protocol\n * doesn't allow increasing them after creation.\n */\ntype StateTotals = {\n globalUints?: number\n globalBytes?: number\n localUints?: number\n localBytes?: number\n}\n\ntype ContractOptions = {\n /**\n * Determines which AVM version to use, this affects what operations are supported.\n * Defaults to value provided supplied on command line (which defaults to current mainnet version)\n */\n avmVersion?: 10 | 11\n\n /**\n * Override the name of the logic signature when generating build artifacts.\n * Defaults to the class name\n */\n name?: string\n /**\n * Allows you to mark a slot ID or range of slot IDs as \"off limits\" to Puya.\n * These slot ID(s) will never be written to or otherwise manipulating by the compiler itself.\n * This is particularly useful in combination with `op.gload_bytes` / `op.gload_uint64`\n * which lets a contract in a group transaction read from the scratch slots of another contract\n * that occurs earlier in the transaction group.\n *\n * In the case of inheritance, scratch slots reserved become cumulative. It is not an error\n * to have overlapping ranges or values either, so if a base class contract reserves slots\n * 0-5 inclusive and the derived contract reserves 5-10 inclusive, then within the derived\n * contract all slots 0-10 will be marked as reserved.\n */\n scratchSlots?: Array<number | NumberRange>\n /**\n * Allows defining what values should be used for global and local uint and bytes storage\n * values when creating a contract. Used when outputting ARC-32 application.json schemas.\n *\n * If left unspecified, the totals will be determined by the compiler based on state\n * variables assigned to `this`.\n *\n * This setting is not inherited, and only applies to the exact `Contract` it is specified\n * on. If a base class does specify this setting, and a derived class does not, a warning\n * will be emitted for the derived class. To resolve this warning, `stateTotals` must be\n * specified. An empty object may be provided in order to indicate that this contract should\n * revert to the default behaviour\n */\n stateTotals?: StateTotals\n}\n\n/**\n * The contract decorator can be used to specify additional configuration options for a smart contract\n * @param options An object containing the configuration options\n */\nexport const ContractOptionsSymbol = Symbol('ContractOptions')\nexport function contract(options: ContractOptions) {\n return <T extends ConstructorFor<Contract>>(contract: T, ctx: ClassDecoratorContext) => {\n ctx.addInitializer(function () {\n Object.defineProperty(this, ContractOptionsSymbol, {\n value: options,\n writable: false,\n enumerable: false,\n })\n })\n return contract\n }\n}\n","import { NoImplementation } from '../impl/errors'\nimport { biguint, BigUintCompat, bytes, BytesBacked, BytesCompat, StringCompat, uint64, Uint64Compat } from '../primitives'\nimport { Account } from '../reference'\n\ntype UintBitSize = 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64\ntype BigUintBitSize =\n | 72\n | 80\n | 88\n | 96\n | 104\n | 112\n | 120\n | 128\n | 136\n | 144\n | 152\n | 160\n | 168\n | 176\n | 184\n | 192\n | 200\n | 208\n | 216\n | 224\n | 232\n | 240\n | 248\n | 256\n | 264\n | 272\n | 280\n | 288\n | 296\n | 304\n | 312\n | 320\n | 328\n | 336\n | 344\n | 352\n | 360\n | 368\n | 376\n | 384\n | 392\n | 400\n | 408\n | 416\n | 424\n | 432\n | 440\n | 448\n | 456\n | 464\n | 472\n | 480\n | 488\n | 496\n | 504\n | 512\nexport type BitSize = UintBitSize | BigUintBitSize\ntype NativeForArc4Int<N extends BitSize> = N extends UintBitSize ? uint64 : biguint\ntype CompatForArc4Int<N extends BitSize> = N extends UintBitSize ? Uint64Compat : BigUintCompat\n\nconst TypeProperty = Symbol('ARC4Type')\n\nexport abstract class ARC4Encoded implements BytesBacked {\n abstract [TypeProperty]?: string\n get bytes(): bytes {\n throw new NoImplementation()\n }\n}\n\nexport class Str extends ARC4Encoded {\n [TypeProperty]?: 'arc4.Str'\n #value: string\n constructor(s?: StringCompat) {\n super()\n this.#value = s ?? ''\n }\n get native(): string {\n return this.#value\n }\n}\nexport class UintN<N extends BitSize> extends ARC4Encoded {\n [TypeProperty]?: `arc4.UintN<${N}>`\n\n constructor(v?: CompatForArc4Int<N>) {\n super()\n }\n get native(): NativeForArc4Int<N> {\n throw new NoImplementation()\n }\n}\nexport class Byte extends UintN<8> {}\nexport class UintN8 extends UintN<8> {}\nexport class UintN16 extends UintN<16> {}\nexport class UintN32 extends UintN<32> {}\nexport class UintN64 extends UintN<64> {}\nexport class UintN128 extends UintN<128> {}\nexport class UintN256 extends UintN<256> {}\nexport class UFixedNxM<N extends BitSize, M extends number> extends ARC4Encoded {\n [TypeProperty]?: `arc4.UFixedNxM<${N}x${M}>`\n constructor(v: `${number}.${number}`) {\n super()\n }\n\n get native(): NativeForArc4Int<N> {\n throw new NoImplementation()\n }\n}\nexport class Bool extends ARC4Encoded {\n [TypeProperty]?: `arc4.Bool`\n\n constructor(v?: boolean) {\n super()\n }\n\n get native(): boolean {\n throw new NoImplementation()\n }\n}\n\nabstract class Arc4ReadonlyArray<TItem extends ARC4Encoded> extends ARC4Encoded {\n protected constructor() {\n super()\n }\n\n /**\n * Returns the current length of this array\n */\n get length(): uint64 {\n throw new NoImplementation()\n }\n\n /**\n * Returns the item at the given index.\n * Negative indexes are taken from the end.\n * @param index The index of the item to retrieve\n */\n at(index: Uint64Compat): TItem {\n throw new NoImplementation()\n }\n\n /** @internal\n * Create a new Dynamic array with all items from this array\n */\n slice(): DynamicArray<TItem>\n /** @internal\n * Create a new DynamicArray with all items up till `end`.\n * Negative indexes are taken from the end.\n * @param end An index in which to stop copying items.\n */\n slice(end: Uint64Compat): DynamicArray<TItem>\n /** @internal\n * Create a new DynamicArray with items from `start`, up until `end`\n * Negative indexes are taken from the end.\n * @param start An index in which to start copying items.\n * @param end An index in which to stop copying items\n */\n slice(start: Uint64Compat, end: Uint64Compat): DynamicArray<TItem>\n slice(start?: Uint64Compat, end?: Uint64Compat): DynamicArray<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the items in this array\n */\n [Symbol.iterator](): IterableIterator<TItem> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for a tuple of the indexes and items in this array\n */\n entries(): IterableIterator<readonly [uint64, TItem]> {\n throw new NoImplementation()\n }\n\n /**\n * Returns an iterator for the indexes in this array\n */\n keys(): IterableIterator<uint64> {\n throw new NoImplementation()\n }\n\n /**\n * Get or set the item at the specified index.\n * Negative indexes are not supported\n */\n [index: uint64]: TItem\n}\n\nexport class StaticArray<TItem extends ARC4Encoded, TLength extends number> extends Arc4ReadonlyArray<TItem> {\n [TypeProperty]?: `arc4.StaticArray<${TItem[typeof TypeProperty]}, ${TLength}>`\n constructor()\n constructor(...items: TItem[] & { length: TLength })\n constructor(...items: TItem[])\n constructor(...items: TItem[] & { length: TLength }) {\n super()\n }\n\n copy(): StaticArray<TItem, TLength> {\n throw new NoImplementation()\n }\n}\nexport class DynamicArray<TItem extends ARC4Encoded> extends Arc4ReadonlyArray<TItem> {\n [TypeProperty]?: `arc4.DynamicArray<${TItem[typeof TypeProperty]}>`\n constructor(...items: TItem[]) {\n super()\n }\n\n /**\n * Push a number of items into this array\n * @param items The items to be added to this array\n */\n push(...items: TItem[]): void {\n throw new NoImplementation()\n }\n\n /**\n * Pop a single item from this array\n */\n pop(): TItem {\n throw new NoImplementation()\n }\n\n copy(): DynamicArray<TItem> {\n throw new NoImplementation()\n }\n}\ntype ExpandTupleType<T extends ARC4Encoded[]> = T extends [infer T1 extends ARC4Encoded, ...infer TRest extends ARC4Encoded[]]\n ? TRest extends []\n ? `${T1[typeof TypeProperty]}`\n : `${T1[typeof TypeProperty]},${ExpandTupleType<TRest>}`\n : ''\n\nexport class Tuple<TTuple extends [ARC4Encoded, ...ARC4Encoded[]]> extends ARC4Encoded {\n [TypeProperty]?: `arc4.Tuple<${ExpandTupleType<TTuple>}>`\n constructor(...items: TTuple) {\n super()\n }\n\n at<TIndex extends keyof TTuple>(index: TIndex): TTuple[TIndex] {\n throw new NoImplementation()\n }\n\n get length(): TTuple['length'] & uint64 {\n throw new NoImplementation()\n }\n\n get native(): TTuple {\n throw new NoImplementation()\n }\n}\n\nexport class Address extends Arc4ReadonlyArray<Byte> {\n [TypeProperty]?: `arc4.Address`\n constructor(value?: Account | string | bytes) {\n super()\n }\n\n get native(): Account {\n throw new NoImplementation()\n }\n}\n\ntype StructConstraint = Record<string, ARC4Encoded>\n\nclass StructBase extends ARC4Encoded {\n [TypeProperty] = 'arc4.Struct'\n}\nclass StructImpl<T extends StructConstraint> extends StructBase {\n constructor(initial: T) {\n super()\n for (const [prop, val] of Object.entries(initial)) {\n Object.defineProperty(this, prop, {\n value: val,\n writable: true,\n enumerable: true,\n })\n }\n }\n}\n\ntype StructConstructor = new <T extends StructConstraint>(initial: T) => StructBase & T\n\nexport const Struct = StructImpl as StructConstructor\n\nexport class DynamicBytes extends Arc4ReadonlyArray<Byte> {\n [TypeProperty]?: `arc4.DynamicBytes`\n\n constructor(value?: bytes | string) {\n super()\n }\n\n get native(): bytes {\n throw new NoImplementation()\n }\n}\n\nexport class StaticBytes<TLength extends number = 0> extends Arc4ReadonlyArray<Byte> {\n [TypeProperty]?: `arc4.StaticBytes<${TLength}>`\n\n constructor(value?: bytes | string) {\n super()\n }\n\n get native(): bytes {\n throw new NoImplementation()\n }\n}\n\n/**\n * Interpret the provided bytes as an ARC4 encoded type with no validation\n * @param bytes An arc4 encoded bytes value\n * @param prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed\n */\nexport function interpretAsArc4<T extends ARC4Encoded>(bytes: BytesCompat, prefix: 'none' | 'log' = 'none'): T {\n throw new NoImplementation()\n}\n\n/**\n * Decode the provided bytes to a native Algorand TypeScript value\n * @param bytes An arc4 encoded bytes value\n * @param prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed\n */\nexport function decodeArc4<T>(bytes: BytesCompat, prefix: 'none' | 'log' = 'none'): T {\n throw new NoImplementation()\n}\n\n/**\n * Encode the provided Algorand TypeScript value as ARC4 bytes\n * @param value Any native Algorand TypeScript value with a supported ARC4 encoding\n */\nexport function encodeArc4<T>(value: T): bytes {\n throw new NoImplementation()\n}\n","import { BaseContract } from '../base-contract'\nimport { ctxMgr } from '../execution-context'\nimport { encodingUtil } from '../internal'\nimport { sha512_256 } from '../op'\nimport { Bytes, bytes, Uint64 } from '../primitives'\nimport { DeliberateAny } from '../typescript-helpers'\n\nexport * from './encoded-types'\n\nexport class Contract extends BaseContract {\n static isArc4 = true\n\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\n/**\n * Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first\n * 4 bytes of the SHA512/256 hash of the method signature.\n * @param methodSignature An ARC4 method signature. Eg. `hello(string)string`. Must be a compile time constant.\n * @returns The ARC4 method selector. Eg. `02BECE11`\n */\nexport function methodSelector(methodSignature: string): bytes {\n return sha512_256(Bytes(encodingUtil.utf8ToUint8Array(methodSignature))).slice(0, 4)\n}\n"],"names":["encodingUtil.utf8ToUint8Array"],"mappings":";;;;AAAA;;;AAGG;AACG,MAAO,QAAS,SAAQ,KAAK,CAAA;AACj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AAA;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;AAC5E,SAAC,CAAC;AACF,QAAA,OAAO,MAAM;AACf,KAAC;AACH;AAEA;;;;;AAKG;AACG,SAAU,cAAc,CAAC,eAAuB,EAAA;AACpD,IAAA,OAAO,UAAU,CAAC,KAAK,CAACA,gBAA6B,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;AACtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/index.d.ts CHANGED
@@ -14,7 +14,7 @@ export * as gtxn from './gtxn';
14
14
  export { TransactionType } from './transactions';
15
15
  export { LogicSig, logicsig } from './logic-sig';
16
16
  export { TemplateVar } from './template-var';
17
- export { Base64, Ec, Ecdsa, VrfVerify } from './op-types';
17
+ export { Base64, Ec, Ecdsa, MimcConfigurations, VrfVerify } from './op-types';
18
18
  export { compile, CompiledContract, CompiledLogicSig, CompileContractOptions, CompileLogicSigOptions } from './compiled';
19
19
  export { MutableArray } from './mutable-array';
20
20
  export { emit } from './arc-28';
package/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { C as ContractOptionsSymbol, e as encodingUtil, a as errors, p as primitives, A as AssertError, b as AvmError, c as AlgoTsPrimitiveCls, d as ARC4Encoded, i as internalError, n as nameOfType, U as Uint64Cls, B as BigUintCls, f as BytesCls, N as NoImplementation } from './index-CLBMQ4-B.js';
2
- export { k as BaseContract, o as BigUint, q as Bytes, h as Contract, m as Uint64, j as abimethod, g as arc4, l as contract } from './index-CLBMQ4-B.js';
3
- import { c as ctxMgr } from './op-Mj11EGRt.js';
4
- export { G as Global, T as Txn, o as op } from './op-Mj11EGRt.js';
1
+ import { C as ContractOptionsSymbol, e as encodingUtil, a as errors, p as primitives, A as AssertError, b as AvmError, c as AlgoTsPrimitiveCls, d as ARC4Encoded, i as internalError, n as nameOfType, U as Uint64Cls, B as BigUintCls, f as BytesCls, N as NoImplementation } from './index-BbcZ73FR.js';
2
+ export { k as BaseContract, o as BigUint, q as Bytes, h as Contract, m as Uint64, j as abimethod, g as arc4, l as contract } from './index-BbcZ73FR.js';
3
+ import { c as ctxMgr } from './op-DWxTNVRm.js';
4
+ export { G as Global, T as Txn, o as op } from './op-DWxTNVRm.js';
5
5
  import 'node:buffer';
6
6
  import 'node:util';
7
7
 
@@ -22,6 +22,11 @@ var Ecdsa;
22
22
  Ecdsa["Secp256k1"] = "Secp256k1";
23
23
  Ecdsa["Secp256r1"] = "Secp256r1";
24
24
  })(Ecdsa || (Ecdsa = {}));
25
+ var MimcConfigurations;
26
+ (function (MimcConfigurations) {
27
+ MimcConfigurations["BN254Mp110"] = "BN254Mp110";
28
+ MimcConfigurations["BLS12_381Mp111"] = "BLS12_381Mp111";
29
+ })(MimcConfigurations || (MimcConfigurations = {}));
25
30
  var VrfVerify;
26
31
  (function (VrfVerify) {
27
32
  VrfVerify["VrfAlgorand"] = "VrfAlgorand";
@@ -32,6 +37,7 @@ var opTypes = /*#__PURE__*/Object.freeze({
32
37
  get Base64 () { return Base64; },
33
38
  get Ec () { return Ec; },
34
39
  get Ecdsa () { return Ecdsa; },
40
+ get MimcConfigurations () { return MimcConfigurations; },
35
41
  get VrfVerify () { return VrfVerify; }
36
42
  });
37
43
 
@@ -294,5 +300,5 @@ function emit(event, ...eventProps) {
294
300
  throw new NoImplementation();
295
301
  }
296
302
 
297
- export { Account, Application, Asset, Base64, Box, BoxMap, BoxRef, Ec, Ecdsa, GlobalState, LocalState, LogicSig, MutableArray, OpUpFeeSource, TemplateVar, TransactionType, VrfVerify, assert, assertMatch, compile, emit, ensureBudget, err, gtxn, internal, itxn, log, logicsig, match, urange };
303
+ export { Account, Application, Asset, Base64, Box, BoxMap, BoxRef, Ec, Ecdsa, GlobalState, LocalState, LogicSig, MimcConfigurations, MutableArray, OpUpFeeSource, TemplateVar, TransactionType, VrfVerify, assert, assertMatch, compile, emit, ensureBudget, err, gtxn, internal, itxn, log, logicsig, match, urange };
298
304
  //# sourceMappingURL=index.mjs.map