@aztec/end-to-end 0.0.1-commit.e558bd1c → 0.0.1-commit.e57c76e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/README.md +27 -0
  2. package/dest/bench/client_flows/benchmark.d.ts +15 -1
  3. package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
  4. package/dest/bench/client_flows/benchmark.js +17 -0
  5. package/dest/bench/client_flows/client_flows_benchmark.d.ts +3 -3
  6. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  7. package/dest/bench/client_flows/client_flows_benchmark.js +36 -39
  8. package/dest/bench/client_flows/config.d.ts +2 -2
  9. package/dest/bench/client_flows/config.d.ts.map +1 -1
  10. package/dest/bench/client_flows/config.js +18 -0
  11. package/dest/bench/utils.d.ts +1 -1
  12. package/dest/bench/utils.d.ts.map +1 -1
  13. package/dest/bench/utils.js +8 -3
  14. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +8 -5
  15. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
  16. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +36 -17
  17. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +16 -5
  18. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  19. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +39 -7
  20. package/dest/e2e_deploy_contract/deploy_test.d.ts +4 -4
  21. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
  22. package/dest/e2e_deploy_contract/deploy_test.js +2 -1
  23. package/dest/e2e_epochs/epochs_test.d.ts +33 -8
  24. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  25. package/dest/e2e_epochs/epochs_test.js +143 -44
  26. package/dest/e2e_fees/fees_test.d.ts +6 -3
  27. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  28. package/dest/e2e_fees/fees_test.js +50 -17
  29. package/dest/e2e_nested_contract/nested_contract_test.d.ts +3 -3
  30. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  31. package/dest/e2e_nested_contract/nested_contract_test.js +6 -7
  32. package/dest/e2e_p2p/inactivity_slash_test.d.ts +1 -1
  33. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
  34. package/dest/e2e_p2p/inactivity_slash_test.js +4 -3
  35. package/dest/e2e_p2p/p2p_network.d.ts +14 -12
  36. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  37. package/dest/e2e_p2p/p2p_network.js +70 -34
  38. package/dest/e2e_p2p/reqresp/utils.d.ts +3 -3
  39. package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -1
  40. package/dest/e2e_p2p/reqresp/utils.js +67 -14
  41. package/dest/e2e_p2p/shared.d.ts +37 -8
  42. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  43. package/dest/e2e_p2p/shared.js +88 -51
  44. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts +2 -0
  45. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts.map +1 -0
  46. package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.js +184 -0
  47. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts +18 -0
  48. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts.map +1 -0
  49. package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.js +120 -0
  50. package/dest/e2e_token_contract/token_contract_test.d.ts +6 -4
  51. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  52. package/dest/e2e_token_contract/token_contract_test.js +23 -11
  53. package/dest/fixtures/authwit_proxy.d.ts +15 -0
  54. package/dest/fixtures/authwit_proxy.d.ts.map +1 -0
  55. package/dest/fixtures/authwit_proxy.js +34 -0
  56. package/dest/fixtures/e2e_prover_test.d.ts +9 -8
  57. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  58. package/dest/fixtures/e2e_prover_test.js +39 -50
  59. package/dest/fixtures/elu_monitor.d.ts +21 -0
  60. package/dest/fixtures/elu_monitor.d.ts.map +1 -0
  61. package/dest/fixtures/elu_monitor.js +102 -0
  62. package/dest/fixtures/fixtures.d.ts +74 -1
  63. package/dest/fixtures/fixtures.d.ts.map +1 -1
  64. package/dest/fixtures/fixtures.js +71 -0
  65. package/dest/fixtures/get_bb_config.d.ts +1 -1
  66. package/dest/fixtures/get_bb_config.d.ts.map +1 -1
  67. package/dest/fixtures/get_bb_config.js +5 -5
  68. package/dest/fixtures/ha_setup.d.ts +2 -2
  69. package/dest/fixtures/ha_setup.d.ts.map +1 -1
  70. package/dest/fixtures/ha_setup.js +4 -2
  71. package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts +25 -0
  72. package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts.map +1 -0
  73. package/dest/fixtures/schnorr_hardcoded_account_contract.js +37 -0
  74. package/dest/fixtures/setup.d.ts +86 -32
  75. package/dest/fixtures/setup.d.ts.map +1 -1
  76. package/dest/fixtures/setup.js +209 -169
  77. package/dest/fixtures/setup_p2p_test.d.ts +14 -7
  78. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  79. package/dest/fixtures/setup_p2p_test.js +18 -15
  80. package/dest/fixtures/token_utils.d.ts +2 -2
  81. package/dest/fixtures/token_utils.d.ts.map +1 -1
  82. package/dest/fixtures/token_utils.js +5 -7
  83. package/dest/fixtures/utils.d.ts +2 -2
  84. package/dest/fixtures/utils.d.ts.map +1 -1
  85. package/dest/fixtures/utils.js +1 -1
  86. package/dest/forward-compatibility/wallet_rpc_client.d.ts +7 -0
  87. package/dest/forward-compatibility/wallet_rpc_client.d.ts.map +1 -0
  88. package/dest/forward-compatibility/wallet_rpc_client.js +15 -0
  89. package/dest/forward-compatibility/wallet_service.d.ts +3 -0
  90. package/dest/forward-compatibility/wallet_service.d.ts.map +1 -0
  91. package/dest/forward-compatibility/wallet_service.js +109 -0
  92. package/dest/install_legacy_contracts.d.cts +10 -0
  93. package/dest/install_legacy_contracts.d.cts.map +1 -0
  94. package/dest/legacy-jest-resolver.d.cts +3 -0
  95. package/dest/legacy-jest-resolver.d.cts.map +1 -0
  96. package/dest/shared/cross_chain_test_harness.d.ts +4 -2
  97. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  98. package/dest/shared/cross_chain_test_harness.js +22 -18
  99. package/dest/shared/gas_portal_test_harness.d.ts +8 -5
  100. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  101. package/dest/shared/gas_portal_test_harness.js +19 -10
  102. package/dest/shared/index.d.ts +2 -1
  103. package/dest/shared/index.d.ts.map +1 -1
  104. package/dest/shared/index.js +1 -0
  105. package/dest/shared/jest_setup.js +41 -1
  106. package/dest/shared/mock_state_view.d.ts +86 -0
  107. package/dest/shared/mock_state_view.d.ts.map +1 -0
  108. package/dest/shared/mock_state_view.js +186 -0
  109. package/dest/shared/submit-transactions.d.ts +2 -2
  110. package/dest/shared/submit-transactions.d.ts.map +1 -1
  111. package/dest/shared/submit-transactions.js +1 -1
  112. package/dest/shared/uniswap_l1_l2.d.ts +1 -1
  113. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  114. package/dest/shared/uniswap_l1_l2.js +56 -41
  115. package/dest/shared/wait_for_l1_to_l2_message.d.ts +13 -0
  116. package/dest/shared/wait_for_l1_to_l2_message.d.ts.map +1 -0
  117. package/dest/shared/wait_for_l1_to_l2_message.js +10 -0
  118. package/dest/simulators/lending_simulator.d.ts +10 -3
  119. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  120. package/dest/simulators/lending_simulator.js +26 -14
  121. package/dest/simulators/token_simulator.d.ts +1 -1
  122. package/dest/simulators/token_simulator.d.ts.map +1 -1
  123. package/dest/simulators/token_simulator.js +3 -24
  124. package/dest/spartan/setup_test_wallets.d.ts +12 -3
  125. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  126. package/dest/spartan/setup_test_wallets.js +108 -41
  127. package/dest/spartan/tx_metrics.d.ts +18 -4
  128. package/dest/spartan/tx_metrics.d.ts.map +1 -1
  129. package/dest/spartan/tx_metrics.js +74 -21
  130. package/dest/spartan/utils/bot.d.ts +3 -2
  131. package/dest/spartan/utils/bot.d.ts.map +1 -1
  132. package/dest/spartan/utils/bot.js +2 -1
  133. package/dest/spartan/utils/config.d.ts +10 -30
  134. package/dest/spartan/utils/config.d.ts.map +1 -1
  135. package/dest/spartan/utils/config.js +3 -1
  136. package/dest/spartan/utils/index.d.ts +4 -2
  137. package/dest/spartan/utils/index.d.ts.map +1 -1
  138. package/dest/spartan/utils/index.js +5 -1
  139. package/dest/spartan/utils/k8s.d.ts +3 -1
  140. package/dest/spartan/utils/k8s.d.ts.map +1 -1
  141. package/dest/spartan/utils/k8s.js +6 -0
  142. package/dest/spartan/utils/nodes.d.ts +4 -5
  143. package/dest/spartan/utils/nodes.d.ts.map +1 -1
  144. package/dest/spartan/utils/nodes.js +11 -11
  145. package/dest/spartan/utils/pod_logs.d.ts +25 -0
  146. package/dest/spartan/utils/pod_logs.d.ts.map +1 -0
  147. package/dest/spartan/utils/pod_logs.js +74 -0
  148. package/dest/test-wallet/test_wallet.d.ts +85 -0
  149. package/dest/test-wallet/test_wallet.d.ts.map +1 -0
  150. package/dest/test-wallet/test_wallet.js +273 -0
  151. package/dest/test-wallet/utils.d.ts +41 -0
  152. package/dest/test-wallet/utils.d.ts.map +1 -0
  153. package/dest/test-wallet/utils.js +66 -0
  154. package/dest/test-wallet/wallet_worker_script.d.ts +2 -0
  155. package/dest/test-wallet/wallet_worker_script.d.ts.map +1 -0
  156. package/dest/test-wallet/wallet_worker_script.js +53 -0
  157. package/dest/test-wallet/worker_wallet.d.ts +53 -0
  158. package/dest/test-wallet/worker_wallet.d.ts.map +1 -0
  159. package/dest/test-wallet/worker_wallet.js +155 -0
  160. package/dest/test-wallet/worker_wallet_schema.d.ts +160 -0
  161. package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -0
  162. package/dest/test-wallet/worker_wallet_schema.js +22 -0
  163. package/package.json +49 -45
  164. package/src/bench/client_flows/benchmark.ts +19 -0
  165. package/src/bench/client_flows/client_flows_benchmark.ts +64 -49
  166. package/src/bench/client_flows/config.ts +9 -1
  167. package/src/bench/utils.ts +10 -4
  168. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +52 -25
  169. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +53 -15
  170. package/src/e2e_deploy_contract/deploy_test.ts +6 -5
  171. package/src/e2e_epochs/epochs_test.ts +166 -68
  172. package/src/e2e_fees/bridging_race.notest.ts +1 -1
  173. package/src/e2e_fees/fees_test.ts +57 -32
  174. package/src/e2e_nested_contract/nested_contract_test.ts +10 -6
  175. package/src/e2e_p2p/inactivity_slash_test.ts +8 -7
  176. package/src/e2e_p2p/p2p_network.ts +93 -49
  177. package/src/e2e_p2p/reqresp/utils.ts +84 -17
  178. package/src/e2e_p2p/shared.ts +108 -65
  179. package/src/e2e_storage_proof/fixtures/storage_proof.json +915 -0
  180. package/src/e2e_storage_proof/fixtures/storage_proof_fetcher.ts +190 -0
  181. package/src/e2e_storage_proof/fixtures/storage_proof_fixture.ts +173 -0
  182. package/src/e2e_token_contract/token_contract_test.ts +38 -11
  183. package/src/fixtures/authwit_proxy.ts +54 -0
  184. package/src/fixtures/dumps/epoch_proof_result.json +1 -1
  185. package/src/fixtures/e2e_prover_test.ts +49 -56
  186. package/src/fixtures/elu_monitor.ts +126 -0
  187. package/src/fixtures/fixtures.ts +93 -0
  188. package/src/fixtures/get_bb_config.ts +7 -6
  189. package/src/fixtures/ha_setup.ts +7 -3
  190. package/src/fixtures/schnorr_hardcoded_account_contract.ts +49 -0
  191. package/src/fixtures/setup.ts +272 -233
  192. package/src/fixtures/setup_p2p_test.ts +21 -25
  193. package/src/fixtures/token_utils.ts +3 -3
  194. package/src/fixtures/utils.ts +2 -0
  195. package/src/forward-compatibility/wallet_rpc_client.ts +14 -0
  196. package/src/forward-compatibility/wallet_service.ts +104 -0
  197. package/src/guides/up_quick_start.sh +3 -5
  198. package/src/install_legacy_contracts.cjs +75 -0
  199. package/src/legacy-jest-resolver.cjs +112 -0
  200. package/src/shared/cross_chain_test_harness.ts +27 -13
  201. package/src/shared/gas_portal_test_harness.ts +21 -11
  202. package/src/shared/index.ts +1 -0
  203. package/src/shared/jest_setup.ts +51 -1
  204. package/src/shared/mock_state_view.ts +188 -0
  205. package/src/shared/submit-transactions.ts +3 -2
  206. package/src/shared/uniswap_l1_l2.ts +104 -53
  207. package/src/shared/wait_for_l1_to_l2_message.ts +23 -0
  208. package/src/simulators/lending_simulator.ts +32 -14
  209. package/src/simulators/token_simulator.ts +6 -30
  210. package/src/spartan/setup_test_wallets.ts +146 -35
  211. package/src/spartan/tx_metrics.ts +82 -24
  212. package/src/spartan/utils/bot.ts +4 -1
  213. package/src/spartan/utils/config.ts +2 -0
  214. package/src/spartan/utils/index.ts +7 -0
  215. package/src/spartan/utils/k8s.ts +8 -0
  216. package/src/spartan/utils/nodes.ts +17 -12
  217. package/src/spartan/utils/pod_logs.ts +99 -0
  218. package/src/test-wallet/test_wallet.ts +376 -0
  219. package/src/test-wallet/utils.ts +108 -0
  220. package/src/test-wallet/wallet_worker_script.ts +63 -0
  221. package/src/test-wallet/worker_wallet.ts +218 -0
  222. package/src/test-wallet/worker_wallet_schema.ts +13 -0
