@algorandfoundation/puya-ts 1.2.0-beta.37 → 1.2.0-beta.39

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.
Files changed (29) hide show
  1. package/{analyser-service-Bk9GEtDA.js → analyser-service-Cj7WmqeW.js} +3 -3
  2. package/{analyser-service-Bk9GEtDA.js.map → analyser-service-Cj7WmqeW.js.map} +1 -1
  3. package/analyserService.mjs +3 -3
  4. package/{arc4-clientgen-qBTlCOIm.js → arc4-clientgen-7yQnFyxH.js} +2 -2
  5. package/{arc4-clientgen-qBTlCOIm.js.map → arc4-clientgen-7yQnFyxH.js.map} +1 -1
  6. package/awst_build/ptypes/arc4-types.d.ts +3 -3
  7. package/awst_build/ptypes/index.d.ts +12 -12
  8. package/bin/puyats-clientgen.mjs +5 -5
  9. package/bin/puyats-ls.mjs +6 -6
  10. package/bin/run-cli.mjs +8 -8
  11. package/{check-node-version-CLFFTDHN.js → check-node-version-B3GLfQ0t.js} +3 -3
  12. package/{check-node-version-CLFFTDHN.js.map → check-node-version-B3GLfQ0t.js.map} +1 -1
  13. package/cli.mjs +8 -8
  14. package/{compile-ycpMcgmJ.js → compile-DnShUPv7.js} +6 -6
  15. package/{compile-ycpMcgmJ.js.map → compile-DnShUPv7.js.map} +1 -1
  16. package/{contract-class-model-BZeEDGw0.js → contract-class-model-D-NUE8Zg.js} +31 -31
  17. package/contract-class-model-D-NUE8Zg.js.map +1 -0
  18. package/index.mjs +23 -23
  19. package/{options-DD9MApH4.js → options-DLmtdJgF.js} +59 -59
  20. package/options-DLmtdJgF.js.map +1 -0
  21. package/package.json +2 -2
  22. package/{resolve-puya-path-Ba54kz9o.js → resolve-puya-path-CzSo6yHU.js} +4 -4
  23. package/{resolve-puya-path-Ba54kz9o.js.map → resolve-puya-path-CzSo6yHU.js.map} +1 -1
  24. package/{semver-B0p_0XuH.js → semver-DPkkKoZb.js} +2 -2
  25. package/{semver-B0p_0XuH.js.map → semver-DPkkKoZb.js.map} +1 -1
  26. package/{util-Aa8RgOmt.js → util-dcGns5-2.js} +2 -2
  27. package/{util-Aa8RgOmt.js.map → util-dcGns5-2.js.map} +1 -1
  28. package/contract-class-model-BZeEDGw0.js.map +0 -1
  29. package/options-DD9MApH4.js.map +0 -1
