@algorandfoundation/puya-ts 1.2.0-beta.34 → 1.2.0-beta.35

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 (34) hide show
  1. package/{analyser-service-DjrWRS0-.js → analyser-service-B0DpIecU.js} +3 -3
  2. package/{analyser-service-DjrWRS0-.js.map → analyser-service-B0DpIecU.js.map} +1 -1
  3. package/analyserService.mjs +3 -3
  4. package/{arc4-clientgen-CZtNN1eT.js → arc4-clientgen-Dd2qW-1d.js} +2 -2
  5. package/{arc4-clientgen-CZtNN1eT.js.map → arc4-clientgen-Dd2qW-1d.js.map} +1 -1
  6. package/awst/wtypes.d.ts +2 -5
  7. package/awst_build/ast-visitors/base-visitor.d.ts +0 -1
  8. package/awst_build/ast-visitors/contract-method-visitor.d.ts +3 -3
  9. package/awst_build/eb/index.d.ts +0 -1
  10. package/awst_build/ptypes/arc4-types.d.ts +1 -1
  11. package/awst_build/ptypes/index.d.ts +1 -3
  12. package/awst_build/type-resolver.d.ts +1 -1
  13. package/bin/puyats-clientgen.mjs +5 -5
  14. package/bin/puyats-ls.mjs +6 -6
  15. package/bin/run-cli.mjs +8 -8
  16. package/{check-node-version-BYGc-qxw.js → check-node-version-Df1hdewH.js} +3 -3
  17. package/{check-node-version-BYGc-qxw.js.map → check-node-version-Df1hdewH.js.map} +1 -1
  18. package/cli.mjs +8 -8
  19. package/{compile-BKk4hPli.js → compile-DGk1ftqu.js} +6 -6
  20. package/{compile-BKk4hPli.js.map → compile-DGk1ftqu.js.map} +1 -1
  21. package/{contract-class-model-Dpn9A-pJ.js → contract-class-model-cK8F4WVM.js} +5 -8
  22. package/contract-class-model-cK8F4WVM.js.map +1 -0
  23. package/index.mjs +8 -8
  24. package/{options-BCW57sPn.js → options-sBHEIhey.js} +36 -54
  25. package/options-sBHEIhey.js.map +1 -0
  26. package/package.json +2 -2
  27. package/{resolve-puya-path-CdZID0Yd.js → resolve-puya-path-Bgh6DuRP.js} +4 -4
  28. package/{resolve-puya-path-CdZID0Yd.js.map → resolve-puya-path-Bgh6DuRP.js.map} +1 -1
  29. package/{semver-a7hIj_hk.js → semver-T4bO0VEo.js} +2 -2
  30. package/{semver-a7hIj_hk.js.map → semver-T4bO0VEo.js.map} +1 -1
  31. package/{util-nZLj7LWS.js → util-CA3Q0W2C.js} +2 -2
  32. package/{util-nZLj7LWS.js.map → util-CA3Q0W2C.js.map} +1 -1
  33. package/contract-class-model-Dpn9A-pJ.js.map +0 -1
  34. package/options-BCW57sPn.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import 'crypto';
2
2
  import 'node:worker_threads';
3
- export { c as createAnalyserService } from './analyser-service-DjrWRS0-.js';
4
- import './contract-class-model-Dpn9A-pJ.js';
5
- import './options-BCW57sPn.js';
3
+ export { c as createAnalyserService } from './analyser-service-B0DpIecU.js';
4
+ import './contract-class-model-cK8F4WVM.js';
5
+ import './options-sBHEIhey.js';
6
6
  import 'pathe';
7
7
  import 'typescript';
8
8
  import 'node:util';
@@ -1,7 +1,7 @@
1
1
  import * as abi from '@algorandfoundation/algokit-utils/abi';
2
2
  import { existsSync } from 'fs';
3
3
  import { writeFile, readFile } from 'fs/promises';
4
- import { C as ContractReference, b as ContractClassModel, A as AbsolutePath, l as logger, c as CodeError, d as Constants, I as InternalError, e as accountPType, f as applicationPType, g as assetPType, v as voidPType, h as anyGtxnType, p as paymentGtxnType, k as keyRegistrationGtxnType, i as assetConfigGtxnType, j as assetTransferGtxnType, m as assetFreezeGtxnType, n as applicationCallGtxnType, O as OnCompletionAction } from './contract-class-model-Dpn9A-pJ.js';
4
+ import { C as ContractReference, b as ContractClassModel, A as AbsolutePath, l as logger, c as CodeError, d as Constants, I as InternalError, e as accountPType, f as applicationPType, g as assetPType, v as voidPType, h as anyGtxnType, p as paymentGtxnType, k as keyRegistrationGtxnType, i as assetConfigGtxnType, j as assetTransferGtxnType, m as assetFreezeGtxnType, n as applicationCallGtxnType, O as OnCompletionAction } from './contract-class-model-cK8F4WVM.js';
5
5
 
6
6
  const AUTO_GENERATED_COMMENT = '// This file is auto-generated, do not modify';
7
7
  const DISABLE_ESLINT_PRAGMA = '/* eslint-disable */';
@@ -321,4 +321,4 @@ function generateClientFor(contract) {
321
321
  }
322
322
 
323
323
  export { writeARC4Clients as a, writeARC4Client as w };
324
- //# sourceMappingURL=arc4-clientgen-CZtNN1eT.js.map
324
+ //# sourceMappingURL=arc4-clientgen-Dd2qW-1d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"arc4-clientgen-CZtNN1eT.js","sources":["../src/arc4-clientgen.ts"],"sourcesContent":["import * as abi from '@algorandfoundation/algokit-utils/abi'\nimport { existsSync } from 'fs'\nimport { readFile, writeFile } from 'fs/promises'\nimport { ContractReference, OnCompletionAction } from './awst/models'\nimport type { CompilationSet } from './awst_build/models/contract-class-model'\nimport { ContractClassModel } from './awst_build/models/contract-class-model'\nimport type { ABICompatiblePType } from './awst_build/ptypes'\nimport * as ptype from './awst_build/ptypes'\nimport { Constants } from './constants'\nimport { CodeError, InternalError } from './errors'\nimport { logger } from './logger'\nimport type { AlgoFile } from './options'\nimport { AbsolutePath } from './util/absolute-path'\n\ntype Arc56Arg = abi.Arc56Method['args'][number]\n\ntype ClientTask = {\n spec: abi.Arc56Contract\n outFile: AbsolutePath\n}\n\nconst AUTO_GENERATED_COMMENT = '// This file is auto-generated, do not modify'\nconst DISABLE_ESLINT_PRAGMA = '/* eslint-disable */'\n\nconst ARC4_PYTYPE_MAPPING = new Map<string, ABICompatiblePType>([\n ['account', ptype.accountPType],\n ['application', ptype.applicationPType],\n ['asset', ptype.assetPType],\n ['void', ptype.voidPType],\n ['txn', ptype.anyGtxnType],\n ['pay', ptype.paymentGtxnType],\n ['keyreg', ptype.keyRegistrationGtxnType],\n ['acfg', ptype.assetConfigGtxnType],\n ['axfer', ptype.assetTransferGtxnType],\n ['afrz', ptype.assetFreezeGtxnType],\n ['appl', ptype.applicationCallGtxnType],\n])\n\nfunction resolveClients(\n compilationSet: CompilationSet,\n filePaths: AlgoFile[],\n arc56Contracts: Record<string, abi.Arc56Contract>,\n): ClientTask[] {\n const sourceFileToOutDir = new Map<string, AbsolutePath>()\n for (const { sourceFile, outDir } of filePaths) {\n sourceFileToOutDir.set(sourceFile.toString(), outDir)\n }\n\n const arc56Files = []\n for (const ref of compilationSet.compilationOutputSet) {\n if (!(ref instanceof ContractReference)) {\n continue\n }\n const model = compilationSet.get(ref)\n if (!(model instanceof ContractClassModel)) {\n continue\n }\n if (!model.type.isARC4) {\n continue\n }\n\n const sourceFile = AbsolutePath.resolve({ path: ref.moduleName })\n const outDir = sourceFileToOutDir.get(sourceFile.toString())\n if (outDir === undefined) {\n logger.error(undefined, `Could not find a source file for the contract ${ref.className} at ${ref.moduleName}`)\n continue\n }\n\n const spec = arc56Contracts[ref.id]\n if (spec === undefined) {\n logger.error(undefined, `Could not find a generated spec for the contract ${ref.className} at ${ref.moduleName}`)\n continue\n }\n\n const name = model.options?.name || model.name\n arc56Files.push({\n spec,\n outFile: outDir.join(`${name}.client.ts`),\n })\n }\n return arc56Files\n}\n\nexport function writeARC4Clients(compilationSet: CompilationSet, filePaths: AlgoFile[], arc56Contracts: Record<string, abi.Arc56Contract>) {\n const clientFiles = resolveClients(compilationSet, filePaths, arc56Contracts)\n return Promise.all(\n clientFiles.map(async (clientTask) => {\n await writeARC4Client(clientTask.spec, clientTask.outFile)\n }),\n )\n}\n\nexport async function writeARC4Client(spec: abi.Arc56Contract, outFile: AbsolutePath) {\n if (await shouldWriteFile(outFile)) {\n logger.info(undefined, `Writing ${outFile.relativeTo('.')}`)\n const typescriptClient = generateClientFor(spec)\n await writeFile(outFile.toString(), typescriptClient, { encoding: 'utf-8' })\n } else {\n logger.error(undefined, `Not outputting ${outFile.relativeTo('.')} since content does not appear to be auto-generated`)\n }\n}\n\nasync function shouldWriteFile(outFile: AbsolutePath): Promise<boolean> {\n const filePath = outFile.toString()\n // FIXME: There's a TOCTOU bug here...\n if (!existsSync(filePath)) {\n return true\n }\n const contents = await readFile(filePath, { encoding: 'utf-8' })\n return contents.startsWith(AUTO_GENERATED_COMMENT)\n}\n\nfunction generateClientFor(contract: abi.Arc56Contract): string {\n const typeImports = new Set<string>()\n const imports = new Set<string>()\n const structToClass = new Map<string, string>()\n const reservedClassNames = new Set<string>()\n const reservedMethodNames = new Set<string>()\n const classDecls: string[] = []\n\n function useImport(name: string, asValue: boolean) {\n if (asValue) {\n if (typeImports.has(name)) typeImports.delete(name)\n imports.add(name)\n } else if (!imports.has(name)) {\n typeImports.add(name)\n }\n }\n function indent(...texts: string[]): string {\n const INDENT = ' '\n return INDENT + texts.join('\\n').replaceAll(/\\n+/g, `$&${INDENT}`)\n }\n\n function classNameFor(name: string): string {\n const base_name = name\n let seq = 1\n while (reservedClassNames.has(name)) {\n seq++\n name = `${base_name}${seq}`\n }\n\n reservedClassNames.add(name)\n return name\n }\n\n function methodNameFor(name: string): string {\n const base_name = name\n let seq = 1\n while (reservedMethodNames.has(name)) {\n seq++\n name = `${base_name}${seq}`\n }\n\n reservedMethodNames.add(name)\n return name\n }\n\n function typeNameToAlgoTSName(typeName: string): string {\n const knownMapping = ARC4_PYTYPE_MAPPING.get(typeName)\n if (knownMapping !== undefined) {\n const { name, module } = knownMapping\n if (module === Constants.moduleNames.algoTs.gtxn) {\n useImport('gtxn', false)\n return `gtxn.${name}`\n } else if (module === Constants.moduleNames.algoTs.reference) {\n useImport(name, false)\n return name\n } else if (module === Constants.moduleNames.tslib) {\n // The TypeScript prelude is always imported\n return name\n }\n\n throw new InternalError(`Cannot import ${name}: The module ${module} is unsupported`)\n }\n return ARC4ToAlgoTSName(abi.ABIType.from(typeName))\n }\n\n function ARC4ToAlgoTSName(type: abi.ABIType): string {\n useImport('arc4', false)\n if (type instanceof abi.ABIBoolType) return 'arc4.Bool'\n if (type instanceof abi.ABIStringType) return 'arc4.Str'\n if (type instanceof abi.ABIAddressType) return 'arc4.Address'\n if (type instanceof abi.ABIByteType) return 'arc4.Byte'\n if (type instanceof abi.ABIUintType) return `arc4.Uint<${type.bitSize}>`\n if (type instanceof abi.ABIUfixedType) return `arc4.UFixed<${type.bitSize}, ${type.precision}>`\n if (type instanceof abi.ABIArrayStaticType) {\n const elementType = ARC4ToAlgoTSName(type.childType)\n return `arc4.StaticArray<${elementType}, ${type.length}>`\n }\n if (type instanceof abi.ABIArrayDynamicType) {\n if (type.childType instanceof abi.ABIByteType) return 'arc4.DynamicBytes'\n\n const elementType = ARC4ToAlgoTSName(type.childType)\n return `arc4.DynamicArray<${elementType}>`\n }\n if (type instanceof abi.ABITupleType) {\n const tupleTypes = type.childTypes.map(ARC4ToAlgoTSName)\n return `arc4.Tuple<readonly [${tupleTypes.join(', ')}]>`\n }\n throw new CodeError(`unknown ARC-4 type '${type}'`)\n }\n\n function getClientType(type: string): string {\n // map ABI / AVM type to algots type\n if (type === 'AVMUint64') {\n useImport('uint64', false)\n return 'uint64'\n } else if (type === 'AVMBytes') {\n useImport('bytes', false)\n return 'bytes'\n } else if (type in contract.structs) {\n return structToClass.get(type) || prepareStructClass(type, contract.structs[type])\n } else {\n return typeNameToAlgoTSName(type)\n }\n }\n\n function prepareStructClass(name: string, fields: abi.StructField[]) {\n useImport('arc4', true)\n\n const className = classNameFor(name)\n structToClass.set(name, className)\n const lines = ['', `export class ${className} extends arc4.Struct<{`]\n for (const field of fields) {\n let type: string\n if (typeof field.type === 'string') {\n type = getClientType(field.type)\n } else {\n // generate anonymous struct type\n const anonStruct = `${name}_${field.name}`\n type = prepareStructClass(anonStruct, field.type)\n }\n lines.push(indent(`${field.name}: ${type}`))\n }\n lines.push('}> {}')\n classDecls.push(...lines)\n return className\n }\n\n function tsdoc(description: string | undefined | null): string[] {\n if (description === undefined || description === null) {\n return []\n }\n return ['/**', ` * ${description.replaceAll(/\\n+/g, '$& * ')}`, ' */']\n }\n\n function compatibleActions(create: string[], call: string[]): boolean {\n if (create.length === 0) {\n return true\n }\n if (call.length === 0) {\n return true\n }\n // if both collections are present, then they are compatible if everything in\n // create is also in call\n const createSet = new Set(create)\n const callSet = new Set(call)\n return createSet.symmetricDifference(callSet).size === 0\n }\n\n function ARC4MethodToTSDecorator(name: string, method: abi.Arc56Method): string {\n useImport('abimethod', true)\n\n const abimethodArgs: string[] = []\n if (method.name !== name) {\n abimethodArgs.push(`name: '${method.name}'`)\n }\n if (method.readonly) {\n abimethodArgs.push('readonly: true')\n }\n // if any alias types are encountered, force index encoding\n const argTypes = new Set(method.args.map((v) => v.type))\n const aliasTypes = new Set(['asset', 'application', 'account'])\n if (argTypes.intersection(aliasTypes).size !== 0) {\n abimethodArgs.push(\"resourceEncoding: 'index'\")\n }\n if (!compatibleActions(method.actions.create, method.actions.call)) {\n // TODO: support this, once decorators support it\n throw new CodeError(`unsupported on completion combination for generating an ARC-4 client for method: ${method.name}`)\n }\n const actions = [...method.actions.create, ...method.actions.call]\n actions.sort((a, b) => OnCompletionAction[a] - OnCompletionAction[b])\n const uniqueActions = new Set(actions)\n\n if (!(uniqueActions.size === 1 && uniqueActions.has('NoOp'))) {\n abimethodArgs.push(`allowActions: [${actions.map((v) => `'${v}'`).join(', ')}]`)\n }\n if (method.actions.create.length !== 0 && method.actions.call.length !== 0) {\n abimethodArgs.push(\"onCreate: 'allow'\")\n } else if (method.actions.create.length !== 0) {\n abimethodArgs.push(\"onCreate: 'require'\")\n } else {\n // disallow is default\n }\n const args = abimethodArgs.length === 0 ? '' : `{ ${abimethodArgs.join(', ')} }`\n return `@abimethod(${args})`\n }\n\n function genArg(arg: Arc56Arg): string {\n const argType = getClientType(arg.struct || arg.type)\n return `${arg.name}: ${argType},`\n }\n\n function genMethod(method: abi.Arc56Method): string {\n useImport('err', true)\n\n const return_type = getClientType(method.returns.struct || method.returns.type)\n const method_name = methodNameFor(method.name)\n const args = method.args.map(genArg)\n let arglist: string\n if (args.length === 0) {\n // No args -> inline arglist\n arglist = '()'\n } else if (args.length === 1) {\n // One arg -> inline arglist (remove trailing comma)\n arglist = `(${args[0].slice(0, -1)})`\n } else {\n // At least two args -> multiline arglist\n arglist = `(\\n${indent(...args)}\\n)`\n }\n\n return indent(\n ...tsdoc(method.desc),\n ARC4MethodToTSDecorator(method_name, method),\n `${method_name}${arglist}: ${return_type} {`,\n indent(\"err('stub only')\"),\n '}',\n )\n }\n\n function genMethods(): string[] {\n const methods = []\n if (contract.methods.length !== 0) {\n methods.push(genMethod(contract.methods[0]))\n }\n for (const method of contract.methods.slice(1)) {\n methods.push(`\\n${genMethod(method)}`)\n }\n return methods\n }\n\n // generate class definitions for any referenced structs in methods\n // don't generate from self.contract.structs as it may contain other struct definitions\n const clientClass = classNameFor(contract.name)\n const docs = tsdoc(contract.desc)\n const methods = genMethods()\n useImport('Contract', true)\n\n const sortedTypeImports = [...typeImports].toSorted().join(', ')\n const sortedImports = [...imports].toSorted().join(', ')\n const lines = []\n // Header\n lines.push(AUTO_GENERATED_COMMENT)\n lines.push(DISABLE_ESLINT_PRAGMA)\n if (sortedTypeImports.length !== 0) lines.push(`import type { ${sortedTypeImports} } from '@algorandfoundation/algorand-typescript'`)\n if (sortedImports.length !== 0) lines.push(`import { ${sortedImports} } from '@algorandfoundation/algorand-typescript'`)\n\n lines.push(\n // Struct declarations\n ...classDecls,\n '',\n // Contract definition\n ...docs,\n `export abstract class ${clientClass} extends Contract {`,\n ...methods,\n '}',\n '',\n )\n return lines.join('\\n')\n}\n"],"names":["ptype.accountPType","ptype.applicationPType","ptype.assetPType","ptype.voidPType","ptype.anyGtxnType","ptype.paymentGtxnType","ptype.keyRegistrationGtxnType","ptype.assetConfigGtxnType","ptype.assetTransferGtxnType","ptype.assetFreezeGtxnType","ptype.applicationCallGtxnType"],"mappings":";;;;;AAqBA,MAAM,sBAAsB,GAAG,+CAA+C;AAC9E,MAAM,qBAAqB,GAAG,sBAAsB;AAEpD,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAA6B;AAC9D,IAAA,CAAC,SAAS,EAAEA,YAAkB,CAAC;AAC/B,IAAA,CAAC,aA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AC,IAAI,CAAC,YAAY,aAAa,CAAA,iDAAA,CAAmD,CAAC;AAExH,IAAA,KAAK,CAAC,IAAI;;IAER,GAAG,UAAU,EACb,EAAE;;AAEF,IAAA,GAAG,IAAI,EACP,CAAA,sBAAA,EAAyB,WAAW,CAAA,mBAAA,CAAqB,EACzD,GAAG,OAAO,EACV,GAAG,EACH,EAAE,CACH;AACD,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AACzB;;;;"}
1
+ {"version":3,"file":"arc4-clientgen-Dd2qW-1d.js","sources":["../src/arc4-clientgen.ts"],"sourcesContent":["import * as abi from '@algorandfoundation/algokit-utils/abi'\nimport { existsSync } from 'fs'\nimport { readFile, writeFile } from 'fs/promises'\nimport { ContractReference, OnCompletionAction } from './awst/models'\nimport type { CompilationSet } from './awst_build/models/contract-class-model'\nimport { ContractClassModel } from './awst_build/models/contract-class-model'\nimport type { ABICompatiblePType } from './awst_build/ptypes'\nimport * as ptype from './awst_build/ptypes'\nimport { Constants } from './constants'\nimport { CodeError, InternalError } from './errors'\nimport { logger } from './logger'\nimport type { AlgoFile } from './options'\nimport { AbsolutePath } from './util/absolute-path'\n\ntype Arc56Arg = abi.Arc56Method['args'][number]\n\ntype ClientTask = {\n spec: abi.Arc56Contract\n outFile: AbsolutePath\n}\n\nconst AUTO_GENERATED_COMMENT = '// This file is auto-generated, do not modify'\nconst DISABLE_ESLINT_PRAGMA = '/* eslint-disable */'\n\nconst ARC4_PYTYPE_MAPPING = new Map<string, ABICompatiblePType>([\n ['account', ptype.accountPType],\n ['application', ptype.applicationPType],\n ['asset', ptype.assetPType],\n ['void', ptype.voidPType],\n ['txn', ptype.anyGtxnType],\n ['pay', ptype.paymentGtxnType],\n ['keyreg', ptype.keyRegistrationGtxnType],\n ['acfg', ptype.assetConfigGtxnType],\n ['axfer', ptype.assetTransferGtxnType],\n ['afrz', ptype.assetFreezeGtxnType],\n ['appl', ptype.applicationCallGtxnType],\n])\n\nfunction resolveClients(\n compilationSet: CompilationSet,\n filePaths: AlgoFile[],\n arc56Contracts: Record<string, abi.Arc56Contract>,\n): ClientTask[] {\n const sourceFileToOutDir = new Map<string, AbsolutePath>()\n for (const { sourceFile, outDir } of filePaths) {\n sourceFileToOutDir.set(sourceFile.toString(), outDir)\n }\n\n const arc56Files = []\n for (const ref of compilationSet.compilationOutputSet) {\n if (!(ref instanceof ContractReference)) {\n continue\n }\n const model = compilationSet.get(ref)\n if (!(model instanceof ContractClassModel)) {\n continue\n }\n if (!model.type.isARC4) {\n continue\n }\n\n const sourceFile = AbsolutePath.resolve({ path: ref.moduleName })\n const outDir = sourceFileToOutDir.get(sourceFile.toString())\n if (outDir === undefined) {\n logger.error(undefined, `Could not find a source file for the contract ${ref.className} at ${ref.moduleName}`)\n continue\n }\n\n const spec = arc56Contracts[ref.id]\n if (spec === undefined) {\n logger.error(undefined, `Could not find a generated spec for the contract ${ref.className} at ${ref.moduleName}`)\n continue\n }\n\n const name = model.options?.name || model.name\n arc56Files.push({\n spec,\n outFile: outDir.join(`${name}.client.ts`),\n })\n }\n return arc56Files\n}\n\nexport function writeARC4Clients(compilationSet: CompilationSet, filePaths: AlgoFile[], arc56Contracts: Record<string, abi.Arc56Contract>) {\n const clientFiles = resolveClients(compilationSet, filePaths, arc56Contracts)\n return Promise.all(\n clientFiles.map(async (clientTask) => {\n await writeARC4Client(clientTask.spec, clientTask.outFile)\n }),\n )\n}\n\nexport async function writeARC4Client(spec: abi.Arc56Contract, outFile: AbsolutePath) {\n if (await shouldWriteFile(outFile)) {\n logger.info(undefined, `Writing ${outFile.relativeTo('.')}`)\n const typescriptClient = generateClientFor(spec)\n await writeFile(outFile.toString(), typescriptClient, { encoding: 'utf-8' })\n } else {\n logger.error(undefined, `Not outputting ${outFile.relativeTo('.')} since content does not appear to be auto-generated`)\n }\n}\n\nasync function shouldWriteFile(outFile: AbsolutePath): Promise<boolean> {\n const filePath = outFile.toString()\n // FIXME: There's a TOCTOU bug here...\n if (!existsSync(filePath)) {\n return true\n }\n const contents = await readFile(filePath, { encoding: 'utf-8' })\n return contents.startsWith(AUTO_GENERATED_COMMENT)\n}\n\nfunction generateClientFor(contract: abi.Arc56Contract): string {\n const typeImports = new Set<string>()\n const imports = new Set<string>()\n const structToClass = new Map<string, string>()\n const reservedClassNames = new Set<string>()\n const reservedMethodNames = new Set<string>()\n const classDecls: string[] = []\n\n function useImport(name: string, asValue: boolean) {\n if (asValue) {\n if (typeImports.has(name)) typeImports.delete(name)\n imports.add(name)\n } else if (!imports.has(name)) {\n typeImports.add(name)\n }\n }\n function indent(...texts: string[]): string {\n const INDENT = ' '\n return INDENT + texts.join('\\n').replaceAll(/\\n+/g, `$&${INDENT}`)\n }\n\n function classNameFor(name: string): string {\n const base_name = name\n let seq = 1\n while (reservedClassNames.has(name)) {\n seq++\n name = `${base_name}${seq}`\n }\n\n reservedClassNames.add(name)\n return name\n }\n\n function methodNameFor(name: string): string {\n const base_name = name\n let seq = 1\n while (reservedMethodNames.has(name)) {\n seq++\n name = `${base_name}${seq}`\n }\n\n reservedMethodNames.add(name)\n return name\n }\n\n function typeNameToAlgoTSName(typeName: string): string {\n const knownMapping = ARC4_PYTYPE_MAPPING.get(typeName)\n if (knownMapping !== undefined) {\n const { name, module } = knownMapping\n if (module === Constants.moduleNames.algoTs.gtxn) {\n useImport('gtxn', false)\n return `gtxn.${name}`\n } else if (module === Constants.moduleNames.algoTs.reference) {\n useImport(name, false)\n return name\n } else if (module === Constants.moduleNames.tslib) {\n // The TypeScript prelude is always imported\n return name\n }\n\n throw new InternalError(`Cannot import ${name}: The module ${module} is unsupported`)\n }\n return ARC4ToAlgoTSName(abi.ABIType.from(typeName))\n }\n\n function ARC4ToAlgoTSName(type: abi.ABIType): string {\n useImport('arc4', false)\n if (type instanceof abi.ABIBoolType) return 'arc4.Bool'\n if (type instanceof abi.ABIStringType) return 'arc4.Str'\n if (type instanceof abi.ABIAddressType) return 'arc4.Address'\n if (type instanceof abi.ABIByteType) return 'arc4.Byte'\n if (type instanceof abi.ABIUintType) return `arc4.Uint<${type.bitSize}>`\n if (type instanceof abi.ABIUfixedType) return `arc4.UFixed<${type.bitSize}, ${type.precision}>`\n if (type instanceof abi.ABIArrayStaticType) {\n const elementType = ARC4ToAlgoTSName(type.childType)\n return `arc4.StaticArray<${elementType}, ${type.length}>`\n }\n if (type instanceof abi.ABIArrayDynamicType) {\n if (type.childType instanceof abi.ABIByteType) return 'arc4.DynamicBytes'\n\n const elementType = ARC4ToAlgoTSName(type.childType)\n return `arc4.DynamicArray<${elementType}>`\n }\n if (type instanceof abi.ABITupleType) {\n const tupleTypes = type.childTypes.map(ARC4ToAlgoTSName)\n return `arc4.Tuple<readonly [${tupleTypes.join(', ')}]>`\n }\n throw new CodeError(`unknown ARC-4 type '${type}'`)\n }\n\n function getClientType(type: string): string {\n // map ABI / AVM type to algots type\n if (type === 'AVMUint64') {\n useImport('uint64', false)\n return 'uint64'\n } else if (type === 'AVMBytes') {\n useImport('bytes', false)\n return 'bytes'\n } else if (type in contract.structs) {\n return structToClass.get(type) || prepareStructClass(type, contract.structs[type])\n } else {\n return typeNameToAlgoTSName(type)\n }\n }\n\n function prepareStructClass(name: string, fields: abi.StructField[]) {\n useImport('arc4', true)\n\n const className = classNameFor(name)\n structToClass.set(name, className)\n const lines = ['', `export class ${className} extends arc4.Struct<{`]\n for (const field of fields) {\n let type: string\n if (typeof field.type === 'string') {\n type = getClientType(field.type)\n } else {\n // generate anonymous struct type\n const anonStruct = `${name}_${field.name}`\n type = prepareStructClass(anonStruct, field.type)\n }\n lines.push(indent(`${field.name}: ${type}`))\n }\n lines.push('}> {}')\n classDecls.push(...lines)\n return className\n }\n\n function tsdoc(description: string | undefined | null): string[] {\n if (description === undefined || description === null) {\n return []\n }\n return ['/**', ` * ${description.replaceAll(/\\n+/g, '$& * ')}`, ' */']\n }\n\n function compatibleActions(create: string[], call: string[]): boolean {\n if (create.length === 0) {\n return true\n }\n if (call.length === 0) {\n return true\n }\n // if both collections are present, then they are compatible if everything in\n // create is also in call\n const createSet = new Set(create)\n const callSet = new Set(call)\n return createSet.symmetricDifference(callSet).size === 0\n }\n\n function ARC4MethodToTSDecorator(name: string, method: abi.Arc56Method): string {\n useImport('abimethod', true)\n\n const abimethodArgs: string[] = []\n if (method.name !== name) {\n abimethodArgs.push(`name: '${method.name}'`)\n }\n if (method.readonly) {\n abimethodArgs.push('readonly: true')\n }\n // if any alias types are encountered, force index encoding\n const argTypes = new Set(method.args.map((v) => v.type))\n const aliasTypes = new Set(['asset', 'application', 'account'])\n if (argTypes.intersection(aliasTypes).size !== 0) {\n abimethodArgs.push(\"resourceEncoding: 'index'\")\n }\n if (!compatibleActions(method.actions.create, method.actions.call)) {\n // TODO: support this, once decorators support it\n throw new CodeError(`unsupported on completion combination for generating an ARC-4 client for method: ${method.name}`)\n }\n const actions = [...method.actions.create, ...method.actions.call]\n actions.sort((a, b) => OnCompletionAction[a] - OnCompletionAction[b])\n const uniqueActions = new Set(actions)\n\n if (!(uniqueActions.size === 1 && uniqueActions.has('NoOp'))) {\n abimethodArgs.push(`allowActions: [${actions.map((v) => `'${v}'`).join(', ')}]`)\n }\n if (method.actions.create.length !== 0 && method.actions.call.length !== 0) {\n abimethodArgs.push(\"onCreate: 'allow'\")\n } else if (method.actions.create.length !== 0) {\n abimethodArgs.push(\"onCreate: 'require'\")\n } else {\n // disallow is default\n }\n const args = abimethodArgs.length === 0 ? '' : `{ ${abimethodArgs.join(', ')} }`\n return `@abimethod(${args})`\n }\n\n function genArg(arg: Arc56Arg): string {\n const argType = getClientType(arg.struct || arg.type)\n return `${arg.name}: ${argType},`\n }\n\n function genMethod(method: abi.Arc56Method): string {\n useImport('err', true)\n\n const return_type = getClientType(method.returns.struct || method.returns.type)\n const method_name = methodNameFor(method.name)\n const args = method.args.map(genArg)\n let arglist: string\n if (args.length === 0) {\n // No args -> inline arglist\n arglist = '()'\n } else if (args.length === 1) {\n // One arg -> inline arglist (remove trailing comma)\n arglist = `(${args[0].slice(0, -1)})`\n } else {\n // At least two args -> multiline arglist\n arglist = `(\\n${indent(...args)}\\n)`\n }\n\n return indent(\n ...tsdoc(method.desc),\n ARC4MethodToTSDecorator(method_name, method),\n `${method_name}${arglist}: ${return_type} {`,\n indent(\"err('stub only')\"),\n '}',\n )\n }\n\n function genMethods(): string[] {\n const methods = []\n if (contract.methods.length !== 0) {\n methods.push(genMethod(contract.methods[0]))\n }\n for (const method of contract.methods.slice(1)) {\n methods.push(`\\n${genMethod(method)}`)\n }\n return methods\n }\n\n // generate class definitions for any referenced structs in methods\n // don't generate from self.contract.structs as it may contain other struct definitions\n const clientClass = classNameFor(contract.name)\n const docs = tsdoc(contract.desc)\n const methods = genMethods()\n useImport('Contract', true)\n\n const sortedTypeImports = [...typeImports].toSorted().join(', ')\n const sortedImports = [...imports].toSorted().join(', ')\n const lines = []\n // Header\n lines.push(AUTO_GENERATED_COMMENT)\n lines.push(DISABLE_ESLINT_PRAGMA)\n if (sortedTypeImports.length !== 0) lines.push(`import type { ${sortedTypeImports} } from '@algorandfoundation/algorand-typescript'`)\n if (sortedImports.length !== 0) lines.push(`import { ${sortedImports} } from '@algorandfoundation/algorand-typescript'`)\n\n lines.push(\n // Struct declarations\n ...classDecls,\n '',\n // Contract definition\n ...docs,\n `export abstract class ${clientClass} extends Contract {`,\n ...methods,\n '}',\n '',\n )\n return lines.join('\\n')\n}\n"],"names":["ptype.accountPType","ptype.applicationPType","ptype.assetPType","ptype.voidPType","ptype.anyGtxnType","ptype.paymentGtxnType","ptype.keyRegistrationGtxnType","ptype.assetConfigGtxnType","ptype.assetTransferGtxnType","ptype.assetFreezeGtxnType","ptype.applicationCallGtxnType"],"mappings":";;;;;AAqBA,MAAM,sBAAsB,GAAG,+CAA+C;AAC9E,MAAM,qBAAqB,GAAG,sBAAsB;AAEpD,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAA6B;AAC9D,IAAA,CAAC,SAAS,EAAEA,YAAkB,CAAC;AAC/B,IAAA,CAAC,aAAa,EA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AI,CAAC,YAAY,aAAa,CAAA,iDAAA,CAAmD,CAAC;AAExH,IAAA,KAAK,CAAC,IAAI;;IAER,GAAG,UAAU,EACb,EAAE;;AAEF,IAAA,GAAG,IAAI,EACP,CAAA,sBAAA,EAAyB,WAAW,CAAA,mBAAA,CAAqB,EACzD,GAAG,OAAO,EACV,GAAG,EACH,EAAE,CACH;AACD,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AACzB;;;;"}
package/awst/wtypes.d.ts CHANGED
@@ -56,10 +56,8 @@ export declare namespace wtypes {
56
56
  export class ReferenceArray extends WType {
57
57
  readonly elementType: WType;
58
58
  readonly sourceLocation: SourceLocation | null;
59
- readonly immutable = false;
60
59
  constructor(props: {
61
60
  itemType: WType;
62
- immutable: boolean;
63
61
  sourceLocation?: SourceLocation;
64
62
  });
65
63
  }
@@ -82,10 +80,9 @@ export declare namespace wtypes {
82
80
  });
