@aztec/cli-wallet 4.0.0-nightly.20250907 → 4.0.0-nightly.20260108

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 (99) hide show
  1. package/README.md +30 -0
  2. package/dest/bin/index.d.ts +1 -1
  3. package/dest/bin/index.js +38 -23
  4. package/dest/cmds/authorize_action.d.ts +4 -3
  5. package/dest/cmds/authorize_action.d.ts.map +1 -1
  6. package/dest/cmds/authorize_action.js +6 -7
  7. package/dest/cmds/bridge_fee_juice.d.ts +4 -4
  8. package/dest/cmds/bridge_fee_juice.d.ts.map +1 -1
  9. package/dest/cmds/bridge_fee_juice.js +9 -7
  10. package/dest/cmds/check_tx.d.ts +5 -3
  11. package/dest/cmds/check_tx.d.ts.map +1 -1
  12. package/dest/cmds/check_tx.js +144 -6
  13. package/dest/cmds/create_account.d.ts +7 -6
  14. package/dest/cmds/create_account.d.ts.map +1 -1
  15. package/dest/cmds/create_account.js +36 -48
  16. package/dest/cmds/create_authwit.d.ts +4 -3
  17. package/dest/cmds/create_authwit.d.ts.map +1 -1
  18. package/dest/cmds/create_authwit.js +6 -6
  19. package/dest/cmds/deploy.d.ts +7 -4
  20. package/dest/cmds/deploy.d.ts.map +1 -1
  21. package/dest/cmds/deploy.js +57 -46
  22. package/dest/cmds/deploy_account.d.ts +6 -8
  23. package/dest/cmds/deploy_account.d.ts.map +1 -1
  24. package/dest/cmds/deploy_account.js +36 -51
  25. package/dest/cmds/import_test_accounts.d.ts +3 -3
  26. package/dest/cmds/import_test_accounts.d.ts.map +1 -1
  27. package/dest/cmds/import_test_accounts.js +6 -9
  28. package/dest/cmds/index.d.ts +3 -3
  29. package/dest/cmds/index.d.ts.map +1 -1
  30. package/dest/cmds/index.js +73 -112
  31. package/dest/cmds/profile.d.ts +7 -4
  32. package/dest/cmds/profile.d.ts.map +1 -1
  33. package/dest/cmds/profile.js +9 -4
  34. package/dest/cmds/register_contract.d.ts +7 -3
  35. package/dest/cmds/register_contract.d.ts.map +1 -1
  36. package/dest/cmds/register_contract.js +5 -6
  37. package/dest/cmds/register_sender.d.ts +4 -3
  38. package/dest/cmds/register_sender.d.ts.map +1 -1
  39. package/dest/cmds/send.d.ts +8 -9
  40. package/dest/cmds/send.d.ts.map +1 -1
  41. package/dest/cmds/send.js +27 -24
  42. package/dest/cmds/simulate.d.ts +7 -4
  43. package/dest/cmds/simulate.d.ts.map +1 -1
  44. package/dest/cmds/simulate.js +9 -4
  45. package/dest/storage/wallet_db.d.ts +6 -16
  46. package/dest/storage/wallet_db.d.ts.map +1 -1
  47. package/dest/storage/wallet_db.js +2 -23
  48. package/dest/utils/authorizations.d.ts +3 -2
  49. package/dest/utils/authorizations.d.ts.map +1 -1
  50. package/dest/utils/authorizations.js +1 -1
  51. package/dest/utils/cli_wallet_and_node_wrapper.d.ts +12 -0
  52. package/dest/utils/cli_wallet_and_node_wrapper.d.ts.map +1 -0
  53. package/dest/utils/cli_wallet_and_node_wrapper.js +25 -0
  54. package/dest/utils/ecdsa.d.ts +1 -1
  55. package/dest/utils/options/fees.d.ts +22 -28
  56. package/dest/utils/options/fees.d.ts.map +1 -1
  57. package/dest/utils/options/fees.js +66 -133
  58. package/dest/utils/options/index.d.ts +1 -1
  59. package/dest/utils/options/options.d.ts +4 -3
  60. package/dest/utils/options/options.d.ts.map +1 -1
  61. package/dest/utils/options/options.js +1 -1
  62. package/dest/utils/profiling.d.ts +1 -1
  63. package/dest/utils/wallet.d.ts +36 -0
  64. package/dest/utils/wallet.d.ts.map +1 -0
  65. package/dest/utils/wallet.js +195 -0
  66. package/package.json +17 -14
  67. package/src/bin/index.ts +38 -31
  68. package/src/cmds/authorize_action.ts +14 -6
  69. package/src/cmds/bridge_fee_juice.ts +15 -11
  70. package/src/cmds/check_tx.ts +181 -5
  71. package/src/cmds/create_account.ts +43 -53
  72. package/src/cmds/create_authwit.ts +9 -5
  73. package/src/cmds/deploy.ts +58 -56
  74. package/src/cmds/deploy_account.ts +43 -51
  75. package/src/cmds/import_test_accounts.ts +7 -11
  76. package/src/cmds/index.ts +120 -206
  77. package/src/cmds/profile.ts +14 -6
  78. package/src/cmds/register_contract.ts +9 -11
  79. package/src/cmds/register_sender.ts +3 -2
  80. package/src/cmds/send.ts +22 -32
  81. package/src/cmds/simulate.ts +14 -6
  82. package/src/storage/wallet_db.ts +3 -31
  83. package/src/utils/authorizations.ts +3 -1
  84. package/src/utils/cli_wallet_and_node_wrapper.ts +35 -0
  85. package/src/utils/options/fees.ts +88 -178
  86. package/src/utils/options/options.ts +3 -2
  87. package/src/utils/wallet.ts +266 -0
  88. package/dest/cmds/cancel_tx.d.ts +0 -11
  89. package/dest/cmds/cancel_tx.d.ts.map +0 -1
  90. package/dest/cmds/cancel_tx.js +0 -43
  91. package/dest/utils/accounts.d.ts +0 -9
  92. package/dest/utils/accounts.d.ts.map +0 -1
  93. package/dest/utils/accounts.js +0 -61
  94. package/dest/utils/pxe_wrapper.d.ts +0 -12
  95. package/dest/utils/pxe_wrapper.d.ts.map +0 -1
  96. package/dest/utils/pxe_wrapper.js +0 -26
  97. package/src/cmds/cancel_tx.ts +0 -66
  98. package/src/utils/accounts.ts +0 -77
  99. package/src/utils/pxe_wrapper.ts +0 -32