package/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { o as ABICompatibleInstanceType, q as ALL_OP_ENUMS, r as AccountFunction, s as AnyPType, t as ApplicationFunctionType, u as ApplicationTxnFunction, w as ApprovalProgram, x as ArrayGeneric, y as ArrayLiteralPType, z as ArrayPType, B as AssetConfigTxnFunction, D as AssetFreezeTxnFunction, E as AssetFunction, F as AssetTransferTxnFunction, G as BaseContractClassType, H as BigIntLiteralPType, J as BigIntPType, K as BigUintFunction, M as BooleanFunction, N as BoxGeneric, Q as BoxMapGeneric, R as BoxMapPType, S as BoxPType, T as BytesFunction, U as BytesGeneric, V as BytesPType, W as ClassMethodDecoratorContext, X as ClearStateProgram, Y as ClusteredContractClassType, Z as ClusteredPrototype, _ as ContractClassPType, $ as FixedArrayGeneric, a0 as FixedArrayPType, a1 as FunctionPType, a2 as GeneratorGeneric, a3 as GeneratorType, a4 as GenericPType, a5 as GlobalMapGeneric, a6 as GlobalMapType, a7 as GlobalStateGeneric, a8 as GlobalStateType, a9 as GroupTransactionPType, aa as ImmutableObjectPType, ab as InnerTransactionPType, ac as InstanceType, ad as InternalType, ae as IntersectionPType, af as IntrinsicEnumType, ag as IntrinsicFunctionGroupType, ah as IntrinsicFunctionGroupTypeType, ai as IntrinsicFunctionType, aj as IntrinsicFunctionTypeType, ak as IterableIteratorGeneric, al as IterableIteratorType, am as ItxnParamsPType, an as KeyRegistrationTxnFunction, ao as LibClassType, ap as LibFunctionType, aq as LibObjType, ar as LocalMapGeneric, as as LocalMapType, at as LocalStateGeneric, au as LocalStateType, av as LogicSigPType, aw as MutableObjectPType, ax as MutableTuplePType, ay as NamespacePType, az as NumberPType, aA as NumericLiteralPType, aB as ObjectLiteralPType, aC as ObjectWithOptionalFieldsType, aD as PType, aE as PaymentTxnFunction, aF as PolytypeClassMethodHelper, aG as PromiseGeneric, aH as PromiseType, aI as ReadonlyArrayGeneric, aJ as ReadonlyArrayPType, aK as ReadonlyGeneric, aL as ReadonlyTuplePType, aM as ReferenceArrayGeneric, aN as ReferenceArrayType, aO as StringFunction, aP as SuperPrototypeSelector, aQ as SuperPrototypeSelectorGeneric, aR as TemplateVarFunction, aS as TransactionFunction, aT as TransactionFunctionType, aU as TransientType, aV as TypeParameterType, aW as Uint64EnumMemberLiteralType, aX as Uint64EnumMemberType, aY as Uint64EnumType, aZ as Uint64Function, a_ as UnionPType, a$ as UnsupportedType, e as accountPType, h as anyGtxnType, b0 as anyItxnParamsType, b1 as anyItxnType, b2 as anyPType, n as applicationCallGtxnType, b3 as applicationCallItxnFn, b4 as applicationCallItxnParamsType, b5 as applicationItxnType, f as applicationPType, b6 as arc28EmitFunction, b7 as arc4AbiMethodDecorator, b8 as arc4BareMethodDecorator, b9 as arc4BaseContractType, ba as assertFunction, bb as assertMatchFunction, i as assetConfigGtxnType, bc as assetConfigItxnFn, bd as assetConfigItxnParamsType, be as assetConfigItxnType, m as assetFreezeGtxnType, bf as assetFreezeItxnFn, bg as assetFreezeItxnParamsType, bh as assetFreezeItxnType, g as assetPType, j as assetTransferGtxnType, bi as assetTransferItxnFn, bj as assetTransferItxnParamsType, bk as assetTransferItxnType, bl as base64PType, bm as baseContractType, bn as bigIntPType, bo as biguintPType, bp as boolPType, bq as bytesPType, br as bzeroFunction, bs as cloneFunctionPType, bt as compileFunctionType, bu as compiledContractType, bv as compiledLogicSigType, bw as contractOptionsDecorator, bx as ecPType, by as ecdsaPType, bz as ensureBudgetFunction, bA as errFunction, bB as esSymbol, bC as inputOnlyObjects, bD as isArrayType, bE as isObjectType, bF as isTupleLike, bG as itoaMethod, bH as itxnComposePType, k as keyRegistrationGtxnType, bI as keyRegistrationItxnFn, bJ as keyRegistrationItxnParamsType, bK as keyRegistrationItxnType, bL as logFunction, bM as loggedAssertFunction, bN as loggedErrFunction, bO as logicSigBaseType, bP as logicSigOptionsDecorator, bQ as matchFunction, bR as mimcConfigurationsPType, bS as neverPType, bT as nullPType, bU as numberPType, bV as onCompleteActionType, bW as opUpFeeSourceType, p as paymentGtxnType, bX as paymentItxnFn, bY as paymentItxnParamsType, bZ as paymentItxnType, b_ as readonlyDecorator, b$ as stringPType, c0 as submitGroupItxnFunction, c1 as transactionTypeType, c2 as uint64PType, c3 as undefinedPType, c4 as unknownPType, c5 as urangeFunction, c6 as validateEncodingFunctionPType, v as voidPType, c7 as vrfVerifyPType, c8 as uint8ArrayToBigInt, c9 as uint8ArrayToBase64, ca as uint8ArrayToBase32, cb as uint8ArrayToUtf8, cc as base64ToUint8Array, cd as base32ToUint8Array, ce as bigIntToUint8Array, cf as utf8ToUint8Array } from './contract-class-model-BZeEDGw0.js';
2
- export { A as AbsolutePath, L as LogLevel, cg as LogSource, a as LoggingContext, ch as SourceLocation } from './contract-class-model-BZeEDGw0.js';
3
- import { A as ARC4ArrayType, a as ARC4BoolClass, b as ARC4EncodedType, c as ARC4InstanceType, d as ARC4StrClass, e as ARC4StructClass, f as ARC4StructType, g as ARC4TupleType, h as AddressClass, i as Arc4TupleGeneric, B as ByteClass, C as ContractProxyGeneric, j as ContractProxyType, D as DynamicArrayGeneric, k as DynamicArrayType, l as DynamicBytesConstructor, m as DynamicBytesType, S as StaticArrayGeneric, n as StaticArrayType, o as StaticBytesGeneric, p as StaticBytesType, T as TypedApplicationCallResponseGeneric, q as TypedApplicationCallResponseType, U as UFixedNxMGeneric, r as UFixedNxMType, s as UintN128Class, t as UintN16Class, u as UintN256Class, v as UintN32Class, w as UintN64Class, x as UintN8Class, y as UintNGeneric, z as UintNType, E as abiCallFunction, F as arc4AddressAlias, G as arc4BooleanType, H as arc4ByteAlias, I as arc4StringType, J as arc4StructBaseType, K as compileArc4Function, L as convertBytesFunction, M as decodeArc4Function, N as encodeArc4Function, O as methodSelectorFunction, P as sizeOfFunction, Q as uint8ArrayToHex, R as hexToUint8Array } from './options-DD9MApH4.js';
4
- export { V as CompileOptions, W as TypeResolver, X as processInputPaths, Y as registerPTypes, Z as typeRegistry } from './options-DD9MApH4.js';
5
- export { c as compile } from './compile-ycpMcgmJ.js';
1
+ import { o as ABICompatibleInstanceType, q as ALL_OP_ENUMS, r as AccountFunction, s as AnyPType, t as ApplicationCallTxnFunction, u as ApplicationFunction, w as ApprovalProgram, x as ArrayGeneric, y as ArrayLiteralPType, z as ArrayPType, B as AssetConfigTxnFunction, D as AssetFreezeTxnFunction, E as AssetFunction, F as AssetTransferTxnFunction, G as BaseContractClassType, H as BigIntLiteralPType, J as BigIntPType, K as BigUintFunction, M as BooleanFunction, N as BoxGeneric, Q as BoxMapGeneric, R as BoxMapPType, S as BoxPType, T as BytesFunction, U as BytesGeneric, V as BytesPType, W as ClassMethodDecoratorContext, X as ClearStateProgram, Y as ClusteredContractClassType, Z as ClusteredPrototype, _ as ContractClassPType, $ as FixedArrayGeneric, a0 as FixedArrayPType, a1 as FunctionPType, a2 as GeneratorGeneric, a3 as GeneratorType, a4 as GenericPType, a5 as GlobalMapGeneric, a6 as GlobalMapType, a7 as GlobalStateGeneric, a8 as GlobalStateType, a9 as GroupTransactionPType, aa as ImmutableObjectPType, ab as InnerTransactionPType, ac as InstanceType, ad as InternalType, ae as IntersectionPType, af as IntrinsicEnumType, ag as IntrinsicFunctionGroupType, ah as IntrinsicFunctionGroupTypeType, ai as IntrinsicFunctionType, aj as IntrinsicFunctionTypeType, ak as IterableIteratorGeneric, al as IterableIteratorType, am as ItxnParamsPType, an as KeyRegistrationTxnFunction, ao as LibClassType, ap as LibFunctionType, aq as LibObjType, ar as LocalMapGeneric, as as LocalMapType, at as LocalStateGeneric, au as LocalStateType, av as LogicSigPType, aw as MutableObjectPType, ax as MutableTuplePType, ay as NamespacePType, az as NumberPType, aA as NumericLiteralPType, aB as ObjectLiteralPType, aC as ObjectWithOptionalFieldsType, aD as PType, aE as PaymentTxnFunction, aF as PolytypeClassMethodHelper, aG as PromiseGeneric, aH as PromiseType, aI as ReadonlyArrayGeneric, aJ as ReadonlyArrayPType, aK as ReadonlyGeneric, aL as ReadonlyTuplePType, aM as ReferenceArrayGeneric, aN as ReferenceArrayType, aO as StringFunction, aP as SuperPrototypeSelector, aQ as SuperPrototypeSelectorGeneric, aR as TemplateVarFunction, aS as TransactionFunction, aT as TransactionFunctionType, aU as TransientType, aV as TypeParameterType, aW as Uint64EnumMemberLiteralType, aX as Uint64EnumMemberType, aY as Uint64EnumType, aZ as Uint64Function, a_ as UnionPType, a$ as UnsupportedType, e as accountPType, h as anyGtxnType, b0 as anyItxnParamsType, b1 as anyItxnType, b2 as anyPType, n as applicationCallGtxnType, b3 as applicationCallItxnFunction, b4 as applicationCallItxnParamsType, b5 as applicationCallItxnType, f as applicationPType, b6 as arc28EmitFunction, b7 as arc4AbiMethodDecorator, b8 as arc4BareMethodDecorator, b9 as arc4BaseContractType, ba as assertFunction, bb as assertMatchFunction, i as assetConfigGtxnType, bc as assetConfigItxnFunction, bd as assetConfigItxnParamsType, be as assetConfigItxnType, m as assetFreezeGtxnType, bf as assetFreezeItxnFunction, bg as assetFreezeItxnParamsType, bh as assetFreezeItxnType, g as assetPType, j as assetTransferGtxnType, bi as assetTransferItxnFunction, bj as assetTransferItxnParamsType, bk as assetTransferItxnType, bl as base64PType, bm as baseContractType, bn as bigIntPType, bo as biguintPType, bp as boolPType, bq as bytesPType, br as bzeroFunction, bs as cloneFunction, bt as compileFunction, bu as compiledContractType, bv as compiledLogicSigType, bw as contractOptionsDecorator, bx as ecPType, by as ecdsaPType, bz as ensureBudgetFunction, bA as errFunction, bB as esSymbol, bC as inputOnlyObjects, bD as isArrayType, bE as isObjectType, bF as isTupleLike, bG as itoaMethod, bH as itxnComposePType, k as keyRegistrationGtxnType, bI as keyRegistrationItxnFunction, bJ as keyRegistrationItxnParamsType, bK as keyRegistrationItxnType, bL as logFunction, bM as loggedAssertFunction, bN as loggedErrFunction, bO as logicSigBaseType, bP as logicSigOptionsDecorator, bQ as matchFunction, bR as mimcConfigurationsPType, bS as neverPType, bT as nullPType, bU as numberPType, bV as onCompleteActionType, bW as opUpFeeSourceType, p as paymentGtxnType, bX as paymentItxnFunction, bY as paymentItxnParamsType, bZ as paymentItxnType, b_ as readonlyDecorator, b$ as stringPType, c0 as submitGroupItxnFunction, c1 as transactionTypeType, c2 as uint64PType, c3 as undefinedPType, c4 as unknownPType, c5 as urangeFunction, c6 as validateEncodingFunction, v as voidPType, c7 as vrfVerifyPType, c8 as uint8ArrayToBigInt, c9 as uint8ArrayToBase64, ca as uint8ArrayToBase32, cb as uint8ArrayToUtf8, cc as base64ToUint8Array, cd as base32ToUint8Array, ce as bigIntToUint8Array, cf as utf8ToUint8Array } from './contract-class-model-D-NUE8Zg.js';
2
+ export { A as AbsolutePath, L as LogLevel, cg as LogSource, a as LoggingContext, ch as SourceLocation } from './contract-class-model-D-NUE8Zg.js';
3
+ import { A as ARC4ArrayType, a as ARC4BoolClass, b as ARC4EncodedType, c as ARC4InstanceType, d as ARC4StrClass, e as ARC4StructClass, f as ARC4StructType, g as ARC4TupleGeneric, h as ARC4TupleType, i as AddressClass, B as ByteClass, C as ContractProxyGeneric, j as ContractProxyType, D as DynamicArrayGeneric, k as DynamicArrayType, l as DynamicBytesClass, S as StaticArrayGeneric, m as StaticArrayType, n as StaticBytesGeneric, o as StaticBytesType, T as TypedApplicationCallResponseGeneric, p as TypedApplicationCallResponseType, U as UFixedNxMGeneric, q as UFixedNxMType, r as UintN128Class, s as UintN16Class, t as UintN256Class, u as UintN32Class, v as UintN64Class, w as UintN8Class, x as UintNGeneric, y as UintNType, z as abiCallFunction, E as arc4AddressAlias, F as arc4BooleanType, G as arc4ByteAlias, H as arc4StringType, I as arc4StructBaseType, J as compileArc4Function, K as convertBytesFunction, L as decodeArc4Function, M as dynamicBytesType, N as encodeArc4Function, O as methodSelectorFunction, P as sizeOfFunction, Q as uint8ArrayToHex, R as hexToUint8Array } from './options-DLmtdJgF.js';
4
+ export { V as CompileOptions, W as TypeResolver, X as processInputPaths, Y as registerPTypes, Z as typeRegistry } from './options-DLmtdJgF.js';
5
+ export { c as compile } from './compile-DnShUPv7.js';
6
6
  import 'typescript';
7
7
  import 'node:fs';
8
8
  import 'node:util';
@@ -22,13 +22,13 @@ import 'net';
22
22
  import 'change-case';
23
23
  import 'glob';
24
24
  import 'minimatch';
25
- import './arc4-clientgen-qBTlCOIm.js';
25
+ import './arc4-clientgen-7yQnFyxH.js';
26
26
  import '@algorandfoundation/algokit-utils/abi';
27
27
  import 'fs';
28
28
  import 'fs/promises';
29
- import './semver-B0p_0XuH.js';
29
+ import './semver-DPkkKoZb.js';
30
30
  import 'node:url';
31
- import './resolve-puya-path-Ba54kz9o.js';
31
+ import './resolve-puya-path-CzSo6yHU.js';
32
32
  import 'signal-exit';
33
33
  import 'tar';
34
34
  import 'node:zlib';
