@algorandfoundation/algorand-typescript-testing 1.1.0 → 1.1.1-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.
@@ -1,9 +1,9 @@
1
1
  import * as arc4$1 from '@algorandfoundation/algorand-typescript/arc4';
2
2
  import { OnCompleteAction } from '@algorandfoundation/algorand-typescript';
3
- import { b as getContractMethod, g as getContractMethodAbiMetadata, C as Contract, c as abimethod, d as baremethod, r as readonly } from './runtime-helpers-B49EGsTy.js';
4
- import { v as lazyContext, a0 as sizeOf } from './utils-fy0_Fvxl.js';
5
- import { A as ApplicationCallInnerTxnContext, m as methodSelector } from './inner-transactions-DBQl17y0.js';
6
- import { A as Address, B as Bool, c as Byte, d as DynamicArray, D as DynamicBytes, F as FixedArray, R as ReferenceArray, e as StaticArray, f as StaticBytes, S as Str, h as Struct, T as Tuple, i as UFixed, U as Uint, j as convertBytes, k as decodeArc4, l as encodeArc4 } from './asset-params-BpG3snO3.js';
3
+ import { b as getContractMethod, g as getContractMethodAbiMetadata, C as Contract, c as abimethod, d as baremethod, r as readonly } from './runtime-helpers-Dpv9_KsV.js';
4
+ import { v as lazyContext, a0 as sizeOf } from './utils-DyUEnpf6.js';
5
+ import { A as ApplicationCallInnerTxnContext, m as methodSelector } from './inner-transactions-DIR405zr.js';
6
+ import { A as Address, B as Bool, c as Byte, d as DynamicArray, D as DynamicBytes, F as FixedArray, R as ReferenceArray, e as StaticArray, f as StaticBytes, S as Str, h as Struct, T as Tuple, i as UFixed, U as Uint, j as convertBytes, k as decodeArc4, l as encodeArc4 } from './asset-params-DV6t5Cy8.js';
7
7
 
