@aztec/cli-wallet 3.0.0-nightly.20251111 → 3.0.0-nightly.20251113

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/README.md CHANGED
@@ -8,11 +8,11 @@
8
8
  anvil --host 127.0.0.1 --port 8545
9
9
  ```
10
10
 
11
- 2) In another terminal, start the Aztec sandbox from `yarn-project/aztec`:
11
+ 2) In another terminal, start the Aztec local network from `yarn-project/aztec`:
12
12
 
13
13
  ```bash
14
14
  cd yarn-project/aztec
15
- NODE_NO_WARNINGS=1 ETHEREUM_HOSTS=http://127.0.0.1:8545 node ./dest/bin/index.js start --sandbox
15
+ NODE_NO_WARNINGS=1 ETHEREUM_HOSTS=http://127.0.0.1:8545 node ./dest/bin/index.js start --local-network
16
16
  ```
17
17
 
18
18
  3) Run the wallet tests from `yarn-project/cli-wallet/test`:
@@ -3,7 +3,6 @@ import { type InteractionFeeOptions } from '@aztec/aztec.js/contracts';
3
3
  import type { AztecNode } from '@aztec/aztec.js/node';
4
4
  import { UniqueNote } from '@aztec/aztec.js/note';
5
5
  import { AccountManager, type Aliased, BaseWallet, type SimulateOptions } from '@aztec/aztec.js/wallet';
6
- import { ExecutionPayload } from '@aztec/entrypoints/payload';
7
6
  import { Fr } from '@aztec/foundation/fields';
8
7
  import type { LogFn } from '@aztec/foundation/log';
9
8
  import type { PXEConfig } from '@aztec/pxe/config';
@@ -11,6 +10,7 @@ import type { PXE } from '@aztec/pxe/server';
11
10
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
12
11
  import type { NotesFilter } from '@aztec/stdlib/note';
13
12
  import type { TxProvingResult, TxSimulationResult } from '@aztec/stdlib/tx';
13
+ import { ExecutionPayload } from '@aztec/stdlib/tx';
14
14
  import type { WalletDB } from '../storage/wallet_db.js';
15
15
  export declare const AccountTypes: readonly ["schnorr", "ecdsasecp256r1", "ecdsasecp256r1ssh", "ecdsasecp256k1"];
16
16
  export type AccountType = (typeof AccountTypes)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AAC,EAAE,CAAC;YAKhD,oCAAoC;IAqB5C,mBAAmB,CACvB,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,EAAE,EACX,YAAY,EAAE,qBAAqB,GAClC,OAAO,CAAC,eAAe,CAAC;IAKZ,qBAAqB,CAAC,OAAO,EAAE,YAAY;YAkB5C,aAAa;IAWrB,uBAAuB,CAC3B,OAAO,CAAC,EAAE,YAAY,EACtB,SAAS,CAAC,EAAE,EAAE,EACd,IAAI,GAAE,WAAuB,EAC7B,IAAI,CAAC,EAAE,EAAE,EACT,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,cAAc,CAAC;YAqDZ,qBAAqB;IAmBpB,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAuDjH,YAAY,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAMvC,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;CAGrD"}
@@ -5,11 +5,11 @@ import { getIdentities } from '@aztec/accounts/utils';
5
5
  import { SignerlessAccount } from '@aztec/aztec.js/account';
6
6
  import { getContractInstanceFromInstantiationParams, getGasLimits } from '@aztec/aztec.js/contracts';
7
7
  import { AccountManager, BaseWallet } from '@aztec/aztec.js/wallet';
8
- import { ExecutionPayload, mergeExecutionPayloads } from '@aztec/entrypoints/payload';
9
8
  import { Fr } from '@aztec/foundation/fields';
10
9
  import { createPXE, getPXEConfig } from '@aztec/pxe/server';
11
10
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
12
11
  import { deriveSigningKey } from '@aztec/stdlib/keys';
12
+ import { ExecutionPayload, mergeExecutionPayloads } from '@aztec/stdlib/tx';
13
13
  import { extractECDSAPublicKeyFromBase64String } from './ecdsa.js';
14
14
  import { printGasEstimates } from './options/fees.js';
15
15
  export const AccountTypes = [
@@ -40,7 +40,8 @@ export class CLIWallet extends BaseWallet {
40
40
  })));
41
41
  }
42
42
  async createCancellationTxExecutionRequest(from, txNonce, increasedFee) {
43
- const feeOptions = await this.getDefaultFeeOptions(from, increasedFee);
43
+ const executionPayload = ExecutionPayload.empty();
44
+ const feeOptions = await this.completeFeeOptions(from, executionPayload.feePayer, increasedFee.gasSettings);
44
45
  const feeExecutionPayload = await feeOptions.walletFeePaymentMethod?.getExecutionPayload();
45
46
  const fromAccount = await this.getAccountFromAddress(from);
46
47
  const executionOptions = {
@@ -48,7 +49,7 @@ export class CLIWallet extends BaseWallet {
48
49
  cancellable: this.cancellableTransactions,
49
50
  feePaymentMethodOptions: feeOptions.accountFeePaymentMethodOptions
50
51
  };
51
- return await fromAccount.createTxExecutionRequest(feeExecutionPayload ?? ExecutionPayload.empty(), feeOptions.gasSettings, executionOptions);
52
+ return await fromAccount.createTxExecutionRequest(feeExecutionPayload ?? executionPayload, feeOptions.gasSettings, executionOptions);
52
53
  }
53
54
  async proveCancellationTx(from, txNonce, increasedFee) {
54
55
  const cancellationTxRequest = await this.createCancellationTxExecutionRequest(from, txNonce, increasedFee);
@@ -143,7 +144,7 @@ export class CLIWallet extends BaseWallet {
143
144
  }
144
145
  async simulateTx(executionPayload, opts) {
145
146
  let simulationResults;
146
- const feeOptions = opts.fee?.estimateGas ? await this.getFeeOptionsForGasEstimation(opts.from, opts.fee) : await this.getDefaultFeeOptions(opts.from, opts.fee);
147
+ const feeOptions = opts.fee?.estimateGas ? await this.completeFeeOptionsForEstimation(opts.from, executionPayload.feePayer, opts.fee?.gasSettings) : await this.completeFeeOptions(opts.from, executionPayload.feePayer, opts.fee?.gasSettings);
147
148
  const feeExecutionPayload = await feeOptions.walletFeePaymentMethod?.getExecutionPayload();
148
149
  const executionOptions = {
149
150
  txNonce: Fr.random(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/cli-wallet",
3
- "version": "3.0.0-nightly.20251111",
3
+ "version": "3.0.0-nightly.20251113",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/cmds/index.js",
@@ -67,17 +67,17 @@
67
67
  ]
68
68
  },
69
69
  "dependencies": {
70
- "@aztec/accounts": "3.0.0-nightly.20251111",
71
- "@aztec/aztec.js": "3.0.0-nightly.20251111",
72
- "@aztec/cli": "3.0.0-nightly.20251111",
73
- "@aztec/entrypoints": "3.0.0-nightly.20251111",
74
- "@aztec/ethereum": "3.0.0-nightly.20251111",
75
- "@aztec/foundation": "3.0.0-nightly.20251111",
76
- "@aztec/kv-store": "3.0.0-nightly.20251111",
77
- "@aztec/noir-contracts.js": "3.0.0-nightly.20251111",
78
- "@aztec/noir-noirc_abi": "3.0.0-nightly.20251111",
79
- "@aztec/pxe": "3.0.0-nightly.20251111",
80
- "@aztec/stdlib": "3.0.0-nightly.20251111",
70
+ "@aztec/accounts": "3.0.0-nightly.20251113",
71
+ "@aztec/aztec.js": "3.0.0-nightly.20251113",
72
+ "@aztec/cli": "3.0.0-nightly.20251113",
73
+ "@aztec/entrypoints": "3.0.0-nightly.20251113",
74
+ "@aztec/ethereum": "3.0.0-nightly.20251113",
75
+ "@aztec/foundation": "3.0.0-nightly.20251113",
76
+ "@aztec/kv-store": "3.0.0-nightly.20251113",
77
+ "@aztec/noir-contracts.js": "3.0.0-nightly.20251113",
78
+ "@aztec/noir-noirc_abi": "3.0.0-nightly.20251113",
79
+ "@aztec/pxe": "3.0.0-nightly.20251113",
80
+ "@aztec/stdlib": "3.0.0-nightly.20251113",
81
81
  "commander": "^12.1.0",
82
82
  "inquirer": "^10.1.8",
83
83
  "source-map-support": "^0.5.21",
@@ -12,7 +12,6 @@ import type { AztecNode } from '@aztec/aztec.js/node';
12
12
  import { UniqueNote } from '@aztec/aztec.js/note';
13
13
  import { AccountManager, type Aliased, BaseWallet, type SimulateOptions } from '@aztec/aztec.js/wallet';
14
14
  import type { DefaultAccountEntrypointOptions } from '@aztec/entrypoints/account';
15
- import { ExecutionPayload, mergeExecutionPayloads } from '@aztec/entrypoints/payload';
16
15
  import { Fr } from '@aztec/foundation/fields';
17
16
  import type { LogFn } from '@aztec/foundation/log';
18
17
  import type { PXEConfig } from '@aztec/pxe/config';
@@ -22,6 +21,7 @@ import { AztecAddress } from '@aztec/stdlib/aztec-address';
22
21
  import { deriveSigningKey } from '@aztec/stdlib/keys';
23
22
  import type { NotesFilter } from '@aztec/stdlib/note';
24
23
  import type { TxProvingResult, TxSimulationResult } from '@aztec/stdlib/tx';
24
+ import { ExecutionPayload, mergeExecutionPayloads } from '@aztec/stdlib/tx';
25
25
 
26
26
  import type { WalletDB } from '../storage/wallet_db.js';
27
27
  import { extractECDSAPublicKeyFromBase64String } from './ecdsa.js';
@@ -66,7 +66,8 @@ export class CLIWallet extends BaseWallet {
66
66
  txNonce: Fr,
67
67
  increasedFee: InteractionFeeOptions,
68
68
  ) {
69
- const feeOptions = await this.getDefaultFeeOptions(from, increasedFee);
69
+ const executionPayload = ExecutionPayload.empty();
70
+ const feeOptions = await this.completeFeeOptions(from, executionPayload.feePayer, increasedFee.gasSettings);
70
71
  const feeExecutionPayload = await feeOptions.walletFeePaymentMethod?.getExecutionPayload();
71
72
  const fromAccount = await this.getAccountFromAddress(from);
72
73
  const executionOptions: DefaultAccountEntrypointOptions = {
@@ -75,7 +76,7 @@ export class CLIWallet extends BaseWallet {
75
76
  feePaymentMethodOptions: feeOptions.accountFeePaymentMethodOptions,
76
77
  };
77
78
  return await fromAccount.createTxExecutionRequest(
78
- feeExecutionPayload ?? ExecutionPayload.empty(),
79
+ feeExecutionPayload ?? executionPayload,
79
80
  feeOptions.gasSettings,
80
81
  executionOptions,
81
82
  );
@@ -200,8 +201,8 @@ export class CLIWallet extends BaseWallet {
200
201
  override async simulateTx(executionPayload: ExecutionPayload, opts: SimulateOptions): Promise<TxSimulationResult> {
201
202
  let simulationResults;
202
203
  const feeOptions = opts.fee?.estimateGas
203
- ? await this.getFeeOptionsForGasEstimation(opts.from, opts.fee)
204
- : await this.getDefaultFeeOptions(opts.from, opts.fee);
204
+ ? await this.completeFeeOptionsForEstimation(opts.from, executionPayload.feePayer, opts.fee?.gasSettings)
205
+ : await this.completeFeeOptions(opts.from, executionPayload.feePayer, opts.fee?.gasSettings);
205
206
  const feeExecutionPayload = await feeOptions.walletFeePaymentMethod?.getExecutionPayload();
206
207
  const executionOptions: DefaultAccountEntrypointOptions = {
207
208
  txNonce: Fr.random(),