@algorandfoundation/algorand-typescript-testing 1.0.0-beta.22 → 1.0.0-beta.23
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/{arc4-Dgs99Kjo.js → arc4-DYS8O84x.js} +3 -2
- package/arc4-DYS8O84x.js.map +1 -0
- package/{contract-D38hS7qZ.js → contract-CfMCD1BK.js} +10 -2
- package/{contract-D38hS7qZ.js.map → contract-CfMCD1BK.js.map} +1 -1
- package/index.mjs +1 -1
- package/internal/arc4.d.ts +1 -1
- package/internal/arc4.mjs +1 -1
- package/internal/index.mjs +2 -2
- package/package.json +1 -1
- package/arc4-Dgs99Kjo.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as arc4$1 from '@algorandfoundation/algorand-typescript/arc4';
|
|
2
|
-
import { C as Contract, a as abimethod, m as methodSelector } from './contract-
|
|
2
|
+
import { C as Contract, a as abimethod, b as baremethod, m as methodSelector } from './contract-CfMCD1BK.js';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
5
5
|
m.forEach(function (e) {
|
|
@@ -20,8 +20,9 @@ var arc4 = /*#__PURE__*/_mergeNamespaces({
|
|
|
20
20
|
__proto__: null,
|
|
21
21
|
Contract: Contract,
|
|
22
22
|
abimethod: abimethod,
|
|
23
|
+
baremethod: baremethod,
|
|
23
24
|
methodSelector: methodSelector
|
|
24
25
|
}, [arc4$1]);
|
|
25
26
|
|
|
26
27
|
export { arc4 as a };
|
|
27
|
-
//# sourceMappingURL=arc4-
|
|
28
|
+
//# sourceMappingURL=arc4-DYS8O84x.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arc4-DYS8O84x.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -16,9 +16,17 @@ function abimethod(config) {
|
|
|
16
16
|
return target;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
+
function baremethod(config) {
|
|
20
|
+
return function (target, ctx) {
|
|
21
|
+
ctx.addInitializer(function () {
|
|
22
|
+
captureMethodConfig(this, target.name, config);
|
|
23
|
+
});
|
|
24
|
+
return target;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
19
27
|
const methodSelector = (methodSignature) => {
|
|
20
28
|
return sha512_256(Bytes(encodingUtil.utf8ToUint8Array(methodSignature))).slice(0, 4);
|
|
21
29
|
};
|
|
22
30
|
|
|
23
|
-
export { Contract as C, abimethod as a, methodSelector as m };
|
|
24
|
-
//# sourceMappingURL=contract-
|
|
31
|
+
export { Contract as C, abimethod as a, baremethod as b, methodSelector as m };
|
|
32
|
+
//# sourceMappingURL=contract-CfMCD1BK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-
|
|
1
|
+
{"version":3,"file":"contract-CfMCD1BK.js","sources":["../src/impl/contract.ts"],"sourcesContent":["import type { arc4, bytes } from '@algorandfoundation/algorand-typescript'\nimport { encodingUtil } from '@algorandfoundation/puya-ts'\nimport { captureMethodConfig } from '../abi-metadata'\nimport type { DeliberateAny } from '../typescript-helpers'\nimport { BaseContract } from './base-contract'\nimport { sha512_256 } from './crypto'\nimport { Bytes } from './primitives'\n\nexport class Contract extends BaseContract {\n static isArc4 = true\n\n override approvalProgram(): boolean {\n return true\n }\n}\n\nexport function abimethod<TContract extends Contract>(config?: arc4.AbiMethodConfig<TContract>) {\n return function <TArgs extends DeliberateAny[], TReturn>(\n target: (this: TContract, ...args: TArgs) => TReturn,\n ctx: ClassMethodDecoratorContext<TContract>,\n ): (this: TContract, ...args: TArgs) => TReturn {\n ctx.addInitializer(function () {\n captureMethodConfig(this, target.name, config)\n })\n return target\n }\n}\n\nexport function baremethod<TContract extends Contract>(config?: arc4.BareMethodConfig) {\n return function <TArgs extends DeliberateAny[], TReturn>(\n target: (this: TContract, ...args: TArgs) => TReturn,\n ctx: ClassMethodDecoratorContext<TContract>,\n ): (this: TContract, ...args: TArgs) => TReturn {\n ctx.addInitializer(function () {\n captureMethodConfig(this, target.name, config)\n })\n return target\n }\n}\n\nexport const methodSelector: typeof arc4.methodSelector = (methodSignature: string): bytes => {\n return sha512_256(Bytes(encodingUtil.utf8ToUint8Array(methodSignature))).slice(0, 4)\n}\n"],"names":[],"mappings":";;;;AAQM,MAAO,QAAS,SAAQ,YAAY,CAAA;AACxC,IAAA,OAAO,MAAM,GAAG,IAAI;IAEX,eAAe,GAAA;AACtB,QAAA,OAAO,IAAI;;;AAIT,SAAU,SAAS,CAA6B,MAAwC,EAAA;IAC5F,OAAO,UACL,MAAoD,EACpD,GAA2C,EAAA;QAE3C,GAAG,CAAC,cAAc,CAAC,YAAA;YACjB,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;AAChD,SAAC,CAAC;AACF,QAAA,OAAO,MAAM;AACf,KAAC;AACH;AAEM,SAAU,UAAU,CAA6B,MAA8B,EAAA;IACnF,OAAO,UACL,MAAoD,EACpD,GAA2C,EAAA;QAE3C,GAAG,CAAC,cAAc,CAAC,YAAA;YACjB,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;AAChD,SAAC,CAAC;AACF,QAAA,OAAO,MAAM;AACf,KAAC;AACH;AAEa,MAAA,cAAc,GAA+B,CAAC,eAAuB,KAAW;AAC3F,IAAA,OAAO,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;AACtF;;;;"}
|
package/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { encodingUtil } from '@algorandfoundation/puya-ts';
|
|
|
5
5
|
import { g as getArc4Selector, i as isContractProxy, a as getContractMethodAbiMetadata, c as copyAbiMetadatas, b as getContractAbiMetadata } from './abi-metadata-DQxZgdNW.js';
|
|
6
6
|
import { A as ApplicationTransaction, P as PaymentTransaction, K as KeyRegistrationTransaction, a as AssetConfigTransaction, b as AssetTransferTransaction, c as AssetFreezeTransaction, G as GlobalStateCls, B as BoxCls, d as BoxRefCls, e as BoxMapCls, L as LocalStateCls, f as createInnerTxn } from './inner-transactions-DtlfyO39.js';
|
|
7
7
|
import { t as toBytes, G as GlobalData, V as VoterData, B as BlockData, b as btoi } from './asset-params-C3dXxyBx.js';
|
|
8
|
-
import { C as Contract } from './contract-
|
|
8
|
+
import { C as Contract } from './contract-CfMCD1BK.js';
|
|
9
9
|
import { g as getGenericTypeInfo } from './runtime-helpers-LrUolgJg.js';
|
|
10
10
|
import { TransactionType } from '@algorandfoundation/algorand-typescript';
|
|
11
11
|
import { randomBytes } from 'crypto';
|
package/internal/arc4.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from '@algorandfoundation/algorand-typescript/arc4';
|
|
2
|
-
export { abimethod, Contract, methodSelector } from '../impl/contract';
|
|
2
|
+
export { abimethod, baremethod, Contract, methodSelector } from '../impl/contract';
|
package/internal/arc4.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from '@algorandfoundation/algorand-typescript/arc4';
|
|
2
|
-
export { C as Contract, a as abimethod, m as methodSelector } from '../contract-
|
|
2
|
+
export { C as Contract, a as abimethod, b as baremethod, m as methodSelector } from '../contract-CfMCD1BK.js';
|
|
3
3
|
import '@algorandfoundation/puya-ts';
|
|
4
4
|
import '../abi-metadata-DQxZgdNW.js';
|
|
5
5
|
import 'js-sha512';
|
package/internal/index.mjs
CHANGED
|
@@ -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-
|
|
5
|
+
export { C as Contract, a as abimethod } 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';
|
|
@@ -10,7 +10,7 @@ import { s as submitGroup, p as payment, k as keyRegistration, g as assetConfig,
|
|
|
10
10
|
export { l as Box, m as BoxMap, n as BoxRef, o as GlobalState, q as LocalState } from '../inner-transactions-DtlfyO39.js';
|
|
11
11
|
import { T as Transaction, P as PaymentTxn, K as KeyRegistrationTxn, A as AssetConfigTxn, a as AssetTransferTxn, b as AssetFreezeTxn, c as ApplicationTxn } from '../op-BOlMlQF4.js';
|
|
12
12
|
export { d as Txn, o as op } from '../op-BOlMlQF4.js';
|
|
13
|
-
export { a as arc4 } from '../arc4-
|
|
13
|
+
export { a as arc4 } from '../arc4-DYS8O84x.js';
|
|
14
14
|
import '@algorandfoundation/puya-ts';
|
|
15
15
|
import 'assert';
|
|
16
16
|
import 'js-sha512';
|
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.
|
|
7
|
+
"version": "1.0.0-beta.23",
|
|
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": {
|
package/arc4-Dgs99Kjo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arc4-Dgs99Kjo.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|