一键导入
aztec-pxe
// Use this skill when implementing or debugging direct PXE workflows in TypeScript, including private execution lifecycle, note discovery/synchronization, sender/recipient tagging, private events, scopes, and oracle/debug checks.
// Use this skill when implementing or debugging direct PXE workflows in TypeScript, including private execution lifecycle, note discovery/synchronization, sender/recipient tagging, private events, scopes, and oracle/debug checks.
Use this skill when working with Aztec account implementations and lifecycle flows, including Schnorr/ECDSA account flavors, account abstraction entrypoints, transaction routing, key-store integration, deployment, and wallet reconstruction.
Use this skill when creating, editing, testing, debugging, or upgrading Aztec smart contracts in Noir/Aztec.nr, including storage modeling, private/public/utility functions, note delivery, authwit authorization, TestEnvironment tests, and artifact/codegen workflows.
Use this skill when deploying Aztec smart contracts (not authoring them), including local-network and devnet deployment via aztec-wallet/Aztec.js, fee-payment setup, deterministic addresses, deployment verification, and contract registration workflows.
Use this skill when building TypeScript applications with Aztec.js, including node/PXE connectivity, account lifecycle, contract deployment and interaction, transaction/fee handling, authwit authorization, event reads, and test automation.
Use this skill when testing Aztec smart contracts, including Noir tests with TestEnvironment and TypeScript integration tests with Aztec.js on local-network/devnet-like setups.
Use this skill when integrating Aztec wallet connectivity with @aztec/wallet-sdk, including discovery/session flows, secure-channel key exchange, extension handlers, encrypted messaging, and BaseWallet implementations.
| name | aztec-pxe |
| description | Use this skill when implementing or debugging direct PXE workflows in TypeScript, including private execution lifecycle, note discovery/synchronization, sender/recipient tagging, private events, scopes, and oracle/debug checks. |
| license | Proprietary. LICENSE.txt has complete terms |
| compatibility | Pinned to aztec-packages v4.2.0 (commit f8c89cf4345df6c4ca9e66ea9b738e96070abc5a). |
| metadata | {"version_label":"v4.2.0","commit_sha":"f8c89cf4345df6c4ca9e66ea9b738e96070abc5a","source_map":"aztec-packages/yarn-project/pxe"} |
Use this skill for direct @aztec/pxe work.
Primary scope:
simulateTx, profileTx, proveTx, executeUtility)Out of scope:
aztec-contracts)aztec-js)aztec-deployment)Use the upstream repository and pin:
https://github.com/AztecProtocol/aztec-packagesv4.2.0f8c89cf4345df6c4ca9e66ea9b738e96070abc5ayarn-project/pxeCheckout example:
git clone https://github.com/AztecProtocol/aztec-packages.git
cd aztec-packages
git checkout v4.2.0
git status
Expected status includes HEAD detached at v4.2.0.
scopes: AztecAddress[] list; the 'ALL_SCOPES' sentinel was removed. To emulate the old "see everything" behavior, pass the enumerated list of registered addresses: scopes = (await pxe.getRegisteredAccounts()).map(a => a.address).scopes list fails at runtime with Scope 0x… is not in the allowed scopes list: [...]. AztecAddress::zero() is always permitted (global scope).registerAccount(...) before expecting note or private event visibility.registerSender(...) when syncing tagged logs across peers.simulateTx before proveTx; only prove after simulation and sync checks pass.filter.scopes must be non-empty and block range follows [fromBlock, toBlock).debug.getNotes(...) only for diagnostics; prefer contract utility functions for production reads.# install dependencies in your app
scripts/install_pxe_deps.sh npm
# check node reachability + optional pxe source path validation
scripts/preflight_pxe.sh http://localhost:8080 /path/to/aztec-packages/yarn-project/pxe
import { createAztecNodeClient, waitForNode } from '@aztec/aztec.js/node';
import { createPXE, getPXEConfig } from '@aztec/pxe/server';
const node = createAztecNodeClient('http://localhost:8080');
await waitForNode(node);
const pxe = await createPXE(node, getPXEConfig(), {
loggerActorLabel: 'app-pxe',
});
createPXE(...) from @aztec/pxe/server or @aztec/pxe/client/lazy.getSyncedBlockHeader() to confirm the current anchor block before execution.registerAccount(secretKey, partialAddress).registerSender(senderAddress).registerContractClass(...) and registerContract(...).getRegisteredAccounts(), getSenders(), getContractInstance().simulateTx(txRequest, opts) for private (and optional public) simulation.
opts.overrides?: SimulationOverrides injects simulation-time contract instances/artifacts (useful for testing).profileTx(txRequest, { profileMode, scopes }) for execution/gate diagnostics.
profileMode values: 'full' | 'execution-steps' | 'gates'.proveTx(txRequest, scopes) only after simulation correctness is confirmed.
TxProvingResult; publicInputs is non-optional on the result.executeUtility(functionCall, { authwits, scopes }) for utility paths and sync-state calls.[] scopes deny access and skip sync.debug.sync() to force an explicit sync checkpoint when diagnosing stale state.debug.getNotes({ contractAddress, owner?, storageSlot?, status?, siloedNullifier?, scopes }) for note-level diagnostics.(sender, recipient, contract).getPrivateEvents(eventSelector, filter).contractAddressscopes (non-empty)txHash, fromBlock, toBlock (toBlock exclusive).scripts/check_oracle_version.sh against your pinned aztec-packages checkout.utilityLog outputs and simulation traces (profileTx) to localize oracle call failures.PXEDebugUtils APIs as unstable and diagnostics-only.pxe.stop() on teardown to end queued jobs cleanly.# preflight node/package manager/source checks
scripts/preflight_pxe.sh [node-url] [pxe-dir]
# install core PXE dependencies
scripts/install_pxe_deps.sh <npm|yarn|pnpm> [version]
# wait for node JSON-RPC readiness
scripts/wait_for_aztec_node.sh <node-url> [timeout-seconds] [interval-seconds]
# run a TypeScript example via tsx
scripts/run_pxe_example.sh <entry-file.ts> [-- <extra-args...>]
# summarize pxe package exports + method surfaces
scripts/summarize_pxe_surface.sh <aztec-packages-dir>
# run @aztec/pxe package tests
scripts/run_pxe_tests.sh <aztec-packages-dir> [test-path-pattern]
# run oracle interface compatibility check
scripts/check_oracle_version.sh <aztec-packages-dir>
At least one scope is required to get private events:
provide non-empty filter.scopes.Incompatible oracle version error:
run oracle version check and align Aztec.nr/PXE versions.debug.sync() and re-run with fresh anchor block.reference.md for source map and API/file coverage.patterns.md for reusable workflow snippets.scripts/ for repeatable diagnostics and verification.