@@ -0,0 +1,155 @@
1
+ import { jsonStringify } from '@aztec/foundation/json-rpc';
2
+ import { createLogger } from '@aztec/foundation/log';
3
+ import { promiseWithResolvers } from '@aztec/foundation/promise';
4
+ import { getSchemaReturnType } from '@aztec/foundation/schemas';
5
+ import { sleep } from '@aztec/foundation/sleep';
6
+ import { NodeConnector, TransportClient } from '@aztec/foundation/transport';
7
+ import { Worker } from 'worker_threads';
8
+ import { WorkerWalletSchema } from './worker_wallet_schema.js';
9
+ const log = createLogger('e2e:test-wallet:worker-wallet');
10
+ const WORKER_READY_TIMEOUT_MS = 120_000;
11
+ /**
12
+ * Wallet implementation that offloads all work to a worker thread.
13
+ * Implements the Wallet interface by proxying calls over a transport layer
14
+ * using JSON serialization with Zod schema parsing on both ends.
15
+ */ export class WorkerWallet {
16
+ worker;
17
+ client;
18
+ constructor(worker, client){
19
+ this.worker = worker;
20
+ this.client = client;
21
+ }
22
+ /**
23
+ * Creates a WorkerWallet by spawning a worker thread that creates a TestWallet internally.
24
+ * @param nodeUrl - URL of the Aztec node to connect to.
25
+ * @param pxeConfig - Optional PXE configuration overrides.
26
+ * @returns A WorkerWallet ready to use.
27
+ */ static async create(nodeUrl, pxeConfig) {
28
+ // replace stc/ with dest/ so the wallet works in Jest tests
29
+ const workerUrl = new URL('./wallet_worker_script.js', import.meta.url);
30
+ workerUrl.pathname = workerUrl.pathname.replace('/src/', '/dest/');
31
+ // remove JEST_WORKER_ID so the worker uses pino-pretty transport instead of Jest's raw output.
32
+ const { JEST_WORKER_ID: _, ...parentEnv } = process.env;
33
+ const worker = new Worker(workerUrl, {
34
+ workerData: {
35
+ nodeUrl,
36
+ pxeConfig
37
+ },
38
+ env: {
39
+ ...parentEnv,
40
+ ...process.stderr.isTTY || process.env.FORCE_COLOR ? {
41
+ FORCE_COLOR: '1'
42
+ } : {},
43
+ LOG_LEVEL: process.env.WORKER_LOG_LEVEL ?? 'info'
44
+ }
45
+ });
46
+ const connector = new NodeConnector(worker);
47
+ const client = new TransportClient(connector);
48
+ await client.open();
49
+ const wallet = new WorkerWallet(worker, client);
50
+ const { promise: workerDied, reject: rejectWorkerDied } = promiseWithResolvers();
51
+ // reject if the worker exits or errors before the warmup completes.
52
+ const onError = (err)=>{
53
+ worker.off('exit', onExit);
54
+ rejectWorkerDied(new Error(`Worker wallet thread error: ${err.message}`));
55
+ };
56
+ const onExit = (code)=>{
57
+ worker.off('error', onError);
58
+ rejectWorkerDied(new Error(`Worker wallet thread exited with code ${code} before becoming ready`));
59
+ };
60
+ worker.once('error', onError);
61
+ worker.once('exit', onExit);
62
+ const timeout = sleep(WORKER_READY_TIMEOUT_MS).then(()=>{
63
+ throw new Error(`Worker wallet creation timed out after ${WORKER_READY_TIMEOUT_MS / 1000}s`);
64
+ });
65
+ try {
66
+ // wait for worker wallet to start
67
+ await Promise.race([
68
+ wallet.getChainInfo(),
69
+ workerDied,
70
+ timeout
71
+ ]);
72
+ } catch (err) {
73
+ log.error('Worker wallet creation failed, cleaning up', {
74
+ error: String(err)
75
+ });
76
+ client.close();
77
+ await worker.terminate();
78
+ throw err;
79
+ } finally{
80
+ worker.off('error', onError);
81
+ worker.off('exit', onExit);
82
+ }
83
+ return wallet;
84
+ }
85
+ async callRaw(fn, ...args) {
86
+ const argsJson = jsonStringify(args);
87
+ return await this.client.request({
88
+ fn,
89
+ args: argsJson
90
+ });
91
+ }
92
+ async call(fn, ...args) {
93
+ const resultJson = await this.callRaw(fn, ...args);
94
+ const methodSchema = WorkerWalletSchema[fn];
95
+ return getSchemaReturnType(methodSchema).parseAsync(JSON.parse(resultJson));
96
+ }
97
+ getChainInfo() {
98
+ return this.call('getChainInfo');
99
+ }
100
+ getContractMetadata(address) {
101
+ return this.call('getContractMetadata', address);
102
+ }
103
+ getContractClassMetadata(id) {
104
+ return this.call('getContractClassMetadata', id);
105
+ }
106
+ getPrivateEvents(eventMetadata, eventFilter) {
107
+ return this.call('getPrivateEvents', eventMetadata, eventFilter);
108
+ }
109
+ registerSender(address, alias) {
110
+ return this.call('registerSender', address, alias);
111
+ }
112
+ getAddressBook() {
113
+ return this.call('getAddressBook');
114
+ }
115
+ getAccounts() {
116
+ return this.call('getAccounts');
117
+ }
118
+ registerContract(instance, artifact, secretKey) {
119
+ return this.call('registerContract', instance, artifact, secretKey);
120
+ }
121
+ registerContractClass(artifact) {
122
+ return this.call('registerContractClass', artifact);
123
+ }
124
+ simulateTx(exec, opts) {
125
+ return this.call('simulateTx', exec, opts);
126
+ }
127
+ executeUtility(call, opts) {
128
+ return this.call('executeUtility', call, opts);
129
+ }
130
+ profileTx(exec, opts) {
131
+ return this.call('profileTx', exec, opts);
132
+ }
133
+ sendTx(exec, opts) {
134
+ return this.call('sendTx', exec, opts);
135
+ }
136
+ proveTx(exec, opts) {
137
+ return this.call('proveTx', exec, opts);
138
+ }
139
+ /** Registers an account inside the worker's TestWallet, populating its accounts map. */ registerAccount(secret, salt) {
140
+ return this.call('registerAccount', secret, salt);
141
+ }
142
+ createAuthWit(from, messageHashOrIntent) {
143
+ return this.call('createAuthWit', from, messageHashOrIntent);
144
+ }
145
+ requestCapabilities(manifest) {
146
+ return this.call('requestCapabilities', manifest);
147
+ }
148
+ batch(methods) {
149
+ return this.call('batch', methods);
150
+ }
151
+ /** Shuts down the worker thread and closes the transport. */ async stop() {
152
+ this.client.close();
153
+ await this.worker.terminate();
154
+ }
155
+ }
@@ -0,0 +1,160 @@
1
+ import { AztecAddress } from '@aztec/stdlib/aztec-address';
2
+ import { Tx } from '@aztec/stdlib/tx';
3
+ import { z } from 'zod';
4
+ /** Schema for the WorkerWallet API — extends WalletSchema with proveTx and registerAccount. */
5
+ export declare const WorkerWalletSchema: {
6
+ getPrivateEvents: z.ZodFunction<z.ZodTuple<[eventMetadata: z.ZodType<import("@aztec/stdlib/abi").EventMetadataDefinition, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/abi").EventMetadataDefinition, any>>, eventFilter: z.ZodType<import("@aztec/aztec.js/wallet").PrivateEventFilter, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").PrivateEventFilter, any>>], null>, z.ZodType<import("@aztec/aztec.js/wallet").PrivateEvent<unknown>[], any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").PrivateEvent<unknown>[], any>>>;
7
+ getChainInfo: z.ZodFunction<z.ZodTuple<[], null>, z.ZodType<import("@aztec/entrypoints/interfaces").ChainInfo, any, z.core.$ZodTypeInternals<import("@aztec/entrypoints/interfaces").ChainInfo, any>>>;
8
+ getContractMetadata: z.ZodFunction<z.ZodTuple<[address: z.ZodType<AztecAddress, any, z.core.$ZodTypeInternals<AztecAddress, any>>], null>, z.ZodType<import("@aztec/aztec.js/wallet").ContractMetadata, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").ContractMetadata, any>>>;
9
+ getContractClassMetadata: z.ZodFunction<z.ZodTuple<[id: z.ZodType<import("@aztec/foundation/schemas").Fr, any, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, any>>], null>, z.ZodType<import("@aztec/aztec.js/wallet").ContractClassMetadata, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").ContractClassMetadata, any>>>;
10
+ registerSender: z.ZodFunction<z.ZodTuple<[address: z.ZodType<AztecAddress, any, z.core.$ZodTypeInternals<AztecAddress, any>>, alias: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodType<string | undefined, any, z.core.$ZodTypeInternals<string | undefined, any>>>], null>, z.ZodType<AztecAddress, any, z.core.$ZodTypeInternals<AztecAddress, any>>>;
11
+ getAddressBook: z.ZodFunction<z.ZodTuple<[], null>, z.ZodType<import("@aztec/aztec.js/wallet").Aliased<AztecAddress>[], any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").Aliased<AztecAddress>[], any>>>;
12
+ getAccounts: z.ZodFunction<z.ZodTuple<[], null>, z.ZodType<import("@aztec/aztec.js/wallet").Aliased<AztecAddress>[], any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").Aliased<AztecAddress>[], any>>>;
13
+ registerContract: z.ZodFunction<z.ZodTuple<[instance: z.ZodType<import("@aztec/stdlib/contract").ContractInstanceWithAddress, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/contract").ContractInstanceWithAddress, any>>, artifact: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodType<import("@aztec/stdlib/abi").ContractArtifact | undefined, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/abi").ContractArtifact | undefined, any>>>, secretKey: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodType<import("@aztec/foundation/schemas").Fr | undefined, any, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr | undefined, any>>>], null>, z.ZodType<import("@aztec/stdlib/contract").ContractInstanceWithAddress, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/contract").ContractInstanceWithAddress, any>>>;
14
+ registerContractClass: z.ZodFunction<z.ZodTuple<[artifact: z.ZodType<import("@aztec/stdlib/abi").ContractArtifact, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/abi").ContractArtifact, any>>], null>, z.ZodType<void, any, z.core.$ZodTypeInternals<void, any>>>;
15
+ simulateTx: z.ZodFunction<z.ZodTuple<[exec: z.ZodType<import("@aztec/stdlib/tx").ExecutionPayload, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").ExecutionPayload, any>>, opts: z.ZodType<import("@aztec/aztec.js/wallet").SimulateOptions, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").SimulateOptions, any>>], null>, z.ZodType<import("@aztec/aztec.js/wallet").TxSimulationResultWithAppOffset, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").TxSimulationResultWithAppOffset, any>>>;
16
+ executeUtility: z.ZodFunction<z.ZodTuple<[call: z.ZodType<import("@aztec/stdlib/abi").FunctionCall, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/abi").FunctionCall, any>>, opts: z.ZodType<import("@aztec/aztec.js/wallet").ExecuteUtilityOptions, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").ExecuteUtilityOptions, any>>], null>, z.ZodType<import("@aztec/stdlib/tx").UtilityExecutionResult, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").UtilityExecutionResult, any>>>;
17
+ profileTx: z.ZodFunction<z.ZodTuple<[exec: z.ZodType<import("@aztec/stdlib/tx").ExecutionPayload, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").ExecutionPayload, any>>, opts: z.ZodType<import("@aztec/aztec.js/wallet").ProfileOptions, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").ProfileOptions, any>>], null>, z.ZodType<import("@aztec/stdlib/tx").TxProfileResult, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").TxProfileResult, any>>>;
18
+ sendTx: z.ZodFunction<z.ZodTuple<[exec: z.ZodType<import("@aztec/stdlib/tx").ExecutionPayload, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").ExecutionPayload, any>>, opts: z.ZodType<import("@aztec/aztec.js/wallet").SendOptions<import("@aztec/aztec.js/contracts").InteractionWaitOptions>, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").SendOptions<import("@aztec/aztec.js/contracts").InteractionWaitOptions>, any>>], null>, z.ZodType<import("@aztec/aztec.js/contracts").TxSendResultImmediate | import("@aztec/aztec.js/contracts").TxSendResultMined<import("@aztec/stdlib/tx").TxReceipt>, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/contracts").TxSendResultImmediate | import("@aztec/aztec.js/contracts").TxSendResultMined<import("@aztec/stdlib/tx").TxReceipt>, any>>>;
19
+ createAuthWit: z.ZodFunction<z.ZodTuple<[from: z.ZodType<AztecAddress, any, z.core.$ZodTypeInternals<AztecAddress, any>>, messageHashOrIntent: z.ZodType<import("@aztec/aztec.js/authorization").CallIntent | import("@aztec/aztec.js/authorization").IntentInnerHash, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/authorization").CallIntent | import("@aztec/aztec.js/authorization").IntentInnerHash, any>>], null>, z.ZodType<import("@aztec/stdlib/auth-witness").AuthWitness, any, z.core.$ZodTypeInternals<import("@aztec/stdlib/auth-witness").AuthWitness, any>>>;
20
+ requestCapabilities: z.ZodFunction<z.ZodTuple<[manifest: z.ZodType<import("@aztec/aztec.js/wallet").AppCapabilities, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").AppCapabilities, any>>], null>, z.ZodType<import("@aztec/aztec.js/wallet").WalletCapabilities, any, z.core.$ZodTypeInternals<import("@aztec/aztec.js/wallet").WalletCapabilities, any>>>;
21
+ batch: z.ZodFunction<z.ZodTuple<[methods: z.ZodType<readonly import("@aztec/aztec.js/wallet").BatchedMethod[], any, z.core.$ZodTypeInternals<readonly import("@aztec/aztec.js/wallet").BatchedMethod[], any>>], null>, z.ZodType<readonly import("@aztec/aztec.js/wallet").BatchedMethodResultWrapper<import("@aztec/aztec.js/wallet").BatchedMethod>[], any, z.core.$ZodTypeInternals<readonly import("@aztec/aztec.js/wallet").BatchedMethodResultWrapper<import("@aztec/aztec.js/wallet").BatchedMethod>[], any>>>;
22
+ proveTx: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
23
+ calls: z.ZodArray<z.ZodPipe<z.ZodObject<{
24
+ name: z.ZodString;
25
+ to: import("@aztec/foundation/schemas").ZodFor<AztecAddress>;
26
+ selector: import("@aztec/foundation/schemas").ZodFor<import("@aztec/stdlib/abi").FunctionSelector>;
27
+ type: z.ZodEnum<typeof import("@aztec/stdlib/abi").FunctionType>;
28
+ isStatic: z.ZodBoolean;
29
+ hideMsgSender: z.ZodBoolean;
30
+ args: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
31
+ returnTypes: z.ZodArray<z.ZodType<import("@aztec/stdlib/abi").AbiType, unknown, z.core.$ZodTypeInternals<import("@aztec/stdlib/abi").AbiType, unknown>>>;
32
+ }, z.core.$strip>, z.ZodTransform<import("@aztec/stdlib/abi").FunctionCall, {
33
+ name: string;
34
+ to: AztecAddress;
35
+ selector: import("@aztec/stdlib/abi").FunctionSelector;
36
+ type: import("@aztec/stdlib/abi").FunctionType;
37
+ isStatic: boolean;
38
+ hideMsgSender: boolean;
39
+ args: import("@aztec/foundation/schemas").Fr[];
40
+ returnTypes: import("@aztec/stdlib/abi").AbiType[];
41
+ }>>>;
42
+ authWitnesses: z.ZodArray<z.ZodType<import("@aztec/stdlib/auth-witness").AuthWitness, string, z.core.$ZodTypeInternals<import("@aztec/stdlib/auth-witness").AuthWitness, string>>>;
43
+ capsules: z.ZodArray<z.ZodType<import("@aztec/stdlib/tx").Capsule, string, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").Capsule, string>>>;
44
+ extraHashedArgs: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/stdlib/tx").HashedValues>>;
45
+ feePayer: z.ZodPipe<z.ZodOptional<z.ZodNullable<import("@aztec/foundation/schemas").ZodFor<AztecAddress>>>, z.ZodTransform<AztecAddress | undefined, AztecAddress | null | undefined>>;
46
+ }, z.core.$strip>, z.ZodObject<{
47
+ from: z.ZodUnion<readonly [import("@aztec/foundation/schemas").ZodFor<AztecAddress>, z.ZodLiteral<"NO_FROM">]>;
48
+ authWitnesses: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodType<import("@aztec/stdlib/auth-witness").AuthWitness, string, z.core.$ZodTypeInternals<import("@aztec/stdlib/auth-witness").AuthWitness, string>>>>>, z.ZodTransform<import("@aztec/stdlib/auth-witness").AuthWitness[] | undefined, import("@aztec/stdlib/auth-witness").AuthWitness[] | null | undefined>>;
49
+ capsules: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodType<import("@aztec/stdlib/tx").Capsule, string, z.core.$ZodTypeInternals<import("@aztec/stdlib/tx").Capsule, string>>>>>, z.ZodTransform<import("@aztec/stdlib/tx").Capsule[] | undefined, import("@aztec/stdlib/tx").Capsule[] | null | undefined>>;
50
+ fee: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
51
+ gasSettings: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
52
+ gasLimits: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
53
+ daGas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedNumber<string | number | bigint>>;
54
+ l2Gas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedNumber<string | number | bigint>>;
55
+ }, z.core.$strip>, z.ZodTransform<import("@aztec/stdlib/gas").Gas, {
56
+ daGas: number;
57
+ l2Gas: number;
58
+ }>>>>, z.ZodTransform<import("@aztec/stdlib/gas").Gas | undefined, import("@aztec/stdlib/gas").Gas | null | undefined>>;
59
+ teardownGasLimits: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
60
+ daGas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedNumber<string | number | bigint>>;
61
+ l2Gas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedNumber<string | number | bigint>>;
62
+ }, z.core.$strip>, z.ZodTransform<import("@aztec/stdlib/gas").Gas, {
63
+ daGas: number;
64
+ l2Gas: number;
65
+ }>>>>, z.ZodTransform<import("@aztec/stdlib/gas").Gas | undefined, import("@aztec/stdlib/gas").Gas | null | undefined>>;
66
+ maxFeePerGas: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
67
+ feePerDaGas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
68
+ feePerL2Gas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
69
+ }, z.core.$strip>>>, z.ZodTransform<{
70
+ feePerDaGas: bigint;
71
+ feePerL2Gas: bigint;
72
+ } | undefined, {
73
+ feePerDaGas: bigint;
74
+ feePerL2Gas: bigint;
75
+ } | null | undefined>>;
76
+ maxPriorityFeePerGas: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
77
+ feePerDaGas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
78
+ feePerL2Gas: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
79
+ }, z.core.$strip>>>, z.ZodTransform<{
80
+ feePerDaGas: bigint;
81
+ feePerL2Gas: bigint;
82
+ } | undefined, {
83
+ feePerDaGas: bigint;
84
+ feePerL2Gas: bigint;
85
+ } | null | undefined>>;
86
+ }, z.core.$strip>>>, z.ZodTransform<{
87
+ gasLimits: import("@aztec/stdlib/gas").Gas | undefined;
88
+ teardownGasLimits: import("@aztec/stdlib/gas").Gas | undefined;
89
+ maxFeePerGas: {
90
+ feePerDaGas: bigint;
91
+ feePerL2Gas: bigint;
92
+ } | undefined;
93
+ maxPriorityFeePerGas: {
94
+ feePerDaGas: bigint;
95
+ feePerL2Gas: bigint;
96
+ } | undefined;
97
+ } | undefined, {
98
+ gasLimits: import("@aztec/stdlib/gas").Gas | undefined;
99
+ teardownGasLimits: import("@aztec/stdlib/gas").Gas | undefined;
100
+ maxFeePerGas: {
101
+ feePerDaGas: bigint;
102
+ feePerL2Gas: bigint;
103
+ } | undefined;
104
+ maxPriorityFeePerGas: {
105
+ feePerDaGas: bigint;
106
+ feePerL2Gas: bigint;
107
+ } | undefined;
108
+ } | null | undefined>>;
109
+ congestionEstimate: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("@aztec/stdlib/gas").ManaUsageEstimate>>>, z.ZodTransform<import("@aztec/stdlib/gas").ManaUsageEstimate | undefined, import("@aztec/stdlib/gas").ManaUsageEstimate | null | undefined>>;
110
+ }, z.core.$strip>>>, z.ZodTransform<{
111
+ gasSettings: {
112
+ gasLimits: import("@aztec/stdlib/gas").Gas | undefined;
113
+ teardownGasLimits: import("@aztec/stdlib/gas").Gas | undefined;
114
+ maxFeePerGas: {
115
+ feePerDaGas: bigint;
116
+ feePerL2Gas: bigint;
117
+ } | undefined;
118
+ maxPriorityFeePerGas: {
119
+ feePerDaGas: bigint;
120
+ feePerL2Gas: bigint;
121
+ } | undefined;
122
+ } | undefined;
123
+ congestionEstimate: import("@aztec/stdlib/gas").ManaUsageEstimate | undefined;
124
+ } | undefined, {
125
+ gasSettings: {
126
+ gasLimits: import("@aztec/stdlib/gas").Gas | undefined;
127
+ teardownGasLimits: import("@aztec/stdlib/gas").Gas | undefined;
128
+ maxFeePerGas: {
129
+ feePerDaGas: bigint;
130
+ feePerL2Gas: bigint;
131
+ } | undefined;
132
+ maxPriorityFeePerGas: {
133
+ feePerDaGas: bigint;
134
+ feePerL2Gas: bigint;
135
+ } | undefined;
136
+ } | undefined;
137
+ congestionEstimate: import("@aztec/stdlib/gas").ManaUsageEstimate | undefined;
138
+ } | null | undefined>>;
139
+ wait: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"NO_WAIT">, z.ZodObject<{
140
+ ignoreDroppedReceiptsFor: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodTransform<number | undefined, number | null | undefined>>;
141
+ timeout: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodTransform<number | undefined, number | null | undefined>>;
142
+ interval: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodTransform<number | undefined, number | null | undefined>>;
143
+ dontThrowOnRevert: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean | undefined, boolean | null | undefined>>;
144
+ }, z.core.$strip>]>>>, z.ZodTransform<NonNullable<"NO_WAIT" | {
145
+ ignoreDroppedReceiptsFor: number | undefined;
146
+ timeout: number | undefined;
147
+ interval: number | undefined;
148
+ dontThrowOnRevert: boolean | undefined;
149
+ }> | undefined, "NO_WAIT" | {
150
+ ignoreDroppedReceiptsFor: number | undefined;
151
+ timeout: number | undefined;
152
+ interval: number | undefined;
153
+ dontThrowOnRevert: boolean | undefined;
154
+ } | null | undefined>>;
155
+ additionalScopes: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<import("@aztec/foundation/schemas").ZodFor<AztecAddress>>>>, z.ZodTransform<AztecAddress[] | undefined, AztecAddress[] | null | undefined>>;
156
+ sendMessagesAs: z.ZodPipe<z.ZodOptional<z.ZodNullable<import("@aztec/foundation/schemas").ZodFor<AztecAddress>>>, z.ZodTransform<AztecAddress | undefined, AztecAddress | null | undefined>>;
157
+ }, z.core.$strip>], null>, import("@aztec/foundation/schemas").ZodFor<Tx>>;
158
+ registerAccount: z.ZodFunction<z.ZodTuple<[z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>, z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>], null>, import("@aztec/foundation/schemas").ZodFor<AztecAddress>>;
159
+ };
160
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyX3dhbGxldF9zY2hlbWEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90ZXN0LXdhbGxldC93b3JrZXJfd2FsbGV0X3NjaGVtYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDM0QsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRXRDLE9BQU8sRUFBRSxDQUFDLEVBQUUsTUFBTSxLQUFLLENBQUM7QUFFeEIsaUdBQStGO0FBQy9GLGVBQU8sTUFBTSxrQkFBa0I7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Q0FJOUIsQ0FBQyJ9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker_wallet_schema.d.ts","sourceRoot":"","sources":["../../src/test-wallet/worker_wallet_schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,iGAA+F;AAC/F,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI9B,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { ExecutionPayloadSchema, SendOptionsSchema, WalletSchema } from '@aztec/aztec.js/wallet';
2
+ import { schemas } from '@aztec/foundation/schemas';
3
+ import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
+ import { Tx } from '@aztec/stdlib/tx';
5
+ import { z } from 'zod';
6
+ /** Schema for the WorkerWallet API — extends WalletSchema with proveTx and registerAccount. */ export const WorkerWalletSchema = {
7
+ ...WalletSchema,
8
+ proveTx: z.function({
9
+ input: z.tuple([
10
+ ExecutionPayloadSchema,
11
+ SendOptionsSchema
12
+ ]),
13
+ output: Tx.schema
14
+ }),
15
+ registerAccount: z.function({
16
+ input: z.tuple([
17
+ schemas.Fr,
18
+ schemas.Fr
19
+ ]),
20
+ output: AztecAddress.schema
21
+ })
22
+ };
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@aztec/end-to-end",
3
- "version": "0.0.1-commit.e558bd1c",
3
+ "version": "0.0.1-commit.e57c76e",
4
4
  "type": "module",