@@ -46,14 +46,14 @@ var forExport = /*#__PURE__*/Object.freeze({
46
46
  ARC4StrClass: ARC4StrClass,
47
47
  ARC4StructClass: ARC4StructClass,
48
48
  ARC4StructType: ARC4StructType,
49
+ ARC4TupleGeneric: ARC4TupleGeneric,
49
50
  ARC4TupleType: ARC4TupleType,
50
51
  AccountFunction: AccountFunction,
51
52
  AddressClass: AddressClass,
52
53
  AnyPType: AnyPType,
53
- ApplicationFunctionType: ApplicationFunctionType,
54
- ApplicationTxnFunction: ApplicationTxnFunction,
54
+ ApplicationCallTxnFunction: ApplicationCallTxnFunction,
55
+ ApplicationFunction: ApplicationFunction,
55
56
  ApprovalProgram: ApprovalProgram,
56
- Arc4TupleGeneric: Arc4TupleGeneric,
57
57
  ArrayGeneric: ArrayGeneric,
58
58
  ArrayLiteralPType: ArrayLiteralPType,
59
59
  ArrayPType: ArrayPType,
@@ -83,8 +83,7 @@ var forExport = /*#__PURE__*/Object.freeze({
83
83
  ContractProxyType: ContractProxyType,
84
84
  DynamicArrayGeneric: DynamicArrayGeneric,
85
85
  DynamicArrayType: DynamicArrayType,
86
- DynamicBytesConstructor: DynamicBytesConstructor,
87
- DynamicBytesType: DynamicBytesType,
86
+ DynamicBytesClass: DynamicBytesClass,
88
87
  FixedArrayGeneric: FixedArrayGeneric,
89
88
  FixedArrayPType: FixedArrayPType,
90
89
  FunctionPType: FunctionPType,
@@ -173,9 +172,9 @@ var forExport = /*#__PURE__*/Object.freeze({
173
172
  anyItxnType: anyItxnType,
174
173
  anyPType: anyPType,
175
174
  applicationCallGtxnType: applicationCallGtxnType,
176
- applicationCallItxnFn: applicationCallItxnFn,
175
+ applicationCallItxnFunction: applicationCallItxnFunction,
177
176
  applicationCallItxnParamsType: applicationCallItxnParamsType,
178
- applicationItxnType: applicationItxnType,
177
+ applicationCallItxnType: applicationCallItxnType,
179
178
  applicationPType: applicationPType,
180
179
  arc28EmitFunction: arc28EmitFunction,
181
180
  arc4AbiMethodDecorator: arc4AbiMethodDecorator,
@@ -189,16 +188,16 @@ var forExport = /*#__PURE__*/Object.freeze({
189
188
  assertFunction: assertFunction,
190
189
  assertMatchFunction: assertMatchFunction,
191
190
  assetConfigGtxnType: assetConfigGtxnType,
192
- assetConfigItxnFn: assetConfigItxnFn,
191
+ assetConfigItxnFunction: assetConfigItxnFunction,
193
192
  assetConfigItxnParamsType: assetConfigItxnParamsType,
194
193
  assetConfigItxnType: assetConfigItxnType,
195
194
  assetFreezeGtxnType: assetFreezeGtxnType,
196
- assetFreezeItxnFn: assetFreezeItxnFn,
195
+ assetFreezeItxnFunction: assetFreezeItxnFunction,
197
196
  assetFreezeItxnParamsType: assetFreezeItxnParamsType,
198
197
  assetFreezeItxnType: assetFreezeItxnType,
199
198
  assetPType: assetPType,
200
199
  assetTransferGtxnType: assetTransferGtxnType,
201
- assetTransferItxnFn: assetTransferItxnFn,
200
+ assetTransferItxnFunction: assetTransferItxnFunction,
202
201
  assetTransferItxnParamsType: assetTransferItxnParamsType,
203
202
  assetTransferItxnType: assetTransferItxnType,
204
203
  base64PType: base64PType,
@@ -208,14 +207,15 @@ var forExport = /*#__PURE__*/Object.freeze({
208
207
  boolPType: boolPType,
209
208
  bytesPType: bytesPType,
210
209
  bzeroFunction: bzeroFunction,
211
- cloneFunctionPType: cloneFunctionPType,
210
+ cloneFunction: cloneFunction,
212
211
  compileArc4Function: compileArc4Function,
213
- compileFunctionType: compileFunctionType,
212
+ compileFunction: compileFunction,
214
213
  compiledContractType: compiledContractType,
215
214
  compiledLogicSigType: compiledLogicSigType,
216
215
  contractOptionsDecorator: contractOptionsDecorator,
217
216
  convertBytesFunction: convertBytesFunction,
218
217
  decodeArc4Function: decodeArc4Function,
218
+ dynamicBytesType: dynamicBytesType,
219
219
  ecPType: ecPType,
220
220
  ecdsaPType: ecdsaPType,
221
221
  encodeArc4Function: encodeArc4Function,
@@ -229,7 +229,7 @@ var forExport = /*#__PURE__*/Object.freeze({
229
229
  itoaMethod: itoaMethod,
230
230
  itxnComposePType: itxnComposePType,
231
231
  keyRegistrationGtxnType: keyRegistrationGtxnType,
232
- keyRegistrationItxnFn: keyRegistrationItxnFn,
232
+ keyRegistrationItxnFunction: keyRegistrationItxnFunction,
233
233
  keyRegistrationItxnParamsType: keyRegistrationItxnParamsType,
234
234
  keyRegistrationItxnType: keyRegistrationItxnType,
235
235
  logFunction: logFunction,
@@ -246,7 +246,7 @@ var forExport = /*#__PURE__*/Object.freeze({
246
246
  onCompleteActionType: onCompleteActionType,
247
247
  opUpFeeSourceType: opUpFeeSourceType,
248
248
  paymentGtxnType: paymentGtxnType,
249
- paymentItxnFn: paymentItxnFn,
249
+ paymentItxnFunction: paymentItxnFunction,
250
250
  paymentItxnParamsType: paymentItxnParamsType,
251
251
  paymentItxnType: paymentItxnType,
252
252
  readonlyDecorator: readonlyDecorator,
@@ -258,7 +258,7 @@ var forExport = /*#__PURE__*/Object.freeze({
258
258
  undefinedPType: undefinedPType,
259
259
  unknownPType: unknownPType,
260
260
  urangeFunction: urangeFunction,
261
- validateEncodingFunctionPType: validateEncodingFunctionPType,
261
+ validateEncodingFunction: validateEncodingFunction,
262
262
  voidPType: voidPType,
263
263
  vrfVerifyPType: vrfVerifyPType
264
264
  });
@@ -1,4 +1,4 @@
1
- import { ao as LibClassType, d as Constants, bp as boolPType, co as wtypes, b$ as stringPType, a4 as GenericPType, cp as codeInvariant, aL as ReadonlyTuplePType, ax as MutableTuplePType, aD as PType, aA as NumericLiteralPType, c2 as uint64PType, bo as biguintPType, z as ArrayPType, aJ as ReadonlyArrayPType, e as accountPType, bq as bytesPType, ap as LibFunctionType, cq as invariant, _ as ContractClassPType, bu as compiledContractType, aa as ImmutableObjectPType, b5 as applicationItxnType, v as voidPType, aw as MutableObjectPType, I as InternalError, c as CodeError, cr as throwError, cs as StringConstant, ct as BytesConstant, cu as IntegerConstant, cv as BoolConstant, cw as AddressConstant, cx as MethodConstant, cy as DecimalConstant, cz as TemplateVar, cg as LogSource, L as LogLevel, cA as instanceOfAny, cB as SingleEvaluation, cC as VarExpression, cD as nodeFactory, cE as NotSupported, l as logger, cF as TupleItemExpression, cG as FieldExpression, cH as IndexExpression, cI as TupleExpression, cJ as AppStateExpression, cK as AppAccountStateExpression, cL as BoxValueExpression, cM as StateGetEx, cN as StateGet, aU as TransientType, bU as numberPType, bn as bigIntPType, b6 as arc28EmitFunction, y as ArrayLiteralPType, H as BigIntLiteralPType, cO as hasFlags, cP as BinaryBooleanOperator, ay as NamespacePType, bm as baseContractType, b9 as arc4BaseContractType, cQ as SymbolName, a_ as UnionPType, a9 as GroupTransactionPType, h as anyGtxnType, aX as Uint64EnumMemberType, aV as TypeParameterType, bB as esSymbol, c4 as unknownPType, bS as neverPType, b2 as anyPType, bT as nullPType, c3 as undefinedPType, Z as ClusteredPrototype, ae as IntersectionPType, bO as logicSigBaseType, av as LogicSigPType, aY as Uint64EnumType, a1 as FunctionPType, w as ApprovalProgram, X as ClearStateProgram, cn as isIn, R as BoxMapPType, S as BoxPType, as as LocalMapType, au as LocalStateType, a6 as GlobalMapType, a8 as GlobalStateType, aP as SuperPrototypeSelector, Y as ClusteredContractClassType, ch as SourceLocation, cR as intersectsFlags, cS as extractModuleName, cT as toSubScript, A as AbsolutePath, cU as CompilationSet, cV as ARC4ABIMethodConfig, C as ContractReference, V as BytesPType, cW as EqualityComparison, aB as ObjectLiteralPType, bE as isObjectType$1, b_ as readonlyDecorator, b7 as arc4AbiMethodDecorator, b8 as arc4BareMethodDecorator, cX as ARC4CreateOption, cY as NewArray, O as OnCompletionAction, cZ as BytesEncoding, ce as bigIntToUint8Array, c_ as FixableCodeError, c$ as UInt64BinaryOperator, d0 as tryConvertEnum, d1 as NumericComparison, d2 as UInt64UnaryOperator, bG as itoaMethod, aZ as Uint64Function, d3 as UInt64PostfixUnaryOperator, a0 as FixedArrayPType, al as IterableIteratorType, ak as IterableIteratorGeneric, f as applicationPType, g as assetPType, bV as onCompleteActionType, d4 as wrapInCodeError, cd as base32ToUint8Array, c1 as transactionTypeType, d5 as TransactionKind, bt as compileFunctionType, bv as compiledLogicSigType, d6 as LogicSigReference, ab as InnerTransactionPType, aT as TransactionFunctionType, c0 as submitGroupItxnFunction, am as ItxnParamsPType, d7 as getInnerTransactionType, d8 as getItxnParamsType, d9 as CompiledContract, da as ARC4BareMethodConfig, db as MethodSignature, cj as enumFromValue, x as ArrayGeneric, $ as FixedArrayGeneric, cm as zipStrict, bD as isArrayType, bF as isTupleLike, bQ as matchFunction, bb as assertMatchFunction, dc as BigUIntBinaryOperator, K as BigUintFunction, dd as BigUIntPostfixUnaryOperator, cf as utf8ToUint8Array, de as BytesBinaryOperator, df as IntrinsicCall, cb as uint8ArrayToUtf8, T as BytesFunction, U as BytesGeneric, cc as base64ToUint8Array, dg as enumKeyFromValue, dh as BytesUnaryOperator, bs as cloneFunctionPType, bw as contractOptionsDecorator, bz as ensureBudgetFunction, di as PuyaLibFunction, bW as opUpFeeSourceType, af as IntrinsicEnumType, bP as logicSigOptionsDecorator, ac as InstanceType, aC as ObjectWithOptionalFieldsType, c7 as vrfVerifyPType, bR as mimcConfigurationsPType, by as ecdsaPType, bx as ecPType, bl as base64PType, ag as IntrinsicFunctionGroupType, dj as Expression, ai as IntrinsicFunctionType, aM as ReferenceArrayGeneric, aN as ReferenceArrayType, dk as AppStorageKind, a$ as UnsupportedType, dl as transientTypeErrors, a7 as GlobalStateGeneric, aR as TemplateVarFunction, dm as getGroupTransactionType, bH as itxnComposePType, aW as Uint64EnumMemberLiteralType, b0 as anyItxnParamsType, c6 as validateEncodingFunctionPType, M as BooleanFunction, aO as StringFunction, aI as ReadonlyArrayGeneric, aK as ReadonlyGeneric, a2 as GeneratorGeneric, a3 as GeneratorType, aG as PromiseGeneric, aH as PromiseType, W as ClassMethodDecoratorContext, aQ as SuperPrototypeSelectorGeneric, aF as PolytypeClassMethodHelper, bL as logFunction, ba as assertFunction, bA as errFunction, bM as loggedAssertFunction, bN as loggedErrFunction, c5 as urangeFunction, br as bzeroFunction, aj as IntrinsicFunctionTypeType, q as ALL_OP_ENUMS, ah as IntrinsicFunctionGroupTypeType, a5 as GlobalMapGeneric, at as LocalStateGeneric, ar as LocalMapGeneric, N as BoxGeneric, Q as BoxMapGeneric, t as ApplicationFunctionType, r as AccountFunction, E as AssetFunction, p as paymentGtxnType, aE as PaymentTxnFunction, k as keyRegistrationGtxnType, an as KeyRegistrationTxnFunction, i as assetConfigGtxnType, B as AssetConfigTxnFunction, j as assetTransferGtxnType, F as AssetTransferTxnFunction, m as assetFreezeGtxnType, D as AssetFreezeTxnFunction, n as applicationCallGtxnType, u as ApplicationTxnFunction, aS as TransactionFunction, bX as paymentItxnFn, bI as keyRegistrationItxnFn, bc as assetConfigItxnFn, bi as assetTransferItxnFn, bf as assetFreezeItxnFn, b3 as applicationCallItxnFn, bZ as paymentItxnType, bK as keyRegistrationItxnType, be as assetConfigItxnType, bk as assetTransferItxnType, bh as assetFreezeItxnType, bY as paymentItxnParamsType, bJ as keyRegistrationItxnParamsType, bd as assetConfigItxnParamsType, bj as assetTransferItxnParamsType, bg as assetFreezeItxnParamsType, b4 as applicationCallItxnParamsType, bC as inputOnlyObjects, dn as Contract, dp as InstanceSuperMethodTarget, dq as ExpressionStatement, dr as AssertExpression, ds as VoidConstant, dt as ArrayConcat, du as ArrayPop, dv as ArrayReplace, dw as ArrayLength, dx as SizeOf, dy as UpdateInnerTransaction, dz as CheckedMaybe, dA as StageInnerTransactions, dB as SubmitInnerTransaction, dC as AssignmentExpression, dD as CommaExpression, dE as NumericComparisonExpression, dF as BytesComparisonExpression, dG as PuyaLibCall, dH as UInt64UnaryOperation, dI as UInt64PostfixUnaryOperation, dJ as BigUIntPostfixUnaryOperation, dK as BytesUnaryOperation, dL as UInt64BinaryOperation, dM as BigUIntBinaryOperation, dN as BooleanBinaryOperation, dO as Not, dP as Emit, dQ as Range, dR as Enumeration, dS as Reversed, dT as StateExists, dU as ARC4Router, dV as MethodSignatureString, dW as SubroutineID, dX as ContractMethodTarget, dY as InstanceMethodTarget, ca as uint8ArrayToBase32, ck as mkDirIfNotExists, dZ as patchErrorLocation, d_ as Goto, d$ as ReturnStatement, e0 as ContractMethod, e1 as sameSets, b as ContractClassModel, e2 as Subroutine, e3 as LogicSigClassModel, e4 as ptypeIn, e5 as expandMaybeArray, a as LoggingContext, P as PuyaError } from './contract-class-model-BZeEDGw0.js';
1
+ import { ao as LibClassType, d as Constants, bp as boolPType, co as wtypes, b$ as stringPType, a4 as GenericPType, cp as codeInvariant, aL as ReadonlyTuplePType, ax as MutableTuplePType, aD as PType, aA as NumericLiteralPType, c2 as uint64PType, bo as biguintPType, z as ArrayPType, aJ as ReadonlyArrayPType, e as accountPType, bq as bytesPType, ap as LibFunctionType, _ as ContractClassPType, bu as compiledContractType, aa as ImmutableObjectPType, b5 as applicationCallItxnType, v as voidPType, aw as MutableObjectPType, I as InternalError, c as CodeError, cq as throwError, cr as StringConstant, cs as BytesConstant, ct as IntegerConstant, cu as BoolConstant, cv as AddressConstant, cw as MethodConstant, cx as DecimalConstant, cy as TemplateVar, cg as LogSource, L as LogLevel, cz as instanceOfAny, cA as SingleEvaluation, cB as VarExpression, cC as nodeFactory, cD as NotSupported, l as logger, cE as TupleItemExpression, cF as FieldExpression, cG as IndexExpression, cH as TupleExpression, cI as AppStateExpression, cJ as AppAccountStateExpression, cK as BoxValueExpression, cL as StateGetEx, cM as StateGet, aU as TransientType, bU as numberPType, bn as bigIntPType, b6 as arc28EmitFunction, y as ArrayLiteralPType, H as BigIntLiteralPType, cN as hasFlags, cO as invariant, cP as BinaryBooleanOperator, ay as NamespacePType, bm as baseContractType, b9 as arc4BaseContractType, cQ as SymbolName, a_ as UnionPType, a9 as GroupTransactionPType, h as anyGtxnType, aX as Uint64EnumMemberType, aV as TypeParameterType, bB as esSymbol, c4 as unknownPType, bS as neverPType, b2 as anyPType, bT as nullPType, c3 as undefinedPType, Z as ClusteredPrototype, ae as IntersectionPType, bO as logicSigBaseType, av as LogicSigPType, aY as Uint64EnumType, a1 as FunctionPType, w as ApprovalProgram, X as ClearStateProgram, cn as isIn, R as BoxMapPType, S as BoxPType, as as LocalMapType, au as LocalStateType, a6 as GlobalMapType, a8 as GlobalStateType, aP as SuperPrototypeSelector, Y as ClusteredContractClassType, ch as SourceLocation, cR as intersectsFlags, cS as extractModuleName, cT as toSubScript, A as AbsolutePath, cU as CompilationSet, cV as ARC4ABIMethodConfig, C as ContractReference, V as BytesPType, cW as EqualityComparison, aB as ObjectLiteralPType, bE as isObjectType$1, b_ as readonlyDecorator, b7 as arc4AbiMethodDecorator, b8 as arc4BareMethodDecorator, cX as ARC4CreateOption, cY as NewArray, O as OnCompletionAction, cZ as BytesEncoding, ce as bigIntToUint8Array, c_ as FixableCodeError, c$ as UInt64BinaryOperator, d0 as tryConvertEnum, d1 as NumericComparison, d2 as UInt64UnaryOperator, bG as itoaMethod, aZ as Uint64Function, d3 as UInt64PostfixUnaryOperator, a0 as FixedArrayPType, al as IterableIteratorType, ak as IterableIteratorGeneric, f as applicationPType, g as assetPType, bV as onCompleteActionType, d4 as wrapInCodeError, cd as base32ToUint8Array, c1 as transactionTypeType, d5 as TransactionKind, bt as compileFunction, bv as compiledLogicSigType, d6 as LogicSigReference, ab as InnerTransactionPType, aT as TransactionFunctionType, c0 as submitGroupItxnFunction, am as ItxnParamsPType, d7 as getInnerTransactionType, d8 as getItxnParamsType, d9 as CompiledContract, da as ARC4BareMethodConfig, db as MethodSignature, cj as enumFromValue, x as ArrayGeneric, $ as FixedArrayGeneric, cm as zipStrict, bD as isArrayType, bF as isTupleLike, bQ as matchFunction, bb as assertMatchFunction, dc as BigUIntBinaryOperator, K as BigUintFunction, dd as BigUIntPostfixUnaryOperator, cf as utf8ToUint8Array, de as BytesBinaryOperator, df as IntrinsicCall, cb as uint8ArrayToUtf8, T as BytesFunction, U as BytesGeneric, cc as base64ToUint8Array, dg as enumKeyFromValue, dh as BytesUnaryOperator, bs as cloneFunction, bw as contractOptionsDecorator, bz as ensureBudgetFunction, di as PuyaLibFunction, bW as opUpFeeSourceType, af as IntrinsicEnumType, bP as logicSigOptionsDecorator, ac as InstanceType, aC as ObjectWithOptionalFieldsType, c7 as vrfVerifyPType, bR as mimcConfigurationsPType, by as ecdsaPType, bx as ecPType, bl as base64PType, ag as IntrinsicFunctionGroupType, dj as Expression, ai as IntrinsicFunctionType, aM as ReferenceArrayGeneric, aN as ReferenceArrayType, dk as AppStorageKind, a$ as UnsupportedType, dl as transientTypeErrors, a7 as GlobalStateGeneric, aR as TemplateVarFunction, dm as getGroupTransactionType, bH as itxnComposePType, aW as Uint64EnumMemberLiteralType, b0 as anyItxnParamsType, c6 as validateEncodingFunction, M as BooleanFunction, aO as StringFunction, aI as ReadonlyArrayGeneric, aK as ReadonlyGeneric, a2 as GeneratorGeneric, a3 as GeneratorType, aG as PromiseGeneric, aH as PromiseType, W as ClassMethodDecoratorContext, aQ as SuperPrototypeSelectorGeneric, aF as PolytypeClassMethodHelper, bL as logFunction, ba as assertFunction, bA as errFunction, bM as loggedAssertFunction, bN as loggedErrFunction, c5 as urangeFunction, br as bzeroFunction, aj as IntrinsicFunctionTypeType, q as ALL_OP_ENUMS, ah as IntrinsicFunctionGroupTypeType, a5 as GlobalMapGeneric, at as LocalStateGeneric, ar as LocalMapGeneric, N as BoxGeneric, Q as BoxMapGeneric, u as ApplicationFunction, r as AccountFunction, E as AssetFunction, p as paymentGtxnType, aE as PaymentTxnFunction, k as keyRegistrationGtxnType, an as KeyRegistrationTxnFunction, i as assetConfigGtxnType, B as AssetConfigTxnFunction, j as assetTransferGtxnType, F as AssetTransferTxnFunction, m as assetFreezeGtxnType, D as AssetFreezeTxnFunction, n as applicationCallGtxnType, t as ApplicationCallTxnFunction, aS as TransactionFunction, bX as paymentItxnFunction, bI as keyRegistrationItxnFunction, bc as assetConfigItxnFunction, bi as assetTransferItxnFunction, bf as assetFreezeItxnFunction, b3 as applicationCallItxnFunction, bZ as paymentItxnType, bK as keyRegistrationItxnType, be as assetConfigItxnType, bk as assetTransferItxnType, bh as assetFreezeItxnType, bY as paymentItxnParamsType, bJ as keyRegistrationItxnParamsType, bd as assetConfigItxnParamsType, bj as assetTransferItxnParamsType, bg as assetFreezeItxnParamsType, b4 as applicationCallItxnParamsType, bC as inputOnlyObjects, dn as Contract, dp as InstanceSuperMethodTarget, dq as ExpressionStatement, dr as AssertExpression, ds as VoidConstant, dt as ArrayConcat, du as ArrayPop, dv as ArrayReplace, dw as ArrayLength, dx as SizeOf, dy as UpdateInnerTransaction, dz as CheckedMaybe, dA as StageInnerTransactions, dB as SubmitInnerTransaction, dC as AssignmentExpression, dD as CommaExpression, dE as NumericComparisonExpression, dF as BytesComparisonExpression, dG as PuyaLibCall, dH as UInt64UnaryOperation, dI as UInt64PostfixUnaryOperation, dJ as BigUIntPostfixUnaryOperation, dK as BytesUnaryOperation, dL as UInt64BinaryOperation, dM as BigUIntBinaryOperation, dN as BooleanBinaryOperation, dO as Not, dP as Emit, dQ as Range, dR as Enumeration, dS as Reversed, dT as StateExists, dU as ARC4Router, dV as MethodSignatureString, dW as SubroutineID, dX as ContractMethodTarget, dY as InstanceMethodTarget, ca as uint8ArrayToBase32, ck as mkDirIfNotExists, dZ as patchErrorLocation, d_ as Goto, d$ as ReturnStatement, e0 as ContractMethod, e1 as sameSets, b as ContractClassModel, e2 as Subroutine, e3 as LogicSigClassModel, e4 as ptypeIn, e5 as expandMaybeArray, a as LoggingContext, P as PuyaError } from './contract-class-model-D-NUE8Zg.js';
2
2
  import * as fs from 'node:fs';
3
3
  import 'node:util';
4
4
  import pathe__default, { normalize } from 'pathe';
@@ -244,14 +244,14 @@ const arc4StructBaseType = new ARC4StructType({
244
244
  description: undefined,
245
245
  frozen: false,
246
246
  });
247
- const Arc4TupleGeneric = new GenericPType({
247
+ const ARC4TupleGeneric = new GenericPType({
248
248
  name: 'Tuple',
249
249
  module: Constants.moduleNames.algoTs.arc4.encodedTypes,
250
250
  parameterise([tupleType, ...rest]) {
251
251
  codeInvariant(tupleType && !rest.length, `${this.name} expects 1 generic parameter`);
252
252
  codeInvariant(tupleType instanceof ReadonlyTuplePType || tupleType instanceof MutableTuplePType, `${this.name} generic parameter must be a native tuple type`);
253
253
  const encodedTypes = tupleType.items.map((itemType, index) => {
254
- codeInvariant(itemType instanceof ARC4EncodedType, `Item ${index} of ARC4 Tuple must be an ARC4 encoded type`);
254
+ codeInvariant(itemType instanceof ARC4EncodedType, `Item ${index} of ${this.name} must be an ARC4 encoded type`);
255
255
  return itemType;
256
256
  });
257
257
  return new ARC4TupleType({
@@ -291,9 +291,9 @@ const UintNGeneric = new GenericPType({
291
291
  name: 'Uint',
292
292
  module: Constants.moduleNames.algoTs.arc4.encodedTypes,
293
293
  parameterise(typeArgs) {
294
- codeInvariant(typeArgs.length === 1, 'UintNType type expects exactly one type parameter');
294
+ codeInvariant(typeArgs.length === 1, `${this.name} type expects exactly one type parameter`);
295
295
  const [size] = typeArgs;
296
- codeInvariant(size instanceof NumericLiteralPType && size.literalValue, `Generic type param for UintNType must be a literal number. Inferred type is ${size.name}`);
296
+ codeInvariant(size instanceof NumericLiteralPType && size.literalValue, `Generic type param for ${this.name} must be a literal number. Inferred type is ${size.name}`);
297
297
  return new UintNType({ n: size.literalValue });
298
298
  },
299
299
  });
@@ -326,8 +326,8 @@ const UFixedNxMGeneric = new GenericPType({
326
326
  parameterise(typeArgs) {
327
327
  codeInvariant(typeArgs.length === 2, `${this.name} expects exactly 2 generic type parameters`);
328
328
  const [n, m] = typeArgs;
329
- codeInvariant(n instanceof NumericLiteralPType && n.literalValue, `Generic type param 'N' for ${this.name} must be a literal number. Inferred type is ${n.name}`);
330
- codeInvariant(m instanceof NumericLiteralPType && m.literalValue, `Generic type param 'M' for UintNType must be a literal number. Inferred type is ${m.name}`);
329
+ codeInvariant(n instanceof NumericLiteralPType && n.literalValue, `Generic type param 'N' for ${this.name} must be a literal number. Inferred type is ${n.name}`);
330
+ codeInvariant(m instanceof NumericLiteralPType && m.literalValue, `Generic type param 'M' for ${this.name} must be a literal number. Inferred type is ${m.name}`);
331
331
  return new UFixedNxMType({
332
332
  n: n.literalValue,
333
333
  m: m.literalValue,
@@ -352,7 +352,7 @@ class UFixedNxMType extends ARC4EncodedType {
352
352
  codeInvariant(m >= 1n && m <= 160n, 'm must be between 1 and 160');
353
353
  this.n = n;
354
354
  this.m = m;
355
- this.name = `${UFixedNxMGeneric.name}<${n}, ${m}>`;
355
+ this.name = `UFixed<${n}, ${m}>`;
356
356
  this.wtype = new wtypes.ARC4UFixedNxM({ n: this.n, m: this.m });
357
357
  this.abiTypeSignature = `ufixed${n}x${m}`;
358
358
  }
@@ -364,10 +364,10 @@ const arc4ByteAlias = new UintNType({ n: 8n, wtype: wtypes.arc4ByteAliasWType, n
364
364
  const DynamicArrayGeneric = new GenericPType({
365
365
  name: 'DynamicArray',
366
366
  module: Constants.moduleNames.algoTs.arc4.encodedTypes,
367
- parameterise: (typeArgs) => {
368
- codeInvariant(typeArgs.length === 1, 'DynamicArray type expects exactly one type parameter');
367
+ parameterise(typeArgs) {
368
+ codeInvariant(typeArgs.length === 1, `${this.name} type expects exactly one type parameter`);
369
369
  const [elementType] = typeArgs;
370
- codeInvariant(elementType instanceof ARC4EncodedType, `Generic type param for DynamicArray must be an ARC4 encoded type. Inferred type is ${elementType.name}`);
370
+ codeInvariant(elementType instanceof ARC4EncodedType, `Generic type param for ${this.name} must be an ARC4 encoded type. Inferred type is ${elementType.name}`);
371
371
  return new DynamicArrayType({ elementType: elementType });
372
372
  },
373
373
  });
@@ -403,11 +403,11 @@ class DynamicArrayType extends ARC4ArrayType {
403
403
  const StaticArrayGeneric = new GenericPType({
404
404
  name: 'StaticArray',
405
405
  module: Constants.moduleNames.algoTs.arc4.encodedTypes,
406
- parameterise: (typeArgs) => {
407
- codeInvariant(typeArgs.length === 2, 'StaticArray type expects exactly one type parameters');
406
+ parameterise(typeArgs) {
407
+ codeInvariant(typeArgs.length === 2, `${this.name} type expects exactly two type parameters`);
408
408
  const [elementType, arraySize] = typeArgs;
409
- codeInvariant(elementType instanceof ARC4EncodedType, `Element type generic type param for StaticArray must be an ARC4 encoded type. Inferred type is ${elementType.name}`);
410
- codeInvariant(arraySize instanceof NumericLiteralPType, `Array size generic type param for StaticArray must be a literal number. Inferred type is ${arraySize.name}`);
409
+ codeInvariant(elementType instanceof ARC4EncodedType, `Element type generic type param for ${this.name} must be an ARC4 encoded type. Inferred type is ${elementType.name}`);
410
+ codeInvariant(arraySize instanceof NumericLiteralPType, `Array size generic type param for ${this.name} must be a literal number. Inferred type is ${arraySize.name}`);
411
411
  return new StaticArrayType({ arraySize: arraySize.literalValue, elementType });
412
412
  },
413
413
  });
@@ -459,10 +459,10 @@ const AddressClass = new LibClassType({
459
459
  const StaticBytesGeneric = new GenericPType({
460
460
  name: 'StaticBytes',
461
461
  module: Constants.moduleNames.algoTs.arc4.encodedTypes,
462
- parameterise: (typeArgs) => {
463
- codeInvariant(typeArgs.length === 1, 'StaticBytes type expects exactly one type parameter');
462
+ parameterise(typeArgs) {
463
+ codeInvariant(typeArgs.length === 1, `${this.name} type expects exactly one type parameter`);
464
464
  const [length] = typeArgs;
465
- codeInvariant(length instanceof NumericLiteralPType, `Length generic type param for StaticBytes must be a literal number. Inferred type is ${length.name}`);
465
+ codeInvariant(length instanceof NumericLiteralPType, `Length generic type param for ${this.name} must be a literal number. Inferred type is ${length.name}`);
466
466
  return new StaticBytesType({
467
467
  length: length.literalValue,
468
468
  });
@@ -480,12 +480,12 @@ class StaticBytesType extends StaticArrayType {
480
480
  });
481
481
  }
482
482
  }
483
- const DynamicBytesConstructor = new LibClassType({
483
+ const DynamicBytesClass = new LibClassType({
484
484
  name: 'DynamicBytes',
485
485
  module: Constants.moduleNames.algoTs.arc4.encodedTypes,
486
486
  });
487
- const DynamicBytesType = new DynamicArrayType({
488
- name: `DynamicBytes`,
487
+ const dynamicBytesType = new DynamicArrayType({
488
+ name: 'DynamicBytes',
489
489
  immutable: true,
490
490
  elementType: arc4ByteAlias,
491
491
  nativeType: bytesPType,
@@ -522,9 +522,9 @@ const ContractProxyGeneric = new GenericPType({
522
522
  name: 'ContractProxy',
523
523
  module: Constants.moduleNames.algoTs.arc4.c2c,
524
524
  parameterise(args) {
525
- invariant(args.length === 1, 'ContractProxy expects exactly 1 type arg');
525
+ codeInvariant(args.length === 1, `${this.name} expects exactly 1 type arg`);
526
526
  const [typeArg] = args;
527
- invariant(typeArg instanceof ContractClassPType && typeArg.isARC4, 'Contract Proxy generic type arg must extend arc4 Contract type');
527
+ codeInvariant(typeArg instanceof ContractClassPType && typeArg.isARC4, `${this.name} generic type arg must extend arc4 Contract type`);
528
528
  return new ContractProxyType({ contractType: typeArg });
529
529
  },
530
530
  });
@@ -549,7 +549,7 @@ const TypedApplicationCallResponseGeneric = new GenericPType({
549
549
  name: 'TypedApplicationCallResponse',
550
550
  module: Constants.moduleNames.algoTs.arc4.c2c,
551
551
  parameterise(args) {
552
- invariant(args.length === 1, 'TypedApplicationCallResponse expects exactly 1 type arg');
552
+ codeInvariant(args.length === 1, `${this.name} expects exactly 1 type arg`);
553
553
  const [typeArg] = args;
554
554
  return new TypedApplicationCallResponseType({ returnValue: typeArg });
555
555
  },
@@ -562,11 +562,11 @@ class TypedApplicationCallResponseType extends ImmutableObjectPType {
562
562
  constructor({ returnValue }) {
563
563
  super({
564
564
  properties: returnValue.equals(voidPType)
565
- ? [{ name: 'itxn', ptype: applicationItxnType, description: null }]
565
+ ? [{ name: 'itxn', ptype: applicationCallItxnType, description: null }]
566
566
  : [
567
567
  {
568
568
  name: 'itxn',
569
- ptype: applicationItxnType,
569
+ ptype: applicationCallItxnType,
570
570
  description: null,
571
571
  },
572
572
  {
@@ -2417,7 +2417,7 @@ let TypeResolver = (() => {
2417
2417
  return node.typeArguments.map((t) => this.resolveTypeNode(t, sourceLocation));
2418
2418
  }
2419
2419
  const sig = this.checker.getResolvedSignature(node);
2420
- invariant(sig, 'CallExpression must resolve to a signature');
2420
+ invariant(sig, 'CallExpression must resolve to a signature', sourceLocation);
2421
2421
  const tps = this.checker.getTypeArgumentsForResolvedSignature(sig);
2422
2422
  return tps?.map((t) => this.resolveType(t, sourceLocation)) ?? [];
2423
2423
  }
@@ -2592,7 +2592,7 @@ let TypeResolver = (() => {
2592
2592
  if (typeName.fullName === logicSigBaseType.fullName)
2593
2593
  return logicSigBaseType;
2594
2594
  const [baseType, ...rest] = tsType.getBaseTypes()?.map((t) => this.resolveType(t, sourceLocation)) ?? [];
2595
- invariant(rest.length === 0, 'Class can have at most one base type');
2595
+ invariant(rest.length === 0, 'Class can have at most one base type', sourceLocation);
2596
2596
  // Treat sub-types of UintN type as the base type.
2597
2597
  if (baseType instanceof UintNType)
2598
2598
  return baseType;
@@ -2685,7 +2685,7 @@ let TypeResolver = (() => {
2685
2685
  if (expectReadonly !== readonly) {
2686
2686
  const correction = expectReadonly
2687
2687
  ? 'Add a readonly modifier to this property, or remove it from all others'
2688
- : 'Remove the readonly modifier from this property, or add it all others';
2688
+ : 'Remove the readonly modifier from this property, or add it to all others';
2689
2689
  logger.error(propLocation, `All properties of a type must share the same readonly annotation. ${correction}`);
2690
2690
  }
2691
2691
  const ptype = this.resolveType(type, propLocation);
@@ -2708,7 +2708,7 @@ let TypeResolver = (() => {
2708
2708
  }
2709
2709
  reflectConstructorType(tsType, sourceLocation) {
2710
2710
  const constructorSignatures = tsType.getConstructSignatures();
2711
- invariant(constructorSignatures.length, 'Must have at least one signature');
2711
+ invariant(constructorSignatures.length, 'Must have at least one signature', sourceLocation);
2712
2712
  const typeDeclaration = tsType.getSymbol()?.declarations?.[0];
2713
2713
  if (typeDeclaration && ts.isClassDeclaration(typeDeclaration)) {
2714
2714
  const ptype = this.resolve(typeDeclaration, sourceLocation);
@@ -2793,7 +2793,7 @@ let TypeResolver = (() => {
2793
2793
  });
2794
2794
  }
2795
2795
  resolveClusteredPrototype(tsType, sourceLocation) {
2796
- invariant(isIntersectionType(tsType), 'Clustered prototypes must be an intersection type');
2796
+ invariant(isIntersectionType(tsType), 'Clustered prototypes must be an intersection type', sourceLocation);
2797
2797
  const baseContracts = [];
2798
2798
  for (const t of tsType.types.map((t) => this.resolveType(t, sourceLocation))) {
2799
2799
  if (t instanceof ContractClassPType) {
@@ -4755,7 +4755,7 @@ function concatArrays(left, right, sourceLocation) {
4755
4755
  TODO: This is only required because puya doesn't support staticarray + other => dynamic array
4756
4756
  To work around this, we convert arc4 static bytes and static array to dynamic bytes and dynamic array
4757
4757
  */
4758
- const dynamicType = left.ptype instanceof StaticBytesType ? DynamicBytesType : new DynamicArrayType({ ...left.ptype });
4758
+ const dynamicType = left.ptype instanceof StaticBytesType ? dynamicBytesType : new DynamicArrayType({ ...left.ptype });
4759
4759
  return concatArrays(toArc4Dynamic(left.ptype.arraySize, left.resolve(), dynamicType), right, sourceLocation);
4760
4760
  }
4761
4761
  else if (left.ptype instanceof FixedArrayPType || left.ptype instanceof ReadonlyArrayPType) {
@@ -4783,8 +4783,8 @@ function getArrayConcatType(left, right, sourceLocation) {
4783
4783
  if (left instanceof ARC4ArrayType) {
4784
4784
  if (right instanceof ARC4ArrayType) {
4785
4785
  sameElementType(left.elementType, right.elementType, sourceLocation);
4786
- if (left.equals(DynamicBytesType) || left instanceof StaticBytesType) {
4787
- return DynamicBytesType;
4786
+ if (left.equals(dynamicBytesType) || left instanceof StaticBytesType) {
4787
+ return dynamicBytesType;
4788
4788
  }
4789
4789
  return new DynamicArrayType({
4790
4790
  elementType: left.elementType,
@@ -5229,7 +5229,7 @@ class StaticBytesClassBuilder extends ClassBuilder {
5229
5229
  }
5230
5230
  }
5231
5231
  class DynamicBytesClassBuilder extends ClassBuilder {
5232
- ptype = DynamicBytesConstructor;
5232
+ ptype = DynamicBytesClass;
5233
5233
  newCall(args, typeArgs, sourceLocation) {
5234
5234
  const { args: [initialValue], } = parseFunctionArgs({
5235
5235
  args,
@@ -5239,7 +5239,7 @@ class DynamicBytesClassBuilder extends ClassBuilder {
5239
5239
  genericTypeArgs: 0,
5240
5240
  argSpec: (a) => [a.optional(bytesPType, stringPType)],
5241
5241
  });
5242
- const resultPType = DynamicBytesType;
5242
+ const resultPType = dynamicBytesType;
5243
5243
  if (!initialValue) {
5244
5244
  return instanceEb(nodeFactory.bytesConstant({
5245
5245
  value: new Uint8Array([0, 0]),
@@ -5758,7 +5758,7 @@ function getTxnFieldMetaData({ kind, memberName, direction = 'out', }) {
5758
5758
  }
5759
5759
 
5760
5760
  class CompileFunctionBuilder extends FunctionBuilder {
5761
- ptype = compileFunctionType;
5761
+ ptype = compileFunction;
5762
5762
  call(args, typeArgs, sourceLocation) {
5763
5763
  const { args: [contractOrSig, options], } = parseFunctionArgs({
5764
5764
  args,
@@ -6161,7 +6161,7 @@ class ContractProxyBareCreateFunctionBuilder extends FunctionBuilder {
6161
6161
  fields,
6162
6162
  applicationProxy: this.proxy,
6163
6163
  });
6164
- return instanceEb(itxnResult, applicationItxnType);
6164
+ return instanceEb(itxnResult, applicationCallItxnType);
6165
6165
  }
6166
6166
  }
6167
6167
  class ContractProxyCallBuilder extends NodeBuilder {
@@ -6498,7 +6498,7 @@ class StructExpressionBuilder extends Arc4EncodedBaseExpressionBuilder {
6498
6498
  }
6499
6499
 
6500
6500
  class Arc4TupleClassBuilder extends ClassBuilder {
6501
- ptype = Arc4TupleGeneric;
6501
+ ptype = ARC4TupleGeneric;
6502
6502
  newCall(args, typeArgs, sourceLocation) {
6503
6503
  const { args: tupleItems, ptypes: [tupleType], } = parseFunctionArgs({
6504
6504
  args,
@@ -6508,7 +6508,7 @@ class Arc4TupleClassBuilder extends ClassBuilder {
6508
6508
  callLocation: sourceLocation,
6509
6509
  argSpec: (a) => args.map(() => a.required()),
6510
6510
  });
6511
- const ptype = Arc4TupleGeneric.parameterise([tupleType]);
6511
+ const ptype = ARC4TupleGeneric.parameterise([tupleType]);
6512
6512
  if (args.length === 0) {
6513
6513
  return new Arc4TupleExpressionBuilder(intrinsicFactory.bzero({
6514
6514
  size: nodeFactory.sizeOf({ sizeWtype: ptype.wtype, wtype: wtypes.uint64WType, sourceLocation }),
@@ -8213,7 +8213,7 @@ class BzeroFunctionBuilder extends FunctionBuilder {
8213
8213
  }
8214
8214
 
8215
8215
  class CloneFunctionBuilder extends FunctionBuilder {
8216
- ptype = cloneFunctionPType;
8216
+ ptype = cloneFunction;
8217
8217
  call(args, typeArgs, sourceLocation) {
8218
8218
  const { args: [target], } = parseFunctionArgs({
8219
8219
  args,
@@ -15815,7 +15815,7 @@ class UrangeFunctionBuilder extends FunctionBuilder {
15815
15815
  }
15816
15816
 
15817
15817
  class ValidateEncodingFunctionBuilder extends FunctionBuilder {
15818
- ptype = validateEncodingFunctionPType;
15818
+ ptype = validateEncodingFunction;
15819
15819
  call(args, typeArgs, sourceLocation) {
15820
15820
  const { ptypes: [ptype], args: [theValue], } = parseFunctionArgs({
15821
15821
  args,
@@ -15911,10 +15911,10 @@ function registerPTypes(typeRegistry) {
15911
15911
  typeRegistry.register({ ptype: ensureBudgetFunction, singletonEb: EnsureBudgetFunctionBuilder });
15912
15912
  typeRegistry.register({ ptype: urangeFunction, singletonEb: UrangeFunctionBuilder });
15913
15913
  typeRegistry.register({ ptype: TemplateVarFunction, singletonEb: TemplateVarFunctionBuilder });
15914
- typeRegistry.register({ ptype: compileFunctionType, singletonEb: CompileFunctionBuilder });
15914
+ typeRegistry.register({ ptype: compileFunction, singletonEb: CompileFunctionBuilder });
15915
15915
  typeRegistry.register({ ptype: arc28EmitFunction, singletonEb: Arc28EmitFunctionBuilder });
15916
- typeRegistry.register({ ptype: cloneFunctionPType, singletonEb: CloneFunctionBuilder });
15917
- typeRegistry.register({ ptype: validateEncodingFunctionPType, singletonEb: ValidateEncodingFunctionBuilder });
15916
+ typeRegistry.register({ ptype: cloneFunction, singletonEb: CloneFunctionBuilder });
15917
+ typeRegistry.register({ ptype: validateEncodingFunction, singletonEb: ValidateEncodingFunctionBuilder });
15918
15918
  typeRegistry.register({ ptype: ContractClassPType, singletonEb: ContractClassBuilder });
15919
15919
  typeRegistry.register({ ptype: contractOptionsDecorator, singletonEb: ContractOptionsDecoratorBuilder });
15920
15920
  typeRegistry.register({ ptype: LogicSigPType, singletonEb: LogicSigClassBuilder });
@@ -16006,7 +16006,7 @@ function registerPTypes(typeRegistry) {
16006
16006
  singletonEb: BoxMapFunctionBuilder,
16007
16007
  });
16008
16008
  // Reference types
16009
- typeRegistry.register({ ptype: ApplicationFunctionType, singletonEb: ApplicationFunctionBuilder });
16009
+ typeRegistry.register({ ptype: ApplicationFunction, singletonEb: ApplicationFunctionBuilder });
16010
16010
  typeRegistry.register({ ptype: applicationPType, instanceEb: ApplicationExpressionBuilder });
16011
16011
  typeRegistry.register({ ptype: AccountFunction, singletonEb: AccountFunctionBuilder });
16012
16012
  typeRegistry.register({ ptype: accountPType, instanceEb: AccountExpressionBuilder });
@@ -16039,8 +16039,8 @@ function registerPTypes(typeRegistry) {
16039
16039
  // More specific types need to be registered before their base types
16040
16040
  // This ensures the specific type is selected during type resolution
16041
16041
  // For example, StaticBytesExpressionBuilder should be selected over general StaticArrayExpressionBuilder for StaticBytesType
16042
- typeRegistry.register({ ptype: DynamicBytesConstructor, singletonEb: DynamicBytesClassBuilder });
16043
- typeRegistry.register({ ptype: DynamicBytesType, instanceEb: DynamicBytesExpressionBuilder });
16042
+ typeRegistry.register({ ptype: DynamicBytesClass, singletonEb: DynamicBytesClassBuilder });
16043
+ typeRegistry.register({ ptype: dynamicBytesType, instanceEb: DynamicBytesExpressionBuilder });
16044
16044
  typeRegistry.registerGeneric({
16045
16045
  generic: StaticBytesGeneric,
16046
16046
  ptype: StaticBytesType,
@@ -16066,7 +16066,7 @@ function registerPTypes(typeRegistry) {
16066
16066
  typeRegistry.register({ ptype: arc4StringType, instanceEb: StrExpressionBuilder });
16067
16067
  typeRegistry.register({ ptype: ARC4StrClass, singletonEb: StrClassBuilder });
16068
16068
  typeRegistry.registerGeneric({
16069
- generic: Arc4TupleGeneric,
16069
+ generic: ARC4TupleGeneric,
16070
16070
  ptype: ARC4TupleType,
16071
16071
  instanceEb: Arc4TupleExpressionBuilder,
16072
16072
  singletonEb: Arc4TupleClassBuilder,
@@ -16094,23 +16094,23 @@ function registerPTypes(typeRegistry) {
16094
16094
  typeRegistry.register({ ptype: assetFreezeGtxnType, instanceEb: GroupTransactionExpressionBuilder });
16095
16095
  typeRegistry.register({ ptype: AssetFreezeTxnFunction, singletonEb: GroupTransactionFunctionBuilder });
16096
16096
  typeRegistry.register({ ptype: applicationCallGtxnType, instanceEb: GroupTransactionExpressionBuilder });
16097
- typeRegistry.register({ ptype: ApplicationTxnFunction, singletonEb: GroupTransactionFunctionBuilder });
16097
+ typeRegistry.register({ ptype: ApplicationCallTxnFunction, singletonEb: GroupTransactionFunctionBuilder });
16098
16098
  typeRegistry.register({ ptype: anyGtxnType, instanceEb: GroupTransactionExpressionBuilder });
16099
16099
  typeRegistry.register({ ptype: TransactionFunction, singletonEb: GroupTransactionFunctionBuilder });
16100
16100
  // ITXN Types
16101
- typeRegistry.register({ ptype: paymentItxnFn, singletonEb: ItxnParamsFactoryFunctionBuilder });
16102
- typeRegistry.register({ ptype: keyRegistrationItxnFn, singletonEb: ItxnParamsFactoryFunctionBuilder });
16103
- typeRegistry.register({ ptype: assetConfigItxnFn, singletonEb: ItxnParamsFactoryFunctionBuilder });
16104
- typeRegistry.register({ ptype: assetTransferItxnFn, singletonEb: ItxnParamsFactoryFunctionBuilder });
16105
- typeRegistry.register({ ptype: assetFreezeItxnFn, singletonEb: ItxnParamsFactoryFunctionBuilder });
16106
- typeRegistry.register({ ptype: applicationCallItxnFn, singletonEb: ItxnParamsFactoryFunctionBuilder });
16101
+ typeRegistry.register({ ptype: paymentItxnFunction, singletonEb: ItxnParamsFactoryFunctionBuilder });
16102
+ typeRegistry.register({ ptype: keyRegistrationItxnFunction, singletonEb: ItxnParamsFactoryFunctionBuilder });
16103
+ typeRegistry.register({ ptype: assetConfigItxnFunction, singletonEb: ItxnParamsFactoryFunctionBuilder });
16104
+ typeRegistry.register({ ptype: assetTransferItxnFunction, singletonEb: ItxnParamsFactoryFunctionBuilder });
16105
+ typeRegistry.register({ ptype: assetFreezeItxnFunction, singletonEb: ItxnParamsFactoryFunctionBuilder });
16106
+ typeRegistry.register({ ptype: applicationCallItxnFunction, singletonEb: ItxnParamsFactoryFunctionBuilder });
16107
16107
  typeRegistry.register({ ptype: submitGroupItxnFunction, singletonEb: SubmitItxnGroupFunctionBuilder });
16108
16108
  typeRegistry.register({ ptype: paymentItxnType, instanceEb: InnerTransactionExpressionBuilder });
16109
16109
  typeRegistry.register({ ptype: keyRegistrationItxnType, instanceEb: InnerTransactionExpressionBuilder });
16110
16110
  typeRegistry.register({ ptype: assetConfigItxnType, instanceEb: InnerTransactionExpressionBuilder });
16111
16111
  typeRegistry.register({ ptype: assetTransferItxnType, instanceEb: InnerTransactionExpressionBuilder });
16112
16112
  typeRegistry.register({ ptype: assetFreezeItxnType, instanceEb: InnerTransactionExpressionBuilder });
16113
- typeRegistry.register({ ptype: applicationItxnType, instanceEb: InnerTransactionExpressionBuilder });
16113
+ typeRegistry.register({ ptype: applicationCallItxnType, instanceEb: InnerTransactionExpressionBuilder });
16114
16114
  typeRegistry.register({ ptype: paymentItxnParamsType, instanceEb: ItxnParamsExpressionBuilder });
16115
16115
  typeRegistry.register({ ptype: keyRegistrationItxnParamsType, instanceEb: ItxnParamsExpressionBuilder });
16116
16116
  typeRegistry.register({ ptype: assetConfigItxnParamsType, instanceEb: ItxnParamsExpressionBuilder });
@@ -23506,5 +23506,5 @@ class PuyaOptions {
23506
23506
  }
23507
23507
  }
23508
23508
 
23509
- export { parseCliTemplateVar as $, ARC4ArrayType as A, ByteClass as B, ContractProxyGeneric as C, DynamicArrayGeneric as D, abiCallFunction as E, arc4AddressAlias as F, arc4BooleanType as G, arc4ByteAlias as H, arc4StringType as I, arc4StructBaseType as J, compileArc4Function as K, convertBytesFunction as L, decodeArc4Function as M, encodeArc4Function as N, methodSelectorFunction as O, sizeOfFunction as P, uint8ArrayToHex as Q, hexToUint8Array as R, StaticArrayGeneric as S, TypedApplicationCallResponseGeneric as T, UFixedNxMGeneric as U, CompileOptions as V, TypeResolver as W, processInputPaths as X, registerPTypes as Y, typeRegistry as Z, defaultPuyaOptions as _, ARC4BoolClass as a, LocalsCoalescingStrategy as a0, PuyaService as a1, deserializeAndLog as a2, createTsProgram as a3, buildAwst as a4, validateAwst as a5, sleep as a6, DefaultMap as a7, relinquishThread as a8, ARC4EncodedType as b, ARC4InstanceType as c, ARC4StrClass as d, ARC4StructClass as e, ARC4StructType as f, ARC4TupleType as g, AddressClass as h, Arc4TupleGeneric as i, ContractProxyType as j, DynamicArrayType as k, DynamicBytesConstructor as l, DynamicBytesType as m, StaticArrayType as n, StaticBytesGeneric as o, StaticBytesType as p, TypedApplicationCallResponseType as q, UFixedNxMType as r, UintN128Class as s, UintN16Class as t, UintN256Class as u, UintN32Class as v, UintN64Class as w, UintN8Class as x, UintNGeneric as y, UintNType as z };
23510
- //# sourceMappingURL=options-DD9MApH4.js.map
23509
+ export { parseCliTemplateVar as $, ARC4ArrayType as A, ByteClass as B, ContractProxyGeneric as C, DynamicArrayGeneric as D, arc4AddressAlias as E, arc4BooleanType as F, arc4ByteAlias as G, arc4StringType as H, arc4StructBaseType as I, compileArc4Function as J, convertBytesFunction as K, decodeArc4Function as L, dynamicBytesType as M, encodeArc4Function as N, methodSelectorFunction as O, sizeOfFunction as P, uint8ArrayToHex as Q, hexToUint8Array as R, StaticArrayGeneric as S, TypedApplicationCallResponseGeneric as T, UFixedNxMGeneric as U, CompileOptions as V, TypeResolver as W, processInputPaths as X, registerPTypes as Y, typeRegistry as Z, defaultPuyaOptions as _, ARC4BoolClass as a, LocalsCoalescingStrategy as a0, PuyaService as a1, deserializeAndLog as a2, createTsProgram as a3, buildAwst as a4, validateAwst as a5, sleep as a6, DefaultMap as a7, relinquishThread as a8, ARC4EncodedType as b, ARC4InstanceType as c, ARC4StrClass as d, ARC4StructClass as e, ARC4StructType as f, ARC4TupleGeneric as g, ARC4TupleType as h, AddressClass as i, ContractProxyType as j, DynamicArrayType as k, DynamicBytesClass as l, StaticArrayType as m, StaticBytesGeneric as n, StaticBytesType as o, TypedApplicationCallResponseType as p, UFixedNxMType as q, UintN128Class as r, UintN16Class as s, UintN256Class as t, UintN32Class as u, UintN64Class as v, UintN8Class as w, UintNGeneric as x, UintNType as y, abiCallFunction as z };
23510
+ //# sourceMappingURL=options-DLmtdJgF.js.map