@aztec/cli-wallet 0.77.0 → 0.78.0

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/bin/index.js CHANGED
@@ -49,19 +49,18 @@ function injectInternalCommands(program, log, db) {
49
49
  const { dataDir, remotePxe, nodeUrl, prover } = command.optsWithGlobals();
50
50
  if (!remotePxe) {
51
51
  debugLogger.info('Using local PXE service');
52
+ const proverEnabled = prover !== 'none';
52
53
  const bbBinaryPath = prover === 'native' ? resolve(dirname(fileURLToPath(import.meta.url)), '../../../../barretenberg/cpp/build/bin/bb') : undefined;
53
54
  const bbWorkingDirectory = dataDir + '/bb';
54
- const proverEnabled = prover !== 'none';
55
55
  mkdirSync(bbWorkingDirectory, {
56
56
  recursive: true
57
57
  });
58
- await pxeWrapper.init(nodeUrl, join(dataDir, 'pxe'), {
59
- ...proverEnabled && {
60
- proverEnabled,
61
- bbBinaryPath,
62
- bbWorkingDirectory
63
- }
64
- });
58
+ const overridePXEConfig = {
59
+ proverEnabled,
60
+ bbBinaryPath: prover === 'native' ? bbBinaryPath : undefined,
61
+ bbWorkingDirectory: prover === 'native' ? bbWorkingDirectory : undefined
62
+ };
63
+ await pxeWrapper.init(nodeUrl, join(dataDir, 'pxe'), overridePXEConfig);
65
64
  }
66
65
  await db.init(await openStoreAt(dataDir));
67
66
  });
@@ -1,4 +1,4 @@
1
- import { type PXEServiceConfig } from '@aztec/pxe';
1
+ import { type PXEServiceConfig } from '@aztec/pxe/server';
2
2
  import { type AztecNode, type PXE } from '@aztec/stdlib/interfaces/client';
3
3
  export declare class PXEWrapper {
4
4
  private static pxe;
@@ -1 +1 @@
1
- {"version":3,"file":"pxe_wrapper.d.ts","sourceRoot":"","sources":["../../src/utils/pxe_wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAyC,MAAM,YAAY,CAAC;AAC1F,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAyB,MAAM,iCAAiC,CAAC;AAMlG,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,GAAG,CAAkB;IACpC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAwB;IAE3C,MAAM,IAAI,GAAG,GAAG,SAAS;IAIzB,OAAO,IAAI,SAAS,GAAG,SAAS;IAI1B,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,wBAAwB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC;CAMlG"}
1
+ {"version":3,"file":"pxe_wrapper.d.ts","sourceRoot":"","sources":["../../src/utils/pxe_wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAyC,MAAM,mBAAmB,CAAC;AACjG,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAyB,MAAM,iCAAiC,CAAC;AAMlG,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,GAAG,CAAkB;IACpC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAwB;IAE3C,MAAM,IAAI,GAAG,GAAG,SAAS;IAIzB,OAAO,IAAI,SAAS,GAAG,SAAS;IAI1B,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,wBAAwB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC;CAMlG"}
@@ -1,4 +1,4 @@
1
- import { createPXEService, getPXEServiceConfig } from '@aztec/pxe';
1
+ import { createPXEService, getPXEServiceConfig } from '@aztec/pxe/server';
2
2
  import { createAztecNodeClient } from '@aztec/stdlib/interfaces/client';
3
3
  /*
4
4
  * Wrapper class for PXE service, avoids initialization issues due to
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/cli-wallet",
3
- "version": "0.77.0",
3
+ "version": "0.78.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/cmds/index.js",
@@ -65,15 +65,15 @@
65
65
  ]
66
66
  },
67
67
  "dependencies": {
68
- "@aztec/accounts": "0.77.0",
69
- "@aztec/aztec.js": "0.77.0",
70
- "@aztec/cli": "0.77.0",
71
- "@aztec/ethereum": "0.77.0",
72
- "@aztec/foundation": "0.77.0",
73
- "@aztec/kv-store": "0.77.0",
74
- "@aztec/noir-contracts.js": "0.77.0",
75
- "@aztec/pxe": "0.77.0",
76
- "@aztec/stdlib": "0.77.0",
68
+ "@aztec/accounts": "0.78.0",
69
+ "@aztec/aztec.js": "0.78.0",
70
+ "@aztec/cli": "0.78.0",
71
+ "@aztec/ethereum": "0.78.0",
72
+ "@aztec/foundation": "0.78.0",
73
+ "@aztec/kv-store": "0.78.0",
74
+ "@aztec/noir-contracts.js": "0.78.0",
75
+ "@aztec/pxe": "0.78.0",
76
+ "@aztec/stdlib": "0.78.0",
77
77
  "commander": "^12.1.0",
78
78
  "inquirer": "^10.1.8",
79
79
  "source-map-support": "^0.5.21",
package/src/bin/index.ts CHANGED
@@ -2,6 +2,7 @@ import { Fr, computeSecretHash, fileURLToPath } from '@aztec/aztec.js';
2
2
  import { LOCALHOST } from '@aztec/cli/cli-utils';
3
3
  import { type LogFn, createConsoleLogger, createLogger } from '@aztec/foundation/log';
4
4
  import { openStoreAt } from '@aztec/kv-store/lmdb-v2';
5
+ import type { PXEServiceConfig } from '@aztec/pxe/config';
5
6
 
6
7
  import { Argument, Command, Option } from 'commander';
7
8
  import { mkdirSync, readFileSync } from 'fs';
@@ -94,18 +95,22 @@ async function main() {
94
95
  if (!remotePxe) {
95
96
  debugLogger.info('Using local PXE service');
96
97
 
98
+ const proverEnabled = prover !== 'none';
99
+
97
100
  const bbBinaryPath =
98
101
  prover === 'native'
99
102
  ? resolve(dirname(fileURLToPath(import.meta.url)), '../../../../barretenberg/cpp/build/bin/bb')
100
103
  : undefined;
101
104
  const bbWorkingDirectory = dataDir + '/bb';
102
- const proverEnabled = prover !== 'none';
103
-
104
105
  mkdirSync(bbWorkingDirectory, { recursive: true });
105
106
 
106
- await pxeWrapper.init(nodeUrl, join(dataDir, 'pxe'), {
107
- ...(proverEnabled && { proverEnabled, bbBinaryPath, bbWorkingDirectory }), // only override if we're profiling
108
- });
107
+ const overridePXEConfig: Partial<PXEServiceConfig> = {
108
+ proverEnabled,
109
+ bbBinaryPath: prover === 'native' ? bbBinaryPath : undefined,
110
+ bbWorkingDirectory: prover === 'native' ? bbWorkingDirectory : undefined,
111
+ };
112
+
113
+ await pxeWrapper.init(nodeUrl, join(dataDir, 'pxe'), overridePXEConfig);
109
114
  }
110
115
  await db.init(await openStoreAt(dataDir));
111
116
  });
@@ -1,4 +1,4 @@
1
- import { type PXEServiceConfig, createPXEService, getPXEServiceConfig } from '@aztec/pxe';
1
+ import { type PXEServiceConfig, createPXEService, getPXEServiceConfig } from '@aztec/pxe/server';
2
2
  import { type AztecNode, type PXE, createAztecNodeClient } from '@aztec/stdlib/interfaces/client';
3
3
 
4
4
  /*