5
- "exports": "./dest/index.js",
5
+ "exports": {
6
+ ".": "./dest/index.js",
7
+ "./*": "./dest/*"
8
+ },
6
9
  "inherits": [
7
10
  "../package.common.json",
8
11
  "./package.local.json"
@@ -12,12 +15,12 @@
12
15
  "build:dev": "../scripts/tsc.sh --watch",
13
16
  "clean": "rm -rf ./dest .tsbuildinfo",
14
17
  "test:with-alerts": "./scripts/test-with-alerts.sh",
15
- "test:e2e": "LOG_LEVEL=${LOG_LEVEL:-verbose} NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000 --forceExit",
18
+ "test:e2e": "LOG_LEVEL=${LOG_LEVEL:-verbose} NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000",
16
19
  "test:e2e-docker": "./scripts/run_test.sh simple",
17
20
  "test:e2e-no-docker": "echo 'The command test:e2e-no-docker is now the same as test:e2e. You can now run this dropping the no-docker suffix.'; yarn test:e2e",
18
- "test:profile": "LOG_LEVEL=${LOG_LEVEL:-verbose} NODE_NO_WARNINGS=1 0x --output-dir \"flame_graph/{pid}.0x\" -- node --experimental-vm-modules ../node_modules/jest/bin/jest.js --runInBand --testTimeout=300000 --forceExit",
21
+ "test:profile": "LOG_LEVEL=${LOG_LEVEL:-verbose} NODE_NO_WARNINGS=1 0x --output-dir \"flame_graph/{pid}.0x\" -- node --experimental-vm-modules ../node_modules/jest/bin/jest.js --runInBand --testTimeout=300000",
19
22
  "serve:flames": "python3 -m http.server --directory \"flame_graph\" 8000",
20
- "test:debug": "LOG_LEVEL=${LOG_LEVEL:-verbose} NODE_NO_WARNINGS=1 node --inspect --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000 --forceExit",
23
+ "test:debug": "LOG_LEVEL=${LOG_LEVEL:-verbose} NODE_NO_WARNINGS=1 node --inspect --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000",
21
24
  "test:integration": "concurrently -k -s first -c reset,dim -n test,anvil \"yarn test:integration:run\" \"anvil\"",
22
25
  "test:integration:run": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --no-cache --runInBand --config jest.integration.config.json",
23
26
  "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests src/fixtures",
@@ -26,44 +29,45 @@
26
29
  "formatting": "run -T prettier --check ./src && run -T eslint ./src"
27
30
  },
