@algorandfoundation/algorand-typescript-testing 1.1.1-beta.3 → 1.2.0-beta.1
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/internal/index.mjs +32 -2
- package/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/internal/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ export { F as Account, l as Application, j as Asset, P as BaseContract, C as Big
|
|
|
5
5
|
import { a as toBytes, g as getEncoder, b as getArc4Encoded, s as sha512_256, F as FixedArray } from '../asset-params-C64LPAdX.js';
|
|
6
6
|
import { b as getContractMethod } from '../runtime-helpers-qYkqK3cG.js';
|
|
7
7
|
export { C as Contract, c as abimethod, d as baremethod, r as readonly } from '../runtime-helpers-qYkqK3cG.js';
|
|
8
|
-
import { C as CodeError } from '../typescript-helpers-sobuICoc.js';
|
|
8
|
+
import { A as AssertError, a as AvmError, C as CodeError } from '../typescript-helpers-sobuICoc.js';
|
|
9
9
|
export { a as Global } from '../pure-BGAOjiS7.js';
|
|
10
10
|
import { ARC4Encoded } from '@algorandfoundation/algorand-typescript/arc4';
|
|
11
11
|
import { g as applicationCall, h as assetFreeze, i as assetTransfer, j as assetConfig, k as keyRegistration, p as payment, s as submitGroup } from '../inner-transactions-BNbmDFGO.js';
|
|
@@ -83,6 +83,36 @@ function compile(artefact, options) {
|
|
|
83
83
|
function log(...args) {
|
|
84
84
|
lazyContext.txn.appendLog(args.map((a) => toBytes(a)).reduce((left, right) => left.concat(right)));
|
|
85
85
|
}
|
|
86
|
+
/** @internal */
|
|
87
|
+
function loggedAssert(condition, code, messageOrOptions) {
|
|
88
|
+
if (!condition) {
|
|
89
|
+
const errorMessage = resolveErrorMessage(code, messageOrOptions);
|
|
90
|
+
log(errorMessage);
|
|
91
|
+
throw new AssertError(errorMessage);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/** @internal */
|
|
95
|
+
function loggedErr(code, messageOrOptions) {
|
|
96
|
+
const errorMessage = resolveErrorMessage(code, messageOrOptions);
|
|
97
|
+
log(errorMessage);
|
|
98
|
+
throw new AvmError(errorMessage);
|
|
99
|
+
}
|
|
100
|
+
const VALID_PREFIXES = new Set(['ERR', 'AER']);
|
|
101
|
+
function resolveErrorMessage(code, messageOrOptions) {
|
|
102
|
+
const message = typeof messageOrOptions === 'string' ? messageOrOptions : messageOrOptions?.message;
|
|
103
|
+
const prefix = typeof messageOrOptions === 'string' ? undefined : (messageOrOptions?.prefix ?? 'ERR');
|
|
104
|
+
if (code.includes(':')) {
|
|
105
|
+
throw new CodeError("error code must not contain domain separator ':'");
|
|
106
|
+
}
|
|
107
|
+
if (message && message.includes(':')) {
|
|
108
|
+
throw new CodeError("error message must not contain domain separator ':'");
|
|
109
|
+
}
|
|
110
|
+
const prefixStr = prefix || 'ERR';
|
|
111
|
+
if (!VALID_PREFIXES.has(prefixStr)) {
|
|
112
|
+
throw new CodeError('error prefix must be one of AER, ERR');
|
|
113
|
+
}
|
|
114
|
+
return message ? `${prefixStr}:${code}:${message}` : `${prefixStr}:${code}`;
|
|
115
|
+
}
|
|
86
116
|
|
|
87
117
|
/** @internal */
|
|
88
118
|
function emit(typeInfoString, event, ...eventProps) {
|
|
@@ -260,5 +290,5 @@ const itxn = {
|
|
|
260
290
|
applicationCall,
|
|
261
291
|
};
|
|
262
292
|
|
|
263
|
-
export { TemplateVar, assert, assertMatch, clone, compile, emit, ensureBudget, gtxn, itxn, itxnCompose, log, match, urange, validateEncoding };
|
|
293
|
+
export { TemplateVar, assert, assertMatch, clone, compile, emit, ensureBudget, gtxn, itxn, itxnCompose, log, loggedAssert, loggedErr, match, urange, validateEncoding };
|
|
264
294
|
//# sourceMappingURL=index.mjs.map
|
package/internal/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/impl/clone.ts","../../src/impl/validate-encoding.ts","../../src/impl/compiled.ts","../../src/impl/log.ts","../../src/impl/emit.ts","../../src/impl/ensure-budget.ts","../../src/impl/match.ts","../../src/impl/template-var.ts","../../src/impl/urange.ts","../../src/impl/itxn-compose.ts","../../src/internal/index.ts"],"sourcesContent":["import { getEncoder, toBytes } from './encoded-types'\n\n/** @internal */\nexport function clone<T>(typeInfoString: string, value: T): T {\n if (value && typeof value === 'object' && 'copy' in value && typeof value.copy === 'function') {\n return value.copy() as T\n }\n const bytes = toBytes(value, typeInfoString)\n const typeInfo = JSON.parse(typeInfoString)\n const encoder = getEncoder(typeInfo)\n return encoder(bytes, typeInfo) as T\n}\n","/** @internal */\nexport function validateEncoding<T>(_value: T) {}\n","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\n/** @internal */\nexport function compile(\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 compiledAppEntry = lazyContext.value.getCompiledAppEntry(artefact as ConstructorFor<BaseContract>)\n const compiledLogicSigEntry = lazyContext.value.getCompiledLogicSigEntry(artefact as ConstructorFor<LogicSig>)\n if (compiledAppEntry !== undefined) {\n app = lazyContext.ledger.applicationDataMap.get(compiledAppEntry.value)\n }\n if (compiledLogicSigEntry !== undefined) {\n account = compiledLogicSigEntry.value\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 { BytesBacked, StringCompat } from '@algorandfoundation/algorand-typescript'\nimport { lazyContext } from '../context-helpers/internal-context'\n\nimport { toBytes } from './encoded-types'\nimport type { StubBigUintCompat, StubBytesCompat, StubUint64Compat } from './primitives'\n\n/** @internal */\nexport function log(...args: Array<StubUint64Compat | StubBytesCompat | StubBigUintCompat | StringCompat | BytesBacked>): void {\n lazyContext.txn.appendLog(args.map((a) => toBytes(a)).reduce((left, right) => left.concat(right)))\n}\n","import { CodeError } from '../errors'\nimport type { DeliberateAny } from '../typescript-helpers'\nimport { sha512_256 } from './crypto'\nimport { getArc4Encoded, getArc4TypeName } from './encoded-types'\nimport { log } from './log'\n\n/** @internal */\nexport function emit<T>(typeInfoString: string, event: T | string, ...eventProps: unknown[]) {\n let eventData\n let eventName\n if (typeof event === 'string') {\n eventData = getArc4Encoded(eventProps)\n eventName = event\n const argTypes = getArc4TypeName((eventData as DeliberateAny).typeInfo)!\n if (eventName.indexOf('(') === -1) {\n eventName += argTypes\n } else if (event.indexOf(argTypes) === -1) {\n throw new CodeError(`Event signature ${event} does not match arg types ${argTypes}`)\n }\n } else {\n eventData = getArc4Encoded(event)\n const typeInfo = JSON.parse(typeInfoString)\n const argTypes = getArc4TypeName((eventData as DeliberateAny).typeInfo)!\n eventName = typeInfo.name.replace(/.*</, '').replace(/>.*/, '') + argTypes\n }\n\n const eventHash = sha512_256(eventName)\n log(eventHash.slice(0, 4).concat(eventData.bytes))\n}\n","import type { uint64 } from '@algorandfoundation/algorand-typescript'\nimport { OpUpFeeSource } from '@algorandfoundation/algorand-typescript'\n\n/** @internal */\nexport function ensureBudget(_budget: uint64, _feeSource: OpUpFeeSource = OpUpFeeSource.GroupCredit) {\n // ensureBudget function is emulated to be a no-op\n}\n","import type { assertMatch as _assertMatch, match as _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 { FixedArray } from './encoded-types/encoded-types'\nimport type { StubBytesCompat, Uint64Cls } from './primitives'\nimport { BytesCls } from './primitives'\n\n/** @internal */\nexport const match: typeof _match = (subject, test): boolean => {\n if (Object.hasOwn(test, 'not')) {\n return !match(subject, (test as DeliberateAny).not)\n }\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 match(\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 (\n (subject as DeliberateAny).length === test.length &&\n test.map((x, i) => match((subject as DeliberateAny)[i], x as DeliberateAny)).every((x) => x)\n )\n } else if (test instanceof FixedArray) {\n return test.items.map((x, i) => match((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]) => match((subject as DeliberateAny)[k], v as DeliberateAny))\n .every((x) => x)\n }\n return false\n}\n\n/** @internal */\nexport const assertMatch: typeof _assertMatch = (subject, test, message): void => {\n const isMatching = match(subject, test)\n assert(isMatching, message)\n}\n\nconst getBigIntValue = (x: unknown) => {\n return asMaybeBigUintCls(x)?.asBigInt()\n}\n","import { DEFAULT_TEMPLATE_VAR_PREFIX } from '../constants'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport { CodeError } from '../errors'\n\n/** @internal */\nexport function TemplateVar<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\n/** @internal */\nexport function* urange(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","import type {\n ItxnCompose as _ItxnCompose,\n AnyTransactionComposeFields,\n ApplicationCallComposeFields,\n AssetConfigComposeFields,\n AssetFreezeComposeFields,\n AssetTransferComposeFields,\n ComposeItxnParams,\n Contract,\n KeyRegistrationComposeFields,\n PaymentComposeFields,\n} from '@algorandfoundation/algorand-typescript'\nimport type { AbiCallOptions, TypedApplicationCallFields } from '@algorandfoundation/algorand-typescript/arc4'\nimport { getContractMethod } from '../abi-metadata'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport type { DeliberateAny, InstanceMethod } from '../typescript-helpers'\nimport { getApplicationCallInnerTxnContext } from './c2c'\n\nclass ItxnCompose {\n begin(fields: PaymentComposeFields): void\n begin(fields: KeyRegistrationComposeFields): void\n begin(fields: AssetConfigComposeFields): void\n begin(fields: AssetTransferComposeFields): void\n begin(fields: AssetFreezeComposeFields): void\n begin(fields: ApplicationCallComposeFields): void\n begin(fields: AnyTransactionComposeFields): void\n begin(fields: ComposeItxnParams): void\n begin<TArgs extends DeliberateAny[]>(\n method: InstanceMethod<Contract, TArgs>,\n fields: TypedApplicationCallFields<TArgs>,\n contract?: Contract | { new (): Contract },\n ): void\n begin<TMethod>(options: AbiCallOptions<TMethod>, contract: string, method: string): void\n begin(...args: unknown[]): void {\n this.addInnerTransaction(...args)\n }\n\n next(fields: PaymentComposeFields): void\n next(fields: KeyRegistrationComposeFields): void\n next(fields: AssetConfigComposeFields): void\n next(fields: AssetTransferComposeFields): void\n next(fields: AssetFreezeComposeFields): void\n next(fields: ApplicationCallComposeFields): void\n next(fields: AnyTransactionComposeFields): void\n next(fields: ComposeItxnParams): void\n next<TArgs extends DeliberateAny[]>(\n _method: InstanceMethod<Contract, TArgs>,\n _fields: TypedApplicationCallFields<TArgs>,\n contract?: Contract | { new (): Contract },\n ): void\n next<TMethod>(options: AbiCallOptions<TMethod>, contract: string, method: string): void\n next(...args: unknown[]): void {\n this.addInnerTransaction(...args)\n }\n\n submit(): void {\n lazyContext.txn.activeGroup.submitInnerTransactionGroup()\n }\n\n private addInnerTransaction<TArgs extends DeliberateAny[]>(...args: unknown[]): void {\n let innerTxnFields\n\n // Single argument: direct transaction fields\n if (args.length === 1) {\n innerTxnFields = args[0] as AnyTransactionComposeFields\n }\n // Three arguments with object fields (deprecated signature):\n // e.g. `itxnCompose.begin(Hello.prototype.greet, { appId, args: ['ho'] })`\n else if (args.length === 3 && typeof args[1] === 'object') {\n innerTxnFields = getApplicationCallInnerTxnContext(\n args[0] as InstanceMethod<Contract, TArgs>,\n args[1] as TypedApplicationCallFields<TArgs>,\n args[2] as Contract | { new (): Contract },\n )\n }\n // Three arguments with string contract name:\n // e.g. `itxnCompose.next({ method: Hello.prototype.greet, appId, args: ['ho'] })`\n // or `itxnCompose.next<typeof Hello.prototype.greet>({ appId, args: ['ho'] })`\n else {\n const contractFullName = args[1] as string\n const methodName = args[2] as string\n const { method, contract } = getContractMethod(contractFullName, methodName)\n\n innerTxnFields = getApplicationCallInnerTxnContext(method, args[0] as TypedApplicationCallFields<TArgs>, contract)\n }\n\n lazyContext.txn.activeGroup.constructingItxnGroup.push(innerTxnFields)\n }\n}\n\n/** @internal */\nexport const itxnCompose: _ItxnCompose = new ItxnCompose()\n","/** @internal */\nexport * from '@algorandfoundation/algorand-typescript'\n/** @internal */\nexport { BaseContract, contract } from '../impl/base-contract'\n/** @internal */\nexport { clone } from '../impl/clone'\n/** @internal */\nexport { validateEncoding } from '../impl/validate-encoding'\n/** @internal */\nexport { compile } from '../impl/compiled'\n/** @internal */\nexport { abimethod, baremethod, Contract, readonly } from '../impl/contract'\n/** @internal */\nexport { emit } from '../impl/emit'\n/** @internal */\nexport { ensureBudget } from '../impl/ensure-budget'\n/** @internal */\nexport { Global } from '../impl/global'\n/** @internal */\nexport { log } from '../impl/log'\n/** @internal */\nexport { assertMatch, match } from '../impl/match'\n/** @internal */\nexport { BigUint, Bytes, Uint64 } from '../impl/primitives'\n/** @internal */\nexport { Account, Application, Asset } from '../impl/reference'\n/** @internal */\nexport { Box, BoxMap, GlobalState, LocalState } from '../impl/state'\n/** @internal */\nexport { TemplateVar } from '../impl/template-var'\n/** @internal */\nexport { Txn } from '../impl/txn'\n/** @internal */\nexport { urange } from '../impl/urange'\n/** @internal */\nexport { assert, err } from '../util'\n/** @internal */\nexport * as arc4 from './arc4'\n/** @internal */\nexport * as op from './op'\nimport {\n ApplicationCallTxn,\n AssetConfigTxn,\n AssetFreezeTxn,\n AssetTransferTxn,\n KeyRegistrationTxn,\n PaymentTxn,\n Transaction,\n} from '../impl/gtxn'\n/** @internal */\nexport const gtxn = {\n Transaction,\n PaymentTxn,\n KeyRegistrationTxn,\n AssetConfigTxn,\n AssetTransferTxn,\n AssetFreezeTxn,\n ApplicationCallTxn,\n}\n\nimport { applicationCall, assetConfig, assetFreeze, assetTransfer, keyRegistration, payment, submitGroup } from '../impl/inner-transactions'\n/** @internal */\nexport const itxn = {\n submitGroup,\n payment,\n keyRegistration,\n assetConfig,\n assetTransfer,\n assetFreeze,\n applicationCall,\n}\n\n/** @internal */\nexport { itxnCompose } from '../impl/itxn-compose'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACM,SAAU,KAAK,CAAI,cAAsB,EAAE,KAAQ,EAAA;AACvD,IAAA,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE;AAC7F,QAAA,OAAO,KAAK,CAAC,IAAI,EAAO;IAC1B;IACA,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC;IAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;AAC3C,IAAA,MAAM,O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GAAG,iBAAiB,CAAC,gBAAgB,EAAE,UAAU,CAAC;AAE5E,YAAA,cAAc,GAAG,iCAAiC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAsC,EAAE,QAAQ,CAAC;QACpH;QAEA,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC;IACxE;AACD;AAED;AACO,MAAM,WAAW,GAAiB,IAAI,WAAW;;AC3FxD;AAiDA;AACO,MAAM,IAAI,GAAG;IAClB,WAAW;IACX,UAAU;IACV,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,kBAAkB;;AAIpB;AACO,MAAM,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/clone.ts","../../src/impl/validate-encoding.ts","../../src/impl/compiled.ts","../../src/impl/log.ts","../../src/impl/emit.ts","../../src/impl/ensure-budget.ts","../../src/impl/match.ts","../../src/impl/template-var.ts","../../src/impl/urange.ts","../../src/impl/itxn-compose.ts","../../src/internal/index.ts"],"sourcesContent":["import { getEncoder, toBytes } from './encoded-types'\n\n/** @internal */\nexport function clone<T>(typeInfoString: string, value: T): T {\n if (value && typeof value === 'object' && 'copy' in value && typeof value.copy === 'function') {\n return value.copy() as T\n }\n const bytes = toBytes(value, typeInfoString)\n const typeInfo = JSON.parse(typeInfoString)\n const encoder = getEncoder(typeInfo)\n return encoder(bytes, typeInfo) as T\n}\n","/** @internal */\nexport function validateEncoding<T>(_value: T) {}\n","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\n/** @internal */\nexport function compile(\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 compiledAppEntry = lazyContext.value.getCompiledAppEntry(artefact as ConstructorFor<BaseContract>)\n const compiledLogicSigEntry = lazyContext.value.getCompiledLogicSigEntry(artefact as ConstructorFor<LogicSig>)\n if (compiledAppEntry !== undefined) {\n app = lazyContext.ledger.applicationDataMap.get(compiledAppEntry.value)\n }\n if (compiledLogicSigEntry !== undefined) {\n account = compiledLogicSigEntry.value\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 { BytesBacked, StringCompat } from '@algorandfoundation/algorand-typescript'\nimport { lazyContext } from '../context-helpers/internal-context'\n\nimport { AssertError, AvmError, CodeError } from '../errors'\nimport { toBytes } from './encoded-types'\nimport type { StubBigUintCompat, StubBytesCompat, StubUint64Compat } from './primitives'\n\n/** @internal */\nexport function log(...args: Array<StubUint64Compat | StubBytesCompat | StubBigUintCompat | StringCompat | BytesBacked>): void {\n lazyContext.txn.appendLog(args.map((a) => toBytes(a)).reduce((left, right) => left.concat(right)))\n}\n\n/** @internal */\nexport function loggedAssert(\n condition: unknown,\n code: string,\n messageOrOptions?: string | { message?: string | undefined; prefix?: 'ERR' | 'AER' },\n): asserts condition {\n if (!condition) {\n const errorMessage = resolveErrorMessage(code, messageOrOptions)\n log(errorMessage)\n throw new AssertError(errorMessage)\n }\n}\n\n/** @internal */\nexport function loggedErr(code: string, messageOrOptions?: string | { message?: string; prefix?: 'ERR' | 'AER' }): never {\n const errorMessage = resolveErrorMessage(code, messageOrOptions)\n log(errorMessage)\n throw new AvmError(errorMessage)\n}\n\nconst VALID_PREFIXES = new Set(['ERR', 'AER'])\nfunction resolveErrorMessage(code: string, messageOrOptions?: string | { message?: string | undefined; prefix?: 'ERR' | 'AER' }): string {\n const message = typeof messageOrOptions === 'string' ? messageOrOptions : messageOrOptions?.message\n const prefix = typeof messageOrOptions === 'string' ? undefined : (messageOrOptions?.prefix ?? 'ERR')\n\n if (code.includes(':')) {\n throw new CodeError(\"error code must not contain domain separator ':'\")\n }\n\n if (message && message.includes(':')) {\n throw new CodeError(\"error message must not contain domain separator ':'\")\n }\n\n const prefixStr = prefix || 'ERR'\n if (!VALID_PREFIXES.has(prefixStr)) {\n throw new CodeError('error prefix must be one of AER, ERR')\n }\n return message ? `${prefixStr}:${code}:${message}` : `${prefixStr}:${code}`\n}\n","import { CodeError } from '../errors'\nimport type { DeliberateAny } from '../typescript-helpers'\nimport { sha512_256 } from './crypto'\nimport { getArc4Encoded, getArc4TypeName } from './encoded-types'\nimport { log } from './log'\n\n/** @internal */\nexport function emit<T>(typeInfoString: string, event: T | string, ...eventProps: unknown[]) {\n let eventData\n let eventName\n if (typeof event === 'string') {\n eventData = getArc4Encoded(eventProps)\n eventName = event\n const argTypes = getArc4TypeName((eventData as DeliberateAny).typeInfo)!\n if (eventName.indexOf('(') === -1) {\n eventName += argTypes\n } else if (event.indexOf(argTypes) === -1) {\n throw new CodeError(`Event signature ${event} does not match arg types ${argTypes}`)\n }\n } else {\n eventData = getArc4Encoded(event)\n const typeInfo = JSON.parse(typeInfoString)\n const argTypes = getArc4TypeName((eventData as DeliberateAny).typeInfo)!\n eventName = typeInfo.name.replace(/.*</, '').replace(/>.*/, '') + argTypes\n }\n\n const eventHash = sha512_256(eventName)\n log(eventHash.slice(0, 4).concat(eventData.bytes))\n}\n","import type { uint64 } from '@algorandfoundation/algorand-typescript'\nimport { OpUpFeeSource } from '@algorandfoundation/algorand-typescript'\n\n/** @internal */\nexport function ensureBudget(_budget: uint64, _feeSource: OpUpFeeSource = OpUpFeeSource.GroupCredit) {\n // ensureBudget function is emulated to be a no-op\n}\n","import type { assertMatch as _assertMatch, match as _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 { FixedArray } from './encoded-types/encoded-types'\nimport type { StubBytesCompat, Uint64Cls } from './primitives'\nimport { BytesCls } from './primitives'\n\n/** @internal */\nexport const match: typeof _match = (subject, test): boolean => {\n if (Object.hasOwn(test, 'not')) {\n return !match(subject, (test as DeliberateAny).not)\n }\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 match(\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 (\n (subject as DeliberateAny).length === test.length &&\n test.map((x, i) => match((subject as DeliberateAny)[i], x as DeliberateAny)).every((x) => x)\n )\n } else if (test instanceof FixedArray) {\n return test.items.map((x, i) => match((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]) => match((subject as DeliberateAny)[k], v as DeliberateAny))\n .every((x) => x)\n }\n return false\n}\n\n/** @internal */\nexport const assertMatch: typeof _assertMatch = (subject, test, message): void => {\n const isMatching = match(subject, test)\n assert(isMatching, message)\n}\n\nconst getBigIntValue = (x: unknown) => {\n return asMaybeBigUintCls(x)?.asBigInt()\n}\n","import { DEFAULT_TEMPLATE_VAR_PREFIX } from '../constants'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport { CodeError } from '../errors'\n\n/** @internal */\nexport function TemplateVar<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\n/** @internal */\nexport function* urange(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","import type {\n ItxnCompose as _ItxnCompose,\n AnyTransactionComposeFields,\n ApplicationCallComposeFields,\n AssetConfigComposeFields,\n AssetFreezeComposeFields,\n AssetTransferComposeFields,\n ComposeItxnParams,\n Contract,\n KeyRegistrationComposeFields,\n PaymentComposeFields,\n} from '@algorandfoundation/algorand-typescript'\nimport type { AbiCallOptions, TypedApplicationCallFields } from '@algorandfoundation/algorand-typescript/arc4'\nimport { getContractMethod } from '../abi-metadata'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport type { DeliberateAny, InstanceMethod } from '../typescript-helpers'\nimport { getApplicationCallInnerTxnContext } from './c2c'\n\nclass ItxnCompose {\n begin(fields: PaymentComposeFields): void\n begin(fields: KeyRegistrationComposeFields): void\n begin(fields: AssetConfigComposeFields): void\n begin(fields: AssetTransferComposeFields): void\n begin(fields: AssetFreezeComposeFields): void\n begin(fields: ApplicationCallComposeFields): void\n begin(fields: AnyTransactionComposeFields): void\n begin(fields: ComposeItxnParams): void\n begin<TArgs extends DeliberateAny[]>(\n method: InstanceMethod<Contract, TArgs>,\n fields: TypedApplicationCallFields<TArgs>,\n contract?: Contract | { new (): Contract },\n ): void\n begin<TMethod>(options: AbiCallOptions<TMethod>, contract: string, method: string): void\n begin(...args: unknown[]): void {\n this.addInnerTransaction(...args)\n }\n\n next(fields: PaymentComposeFields): void\n next(fields: KeyRegistrationComposeFields): void\n next(fields: AssetConfigComposeFields): void\n next(fields: AssetTransferComposeFields): void\n next(fields: AssetFreezeComposeFields): void\n next(fields: ApplicationCallComposeFields): void\n next(fields: AnyTransactionComposeFields): void\n next(fields: ComposeItxnParams): void\n next<TArgs extends DeliberateAny[]>(\n _method: InstanceMethod<Contract, TArgs>,\n _fields: TypedApplicationCallFields<TArgs>,\n contract?: Contract | { new (): Contract },\n ): void\n next<TMethod>(options: AbiCallOptions<TMethod>, contract: string, method: string): void\n next(...args: unknown[]): void {\n this.addInnerTransaction(...args)\n }\n\n submit(): void {\n lazyContext.txn.activeGroup.submitInnerTransactionGroup()\n }\n\n private addInnerTransaction<TArgs extends DeliberateAny[]>(...args: unknown[]): void {\n let innerTxnFields\n\n // Single argument: direct transaction fields\n if (args.length === 1) {\n innerTxnFields = args[0] as AnyTransactionComposeFields\n }\n // Three arguments with object fields (deprecated signature):\n // e.g. `itxnCompose.begin(Hello.prototype.greet, { appId, args: ['ho'] })`\n else if (args.length === 3 && typeof args[1] === 'object') {\n innerTxnFields = getApplicationCallInnerTxnContext(\n args[0] as InstanceMethod<Contract, TArgs>,\n args[1] as TypedApplicationCallFields<TArgs>,\n args[2] as Contract | { new (): Contract },\n )\n }\n // Three arguments with string contract name:\n // e.g. `itxnCompose.next({ method: Hello.prototype.greet, appId, args: ['ho'] })`\n // or `itxnCompose.next<typeof Hello.prototype.greet>({ appId, args: ['ho'] })`\n else {\n const contractFullName = args[1] as string\n const methodName = args[2] as string\n const { method, contract } = getContractMethod(contractFullName, methodName)\n\n innerTxnFields = getApplicationCallInnerTxnContext(method, args[0] as TypedApplicationCallFields<TArgs>, contract)\n }\n\n lazyContext.txn.activeGroup.constructingItxnGroup.push(innerTxnFields)\n }\n}\n\n/** @internal */\nexport const itxnCompose: _ItxnCompose = new ItxnCompose()\n","/** @internal */\nexport * from '@algorandfoundation/algorand-typescript'\n/** @internal */\nexport { BaseContract, contract } from '../impl/base-contract'\n/** @internal */\nexport { clone } from '../impl/clone'\n/** @internal */\nexport { validateEncoding } from '../impl/validate-encoding'\n/** @internal */\nexport { compile } from '../impl/compiled'\n/** @internal */\nexport { abimethod, baremethod, Contract, readonly } from '../impl/contract'\n/** @internal */\nexport { emit } from '../impl/emit'\n/** @internal */\nexport { ensureBudget } from '../impl/ensure-budget'\n/** @internal */\nexport { Global } from '../impl/global'\n/** @internal */\nexport { log, loggedAssert, loggedErr } from '../impl/log'\n/** @internal */\nexport { assertMatch, match } from '../impl/match'\n/** @internal */\nexport { BigUint, Bytes, Uint64 } from '../impl/primitives'\n/** @internal */\nexport { Account, Application, Asset } from '../impl/reference'\n/** @internal */\nexport { Box, BoxMap, GlobalState, LocalState } from '../impl/state'\n/** @internal */\nexport { TemplateVar } from '../impl/template-var'\n/** @internal */\nexport { Txn } from '../impl/txn'\n/** @internal */\nexport { urange } from '../impl/urange'\n/** @internal */\nexport { assert, err } from '../util'\n/** @internal */\nexport * as arc4 from './arc4'\n/** @internal */\nexport * as op from './op'\nimport {\n ApplicationCallTxn,\n AssetConfigTxn,\n AssetFreezeTxn,\n AssetTransferTxn,\n KeyRegistrationTxn,\n PaymentTxn,\n Transaction,\n} from '../impl/gtxn'\n/** @internal */\nexport const gtxn = {\n Transaction,\n PaymentTxn,\n KeyRegistrationTxn,\n AssetConfigTxn,\n AssetTransferTxn,\n AssetFreezeTxn,\n ApplicationCallTxn,\n}\n\nimport { applicationCall, assetConfig, assetFreeze, assetTransfer, keyRegistration, payment, submitGroup } from '../impl/inner-transactions'\n/** @internal */\nexport const itxn = {\n submitGroup,\n payment,\n keyRegistration,\n assetConfig,\n assetTransfer,\n assetFreeze,\n applicationCall,\n}\n\n/** @internal */\nexport { itxnCompose } from '../impl/itxn-compose'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACM,SAAU,KAAK,CAAI,cAAsB,EAAE,KAAQ,EAAA;AACvD,IAAA,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ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IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;AACzD,YAAA,cAAc,GAAG,iCAAiC,CAChD,IAAI,CAAC,CAAC,CAAoC,EAC1C,IAAI,CAAC,CAAC,CAAsC,EAC5C,IAAI,CAAC,CAAC,CAAoC,CAC3C;QACH;;;;aAIK;AACH,YAAA,MAAM,gBAAgB,GAAG,IAAI,CAAC,CAAC,CAAW;AAC1C,YAAA,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,CAAW;AACpC,YAAA,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,iBAAiB,CAAC,gBAAgB,EAAE,UAAU,CAAC;AAE5E,YAAA,cAAc,GAAG,iCAAiC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAsC,EAAE,QAAQ,CAAC;QACpH;QAEA,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC;IACxE;AACD;AAED;AACO,MAAM,WAAW,GAAiB,IAAI,WAAW;;AC3FxD;AAiDA;AACO,MAAM,IAAI,GAAG;IAClB,WAAW;IACX,UAAU;IACV,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,kBAAkB;;AAIpB;AACO,MAAM,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.
|
|
7
|
+
"version": "1.2.0-beta.1",
|
|
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
|
"dependencies": {
|