@@ -1,43 +0,0 @@
1
- import { SentTx, TxStatus } from '@aztec/aztec.js';
2
- import { ExecutionPayload } from '@aztec/entrypoints/payload';
3
- import { GasFees, GasSettings } from '@aztec/stdlib/gas';
4
- import { DEFAULT_TX_TIMEOUT_S } from '../utils/pxe_wrapper.js';
5
- export async function cancelTx(wallet, { txHash, gasSettings: prevTxGasSettings, txNonce, cancellable }, paymentMethod, increasedFees, maxFeesPerGas, log) {
6
- const receipt = await wallet.getTxReceipt(txHash);
7
- if (receipt.status !== TxStatus.PENDING || !cancellable) {
8
- log(`Transaction is in status ${receipt.status} and cannot be cancelled`);
9
- return;
10
- }
11
- const maxPriorityFeesPerGas = new GasFees(prevTxGasSettings.maxPriorityFeesPerGas.feePerDaGas + increasedFees.feePerDaGas, prevTxGasSettings.maxPriorityFeesPerGas.feePerL2Gas + increasedFees.feePerL2Gas);
12
- const fee = {
13
- paymentMethod,
14
- gasSettings: GasSettings.from({
15
- ...prevTxGasSettings,
16
- maxPriorityFeesPerGas,
17
- maxFeesPerGas: maxFeesPerGas ?? prevTxGasSettings.maxFeesPerGas
18
- })
19
- };
20
- const txRequest = await wallet.createTxExecutionRequest(ExecutionPayload.empty(), fee, {
21
- txNonce,
22
- cancellable: true
23
- });
24
- const txSimulationResult = await wallet.simulateTx(txRequest, true);
25
- const txProvingResult = await wallet.proveTx(txRequest, txSimulationResult.privateExecutionResult);
26
- const sentTx = new SentTx(wallet, async ()=>{
27
- const tx = await txProvingResult.toTx();
28
- return wallet.sendTx(tx);
29
- });
30
- try {
31
- await sentTx.wait({
32
- timeout: DEFAULT_TX_TIMEOUT_S
33
- });
34
- log('Transaction has been cancelled');
35
- const cancelReceipt = await sentTx.getReceipt();
36
- log(` Tx fee: ${cancelReceipt.transactionFee}`);
37
- log(` Status: ${cancelReceipt.status}`);
38
- log(` Block number: ${cancelReceipt.blockNumber}`);
39
- log(` Block hash: ${cancelReceipt.blockHash?.toString()}`);
40
- } catch (err) {
41
- log(`Could not cancel transaction\n ${err.message}`);
42
- }
43
- }
@@ -1,9 +0,0 @@
1
- import type { AccountManager } from '@aztec/aztec.js';
2
- import { Fr } from '@aztec/foundation/fields';
3
- import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
- import type { PXE } from '@aztec/stdlib/interfaces/client';
5
- import type { WalletDB } from '../storage/wallet_db.js';
6
- export declare const AccountTypes: readonly ["schnorr", "ecdsasecp256r1", "ecdsasecp256r1ssh", "ecdsasecp256k1"];
7
- export type AccountType = (typeof AccountTypes)[number];
8
- export declare function createOrRetrieveAccount(pxe: PXE, address?: AztecAddress, db?: WalletDB, secretKey?: Fr, type?: AccountType, salt?: Fr, publicKey?: string): Promise<AccountManager>;
9
- //# sourceMappingURL=accounts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/utils/accounts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAG3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGxD,eAAO,MAAM,YAAY,+EAAgF,CAAC;AAC1G,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,GAAG,EACR,OAAO,CAAC,EAAE,YAAY,EACtB,EAAE,CAAC,EAAE,QAAQ,EACb,SAAS,CAAC,EAAE,EAAE,EACd,IAAI,GAAE,WAAuB,EAC7B,IAAI,CAAC,EAAE,EAAE,EACT,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,cAAc,CAAC,CAuDzB"}
@@ -1,61 +0,0 @@
1
- import { getIdentities } from '@aztec/accounts/utils';
2
- import { Fr } from '@aztec/foundation/fields';
3
- import { deriveSigningKey } from '@aztec/stdlib/keys';
4
- import { extractECDSAPublicKeyFromBase64String } from './ecdsa.js';
5
- export const AccountTypes = [
6
- 'schnorr',
7
- 'ecdsasecp256r1',
8
- 'ecdsasecp256r1ssh',
9
- 'ecdsasecp256k1'
10
- ];
11
- export async function createOrRetrieveAccount(pxe, address, db, secretKey, type = 'schnorr', salt, publicKey) {
12
- let account;
13
- salt ??= Fr.ZERO;
14
- if (db && address) {
15
- ({ type, secretKey, salt } = await db.retrieveAccount(address));
16
- }
17
- if (!salt) {
18
- throw new Error('Cannot retrieve/create wallet without salt');
19
- }
20
- if (!secretKey) {
21
- throw new Error('Cannot retrieve/create wallet without secret key');
22
- }
23
- switch(type){
24
- case 'schnorr':
25
- {
26
- const { getSchnorrAccount } = await import('@aztec/accounts/schnorr');
27
- account = getSchnorrAccount(pxe, secretKey, deriveSigningKey(secretKey), salt);
28
- break;
29
- }
30
- case 'ecdsasecp256r1':
31
- {
32
- const { getEcdsaRAccount } = await import('@aztec/accounts/ecdsa');
33
- account = getEcdsaRAccount(pxe, secretKey, deriveSigningKey(secretKey).toBuffer(), salt);
34
- break;
35
- }
36
- case 'ecdsasecp256r1ssh':
37
- {
38
- let publicSigningKey;
39
- if (db && address) {
40
- publicSigningKey = await db.retrieveAccountMetadata(address, 'publicSigningKey');
41
- } else if (publicKey) {
42
- const identities = await getIdentities();
43
- const foundIdentity = identities.find((identity)=>identity.type === 'ecdsa-sha2-nistp256' && identity.publicKey === publicKey);
44
- if (!foundIdentity) {
45
- throw new Error(`Identity for public key ${publicKey} not found in the SSH agent`);
46
- }
47
- publicSigningKey = extractECDSAPublicKeyFromBase64String(foundIdentity.publicKey);
48
- } else {
49
- throw new Error('Public key must be provided for ECDSA SSH account');
50
- }
51
- const { getEcdsaRSSHAccount } = await import('@aztec/accounts/ecdsa');
52
- account = getEcdsaRSSHAccount(pxe, secretKey, publicSigningKey, salt);
53
- break;
54
- }
55
- default:
56
- {
57
- throw new Error(`Unsupported account type: ${type}`);
58
- }
59
- }
60
- return account;
61
- }
@@ -1,12 +0,0 @@
1
- import { type PXEServiceConfig } from '@aztec/pxe/server';
2
- import { type AztecNode, type PXE } from '@aztec/stdlib/interfaces/client';
3
- export declare const DEFAULT_TX_TIMEOUT_S = 180;
4
- export declare class PXEWrapper {
5
- private static pxeConfig;
6
- private static pxe;
7
- private static node;
8
- getPXE(): Promise<PXE>;
9
- getNode(): AztecNode | undefined;
10
- prepare(nodeUrl: string, dataDir: string, overridePXEServiceConfig?: Partial<PXEServiceConfig>): void;
11
- }
12
- //# sourceMappingURL=pxe_wrapper.d.ts.map
@@ -1 +0,0 @@
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;AAElG,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAMxC,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,SAAS,CAA+B;IACvD,OAAO,CAAC,MAAM,CAAC,GAAG,CAAkB;IACpC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAwB;IAErC,MAAM;IAOZ,OAAO,IAAI,SAAS,GAAG,SAAS;IAIhC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,wBAAwB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC;CAM/F"}
@@ -1,26 +0,0 @@
1
- import { createPXEService, getPXEServiceConfig } from '@aztec/pxe/server';
2
- import { createAztecNodeClient } from '@aztec/stdlib/interfaces/client';
3
- export const DEFAULT_TX_TIMEOUT_S = 180;
4
- /*
5
- * Wrapper class for PXE service, avoids initialization issues due to
6
- * closures when providing PXE service to injected commander.js commands
7
- */ export class PXEWrapper {
8
- static pxeConfig;
9
- static pxe;
10
- static node;
11
- async getPXE() {
12
- if (!PXEWrapper.pxe) {
13
- PXEWrapper.pxe = await createPXEService(PXEWrapper.node, PXEWrapper.pxeConfig);
14
- }
15
- return PXEWrapper.pxe;
16
- }
17
- getNode() {
18
- return PXEWrapper.node;
19
- }
20
- prepare(nodeUrl, dataDir, overridePXEServiceConfig) {
21
- PXEWrapper.node = createAztecNodeClient(nodeUrl);
22
- const pxeConfig = Object.assign(getPXEServiceConfig(), overridePXEServiceConfig);
23
- pxeConfig.dataDirectory = dataDir;
24
- PXEWrapper.pxeConfig = pxeConfig;
25
- }
26
- }
@@ -1,66 +0,0 @@
1
- import { type AccountWalletWithSecretKey, type FeePaymentMethod, SentTx, type TxHash, TxStatus } from '@aztec/aztec.js';
2
- import type { FeeOptions } from '@aztec/entrypoints/interfaces';
3
- import { ExecutionPayload } from '@aztec/entrypoints/payload';
4
- import { Fr } from '@aztec/foundation/fields';
5
- import type { LogFn } from '@aztec/foundation/log';
6
- import { GasFees, GasSettings } from '@aztec/stdlib/gas';
7
-
8
- import { DEFAULT_TX_TIMEOUT_S } from '../utils/pxe_wrapper.js';
9
-
10
- export async function cancelTx(
11
- wallet: AccountWalletWithSecretKey,
12
- {
13
- txHash,
14
- gasSettings: prevTxGasSettings,
15
- txNonce,
16
- cancellable,
17
- }: { txHash: TxHash; gasSettings: GasSettings; txNonce: Fr; cancellable: boolean },
18
- paymentMethod: FeePaymentMethod,
19
- increasedFees: GasFees,
20
- maxFeesPerGas: GasFees | undefined,
21
- log: LogFn,
22
- ) {
23
- const receipt = await wallet.getTxReceipt(txHash);
24
- if (receipt.status !== TxStatus.PENDING || !cancellable) {
25
- log(`Transaction is in status ${receipt.status} and cannot be cancelled`);
26
- return;
27
- }
28
-
29
- const maxPriorityFeesPerGas = new GasFees(
30
- prevTxGasSettings.maxPriorityFeesPerGas.feePerDaGas + increasedFees.feePerDaGas,
31
- prevTxGasSettings.maxPriorityFeesPerGas.feePerL2Gas + increasedFees.feePerL2Gas,
32
- );
33
-
34
- const fee: FeeOptions = {
35
- paymentMethod,
36
- gasSettings: GasSettings.from({
37
- ...prevTxGasSettings,
38
- maxPriorityFeesPerGas,
39
- maxFeesPerGas: maxFeesPerGas ?? prevTxGasSettings.maxFeesPerGas,
40
- }),
41
- };
42
-
43
- const txRequest = await wallet.createTxExecutionRequest(ExecutionPayload.empty(), fee, {
44
- txNonce,
45
- cancellable: true,
46
- });
47
- const txSimulationResult = await wallet.simulateTx(txRequest, true);
48
- const txProvingResult = await wallet.proveTx(txRequest, txSimulationResult.privateExecutionResult);
49
- const sentTx = new SentTx(wallet, async () => {
50
- const tx = await txProvingResult.toTx();
51
- return wallet.sendTx(tx);
52
- });
53
- try {
54
- await sentTx.wait({ timeout: DEFAULT_TX_TIMEOUT_S });
55
-
56
- log('Transaction has been cancelled');
57
-
58
- const cancelReceipt = await sentTx.getReceipt();
59
- log(` Tx fee: ${cancelReceipt.transactionFee}`);
60
- log(` Status: ${cancelReceipt.status}`);
61
- log(` Block number: ${cancelReceipt.blockNumber}`);
62
- log(` Block hash: ${cancelReceipt.blockHash?.toString()}`);
63
- } catch (err: any) {
64
- log(`Could not cancel transaction\n ${err.message}`);
65
- }
66
- }
@@ -1,77 +0,0 @@
1
- import { getIdentities } from '@aztec/accounts/utils';
2
- import type { AccountManager } from '@aztec/aztec.js';
3
- import { Fr } from '@aztec/foundation/fields';
4
- import { AztecAddress } from '@aztec/stdlib/aztec-address';
5
- import type { PXE } from '@aztec/stdlib/interfaces/client';
6
- import { deriveSigningKey } from '@aztec/stdlib/keys';
7
-
8
- import type { WalletDB } from '../storage/wallet_db.js';
9
- import { extractECDSAPublicKeyFromBase64String } from './ecdsa.js';
10
-
11
- export const AccountTypes = ['schnorr', 'ecdsasecp256r1', 'ecdsasecp256r1ssh', 'ecdsasecp256k1'] as const;
12
- export type AccountType = (typeof AccountTypes)[number];
13
-
14
- export async function createOrRetrieveAccount(
15
- pxe: PXE,
16
- address?: AztecAddress,
17
- db?: WalletDB,
18
- secretKey?: Fr,
19
- type: AccountType = 'schnorr',
20
- salt?: Fr,
21
- publicKey?: string,
22
- ): Promise<AccountManager> {
23
- let account;
24
-
25
- salt ??= Fr.ZERO;
26
-
27
- if (db && address) {
28
- ({ type, secretKey, salt } = await db.retrieveAccount(address));
29
- }
30
-
31
- if (!salt) {
32
- throw new Error('Cannot retrieve/create wallet without salt');
33
- }
34
-
35
- if (!secretKey) {
36
- throw new Error('Cannot retrieve/create wallet without secret key');
37
- }
38
-
39
- switch (type) {
40
- case 'schnorr': {
41
- const { getSchnorrAccount } = await import('@aztec/accounts/schnorr');
42
- account = getSchnorrAccount(pxe, secretKey, deriveSigningKey(secretKey), salt);
43
- break;
44
- }
45
- case 'ecdsasecp256r1': {
46
- const { getEcdsaRAccount } = await import('@aztec/accounts/ecdsa');
47
- account = getEcdsaRAccount(pxe, secretKey, deriveSigningKey(secretKey).toBuffer(), salt);
48
- break;
49
- }
50
- case 'ecdsasecp256r1ssh': {
51
- let publicSigningKey;
52
- if (db && address) {
53
- publicSigningKey = await db.retrieveAccountMetadata(address, 'publicSigningKey');
54
- } else if (publicKey) {
55
- const identities = await getIdentities();
56
- const foundIdentity = identities.find(
57
- identity => identity.type === 'ecdsa-sha2-nistp256' && identity.publicKey === publicKey,
58
- );
59
- if (!foundIdentity) {
60
- throw new Error(`Identity for public key ${publicKey} not found in the SSH agent`);
61
- }
62
- publicSigningKey = extractECDSAPublicKeyFromBase64String(foundIdentity.publicKey);
63
- } else {
64
- throw new Error('Public key must be provided for ECDSA SSH account');
65
- }
66
-
67
- const { getEcdsaRSSHAccount } = await import('@aztec/accounts/ecdsa');
68
- account = getEcdsaRSSHAccount(pxe, secretKey, publicSigningKey, salt);
69
- break;
70
- }
71
- default: {
72
- throw new Error(`Unsupported account type: ${type}`);
73
- }
74
- }
75
-
76
- return account;
77
- }
@@ -1,32 +0,0 @@
1
- import { type PXEServiceConfig, createPXEService, getPXEServiceConfig } from '@aztec/pxe/server';
2
- import { type AztecNode, type PXE, createAztecNodeClient } from '@aztec/stdlib/interfaces/client';
3
-
4
- export const DEFAULT_TX_TIMEOUT_S = 180;
5
-
6
- /*
7
- * Wrapper class for PXE service, avoids initialization issues due to
8
- * closures when providing PXE service to injected commander.js commands
9
- */
10
- export class PXEWrapper {
11
- private static pxeConfig: PXEServiceConfig | undefined;
12
- private static pxe: PXE | undefined;
13
- private static node: AztecNode | undefined;
14
-
15
- async getPXE() {
16
- if (!PXEWrapper.pxe) {
17
- PXEWrapper.pxe = await createPXEService(PXEWrapper.node!, PXEWrapper.pxeConfig!);
18
- }
19
- return PXEWrapper.pxe;
20
- }
21
-
22
- getNode(): AztecNode | undefined {
23
- return PXEWrapper.node;
24
- }
25
-
26
- prepare(nodeUrl: string, dataDir: string, overridePXEServiceConfig?: Partial<PXEServiceConfig>) {
27
- PXEWrapper.node = createAztecNodeClient(nodeUrl);
28
- const pxeConfig = Object.assign(getPXEServiceConfig(), overridePXEServiceConfig);
29
- pxeConfig.dataDirectory = dataDir;
30
- PXEWrapper.pxeConfig = pxeConfig;
31
- }
32
- }