28
31
  "dependencies": {
29
- "@aztec/accounts": "0.0.1-commit.e558bd1c",
30
- "@aztec/archiver": "0.0.1-commit.e558bd1c",
31
- "@aztec/aztec": "0.0.1-commit.e558bd1c",
32
- "@aztec/aztec-node": "0.0.1-commit.e558bd1c",
33
- "@aztec/aztec.js": "0.0.1-commit.e558bd1c",
34
- "@aztec/bb-prover": "0.0.1-commit.e558bd1c",
35
- "@aztec/bb.js": "0.0.1-commit.e558bd1c",
36
- "@aztec/blob-client": "0.0.1-commit.e558bd1c",
37
- "@aztec/blob-lib": "0.0.1-commit.e558bd1c",
38
- "@aztec/bot": "0.0.1-commit.e558bd1c",
39
- "@aztec/cli": "0.0.1-commit.e558bd1c",
40
- "@aztec/constants": "0.0.1-commit.e558bd1c",
41
- "@aztec/entrypoints": "0.0.1-commit.e558bd1c",
42
- "@aztec/epoch-cache": "0.0.1-commit.e558bd1c",
43
- "@aztec/ethereum": "0.0.1-commit.e558bd1c",
44
- "@aztec/foundation": "0.0.1-commit.e558bd1c",
45
- "@aztec/kv-store": "0.0.1-commit.e558bd1c",
46
- "@aztec/l1-artifacts": "0.0.1-commit.e558bd1c",
47
- "@aztec/merkle-tree": "0.0.1-commit.e558bd1c",
48
- "@aztec/node-keystore": "0.0.1-commit.e558bd1c",
49
- "@aztec/noir-contracts.js": "0.0.1-commit.e558bd1c",
50
- "@aztec/noir-noirc_abi": "0.0.1-commit.e558bd1c",
51
- "@aztec/noir-protocol-circuits-types": "0.0.1-commit.e558bd1c",
52
- "@aztec/noir-test-contracts.js": "0.0.1-commit.e558bd1c",
53
- "@aztec/p2p": "0.0.1-commit.e558bd1c",
54
- "@aztec/protocol-contracts": "0.0.1-commit.e558bd1c",
55
- "@aztec/prover-client": "0.0.1-commit.e558bd1c",
56
- "@aztec/prover-node": "0.0.1-commit.e558bd1c",
57
- "@aztec/pxe": "0.0.1-commit.e558bd1c",
58
- "@aztec/sequencer-client": "0.0.1-commit.e558bd1c",
59
- "@aztec/simulator": "0.0.1-commit.e558bd1c",
60
- "@aztec/slasher": "0.0.1-commit.e558bd1c",
61
- "@aztec/stdlib": "0.0.1-commit.e558bd1c",
62
- "@aztec/telemetry-client": "0.0.1-commit.e558bd1c",
63
- "@aztec/test-wallet": "0.0.1-commit.e558bd1c",
64
- "@aztec/validator-client": "0.0.1-commit.e558bd1c",
65
- "@aztec/validator-ha-signer": "0.0.1-commit.e558bd1c",
66
- "@aztec/world-state": "0.0.1-commit.e558bd1c",
32
+ "@aztec/accounts": "0.0.1-commit.e57c76e",
33
+ "@aztec/archiver": "0.0.1-commit.e57c76e",
34
+ "@aztec/aztec": "0.0.1-commit.e57c76e",
35
+ "@aztec/aztec-node": "0.0.1-commit.e57c76e",
36
+ "@aztec/aztec.js": "0.0.1-commit.e57c76e",
37
+ "@aztec/bb-prover": "0.0.1-commit.e57c76e",
38
+ "@aztec/bb.js": "0.0.1-commit.e57c76e",
39
+ "@aztec/blob-client": "0.0.1-commit.e57c76e",
40
+ "@aztec/blob-lib": "0.0.1-commit.e57c76e",
41
+ "@aztec/bot": "0.0.1-commit.e57c76e",
42
+ "@aztec/cli": "0.0.1-commit.e57c76e",
43
+ "@aztec/constants": "0.0.1-commit.e57c76e",
44
+ "@aztec/entrypoints": "0.0.1-commit.e57c76e",
45
+ "@aztec/epoch-cache": "0.0.1-commit.e57c76e",
46
+ "@aztec/ethereum": "0.0.1-commit.e57c76e",
47
+ "@aztec/foundation": "0.0.1-commit.e57c76e",
48
+ "@aztec/kv-store": "0.0.1-commit.e57c76e",
49
+ "@aztec/l1-artifacts": "0.0.1-commit.e57c76e",
50
+ "@aztec/node-keystore": "0.0.1-commit.e57c76e",
51
+ "@aztec/noir-contracts.js": "0.0.1-commit.e57c76e",
52
+ "@aztec/noir-noirc_abi": "0.0.1-commit.e57c76e",
53
+ "@aztec/noir-protocol-circuits-types": "0.0.1-commit.e57c76e",
54
+ "@aztec/noir-test-contracts.js": "0.0.1-commit.e57c76e",
55
+ "@aztec/p2p": "0.0.1-commit.e57c76e",
56
+ "@aztec/protocol-contracts": "0.0.1-commit.e57c76e",
57
+ "@aztec/prover-client": "0.0.1-commit.e57c76e",
58
+ "@aztec/prover-node": "0.0.1-commit.e57c76e",
59
+ "@aztec/pxe": "0.0.1-commit.e57c76e",
60
+ "@aztec/sequencer-client": "0.0.1-commit.e57c76e",
61
+ "@aztec/simulator": "0.0.1-commit.e57c76e",
62
+ "@aztec/slasher": "0.0.1-commit.e57c76e",
63
+ "@aztec/standard-contracts": "0.0.1-commit.e57c76e",
64
+ "@aztec/stdlib": "0.0.1-commit.e57c76e",
65
+ "@aztec/telemetry-client": "0.0.1-commit.e57c76e",
66
+ "@aztec/validator-client": "0.0.1-commit.e57c76e",
67
+ "@aztec/validator-ha-signer": "0.0.1-commit.e57c76e",
68
+ "@aztec/wallet-sdk": "0.0.1-commit.e57c76e",
69
+ "@aztec/wallets": "0.0.1-commit.e57c76e",
70
+ "@aztec/world-state": "0.0.1-commit.e57c76e",
67
71
  "@iarna/toml": "^2.2.5",
68
72
  "@jest/globals": "^30.0.0",
69
73
  "@noble/curves": "=1.0.0",
@@ -75,7 +79,6 @@
75
79
  "@types/koa-static": "^4.0.2",
76
80
  "@types/lodash.every": "^4.6.7",
77
81
  "@types/node": "^22.15.17",
78
- "@viem/anvil": "^0.0.9",
79
82
  "buffer": "^6.0.3",
80
83
  "crypto-browserify": "^3.12.1",
81
84
  "fs-extra": "^11.2.0",
@@ -102,7 +105,7 @@
102
105
  "typescript": "^5.3.3",
103
106
  "util": "^0.12.5",
104
107
  "viem": "npm:@aztec/viem@2.38.2",
105
- "zod": "^3.23.8"
108
+ "zod": "^4"
106
109
  },
