> For the complete documentation index, see [llms.txt](/llms.txt)

# 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)](/developers/docs/foundational-topics/pxe.md) through a `PXE` implementation, allowing developers to easily register new accounts, deploy contracts, view functions, and send transactions.

## Installing

```bash
npm install @aztec-labs/aztec.js@6.0.0
```

## Common Dependencies

Most applications will need additional packages alongside `@aztec-labs/aztec.js`, e.g.:

```bash
npm install @aztec-labs/aztec.js@6.0.0 \
  @aztec-labs/accounts@6.0.0 \
  @aztec-labs/wallets@6.0.0 \
  @aztec-labs/noir-contracts.js@6.0.0
```

| Package                         | Description                                                   |
| ------------------------------- | ------------------------------------------------------------- |
| `@aztec-labs/aztec.js`          | Core SDK for contracts, transactions, and network interaction |
| `@aztec-labs/accounts`          | Account contract implementations (Schnorr, ECDSA)             |
| `@aztec-labs/wallets`           | Simplified wallets for local development and scripting        |
| `@aztec-labs/noir-contracts.js` | Pre-compiled contract interfaces (Token, NFT, etc.)           |

## Package Structure

`@aztec-labs/aztec.js` uses subpath exports. You must import from specific subpaths rather than the package root:

```typescript
import { createAztecNodeClient, waitForNode } from "@aztec-labs/aztec.js/node";
import { Fr } from "@aztec-labs/aztec.js/fields";
import { AztecAddress } from "@aztec-labs/aztec.js/addresses";
```

## AI-Friendly Reference

The [TypeScript API reference](/developers/docs/aztec-js/typescript_api_reference.md) links to markdown interface files for common packages for easy use with AI coding assistants. Copy relevant sections to give your AI tool accurate context about Aztec.js APIs.

## Guides

## [📄️Connect to Local Network](/developers/docs/aztec-js/how_to_connect_to_local_network.md)

[Connect your application to the Aztec local network and interact with accounts.](/developers/docs/aztec-js/how_to_connect_to_local_network.md)

## [📄️Creating Accounts](/developers/docs/aztec-js/how_to_create_account.md)

[Step-by-step guide to creating and deploying new user accounts in Aztec.js applications.](/developers/docs/aztec-js/how_to_create_account.md)

## [📄️Deploying Contracts](/developers/docs/aztec-js/how_to_deploy_contract.md)

[Deploy smart contracts to Aztec using generated TypeScript classes.](/developers/docs/aztec-js/how_to_deploy_contract.md)

## [📄️Sending Transactions](/developers/docs/aztec-js/how_to_send_transaction.md)

[Send transactions to Aztec contracts using Aztec.js with various options and error handling](/developers/docs/aztec-js/how_to_send_transaction.md)

## [📄️Reading Contract Data](/developers/docs/aztec-js/how_to_read_data.md)

[How to read data from contracts including simulating functions, reading logs, and retrieving events.](/developers/docs/aztec-js/how_to_read_data.md)

## [📄️Simulate without signing prompts](/developers/docs/aztec-js/how_to_simulate_without_signing.md)

[How to call .simulate() on a view function or estimate gas without prompting the user to sign authentication witnesses.](/developers/docs/aztec-js/how_to_simulate_without_signing.md)

## [📄️Using Authentication Witnesses](/developers/docs/aztec-js/how_to_use_authwit.md)

[Step-by-step guide to implementing authentication witnesses in Aztec.js for delegated transactions.](/developers/docs/aztec-js/how_to_use_authwit.md)

## [📄️Paying Fees](/developers/docs/aztec-js/how_to_pay_fees.md)

[Pay transaction fees on Aztec, understand mana costs, estimate gas, and retrieve fees from receipts.](/developers/docs/aztec-js/how_to_pay_fees.md)

## [📄️Testing Smart Contracts](/developers/docs/aztec-js/how_to_test.md)

[Learn how to write and run tests for your Aztec smart contracts using Aztec.js and a local network.](/developers/docs/aztec-js/how_to_test.md)

## [📄️Pay Fees Privately](/developers/docs/aztec-js/how_to_use_private_fee_juice.md)

[Learn how private fee payment works on Aztec and walk through an example using a community-built fully private Fee Payment Contract.](/developers/docs/aztec-js/how_to_use_private_fee_juice.md)

## [📄️Reference](/developers/docs/aztec-js/aztec_js_reference.md)

[Comprehensive auto-generated reference for the Aztec.js TypeScript library with all classes, interfaces, types, and functions.](/developers/docs/aztec-js/aztec_js_reference.md)

## [📄️TypeScript API Reference](/developers/docs/aztec-js/typescript_api_reference.md)

[API reference documentation for Aztec TypeScript packages including aztec.js, accounts, PXE, and core libraries.](/developers/docs/aztec-js/typescript_api_reference.md)