83
81
  }
84
82
  export class WInnerTransactionFields extends WType {
85
- transactionType: TransactionKind | null;
86
- constructor({ transactionType, name }: {
83
+ readonly transactionType: TransactionKind | null;
84
+ constructor({ transactionType }: {
87
85
  transactionType?: TransactionKind;
88
- name?: string;
89
86
  });
90
87
  }
91
88
  export class WABICallInnerTransactionFields extends WInnerTransactionFields {
@@ -11,7 +11,6 @@ export declare abstract class BaseVisitor implements Visitor<Expressions, NodeBu
11
11
  private baseAccept;
12
12
  readonly textVisitor: TextVisitor;
13
13
  get context(): AwstBuildContext;
14
- protected constructor();
15
14
  logNotSupported(node: ts.Node | undefined, message: string): void;
16
15
  throwNotSupported(node: ts.Node, message: string): never;
17
16
  visitBigIntLiteral(node: ts.BigIntLiteral): InstanceBuilder;
@@ -1,5 +1,5 @@
1
1
  import type ts from 'typescript';
2
- import * as awst from '../../awst/nodes';
2
+ import { ContractMethod } from '../../awst/nodes';
3
3
  import type { SourceLocation } from '../../awst/source-location';
4
4
  import type { NodeBuilder } from '../eb';
5
5
  import type { ContractClassPType, FunctionPType } from '../ptypes';
@@ -13,8 +13,8 @@ export declare class ContractMethodBaseVisitor extends FunctionVisitor {
13
13
  export declare class ContractMethodVisitor extends ContractMethodBaseVisitor {
14
14
  private readonly metaData;
15
15
  constructor(node: ts.MethodDeclaration, contractType: ContractClassPType);
16
- get result(): awst.ContractMethod;
17
- static buildContractMethod(node: ts.MethodDeclaration, contractType: ContractClassPType): () => awst.ContractMethod;
16
+ get result(): ContractMethod;
17
+ static buildContractMethod(node: ts.MethodDeclaration, contractType: ContractClassPType): () => ContractMethod;
18
18
  private buildArc4Config;
19
19
  private validateDecoratorRoutingData;
20
20
  /**
@@ -117,7 +117,6 @@ export declare abstract class ClassBuilder extends NodeBuilder {
117
117
  }
118
118
  export declare abstract class FunctionBuilder extends NodeBuilder {
119
119
  readonly ptype: PType | undefined;
120
- constructor(location: SourceLocation);
121
120
  abstract call(args: ReadonlyArray<NodeBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation<ts.CallExpression>): NodeBuilder;
122
121
  }
123
122
  export declare abstract class InstanceExpressionBuilder<TPType extends PType> extends InstanceBuilder<PType> {
@@ -13,7 +13,7 @@ export declare const UintN128Class: LibClassType;
13
13
  export declare const UintN256Class: LibClassType;
14
14
  export declare abstract class ARC4EncodedType extends PType {
15
15
  abstract readonly wtype: wtypes.ARC4Type;
16
- abstract readonly nativeType: PType | undefined;
16
+ abstract readonly nativeType: PType;
17
17
  abstract readonly abiTypeSignature: string;
18
18
  protected static buildAbiTupleSignature(types: ARC4EncodedType[]): string;
19
19
  }
@@ -360,7 +360,6 @@ export declare class NamespacePType extends PType {
360
360
  readonly [PType.IdSymbol] = "NamespacePType";
361
361
  readonly wtype: undefined;
362
362
  readonly name: string;
363
- readonly factory: undefined;
364
363
  readonly module: string;
365
364
  readonly singleton = true;
366
365
  constructor({ name, module }: {
@@ -790,11 +789,10 @@ export declare class ReferenceArrayType extends PType {
790
789
  readonly singleton = false;
791
790
  readonly sourceLocation: SourceLocation | undefined;
792
791
  readonly elementType: PType;
793
- constructor({ elementType, sourceLocation, name, }: {
792
+ constructor({ elementType, sourceLocation, name }: {
794
793
  elementType: PType;
795
794
  sourceLocation?: SourceLocation;
796
795
  name?: string;
797
- immutable?: boolean;
798
796
  });
799
797
  get wtype(): wtypes.ReferenceArray;
800
798
  accept<T>(visitor: PTypeVisitor<T>): T;
@@ -32,7 +32,7 @@ export declare class TypeResolver {
32
32
  private reflectStructType;
33
33
  private reflectContractType;
34
34
  private resolveClusteredPrototype;
35
- getTypeName(type: ts.Type, sourceLocation: SourceLocation): SymbolName | undefined;
35
+ getTypeName(type: ts.Type): SymbolName | undefined;
36
36
  private getLocationOfSymbol;
37
37
  private tryGetLocalSymbolName;
38
38
  private getSymbolFullName;
@@ -2,11 +2,11 @@
2
2
  import { arc32ToArc56 } from '@algorandfoundation/algokit-utils/app-spec';
3
3
  import { ArgumentParser } from 'argparse';
4
4
  import { readFile } from 'fs/promises';
5
- import { w as writeARC4Client } from '../arc4-clientgen-CZtNN1eT.js';
6
- import { a as appVersion } from '../semver-a7hIj_hk.js';
7
- import { c as checkNodeVersion } from '../check-node-version-BYGc-qxw.js';
8
- import { a as addEnumArg, C as ConsoleLogSink } from '../util-nZLj7LWS.js';
9
- import { L as LogLevel, l as logger, A as AbsolutePath, P as PuyaError, a as LoggingContext } from '../contract-class-model-Dpn9A-pJ.js';
5
+ import { w as writeARC4Client } from '../arc4-clientgen-Dd2qW-1d.js';
6
+ import { a as appVersion } from '../semver-T4bO0VEo.js';
7
+ import { c as checkNodeVersion } from '../check-node-version-Df1hdewH.js';
8
+ import { a as addEnumArg, C as ConsoleLogSink } from '../util-CA3Q0W2C.js';
9
+ import { L as LogLevel, l as logger, A as AbsolutePath, P as PuyaError, a as LoggingContext } from '../contract-class-model-cK8F4WVM.js';
10
10
  import '@algorandfoundation/algokit-utils/abi';
11
11
  import 'fs';
12
12
  import 'node:url';
package/bin/puyats-ls.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import { L as LogLevel, cl as distinct, l as logger, cm as zipStrict, d as Constants } from '../contract-class-model-Dpn9A-pJ.js';
2
+ import { L as LogLevel, cl as distinct, l as logger, cm as zipStrict, d as Constants } from '../contract-class-model-cK8F4WVM.js';
3
3
  import { ArgumentParser, BooleanOptionalAction } from 'argparse';
4
- import { b as packageVersion, a as appVersion } from '../semver-a7hIj_hk.js';
5
- import { c as checkNodeVersion } from '../check-node-version-BYGc-qxw.js';
4
+ import { b as packageVersion, a as appVersion } from '../semver-T4bO0VEo.js';
5
+ import { c as checkNodeVersion } from '../check-node-version-Df1hdewH.js';
6
6
  import { __esDecorate, __runInitializers } from 'tslib';
7
- import { r as requireMain, l as logCaughtExpression, L as LogExceptions, c as createAnalyserService, a as createNormalisedTextDocumentConnection, n as normalisedUri, i as isCodeFixData } from '../analyser-service-DjrWRS0-.js';
8
- import { r as resolvePuyaPath } from '../resolve-puya-path-CdZID0Yd.js';
7
+ import { r as requireMain, l as logCaughtExpression, L as LogExceptions, c as createAnalyserService, a as createNormalisedTextDocumentConnection, n as normalisedUri, i as isCodeFixData } from '../analyser-service-B0DpIecU.js';
8
+ import { r as resolvePuyaPath } from '../resolve-puya-path-Bgh6DuRP.js';
9
9
  import EventEmitter from 'node:events';
10
- import { a7 as DefaultMap } from '../options-BCW57sPn.js';
10
+ import { a7 as DefaultMap } from '../options-sBHEIhey.js';
11
11
  import 'typescript';
12
12
  import 'node:fs';
13
13
  import 'node:util';
package/bin/run-cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import '../cli.mjs';
3
- import '../contract-class-model-Dpn9A-pJ.js';
3
+ import '../contract-class-model-cK8F4WVM.js';
4
4
  import 'typescript';
5
5
  import 'node:fs';
6
6
  import 'node:util';
@@ -9,14 +9,14 @@ import 'node:crypto';
9
9
  import 'polytype';
10
10
  import 'node:async_hooks';
11
11
  import 'argparse';
12
- import '../semver-a7hIj_hk.js';
12
+ import '../semver-T4bO0VEo.js';
13
13
  import 'fs';
14
14
  import 'node:url';
15
- import '../compile-BKk4hPli.js';
16
- import '../arc4-clientgen-CZtNN1eT.js';
15
+ import '../compile-DGk1ftqu.js';
16
+ import '../arc4-clientgen-Dd2qW-1d.js';
17
17
  import '@algorandfoundation/algokit-utils/abi';
18
18
  import 'fs/promises';
19
- import '../options-BCW57sPn.js';
19
+ import '../options-sBHEIhey.js';
20
20
  import 'arcsecond';
21
21
  import 'tslib';
22
22
  import 'node:buffer';
@@ -29,11 +29,11 @@ import 'net';
29
29
  import 'change-case';
30
30
  import 'glob';
31
31
  import 'minimatch';
32
- import '../resolve-puya-path-CdZID0Yd.js';
32
+ import '../resolve-puya-path-Bgh6DuRP.js';
33
33
  import 'signal-exit';
34
34
  import 'tar';
35
35
  import 'node:zlib';
36
- import '../util-nZLj7LWS.js';
36
+ import '../util-CA3Q0W2C.js';
37
37
  import 'chalk';
38
- import '../check-node-version-BYGc-qxw.js';
38
+ import '../check-node-version-Df1hdewH.js';
39
39
  //# sourceMappingURL=run-cli.mjs.map
@@ -1,6 +1,6 @@
1
1
  import chalk from 'chalk';
2
- import { d as Constants } from './contract-class-model-Dpn9A-pJ.js';
3
- import { p as parseSemVer } from './semver-a7hIj_hk.js';
2
+ import { d as Constants } from './contract-class-model-cK8F4WVM.js';
3
+ import { p as parseSemVer } from './semver-T4bO0VEo.js';
4
4
 
5
5
  function writeError(text) {
6
6
  // eslint-disable-next-line no-console
@@ -17,4 +17,4 @@ function checkNodeVersion() {
17
17
  }
18
18
 
19
19
  export { checkNodeVersion as c };
20
- //# sourceMappingURL=check-node-version-BYGc-qxw.js.map
20
+ //# sourceMappingURL=check-node-version-Df1hdewH.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-node-version-BYGc-qxw.js","sources":["../src/cli/check-node-version.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { Constants } from '../constants'\nimport { parseSemVer } from '../puya/semver'\n\nfunction writeError(text: string) {\n // eslint-disable-next-line no-console\n console.error(chalk.red(text))\n}\n\nexport function checkNodeVersion() {\n const min = parseSemVer(Constants.minNodeVersion)\n const actual = parseSemVer(process.versions.node)\n\n if (\n actual.major < min.major ||\n (actual.major === min.major && actual.minor < min.minor) ||\n (actual.major === min.major && actual.minor === min.minor && actual.rev < min.rev)\n ) {\n writeError(\n `Installed node version ${process.versions.node} is older than the minimum required version ${Constants.minNodeVersion}. You may experience compatibility issues.`,\n )\n }\n}\n"],"names":[],"mappings":";;;;AAIA,SAAS,UAAU,CAAC,IAAY,EAAA;;IAE9B,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAChC;SAEgB,gBAAgB,GAAA;IAC9B,MAAM,GAAG,GAAG,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC;IACjD,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;AAEjD,IAAA,IACE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK;AACxB,SAAC,MAAM,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;SACvD,MAAM,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,IAAI,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,EAClF;AACA,QAAA,UAAU,CACR,CAAA,uBAAA,EAA0B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAA,4CAAA,EAA+C,SAAS,CAAC,cAAc,CAAA,0CAAA,CAA4C,CACnK;IACH;AACF;;;;"}
1
+ {"version":3,"file":"check-node-version-Df1hdewH.js","sources":["../src/cli/check-node-version.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { Constants } from '../constants'\nimport { parseSemVer } from '../puya/semver'\n\nfunction writeError(text: string) {\n // eslint-disable-next-line no-console\n console.error(chalk.red(text))\n}\n\nexport function checkNodeVersion() {\n const min = parseSemVer(Constants.minNodeVersion)\n const actual = parseSemVer(process.versions.node)\n\n if (\n actual.major < min.major ||\n (actual.major === min.major && actual.minor < min.minor) ||\n (actual.major === min.major && actual.minor === min.minor && actual.rev < min.rev)\n ) {\n writeError(\n `Installed node version ${process.versions.node} is older than the minimum required version ${Constants.minNodeVersion}. You may experience compatibility issues.`,\n )\n }\n}\n"],"names":[],"mappings":";;;;AAIA,SAAS,UAAU,CAAC,IAAY,EAAA;;IAE9B,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAChC;SAEgB,gBAAgB,GAAA;IAC9B,MAAM,GAAG,GAAG,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC;IACjD,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;AAEjD,IAAA,IACE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK;AACxB,SAAC,MAAM,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;SACvD,MAAM,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,IAAI,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,EAClF;AACA,QAAA,UAAU,CACR,CAAA,uBAAA,EAA0B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAA,4CAAA,EAA+C,SAAS,CAAC,cAAc,CAAA,0CAAA,CAA4C,CACnK;IACH;AACF;;;;"}
package/cli.mjs CHANGED
@@ -1,10 +1,10 @@
1
- import { l as logger, A as AbsolutePath, a as LoggingContext, L as LogLevel } from './contract-class-model-Dpn9A-pJ.js';
1
+ import { l as logger, A as AbsolutePath, a as LoggingContext, L as LogLevel } from './contract-class-model-cK8F4WVM.js';
2
2
  import { BooleanOptionalAction, ArgumentParser } from 'argparse';
3
- import { a as appVersion } from './semver-a7hIj_hk.js';
4
- import { c as compile } from './compile-BKk4hPli.js';
5
- import { _ as defaultPuyaOptions, X as processInputPaths, V as CompileOptions, $ as parseCliTemplateVar, a0 as LocalsCoalescingStrategy } from './options-BCW57sPn.js';
6
- import { a as addEnumArg, C as ConsoleLogSink, c as convertInt } from './util-nZLj7LWS.js';
7
- import { c as checkNodeVersion } from './check-node-version-BYGc-qxw.js';
3
+ import { a as appVersion } from './semver-T4bO0VEo.js';
4
+ import { c as compile } from './compile-DGk1ftqu.js';
5
+ import { _ as defaultPuyaOptions, X as processInputPaths, V as CompileOptions, $ as parseCliTemplateVar, a0 as LocalsCoalescingStrategy } from './options-sBHEIhey.js';
6
+ import { a as addEnumArg, C as ConsoleLogSink, c as convertInt } from './util-CA3Q0W2C.js';
7
+ import { c as checkNodeVersion } from './check-node-version-Df1hdewH.js';
8
8
  import 'typescript';
9
9
  import 'node:fs';
10
10
  import 'node:util';
@@ -14,10 +14,10 @@ import 'polytype';
14
14
  import 'node:async_hooks';
15
15
  import 'fs';
16
16
  import 'node:url';
17
- import './arc4-clientgen-CZtNN1eT.js';
17
+ import './arc4-clientgen-Dd2qW-1d.js';
18
18
  import '@algorandfoundation/algokit-utils/abi';
19
19
  import 'fs/promises';
20
- import './resolve-puya-path-CdZID0Yd.js';
20
+ import './resolve-puya-path-Bgh6DuRP.js';
21
21
  import 'tslib';
22
22
  import 'signal-exit';
23
23
  import 'cross-spawn';
@@ -1,9 +1,9 @@
1
- import { a as writeARC4Clients } from './arc4-clientgen-CZtNN1eT.js';
2
- import { a1 as PuyaService, a2 as deserializeAndLog, Y as registerPTypes, a3 as createTsProgram, a4 as buildAwst, a5 as validateAwst, Z as typeRegistry } from './options-BCW57sPn.js';
3
- import { a as appVersion } from './semver-a7hIj_hk.js';
4
- import { ck as mkDirIfNotExists, L as LogLevel, a as LoggingContext, l as logger } from './contract-class-model-Dpn9A-pJ.js';
1
+ import { a as writeARC4Clients } from './arc4-clientgen-Dd2qW-1d.js';
2
+ import { a1 as PuyaService, a2 as deserializeAndLog, Y as registerPTypes, a3 as createTsProgram, a4 as buildAwst, a5 as validateAwst, Z as typeRegistry } from './options-sBHEIhey.js';
3
+ import { a as appVersion } from './semver-T4bO0VEo.js';
4
+ import { ck as mkDirIfNotExists, L as LogLevel, a as LoggingContext, l as logger } from './contract-class-model-cK8F4WVM.js';
5
5
  import ts from 'typescript';
6
- import { r as resolvePuyaPath } from './resolve-puya-path-CdZID0Yd.js';
6
+ import { r as resolvePuyaPath } from './resolve-puya-path-Bgh6DuRP.js';
7
7
 
8
8
  function buildCompilationSetMapping({ awst, inputPaths, compilationSet, }) {
9
9
  const setIds = new Set(compilationSet.compilationOutputSet.map((s) => s.id));
@@ -110,4 +110,4 @@ async function compile(options, puyaService) {
110
110
  }
111
111
 
112
112
  export { compile as c };
113
- //# sourceMappingURL=compile-BKk4hPli.js.map
113
+ //# sourceMappingURL=compile-DGk1ftqu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compile-BKk4hPli.js","sources":["../src/puya/build-compilation-set-mapping.ts","../src/puya/index.ts","../src/compile.ts"],"sourcesContent":["import type { AWST } from '../awst/nodes'\nimport type { CompilationSet } from '../awst_build/models/contract-class-model'\nimport type { AlgoFile, CompilationSetMapping } from '../options'\nimport { mkDirIfNotExists } from '../util'\n\nexport function buildCompilationSetMapping({\n awst,\n inputPaths,\n compilationSet,\n}: {\n awst: AWST[]\n inputPaths: AlgoFile[]\n compilationSet: CompilationSet\n}): CompilationSetMapping {\n const setIds = new Set(compilationSet.compilationOutputSet.map((s) => s.id))\n\n return awst.reduce((acc, cur) => {\n if (setIds.has(cur.id.toString())) {\n const matchedPath = inputPaths.find((p) => cur.sourceLocation.file && p.sourceFile.equals(cur.sourceLocation.file))\n if (matchedPath) {\n mkDirIfNotExists(matchedPath.outDir.toString())\n acc[cur.id.toString()] = matchedPath.outDir.toString()\n }\n }\n return acc\n }, {} as CompilationSetMapping)\n}\n","import ts from 'typescript'\nimport type { AWST } from '../awst/nodes'\nimport type { CompilationSet } from '../awst_build/models/contract-class-model'\nimport { LogLevel } from '../logger'\nimport type { CompileOptions } from '../options'\nimport type { SourceFileMapping } from '../parser'\nimport type { AbsolutePath } from '../util/absolute-path'\nimport { buildCompilationSetMapping } from './build-compilation-set-mapping'\nimport { deserializeAndLog } from './log-deserializer'\nimport { PuyaService } from './puya-service'\nimport { resolvePuyaPath } from './resolve-puya-path'\n\nexport async function puyaCompile({\n moduleAwst,\n programDirectory,\n sourceFiles,\n options,\n compilationSet,\n puyaService,\n}: {\n moduleAwst: AWST[]\n programDirectory: AbsolutePath\n sourceFiles: SourceFileMapping\n options: CompileOptions\n compilationSet: CompilationSet\n puyaService?: PuyaService\n}) {\n const puyaPath = await resolvePuyaPath(options)\n const localPuyaService = puyaService ?? new PuyaService({ puyaPath })\n const puyaOptions = options.buildPuyaOptions(\n buildCompilationSetMapping({\n awst: moduleAwst,\n inputPaths: options.filePaths,\n compilationSet,\n }),\n )\n\n const response = await localPuyaService.compile({\n awst: moduleAwst,\n options: puyaOptions,\n base_path: programDirectory.toString(),\n log_level: getPuyaLogLevel(options.logLevel),\n source_annotations: getSourceFileContents(sourceFiles),\n })\n // Shutdown service if we created it locally\n if (puyaService === undefined) await localPuyaService.shutdown()\n for (const log of response.logs) {\n deserializeAndLog(log)\n }\n\n return response\n}\n\nfunction getPuyaLogLevel(logLevel: LogLevel): string {\n switch (logLevel) {\n case LogLevel.Debug:\n return 'debug'\n case LogLevel.Info:\n return 'info'\n case LogLevel.Warning:\n return 'warning'\n case LogLevel.Error:\n return 'error'\n case LogLevel.Critical:\n return 'critical'\n }\n}\nfunction getSourceFileContents(sourceFiles: SourceFileMapping) {\n return Object.fromEntries(\n Object.entries(sourceFiles).map(([key, value]) => {\n const source = ts.isSourceFile(value) ? value.getFullText().replace(/\\r\\n/g, '\\n').split(/\\n/g) : value\n return [key, source] as const\n }),\n )\n}\n","import type ts from 'typescript'\nimport { writeARC4Clients } from './arc4-clientgen'\nimport type { AWST } from './awst/nodes'\nimport { validateAwst } from './awst/validation'\nimport { buildAwst } from './awst_build'\nimport { type CompilationSet } from './awst_build/models/contract-class-model'\nimport { registerPTypes } from './awst_build/ptypes/register'\nimport { typeRegistry } from './awst_build/type-registry'\nimport { appVersion } from './cli/app-version'\nimport { logger, LoggingContext } from './logger'\nimport type { CompileOptions } from './options'\nimport { createTsProgram } from './parser'\nimport { puyaCompile } from './puya'\nimport type { PuyaService } from './puya/puya-service'\nimport type { AbsolutePath } from './util/absolute-path'\n\nexport type CompileResult = {\n programDirectory: AbsolutePath\n awst?: AWST[]\n ast?: Record<string, ts.SourceFile>\n compilationSet?: CompilationSet\n}\n\nexport async function compile(options: CompileOptions, puyaService?: PuyaService): Promise<CompileResult> {\n const loggerCtx = LoggingContext.current\n if (options.treatWarningsAsErrors) loggerCtx.treatWarningsAsErrors = true\n\n registerPTypes(typeRegistry)\n logger.info(undefined, appVersion({ withAVMVersion: false }))\n const programResult = createTsProgram(options)\n if (loggerCtx.hasErrors()) {\n logger.info(undefined, 'Compilation halted due to parse errors')\n return {\n programDirectory: programResult.programDirectory,\n ast: programResult.sourceFiles,\n }\n }\n const { moduleAwst, compilationSet } = buildAwst(programResult, options)\n validateAwst(moduleAwst)\n\n if (loggerCtx.hasErrors()) {\n logger.info(undefined, 'Compilation halted due to errors')\n return {\n programDirectory: programResult.programDirectory,\n awst: moduleAwst,\n ast: programResult.sourceFiles,\n compilationSet,\n }\n }\n if (!options.dryRun) {\n const compileResult = await puyaCompile({\n options,\n moduleAwst,\n programDirectory: programResult.programDirectory,\n compilationSet,\n sourceFiles: programResult.sourceFiles,\n puyaService,\n })\n\n if (options.outputClient) {\n await writeARC4Clients(compilationSet, options.filePaths, compileResult.arc56)\n }\n }\n\n return {\n programDirectory: programResult.programDirectory,\n awst: moduleAwst,\n ast: programResult.sourceFiles,\n compilationSet,\n }\n}\n"],"names":[],"mappings":";;;;;;;AAKM,SAAU,0BAA0B,C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AAC;AAEF,QAAA,IAAI,OAAO,CAAC,YAAY,EAAE;AACxB,YAAA,MAAM,gBAAgB,CAAC,cAAc,EAAE,OAAO,CAAC,SAAS,EAAE,aAAa,CAAC,KAAK,CAAC;QAChF;IACF;IAEA,OAAO;QACL,gBAAgB,EAAE,aAAa,CAAC,gBAAgB;AAChD,QAAA,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,aAAa,CAAC,WAAW;QAC9B,cAAc;KACf;AACH;;;;"}
1
+ {"version":3,"file":"compile-DGk1ftqu.js","sources":["../src/puya/build-compilation-set-mapping.ts","../src/puya/index.ts","../src/compile.ts"],"sourcesContent":["import type { AWST } from '../awst/nodes'\nimport type { CompilationSet } from '../awst_build/models/contract-class-model'\nimport type { AlgoFile, CompilationSetMapping } from '../options'\nimport { mkDirIfNotExists } from '../util'\n\nexport function buildCompilationSetMapping({\n awst,\n inputPaths,\n compilationSet,\n}: {\n awst: AWST[]\n inputPaths: AlgoFile[]\n compilationSet: CompilationSet\n}): CompilationSetMapping {\n const setIds = new Set(compilationSet.compilationOutputSet.map((s) => s.id))\n\n return awst.reduce((acc, cur) => {\n if (setIds.has(cur.id.toString())) {\n const matchedPath = inputPaths.find((p) => cur.sourceLocation.file && p.sourceFile.equals(cur.sourceLocation.file))\n if (matchedPath) {\n mkDirIfNotExists(matchedPath.outDir.toString())\n acc[cur.id.toString()] = matchedPath.outDir.toString()\n }\n }\n return acc\n }, {} as CompilationSetMapping)\n}\n","import ts from 'typescript'\nimport type { AWST } from '../awst/nodes'\nimport type { CompilationSet } from '../awst_build/models/contract-class-model'\nimport { LogLevel } from '../logger'\nimport type { CompileOptions } from '../options'\nimport type { SourceFileMapping } from '../parser'\nimport type { AbsolutePath } from '../util/absolute-path'\nimport { buildCompilationSetMapping } from './build-compilation-set-mapping'\nimport { deserializeAndLog } from './log-deserializer'\nimport { PuyaService } from './puya-service'\nimport { resolvePuyaPath } from './resolve-puya-path'\n\nexport async function puyaCompile({\n moduleAwst,\n programDirectory,\n sourceFiles,\n options,\n compilationSet,\n puyaService,\n}: {\n moduleAwst: AWST[]\n programDirectory: AbsolutePath\n sourceFiles: SourceFileMapping\n options: CompileOptions\n compilationSet: CompilationSet\n puyaService?: PuyaService\n}) {\n const puyaPath = await resolvePuyaPath(options)\n const localPuyaService = puyaService ?? new PuyaService({ puyaPath })\n const puyaOptions = options.buildPuyaOptions(\n buildCompilationSetMapping({\n awst: moduleAwst,\n inputPaths: options.filePaths,\n compilationSet,\n }),\n )\n\n const response = await localPuyaService.compile({\n awst: moduleAwst,\n options: puyaOptions,\n base_path: programDirectory.toString(),\n log_level: getPuyaLogLevel(options.logLevel),\n source_annotations: getSourceFileContents(sourceFiles),\n })\n // Shutdown service if we created it locally\n if (puyaService === undefined) await localPuyaService.shutdown()\n for (const log of response.logs) {\n deserializeAndLog(log)\n }\n\n return response\n}\n\nfunction getPuyaLogLevel(logLevel: LogLevel): string {\n switch (logLevel) {\n case LogLevel.Debug:\n return 'debug'\n case LogLevel.Info:\n return 'info'\n case LogLevel.Warning:\n return 'warning'\n case LogLevel.Error:\n return 'error'\n case LogLevel.Critical:\n return 'critical'\n }\n}\nfunction getSourceFileContents(sourceFiles: SourceFileMapping) {\n return Object.fromEntries(\n Object.entries(sourceFiles).map(([key, value]) => {\n const source = ts.isSourceFile(value) ? value.getFullText().replace(/\\r\\n/g, '\\n').split(/\\n/g) : value\n return [key, source] as const\n }),\n )\n}\n","import type ts from 'typescript'\nimport { writeARC4Clients } from './arc4-clientgen'\nimport type { AWST } from './awst/nodes'\nimport { validateAwst } from './awst/validation'\nimport { buildAwst } from './awst_build'\nimport { type CompilationSet } from './awst_build/models/contract-class-model'\nimport { registerPTypes } from './awst_build/ptypes/register'\nimport { typeRegistry } from './awst_build/type-registry'\nimport { appVersion } from './cli/app-version'\nimport { logger, LoggingContext } from './logger'\nimport type { CompileOptions } from './options'\nimport { createTsProgram } from './parser'\nimport { puyaCompile } from './puya'\nimport type { PuyaService } from './puya/puya-service'\nimport type { AbsolutePath } from './util/absolute-path'\n\nexport type CompileResult = {\n programDirectory: AbsolutePath\n awst?: AWST[]\n ast?: Record<string, ts.SourceFile>\n compilationSet?: CompilationSet\n}\n\nexport async function compile(options: CompileOptions, puyaService?: PuyaService): Promise<CompileResult> {\n const loggerCtx = LoggingContext.current\n if (options.treatWarningsAsErrors) loggerCtx.treatWarningsAsErrors = true\n\n registerPTypes(typeRegistry)\n logger.info(undefined, appVersion({ withAVMVersion: false }))\n const programResult = createTsProgram(options)\n if (loggerCtx.hasErrors()) {\n logger.info(undefined, 'Compilation halted due to parse errors')\n return {\n programDirectory: programResult.programDirectory,\n ast: programResult.sourceFiles,\n }\n }\n const { moduleAwst, compilationSet } = buildAwst(programResult, options)\n validateAwst(moduleAwst)\n\n if (loggerCtx.hasErrors()) {\n logger.info(undefined, 'Compilation halted due to errors')\n return {\n programDirectory: programResult.programDirectory,\n awst: moduleAwst,\n ast: programResult.sourceFiles,\n compilationSet,\n }\n }\n if (!options.dryRun) {\n const compileResult = await puyaCompile({\n options,\n moduleAwst,\n programDirectory: programResult.programDirectory,\n compilationSet,\n sourceFiles: programResult.sourceFiles,\n puyaService,\n })\n\n if (options.outputClient) {\n await writeARC4Clients(compilationSet, options.filePaths, compileResult.arc56)\n }\n }\n\n return {\n programDirectory: programResult.programDirectory,\n awst: moduleAwst,\n ast: programResult.sourceFiles,\n compilationSet,\n }\n}\n"],"names":[],"mappings":";;;;;;;AAKM,SAAU,0BAA0B,CAAC,EACzC,IAAI,EACJ,UAAU,EACV,cAAc,GAKf,EAAA;IACC,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IAE5E,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAI;AAC9B,QAAA,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ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types;
878
878
  class ReferenceArray extends WType {
879
879
  elementType;
880
880
  sourceLocation;
881
- immutable = false;
882
881
  constructor(props) {
883
882
  super({
884
883
  name: `ref_array<${props.itemType.name}>`,
884
+ immutable: false,
885
885
  });
886
886
  this.elementType = props.itemType;
887
887
  this.sourceLocation = props.sourceLocation ?? null;
@@ -921,7 +921,7 @@ var wtypes;
921
921
  wtypes.WInnerTransaction = WInnerTransaction;
922
922
  class WInnerTransactionFields extends WType {
923
923
  transactionType;
924
- constructor({ transactionType, name }) {
924
+ constructor({ transactionType }) {
925
925
  super({
926
926
  name: transactionType === undefined ? 'inner_transaction_fields' : `inner_transaction_fields_${TransactionKind[transactionType]}`,
927
927
  });
@@ -934,7 +934,6 @@ var wtypes;
934
934
  constructor({ returnType }) {
935
935
  super({
936
936
  transactionType: TransactionKind.appl,
937
- name: 'abi_call_inner_transaction_fields',
938
937
  });
939
938
  this.resultType = returnType ?? wtypes.voidWType;
940
939
  }
@@ -1851,7 +1850,6 @@ class NamespacePType extends PType {
1851
1850
  [PType.IdSymbol] = 'NamespacePType';
1852
1851
  wtype;
1853
1852
  name;
1854
- factory;
1855
1853
  module;
1856
1854
  singleton = true;
1857
1855
  constructor({ name, module }) {
@@ -3000,7 +2998,7 @@ class ReferenceArrayType extends PType {
3000
2998
  singleton = false;
3001
2999
  sourceLocation;
3002
3000
  elementType;
3003
- constructor({ elementType, sourceLocation, name, }) {
3001
+ constructor({ elementType, sourceLocation, name }) {
3004
3002
  super();
3005
3003
  this.name = name ?? `ReferenceArray<${elementType}>`;
3006
3004
  this.sourceLocation = sourceLocation;
@@ -3010,7 +3008,6 @@ class ReferenceArrayType extends PType {
3010
3008
  return new wtypes.ReferenceArray({
3011
3009
  itemType: this.elementType.wtypeOrThrow,
3012
3010
  sourceLocation: this.sourceLocation,
3013
- immutable: false,
3014
3011
  });
3015
3012
  }
3016
3013
  accept(visitor) {
@@ -5590,5 +5587,5 @@ class CompilationSet extends CustomKeyMap {
5590
5587
  }
5591
5588
  }
5592
5589
 
5593
- export { FixedArrayGeneric as $, AbsolutePath as A, AssetConfigTxnFunction as B, ContractReference as C, AssetFreezeTxnFunction as D, AssetFunction as E, AssetTransferTxnFunction as F, BaseContractClassType as G, BigIntLiteralPType as H, InternalError as I, BigIntPType as J, BigUintFunction as K, LogLevel as L, BooleanFunction as M, BoxGeneric as N, OnCompletionAction as O, PuyaError as P, BoxMapGeneric as Q, BoxMapPType as R, BoxPType as S, BytesFunction as T, BytesGeneric as U, BytesPType as V, ClassMethodDecoratorContext as W, ClearStateProgram as X, ClusteredContractClassType as Y, ClusteredPrototype as Z, ContractClassPType as _, LoggingContext as a, UnsupportedType as a$, FixedArrayPType as a0, FunctionPType as a1, GeneratorGeneric as a2, GeneratorType as a3, GenericPType as a4, GlobalMapGeneric as a5, GlobalMapType as a6, GlobalStateGeneric as a7, GlobalStateType as a8, GroupTransactionPType as a9, NumericLiteralPType as aA, ObjectLiteralPType as aB, ObjectWithOptionalFieldsType as aC, PType as aD, PaymentTxnFunction as aE, PolytypeClassMethodHelper as aF, PromiseGeneric as aG, PromiseType as aH, ReadonlyArrayGeneric as aI, ReadonlyArrayPType as aJ, ReadonlyGeneric as aK, ReadonlyTuplePType as aL, ReferenceArrayGeneric as aM, ReferenceArrayType as aN, StringFunction as aO, SuperPrototypeSelector as aP, SuperPrototypeSelectorGeneric as aQ, TemplateVarFunction as aR, TransactionFunction as aS, TransactionFunctionType as aT, TransientType as aU, TypeParameterType as aV, Uint64EnumMemberLiteralType as aW, Uint64EnumMemberType as aX, Uint64EnumType as aY, Uint64Function as aZ, UnionPType as a_, ImmutableObjectPType as aa, InnerTransactionPType as ab, InstanceType as ac, InternalType as ad, IntersectionPType as ae, IntrinsicEnumType as af, IntrinsicFunctionGroupType as ag, IntrinsicFunctionGroupTypeType as ah, IntrinsicFunctionType as ai, IntrinsicFunctionTypeType as aj, IterableIteratorGeneric as ak, IterableIteratorType as al, ItxnParamsPType as am, KeyRegistrationTxnFunction as an, LibClassType as ao, LibFunctionType as ap, LibObjType as aq, LocalMapGeneric as ar, LocalMapType as as, LocalStateGeneric as at, LocalStateType as au, LogicSigPType as av, MutableObjectPType as aw, MutableTuplePType as ax, NamespacePType as ay, NumberPType as az, ContractClassModel as b, stringPType as b$, anyItxnParamsType as b0, anyItxnType as b1, anyPType as b2, applicationCallItxnFn as b3, applicationCallItxnParamsType as b4, applicationItxnType as b5, arc28EmitFunction as b6, arc4AbiMethodDecorator as b7, arc4BareMethodDecorator as b8, arc4BaseContractType as b9, errFunction as bA, esSymbol as bB, inputOnlyObjects as bC, isArrayType as bD, isObjectType as bE, isTupleLike as bF, itoaMethod as bG, itxnComposePType as bH, keyRegistrationItxnFn as bI, keyRegistrationItxnParamsType as bJ, keyRegistrationItxnType as bK, logFunction as bL, loggedAssertFunction as bM, loggedErrFunction as bN, logicSigBaseType as bO, logicSigOptionsDecorator as bP, matchFunction as bQ, mimcConfigurationsPType as bR, neverPType as bS, nullPType as bT, numberPType as bU, onCompleteActionType as bV, opUpFeeSourceType as bW, paymentItxnFn as bX, paymentItxnParamsType as bY, paymentItxnType as bZ, readonlyDecorator as b_, assertFunction as ba, assertMatchFunction as bb, assetConfigItxnFn as bc, assetConfigItxnParamsType as bd, assetConfigItxnType as be, assetFreezeItxnFn as bf, assetFreezeItxnParamsType as bg, assetFreezeItxnType as bh, assetTransferItxnFn as bi, assetTransferItxnParamsType as bj, assetTransferItxnType as bk, base64PType as bl, baseContractType as bm, bigIntPType as bn, biguintPType as bo, boolPType as bp, bytesPType as bq, bzeroFunction as br, cloneFunctionPType as bs, compileFunctionType as bt, compiledContractType as bu, compiledLogicSigType as bv, contractOptionsDecorator as bw, ecPType as bx, ecdsaPType as by, ensureBudgetFunction as bz, CodeError as c, FixableCodeError as c$, submitGroupItxnFunction as c0, transactionTypeType as c1, uint64PType as c2, undefinedPType as c3, unknownPType as c4, urangeFunction as c5, validateEncodingFunctionPType as c6, vrfVerifyPType as c7, uint8ArrayToBigInt as c8, uint8ArrayToBase64 as c9, instanceOfAny as cA, SingleEvaluation as cB, VarExpression as cC, nodeFactory as cD, NotSupported as cE, TupleItemExpression as cF, FieldExpression as cG, IndexExpression as cH, TupleExpression as cI, AppStateExpression as cJ, AppAccountStateExpression as cK, BoxValueExpression as cL, ReinterpretCast as cM, StateGetEx as cN, StateGet as cO, hasFlags as cP, BinaryBooleanOperator as cQ, SymbolName as cR, intersectsFlags as cS, extractModuleName as cT, toSubScript as cU, CompilationSet as cV, ARC4ABIMethodConfig as cW, EqualityComparison as cX, ARC4CreateOption as cY, NewArray as cZ, BytesEncoding as c_, uint8ArrayToBase32 as ca, uint8ArrayToUtf8 as cb, base64ToUint8Array as cc, base32ToUint8Array as cd, bigIntToUint8Array as ce, utf8ToUint8Array as cf, LogSource as cg, SourceLocation as ch, isMinLevel as ci, enumFromValue as cj, mkDirIfNotExists as ck, distinct as cl, zipStrict as cm, isIn as cn, wtypes as co, codeInvariant as cp, invariant as cq, throwError as cr, StringConstant as cs, BytesConstant as ct, IntegerConstant as cu, BoolConstant as cv, AddressConstant as cw, MethodConstant as cx, DecimalConstant as cy, TemplateVar as cz, Constants as d, Goto as d$, UInt64BinaryOperator as d0, tryConvertEnum as d1, NumericComparison as d2, UInt64UnaryOperator as d3, UInt64PostfixUnaryOperator as d4, wrapInCodeError as d5, TransactionKind as d6, LogicSigReference as d7, getInnerTransactionType as d8, getItxnParamsType as d9, CheckedMaybe as dA, StageInnerTransactions as dB, SubmitInnerTransaction as dC, AssignmentExpression as dD, CommaExpression as dE, NumericComparisonExpression as dF, BytesComparisonExpression as dG, PuyaLibCall as dH, UInt64UnaryOperation as dI, UInt64PostfixUnaryOperation as dJ, BigUIntPostfixUnaryOperation as dK, BytesUnaryOperation as dL, UInt64BinaryOperation as dM, BigUIntBinaryOperation as dN, BooleanBinaryOperation as dO, Not as dP, Emit as dQ, Range as dR, Enumeration as dS, Reversed as dT, StateExists as dU, ARC4Router as dV, MethodSignatureString as dW, SubroutineID as dX, ContractMethodTarget as dY, InstanceMethodTarget as dZ, patchErrorLocation as d_, CompiledContract as da, ARC4BareMethodConfig as db, MethodSignature as dc, BigUIntBinaryOperator as dd, BigUIntPostfixUnaryOperator as de, BytesBinaryOperator as df, IntrinsicCall as dg, enumKeyFromValue as dh, BytesUnaryOperator as di, PuyaLibFunction as dj, Expression as dk, AppStorageKind as dl, transientTypeErrors as dm, getGroupTransactionType as dn, Contract as dp, InstanceSuperMethodTarget as dq, ExpressionStatement as dr, AssertExpression as ds, VoidConstant as dt, ArrayConcat as du, ArrayPop as dv, ArrayReplace as dw, ArrayLength as dx, SizeOf as dy, UpdateInnerTransaction as dz, accountPType as e, ReturnStatement as e0, ContractMethod as e1, sameSets as e2, Subroutine as e3, LogicSigClassModel as e4, ptypeIn as e5, expandMaybeArray as e6, applicationPType as f, assetPType as g, anyGtxnType as h, assetConfigGtxnType as i, assetTransferGtxnType as j, keyRegistrationGtxnType as k, logger as l, assetFreezeGtxnType as m, applicationCallGtxnType as n, ABICompatibleInstanceType as o, paymentGtxnType as p, ALL_OP_ENUMS as q, AccountFunction as r, AnyPType as s, ApplicationFunctionType as t, ApplicationTxnFunction as u, voidPType as v, ApprovalProgram as w, ArrayGeneric as x, ArrayLiteralPType as y, ArrayPType as z };
5594
- //# sourceMappingURL=contract-class-model-Dpn9A-pJ.js.map
5590
+ export { FixedArrayGeneric as $, AbsolutePath as A, AssetConfigTxnFunction as B, ContractReference as C, AssetFreezeTxnFunction as D, AssetFunction as E, AssetTransferTxnFunction as F, BaseContractClassType as G, BigIntLiteralPType as H, InternalError as I, BigIntPType as J, BigUintFunction as K, LogLevel as L, BooleanFunction as M, BoxGeneric as N, OnCompletionAction as O, PuyaError as P, BoxMapGeneric as Q, BoxMapPType as R, BoxPType as S, BytesFunction as T, BytesGeneric as U, BytesPType as V, ClassMethodDecoratorContext as W, ClearStateProgram as X, ClusteredContractClassType as Y, ClusteredPrototype as Z, ContractClassPType as _, LoggingContext as a, UnsupportedType as a$, FixedArrayPType as a0, FunctionPType as a1, GeneratorGeneric as a2, GeneratorType as a3, GenericPType as a4, GlobalMapGeneric as a5, GlobalMapType as a6, GlobalStateGeneric as a7, GlobalStateType as a8, GroupTransactionPType as a9, NumericLiteralPType as aA, ObjectLiteralPType as aB, ObjectWithOptionalFieldsType as aC, PType as aD, PaymentTxnFunction as aE, PolytypeClassMethodHelper as aF, PromiseGeneric as aG, PromiseType as aH, ReadonlyArrayGeneric as aI, ReadonlyArrayPType as aJ, ReadonlyGeneric as aK, ReadonlyTuplePType as aL, ReferenceArrayGeneric as aM, ReferenceArrayType as aN, StringFunction as aO, SuperPrototypeSelector as aP, SuperPrototypeSelectorGeneric as aQ, TemplateVarFunction as aR, TransactionFunction as aS, TransactionFunctionType as aT, TransientType as aU, TypeParameterType as aV, Uint64EnumMemberLiteralType as aW, Uint64EnumMemberType as aX, Uint64EnumType as aY, Uint64Function as aZ, UnionPType as a_, ImmutableObjectPType as aa, InnerTransactionPType as ab, InstanceType as ac, InternalType as ad, IntersectionPType as ae, IntrinsicEnumType as af, IntrinsicFunctionGroupType as ag, IntrinsicFunctionGroupTypeType as ah, IntrinsicFunctionType as ai, IntrinsicFunctionTypeType as aj, IterableIteratorGeneric as ak, IterableIteratorType as al, ItxnParamsPType as am, KeyRegistrationTxnFunction as an, LibClassType as ao, LibFunctionType as ap, LibObjType as aq, LocalMapGeneric as ar, LocalMapType as as, LocalStateGeneric as at, LocalStateType as au, LogicSigPType as av, MutableObjectPType as aw, MutableTuplePType as ax, NamespacePType as ay, NumberPType as az, ContractClassModel as b, stringPType as b$, anyItxnParamsType as b0, anyItxnType as b1, anyPType as b2, applicationCallItxnFn as b3, applicationCallItxnParamsType as b4, applicationItxnType as b5, arc28EmitFunction as b6, arc4AbiMethodDecorator as b7, arc4BareMethodDecorator as b8, arc4BaseContractType as b9, errFunction as bA, esSymbol as bB, inputOnlyObjects as bC, isArrayType as bD, isObjectType as bE, isTupleLike as bF, itoaMethod as bG, itxnComposePType as bH, keyRegistrationItxnFn as bI, keyRegistrationItxnParamsType as bJ, keyRegistrationItxnType as bK, logFunction as bL, loggedAssertFunction as bM, loggedErrFunction as bN, logicSigBaseType as bO, logicSigOptionsDecorator as bP, matchFunction as bQ, mimcConfigurationsPType as bR, neverPType as bS, nullPType as bT, numberPType as bU, onCompleteActionType as bV, opUpFeeSourceType as bW, paymentItxnFn as bX, paymentItxnParamsType as bY, paymentItxnType as bZ, readonlyDecorator as b_, assertFunction as ba, assertMatchFunction as bb, assetConfigItxnFn as bc, assetConfigItxnParamsType as bd, assetConfigItxnType as be, assetFreezeItxnFn as bf, assetFreezeItxnParamsType as bg, assetFreezeItxnType as bh, assetTransferItxnFn as bi, assetTransferItxnParamsType as bj, assetTransferItxnType as bk, base64PType as bl, baseContractType as bm, bigIntPType as bn, biguintPType as bo, boolPType as bp, bytesPType as bq, bzeroFunction as br, cloneFunctionPType as bs, compileFunctionType as bt, compiledContractType as bu, compiledLogicSigType as bv, contractOptionsDecorator as bw, ecPType as bx, ecdsaPType as by, ensureBudgetFunction as bz, CodeError as c, UInt64BinaryOperator as c$, submitGroupItxnFunction as c0, transactionTypeType as c1, uint64PType as c2, undefinedPType as c3, unknownPType as c4, urangeFunction as c5, validateEncodingFunctionPType as c6, vrfVerifyPType as c7, uint8ArrayToBigInt as c8, uint8ArrayToBase64 as c9, instanceOfAny as cA, SingleEvaluation as cB, VarExpression as cC, nodeFactory as cD, NotSupported as cE, TupleItemExpression as cF, FieldExpression as cG, IndexExpression as cH, TupleExpression as cI, AppStateExpression as cJ, AppAccountStateExpression as cK, BoxValueExpression as cL, StateGetEx as cM, StateGet as cN, hasFlags as cO, BinaryBooleanOperator as cP, SymbolName as cQ, intersectsFlags as cR, extractModuleName as cS, toSubScript as cT, CompilationSet as cU, ARC4ABIMethodConfig as cV, EqualityComparison as cW, ARC4CreateOption as cX, NewArray as cY, BytesEncoding as cZ, FixableCodeError as c_, uint8ArrayToBase32 as ca, uint8ArrayToUtf8 as cb, base64ToUint8Array as cc, base32ToUint8Array as cd, bigIntToUint8Array as ce, utf8ToUint8Array as cf, LogSource as cg, SourceLocation as ch, isMinLevel as ci, enumFromValue as cj, mkDirIfNotExists as ck, distinct as cl, zipStrict as cm, isIn as cn, wtypes as co, codeInvariant as cp, invariant as cq, throwError as cr, StringConstant as cs, BytesConstant as ct, IntegerConstant as cu, BoolConstant as cv, AddressConstant as cw, MethodConstant as cx, DecimalConstant as cy, TemplateVar as cz, Constants as d, ReturnStatement as d$, tryConvertEnum as d0, NumericComparison as d1, UInt64UnaryOperator as d2, UInt64PostfixUnaryOperator as d3, wrapInCodeError as d4, TransactionKind as d5, LogicSigReference as d6, getInnerTransactionType as d7, getItxnParamsType as d8, CompiledContract as d9, StageInnerTransactions as dA, SubmitInnerTransaction as dB, AssignmentExpression as dC, CommaExpression as dD, NumericComparisonExpression as dE, BytesComparisonExpression as dF, PuyaLibCall as dG, UInt64UnaryOperation as dH, UInt64PostfixUnaryOperation as dI, BigUIntPostfixUnaryOperation as dJ, BytesUnaryOperation as dK, UInt64BinaryOperation as dL, BigUIntBinaryOperation as dM, BooleanBinaryOperation as dN, Not as dO, Emit as dP, Range as dQ, Enumeration as dR, Reversed as dS, StateExists as dT, ARC4Router as dU, MethodSignatureString as dV, SubroutineID as dW, ContractMethodTarget as dX, InstanceMethodTarget as dY, patchErrorLocation as dZ, Goto as d_, ARC4BareMethodConfig as da, MethodSignature as db, BigUIntBinaryOperator as dc, BigUIntPostfixUnaryOperator as dd, BytesBinaryOperator as de, IntrinsicCall as df, enumKeyFromValue as dg, BytesUnaryOperator as dh, PuyaLibFunction as di, Expression as dj, AppStorageKind as dk, transientTypeErrors as dl, getGroupTransactionType as dm, Contract as dn, InstanceSuperMethodTarget as dp, ExpressionStatement as dq, AssertExpression as dr, VoidConstant as ds, ArrayConcat as dt, ArrayPop as du, ArrayReplace as dv, ArrayLength as dw, SizeOf as dx, UpdateInnerTransaction as dy, CheckedMaybe as dz, accountPType as e, ContractMethod as e0, sameSets as e1, Subroutine as e2, LogicSigClassModel as e3, ptypeIn as e4, expandMaybeArray as e5, applicationPType as f, assetPType as g, anyGtxnType as h, assetConfigGtxnType as i, assetTransferGtxnType as j, keyRegistrationGtxnType as k, logger as l, assetFreezeGtxnType as m, applicationCallGtxnType as n, ABICompatibleInstanceType as o, paymentGtxnType as p, ALL_OP_ENUMS as q, AccountFunction as r, AnyPType as s, ApplicationFunctionType as t, ApplicationTxnFunction as u, voidPType as v, ApprovalProgram as w, ArrayGeneric as x, ArrayLiteralPType as y, ArrayPType as z };
5591
+ //# sourceMappingURL=contract-class-model-cK8F4WVM.js.map