@algorandfoundation/algorand-typescript-testing 1.1.1-beta.2 → 1.1.1-beta.3

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.
@@ -1,9 +1,9 @@
1
1
  import * as arc4$1 from '@algorandfoundation/algorand-typescript/arc4';
2
2
  import { OnCompleteAction } from '@algorandfoundation/algorand-typescript';
3
- import { b as getContractMethod, g as getContractMethodAbiMetadata, C as Contract, c as abimethod, d as baremethod, r as readonly } from './runtime-helpers-Dpv9_KsV.js';
4
- import { v as lazyContext, a0 as sizeOf } from './utils-DyUEnpf6.js';
5
- import { A as ApplicationCallInnerTxnContext, m as methodSelector } from './inner-transactions-pcawvv6H.js';
6
- import { A as Address, B as Bool, c as Byte, d as DynamicArray, D as DynamicBytes, F as FixedArray, R as ReferenceArray, e as StaticArray, f as StaticBytes, S as Str, h as Struct, T as Tuple, i as UFixed, U as Uint, j as convertBytes, k as decodeArc4, l as encodeArc4 } from './asset-params-DV6t5Cy8.js';
3
+ import { b as getContractMethod, g as getContractMethodAbiMetadata, C as Contract, c as abimethod, d as baremethod, r as readonly } from './runtime-helpers-qYkqK3cG.js';
4
+ import { w as lazyContext, a0 as sizeOf } from './utils-DbNSGKS_.js';
5
+ import { A as ApplicationCallInnerTxnContext, m as methodSelector } from './inner-transactions-BNbmDFGO.js';
6
+ import { A as Address, B as Bool, c as Byte, d as DynamicArray, D as DynamicBytes, F as FixedArray, R as ReferenceArray, e as StaticArray, f as StaticBytes, S as Str, h as Struct, T as Tuple, i as UFixed, U as Uint, j as convertBytes, k as decodeArc4, l as encodeArc4 } from './asset-params-C64LPAdX.js';
7
7
 