8
8
  function _mergeNamespaces(n, m) {
9
9
  m.forEach(function (e) {
@@ -135,4 +135,4 @@ var arc4 = /*#__PURE__*/_mergeNamespaces({
135
135
  }, [arc4$1]);
136
136
 
137
137
  export { arc4 as a, abiCall as b, compileArc4 as c, getApplicationCallInnerTxnContext as g };
138
- //# sourceMappingURL=arc4-DKG6fACw.js.map
138
+ //# sourceMappingURL=arc4-Uo4nu8mW.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"arc4-DKG6fACw.js","sources":["../src/impl/c2c.ts","../src/internal/arc4.ts"],"sourcesContent":["import { type CompileContractOptions, type Contract, OnCompleteAction } from '@algorandfoundation/algorand-typescript'\nimport type {\n BareCreateApplicationCallFields,\n ContractProxy,\n TypedApplicationCallFields,\n} from '@algorandfoundation/algorand-typescript/arc4'\nimport { getContractMethod, getContractMethodAbiMetadata } from '../abi-metadata'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport type { ConstructorFor, DeliberateAny, InstanceMethod } from '../typescript-helpers'\nimport type { ApplicationCallInnerTxn } from './inner-transactions'\nimport { ApplicationCallInnerTxnContext } from './inner-transactions'\nimport { methodSelector } from './method-selector'\nimport type { ApplicationData } from './reference'\n\n/** @internal */\nexport function compileArc4<TContract extends Contract>(\n contract: ConstructorFor<TContract>,\n options?: CompileContractOptions,\n): ContractProxy<TContract> {\n let app: ApplicationData | undefined\n const compiledAppEntry = lazyContext.value.getCompiledAppEntry(contract)\n if (compiledAppEntry !== undefined) {\n app = lazyContext.ledger.applicationDataMap.get(compiledAppEntry.value)\n }\n\n if (options?.templateVars) {\n Object.entries(options.templateVars).forEach(([key, value]) => {\n lazyContext.value.setTemplateVar(key, value, options.templateVarsPrefix)\n })\n }\n\n return {\n call: new Proxy({} as unknown as TContract, {\n get: (_target, prop) => {\n return (methodArgs: TypedApplicationCallFields<DeliberateAny[]>) => {\n const selector = methodSelector({ method: prop as string, contract })\n const abiMetadata = getContractMethodAbiMetadata(contract, prop as string)\n const onCompleteActions = abiMetadata?.allowActions?.map((action) => OnCompleteAction[action])\n const itxnContext = ApplicationCallInnerTxnContext.createFromTypedApplicationCallFields(\n {\n ...getCommonApplicationCallFields(app, options),\n onCompletion: onCompleteActions?.[0],\n ...methodArgs,\n },\n selector,\n abiMetadata?.resourceEncoding,\n )\n invokeAbiCall(itxnContext)\n return {\n itxn: itxnContext,\n returnValue: itxnContext.loggedReturnValue,\n }\n }\n },\n }),\n\n bareCreate: (methodArgs?: BareCreateApplicationCallFields) => {\n const itxnContext = ApplicationCallInnerTxnContext.createFromBareCreateApplicationCallFields({\n ...getCommonApplicationCallFields(app, options),\n ...methodArgs,\n })\n invokeAbiCall(itxnContext)\n return itxnContext\n },\n approvalProgram: app?.application.approvalProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n clearStateProgram: app?.application.clearStateProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n extraProgramPages: options?.extraProgramPages ?? app?.application.extraProgramPages ?? lazyContext.any.uint64(),\n globalUints: options?.globalUints ?? app?.application.globalNumUint ?? lazyContext.any.uint64(),\n globalBytes: options?.globalBytes ?? app?.application.globalNumBytes ?? lazyContext.any.uint64(),\n localUints: options?.localUints ?? app?.application.localNumUint ?? lazyContext.any.uint64(),\n localBytes: options?.localBytes ?? app?.application.localNumBytes ?? lazyContext.any.uint64(),\n } as unknown as ContractProxy<TContract>\n}\n\n/** @internal */\nexport const invokeAbiCall = (itxnContext: ApplicationCallInnerTxnContext) => {\n lazyContext.value.notifyApplicationSpies(itxnContext)\n lazyContext.txn.activeGroup.addInnerTransactionGroup(...(itxnContext.itxns ?? []), itxnContext)\n}\nconst getCommonApplicationCallFields = (app: ApplicationData | undefined, options: CompileContractOptions | undefined) => ({\n approvalProgram: app?.application.approvalProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n clearStateProgram: app?.application.clearStateProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n extraProgramPages: options?.extraProgramPages ?? app?.application.extraProgramPages ?? lazyContext.any.uint64(),\n globalNumUint: options?.globalUints ?? app?.application.globalNumUint ?? lazyContext.any.uint64(),\n globalNumBytes: options?.globalBytes ?? app?.application.globalNumBytes ?? lazyContext.any.uint64(),\n localNumUint: options?.localUints ?? app?.application.localNumUint ?? lazyContext.any.uint64(),\n localNumBytes: options?.localBytes ?? app?.application.localNumBytes ?? lazyContext.any.uint64(),\n})\n\n/** @internal */\nexport function getApplicationCallInnerTxnContext<TArgs extends DeliberateAny[], TReturn = void>(\n method: InstanceMethod<Contract, TArgs, TReturn>,\n methodArgs: TypedApplicationCallFields<TArgs>,\n contract?: Contract | { new (): Contract },\n) {\n const abiMetadata = contract ? getContractMethodAbiMetadata(contract, method.name) : undefined\n const selector = methodSelector({ method, contract })\n return ApplicationCallInnerTxnContext.createFromTypedApplicationCallFields<TReturn>(\n {\n ...methodArgs,\n onCompletion: methodArgs.onCompletion ?? abiMetadata?.allowActions?.map((action) => OnCompleteAction[action])[0],\n },\n selector,\n abiMetadata?.resourceEncoding,\n )\n}\n/** @internal */\nexport function abiCall<TArgs extends DeliberateAny[], TReturn>(\n contractFullName: string,\n method: string,\n methodArgs: TypedApplicationCallFields<TArgs>,\n): { itxn: ApplicationCallInnerTxn; returnValue: TReturn | undefined } {\n const { method: methodInstance, contract: contractInstance } = getContractMethod(contractFullName, method)\n\n const itxnContext = getApplicationCallInnerTxnContext<TArgs, TReturn>(methodInstance, methodArgs, contractInstance)\n\n invokeAbiCall(itxnContext)\n\n return {\n itxn: itxnContext,\n returnValue: itxnContext.loggedReturnValue,\n }\n}\n","/** @internal */\nexport * from '@algorandfoundation/algorand-typescript/arc4'\n/** @internal */\nexport { abiCall, compileArc4 } from '../impl/c2c'\n/** @internal */\nexport { abimethod, baremethod, Contract, readonly } from '../impl/contract'\n/** @internal */\nexport {\n Address,\n Bool,\n Byte,\n convertBytes,\n decodeArc4,\n DynamicArray,\n DynamicBytes,\n encodeArc4,\n FixedArray,\n ReferenceArray,\n sizeOf,\n StaticArray,\n StaticBytes,\n Str,\n Struct,\n Tuple,\n UFixed,\n Uint,\n} from '../impl/encoded-types'\n/** @internal */\nexport { methodSelector } from '../impl/method-selector'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAcA;AACM,SAAU,WAAW,CACzB,QAAmC,EACnC,OAAgC,EAA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l/c2c.ts","../src/internal/arc4.ts"],"sourcesContent":["import { type CompileContractOptions, type Contract, OnCompleteAction } from '@algorandfoundation/algorand-typescript'\nimport type {\n BareCreateApplicationCallFields,\n ContractProxy,\n TypedApplicationCallFields,\n} from '@algorandfoundation/algorand-typescript/arc4'\nimport { getContractMethod, getContractMethodAbiMetadata } from '../abi-metadata'\nimport { lazyContext } from '../context-helpers/internal-context'\nimport type { ConstructorFor, DeliberateAny, InstanceMethod } from '../typescript-helpers'\nimport type { ApplicationCallInnerTxn } from './inner-transactions'\nimport { ApplicationCallInnerTxnContext } from './inner-transactions'\nimport { methodSelector } from './method-selector'\nimport type { ApplicationData } from './reference'\n\n/** @internal */\nexport function compileArc4<TContract extends Contract>(\n contract: ConstructorFor<TContract>,\n options?: CompileContractOptions,\n): ContractProxy<TContract> {\n let app: ApplicationData | undefined\n const compiledAppEntry = lazyContext.value.getCompiledAppEntry(contract)\n if (compiledAppEntry !== undefined) {\n app = lazyContext.ledger.applicationDataMap.get(compiledAppEntry.value)\n }\n\n if (options?.templateVars) {\n Object.entries(options.templateVars).forEach(([key, value]) => {\n lazyContext.value.setTemplateVar(key, value, options.templateVarsPrefix)\n })\n }\n\n return {\n call: new Proxy({} as unknown as TContract, {\n get: (_target, prop) => {\n return (methodArgs: TypedApplicationCallFields<DeliberateAny[]>) => {\n const selector = methodSelector({ method: prop as string, contract })\n const abiMetadata = getContractMethodAbiMetadata(contract, prop as string)\n const onCompleteActions = abiMetadata?.allowActions?.map((action) => OnCompleteAction[action])\n const itxnContext = ApplicationCallInnerTxnContext.createFromTypedApplicationCallFields(\n {\n ...getCommonApplicationCallFields(app, options),\n onCompletion: onCompleteActions?.[0],\n ...methodArgs,\n },\n selector,\n abiMetadata?.resourceEncoding,\n )\n invokeAbiCall(itxnContext)\n return {\n itxn: itxnContext,\n returnValue: itxnContext.loggedReturnValue,\n }\n }\n },\n }),\n\n bareCreate: (methodArgs?: BareCreateApplicationCallFields) => {\n const itxnContext = ApplicationCallInnerTxnContext.createFromBareCreateApplicationCallFields({\n ...getCommonApplicationCallFields(app, options),\n ...methodArgs,\n })\n invokeAbiCall(itxnContext)\n return itxnContext\n },\n approvalProgram: app?.application.approvalProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n clearStateProgram: app?.application.clearStateProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n extraProgramPages: options?.extraProgramPages ?? app?.application.extraProgramPages ?? lazyContext.any.uint64(),\n globalUints: options?.globalUints ?? app?.application.globalNumUint ?? lazyContext.any.uint64(),\n globalBytes: options?.globalBytes ?? app?.application.globalNumBytes ?? lazyContext.any.uint64(),\n localUints: options?.localUints ?? app?.application.localNumUint ?? lazyContext.any.uint64(),\n localBytes: options?.localBytes ?? app?.application.localNumBytes ?? lazyContext.any.uint64(),\n } as unknown as ContractProxy<TContract>\n}\n\n/** @internal */\nexport const invokeAbiCall = (itxnContext: ApplicationCallInnerTxnContext) => {\n lazyContext.value.notifyApplicationSpies(itxnContext)\n lazyContext.txn.activeGroup.addInnerTransactionGroup(...(itxnContext.itxns ?? []), itxnContext)\n}\nconst getCommonApplicationCallFields = (app: ApplicationData | undefined, options: CompileContractOptions | undefined) => ({\n approvalProgram: app?.application.approvalProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n clearStateProgram: app?.application.clearStateProgram ?? [lazyContext.any.bytes(10), lazyContext.any.bytes(10)],\n extraProgramPages: options?.extraProgramPages ?? app?.application.extraProgramPages ?? lazyContext.any.uint64(),\n globalNumUint: options?.globalUints ?? app?.application.globalNumUint ?? lazyContext.any.uint64(),\n globalNumBytes: options?.globalBytes ?? app?.application.globalNumBytes ?? lazyContext.any.uint64(),\n localNumUint: options?.localUints ?? app?.application.localNumUint ?? lazyContext.any.uint64(),\n localNumBytes: options?.localBytes ?? app?.application.localNumBytes ?? lazyContext.any.uint64(),\n})\n\n/** @internal */\nexport function getApplicationCallInnerTxnContext<TArgs extends DeliberateAny[], TReturn = void>(\n method: InstanceMethod<Contract, TArgs, TReturn>,\n methodArgs: TypedApplicationCallFields<TArgs>,\n contract?: Contract | { new (): Contract },\n) {\n const abiMetadata = contract ? getContractMethodAbiMetadata(contract, method.name) : undefined\n const selector = methodSelector({ method, contract })\n return ApplicationCallInnerTxnContext.createFromTypedApplicationCallFields<TReturn>(\n {\n ...methodArgs,\n onCompletion: methodArgs.onCompletion ?? abiMetadata?.allowActions?.map((action) => OnCompleteAction[action])[0],\n },\n selector,\n abiMetadata?.resourceEncoding,\n )\n}\n/** @internal */\nexport function abiCall<TArgs extends DeliberateAny[], TReturn>(\n contractFullName: string,\n method: string,\n methodArgs: TypedApplicationCallFields<TArgs>,\n): { itxn: ApplicationCallInnerTxn; returnValue: TReturn | undefined } {\n const { method: methodInstance, contract: contractInstance } = getContractMethod(contractFullName, method)\n\n const itxnContext = getApplicationCallInnerTxnContext<TArgs, TReturn>(methodInstance, methodArgs, contractInstance)\n\n invokeAbiCall(itxnContext)\n\n return {\n itxn: itxnContext,\n returnValue: itxnContext.loggedReturnValue,\n }\n}\n","/** @internal */\nexport * from '@algorandfoundation/algorand-typescript/arc4'\n/** @internal */\nexport { abiCall, compileArc4 } from '../impl/c2c'\n/** @internal */\nexport { abimethod, baremethod, Contract, readonly } from '../impl/contract'\n/** @internal */\nexport {\n Address,\n Bool,\n Byte,\n convertBytes,\n decodeArc4,\n DynamicArray,\n DynamicBytes,\n encodeArc4,\n FixedArray,\n ReferenceArray,\n sizeOf,\n StaticArray,\n StaticBytes,\n Str,\n Struct,\n Tuple,\n UFixed,\n Uint,\n} from '../impl/encoded-types'\n/** @internal */\nexport { methodSelector } from '../impl/method-selector'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAcA;AACM,SAAU,WAAW,CACzB,QAAmC,EACnC,OAAgC,EAAA;AAEhC,IAAA,IAAI,GAAgC;IACpC,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAC,mBAAmB,CAAC,QAAQ,CAAC;AAC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OAAO,EAAE,UAAU,IAAI,GAAG,EAAE,WAAW,CAAC,aAAa,IAAI,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE;AACjG,CAAA,CAAC;AAEF;SACgB,iCAAiC,CAC/C,MAAgD,EAChD,UAA6C,EAC7C,QAA0C,EAAA;AAE1C,IAAA,MAAM,WAAW,GAAG,QAAQ,GAAG,4BAA4B,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS;IAC9F,MAAM,QAAQ,GAAG,cAAc,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACrD,OAAO,8BAA8B,CAAC,oCAAoC,CACxE;AACE,QAAA,GAAG,UAAU;QACb,YAAY,EAAE,UAAU,CAAC,YAAY,IAAI,WAAW,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC,MAAM,KAAK,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACjH,KAAA,EACD,QAAQ,EACR,WAAW,EAAE,gBAAgB,CAC9B;AACH;AACA;SACgB,OAAO,CACrB,gBAAwB,EACxB,MAAc,EACd,UAA6C,EAAA;AAE7C,IAAA,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAE1G,MAAM,WAAW,GAAG,iCAAiC,CAAiB,cAAc,EAAE,UAAU,EAAE,gBAAgB,CAAC;IAEnH,aAAa,CAAC,WAAW,CAAC;IAE1B,OAAO;AACL,QAAA,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,WAAW,CAAC,iBAAiB;KAC3C;AACH;;AC1HA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import { FixedArray as FixedArray$1, ReferenceArray as ReferenceArray$1, Ecdsa,
2
2
  import { Address as Address$1, Bool as Bool$1, Byte as Byte$1, DynamicArray as DynamicArray$1, DynamicBytes as DynamicBytes$1, StaticArray as StaticArray$1, StaticBytes as StaticBytes$1, Str as Str$1, Struct as Struct$1, Tuple as Tuple$1, UFixed as UFixed$1, Uint as Uint$1, ARC4Encoded } from '@algorandfoundation/algorand-typescript/arc4';
3
3
  import { encodingUtil } from '@algorandfoundation/puya-ts';
4
4
  import assert from 'assert';
5
- import { at as arrayUtil, au as ALGORAND_ADDRESS_BYTE_LENGTH, av as ALGORAND_CHECKSUM_BYTE_LENGTH, aw as isBytes, ax as getUint8Array, E as Account, ay as TRUE_BIGINT_VALUE, az as FALSE_BIGINT_VALUE, D as Bytes, a5 as asBytesCls, u as ABI_RETURN_VALUE_LOG_PREFIX, s as asUint8Array, aA as getNativeValue, aB as areAllARC4Encoded, aC as checkItemTypeName, aD as readLength, a6 as concatUint8Arrays, aE as encodeLength, aF as ABI_LENGTH_SIZE, f as asBytes, aG as getMaxLengthOfStaticContentType, a as asNumber, aH as IS_INITIALISING_FROM_BYTES_SYMBOL, aI as trimTrailingDecimalZeros, aJ as regExpNxM, aK as maxBigIntValue, aL as maxBytesLength, h as asUint64, ap as asBigUint, as as UINT64_SIZE, aM as validBitSizes, y as asBigUintCls, M as MAX_UINT64, aN as transactionTypeFromBytes, aO as onCompletionFromBytes, aP as uint64FromBytes, aQ as stringFromBytes, aR as bytesFromBytes, aS as bigUintFromBytes, aT as booleanFromBytes, G as AssetCls, t as ApplicationCls, A as AccountCls, U as Uint64Cls, q as asBigInt, B as BigUintCls, b as BytesCls, aU as holdsDynamicLengthContent, aV as uint8ArrayToNumber, aW as findBoolTypes, aX as compressMultipleBool, aY as findBool, k as asMaybeUint64Cls, r as asMaybeBytesCls, Z as asMaybeBigUintCls, X as BytesBackedCls, Y as Uint64BackedCls, l as asUint64Cls, aZ as LOGIC_DATA_PREFIX, v as lazyContext, a_ as PROGRAM_TAG, w as Uint64 } from './utils-fy0_Fvxl.js';
5
+ import { at as arrayUtil, au as ALGORAND_ADDRESS_BYTE_LENGTH, av as ALGORAND_CHECKSUM_BYTE_LENGTH, aw as isBytes, ax as getUint8Array, E as Account, ay as TRUE_BIGINT_VALUE, az as FALSE_BIGINT_VALUE, D as Bytes, a5 as asBytesCls, u as ABI_RETURN_VALUE_LOG_PREFIX, s as asUint8Array, aA as areAllARC4Encoded, aB as checkItemTypeName, aC as readLength, a6 as concatUint8Arrays, aD as encodeLength, aE as ABI_LENGTH_SIZE, f as asBytes, aF as getMaxLengthOfStaticContentType, a as asNumber, aG as IS_INITIALISING_FROM_BYTES_SYMBOL, aH as trimTrailingDecimalZeros, aI as regExpNxM, aJ as maxBigIntValue, aK as maxBytesLength, as as UINT64_SIZE, h as asUint64, ap as asBigUint, aL as validBitSizes, y as asBigUintCls, M as MAX_UINT64, aM as getNativeValue, aN as holdsDynamicLengthContent, aO as uint8ArrayToNumber, aP as compressMultipleBool, aQ as transactionTypeFromBytes, aR as onCompletionFromBytes, aS as uint64FromBytes, aT as stringFromBytes, aU as bytesFromBytes, aV as bigUintFromBytes, aW as booleanFromBytes, G as AssetCls, t as ApplicationCls, A as AccountCls, U as Uint64Cls, q as asBigInt, B as BigUintCls, b as BytesCls, k as asMaybeUint64Cls, r as asMaybeBytesCls, Z as asMaybeBigUintCls, X as BytesBackedCls, Y as Uint64BackedCls, l as asUint64Cls, aX as findBoolTypes, aY as findBool, aZ as LOGIC_DATA_PREFIX, v as lazyContext, a_ as PROGRAM_TAG, w as Uint64 } from './utils-DyUEnpf6.js';
6
6
  import { a as AvmError, b as avmInvariant, C as CodeError, I as InternalError, n as nameOfType, N as NotImplementedError } from './typescript-helpers-sobuICoc.js';
7
7
  import elliptic from 'elliptic';
8
8
  import js_sha256 from 'js-sha256';
@@ -1431,4 +1431,4 @@ const AssetParams = {
1431
1431
  };
1432
1432
 
1433
1433
  export { Address as A, Bool as B, sha256 as C, DynamicBytes as D, EllipticCurve as E, FixedArray as F, sha3_256 as G, vrfVerify as H, ReferenceArray as R, Str as S, Tuple as T, Uint as U, toBytes as a, getArc4Encoded as b, Byte as c, DynamicArray as d, StaticArray as e, StaticBytes as f, getEncoder as g, Struct as h, UFixed as i, convertBytes as j, decodeArc4 as k, encodeArc4 as l, getApp as m, getAsset as n, AppParams as o, AssetParams as p, ecdsaPkDecompress as q, ecdsaPkRecover as r, sha512_256 as s, toUint8Array as t, ecdsaVerify as u, ed25519verify as v, ed25519verifyBare as w, falconVerify as x, keccak256 as y, mimc as z };
1434
- //# sourceMappingURL=asset-params-BpG3snO3.js.map
1434
+ //# sourceMappingURL=asset-params-DV6t5Cy8.js.map