@algorandfoundation/algorand-typescript-testing 1.0.0-beta.23 → 1.0.0-beta.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -44,7 +44,7 @@ Let's write a simple contract and test it using the `algorand-typescript-testing
44
44
 
45
45
  #### Configuring vitest
46
46
 
47
- If you are using [vitest](https://vitest.dev/) with [@rollup/plugin-typescript](https://www.npmjs.com/package/@rollup/plugin-typescript) plugin, configure `puyaTsTransformer` as a `before` stage transformer of `typescript` plugin in `vitest.config.mts` file.
47
+ If you are using [vitest](https://vitest.dev/) with [@rollup/plugin-typescript](https://www.npmjs.com/package/@rollup/plugin-typescript) plugin, configure `puyaTsTransformer` as a `before` stage transformer of the `typescript` plugin in `vitest.config.mts` file.
48
48
 
49
49
  ```typescript
50
50
  import typescript from '@rollup/plugin-typescript'
@@ -79,7 +79,7 @@ beforeAll(() => {
79
79
 
80
80
  #### Configuring jest
81
81
 
82
- If you are using [jest](https://jestjs.io/) with [ts-jest](https://www.npmjs.com/package/ts-jest), [@jest/globals](https://www.npmjs.com/package/@jest/globals) and [ts-node](https://www.npmjs.com/package/ts-node) plugins, configure `puyaTsTransformer` as a `before` stage transformer of `typescript` plugin in `jest.config.ts` file.
82
+ If you are using [jest](https://jestjs.io/) with [ts-jest](https://www.npmjs.com/package/ts-jest), [@jest/globals](https://www.npmjs.com/package/@jest/globals) and [ts-node](https://www.npmjs.com/package/ts-node) plugins, configure `puyaTsTransformer` as a `before` stage transformer of the `typescript` plugin in `jest.config.ts` file.
83
83
 
84
84
  ```typescript
85
85
  import { createDefaultEsmPreset, type JestConfigWithTsJest } from 'ts-jest'
@@ -116,13 +116,16 @@ beforeAll(() => {
116
116
  })
117
117
  ```
118
118
 
119
- It is also handy to add in a script to run `jest` with `--experimental-vm-modules` flag in `package.json`.
119
+ You'll also need to run `jest` with the `--experimental-vm-modules` and `--experimental-require-module` flags in the `package.json`. This requires node 20.17 or greater.
120
120
 
121
121
  ```json
122
122
  {
123
123
  "name": "puya-ts-demo",
124
124
  "scripts": {
125
- "test:jest": "tsc && node --experimental-vm-modules node_modules/jest/bin/jest"
125
+ "test:jest": "tsc && node --experimental-vm-modules --experimental-require-module node_modules/jest/bin/jest"
126
+ },
127
+ "engines": {
128
+ "node": ">=20.17"
126
129
  }
127
130
  }
128
131
  ```
@@ -1,7 +1,7 @@
1
1
  export * from '@algorandfoundation/algorand-typescript';
2
2
  export { BaseContract, contract } from '../impl/base-contract';
3
3
  export { compileImpl as compile } from '../impl/compiled';
4
- export { abimethod, Contract } from '../impl/contract';
4
+ export { abimethod, baremethod, Contract } from '../impl/contract';
5
5
  export { ensureBudgetImpl as ensureBudget } from '../impl/ensure-budget';
6
6
  export { Global } from '../impl/global';
7
7
  export { log } from '../impl/log';
@@ -2,7 +2,7 @@ import { OpUpFeeSource } from '@algorandfoundation/algorand-typescript';
2
2
  export * from '@algorandfoundation/algorand-typescript';
3
3
  import { l as lazyContext, a as BytesCls, x as asBytes, a5 as BytesBackedCls, a6 as Uint64BackedCls, a7 as assert, a8 as asMaybeBigUintCls, a2 as AvmError, D as asNumber, C as CodeError, a1 as DEFAULT_TEMPLATE_VAR_PREFIX, w as asBigInt, o as asUint64 } from '../crypto-B3eDMAtp.js';
4
4
  export { N as Account, p as Application, n as Asset, d as BaseContract, K as BigUint, h as Bytes, G as Uint64, a9 as contract, aa as err } from '../crypto-B3eDMAtp.js';
5
- export { C as Contract, a as abimethod } from '../contract-CfMCD1BK.js';
5
+ export { C as Contract, a as abimethod, b as baremethod } from '../contract-CfMCD1BK.js';
6
6
  export { a as Global } from '../asset-params-C3dXxyBx.js';
7
7
  export { l as log } from '../runtime-helpers-LrUolgJg.js';
8
8
  import { ARC4Encoded } from '@algorandfoundation/algorand-typescript/arc4';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/impl/compiled.ts","../../src/impl/ensure-budget.ts","../../src/impl/match.ts","../../src/impl/mutable-array.ts","../../src/impl/template-var.ts","../../src/impl/urange.ts","../../src/internal/index.ts"],"sourcesContent":["import type {\n Account,\n BaseContract,\n CompileContractOptions,\n CompiledContract,\n CompiledLogicSig,\n CompileLogicSigOptions,\n LogicSig,\n} from '@algorandfoundation/algorand-typescript'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport type { ConstructorFor } from '../typescript-helpers'\nimport type { ApplicationData } from './reference'\n\nexport function compileImpl(\n artefact: ConstructorFor<BaseContract> | ConstructorFor<LogicSig>,\n options?: CompileContractOptions | CompileLogicSigOptions,\n): CompiledLogicSig | CompiledContract {\n let app: ApplicationData | undefined\n let account: Account | undefined\n const compiledApp = lazyContext.value.getCompiledApp(artefact as ConstructorFor<BaseContract>)\n const compiledLogicSig = lazyContext.value.getCompiledLogicSig(artefact as ConstructorFor<LogicSig>)\n if (compiledApp !== undefined) {\n app = lazyContext.ledger.applicationDataMap.get(compiledApp[1])\n }\n if (compiledLogicSig !== undefined) {\n account = compiledLogicSig[1]\n }\n if (options?.templateVars) {\n Object.entries(options.templateVars).forEach(([key, value]) => {\n lazyContext.value.setTemplateVar(key, value, options.templateVarsPrefix)\n })\n }\n return new Proxy({} as CompiledLogicSig | CompiledContract, {\n get: (_target, prop) => {\n switch (prop) {\n case 'approvalProgram':\n return app?.application.approvalProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)]\n case 'clearStateProgram':\n return app?.application.clearStateProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)]\n case 'extraProgramPages':\n return (options as CompileContractOptions)?.extraProgramPages ?? app?.application.extraProgramPages ?? lazyContext.any.uint64()\n case 'globalUints':\n return (options as CompileContractOptions)?.globalUints ?? app?.application.globalNumUint ?? lazyContext.any.uint64()\n case 'globalBytes':\n return (options as CompileContractOptions)?.globalBytes ?? app?.application.globalNumBytes ?? lazyContext.any.uint64()\n case 'localUints':\n return (options as CompileContractOptions)?.localUints ?? app?.application.localNumUint ?? lazyContext.any.uint64()\n case 'localBytes':\n return (options as CompileContractOptions)?.localBytes ?? app?.application.localNumBytes ?? lazyContext.any.uint64()\n case 'account':\n return account ?? lazyContext.any.account()\n }\n },\n })\n}\n","import type { uint64 } from '@algorandfoundation/algorand-typescript'\nimport { OpUpFeeSource } from '@algorandfoundation/algorand-typescript'\n\nexport function ensureBudgetImpl(_budget: uint64, _feeSource: OpUpFeeSource = OpUpFeeSource.GroupCredit) {\n // ensureBudget function is emulated to be a no-op\n}\n","import type { assertMatch, match } from '@algorandfoundation/algorand-typescript'\nimport { ARC4Encoded } from '@algorandfoundation/algorand-typescript/arc4'\nimport type { DeliberateAny } from '../typescript-helpers'\nimport { asBytes, asMaybeBigUintCls, assert } from '../util'\nimport { BytesBackedCls, Uint64BackedCls } from './base'\nimport type { StubBytesCompat, Uint64Cls } from './primitives'\nimport { BytesCls } from './primitives'\n\nexport const matchImpl: typeof match = (subject, test): boolean => {\n const bigIntSubjectValue = getBigIntValue(subject)\n if (bigIntSubjectValue !== undefined) {\n const bigIntTestValue = getBigIntValue(test)\n if (bigIntTestValue !== undefined) {\n return bigIntSubjectValue === bigIntTestValue\n } else if (Object.hasOwn(test, 'lessThan')) {\n return bigIntSubjectValue < getBigIntValue((test as DeliberateAny).lessThan)!\n } else if (Object.hasOwn(test, 'greaterThan')) {\n return bigIntSubjectValue > getBigIntValue((test as DeliberateAny).greaterThan)!\n } else if (Object.hasOwn(test, 'lessThanEq')) {\n return bigIntSubjectValue <= getBigIntValue((test as DeliberateAny).lessThanEq)!\n } else if (Object.hasOwn(test, 'greaterThanEq')) {\n return bigIntSubjectValue >= getBigIntValue((test as DeliberateAny).greaterThanEq)!\n } else if (Object.hasOwn(test, 'between')) {\n const [start, end] = (test as DeliberateAny).between\n return bigIntSubjectValue >= getBigIntValue(start)! && bigIntSubjectValue <= getBigIntValue(end)!\n }\n } else if (subject instanceof BytesCls) {\n return subject.equals(asBytes(test as unknown as StubBytesCompat))\n } else if (typeof subject === 'string') {\n return subject === test\n } else if (subject instanceof BytesBackedCls) {\n return subject.bytes.equals((test as unknown as BytesBackedCls).bytes)\n } else if (subject instanceof Uint64BackedCls) {\n return (\n getBigIntValue(subject.uint64 as unknown as Uint64Cls) ===\n getBigIntValue((test as unknown as Uint64BackedCls).uint64 as unknown as Uint64Cls)\n )\n } else if (test instanceof ARC4Encoded) {\n return (subject as unknown as ARC4Encoded).bytes.equals(test.bytes)\n } else if (Array.isArray(test)) {\n return test.map((x, i) => matchImpl((subject as DeliberateAny)[i], x as DeliberateAny)).every((x) => x)\n } else if (typeof test === 'object') {\n return Object.entries(test!)\n .map(([k, v]) => matchImpl((subject as DeliberateAny)[k], v as DeliberateAny))\n .every((x) => x)\n }\n return false\n}\n\nexport const assertMatchImpl: typeof assertMatch = (subject, test, message): boolean => {\n const isMatching = matchImpl(subject, test)\n assert(isMatching, message)\n return isMatching\n}\n\nconst getBigIntValue = (x: unknown) => {\n return asMaybeBigUintCls(x)?.asBigInt()\n}\n","import type { uint64, Uint64Compat } from '@algorandfoundation/algorand-typescript'\nimport { AvmError } from '../errors'\nimport { asNumber } from '../util'\n\nexport class MutableArray<TItem> {\n private _values: TItem[]\n\n constructor(...items: TItem[]) {\n this._values = items\n\n return new Proxy(this, {\n get(target, prop: PropertyKey) {\n const idx = prop ? parseInt(prop.toString(), 10) : NaN\n if (!isNaN(idx)) {\n if (idx >= 0 && idx < target._values.length) return target._values[idx]\n throw new AvmError('Index out of bounds')\n }\n return Reflect.get(target, prop)\n },\n set(target, prop: PropertyKey, value: TItem) {\n const idx = prop ? parseInt(prop.toString(), 10) : NaN\n if (!isNaN(idx)) {\n if (idx >= 0 && idx < target._values.length) {\n target._values[idx] = value\n return true\n }\n throw new AvmError('Index out of bounds')\n }\n\n return Reflect.set(target, prop, value)\n },\n })\n }\n\n /**\n * Returns the current length of this array\n */\n get length(): uint64 {\n return this._values.length\n }\n\n /**\n * Returns the item at the given index.\n * Negative indexes are taken from the end.\n * @param index The index of the item to retrieve\n */\n at(index: Uint64Compat): TItem {\n return this._values[asNumber(index)]\n }\n\n /**\n * Create a new Dynamic array with all items from this array\n * @internal Not supported yet\n */\n slice(): MutableArray<TItem>\n /**\n * Create a new MutableArray with all items up till `end`.\n * Negative indexes are taken from the end.\n * @param end An index in which to stop copying items.\n * @internal Not supported yet\n */\n slice(end: Uint64Compat): MutableArray<TItem>\n /**\n * Create a new MutableArray with items from `start`, up until `end`\n * Negative indexes are taken from the end.\n * @param start An index in which to start copying items.\n * @param end An index in which to stop copying items\n * @internal Not supported yet\n */\n slice(start: Uint64Compat, end: Uint64Compat): MutableArray<TItem>\n slice(start?: Uint64Compat, end?: Uint64Compat): MutableArray<TItem> {\n const startIndex = end === undefined ? 0 : asNumber(start ?? 0)\n const endIndex = end === undefined ? asNumber(start ?? this._values.length) : asNumber(end)\n return new MutableArray<TItem>(...this._values.slice(startIndex, endIndex))\n }\n\n /**\n * Returns an iterator for the items in this array\n */\n [Symbol.iterator](): IterableIterator<TItem> {\n return this._values[Symbol.iterator]()\n }\n\n /**\n * Returns an iterator for a tuple of the indexes and items in this array\n */\n entries(): IterableIterator<readonly [uint64, TItem]> {\n return this._values.entries()\n }\n\n /**\n * Returns an iterator for the indexes in this array\n */\n keys(): IterableIterator<uint64> {\n return this._values.keys()\n }\n\n /**\n * Get or set the item at the specified index.\n * Negative indexes are not supported\n */\n [index: uint64]: TItem\n\n /**\n * Push a number of items into this array\n * @param items The items to be added to this array\n */\n push(...items: TItem[]): void {\n this._values.push(...items)\n }\n\n /**\n * Pop a single item from this array\n */\n pop(): TItem {\n return this._values.pop()!\n }\n\n copy(): MutableArray<TItem> {\n return new MutableArray(...this._values)\n }\n}\n","import { DEFAULT_TEMPLATE_VAR_PREFIX } from '../constants'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport { CodeError } from '../errors'\n\nexport function TemplateVarImpl<T>(variableName: string, prefix = DEFAULT_TEMPLATE_VAR_PREFIX): T {\n const key = prefix + variableName\n if (!Object.hasOwn(lazyContext.value.templateVars, key)) {\n throw new CodeError(`Template variable ${key} not found in test context!`)\n }\n return lazyContext.value.templateVars[prefix + variableName] as T\n}\n","import { asBigInt, asUint64 } from '../util'\nimport type { StubUint64Compat } from './primitives'\n\nexport function* urangeImpl(a: StubUint64Compat, b?: StubUint64Compat, c?: StubUint64Compat) {\n const start = b ? asBigInt(a) : BigInt(0)\n const end = b ? asBigInt(b) : asBigInt(a)\n const step = c ? asBigInt(c) : BigInt(1)\n let iterationCount = 0\n for (let i = start; i < end; i += step) {\n iterationCount++\n yield asUint64(i)\n }\n return iterationCount\n}\n","export * from '@algorandfoundation/algorand-typescript'\nexport { BaseContract, contract } from '../impl/base-contract'\nexport { compileImpl as compile } from '../impl/compiled'\nexport { abimethod, Contract } from '../impl/contract'\nexport { ensureBudgetImpl as ensureBudget } from '../impl/ensure-budget'\nexport { Global } from '../impl/global'\nexport { log } from '../impl/log'\nexport { assertMatchImpl as assertMatch, matchImpl as match } from '../impl/match'\nexport { MutableArray } from '../impl/mutable-array'\nexport { BigUint, Bytes, Uint64 } from '../impl/primitives'\nexport { Account, Application, Asset } from '../impl/reference'\nexport { Box, BoxMap, BoxRef, GlobalState, LocalState } from '../impl/state'\nexport { TemplateVarImpl as TemplateVar } from '../impl/template-var'\nexport { Txn } from '../impl/txn'\nexport { urangeImpl as urange } from '../impl/urange'\nexport { assert, err } from '../util'\nexport * as arc4 from './arc4'\nexport * as op from './op'\nimport { ApplicationTxn, AssetConfigTxn, AssetFreezeTxn, AssetTransferTxn, KeyRegistrationTxn, PaymentTxn, Transaction } from '../impl/gtxn'\nexport const gtxn = {\n Transaction,\n PaymentTxn,\n KeyRegistrationTxn,\n AssetConfigTxn,\n AssetTransferTxn,\n AssetFreezeTxn,\n ApplicationTxn,\n}\n\nimport { applicationCall, assetConfig, assetFreeze, assetTransfer, keyRegistration, payment, submitGroup } from '../impl/inner-transactions'\nexport const itxn = {\n submitGroup,\n payment,\n keyRegistration,\n assetConfig,\n assetTransfer,\n assetFreeze,\n applicationCall,\n}\n"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AA,MAAM,IAAI,SAAS,CAAC,qBAAqB,GAAG,CAAA,2BAAA,CAA6B,CAAC;;IAE5E,OAAO,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,GAAG,YAAY,CAAM;AACnE;;ACPM,UAAW,UAAU,CAAC,CAAmB,EAAE,CAAoB,EAAE,CAAoB,EAAA;AACzF,IAAA,MAAM,KAAK,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;AACzC,IAAA,MAAM,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;AACzC,IAAA,MAAM,IAAI,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;IACxC,IAAI,cAAc,GAAG,CAAC;AACtB,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;AACtC,QAAA,cAAc,EAAE;AAChB,QAAA,MAAM,QAAQ,CAAC,CAAC,CAAC;;AAEnB,IAAA,OAAO,cAAc;AACvB;;ACMa,MAAA,IAAI,GAAG;IAClB,WAAW;IACX,UAAU;IACV,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,cAAc;;AAIH,MAAA,IAAI,GAAG;IAClB,WAAW;IACX,OAAO;IACP,eAAe;IACf,WAAW;IACX,aAAa;IACb,WAAW;IACX,eAAe;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/impl/compiled.ts","../../src/impl/ensure-budget.ts","../../src/impl/match.ts","../../src/impl/mutable-array.ts","../../src/impl/template-var.ts","../../src/impl/urange.ts","../../src/internal/index.ts"],"sourcesContent":["import type {\n Account,\n BaseContract,\n CompileContractOptions,\n CompiledContract,\n CompiledLogicSig,\n CompileLogicSigOptions,\n LogicSig,\n} from '@algorandfoundation/algorand-typescript'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport type { ConstructorFor } from '../typescript-helpers'\nimport type { ApplicationData } from './reference'\n\nexport function compileImpl(\n artefact: ConstructorFor<BaseContract> | ConstructorFor<LogicSig>,\n options?: CompileContractOptions | CompileLogicSigOptions,\n): CompiledLogicSig | CompiledContract {\n let app: ApplicationData | undefined\n let account: Account | undefined\n const compiledApp = lazyContext.value.getCompiledApp(artefact as ConstructorFor<BaseContract>)\n const compiledLogicSig = lazyContext.value.getCompiledLogicSig(artefact as ConstructorFor<LogicSig>)\n if (compiledApp !== undefined) {\n app = lazyContext.ledger.applicationDataMap.get(compiledApp[1])\n }\n if (compiledLogicSig !== undefined) {\n account = compiledLogicSig[1]\n }\n if (options?.templateVars) {\n Object.entries(options.templateVars).forEach(([key, value]) => {\n lazyContext.value.setTemplateVar(key, value, options.templateVarsPrefix)\n })\n }\n return new Proxy({} as CompiledLogicSig | CompiledContract, {\n get: (_target, prop) => {\n switch (prop) {\n case 'approvalProgram':\n return app?.application.approvalProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)]\n case 'clearStateProgram':\n return app?.application.clearStateProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)]\n case 'extraProgramPages':\n return (options as CompileContractOptions)?.extraProgramPages ?? app?.application.extraProgramPages ?? lazyContext.any.uint64()\n case 'globalUints':\n return (options as CompileContractOptions)?.globalUints ?? app?.application.globalNumUint ?? lazyContext.any.uint64()\n case 'globalBytes':\n return (options as CompileContractOptions)?.globalBytes ?? app?.application.globalNumBytes ?? lazyContext.any.uint64()\n case 'localUints':\n return (options as CompileContractOptions)?.localUints ?? app?.application.localNumUint ?? lazyContext.any.uint64()\n case 'localBytes':\n return (options as CompileContractOptions)?.localBytes ?? app?.application.localNumBytes ?? lazyContext.any.uint64()\n case 'account':\n return account ?? lazyContext.any.account()\n }\n },\n })\n}\n","import type { uint64 } from '@algorandfoundation/algorand-typescript'\nimport { OpUpFeeSource } from '@algorandfoundation/algorand-typescript'\n\nexport function ensureBudgetImpl(_budget: uint64, _feeSource: OpUpFeeSource = OpUpFeeSource.GroupCredit) {\n // ensureBudget function is emulated to be a no-op\n}\n","import type { assertMatch, match } from '@algorandfoundation/algorand-typescript'\nimport { ARC4Encoded } from '@algorandfoundation/algorand-typescript/arc4'\nimport type { DeliberateAny } from '../typescript-helpers'\nimport { asBytes, asMaybeBigUintCls, assert } from '../util'\nimport { BytesBackedCls, Uint64BackedCls } from './base'\nimport type { StubBytesCompat, Uint64Cls } from './primitives'\nimport { BytesCls } from './primitives'\n\nexport const matchImpl: typeof match = (subject, test): boolean => {\n const bigIntSubjectValue = getBigIntValue(subject)\n if (bigIntSubjectValue !== undefined) {\n const bigIntTestValue = getBigIntValue(test)\n if (bigIntTestValue !== undefined) {\n return bigIntSubjectValue === bigIntTestValue\n } else if (Object.hasOwn(test, 'lessThan')) {\n return bigIntSubjectValue < getBigIntValue((test as DeliberateAny).lessThan)!\n } else if (Object.hasOwn(test, 'greaterThan')) {\n return bigIntSubjectValue > getBigIntValue((test as DeliberateAny).greaterThan)!\n } else if (Object.hasOwn(test, 'lessThanEq')) {\n return bigIntSubjectValue <= getBigIntValue((test as DeliberateAny).lessThanEq)!\n } else if (Object.hasOwn(test, 'greaterThanEq')) {\n return bigIntSubjectValue >= getBigIntValue((test as DeliberateAny).greaterThanEq)!\n } else if (Object.hasOwn(test, 'between')) {\n const [start, end] = (test as DeliberateAny).between\n return bigIntSubjectValue >= getBigIntValue(start)! && bigIntSubjectValue <= getBigIntValue(end)!\n }\n } else if (subject instanceof BytesCls) {\n return subject.equals(asBytes(test as unknown as StubBytesCompat))\n } else if (typeof subject === 'string') {\n return subject === test\n } else if (subject instanceof BytesBackedCls) {\n return subject.bytes.equals((test as unknown as BytesBackedCls).bytes)\n } else if (subject instanceof Uint64BackedCls) {\n return (\n getBigIntValue(subject.uint64 as unknown as Uint64Cls) ===\n getBigIntValue((test as unknown as Uint64BackedCls).uint64 as unknown as Uint64Cls)\n )\n } else if (test instanceof ARC4Encoded) {\n return (subject as unknown as ARC4Encoded).bytes.equals(test.bytes)\n } else if (Array.isArray(test)) {\n return test.map((x, i) => matchImpl((subject as DeliberateAny)[i], x as DeliberateAny)).every((x) => x)\n } else if (typeof test === 'object') {\n return Object.entries(test!)\n .map(([k, v]) => matchImpl((subject as DeliberateAny)[k], v as DeliberateAny))\n .every((x) => x)\n }\n return false\n}\n\nexport const assertMatchImpl: typeof assertMatch = (subject, test, message): boolean => {\n const isMatching = matchImpl(subject, test)\n assert(isMatching, message)\n return isMatching\n}\n\nconst getBigIntValue = (x: unknown) => {\n return asMaybeBigUintCls(x)?.asBigInt()\n}\n","import type { uint64, Uint64Compat } from '@algorandfoundation/algorand-typescript'\nimport { AvmError } from '../errors'\nimport { asNumber } from '../util'\n\nexport class MutableArray<TItem> {\n private _values: TItem[]\n\n constructor(...items: TItem[]) {\n this._values = items\n\n return new Proxy(this, {\n get(target, prop: PropertyKey) {\n const idx = prop ? parseInt(prop.toString(), 10) : NaN\n if (!isNaN(idx)) {\n if (idx >= 0 && idx < target._values.length) return target._values[idx]\n throw new AvmError('Index out of bounds')\n }\n return Reflect.get(target, prop)\n },\n set(target, prop: PropertyKey, value: TItem) {\n const idx = prop ? parseInt(prop.toString(), 10) : NaN\n if (!isNaN(idx)) {\n if (idx >= 0 && idx < target._values.length) {\n target._values[idx] = value\n return true\n }\n throw new AvmError('Index out of bounds')\n }\n\n return Reflect.set(target, prop, value)\n },\n })\n }\n\n /**\n * Returns the current length of this array\n */\n get length(): uint64 {\n return this._values.length\n }\n\n /**\n * Returns the item at the given index.\n * Negative indexes are taken from the end.\n * @param index The index of the item to retrieve\n */\n at(index: Uint64Compat): TItem {\n return this._values[asNumber(index)]\n }\n\n /**\n * Create a new Dynamic array with all items from this array\n * @internal Not supported yet\n */\n slice(): MutableArray<TItem>\n /**\n * Create a new MutableArray with all items up till `end`.\n * Negative indexes are taken from the end.\n * @param end An index in which to stop copying items.\n * @internal Not supported yet\n */\n slice(end: Uint64Compat): MutableArray<TItem>\n /**\n * Create a new MutableArray with items from `start`, up until `end`\n * Negative indexes are taken from the end.\n * @param start An index in which to start copying items.\n * @param end An index in which to stop copying items\n * @internal Not supported yet\n */\n slice(start: Uint64Compat, end: Uint64Compat): MutableArray<TItem>\n slice(start?: Uint64Compat, end?: Uint64Compat): MutableArray<TItem> {\n const startIndex = end === undefined ? 0 : asNumber(start ?? 0)\n const endIndex = end === undefined ? asNumber(start ?? this._values.length) : asNumber(end)\n return new MutableArray<TItem>(...this._values.slice(startIndex, endIndex))\n }\n\n /**\n * Returns an iterator for the items in this array\n */\n [Symbol.iterator](): IterableIterator<TItem> {\n return this._values[Symbol.iterator]()\n }\n\n /**\n * Returns an iterator for a tuple of the indexes and items in this array\n */\n entries(): IterableIterator<readonly [uint64, TItem]> {\n return this._values.entries()\n }\n\n /**\n * Returns an iterator for the indexes in this array\n */\n keys(): IterableIterator<uint64> {\n return this._values.keys()\n }\n\n /**\n * Get or set the item at the specified index.\n * Negative indexes are not supported\n */\n [index: uint64]: TItem\n\n /**\n * Push a number of items into this array\n * @param items The items to be added to this array\n */\n push(...items: TItem[]): void {\n this._values.push(...items)\n }\n\n /**\n * Pop a single item from this array\n */\n pop(): TItem {\n return this._values.pop()!\n }\n\n copy(): MutableArray<TItem> {\n return new MutableArray(...this._values)\n }\n}\n","import { DEFAULT_TEMPLATE_VAR_PREFIX } from '../constants'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport { CodeError } from '../errors'\n\nexport function TemplateVarImpl<T>(variableName: string, prefix = DEFAULT_TEMPLATE_VAR_PREFIX): T {\n const key = prefix + variableName\n if (!Object.hasOwn(lazyContext.value.templateVars, key)) {\n throw new CodeError(`Template variable ${key} not found in test context!`)\n }\n return lazyContext.value.templateVars[prefix + variableName] as T\n}\n","import { asBigInt, asUint64 } from '../util'\nimport type { StubUint64Compat } from './primitives'\n\nexport function* urangeImpl(a: StubUint64Compat, b?: StubUint64Compat, c?: StubUint64Compat) {\n const start = b ? asBigInt(a) : BigInt(0)\n const end = b ? asBigInt(b) : asBigInt(a)\n const step = c ? asBigInt(c) : BigInt(1)\n let iterationCount = 0\n for (let i = start; i < end; i += step) {\n iterationCount++\n yield asUint64(i)\n }\n return iterationCount\n}\n","export * from '@algorandfoundation/algorand-typescript'\nexport { BaseContract, contract } from '../impl/base-contract'\nexport { compileImpl as compile } from '../impl/compiled'\nexport { abimethod, baremethod, Contract } from '../impl/contract'\nexport { ensureBudgetImpl as ensureBudget } from '../impl/ensure-budget'\nexport { Global } from '../impl/global'\nexport { log } from '../impl/log'\nexport { assertMatchImpl as assertMatch, matchImpl as match } from '../impl/match'\nexport { MutableArray } from '../impl/mutable-array'\nexport { BigUint, Bytes, Uint64 } from '../impl/primitives'\nexport { Account, Application, Asset } from '../impl/reference'\nexport { Box, BoxMap, BoxRef, GlobalState, LocalState } from '../impl/state'\nexport { TemplateVarImpl as TemplateVar } from '../impl/template-var'\nexport { Txn } from '../impl/txn'\nexport { urangeImpl as urange } from '../impl/urange'\nexport { assert, err } from '../util'\nexport * as arc4 from './arc4'\nexport * as op from './op'\nimport { ApplicationTxn, AssetConfigTxn, AssetFreezeTxn, AssetTransferTxn, KeyRegistrationTxn, PaymentTxn, Transaction } from '../impl/gtxn'\nexport const gtxn = {\n Transaction,\n PaymentTxn,\n KeyRegistrationTxn,\n AssetConfigTxn,\n AssetTransferTxn,\n AssetFreezeTxn,\n ApplicationTxn,\n}\n\nimport { applicationCall, assetConfig, assetFreeze, assetTransfer, keyRegistration, payment, submitGroup } from '../impl/inner-transactions'\nexport const itxn = {\n submitGroup,\n payment,\n keyRegistration,\n assetConfig,\n assetTransfer,\n assetFreeze,\n applicationCall,\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAagB,SAAA,WAAW,CACzB,QAAiE,EACjE,OAAyD,EAAA;AAEzD,IAAA,IAAI,GAAgC;AACpC,IAAA,IAAI,OAA4B;IAChC,MAAM,WAAW,GAAG,WAAW,CAAC,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EAAE,CAAoB,EAAE,CAAoB,EAAA;AACzF,IAAA,MAAM,KAAK,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;AACzC,IAAA,MAAM,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;AACzC,IAAA,MAAM,IAAI,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;IACxC,IAAI,cAAc,GAAG,CAAC;AACtB,IAAA,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;AACtC,QAAA,cAAc,EAAE;AAChB,QAAA,MAAM,QAAQ,CAAC,CAAC,CAAC;;AAEnB,IAAA,OAAO,cAAc;AACvB;;ACMa,MAAA,IAAI,GAAG;IAClB,WAAW;IACX,UAAU;IACV,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,cAAc;;AAIH,MAAA,IAAI,GAAG;IAClB,WAAW;IACX,OAAO;IACP,eAAe;IACf,WAAW;IACX,aAAa;IACb,WAAW;IACX,eAAe;;;;;"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "**"
5
5
  ],
6
6
  "name": "@algorandfoundation/algorand-typescript-testing",
7
- "version": "1.0.0-beta.23",
7
+ "version": "1.0.0-beta.25",
8
8
  "description": "A library which allows you to execute Algorand TypeScript code locally under a test context either emulating or mocking AVM behaviour.",
9
9
  "private": false,
10
10
  "peerDependencies": {