107
110
  "devDependencies": {
108
111
  "0x": "^5.7.0",
@@ -160,6 +163,7 @@
160
163
  "moduleNameMapper": {
161
164
  "^(\\.{1,2}/.*)\\.[cm]?js$": "$1"
162
165
  },
166
+ "resolver": "<rootDir>/legacy-jest-resolver.cjs",
163
167
  "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$",
164
168
  "rootDir": "./src",
165
169
  "testTimeout": 120000,
@@ -5,6 +5,7 @@ import {
5
5
  type ProfileInteractionOptions,
6
6
  } from '@aztec/aztec.js/contracts';
7
7
  import type { Logger } from '@aztec/aztec.js/log';
8
+ import { MAX_APPS_PER_KERNEL } from '@aztec/constants';
8
9
  import { createLogger } from '@aztec/foundation/log';
9
10
  import { type PrivateExecutionStep, serializePrivateExecutionSteps } from '@aztec/stdlib/kernel';
10
11
  import type {
@@ -320,6 +321,24 @@ export function convertProfileToGHBenchmark(benchmark: ClientFlowBenchmark): Git
320
321
  return benches;
321
322
  }
322
323
 
324
+ /**
325
+ * Computes the expected number of `PrivateExecutionStep` entries the orchestrator will produce
326
+ * for a tx with `apps` private function calls.
327
+ *
328
+ * Step layout: `apps` app circuits + kernel iterations + 1 final reset + 1 tail + 1 hiding kernel.
329
+ * Each kernel iteration absorbs up to `MAX_APPS_PER_KERNEL` apps via the `init_K` / `inner_K`
330
+ * variants, so the kernel count is `ceil(apps / MAX_APPS_PER_KERNEL)`.
331
+ *
332
+ * Caveat: this assumes no mid-flow reset is triggered, which would split a batch into two kernels
333
+ * separated by a reset. For the flows currently exercised in this benchmark suite that holds, but
334
+ * a future flow that grows large enough to overflow per-tx limits before consuming all apps will
335
+ * not match this formula.
336
+ */
337
+ export function expectedExecutionSteps(apps: number): number {
338
+ const kernels = Math.ceil(apps / MAX_APPS_PER_KERNEL);
339
+ return apps + kernels + 1 /* final reset */ + 1 /* tail */ + 1 /* hiding */;
340
+ }
341
+
323
342
  export async function captureProfile(
324
343
  label: string,
325
344
  interaction: ContractFunctionInteraction | DeployMethod,