@aztec/end-to-end 0.0.1-commit.b8a057fa → 0.0.1-commit.be03c316
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/dest/automine/delivery/interactive_handshake_responder.d.ts +48 -0
- package/dest/automine/delivery/interactive_handshake_responder.d.ts.map +1 -0
- package/dest/automine/delivery/interactive_handshake_responder.js +76 -0
- package/dest/automine/delivery/onchain_delivery_harness.d.ts +7 -5
- package/dest/automine/delivery/onchain_delivery_harness.d.ts.map +1 -1
- package/dest/automine/delivery/onchain_delivery_harness.js +22 -4
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +2 -2
- package/dest/fixtures/e2e_prover_test.d.ts +1 -1
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +2 -2
- package/dest/fixtures/fixtures.d.ts +3 -2
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +5 -3
- package/dest/forward-compatibility/wallet_service.js +1 -1
- package/dest/spartan/setup_test_wallets.d.ts +1 -1
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +6 -6
- package/dest/test-wallet/test_wallet.d.ts +3 -3
- package/dest/test-wallet/test_wallet.d.ts.map +1 -1
- package/dest/test-wallet/test_wallet.js +2 -5
- package/dest/test-wallet/wallet_worker_script.js +2 -2
- package/dest/test-wallet/worker_wallet.d.ts +3 -3
- package/dest/test-wallet/worker_wallet.d.ts.map +1 -1
- package/dest/test-wallet/worker_wallet.js +5 -3
- package/dest/test-wallet/worker_wallet_schema.js +2 -1
- package/package.json +40 -40
- package/src/automine/delivery/interactive_handshake_responder.ts +125 -0
- package/src/automine/delivery/onchain_delivery_harness.ts +46 -10
- package/src/bench/client_flows/client_flows_benchmark.ts +2 -2
- package/src/fixtures/e2e_prover_test.ts +6 -1
- package/src/fixtures/fixtures.ts +5 -3
- package/src/forward-compatibility/wallet_service.ts +2 -2
- package/src/spartan/setup_test_wallets.ts +12 -6
- package/src/test-wallet/test_wallet.ts +4 -7
- package/src/test-wallet/wallet_worker_script.ts +3 -3
- package/src/test-wallet/worker_wallet.ts +8 -6
- package/src/test-wallet/worker_wallet_schema.ts +1 -1
|
@@ -18,7 +18,7 @@ import type {
|
|
|
18
18
|
WalletCapabilities,
|
|
19
19
|
} from '@aztec/aztec.js/wallet';
|
|
20
20
|
import type { ChainInfo } from '@aztec/entrypoints/interfaces';
|
|
21
|
-
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
21
|
+
import type { Fq, Fr } from '@aztec/foundation/curves/bn254';
|
|
22
22
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
23
23
|
import { createLogger } from '@aztec/foundation/log';
|
|
24
24
|
import { promiseWithResolvers } from '@aztec/foundation/promise';
|
|
@@ -116,15 +116,17 @@ export class WorkerWallet implements Wallet {
|
|
|
116
116
|
return wallet;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
private async callRaw(fn: string, ...args: any[]): Promise<string> {
|
|
119
|
+
private async callRaw(fn: string, ...args: any[]): Promise<string | undefined> {
|
|
120
120
|
const argsJson = jsonStringify(args);
|
|
121
|
-
return (await this.client.request({ fn, args: argsJson })) as string;
|
|
121
|
+
return (await this.client.request({ fn, args: argsJson })) as string | undefined;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
private async call(fn: string, ...args: any[]): Promise<any> {
|
|
125
125
|
const resultJson = await this.callRaw(fn, ...args);
|
|
126
126
|
const methodSchema = (WorkerWalletSchema as ApiSchema)[fn];
|
|
127
|
-
|
|
127
|
+
// Void-returning methods (e.g. registerContract) serialize to `undefined` on the worker side, which
|
|
128
|
+
// JSON.parse cannot handle; hand it straight to the schema, whose `z.void()` output accepts undefined.
|
|
129
|
+
return getSchemaReturnType(methodSchema).parseAsync(resultJson === undefined ? undefined : JSON.parse(resultJson));
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
getChainInfo(): Promise<ChainInfo> {
|
|
@@ -190,8 +192,8 @@ export class WorkerWallet implements Wallet {
|
|
|
190
192
|
}
|
|
191
193
|
|
|
192
194
|
/** Registers an account inside the worker's TestWallet, populating its accounts map. */
|
|
193
|
-
registerAccount(secret: Fr, salt: Fr): Promise<AztecAddress> {
|
|
194
|
-
return this.call('registerAccount', secret, salt);
|
|
195
|
+
registerAccount(secret: Fr, salt: Fr, signingKey: Fq): Promise<AztecAddress> {
|
|
196
|
+
return this.call('registerAccount', secret, salt, signingKey);
|
|
195
197
|
}
|
|
196
198
|
|
|
197
199
|
createAuthWit(from: AztecAddress, messageHashOrIntent: IntentInnerHash | CallIntent): Promise<AuthWitness> {
|
|
@@ -10,5 +10,5 @@ import { z } from 'zod';
|
|
|
10
10
|
export const WorkerWalletSchema: ApiSchema = {
|
|
11
11
|
...WalletSchema,
|
|
12
12
|
proveTx: z.function({ input: z.tuple([ExecutionPayloadSchema, SendOptionsSchema]), output: Tx.schema }),
|
|
13
|
-
registerAccount: z.function({ input: z.tuple([schemas.Fr, schemas.Fr]), output: AztecAddress.schema }),
|
|
13
|
+
registerAccount: z.function({ input: z.tuple([schemas.Fr, schemas.Fr, schemas.Fq]), output: AztecAddress.schema }),
|
|
14
14
|
};
|