8
8
  function _mergeNamespaces(n, m) {
9
9
  m.forEach(function (e) {
@@ -135,4 +135,4 @@ var arc4 = /*#__PURE__*/_mergeNamespaces({
135
135
  }, [arc4$1]);
136
136
 
137
137
  export { arc4 as a, abiCall as b, compileArc4 as c, getApplicationCallInnerTxnContext as g };
138
- //# sourceMappingURL=arc4-BazlZFRK.js.map
138
+ //# sourceMappingURL=arc4-BR_XYyu6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"arc4-BazlZFRK.js","sources":["../src/impl/c2c.ts","../src/internal/arc4.ts"],"sourcesContent":["import { type CompileContractOptions, type Contract, OnCompleteAction } from '@algorandfoundation/algorand-typescript'\nimport type {\n BareCreateApplicationCallFields,\n ContractProxy,\n TypedApplicationCallFields,\n} from '@algorandfoundation/algorand-typescript/arc4'\nimport { getContractMethod, getContractMethodAbiMetadata } from '../abi-metadata'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport type { ConstructorFor, DeliberateAny, InstanceMethod } from '../typescript-helpers'\nimport type { ApplicationCallInnerTxn } from './inner-transactions'\nimport { ApplicationCallInnerTxnContext } from './inner-transactions'\nimport { methodSelector } from './method-selector'\nimport type { ApplicationData } from './reference'\n\n/** @internal */\nexport function compileArc4<TContract extends Contract>(\n contract: ConstructorFor<TContract>,\n options?: CompileContractOptions,\n): ContractProxy<TContract> {\n let app: ApplicationData | undefined\n const compiledAppEntry = lazyContext.value.getCompiledAppEntry(contract)\n if (compiledAppEntry !== undefined) {\n app = lazyContext.ledger.applicationDataMap.get(compiledAppEntry.value)\n }\n\n if (options?.templateVars) {\n Object.entries(options.templateVars).forEach(([key, value]) => {\n lazyContext.value.setTemplateVar(key, value, options.templateVarsPrefix)\n })\n }\n\n return {\n call: new Proxy({} as unknown as TContract, {\n get: (_target, prop) => {\n return (methodArgs: TypedApplicationCallFields<DeliberateAny[]>) => {\n const selector = methodSelector({ method: prop as string, contract })\n const abiMetadata = getContractMethodAbiMetadata(contract, prop as string)\n const onCompleteActions = abiMetadata?.allowActions?.map((action) => OnCompleteAction[action])\n const itxnContext = ApplicationCallInnerTxnContext.createFromTypedApplicationCallFields(\n {\n ...getCommonApplicationCallFields(app, options),\n onCompletion: onCompleteActions?.[0],\n ...methodArgs,\n },\n selector,\n abiMetadata?.resourceEncoding,\n )\n invokeAbiCall(itxnContext)\n return {\n itxn: itxnContext,\n returnValue: itxnContext.loggedReturnValue,\n }\n }\n },\n }),\n\n bareCreate: (methodArgs?: BareCreateApplicationCallFields) => {\n const itxnContext = ApplicationCallInnerTxnContext.createFromBareCreateApplicationCallFields({\n ...getCommonApplicationCallFields(app, options),\n ...methodArgs,\n })\n invokeAbiCall(itxnContext)\n return itxnContext\n },\n approvalProgram: app?.application.approvalProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n clearStateProgram: app?.application.clearStateProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n extraProgramPages: options?.extraProgramPages ?? app?.application.extraProgramPages ?? lazyContext.any.uint64(),\n globalUints: options?.globalUints ?? app?.application.globalNumUint ?? lazyContext.any.uint64(),\n globalBytes: options?.globalBytes ?? app?.application.globalNumBytes ?? lazyContext.any.uint64(),\n localUints: options?.localUints ?? app?.application.localNumUint ?? lazyContext.any.uint64(),\n localBytes: options?.localBytes ?? app?.application.localNumBytes ?? lazyContext.any.uint64(),\n } as unknown as ContractProxy<TContract>\n}\n\n/** @internal */\nexport const invokeAbiCall = (itxnContext: ApplicationCallInnerTxnContext) => {\n lazyContext.value.notifyApplicationSpies(itxnContext)\n lazyContext.txn.activeGroup.addInnerTransactionGroup(...(itxnContext.itxns ?? []), itxnContext)\n}\nconst getCommonApplicationCallFields = (app: ApplicationData | undefined, options: CompileContractOptions | undefined) => ({\n approvalProgram: app?.application.approvalProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n clearStateProgram: app?.application.clearStateProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n extraProgramPages: options?.extraProgramPages ?? app?.application.extraProgramPages ?? lazyContext.any.uint64(),\n globalNumUint: options?.globalUints ?? app?.application.globalNumUint ?? lazyContext.any.uint64(),\n globalNumBytes: options?.globalBytes ?? app?.application.globalNumBytes ?? lazyContext.any.uint64(),\n localNumUint: options?.localUints ?? app?.application.localNumUint ?? lazyContext.any.uint64(),\n localNumBytes: options?.localBytes ?? app?.application.localNumBytes ?? lazyContext.any.uint64(),\n})\n\n/** @internal */\nexport function getApplicationCallInnerTxnContext<TArgs extends DeliberateAny[], TReturn = void>(\n method: InstanceMethod<Contract, TArgs, TReturn>,\n methodArgs: TypedApplicationCallFields<TArgs>,\n contract?: Contract | { new (): Contract },\n) {\n const abiMetadata = contract ? getContractMethodAbiMetadata(contract, method.name) : undefined\n const selector = methodSelector({ method, contract })\n return ApplicationCallInnerTxnContext.createFromTypedApplicationCallFields<TReturn>(\n {\n ...methodArgs,\n onCompletion: methodArgs.onCompletion ?? abiMetadata?.allowActions?.map((action) => OnCompleteAction[action])[0],\n },\n selector,\n abiMetadata?.resourceEncoding,\n )\n}\n/** @internal */\nexport function abiCall<TArgs extends DeliberateAny[], TReturn>(\n contractFullName: string,\n method: string,\n methodArgs: TypedApplicationCallFields<TArgs>,\n): { itxn: ApplicationCallInnerTxn; returnValue: TReturn | undefined } {\n const { method: methodInstance, contract: contractInstance } = getContractMethod(contractFullName, method)\n\n const itxnContext = getApplicationCallInnerTxnContext<TArgs, TReturn>(methodInstance, methodArgs, contractInstance)\n\n invokeAbiCall(itxnContext)\n\n return {\n itxn: itxnContext,\n returnValue: itxnContext.loggedReturnValue,\n }\n}\n","/** @internal */\nexport * from '@algorandfoundation/algorand-typescript/arc4'\n/** @internal */\nexport { abiCall, compileArc4 } from '../impl/c2c'\n/** @internal */\nexport { abimethod, baremethod, Contract, readonly } from '../impl/contract'\n/** @internal */\nexport {\n Address,\n Bool,\n Byte,\n convertBytes,\n decodeArc4,\n DynamicArray,\n DynamicBytes,\n encodeArc4,\n FixedArray,\n ReferenceArray,\n sizeOf,\n StaticArray,\n StaticBytes,\n Str,\n Struct,\n Tuple,\n UFixed,\n Uint,\n} from '../impl/encoded-types'\n/** @internal */\nexport { methodSelector } from '../impl/method-selector'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAcA;AACM,SAAU,WAAW,CACzB,QAAmC,EACnC,OAA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["../src/impl/c2c.ts","../src/internal/arc4.ts"],"sourcesContent":["import { type CompileContractOptions, type Contract, OnCompleteAction } from '@algorandfoundation/algorand-typescript'\nimport type {\n BareCreateApplicationCallFields,\n ContractProxy,\n TypedApplicationCallFields,\n} from '@algorandfoundation/algorand-typescript/arc4'\nimport { getContractMethod, getContractMethodAbiMetadata } from '../abi-metadata'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport type { ConstructorFor, DeliberateAny, InstanceMethod } from '../typescript-helpers'\nimport type { ApplicationCallInnerTxn } from './inner-transactions'\nimport { ApplicationCallInnerTxnContext } from './inner-transactions'\nimport { methodSelector } from './method-selector'\nimport type { ApplicationData } from './reference'\n\n/** @internal */\nexport function compileArc4<TContract extends Contract>(\n contract: ConstructorFor<TContract>,\n options?: CompileContractOptions,\n): ContractProxy<TContract> {\n let app: ApplicationData | undefined\n const compiledAppEntry = lazyContext.value.getCompiledAppEntry(contract)\n if (compiledAppEntry !== undefined) {\n app = lazyContext.ledger.applicationDataMap.get(compiledAppEntry.value)\n }\n\n if (options?.templateVars) {\n Object.entries(options.templateVars).forEach(([key, value]) => {\n lazyContext.value.setTemplateVar(key, value, options.templateVarsPrefix)\n })\n }\n\n return {\n call: new Proxy({} as unknown as TContract, {\n get: (_target, prop) => {\n return (methodArgs: TypedApplicationCallFields<DeliberateAny[]>) => {\n const selector = methodSelector({ method: prop as string, contract })\n const abiMetadata = getContractMethodAbiMetadata(contract, prop as string)\n const onCompleteActions = abiMetadata?.allowActions?.map((action) => OnCompleteAction[action])\n const itxnContext = ApplicationCallInnerTxnContext.createFromTypedApplicationCallFields(\n {\n ...getCommonApplicationCallFields(app, options),\n onCompletion: onCompleteActions?.[0],\n ...methodArgs,\n },\n selector,\n abiMetadata?.resourceEncoding,\n )\n invokeAbiCall(itxnContext)\n return {\n itxn: itxnContext,\n returnValue: itxnContext.loggedReturnValue,\n }\n }\n },\n }),\n\n bareCreate: (methodArgs?: BareCreateApplicationCallFields) => {\n const itxnContext = ApplicationCallInnerTxnContext.createFromBareCreateApplicationCallFields({\n ...getCommonApplicationCallFields(app, options),\n ...methodArgs,\n })\n invokeAbiCall(itxnContext)\n return itxnContext\n },\n approvalProgram: app?.application.approvalProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n clearStateProgram: app?.application.clearStateProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n extraProgramPages: options?.extraProgramPages ?? app?.application.extraProgramPages ?? lazyContext.any.uint64(),\n globalUints: options?.globalUints ?? app?.application.globalNumUint ?? lazyContext.any.uint64(),\n globalBytes: options?.globalBytes ?? app?.application.globalNumBytes ?? lazyContext.any.uint64(),\n localUints: options?.localUints ?? app?.application.localNumUint ?? lazyContext.any.uint64(),\n localBytes: options?.localBytes ?? app?.application.localNumBytes ?? lazyContext.any.uint64(),\n } as unknown as ContractProxy<TContract>\n}\n\n/** @internal */\nexport const invokeAbiCall = (itxnContext: ApplicationCallInnerTxnContext) => {\n lazyContext.value.notifyApplicationSpies(itxnContext)\n lazyContext.txn.activeGroup.addInnerTransactionGroup(...(itxnContext.itxns ?? []), itxnContext)\n}\nconst getCommonApplicationCallFields = (app: ApplicationData | undefined, options: CompileContractOptions | undefined) => ({\n approvalProgram: app?.application.approvalProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n clearStateProgram: app?.application.clearStateProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n extraProgramPages: options?.extraProgramPages ?? app?.application.extraProgramPages ?? lazyContext.any.uint64(),\n globalNumUint: options?.globalUints ?? app?.application.globalNumUint ?? lazyContext.any.uint64(),\n globalNumBytes: options?.globalBytes ?? app?.application.globalNumBytes ?? lazyContext.any.uint64(),\n localNumUint: options?.localUints ?? app?.application.localNumUint ?? lazyContext.any.uint64(),\n localNumBytes: options?.localBytes ?? app?.application.localNumBytes ?? lazyContext.any.uint64(),\n})\n\n/** @internal */\nexport function getApplicationCallInnerTxnContext<TArgs extends DeliberateAny[], TReturn = void>(\n method: InstanceMethod<Contract, TArgs, TReturn>,\n methodArgs: TypedApplicationCallFields<TArgs>,\n contract?: Contract | { new (): Contract },\n) {\n const abiMetadata = contract ? getContractMethodAbiMetadata(contract, method.name) : undefined\n const selector = methodSelector({ method, contract })\n return ApplicationCallInnerTxnContext.createFromTypedApplicationCallFields<TReturn>(\n {\n ...methodArgs,\n onCompletion: methodArgs.onCompletion ?? abiMetadata?.allowActions?.map((action) => OnCompleteAction[action])[0],\n },\n selector,\n abiMetadata?.resourceEncoding,\n )\n}\n/** @internal */\nexport function abiCall<TArgs extends DeliberateAny[], TReturn>(\n contractFullName: string,\n method: string,\n methodArgs: TypedApplicationCallFields<TArgs>,\n): { itxn: ApplicationCallInnerTxn; returnValue: TReturn | undefined } {\n const { method: methodInstance, contract: contractInstance } = getContractMethod(contractFullName, method)\n\n const itxnContext = getApplicationCallInnerTxnContext<TArgs, TReturn>(methodInstance, methodArgs, contractInstance)\n\n invokeAbiCall(itxnContext)\n\n return {\n itxn: itxnContext,\n returnValue: itxnContext.loggedReturnValue,\n }\n}\n","/** @internal */\nexport * from '@algorandfoundation/algorand-typescript/arc4'\n/** @internal */\nexport { abiCall, compileArc4 } from '../impl/c2c'\n/** @internal */\nexport { abimethod, baremethod, Contract, readonly } from '../impl/contract'\n/** @internal */\nexport {\n Address,\n Bool,\n Byte,\n convertBytes,\n decodeArc4,\n DynamicArray,\n DynamicBytes,\n encodeArc4,\n FixedArray,\n ReferenceArray,\n sizeOf,\n StaticArray,\n StaticBytes,\n Str,\n Struct,\n Tuple,\n UFixed,\n Uint,\n} from '../impl/encoded-types'\n/** @internal */\nexport { methodSelector } from '../impl/method-selector'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAcA;AACM,SAAU,WAAW,CACzB,QAAmC,EACnC,OAAgC,EAAA;AAEhC,IAAA,IAAI,GAAgC;IACpC,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAC,mBAAmB,CAAC,QAAQ,CA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EAAE,OAAO,EAAE,UAAU,IAAI,GAAG,EAAE,WAAW,CAAC,aAAa,IAAI,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE;AACjG,CAAA,CAAC;AAEF;SACgB,iCAAiC,CAC/C,MAAgD,EAChD,UAA6C,EAC7C,QAA0C,EAAA;AAE1C,IAAA,MAAM,WAAW,GAAG,QAAQ,GAAG,4BAA4B,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS;IAC9F,MAAM,QAAQ,GAAG,cAAc,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACrD,OAAO,8BAA8B,CAAC,oCAAoC,CACxE;AACE,QAAA,GAAG,UAAU;QACb,YAAY,EAAE,UAAU,CAAC,YAAY,IAAI,WAAW,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC,MAAM,KAAK,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACjH,KAAA,EACD,QAAQ,EACR,WAAW,EAAE,gBAAgB,CAC9B;AACH;AACA;SACgB,OAAO,CACrB,gBAAwB,EACxB,MAAc,EACd,UAA6C,EAAA;AAE7C,IAAA,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAE1G,MAAM,WAAW,GAAG,iCAAiC,CAAiB,cAAc,EAAE,UAAU,EAAE,gBAAgB,CAAC;IAEnH,aAAa,CAAC,WAAW,CAAC;IAE1B,OAAO;AACL,QAAA,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,WAAW,CAAC,iBAAiB;KAC3C;AACH;;AC1HA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import { FixedArray as FixedArray$1, ReferenceArray as ReferenceArray$1, Ecdsa,
2
2
  import { Address as Address$1, Bool as Bool$1, Byte as Byte$1, DynamicArray as DynamicArray$1, DynamicBytes as DynamicBytes$1, StaticArray as StaticArray$1, StaticBytes as StaticBytes$1, Str as Str$1, Struct as Struct$1, Tuple as Tuple$1, UFixed as UFixed$1, Uint as Uint$1, ARC4Encoded } from '@algorandfoundation/algorand-typescript/arc4';
3
3
  import { encodingUtil } from '@algorandfoundation/puya-ts';
4
4
  import assert from 'assert';
5
- import { at as arrayUtil, au as ALGORAND_ADDRESS_BYTE_LENGTH, av as ALGORAND_CHECKSUM_BYTE_LENGTH, aw as isBytes, ax as getUint8Array, E as Account, ay as TRUE_BIGINT_VALUE, az as FALSE_BIGINT_VALUE, D as Bytes, a5 as asBytesCls, u as ABI_RETURN_VALUE_LOG_PREFIX, s as asUint8Array, aA as areAllARC4Encoded, aB as checkItemTypeName, aC as readLength, a6 as concatUint8Arrays, aD as encodeLength, aE as ABI_LENGTH_SIZE, f as asBytes, aF as getMaxLengthOfStaticContentType, a as asNumber, aG as IS_INITIALISING_FROM_BYTES_SYMBOL, aH as trimTrailingDecimalZeros, aI as regExpNxM, aJ as maxBigIntValue, aK as maxBytesLength, as as UINT64_SIZE, h as asUint64, ap as asBigUint, aL as validBitSizes, y as asBigUintCls, M as MAX_UINT64, aM as getNativeValue, aN as holdsDynamicLengthContent, aO as uint8ArrayToNumber, aP as compressMultipleBool, aQ as transactionTypeFromBytes, aR as onCompletionFromBytes, aS as uint64FromBytes, aT as stringFromBytes, aU as bytesFromBytes, aV as bigUintFromBytes, aW as booleanFromBytes, G as AssetCls, t as ApplicationCls, A as AccountCls, U as Uint64Cls, q as asBigInt, B as BigUintCls, b as BytesCls, k as asMaybeUint64Cls, r as asMaybeBytesCls, Z as asMaybeBigUintCls, X as BytesBackedCls, Y as Uint64BackedCls, l as asUint64Cls, aX as findBoolTypes, aY as findBool, aZ as LOGIC_DATA_PREFIX, v as lazyContext, a_ as PROGRAM_TAG, w as Uint64 } from './utils-DyUEnpf6.js';
5
+ import { at as arrayUtil, au as ALGORAND_ADDRESS_BYTE_LENGTH, av as ALGORAND_CHECKSUM_BYTE_LENGTH, aw as isBytes, ax as getUint8Array, F as Account, ay as TRUE_BIGINT_VALUE, az as FALSE_BIGINT_VALUE, E as Bytes, a5 as asBytesCls, v as ABI_RETURN_VALUE_LOG_PREFIX, u as asUint8Array, aA as areAllARC4Encoded, aB as checkItemTypeName, aC as readLength, a6 as concatUint8Arrays, aD as encodeLength, aE as ABI_LENGTH_SIZE, h as asBytes, aF as getMaxLengthOfStaticContentType, a as asNumber, aG as IS_INITIALISING_FROM_BYTES_SYMBOL, aH as trimTrailingDecimalZeros, aI as regExpNxM, aJ as maxBigIntValue, aK as maxBytesLength, as as UINT64_SIZE, k as asUint64, ap as asBigUint, aL as validBitSizes, z as asBigUintCls, M as MAX_UINT64, aM as getNativeValue, aN as holdsDynamicLengthContent, aO as uint8ArrayToNumber, aP as compressMultipleBool, aQ as transactionTypeFromBytes, aR as onCompletionFromBytes, aS as uint64FromBytes, aT as stringFromBytes, aU as bytesFromBytes, aV as bigUintFromBytes, aW as booleanFromBytes, A as AccountCls, d as AssetCls, c as ApplicationCls, U as Uint64Cls, s as asBigInt, B as BigUintCls, b as BytesCls, m as asMaybeUint64Cls, t as asMaybeBytesCls, Z as asMaybeBigUintCls, X as BytesBackedCls, Y as Uint64BackedCls, n as asUint64Cls, aX as findBoolTypes, aY as findBool, aZ as LOGIC_DATA_PREFIX, w as lazyContext, a_ as PROGRAM_TAG, x as Uint64 } from './utils-DbNSGKS_.js';
6
6
  import { a as AvmError, b as avmInvariant, C as CodeError, I as InternalError, n as nameOfType, N as NotImplementedError } from './typescript-helpers-sobuICoc.js';
7
7
  import elliptic from 'elliptic';
8
8
  import js_sha256 from 'js-sha256';
@@ -62,6 +62,7 @@ class Uint extends Uint$1 {
62
62
  const maxValue = maxBigIntValue(this.bitSize);
63
63
  assert(bigIntValue <= maxValue, `expected value <= ${maxValue}, got: ${bigIntValue}`);
64
64
  this._value = encodingUtil.bigIntToUint8Array(bigIntValue, maxBytesLength(this.bitSize));
65
+ setARC4TypeSymbol(this, `arc4.Uint<${this.bitSize}>`);
65
66
  }
66
67
  get native() {
67
68
  const bigIntValue = encodingUtil.uint8ArrayToBigInt(this._value);
@@ -122,6 +123,7 @@ class UFixed extends UFixed$1 {
122
123
  const maxValue = maxBigIntValue(this.bitSize);
123
124
  assert(bigIntValue <= maxValue, `expected value <= ${maxValue}, got: ${bigIntValue}`);
124
125
  this._value = encodingUtil.bigIntToUint8Array(bigIntValue, maxBytesLength(this.bitSize));
126
+ setARC4TypeSymbol(this, `arc4.UFixed<${this.bitSize}, ${this.precision}>`);
125
127
  }
126
128
  get native() {
127
129
  const bigIntValue = encodingUtil.uint8ArrayToBigInt(this._value);
@@ -162,6 +164,7 @@ class Byte extends Byte$1 {
162
164
  super(v);
163
165
  this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo;
164
166
  this._value = new Uint(typeInfo, v);
167
+ setARC4TypeSymbol(this, `arc4.Uint<8>`);
165
168
  }
166
169
  asUint64() {
167
170
  return this._value.asUint64();
@@ -201,6 +204,7 @@ class Str extends Str$1 {
201
204
  const bytesLength = encodeLength(bytesValue.length.asNumber());
202
205
  this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo;
203
206
  this._value = asUint8Array(bytesLength.concat(bytesValue));
207
+ setARC4TypeSymbol(this, `arc4.Str`);
204
208
  }
205
209
  get native() {
206
210
  return encodingUtil.uint8ArrayToUtf8(this._value.slice(ABI_LENGTH_SIZE));
@@ -236,6 +240,7 @@ class Bool extends Bool$1 {
236
240
  super(v);
237
241
  this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo;
238
242
  this._value = encodingUtil.bigIntToUint8Array(v ? TRUE_BIGINT_VALUE : FALSE_BIGINT_VALUE, 1);
243
+ setARC4TypeSymbol(this, `arc4.Bool`);
239
244
  }
240
245
  get native() {
241
246
  return encodingUtil.uint8ArrayToBigInt(this._value) === TRUE_BIGINT_VALUE;
@@ -278,6 +283,7 @@ class StaticArray extends StaticArray$1 {
278
283
  this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo;
279
284
  this.genericArgs = this.typeInfo.genericArgs;
280
285
  this.size = parseInt(this.genericArgs.size.name, 10);
286
+ setARC4TypeSymbol(this, `arc4.StaticArray<${this.genericArgs.elementType.name}, ${this.size}>`);
281
287
  // if we are not initialising from bytes, we need to check and set the items
282
288
  if (!isInitialisingFromBytes) {
283
289
  if (items.length && items.length !== this.size) {
@@ -377,6 +383,7 @@ class Address extends Address$1 {
377
383
  avmInvariant(uint8ArrayValue.length === 32, 'Addresses should be 32 bytes');
378
384
  this._value = StaticArray.fromBytes(uint8ArrayValue, typeInfo);
379
385
  this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo;
386
+ setARC4TypeSymbol(this, `arc4.Address`);
380
387
  return new Proxy(this, arrayProxyHandler());
381
388
  }
382
389
  get uint8ArrayValue() {
@@ -425,6 +432,7 @@ class DynamicArray extends DynamicArray$1 {
425
432
  checkItemTypeName(this.genericArgs.elementType, item);
426
433
  });
427
434
  this._value = items;
435
+ setARC4TypeSymbol(this, `arc4.DynamicArray<${this.genericArgs.elementType.name}>`);
428
436
  return new Proxy(this, arrayProxyHandler());
429
437
  }
430
438
  get uint8ArrayValue() {
@@ -513,6 +521,7 @@ class Tuple extends Tuple$1 {
513
521
  super(...(isInitialisingFromBytes ? [] : items));
514
522
  this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo;
515
523
  this.genericArgs = Object.values(this.typeInfo.genericArgs);
524
+ setARC4TypeSymbol(this, `arc4.Tuple<${this.genericArgs.map((arg) => arg.name).join(', ')}>`);
516
525
  // if we are not initialising from bytes, we need to check and set the items
517
526
  if (!isInitialisingFromBytes) {
518
527
  assert(areAllARC4Encoded(items), 'expected ARC4 type');
@@ -587,6 +596,7 @@ class Struct extends Struct$1 {
587
596
  enumerable: true,
588
597
  });
589
598
  });
599
+ setARC4TypeSymbol(this, 'arc4.Struct');
590
600
  return new Proxy(this, {
591
601
  get(target, prop) {
592
602
  const originalValue = Reflect.get(target, prop);
@@ -652,6 +662,7 @@ class DynamicBytes extends DynamicBytes$1 {
652
662
  const uint8ArrayValue = concatUint8Arrays(encodeLength(value?.length ?? 0).asUint8Array(), asUint8Array(value ?? new Uint8Array()));
653
663
  this._value = DynamicArray.fromBytes(uint8ArrayValue, typeInfo);
654
664
  this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo;
665
+ setARC4TypeSymbol(this, `arc4.DynamicBytes`);
655
666
  return new Proxy(this, arrayProxyHandler());
656
667
  }
657
668
  get uint8ArrayValue() {
@@ -707,6 +718,7 @@ class StaticBytes extends StaticBytes$1 {
707
718
  this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo;
708
719
  const uint8ArrayValue = asUint8Array(value ?? new Uint8Array(getMaxLengthOfStaticContentType(this.typeInfo)));
709
720
  this._value = StaticArray.fromBytes(uint8ArrayValue, typeInfo);
721
+ setARC4TypeSymbol(this, `arc4.StaticBytes<${this._value.length}>`);
710
722
  return new Proxy(this, arrayProxyHandler());
711
723
  }
712
724
  get uint8ArrayValue() {
@@ -1146,9 +1158,9 @@ const getEncoder = (typeInfo) => {
1146
1158
  return new FixedArray(typeInfo, ...(asNumber(staticArray.uint8ArrayValue.length) ? staticArray.native : []));
1147
1159
  };
1148
1160
  const encoders = {
1149
- account: AccountCls.fromBytes,
1150
- application: ApplicationCls.fromBytes,
1151
- asset: AssetCls.fromBytes,
1161
+ account: (value) => AccountCls.fromBytes(value),
1162
+ application: (value) => ApplicationCls.fromBytes(value),
1163
+ asset: (value) => AssetCls.fromBytes(value),
1152
1164
  boolean: booleanFromBytes,
1153
1165
  biguint: bigUintFromBytes,
1154
1166
  'bytes(<.*>)?': bytesFromBytes,
@@ -1184,6 +1196,12 @@ const getEncoder = (typeInfo) => {
1184
1196
  }
1185
1197
  return encoder;
1186
1198
  };
1199
+ const setARC4TypeSymbol = (obj, value) => {
1200
+ const symbol = Object.getOwnPropertySymbols(obj).find((s) => s.description === 'ARC4Type');
1201
+ if (!symbol)
1202
+ return;
1203
+ obj[symbol] = value;
1204
+ };
1187
1205
 
1188
1206
  /** @internal */
1189
1207
  const sha256 = (a) => {
@@ -1431,4 +1449,4 @@ const AssetParams = {
1431
1449
  };
1432
1450
 
1433
1451
  export { Address as A, Bool as B, sha256 as C, DynamicBytes as D, EllipticCurve as E, FixedArray as F, sha3_256 as G, vrfVerify as H, ReferenceArray as R, Str as S, Tuple as T, Uint as U, toBytes as a, getArc4Encoded as b, Byte as c, DynamicArray as d, StaticArray as e, StaticBytes as f, getEncoder as g, Struct as h, UFixed as i, convertBytes as j, decodeArc4 as k, encodeArc4 as l, getApp as m, getAsset as n, AppParams as o, AssetParams as p, ecdsaPkDecompress as q, ecdsaPkRecover as r, sha512_256 as s, toUint8Array as t, ecdsaVerify as u, ed25519verify as v, ed25519verifyBare as w, falconVerify as x, keccak256 as y, mimc as z };
1434
- //# sourceMappingURL=asset-params-DV6t5Cy8.js.map
1452
+ //# sourceMappingURL=asset-params-C64LPAdX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset-params-C64LPAdX.js","sources":["../src/impl/encoded-types/array-proxy.ts","../src/impl/encoded-types/encoded-types.ts","../src/impl/crypto.ts","../src/impl/app-params.ts","../src/impl/asset-params.ts"],"sourcesContent":["import type { Uint64Compat } from '@algorandfoundation/algorand-typescript'\nimport { AvmError } from '../../errors'\nimport { arrayUtil } from '../primitives'\n\n/** @internal */\nexport const arrayProxyHandler = <TItem>() => ({\n get(target: { items: readonly TItem[] }, prop: PropertyKey) {\n const idx = prop ? parseInt(prop.toString(), 10) : NaN\n if (!isNaN(idx)) {\n if (idx >= 0 && idx < target.items.length) return target.items[idx]\n throw new AvmError('Index out of bounds')\n } else if (prop === Symbol.iterator) {\n return target.items[Symbol.iterator].bind(target.items)\n } else if (prop === 'entries') {\n return target.items.entries.bind(target.items)\n } else if (prop === 'keys') {\n return target.items.keys.bind(target.items)\n } else if (prop === 'at') {\n return (index: Uint64Compat): TItem => {\n return arrayUtil.arrayAt(target.items, index)\n }\n }\n return Reflect.get(target, prop)\n },\n set(target: { items: TItem[]; setItem: (index: number, value: TItem) => void }, prop: PropertyKey, value: TItem) {\n const idx = prop ? parseInt(prop.toString(), 10) : NaN\n if (!isNaN(idx)) {\n if (idx >= 0 && idx < target.items.length) {\n target.setItem(idx, value)\n return true\n }\n throw new AvmError('Index out of bounds')\n }\n\n return Reflect.set(target, prop, value)\n },\n})\n","import type { Account as AccountType, bytes, NTuple, StringCompat, uint64, Uint64Compat } from '@algorandfoundation/algorand-typescript'\nimport { FixedArray as _FixedArray, ReferenceArray as _ReferenceArray } from '@algorandfoundation/algorand-typescript'\nimport type { BitSize } from '@algorandfoundation/algorand-typescript/arc4'\nimport {\n Address as _Address,\n ARC4Encoded as _ARC4Encoded,\n Bool as _Bool,\n Byte as _Byte,\n DynamicArray as _DynamicArray,\n DynamicBytes as _DynamicBytes,\n StaticArray as _StaticArray,\n StaticBytes as _StaticBytes,\n Str as _Str,\n Struct as _Struct,\n Tuple as _Tuple,\n UFixed as _UFixed,\n Uint as _Uint,\n} from '@algorandfoundation/algorand-typescript/arc4'\nimport { encodingUtil } from '@algorandfoundation/puya-ts'\nimport assert from 'assert'\nimport {\n ABI_RETURN_VALUE_LOG_PREFIX,\n ALGORAND_ADDRESS_BYTE_LENGTH,\n ALGORAND_CHECKSUM_BYTE_LENGTH,\n MAX_UINT64,\n UINT64_SIZE,\n} from '../../constants'\nimport { AvmError, avmInvariant, CodeError, InternalError } from '../../errors'\nimport { nameOfType, type DeliberateAny } from '../../typescript-helpers'\nimport {\n asBigInt,\n asBigUint,\n asBigUintCls,\n asBytes,\n asBytesCls,\n asMaybeBigUintCls,\n asMaybeBytesCls,\n asMaybeUint64Cls,\n asNumber,\n asUint64,\n asUint64Cls,\n asUint8Array,\n concatUint8Arrays,\n uint8ArrayToNumber,\n} from '../../util'\nimport { BytesBackedCls, Uint64BackedCls } from '../base'\nimport type { StubBytesCompat } from '../primitives'\nimport { BigUintCls, Bytes, BytesCls, getUint8Array, isBytes, Uint64Cls } from '../primitives'\nimport { Account, AccountCls, ApplicationCls, AssetCls } from '../reference'\nimport { arrayProxyHandler } from './array-proxy'\nimport { ABI_LENGTH_SIZE, FALSE_BIGINT_VALUE, IS_INITIALISING_FROM_BYTES_SYMBOL, TRUE_BIGINT_VALUE } from './constants'\nimport {\n areAllARC4Encoded,\n bigUintFromBytes,\n booleanFromBytes,\n bytesFromBytes,\n checkItemTypeName,\n compressMultipleBool,\n encodeLength,\n findBool,\n findBoolTypes,\n getNativeValue,\n holdsDynamicLengthContent,\n maxBigIntValue,\n maxBytesLength,\n onCompletionFromBytes,\n readLength,\n regExpNxM,\n stringFromBytes,\n transactionTypeFromBytes,\n trimTrailingDecimalZeros,\n uint64FromBytes,\n validBitSizes,\n} from './helpers'\nimport type {\n CompatForArc4Int,\n DynamicArrayGenericArgs,\n fromBytes,\n StaticArrayGenericArgs,\n StructConstraint,\n TypeInfo,\n uFixedGenericArgs,\n} from './types'\nimport { getMaxLengthOfStaticContentType } from './utils'\n\ninterface _ARC4Encodedint8Array extends _ARC4Encoded {\n get uint8ArrayValue(): Uint8Array\n}\n/** @internal */\nexport class Uint<N extends BitSize> extends _Uint<N> implements _ARC4Encodedint8Array {\n private _value: Uint8Array\n private bitSize: N\n typeInfo: TypeInfo\n\n constructor(typeInfo: TypeInfo | string, v?: CompatForArc4Int<N>) {\n super()\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n this.bitSize = Uint.getMaxBitsLength(this.typeInfo) as N\n\n assert(validBitSizes.includes(this.bitSize), `Invalid bit size ${this.bitSize}`)\n\n const bigIntValue = asBigUintCls(v ?? 0n).valueOf()\n const maxValue = maxBigIntValue(this.bitSize)\n assert(bigIntValue <= maxValue, `expected value <= ${maxValue}, got: ${bigIntValue}`)\n\n this._value = encodingUtil.bigIntToUint8Array(bigIntValue, maxBytesLength(this.bitSize))\n setARC4TypeSymbol(this, `arc4.Uint<${this.bitSize}>`)\n }\n\n get native() {\n const bigIntValue = encodingUtil.uint8ArrayToBigInt(this._value)\n return this.bitSize <= UINT64_SIZE ? asUint64(bigIntValue) : asBigUint(bigIntValue)\n }\n\n asUint64() {\n const bigIntValue = encodingUtil.uint8ArrayToBigInt(this._value)\n if (bigIntValue > MAX_UINT64) {\n throw new CodeError('value too large to fit in uint64')\n }\n return asUint64(bigIntValue)\n }\n\n asBigUint() {\n const bigIntValue = encodingUtil.uint8ArrayToBigInt(this._value)\n return asBigUint(bigIntValue)\n }\n\n get uint8ArrayValue(): Uint8Array {\n return this._value\n }\n\n get bytes(): bytes {\n return Bytes(this._value)\n }\n\n equals(other: this): boolean {\n if (!(other instanceof Uint) || JSON.stringify(this.typeInfo) !== JSON.stringify(other.typeInfo)) {\n throw new CodeError(`Expected expression of type ${this.typeInfo.name}, got ${other.typeInfo.name}`)\n }\n return this.bytes.equals(other.bytes)\n }\n\n static fromBytes(value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none'): Uint<BitSize> {\n let bytesValue = asBytesCls(value)\n if (prefix === 'log') {\n assert(bytesValue.slice(0, 4).equals(ABI_RETURN_VALUE_LOG_PREFIX), 'ABI return prefix not found')\n bytesValue = bytesValue.slice(4)\n }\n const result = new Uint<BitSize>(typeInfo)\n result._value = asUint8Array(bytesValue)\n return result\n }\n\n static getMaxBitsLength(typeInfo: TypeInfo): BitSize {\n return parseInt((typeInfo.genericArgs as TypeInfo[])![0].name, 10) as BitSize\n }\n}\n\n/** @internal */\nexport class UFixed<N extends BitSize, M extends number> extends _UFixed<N, M> implements _ARC4Encodedint8Array {\n private _value: Uint8Array\n private bitSize: N\n private precision: M\n typeInfo: TypeInfo\n\n constructor(typeInfo: TypeInfo | string, v?: `${number}.${number}`) {\n super(v)\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n const genericArgs = this.typeInfo.genericArgs as uFixedGenericArgs\n this.bitSize = UFixed.getMaxBitsLength(this.typeInfo) as N\n this.precision = parseInt(genericArgs.m.name, 10) as M\n\n const trimmedValue = trimTrailingDecimalZeros(v ?? '0.0')\n assert(regExpNxM(this.precision).test(trimmedValue), `expected positive decimal literal with max of ${this.precision} decimal places`)\n\n const bigIntValue = BigInt(trimmedValue.replace('.', ''))\n const maxValue = maxBigIntValue(this.bitSize)\n assert(bigIntValue <= maxValue, `expected value <= ${maxValue}, got: ${bigIntValue}`)\n\n this._value = encodingUtil.bigIntToUint8Array(bigIntValue, maxBytesLength(this.bitSize))\n setARC4TypeSymbol(this, `arc4.UFixed<${this.bitSize}, ${this.precision}>`)\n }\n\n get native() {\n const bigIntValue = encodingUtil.uint8ArrayToBigInt(this._value)\n return this.bitSize <= UINT64_SIZE ? asUint64(bigIntValue) : asBigUint(bigIntValue)\n }\n\n get uint8ArrayValue(): Uint8Array {\n return this._value\n }\n\n get bytes(): bytes {\n return Bytes(this._value)\n }\n\n equals(other: this): boolean {\n if (!(other instanceof UFixed) || JSON.stringify(this.typeInfo) !== JSON.stringify(other.typeInfo)) {\n throw new CodeError(`Expected expression of type ${this.typeInfo.name}, got ${other.typeInfo.name}`)\n }\n return this.bytes.equals(other.bytes)\n }\n\n static fromBytes(\n value: StubBytesCompat | Uint8Array,\n typeInfo: string | TypeInfo,\n prefix: 'none' | 'log' = 'none',\n ): _UFixed<BitSize, number> {\n let bytesValue = asBytesCls(value)\n if (prefix === 'log') {\n assert(bytesValue.slice(0, 4).equals(ABI_RETURN_VALUE_LOG_PREFIX), 'ABI return prefix not found')\n bytesValue = bytesValue.slice(4)\n }\n const result = new UFixed<BitSize, number>(typeInfo, '0.0')\n result._value = asUint8Array(bytesValue)\n return result\n }\n\n static getMaxBitsLength(typeInfo: TypeInfo): BitSize {\n const genericArgs = typeInfo.genericArgs as uFixedGenericArgs\n return parseInt(genericArgs.n.name, 10) as BitSize\n }\n}\n\n/** @internal */\nexport class Byte extends _Byte implements _ARC4Encodedint8Array {\n typeInfo: TypeInfo\n private _value: Uint<8>\n\n constructor(typeInfo: TypeInfo | string, v?: CompatForArc4Int<8>) {\n super(v)\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n this._value = new Uint<8>(typeInfo, v)\n setARC4TypeSymbol(this, `arc4.Uint<8>`)\n }\n\n asUint64() {\n return this._value.asUint64()\n }\n\n asBigUint() {\n return this._value.asBigUint()\n }\n\n get uint8ArrayValue(): Uint8Array {\n return this._value.uint8ArrayValue\n }\n\n get bytes(): bytes {\n return this._value.bytes\n }\n\n equals(other: this): boolean {\n if (!(other instanceof Byte) || JSON.stringify(this._value.typeInfo) !== JSON.stringify(other._value.typeInfo)) {\n throw new CodeError(`Expected expression of type ${this._value.typeInfo.name}, got ${other._value.typeInfo.name}`)\n }\n return this.bytes.equals(other.bytes)\n }\n\n static fromBytes(value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none'): Byte {\n const uintNValue = Uint.fromBytes(value, typeInfo, prefix) as Uint<8>\n const result = new Byte(typeInfo)\n result._value = uintNValue\n return result\n }\n\n static getMaxBitsLength(typeInfo: TypeInfo): BitSize {\n return Uint.getMaxBitsLength(typeInfo)\n }\n}\n\n/** @internal */\nexport class Str extends _Str implements _ARC4Encodedint8Array {\n typeInfo: TypeInfo\n private _value: Uint8Array\n\n constructor(typeInfo: TypeInfo | string, s?: StringCompat) {\n super()\n const bytesValue = asBytesCls(s ?? '')\n const bytesLength = encodeLength(bytesValue.length.asNumber())\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n this._value = asUint8Array(bytesLength.concat(bytesValue))\n setARC4TypeSymbol(this, `arc4.Str`)\n }\n get native(): string {\n return encodingUtil.uint8ArrayToUtf8(this._value.slice(ABI_LENGTH_SIZE))\n }\n\n get uint8ArrayValue(): Uint8Array {\n return this._value\n }\n\n get bytes(): bytes {\n return Bytes(this._value)\n }\n\n equals(other: this): boolean {\n if (!(other instanceof Str)) {\n throw new CodeError(`Expected expression of type Str, got ${(other as object).constructor.name}`)\n }\n return this.bytes.equals(other.bytes)\n }\n\n static fromBytes(value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none'): Str {\n let bytesValue = asBytesCls(value)\n if (prefix === 'log') {\n assert(bytesValue.slice(0, 4).equals(ABI_RETURN_VALUE_LOG_PREFIX), 'ABI return prefix not found')\n bytesValue = bytesValue.slice(4)\n }\n const result = new Str(typeInfo)\n result._value = asUint8Array(bytesValue)\n return result\n }\n}\n\n/** @internal */\nexport class Bool extends _Bool implements _ARC4Encodedint8Array {\n private _value: Uint8Array\n typeInfo: TypeInfo\n\n constructor(typeInfo: TypeInfo | string, v?: boolean) {\n super(v)\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n this._value = encodingUtil.bigIntToUint8Array(v ? TRUE_BIGINT_VALUE : FALSE_BIGINT_VALUE, 1)\n setARC4TypeSymbol(this, `arc4.Bool`)\n }\n\n get native(): boolean {\n return encodingUtil.uint8ArrayToBigInt(this._value) === TRUE_BIGINT_VALUE\n }\n\n equals(other: this): boolean {\n if (!(other instanceof Bool)) {\n throw new CodeError(`Expected expression of type Bool, got ${(other as object).constructor.name}`)\n }\n return this.bytes.equals(other.bytes)\n }\n\n get uint8ArrayValue(): Uint8Array {\n return this._value\n }\n\n get bytes(): bytes {\n return Bytes(this._value?.length ? this._value : new Uint8Array([0]))\n }\n\n static fromBytes(value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none'): Bool {\n let bytesValue = asBytesCls(value)\n if (prefix === 'log') {\n assert(bytesValue.slice(0, 4).equals(ABI_RETURN_VALUE_LOG_PREFIX), 'ABI return prefix not found')\n bytesValue = bytesValue.slice(4)\n }\n const result = new Bool(typeInfo)\n result._value = asUint8Array(bytesValue)\n return result\n }\n}\n\n/** @internal */\nexport class StaticArray<TItem extends _ARC4Encoded, TLength extends number>\n extends _StaticArray<TItem, TLength>\n implements _ARC4Encodedint8Array\n{\n private _value?: NTuple<TItem, TLength>\n private _uint8ArrayValue?: Uint8Array\n private size: number\n typeInfo: TypeInfo\n genericArgs: StaticArrayGenericArgs\n\n constructor(typeInfo: TypeInfo | string, ...items: TItem[] & { length: TLength })\n constructor(typeInfo: TypeInfo | string, ...items: TItem[])\n constructor(typeInfo: TypeInfo | string, ...items: TItem[] & { length: TLength }) {\n // if first item is the symbol, we are initialising from bytes\n // so we don't need to pass the items to the super constructor\n const isInitialisingFromBytes = items.length === 1 && (items[0] as DeliberateAny) === IS_INITIALISING_FROM_BYTES_SYMBOL\n super()\n\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n this.genericArgs = this.typeInfo.genericArgs as StaticArrayGenericArgs\n this.size = parseInt(this.genericArgs.size.name, 10)\n setARC4TypeSymbol(this, `arc4.StaticArray<${this.genericArgs.elementType.name}, ${this.size}>`)\n\n // if we are not initialising from bytes, we need to check and set the items\n if (!isInitialisingFromBytes) {\n if (items.length && items.length !== this.size) {\n throw new CodeError(`expected ${this.size} items, not ${items.length}`)\n }\n\n assert(areAllARC4Encoded(items), 'expected ARC4 type')\n\n items.forEach((item) => {\n checkItemTypeName(this.genericArgs.elementType, item)\n })\n\n if (items.length) {\n this._value = items as NTuple<TItem, TLength>\n } else {\n this._uint8ArrayValue = new Uint8Array(getMaxLengthOfStaticContentType(this.typeInfo))\n }\n }\n return new Proxy(this, arrayProxyHandler<TItem>()) as StaticArray<TItem, TLength>\n }\n\n get uint8ArrayValue(): Uint8Array {\n return this._uint8ArrayValue ?? encode(this.items, true)\n }\n\n get bytes(): bytes {\n return Bytes(this._uint8ArrayValue ?? encode(this.items, true))\n }\n\n equals(other: this): boolean {\n if (!(other instanceof StaticArray) || JSON.stringify(this.typeInfo) !== JSON.stringify(other.typeInfo)) {\n throw new CodeError(`Expected expression of type ${this.typeInfo.name}, got ${other.typeInfo.name}`)\n }\n return this.bytes.equals(other.bytes)\n }\n\n get length(): uint64 {\n return this.size\n }\n\n get items(): NTuple<TItem, TLength> {\n if (this._uint8ArrayValue) {\n const childTypes = Array(this.size).fill(this.genericArgs.elementType)\n this._value = decode(this._uint8ArrayValue, childTypes, true) as NTuple<TItem, TLength>\n this._uint8ArrayValue = undefined\n return this._value\n } else if (this._value) {\n this._uint8ArrayValue = undefined\n return this._value\n }\n throw new CodeError('value is not set')\n }\n\n setItem(index: number, value: TItem): void {\n this.items[index] = value\n }\n\n copy(): StaticArray<TItem, TLength> {\n return StaticArray.fromBytes(this.uint8ArrayValue, JSON.stringify(this.typeInfo)) as unknown as StaticArray<TItem, TLength>\n }\n\n concat(other: Parameters<InstanceType<typeof _StaticArray>['concat']>[0]): DynamicArray<TItem> {\n const items = this.items\n const otherEntries = other.entries()\n let next = otherEntries.next()\n while (!next.done) {\n items.push(next.value[1] as TItem)\n next = otherEntries.next()\n }\n return new DynamicArray<TItem>(\n { name: `DynamicArray<${this.genericArgs.elementType.name}>`, genericArgs: { elementType: this.genericArgs.elementType } },\n ...items,\n )\n }\n\n get native(): NTuple<TItem, TLength> {\n return this.items\n }\n\n static fromBytes(\n value: StubBytesCompat | Uint8Array,\n typeInfo: string | TypeInfo,\n prefix: 'none' | 'log' = 'none',\n ): StaticArray<_ARC4Encoded, number> {\n let bytesValue = value instanceof Uint8Array ? value : asUint8Array(value)\n if (prefix === 'log') {\n assert(Bytes(bytesValue.slice(0, 4)).equals(ABI_RETURN_VALUE_LOG_PREFIX), 'ABI return prefix not found')\n bytesValue = bytesValue.slice(4)\n }\n // pass the symbol to the constructor to let it know we are initialising from bytes\n const result = new StaticArray<_ARC4Encoded, number>(typeInfo, IS_INITIALISING_FROM_BYTES_SYMBOL as DeliberateAny)\n result._uint8ArrayValue = bytesValue\n return result\n }\n}\n\n/** @internal */\nexport class Address extends _Address implements _ARC4Encodedint8Array {\n typeInfo: TypeInfo\n private _value: StaticArray<Byte, 32>\n\n constructor(typeInfo: TypeInfo | string, value?: AccountType | string | bytes) {\n super(value)\n let uint8ArrayValue: Uint8Array\n if (value === undefined) {\n uint8ArrayValue = new Uint8Array(32)\n } else if (typeof value === 'string') {\n uint8ArrayValue = encodingUtil.base32ToUint8Array(value).slice(0, ALGORAND_ADDRESS_BYTE_LENGTH - ALGORAND_CHECKSUM_BYTE_LENGTH)\n } else if (isBytes(value)) {\n uint8ArrayValue = getUint8Array(value)\n } else {\n uint8ArrayValue = getUint8Array(value.bytes)\n }\n avmInvariant(uint8ArrayValue.length === 32, 'Addresses should be 32 bytes')\n\n this._value = StaticArray.fromBytes(uint8ArrayValue, typeInfo) as StaticArray<Byte, 32>\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n setARC4TypeSymbol(this, `arc4.Address`)\n return new Proxy(this, arrayProxyHandler<Byte>()) as Address\n }\n\n get uint8ArrayValue(): Uint8Array {\n return this._value.uint8ArrayValue\n }\n\n get bytes(): bytes {\n return this._value.bytes\n }\n\n equals(other: this): boolean {\n if (!(other instanceof Address) || JSON.stringify(this.typeInfo) !== JSON.stringify(other.typeInfo)) {\n throw new CodeError(`Expected expression of type ${this.typeInfo.name}, got ${other.typeInfo.name}`)\n }\n return this.bytes.equals(other.bytes)\n }\n\n get length(): uint64 {\n return 32\n }\n\n get native(): AccountType {\n return Account(this._value.bytes)\n }\n\n get items(): readonly Byte[] {\n return this._value.items\n }\n\n setItem(_index: number, _value: Byte): void {\n throw new CodeError('Address is immutable')\n }\n\n static fromBytes(value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none'): Address {\n const staticArrayValue = StaticArray.fromBytes(value, typeInfo, prefix) as StaticArray<Byte, 32>\n const result = new Address(typeInfo)\n result._value = staticArrayValue\n return result\n }\n}\n\n/** @internal */\nexport class DynamicArray<TItem extends _ARC4Encoded> extends _DynamicArray<TItem> implements _ARC4Encodedint8Array {\n private _value?: TItem[]\n private _uint8ArrayValue?: Uint8Array\n typeInfo: TypeInfo\n genericArgs: DynamicArrayGenericArgs\n\n constructor(typeInfo: TypeInfo | string, ...items: TItem[]) {\n super()\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n this.genericArgs = this.typeInfo.genericArgs as DynamicArrayGenericArgs\n\n assert(areAllARC4Encoded(items), 'expected ARC4 type')\n\n items.forEach((item) => {\n checkItemTypeName(this.genericArgs.elementType, item)\n })\n this._value = items\n\n setARC4TypeSymbol(this, `arc4.DynamicArray<${this.genericArgs.elementType.name}>`)\n return new Proxy(this, arrayProxyHandler<TItem>()) as DynamicArray<TItem>\n }\n\n get uint8ArrayValue(): Uint8Array {\n return this._uint8ArrayValue ?? this.encodeWithLength(this.items)\n }\n\n get bytes(): bytes {\n return Bytes(this._uint8ArrayValue ?? this.encodeWithLength(this.items))\n }\n\n equals(other: this): boolean {\n if (!(other instanceof DynamicArray) || JSON.stringify(this.typeInfo) !== JSON.stringify(other.typeInfo)) {\n throw new CodeError(`Expected expression of type ${this.typeInfo.name}, got ${other.typeInfo.name}`)\n }\n return this.bytes.equals(other.bytes)\n }\n\n get length(): uint64 {\n return this.items.length\n }\n\n get items(): TItem[] {\n if (this._uint8ArrayValue) {\n const [length, data] = readLength(this._uint8ArrayValue)\n const childTypes = Array(length).fill(this.genericArgs.elementType)\n this._value = decode(data, childTypes, true) as TItem[]\n this._uint8ArrayValue = undefined\n return this._value\n } else if (this._value) {\n this._uint8ArrayValue = undefined\n return this._value\n }\n throw new CodeError('value is not set')\n }\n\n setItem(index: number, value: TItem): void {\n this.items[index] = value\n }\n\n copy(): DynamicArray<TItem> {\n return DynamicArray.fromBytes(this.uint8ArrayValue, JSON.stringify(this.typeInfo)) as DynamicArray<TItem>\n }\n\n get native(): TItem[] {\n return this.items\n }\n\n push(...values: TItem[]) {\n const items = this.items\n items.push(...values)\n }\n\n pop(): TItem {\n const items = this.items\n const popped = items.pop()\n if (popped === undefined) throw new AvmError('The array is empty')\n return popped\n }\n\n concat(other: Parameters<InstanceType<typeof _DynamicArray>['concat']>[0]): DynamicArray<TItem> {\n const items = this.items\n const otherEntries = other.entries()\n let next = otherEntries.next()\n while (!next.done) {\n items.push(next.value[1] as TItem)\n next = otherEntries.next()\n }\n return new DynamicArray<TItem>(this.typeInfo, ...items)\n }\n\n static fromBytes(\n value: StubBytesCompat | Uint8Array,\n typeInfo: string | TypeInfo,\n prefix: 'none' | 'log' = 'none',\n ): DynamicArray<_ARC4Encoded> {\n let bytesValue = asBytesCls(value)\n if (prefix === 'log') {\n assert(bytesValue.slice(0, 4).equals(ABI_RETURN_VALUE_LOG_PREFIX), 'ABI return prefix not found')\n bytesValue = bytesValue.slice(4)\n }\n const result = new DynamicArray(typeInfo)\n result._uint8ArrayValue = asUint8Array(bytesValue)\n return result\n }\n\n private encodeWithLength(items: TItem[]) {\n return concatUint8Arrays(encodeLength(items.length).asUint8Array(), encode(items, true))\n }\n}\n\n/** @internal */\nexport class Tuple<TTuple extends [_ARC4Encoded, ..._ARC4Encoded[]]> extends _Tuple<TTuple> implements _ARC4Encodedint8Array {\n private _value?: TTuple\n private _uint8ArrayValue?: Uint8Array\n typeInfo: TypeInfo\n genericArgs: TypeInfo[]\n\n constructor(typeInfo: TypeInfo | string, ...items: TTuple) {\n // if first item is the symbol, we are initialising from bytes\n // so we don't need to pass the items to the super constructor\n const isInitialisingFromBytes = items.length === 1 && (items[0] as DeliberateAny) === IS_INITIALISING_FROM_BYTES_SYMBOL\n super(...(isInitialisingFromBytes ? ([] as DeliberateAny) : items))\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n this.genericArgs = Object.values(this.typeInfo.genericArgs as Record<string, TypeInfo>)\n\n setARC4TypeSymbol(this, `arc4.Tuple<${this.genericArgs.map((arg) => arg.name).join(', ')}>`)\n // if we are not initialising from bytes, we need to check and set the items\n if (!isInitialisingFromBytes) {\n assert(areAllARC4Encoded(items), 'expected ARC4 type')\n\n items.forEach((item, index) => {\n checkItemTypeName(this.genericArgs[index], item)\n })\n if (items.length) {\n this._value = items\n } else {\n this._uint8ArrayValue = new Uint8Array(getMaxLengthOfStaticContentType(this.typeInfo))\n }\n }\n }\n\n get uint8ArrayValue(): Uint8Array {\n return this._uint8ArrayValue ?? encode(this.items)\n }\n\n get bytes(): bytes {\n return Bytes(this._uint8ArrayValue ?? encode(this.items))\n }\n\n equals(other: this): boolean {\n if (!(other instanceof Tuple) || JSON.stringify(this.typeInfo) !== JSON.stringify(other.typeInfo)) {\n throw new CodeError(`Expected expression of type ${this.typeInfo.name}, got ${other.typeInfo.name}`)\n }\n return this.bytes.equals(other.bytes)\n }\n\n get length(): TTuple['length'] & uint64 {\n return this.items.length\n }\n\n get native(): TTuple {\n return this.items\n }\n\n at<TIndex extends keyof TTuple>(index: TIndex): TTuple[TIndex] {\n return this.items[index]\n }\n\n private get items(): TTuple {\n if (this._uint8ArrayValue) {\n this._value = decode(this._uint8ArrayValue, this.genericArgs) as TTuple\n this._uint8ArrayValue = undefined\n return this._value\n } else if (this._value) {\n this._uint8ArrayValue = undefined\n return this._value\n }\n throw new CodeError('value is not set')\n }\n\n static fromBytes(\n value: StubBytesCompat | Uint8Array,\n typeInfo: string | TypeInfo,\n prefix: 'none' | 'log' = 'none',\n ): Tuple<[_ARC4Encoded, ..._ARC4Encoded[]]> {\n let bytesValue = asBytesCls(value)\n if (prefix === 'log') {\n assert(bytesValue.slice(0, 4).equals(ABI_RETURN_VALUE_LOG_PREFIX), 'ABI return prefix not found')\n bytesValue = bytesValue.slice(4)\n }\n // pass the symbol to the constructor to let it know we are initialising from bytes\n const result = new Tuple(typeInfo, IS_INITIALISING_FROM_BYTES_SYMBOL as DeliberateAny)\n result._uint8ArrayValue = asUint8Array(bytesValue)\n return result\n }\n}\n\n/** @internal */\nexport class Struct<T extends StructConstraint> extends (_Struct<StructConstraint> as DeliberateAny) implements _ARC4Encodedint8Array {\n private _uint8ArrayValue?: Uint8Array\n genericArgs: Record<string, TypeInfo>\n\n constructor(typeInfo: TypeInfo | string, value: T = {} as T) {\n super(value)\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n this.genericArgs = this.typeInfo.genericArgs as Record<string, TypeInfo>\n\n Object.keys(this.genericArgs).forEach((key) => {\n Object.defineProperty(this, key, {\n value: value[key],\n writable: true,\n enumerable: true,\n })\n })\n\n setARC4TypeSymbol(this, 'arc4.Struct')\n\n return new Proxy(this, {\n get(target, prop) {\n const originalValue = Reflect.get(target, prop)\n if (originalValue === undefined && target._uint8ArrayValue?.length && Object.keys(target.genericArgs).includes(prop.toString())) {\n return target.items[prop.toString()]\n }\n return originalValue\n },\n set(target, prop, value) {\n if (target._uint8ArrayValue && Object.keys(target.genericArgs).includes(prop.toString())) {\n target.decodeAsProperties()\n }\n return Reflect.set(target, prop, value)\n },\n })\n }\n\n get uint8ArrayValue(): Uint8Array {\n return this._uint8ArrayValue ?? encode(Object.values(this.items))\n }\n\n get bytes(): bytes {\n return Bytes(this._uint8ArrayValue ?? encode(Object.values(this.items)))\n }\n\n get items(): T {\n this.decodeAsProperties()\n const result = {} as StructConstraint\n Object.keys(this.genericArgs).forEach((key) => {\n result[key] = (this as unknown as StructConstraint)[key]\n })\n return result as T\n }\n\n get native(): T {\n return this.items\n }\n\n copy(): Struct<T> {\n return Struct.fromBytes(this.uint8ArrayValue, JSON.stringify(this.typeInfo)) as Struct<T>\n }\n\n private decodeAsProperties() {\n if (this._uint8ArrayValue) {\n const values = decode(this._uint8ArrayValue, Object.values(this.genericArgs))\n Object.keys(this.genericArgs).forEach((key, index) => {\n ;(this as unknown as StructConstraint)[key] = values[index]\n })\n this._uint8ArrayValue = undefined\n }\n }\n\n static fromBytes(\n value: StubBytesCompat | Uint8Array,\n typeInfo: string | TypeInfo,\n prefix: 'none' | 'log' = 'none',\n ): Struct<StructConstraint> {\n let bytesValue = asBytesCls(value)\n if (prefix === 'log') {\n assert(bytesValue.slice(0, 4).equals(ABI_RETURN_VALUE_LOG_PREFIX), 'ABI return prefix not found')\n bytesValue = bytesValue.slice(4)\n }\n const result = new Struct(typeInfo)\n result._uint8ArrayValue = asUint8Array(bytesValue)\n return result\n }\n}\n\n/** @internal */\nexport class DynamicBytes extends _DynamicBytes implements _ARC4Encodedint8Array {\n typeInfo: TypeInfo\n private _value: DynamicArray<Byte>\n\n constructor(typeInfo: TypeInfo | string, value?: bytes | string) {\n super(value)\n const uint8ArrayValue = concatUint8Arrays(encodeLength(value?.length ?? 0).asUint8Array(), asUint8Array(value ?? new Uint8Array()))\n this._value = DynamicArray.fromBytes(uint8ArrayValue, typeInfo) as DynamicArray<Byte>\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n setARC4TypeSymbol(this, `arc4.DynamicBytes`)\n return new Proxy(this, arrayProxyHandler<Byte>()) as DynamicBytes\n }\n\n get uint8ArrayValue(): Uint8Array {\n return this._value.uint8ArrayValue\n }\n\n get bytes(): bytes {\n return this._value.bytes\n }\n\n equals(other: this): boolean {\n if (!(other instanceof DynamicBytes) || JSON.stringify(this.typeInfo) !== JSON.stringify(other.typeInfo)) {\n throw new CodeError(`Expected expression of type ${this.typeInfo.name}, got ${other.typeInfo.name}`)\n }\n return this.bytes.equals(other.bytes)\n }\n\n get length(): uint64 {\n return this._value.length\n }\n\n get native(): bytes {\n return this._value.bytes.slice(ABI_LENGTH_SIZE)\n }\n\n get items(): Byte[] {\n return this._value.items\n }\n\n setItem(_index: number, _value: Byte): void {\n throw new CodeError('DynamicBytes is immutable')\n }\n\n concat(other: Parameters<InstanceType<typeof _DynamicBytes>['concat']>[0]): DynamicBytes {\n const items = this.items\n const otherEntries = other.entries()\n let next = otherEntries.next()\n while (!next.done) {\n items.push(next.value[1] as Byte)\n next = otherEntries.next()\n }\n const concatenatedBytes = items\n .map((item) => item.uint8ArrayValue)\n .reduce((acc, curr) => concatUint8Arrays(acc, curr), new Uint8Array())\n return new DynamicBytes(this.typeInfo, asBytes(concatenatedBytes))\n }\n\n static fromBytes(value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none'): DynamicBytes {\n const dynamicArrayValue = DynamicArray.fromBytes(value, typeInfo, prefix) as DynamicArray<Byte>\n const result = new DynamicBytes(typeInfo)\n result._value = dynamicArrayValue\n return result\n }\n}\n\n/** @internal */\nexport class StaticBytes<TLength extends uint64 = 0> extends _StaticBytes<TLength> implements _ARC4Encodedint8Array {\n private _value: StaticArray<Byte, TLength>\n typeInfo: TypeInfo\n\n constructor(typeInfo: TypeInfo | string, value?: bytes<TLength>) {\n super(value ?? (Bytes() as bytes<TLength>))\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n const uint8ArrayValue = asUint8Array(value ?? new Uint8Array(getMaxLengthOfStaticContentType(this.typeInfo)))\n this._value = StaticArray.fromBytes(uint8ArrayValue, typeInfo) as unknown as StaticArray<Byte, TLength>\n setARC4TypeSymbol(this, `arc4.StaticBytes<${this._value.length}>`)\n return new Proxy(this, arrayProxyHandler<Byte>()) as StaticBytes<TLength>\n }\n\n get uint8ArrayValue(): Uint8Array {\n return this._value.uint8ArrayValue\n }\n\n get bytes(): bytes {\n return this._value.bytes\n }\n\n equals(other: this): boolean {\n if (!(other instanceof StaticBytes) || JSON.stringify(this.typeInfo) !== JSON.stringify(other.typeInfo)) {\n throw new CodeError(`Expected expression of type ${this.typeInfo.name}, got ${other.typeInfo.name}`)\n }\n return this.bytes.equals(other.bytes)\n }\n\n get length(): uint64 {\n return this._value.length\n }\n\n get native(): bytes<TLength> {\n return this._value.bytes as bytes<TLength>\n }\n\n get items(): Byte[] {\n return this._value.items\n }\n\n setItem(_index: number, _value: Byte): void {\n throw new CodeError('StaticBytes is immutable')\n }\n\n concat(other: Parameters<InstanceType<typeof _StaticBytes>['concat']>[0]): DynamicBytes {\n const items = this.items\n const otherEntries = other.entries()\n let next = otherEntries.next()\n while (!next.done) {\n items.push(next.value[1] as Byte)\n next = otherEntries.next()\n }\n const concatenatedBytes = items\n .map((item) => item.uint8ArrayValue)\n .reduce((acc, curr) => concatUint8Arrays(acc, curr), new Uint8Array())\n return new DynamicBytes(this.typeInfo, asBytes(concatenatedBytes))\n }\n\n static fromBytes(value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none'): StaticBytes {\n const staticArrayValue = StaticArray.fromBytes(value, typeInfo, prefix) as StaticArray<Byte, number>\n const result = new StaticBytes(typeInfo)\n result._value = staticArrayValue as StaticArray<Byte, 0>\n return result\n }\n}\n\n/** @internal */\nexport class ReferenceArray<TItem> extends _ReferenceArray<TItem> {\n private _values: TItem[]\n typeInfo: TypeInfo\n\n constructor(typeInfo: TypeInfo | string, ...items: TItem[]) {\n super(...items)\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n this._values = items\n\n return new Proxy(this, arrayProxyHandler<TItem>()) as ReferenceArray<TItem>\n }\n\n /**\n * Returns the current length of this array\n */\n get length(): uint64 {\n return this._values.length\n }\n\n get items(): TItem[] {\n return this._values\n }\n\n setItem(index: number, value: TItem): void {\n this.items[index] = value\n }\n\n slice(start?: Uint64Compat, end?: Uint64Compat): _ReferenceArray<TItem> {\n const startIndex = end === undefined ? 0 : asNumber(start ?? 0)\n const endIndex = end === undefined ? asNumber(start ?? this._values.length) : asNumber(end)\n return new ReferenceArray<TItem>(this.typeInfo, ...this._values.slice(startIndex, endIndex))\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 this._values.push(...items)\n }\n\n /**\n * Pop a single item from this array\n */\n pop(): TItem {\n return this._values.pop()!\n }\n\n copy(): _ReferenceArray<TItem> {\n const bytesValue = toBytes(this)\n return getEncoder<_ReferenceArray<TItem>>(this.typeInfo)(bytesValue, this.typeInfo)\n }\n}\n\n/** @internal */\nexport class FixedArray<TItem, TLength extends number> extends _FixedArray<TItem, TLength> {\n private _values: NTuple<TItem, TLength>\n private size: number\n typeInfo: TypeInfo\n private genericArgs: StaticArrayGenericArgs\n\n constructor(typeInfo: TypeInfo | string, ...items: TItem[] & { length: TLength }) {\n super()\n this.typeInfo = typeof typeInfo === 'string' ? JSON.parse(typeInfo) : typeInfo\n this.genericArgs = this.typeInfo.genericArgs as StaticArrayGenericArgs\n this.size = parseInt(this.genericArgs.size.name, 10)\n if (items.length) {\n this._values = items as NTuple<TItem, TLength>\n } else {\n const bytesValue = asBytes(new Uint8Array(getMaxLengthOfStaticContentType(this.typeInfo)))\n this._values = (getEncoder<_FixedArray<TItem, TLength>>(this.typeInfo)(bytesValue, this.typeInfo) as FixedArray<TItem, TLength>).items\n }\n return new Proxy(this, arrayProxyHandler<TItem>()) as FixedArray<TItem, TLength>\n }\n\n concat(...others: (TItem | ConcatArray<TItem>)[]): TItem[] {\n return this.items.concat(...others)\n }\n\n get length(): uint64 {\n return this.size\n }\n\n get items(): NTuple<TItem, TLength> {\n return this._values\n }\n\n setItem(index: number, value: TItem): void {\n this.items[index] = value\n }\n\n slice(start?: Uint64Compat, end?: Uint64Compat): Array<TItem> {\n const startIndex = end === undefined ? 0 : asNumber(start ?? 0)\n const endIndex = end === undefined ? asNumber(start ?? this._values.length) : asNumber(end)\n return this._values.slice(startIndex, endIndex)\n }\n\n copy(): _FixedArray<TItem, TLength> {\n const bytesValue = toBytes(this)\n return getEncoder<_FixedArray<TItem, TLength>>(this.typeInfo)(bytesValue, this.typeInfo)\n }\n}\n\nconst decode = (value: Uint8Array, childTypes: TypeInfo[], isHomogenous?: boolean) => {\n let i = 0\n let arrayIndex = 0\n const valuePartitions: Uint8Array[] = []\n const dynamicSegments: Array<Array<number>> = [] // Store the start and end of a dynamic element\n\n while (i < childTypes.length) {\n const childType = childTypes[i]\n if (holdsDynamicLengthContent(childType)) {\n // Decode the size of the dynamic element\n const dynamicIndex = uint8ArrayToNumber(value.slice(arrayIndex, arrayIndex + ABI_LENGTH_SIZE))\n if (dynamicSegments.length) {\n dynamicSegments.at(-1)![1] = dynamicIndex\n }\n // Since we do not know where the current dynamic element ends,\n // put a placeholder and update later\n dynamicSegments.push([dynamicIndex, -1])\n valuePartitions.push(new Uint8Array())\n arrayIndex += ABI_LENGTH_SIZE\n } else if (['Bool', 'boolean'].includes(childType.name)) {\n const before = findBoolTypes(childTypes, i, -1, isHomogenous)\n let after = findBoolTypes(childTypes, i, 1, isHomogenous)\n\n if (before % 8 != 0) {\n throw new CodeError('\"expected before index should have number of bool mod 8 equal 0\"')\n }\n after = Math.min(7, after)\n const bits = uint8ArrayToNumber(value.slice(arrayIndex, arrayIndex + 1))\n Array(after + 1)\n .fill(0)\n .forEach((_, j) => {\n const mask = 128 >> j\n valuePartitions.push(\n mask & bits ? encodingUtil.bigIntToUint8Array(TRUE_BIGINT_VALUE) : encodingUtil.bigIntToUint8Array(FALSE_BIGINT_VALUE),\n )\n })\n i += after\n arrayIndex += 1\n } else {\n const currLen = getMaxLengthOfStaticContentType(childType)\n valuePartitions.push(value.slice(arrayIndex, arrayIndex + currLen))\n arrayIndex += currLen\n }\n\n if (arrayIndex >= value.length && i != childTypes.length - 1) {\n throw new CodeError('input string is not long enough to be decoded')\n }\n i += 1\n }\n\n if (dynamicSegments.length > 0) {\n dynamicSegments.at(-1)![1] = value.length\n arrayIndex = value.length\n }\n if (arrayIndex < value.length) {\n throw new CodeError('input string was not fully consumed')\n }\n\n // Check dynamic element partitions\n let segmentIndex = 0\n childTypes.forEach((childType, index) => {\n if (holdsDynamicLengthContent(childType)) {\n const [segmentStart, segmentEnd] = dynamicSegments[segmentIndex]\n valuePartitions[index] = value.slice(segmentStart, segmentEnd)\n segmentIndex += 1\n }\n })\n\n const values: _ARC4Encoded[] = []\n childTypes.forEach((childType, index) => {\n values.push(\n getEncoder<_ARC4Encoded>(childType)(\n ['bytes', 'string'].includes(childType.name) ? valuePartitions[index].slice(2) : valuePartitions[index],\n childType,\n ),\n )\n })\n return values\n}\n\nconst encode = (values: (_ARC4Encoded & { uint8ArrayValue?: Uint8Array })[], isHomogenous?: boolean) => {\n const length = values.length\n const heads = []\n const tails = []\n const dynamicLengthTypeIndex = []\n let i = 0\n const valuesLengthBytes = values instanceof _DynamicArray ? encodeLength(length).asUint8Array() : new Uint8Array()\n while (i < length) {\n const value = values[i]\n assert(value instanceof _ARC4Encoded, `expected ARC4 type ${value.constructor.name}`)\n dynamicLengthTypeIndex.push(isDynamicLengthType(value))\n if (dynamicLengthTypeIndex.at(-1)) {\n heads.push(asUint8Array(Bytes.fromHex('0000')))\n tails.push((value as _ARC4Encodedint8Array).uint8ArrayValue ?? asUint8Array(value.bytes))\n } else {\n if (value instanceof _Bool) {\n const before = findBool(values, i, -1, isHomogenous)\n let after = findBool(values, i, 1, isHomogenous)\n if (before % 8 != 0) {\n throw new CodeError('\"expected before index should have number of bool mod 8 equal 0\"')\n }\n after = Math.min(7, after)\n const consecutiveBools = values.slice(i, i + after + 1) as _Bool[]\n const compressedNumber = compressMultipleBool(consecutiveBools)\n heads.push(new Uint8Array([compressedNumber]))\n i += after\n } else {\n heads.push((value as _ARC4Encodedint8Array).uint8ArrayValue ?? asUint8Array(value.bytes))\n }\n tails.push(new Uint8Array())\n }\n i += 1\n }\n\n // Adjust heads for dynamic types\n let headLength = 0\n heads.forEach((head) => {\n // If the element is not a placeholder, append the length of the element\n headLength += head.length\n })\n\n // Correctly encode dynamic types and replace placeholder\n let tailCurrLength = 0\n for (let i = 0; i < heads.length; i++) {\n if (dynamicLengthTypeIndex[i]) {\n const headValue = headLength + tailCurrLength\n heads[i] = asUint8Array(encodeLength(headValue))\n }\n tailCurrLength += tails[i].length\n }\n\n return concatUint8Arrays(valuesLengthBytes, ...heads, ...tails)\n}\n\nconst isDynamicLengthType = (value: _ARC4Encoded) => {\n return (\n value instanceof Str ||\n (value instanceof StaticArray && holdsDynamicLengthContent(value.typeInfo)) ||\n (value instanceof Tuple && value.genericArgs.some(holdsDynamicLengthContent)) ||\n (value instanceof Struct && Object.values(value.genericArgs).some(holdsDynamicLengthContent)) ||\n value instanceof DynamicArray ||\n value instanceof DynamicBytes\n )\n}\n\n/** @internal */\nexport function encodeArc4<T>(sourceTypeInfoString: string | undefined, source: T): bytes {\n const arc4Encoded = getArc4Encoded(source, sourceTypeInfoString)\n return arc4Encoded.bytes\n}\n\n/** @internal */\nexport function decodeArc4<T>(\n sourceTypeInfoString: string,\n targetTypeInfoString: string,\n bytes: StubBytesCompat,\n prefix: 'none' | 'log' = 'none',\n): T {\n const sourceTypeInfo = JSON.parse(sourceTypeInfoString)\n const targetTypeInfo = JSON.parse(targetTypeInfoString)\n const encoder = getEncoder(sourceTypeInfo)\n const source = encoder(bytes, sourceTypeInfo, prefix) as { typeInfo: TypeInfo }\n return getNativeValue(source, targetTypeInfo) as T\n}\n\n/** @internal */\nexport function convertBytes<T extends _ARC4Encoded>(\n typeInfoString: string,\n bytes: StubBytesCompat,\n options: { prefix?: 'none' | 'log'; strategy: 'unsafe-cast' | 'validate' },\n): T {\n const typeInfo = JSON.parse(typeInfoString)\n return getEncoder<T>(typeInfo)(bytes, typeInfo, options.prefix)\n}\n\n/** @internal */\nexport const getArc4Encoded = (value: DeliberateAny, sourceTypeInfoString?: string): _ARC4Encoded => {\n if (value instanceof _ARC4Encoded) {\n return value\n }\n if (value instanceof AccountCls) {\n return getArc4Encoded(value.bytes)\n }\n if (value instanceof AssetCls) {\n return getArc4Encoded(value.id)\n }\n if (value instanceof ApplicationCls) {\n return getArc4Encoded(value.id)\n }\n if (typeof value === 'boolean') {\n return new Bool({ name: 'Bool' }, value)\n }\n if (value instanceof Uint64Cls || typeof value === 'number') {\n return new Uint({ name: 'Uint<64>', genericArgs: [{ name: '64' }] }, asBigInt(value))\n }\n if (value instanceof BigUintCls) {\n return new Uint({ name: 'Uint<512>', genericArgs: [{ name: '512' }] }, value.asBigInt())\n }\n if (typeof value === 'bigint') {\n return new Uint({ name: 'Uint<512>', genericArgs: [{ name: '512' }] }, value)\n }\n if (value instanceof BytesCls) {\n if (value.fixedLength !== undefined) {\n return new StaticBytes(\n {\n name: 'StaticBytes',\n genericArgs: { elementType: { name: 'Byte', genericArgs: [{ name: '8' }] }, size: { name: value.fixedLength.toString() } },\n },\n value.asAlgoTs(),\n )\n }\n return new DynamicBytes(\n { name: 'DynamicBytes', genericArgs: { elementType: { name: 'Byte', genericArgs: [{ name: '8' }] } } },\n value.asAlgoTs(),\n )\n }\n if (typeof value === 'string') {\n return new Str({ name: 'Str' }, value)\n }\n if (Array.isArray(value) || value instanceof ReferenceArray || value instanceof FixedArray) {\n const sourceTypeInfo = sourceTypeInfoString ? JSON.parse(sourceTypeInfoString) : undefined\n const sourceGenericArgs = ((value as DeliberateAny).typeInfo || sourceTypeInfo || {})?.genericArgs\n const result: _ARC4Encoded[] = (value instanceof ReferenceArray || value instanceof FixedArray ? value.items : value).reduce(\n (acc: _ARC4Encoded[], cur: DeliberateAny, currentIndex: number) => {\n const elementTypeInfo = sourceGenericArgs?.elementType || sourceGenericArgs?.[currentIndex]\n const elementTypeInfoString = elementTypeInfo ? JSON.stringify(elementTypeInfo) : undefined\n return acc.concat(getArc4Encoded(cur, elementTypeInfoString))\n },\n [],\n )\n\n const genericArgs: TypeInfo[] = result.map((x) => (x as DeliberateAny).typeInfo)\n if (value instanceof FixedArray) {\n const typeInfo = {\n name: `StaticArray<${genericArgs[0].name},${genericArgs.length}>`,\n genericArgs: { elementType: genericArgs[0], size: { name: genericArgs.length.toString() } },\n }\n return new StaticArray(typeInfo, ...(result as [_ARC4Encoded, ..._ARC4Encoded[]]))\n } else if (\n sourceTypeInfo?.name?.startsWith('Array') ||\n sourceTypeInfo?.name?.startsWith('ReadonlyArray') ||\n value instanceof ReferenceArray\n ) {\n const elementType = genericArgs[0] ?? sourceTypeInfo.genericArgs?.elementType\n const typeInfo = { name: `DynamicArray<${elementType.name}>`, genericArgs: { elementType } }\n return new DynamicArray(typeInfo, ...(result as [_ARC4Encoded, ..._ARC4Encoded[]]))\n } else {\n const typeInfo = { name: `Tuple<[${genericArgs.map((x) => x.name).join(',')}]>`, genericArgs }\n return new Tuple(typeInfo, ...(result as [_ARC4Encoded, ..._ARC4Encoded[]]))\n }\n }\n if (typeof value === 'object') {\n const sourceTypeInfo = sourceTypeInfoString ? JSON.parse(sourceTypeInfoString) : undefined\n const propTypeInfos = (value.typeInfo || sourceTypeInfo || {}).genericArgs\n const result = Object.entries(value).reduce((acc: _ARC4Encoded[], [key, cur]: DeliberateAny) => {\n const propTypeInfoString = propTypeInfos?.[key] ? JSON.stringify(propTypeInfos[key]) : undefined\n return acc.concat(getArc4Encoded(cur, propTypeInfoString))\n }, [])\n const genericArgs: TypeInfo[] = result.map((x) => (x as DeliberateAny).typeInfo)\n const typeInfo = {\n name: `Struct<${value.constructor.name}>`,\n genericArgs: Object.fromEntries(Object.keys(value).map((x, i) => [x, genericArgs[i]])),\n }\n let s = Object.fromEntries(Object.keys(typeInfo.genericArgs).map((x, i) => [x, result[i]]))\n if (propTypeInfos) {\n // if source type info is provided, reorder the struct properties to match the expected type schema\n s = Object.fromEntries(Object.keys(propTypeInfos).map((x) => [x, s[x]]))\n typeInfo.genericArgs = propTypeInfos\n } else {\n // if not, reorder the struct properties alphabetically\n typeInfo.genericArgs = Object.fromEntries(\n Object.keys(typeInfo.genericArgs)\n .sort()\n .map((key) => [key, typeInfo.genericArgs[key]]),\n )\n s = Object.fromEntries(Object.keys(typeInfo.genericArgs).map((key) => [key, s[key]]))\n }\n return new Struct(typeInfo, s)\n }\n\n throw new CodeError(`Unsupported type for encoding: ${typeof value}`)\n}\n\n/** @internal */\nexport const toBytes = (val: unknown, sourceTypeInfoString?: string): bytes => {\n return asBytes(toUint8Array(val, sourceTypeInfoString))\n}\n\n/** @internal */\nexport const toUint8Array = (val: unknown, sourceTypeInfoString?: string): Uint8Array => {\n const uint64Val = asMaybeUint64Cls(val, false)\n if (uint64Val !== undefined) {\n return uint64Val.toBytes().asUint8Array()\n }\n const bytesVal = asMaybeBytesCls(val)\n if (bytesVal !== undefined) {\n return bytesVal.asUint8Array()\n }\n const bigUintVal = asMaybeBigUintCls(val)\n if (bigUintVal !== undefined) {\n return bigUintVal.toBytes().asUint8Array()\n }\n if (val instanceof BytesBackedCls) {\n return asUint8Array(val.bytes)\n }\n if (val instanceof Uint64BackedCls) {\n return asUint64Cls(val.uint64).toBytes().asUint8Array()\n }\n if (Array.isArray(val) || typeof val === 'object') {\n const arc4Encoded = getArc4Encoded(val, sourceTypeInfoString)\n return (arc4Encoded as _ARC4Encodedint8Array).uint8ArrayValue ?? asUint8Array(arc4Encoded.bytes)\n }\n throw new InternalError(`Invalid type for bytes: ${nameOfType(val)}`)\n}\n\n/** @internal */\nexport const getEncoder = <T>(typeInfo: TypeInfo): fromBytes<T> => {\n const mutableTupleFromBytes = (value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none') => {\n const tuple = Tuple.fromBytes(value, typeInfo, prefix)\n return asNumber(tuple.bytes.length) ? tuple.native : ([] as unknown as typeof tuple.native)\n }\n const readonlyMutableTupleFromBytes = (\n value: StubBytesCompat | Uint8Array,\n typeInfo: string | TypeInfo,\n prefix: 'none' | 'log' = 'none',\n ) => {\n const result = mutableTupleFromBytes(value, typeInfo, prefix)\n return result as Readonly<typeof result>\n }\n const mutableObjectFromBytes = (value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none') => {\n const struct = Struct.fromBytes(value, typeInfo, prefix)\n return asNumber(struct.bytes.length) ? struct.native : ({} as unknown as typeof struct.native)\n }\n const readonlyObjectFromBytes = (value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none') => {\n const result = mutableObjectFromBytes(value, typeInfo, prefix)\n return result as Readonly<typeof result>\n }\n const arrayFromBytes = (value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none') => {\n const dynamicArray = DynamicArray.fromBytes(value, typeInfo, prefix)\n return asNumber(dynamicArray.bytes.length) ? dynamicArray.native : ([] as unknown as typeof dynamicArray.native)\n }\n const readonlyArrayFromBytes = (value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none') => {\n const result = arrayFromBytes(value, typeInfo, prefix)\n return result as Readonly<typeof result>\n }\n const referenceArrayFromBytes = (value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none') => {\n const dynamicArray = DynamicArray.fromBytes(value, typeInfo, prefix)\n return new ReferenceArray(\n typeInfo,\n ...(asNumber(dynamicArray.bytes.length) ? dynamicArray.native : ([] as unknown as typeof dynamicArray.native)),\n )\n }\n const fixedArrayFromBytes = (value: StubBytesCompat | Uint8Array, typeInfo: string | TypeInfo, prefix: 'none' | 'log' = 'none') => {\n const staticArray = StaticArray.fromBytes(value, typeInfo, prefix)\n return new FixedArray(\n typeInfo,\n ...(asNumber(staticArray.uint8ArrayValue.length) ? staticArray.native : ([] as unknown as typeof staticArray.native)),\n )\n }\n const encoders: Record<string, fromBytes<DeliberateAny>> = {\n account: (value) => AccountCls.fromBytes(value),\n application: (value) => ApplicationCls.fromBytes(value),\n asset: (value) => AssetCls.fromBytes(value),\n boolean: booleanFromBytes,\n biguint: bigUintFromBytes,\n 'bytes(<.*>)?': bytesFromBytes,\n string: stringFromBytes,\n uint64: uint64FromBytes,\n OnCompleteAction: onCompletionFromBytes,\n TransactionType: transactionTypeFromBytes,\n Address: Address.fromBytes,\n Bool: Bool.fromBytes,\n Byte: Byte.fromBytes,\n Str: Str.fromBytes,\n 'Uint<.*>': Uint.fromBytes,\n 'UFixed<.*>': UFixed.fromBytes,\n 'StaticArray<.*>': StaticArray.fromBytes,\n 'DynamicArray<.*>': DynamicArray.fromBytes,\n 'Tuple(<.*>)?': Tuple.fromBytes,\n 'ReadonlyTuple(<.*>)?': readonlyMutableTupleFromBytes,\n 'MutableTuple(<.*>)?': mutableTupleFromBytes,\n 'Struct(<.*>)?': Struct.fromBytes,\n DynamicBytes: DynamicBytes.fromBytes,\n 'StaticBytes<.*>': StaticBytes.fromBytes,\n object: Struct.fromBytes,\n 'Object<.*>': mutableObjectFromBytes,\n 'ReadonlyObject<.*>': readonlyObjectFromBytes,\n 'ReferenceArray<.*>': referenceArrayFromBytes,\n 'FixedArray<.*>': fixedArrayFromBytes,\n 'Array<.*>': arrayFromBytes,\n 'ReadonlyArray<.*>': readonlyArrayFromBytes,\n }\n\n const encoder = Object.entries(encoders).find(([k, _]) => new RegExp(`^${k}$`, 'i').test(typeInfo.name))?.[1]\n if (!encoder) {\n throw new Error(`No encoder found for type ${typeInfo.name}`)\n }\n return encoder as fromBytes<T>\n}\n\nconst setARC4TypeSymbol = (obj: DeliberateAny, value: string) => {\n const symbol = Object.getOwnPropertySymbols(obj).find((s) => s.description === 'ARC4Type')\n if (!symbol) return\n obj[symbol] = value\n}\n","import type { bytes, gtxn, MimcConfigurations, op, VrfVerify } from '@algorandfoundation/algorand-typescript'\nimport { Ecdsa, OnCompleteAction } from '@algorandfoundation/algorand-typescript'\nimport elliptic from 'elliptic'\nimport js_sha256 from 'js-sha256'\nimport js_sha3 from 'js-sha3'\nimport js_sha512 from 'js-sha512'\nimport nacl from 'tweetnacl'\nimport { LOGIC_DATA_PREFIX, PROGRAM_TAG } from '../constants'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport { InternalError, NotImplementedError } from '../errors'\nimport { asBytes, asBytesCls, asUint8Array, concatUint8Arrays } from '../util'\nimport type { StubBytesCompat, StubUint64Compat } from './primitives'\nimport { Bytes, BytesCls, Uint64Cls } from './primitives'\n\n/** @internal */\nexport const sha256 = (a: StubBytesCompat): bytes<32> => {\n const bytesA = BytesCls.fromCompat(a)\n const hashArray = js_sha256.sha256.create().update(bytesA.asUint8Array()).digest()\n const hashBytes = Bytes(new Uint8Array(hashArray), { length: 32 })\n return hashBytes\n}\n\n/** @internal */\nexport const sha3_256 = (a: StubBytesCompat): bytes<32> => {\n const bytesA = BytesCls.fromCompat(a)\n const hashArray = js_sha3.sha3_256.create().update(bytesA.asUint8Array()).digest()\n const hashBytes = Bytes(new Uint8Array(hashArray), { length: 32 })\n return hashBytes\n}\n\n/** @internal */\nexport const keccak256 = (a: StubBytesCompat): bytes<32> => {\n const bytesA = BytesCls.fromCompat(a)\n const hashArray = js_sha3.keccak256.create().update(bytesA.asUint8Array()).digest()\n const hashBytes = Bytes(new Uint8Array(hashArray), { length: 32 })\n return hashBytes\n}\n\n/** @internal */\nexport const sha512_256 = (a: StubBytesCompat): bytes<32> => {\n const bytesA = BytesCls.fromCompat(a)\n const hashArray = js_sha512.sha512_256.create().update(bytesA.asUint8Array()).digest()\n const hashBytes = Bytes(new Uint8Array(hashArray), { length: 32 })\n return hashBytes\n}\n\n/** @internal */\nexport const ed25519verifyBare = (a: StubBytesCompat, b: StubBytesCompat, c: StubBytesCompat): boolean => {\n const bytesA = BytesCls.fromCompat(a)\n const bytesB = BytesCls.fromCompat(b)\n const bytesC = BytesCls.fromCompat(c)\n return nacl.sign.detached.verify(bytesA.asUint8Array(), bytesB.asUint8Array(), bytesC.asUint8Array())\n}\n\n/** @internal */\nexport const ed25519verify = (a: StubBytesCompat, b: StubBytesCompat, c: StubBytesCompat): boolean => {\n const txn = lazyContext.activeGroup.activeTransaction as gtxn.ApplicationCallTxn\n const programBytes = asBytesCls(txn.onCompletion == OnCompleteAction.ClearState ? txn.clearStateProgram : txn.approvalProgram)\n\n const logicSig = concatUint8Arrays(asUint8Array(PROGRAM_TAG), programBytes.asUint8Array())\n const logicSigAddress = js_sha512.sha512_256.array(logicSig)\n\n const addressBytes = Bytes(logicSigAddress)\n const data = LOGIC_DATA_PREFIX.concat(addressBytes).concat(asBytes(a))\n return ed25519verifyBare(data, b, c)\n}\n\n/** @internal */\nexport const ecdsaVerify = (\n v: Ecdsa,\n a: StubBytesCompat,\n b: StubBytesCompat,\n c: StubBytesCompat,\n d: StubBytesCompat,\n e: StubBytesCompat,\n): boolean => {\n const dataBytes = BytesCls.fromCompat(a)\n const sigRBytes = BytesCls.fromCompat(b)\n const sigSBytes = BytesCls.fromCompat(c)\n const pubkeyXBytes = BytesCls.fromCompat(d)\n const pubkeyYBytes = BytesCls.fromCompat(e)\n\n const publicKey = BytesCls.fromCompat(new Uint8Array([0x04]))\n .concat(pubkeyXBytes)\n .concat(pubkeyYBytes)\n\n const ecdsa = new elliptic.ec(curveMap[v])\n const keyPair = ecdsa.keyFromPublic(publicKey.asUint8Array())\n return keyPair.verify(dataBytes.asUint8Array(), { r: sigRBytes.asUint8Array(), s: sigSBytes.asUint8Array() })\n}\n\n/** @internal */\nexport const ecdsaPkRecover = (\n v: Ecdsa,\n a: StubBytesCompat,\n b: StubUint64Compat,\n c: StubBytesCompat,\n d: StubBytesCompat,\n): readonly [bytes<32>, bytes<32>] => {\n if (v !== Ecdsa.Secp256k1) {\n throw new InternalError(`Unsupported ECDSA curve: ${v}`)\n }\n const dataBytes = BytesCls.fromCompat(a)\n const rBytes = BytesCls.fromCompat(c)\n const sBytes = BytesCls.fromCompat(d)\n const recoveryId = Uint64Cls.fromCompat(b)\n\n const ecdsa = new elliptic.ec(curveMap[v])\n const pubKey = ecdsa.recoverPubKey(\n dataBytes.asUint8Array(),\n { r: rBytes.asUint8Array(), s: sBytes.asUint8Array() },\n recoveryId.asNumber(),\n )\n\n const x = pubKey.getX().toArray('be')\n const y = pubKey.getY().toArray('be')\n return [Bytes(x, { length: 32 }), Bytes(y, { length: 32 })]\n}\n\n/** @internal */\nexport const ecdsaPkDecompress = (v: Ecdsa, a: StubBytesCompat): readonly [bytes<32>, bytes<32>] => {\n const bytesA = BytesCls.fromCompat(a)\n\n const ecdsa = new elliptic.ec(curveMap[v])\n const keyPair = ecdsa.keyFromPublic(bytesA.asUint8Array())\n const pubKey = keyPair.getPublic()\n\n const x = pubKey.getX().toArray('be')\n const y = pubKey.getY().toArray('be')\n return [Bytes(x, { length: 32 }), Bytes(y, { length: 32 })]\n}\n\n/** @internal */\nexport const vrfVerify = (_s: VrfVerify, _a: StubBytesCompat, _b: StubBytesCompat, _c: StubBytesCompat): readonly [bytes<64>, boolean] => {\n throw new NotImplementedError('vrfVerify')\n}\n\n/** @internal */\nexport const EllipticCurve = new Proxy({} as typeof op.EllipticCurve, {\n get: (_target, prop) => {\n throw new NotImplementedError(`EllipticCurve.${prop.toString()}`)\n },\n})\n\n/** @internal */\nexport const mimc = (_c: MimcConfigurations, _a: StubBytesCompat): bytes => {\n throw new NotImplementedError('mimc')\n}\n\n/** @internal */\nexport const falconVerify = (_a: StubBytesCompat, _b: StubBytesCompat, _c: StubBytesCompat): boolean => {\n throw new NotImplementedError('falconVerify')\n}\n\nconst curveMap = {\n [Ecdsa.Secp256k1]: 'secp256k1',\n [Ecdsa.Secp256r1]: 'p256',\n}\n","import type {\n Account as AccountType,\n Application as ApplicationType,\n bytes,\n gtxn,\n op,\n uint64,\n} from '@algorandfoundation/algorand-typescript'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport { asMaybeUint64Cls, asUint64 } from '../util'\nimport { Bytes, Uint64, type StubUint64Compat } from './primitives'\nimport { Account } from './reference'\n\nconst resolveAppIndex = (appIdOrIndex: StubUint64Compat): uint64 => {\n const input = asUint64(appIdOrIndex)\n if (input >= 1001) {\n return input\n }\n const txn = lazyContext.activeGroup.activeTransaction as gtxn.ApplicationCallTxn\n return txn.apps(input).id\n}\n\n/** @internal */\nexport const getApp = (app: ApplicationType | StubUint64Compat): ApplicationType | undefined => {\n try {\n const appId = asMaybeUint64Cls(app)\n if (appId !== undefined) {\n return lazyContext.ledger.getApplication(resolveAppIndex(appId))\n }\n return app as ApplicationType\n } catch {\n return undefined\n }\n}\n\n/** @internal */\nexport const AppParams: typeof op.AppParams = {\n appApprovalProgram(a: ApplicationType | StubUint64Compat): readonly [bytes, boolean] {\n const app = getApp(a)\n return app === undefined ? [Bytes(), false] : [app.approvalProgram, true]\n },\n appClearStateProgram(a: ApplicationType | StubUint64Compat): readonly [bytes, boolean] {\n const app = getApp(a)\n return app === undefined ? [Bytes(), false] : [app.clearStateProgram, true]\n },\n appGlobalNumUint(a: ApplicationType | StubUint64Compat): readonly [uint64, boolean] {\n const app = getApp(a)\n return app === undefined ? [Uint64(0), false] : [app.globalNumUint, true]\n },\n appGlobalNumByteSlice(a: ApplicationType | StubUint64Compat): readonly [uint64, boolean] {\n const app = getApp(a)\n return app === undefined ? [Uint64(0), false] : [app.globalNumBytes, true]\n },\n appLocalNumUint(a: ApplicationType | StubUint64Compat): readonly [uint64, boolean] {\n const app = getApp(a)\n return app === undefined ? [Uint64(0), false] : [app.localNumUint, true]\n },\n appLocalNumByteSlice(a: ApplicationType | StubUint64Compat): readonly [uint64, boolean] {\n const app = getApp(a)\n return app === undefined ? [Uint64(0), false] : [app.localNumBytes, true]\n },\n appExtraProgramPages(a: ApplicationType | StubUint64Compat): readonly [uint64, boolean] {\n const app = getApp(a)\n return app === undefined ? [Uint64(0), false] : [app.extraProgramPages, true]\n },\n appCreator(a: ApplicationType | StubUint64Compat): readonly [AccountType, boolean] {\n const app = getApp(a)\n return app === undefined ? [Account(), false] : [app.creator, true]\n },\n appAddress(a: ApplicationType | StubUint64Compat): readonly [AccountType, boolean] {\n const app = getApp(a)\n return app === undefined ? [Account(), false] : [app.address, true]\n },\n appVersion: function (a: ApplicationType | uint64): readonly [uint64, boolean] {\n const app = getApp(a)\n return app === undefined ? [Uint64(0), false] : [app.version, true]\n },\n}\n","import type { Account as AccountType, Asset as AssetType, bytes, gtxn, op, uint64 } from '@algorandfoundation/algorand-typescript'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport { asMaybeUint64Cls, asUint64 } from '../util'\nimport { Bytes, Uint64, type StubUint64Compat } from './primitives'\nimport { Account } from './reference'\n\nconst resolveAssetIndex = (assetIdOrIndex: StubUint64Compat): uint64 => {\n const input = asUint64(assetIdOrIndex)\n if (input >= 1001) {\n return input\n }\n const txn = lazyContext.activeGroup.activeTransaction as gtxn.ApplicationCallTxn\n return txn.assets(input).id\n}\n\n/** @internal */\nexport const getAsset = (asset: AssetType | StubUint64Compat): AssetType | undefined => {\n try {\n const assetId = asMaybeUint64Cls(asset)\n if (assetId !== undefined) {\n return lazyContext.ledger.getAsset(resolveAssetIndex(assetId))\n }\n return asset as AssetType\n } catch {\n return undefined\n }\n}\n\n/** @internal */\nexport const AssetParams: typeof op.AssetParams = {\n assetTotal(a: AssetType | StubUint64Compat): readonly [uint64, boolean] {\n const asset = getAsset(a)\n return asset === undefined ? [Uint64(0), false] : [asset.total, true]\n },\n assetDecimals(a: AssetType | StubUint64Compat): readonly [uint64, boolean] {\n const asset = getAsset(a)\n return asset === undefined ? [Uint64(0), false] : [asset.decimals, true]\n },\n assetDefaultFrozen(a: AssetType | StubUint64Compat): readonly [boolean, boolean] {\n const asset = getAsset(a)\n return asset === undefined ? [false, false] : [asset.defaultFrozen, true]\n },\n assetUnitName(a: AssetType | StubUint64Compat): readonly [bytes, boolean] {\n const asset = getAsset(a)\n return asset === undefined ? [Bytes(), false] : [asset.unitName, true]\n },\n assetName(a: AssetType | StubUint64Compat): readonly [bytes, boolean] {\n const asset = getAsset(a)\n return asset === undefined ? [Bytes(), false] : [asset.name, true]\n },\n assetUrl(a: AssetType | StubUint64Compat): readonly [bytes, boolean] {\n const asset = getAsset(a)\n return asset === undefined ? [Bytes(), false] : [asset.url, true]\n },\n assetMetadataHash(a: AssetType | StubUint64Compat): readonly [bytes<32>, boolean] {\n const asset = getAsset(a)\n return asset === undefined ? [Bytes() as bytes<32>, false] : [asset.metadataHash, true]\n },\n assetManager(a: AssetType | StubUint64Compat): readonly [AccountType, boolean] {\n const asset = getAsset(a)\n return asset === undefined ? [Account(), false] : [asset.manager, true]\n },\n assetReserve(a: AssetType | StubUint64Compat): readonly [AccountType, boolean] {\n const asset = getAsset(a)\n return asset === undefined ? [Account(), false] : [asset.reserve, true]\n },\n assetFreeze(a: AssetType | StubUint64Compat): readonly [AccountType, boolean] {\n const asset = getAsset(a)\n return asset === undefined ? [Account(), false] : [asset.freeze, true]\n },\n assetClawback(a: AssetType | StubUint64Compat): readonly [AccountType, boolean] {\n const asset = getAsset(a)\n return asset === undefined ? [Account(), false] : [asset.clawback, true]\n },\n assetCreator(a: AssetType | StubUint64Compat): readonly [AccountType, boolean] {\n const asset = getAsset(a)\n return asset === undefined ? [Account(), false] : [asset.creator, true]\n },\n}\n"],"names":["_Uint","_UFixed","_Byte","_Str","_Bool","_StaticArray","_Address","_DynamicArray","_Tuple","_Struct","_DynamicBytes","_StaticBytes","_ReferenceArray","_FixedArray","_ARC4Encoded"],"mappings":";;;;;;;;;;;;AAIA;AACO,MAAM,iBAAiB,GAAG,OAAc;IAC7C,GAAG,CAAC,MAAmC,EAAE,IAAiB,EAAA;AACxD,QAAA,MAAM,GAAG,GAAG,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,GAAG,GAAG;AACtD,QAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACf,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM;AAAE,gBAAA,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;AACnE,YAAA,MAAM,IAAI,QAAQ,CAAC,qBAAqB,CAAC;QAC3C;AAAO,aAAA,IAAI,IAAI,KAAK,MAAM,CAAC,QAAQ,EAAE;AACnC,YAAA,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QACzD;AAAO,aAAA,IAAI,IAAI,KAAK,SAAS,EAAE;AAC7B,YAAA,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QAChD;AAAO,aAAA,IAAI,IAAI,KAAK,MAAM,EAAE;AAC1B,YAAA,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CA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IAAI,CAAC;IACzE,CAAC;;;;;"}
package/index.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  import { OnCompleteAction, TransactionType } from '@algorandfoundation/algorand-typescript';
2
- import { g as getContractMethodAbiMetadata, a as getContractAbiMetadata } from './runtime-helpers-Dpv9_KsV.js';
3
- import { m as methodSelector, G as GlobalStateCls, L as LocalStateCls, C as ContractContext, c as checkRoutingConditions, A as ApplicationCallInnerTxnContext, I as ItxnParams, a as createInnerTxn, b as ApplicationCallTransaction, P as PaymentTransaction, K as KeyRegistrationTransaction, d as AssetConfigTransaction, e as AssetTransferTransaction, f as AssetFreezeTransaction } from './inner-transactions-pcawvv6H.js';
4
- import { a as asNumber, U as Uint64Cls, B as BigUintCls, b as BytesCls, A as AccountCls, c as AlgoTsPrimitiveCls, i as iterBigInt, d as Uint64Map, e as AccountMap, f as asBytes, g as Asset, h as asUint64, j as Application, k as asMaybeUint64Cls, l as asUint64Cls, m as AssetHolding, n as AccountData, o as ApplicationData, p as getDefaultAssetData, q as asBigInt, r as asMaybeBytesCls, s as asUint8Array, t as ApplicationCls, M as MAX_UINT64, u as ABI_RETURN_VALUE_LOG_PREFIX, v as lazyContext, T as TRANSACTION_GROUP_MAX_SIZE, w as Uint64, x as getRandomBigInt, y as asBigUintCls, z as BigUint, C as MAX_BYTES_SIZE, D as Bytes, E as Account, F as getRandomBytes, G as AssetCls, H as MAX_UINT512, I as MAX_UINT8, J as MAX_UINT16, K as MAX_UINT32, L as MAX_UINT128, N as MAX_UINT256, O as BITS_IN_BYTE, P as BaseContract, Q as ContextManager, R as DEFAULT_TEMPLATE_VAR_PREFIX } from './utils-DyUEnpf6.js';
5
- export { S as toExternalValue } from './utils-DyUEnpf6.js';
2
+ import { g as getContractMethodAbiMetadata, a as getContractAbiMetadata } from './runtime-helpers-qYkqK3cG.js';
3
+ import { m as methodSelector, G as GlobalStateCls, L as LocalStateCls, C as ContractContext, c as checkRoutingConditions, A as ApplicationCallInnerTxnContext, I as ItxnParams, a as createInnerTxn, b as ApplicationCallTransaction, P as PaymentTransaction, K as KeyRegistrationTransaction, d as AssetConfigTransaction, e as AssetTransferTransaction, f as AssetFreezeTransaction } from './inner-transactions-BNbmDFGO.js';
4
+ import { a as asNumber, U as Uint64Cls, B as BigUintCls, b as BytesCls, A as AccountCls, c as ApplicationCls, d as AssetCls, e as AlgoTsPrimitiveCls, i as iterBigInt, f as Uint64Map, g as AccountMap, h as asBytes, j as Asset, k as asUint64, l as Application, m as asMaybeUint64Cls, n as asUint64Cls, o as AssetHolding, p as AccountData, q as ApplicationData, r as getDefaultAssetData, s as asBigInt, t as asMaybeBytesCls, u as asUint8Array, M as MAX_UINT64, v as ABI_RETURN_VALUE_LOG_PREFIX, w as lazyContext, T as TRANSACTION_GROUP_MAX_SIZE, x as Uint64, y as getRandomBigInt, z as asBigUintCls, C as BigUint, D as MAX_BYTES_SIZE, E as Bytes, F as Account, G as getRandomBytes, H as MAX_UINT512, I as MAX_UINT8, J as MAX_UINT16, K as MAX_UINT32, L as MAX_UINT128, N as MAX_UINT256, O as BITS_IN_BYTE, P as BaseContract, Q as ContextManager, R as DEFAULT_TEMPLATE_VAR_PREFIX } from './utils-DbNSGKS_.js';
5
+ export { S as toExternalValue } from './utils-DbNSGKS_.js';
6
6
  import { I as InternalError, i as invariant } from './typescript-helpers-sobuICoc.js';
7
7
  export { A as AssertError, a as AvmError, C as CodeError, N as NotImplementedError } from './typescript-helpers-sobuICoc.js';
8
8
  import { Address as Address$1 } from '@algorandfoundation/algorand-typescript/arc4';
9
9
  import { encodingUtil } from '@algorandfoundation/puya-ts';
10
- import { G as GlobalData, V as VoterData, B as BlockData, b as btoi } from './pure-21u9pLrI.js';
11
- import { t as toUint8Array, A as Address, U as Uint, D as DynamicBytes, S as Str } from './asset-params-DV6t5Cy8.js';
10
+ import { G as GlobalData, V as VoterData, B as BlockData, b as btoi } from './pure-BGAOjiS7.js';
11
+ import { t as toUint8Array, A as Address, U as Uint, D as DynamicBytes, S as Str } from './asset-params-C64LPAdX.js';
12
12
  import { randomBytes } from 'crypto';
13
13
  import 'js-sha512';
14
14
  import 'assert';
@@ -255,6 +255,36 @@ function doAddEqualityTesters(expectObj) {
255
255
  // Defer to other testers
256
256
  return undefined;
257
257
  },
258
+ function AccountIsAccount(subject, test, customTesters) {
259
+ if (subject instanceof AccountCls) {
260
+ const testValue = test instanceof AccountCls ? test : undefined;
261
+ if (testValue !== undefined)
262
+ return this.equals(subject['data'], testValue['data'], customTesters);
263
+ return undefined;
264
+ }
265
+ // Defer to other testers
266
+ return undefined;
267
+ },
268
+ function ApplicationIsApplication(subject, test, customTesters) {
269
+ if (subject instanceof ApplicationCls) {
270
+ const testValue = test instanceof ApplicationCls ? test : undefined;
271
+ if (testValue !== undefined)
272
+ return this.equals(subject['data'], testValue['data'], customTesters);
273
+ return undefined;
274
+ }
275
+ // Defer to other testers
276
+ return undefined;
277
+ },
278
+ function AssetIsAsset(subject, test, customTesters) {
279
+ if (subject instanceof AssetCls) {
280
+ const testValue = test instanceof AssetCls ? test : undefined;
281
+ if (testValue !== undefined)
282
+ return this.equals(subject['data'], testValue['data'], customTesters);
283
+ return undefined;
284
+ }
285
+ // Defer to other testers
286
+ return undefined;
287
+ },
258
288
  ]);
259
289
  }
260
290
  /**
@@ -1588,7 +1618,12 @@ class TestExecutionContext {
1588
1618
  * @param {bytes | AccountType} val - The default sender account.
1589
1619
  */
1590
1620
  set defaultSender(val) {
1591
- this.#defaultSender = val instanceof AccountCls ? val : Account(val);
1621
+ if (val instanceof AccountCls) {
1622
+ this.#defaultSender = val;
1623
+ }
1624
+ else if (this.#defaultSender.bytes !== val) {
1625
+ this.#defaultSender = new AccountCls(val);
1626
+ }
1592
1627
  }
1593
1628
  /**
1594
1629
  * Returns the active logic signature arguments.
@@ -1707,6 +1742,7 @@ class TestExecutionContext {
1707
1742
  this.#compiledApps = [];
1708
1743
  this.#compiledLogicSigs = [];
1709
1744
  this.#applicationSpies = [];
1745
+ this.#defaultSender = this.any.account({ address: this.#defaultSender.bytes }); // reset default sender account data in ledger context
1710
1746
  ContextManager.reset();
1711
1747
  ContextManager.instance = this;
1712
1748
  }