Skip to main content
Version: alpha-testnet

Aztec.js

Aztec.js is a library that provides APIs for managing accounts and interacting with contracts on the Aztec network. It communicates with the Private eXecution Environment (PXE) through a PXE implementation, allowing developers to easily register new accounts, deploy contracts, view functions, and send transactions.

Installing

npm install @aztec/aztec.js

Importing

At the top of your JavaScript file, you can import what you need, eg:

import_aztecjs
import type { AztecNodeConfig } from "@aztec/aztec-node";
import {
type AztecNode,
ContractDeployer,
Fr,
type Wallet,
waitForProven,
} from "@aztec/aztec.js";
Source code: yarn-project/end-to-end/src/e2e_simple.test.ts#L1-L4

Flow

These are some of the important functions you'll need to use in your Aztec.js: