Skip to content

refactor: merging PXE interface and its implementation#17303

Merged
benesjan merged 1 commit intonextfrom
09-25-refactor_merging_pxe_interface_and_its_implementation
Sep 26, 2025
Merged

refactor: merging PXE interface and its implementation#17303
benesjan merged 1 commit intonextfrom
09-25-refactor_merging_pxe_interface_and_its_implementation

Conversation

@benesjan
Copy link
Contributor

@benesjan benesjan commented Sep 25, 2025

There will always be only 1 implementation of the PXE interface so it didn't really make sense to have it. In this PR I merged it with PXEService (i.e. copy over the docs) and I rename all the occurrences of PXE Service just as PXE. Now that there is no JSON RPC PXE server that name was misleading.

Staring into the abyss

Unfortunately, there is a downside to this PR and that is that I needed to drop the proper PXE type from BaseWallet as Aztec.js cannot import pxe package due to a circular dependency: pxe --> bbprover --> aztec.js --> pxe

For this reason now there is the pxe arg defined as pxe: any. This will get resolved once @aztec/wallet-sdk package is introduced.

Copy link
Contributor Author

benesjan commented Sep 25, 2025


## Usage

To use `aztec-cli`, open a terminal or command prompt and run the `aztec-cli` command followed by the desired command and its options.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was super stale so I just instructed reader to print out aztec-cli --help

import type { AbiType } from './abi.js';
import type { EventSelector } from './event_selector.js';

export type EventMetadataDefinition = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved here from PXE interface as it's imported by both wallet and pxe

import type { ContractArtifact } from '../abi/abi.js';
import type { ContractClassWithId } from './interfaces/contract_class.js';

export interface ContractClassMetadata {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved here from PXE interface as it's imported by both wallet and pxe

@@ -0,0 +1,7 @@
import type { ContractInstanceWithAddress } from './interfaces/contract_instance.js';

export interface ContractMetadata {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved here from PXE interface as it's imported by both wallet and pxe

@benesjan benesjan marked this pull request as ready for review September 25, 2025 14:37
@benesjan benesjan requested a review from Thunkar September 25, 2025 15:10
@benesjan benesjan marked this pull request as draft September 26, 2025 05:06
@benesjan benesjan force-pushed the 09-25-refactor_testwallet_api_cleanup branch from ad7f32e to 3413e33 Compare September 26, 2025 05:10
@benesjan benesjan force-pushed the 09-25-refactor_merging_pxe_interface_and_its_implementation branch 2 times, most recently from 62ef624 to 3c3c721 Compare September 26, 2025 05:14
@benesjan benesjan marked this pull request as ready for review September 26, 2025 06:11
@AztecBot AztecBot force-pushed the 09-25-refactor_testwallet_api_cleanup branch from d7dd3d0 to 94ae864 Compare September 26, 2025 06:12
Base automatically changed from 09-25-refactor_testwallet_api_cleanup to next September 26, 2025 07:29
@benesjan benesjan force-pushed the 09-25-refactor_merging_pxe_interface_and_its_implementation branch from e839241 to 3c4c58e Compare September 26, 2025 07:33
import type { ExecutionPayload } from '@aztec/entrypoints/payload';
import { Fq, Fr } from '@aztec/foundation/fields';
import type { PXE } from '@aztec/pxe';
import type { PXE } from '@aztec/pxe/server';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if just a type import, prefer /client/lazy ones to be safe when these can be imported from the browser

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 1737485

There will always be only 1 implementation of the PXE interface so it didn't really make sense to have it. In this PR I merged it with PXEService (i.e. copy over the docs) and I rename all the occurrences of PXE Service just as PXE. Now that there is no JSON RPC PXE server that name was misleading.

## Staring into the abyss

Unfortunately, there is a downside to this PR and that is that I needed to drop the proper `PXE` type from `BaseWallet` as Aztec.js cannot import pxe package due to a circular dependency: `pxe --> bbprover --> aztec.js --> pxe`

For this reason now there is the pxe arg defined as `pxe: any`. This will get resolved once `@aztec/wallet-sdk` package is introduced.
@AztecBot AztecBot force-pushed the 09-25-refactor_merging_pxe_interface_and_its_implementation branch from 1737485 to 89729a0 Compare September 26, 2025 09:04
@benesjan benesjan added this pull request to the merge queue Sep 26, 2025
Merged via the queue into next with commit 32988a5 Sep 26, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants