bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 45쪽
](#aztec-wallet-send "Direct link to aztec-wallet send")
Calls a function on an Aztec contract.
**Usage:**
```
aztec-wallet send [options] <functionName>
```
**Options:**
* `--args [args...]` - Function arguments (default: \[])
* `-c, --contract-artifact <fileLocation>` - Path to a compiled Aztec contract's artifact in JSON format. If executed inside a nargo workspace, a package and contract name can be specified as package\@contract
* `-ca, --contract-address <address>` - Aztec address of the contract.
* `-a, --alias <string>` - Alias for the transaction hash. Used for easy reference in subsequent commands.
* `-aw, --auth-witness <string,...>` - Authorization witness to use for the transaction. If using multiple, pass a comma separated string
* `-f, --from <string>` - Alias or address of the account to send the transaction from
* `--no-wait` - Print transaction hash without waiting for it to be mined
* `--wait-for-status <status>` - Tx status to wait for: 'proposed' or 'checkpointed' (default: "proposed")
* `-v, --verbose` - Provide timings on all executed operations (synching, simulating, proving) (default: false)
* `--payment <options>` - Fee payment method and arguments. Parameters: method Valid values: "fee\_juice", "fpc-public", "fpc-private", "fpc-sponsored" Default: fee\_juice asset The asset used for fee payment. Required for "fpc-public" and "fpc-private". fpc The FPC contract that pays in fee juice. Not required for the "fee\_juice" method. claim Whether to use a previously stored claim to bridge fee juice. claimSecret The secret to claim fee juice on L1. claimAmount The amount of fee juice to be claimed. messageLeafIndex The index of the claim in the l1toL2Message tree.
* `--gas-limits <da=100,l2=100,teardownDA=10,teardownL2=10>` - Gas limits for the tx.
* `--max-fees-per-gas <da=100,l2=100>` - Maximum fees per gas unit for DA and L2 computation.
* `--max-priority-fees-per-gas <da=0,l2=0>` - Maximum priority fees per gas unit for DA and L2 computation.
* `--estimate-gas-only` - Only report gas estimation for the tx, do not send it.
* `-h, --help` - display help for command
### aztec-wallet simulate[](#aztec-wallet-simulate "Direct link to aztec-wallet simulate")
Simulates the execution of a function on an Aztec contract.
**Usage:**
```
aztec-wallet simulate [options] <functionName>
```
**Options:**
* `--args [args...]` - Function arguments (default: \[])
* `-ca, --contract-address <address>` - Aztec address of the contract.
* `-c, --contract-artifact <fileLocation>` - Path to a compiled Aztec contract's artifact in JSON format. If executed inside a nargo workspace, a package and contract name can be specified as package\@contract
* `-sk, --signing-key <string>` - The sender's signing key (env: SIGNING\_KEY)
* `-aw, --auth-witness <string,...>` - Authorization witness to use for the simulation
* `-f, --from <string>` - Alias or address of the account to simulate from
* `-v, --verbose` - Provide timings on all executed operations (synching, simulating, proving) (default: false)
* `--payment <options>` - Fee payment method and arguments. Parameters: method Valid values: "fee\_juice", "fpc-public", "fpc-private", "fpc-sponsored" Default: fee\_juice asset The asset used for fee payment. Required for "fpc-public" and "fpc-private". fpc The FPC contract that pays in fee juice. Not required for the "fee\_juice" method. claim Whether to use a previously stored claim to bridge fee juice. claimSecret The secret to claim fee juice on L1. claimAmount The amount of fee juice to be claimed. messageLeafIndex The index of the claim in the l1toL2Message tree.
* `--gas-limits <da=100,l2=100,teardownDA=10,teardownL2=10>` - Gas limits for the tx.
* `--max-fees-per-gas <da=100,l2=100>` - Maximum fees per gas unit for DA and L2 computation.
* `--max-priority-fees-per-gas <da=0,l2=0>` - Maximum priority fees per gas unit for DA and L2 computation.
* `--estimate-gas-only` - Only report gas estimation for the tx, do not send it.
* `-h, --help` - display help for command
---
# Aztec Overview
This page outlines Aztec's fundamental technical concepts. It is recommended to read this before diving into building on Aztec.
## What is Aztec?[](#what-is-aztec "Direct link to What is Aztec?")
Aztec is a privacy-first Layer 2 on Ethereum. It supports smart contracts with both private & public state and private & public execution.
Prefer video? This explainer covers the core idea in under 90 seconds, and there are more [video lessons](/developers/testnet/docs/resources/video_lessons.md) available.
[What is Aztec: Explained in Under 90 Seconds](https://www.youtube-nocookie.com/embed/urcBvo2QJp0)

## High level view[](#high-level-view "Direct link to High level view")

1. A user interacts with Aztec through Aztec.js (like web3js or ethersjs)
2. Private functions are executed in the PXE, which is client-side
3. Proofs and tree updates are sent to the Public VM (running on an Aztec node)
4. Public functions are executed in the Public VM
5. The Public VM rolls up the transactions that include private and public state updates into blocks
6. The block data and proof of a correct state transition are submitted to Ethereum for verification
## Private and public execution[](#private-and-public-execution "Direct link to Private and public execution")
Private functions are executed client side, on user devices to maintain maximum privacy. Public functions are executed by a remote network of nodes, similar to other blockchains. These distinct execution environments create a directional execution flow for a single transaction--a transaction begins in the private context on the user's device then moves to the public network. This means that private functions executed by a transaction can enqueue public functions to be executed later in the transaction life cycle, but public functions cannot call private functions.
### Private Execution Environment (PXE)[](#private-execution-environment-pxe "Direct link to Private Execution Environment (PXE)")
Private functions are executed on the user's device in the Private Execution Environment (PXE, pronounced 'pixie'), then it generates proofs for onchain verification. It is a client-side library for execution and proof-generation of private operations. It holds keys, notes, and generates proofs. It is included in aztec.js, a TypeScript library, and can be run within Node or the browser.
Note: It is easy for private functions to be written in a detrimentally unoptimized way, because many intuitions of regular program execution do not apply to proving. For more about writing performant private functions in Noir, see [this page](https://noir-lang.org/docs/guides/thinking_in_circuits) of the Noir documentation.
### Aztec Virtual Machine (AVM)[](#aztec-virtual-machine-avm "Direct link to Aztec Virtual Machine (AVM)")
Public functions are executed by the Aztec Virtual Machine (AVM), which is conceptually similar to the Ethereum Virtual Machine (EVM). As such, writing efficient public functions follow the same intuition as gas-efficient solidity contracts.
The PXE is unaware of the Public VM. And the Public VM is unaware of the PXE. They are completely separate execution environments. This means:
* The PXE and the Public VM cannot directly communicate with each other
* Private transactions in the PXE are executed first, followed by public transactions
## Private and public state[](#private-and-public-state "Direct link to Private and public state")
Private state works with UTXOs, which are chunks of data that we call notes. To keep things private, notes are stored in an [append-only UTXO tree](/developers/testnet/docs/foundational-topics/advanced/storage/indexed_merkle_tree.md), and a nullifier is created when notes are invalidated (aka deleted). Nullifiers are stored in their own [nullifier tree](/developers/testnet/docs/foundational-topics/advanced/storage/indexed_merkle_tree.md).
Public state works similarly to other chains like Ethereum, behaving like a public ledger. Public data is stored in a public data tree.

Aztec [smart contract](/developers/testnet/docs/aztec-nr/framework-description/contract_structure.md) developers should keep in mind that different data types are used when manipulating private or public state. Working with private state is creating commitments and nullifiers to state, whereas working with public state is directly updating state.
## Accounts and keys[](#accounts-and-keys "Direct link to Accounts and keys")
### Account abstraction[](#account-abstraction "Direct link to Account abstraction")
Every account in Aztec is a smart contract (account abstraction). This allows implementing different schemes for authorizing transactions, nonce management, and fee payments.
Developers can write their own account contract to define the rules by which user transactions are authorized and paid for, as well as how user keys are managed.
Learn more about account contracts [here](/developers/testnet/docs/foundational-topics/accounts.md).
### Key pairs[](#key-pairs "Direct link to Key pairs")
Each account in Aztec is backed by 3 key pairs:
* A **nullifier key pair** used for note nullifier computation
* A **incoming viewing key pair** used to encrypt a note for the recipient
* A **outgoing viewing key pair** used to encrypt a note for the sender
As Aztec has native account abstraction, accounts do not automatically have a signing key pair to authenticate transactions. This is up to the account contract developer to implement.
## Noir[](#noir "Direct link to Noir")
Noir is a zero-knowledge domain specific language used for writing smart contracts for the Aztec network. It is also possible to write circuits with Noir that can be verified on or offchain. For more in-depth docs into the features of Noir, go to the [Noir documentation](https://noir-lang.org/).
---
# Understanding Accounts in Aztec
This page provides a comprehensive understanding of how accounts work in Aztec. We'll explore the architecture, implementation details, and the powerful features enabled by Aztec's native account abstraction.
## What is Account Abstraction?[](#what-is-account-abstraction "Direct link to What is Account Abstraction?")
Account abstraction fundamentally changes how we think about blockchain accounts. Instead of accounts being simple key pairs (like in Bitcoin or traditional Ethereum EOAs), accounts become programmable smart contracts that can define their own rules for authentication, authorization, and transaction execution.
### Why Account Abstraction Matters[](#why-account-abstraction-matters "Direct link to Why Account Abstraction Matters")
Traditional blockchain accounts have significant limitations:
* **Rigid authentication**: You lose your private key, you lose everything
* **Limited authorization**: Can't easily implement multi-signature schemes or time-locked transactions
* **Fixed fee payment**: Must pay fees in the native token from the same account
* **No customization**: Can't adapt to different security requirements or use cases
Account abstraction solves these problems by making accounts programmable. This enables:
* **Recovery mechanisms**: Social recovery, hardware wallet backups, time-delayed recovery
* **Flexible authentication**: Biometrics, passkeys, multi-factor authentication, custom signature schemes
* **Fee abstraction**: Pay fees in any token, or have someone else pay for you
* **Custom authorization**: Complex permission systems, spending limits, automated transactions
## Aztec's Native Account Abstraction[](#aztecs-native-account-abstraction "Direct link to Aztec's Native Account Abstraction")
Unlike Ethereum where account abstraction is implemented at the application layer (ex. ERC-4337), Aztec has **native account abstraction** at the protocol level. This means:
1. **Every account is a smart contract** - There are no externally owned accounts (EOAs)
2. **Unified experience** - All accounts have the same capabilities and flexibility
3. **Protocol-level support** - The entire network is designed around smart contract accounts
4. **Privacy-first design** - Account abstraction works seamlessly with Aztec's privacy features
### Breaking the DoS Attack Problem[](#breaking-the-dos-attack-problem "Direct link to Breaking the DoS Attack Problem")
One of the biggest challenges in account abstraction is preventing denial-of-service (DoS) attacks. If accounts can have arbitrary validation logic, malicious actors could flood the network with transactions that are expensive to validate but ultimately invalid.
Other account abstraction systems (like ERC-4337) solve this by restricting what validation logic can do - limiting opcodes, storage access, and gas. This works but limits flexibility.
Aztec takes a different approach: validation happens client-side with ZK proofs, so the sequencer only verifies a constant-size proof regardless of validation complexity:
<!-- -->
With this approach:
* **Client performs validation**: All complex logic runs on the user's device
* **Proof generation**: The client generates a succinct ZK proof that validation succeeded
* **Constant verification cost**: The sequencer only verifies the proof - a constant-time operation regardless of validation complexity
This means we can have:
* **Unlimited validation complexity** without affecting network performance
* **Free complex operations** like verifying 100 signatures or checking complex conditions
* **Better privacy** as validation logic isn't visible onchain
## How Aztec Accounts Work[](#how-aztec-accounts-work "Direct link to How Aztec Accounts Work")
### Account Architecture[](#account-architecture "Direct link to Account Architecture")
Every Aztec account is a smart contract with a specific structure. At its core, an account contract must:
1. **Authenticate transactions** - Verify that the transaction is authorized by the account owner
2. **Execute calls** - Perform the requested operations (transfers, contract calls, etc.)
3. **Manage keys** - Handle the various keys used for privacy and authentication
4. **Handle fees** - Determine how transaction fees are paid
### The Account Contract Structure[](#the-account-contract-structure "Direct link to The Account Contract Structure")
Here's the essential structure of an Aztec account contract:
<!-- -->
The entrypoint function follows this pattern:
1. **Authentication** - Verify the transaction is authorized (signatures, multisig, etc.)
2. **Fee Payer Setup** - Set the account as fee payer if using its own balance
3. **Application Execution** - Execute the requested function calls
4. **Cancellation Handling** - Optionally emit a nullifier for transaction cancellation
### Address Derivation[](#address-derivation "Direct link to Address Derivation")
Aztec addresses are **deterministic** - they can be computed before deployment. An address is derived from:
```
Address = hash(
public_keys_hash, // All the account's public keys
partial_address // Contract deployment information
)
```
Where:
* **public\_keys\_hash** = Combined hash of nullifier, incoming viewing, and other keys
* **partial\_address** = Hash of the contract code and deployment parameters
This deterministic addressing enables powerful features:
* **Pre-funding**: Send funds to an address before the account is deployed
* **Counterfactual deployment**: Interact with an account as if it exists, deploy it later
* **Address recovery**: Recompute addresses from known keys
#### Complete Address[](#complete-address "Direct link to Complete Address")
While an address alone is sufficient for receiving funds, spending notes requires a **complete address** which includes:
* All the user's public keys (nullifier, incoming viewing, etc.)
* The partial address (contract deployment information)
* The contract address itself
The complete address proves that the nullifier key inside the address is correct, enabling the user to spend their notes.
## The Entrypoint Pattern[](#the-entrypoint-pattern "Direct link to The Entrypoint Pattern")
The entrypoint is the gateway to your account. When someone wants to execute a transaction from your account, they call the entrypoint with a payload describing what to do.
### Transaction Flow[](#transaction-flow "Direct link to Transaction Flow")
Here's how a transaction flows through an account:
<!-- -->
### Non-Standard Entrypoints[](#non-standard-entrypoints "Direct link to Non-Standard Entrypoints")
The beauty of account abstraction is that not every contract needs authentication. Some contracts can have **permissionless entrypoints**.
For example, a lottery contract where anyone can trigger the payout:
* No authentication required
* Anyone can call the function
* The contract itself handles the logic and constraints
This pattern is useful for:
* **Automated operations**: Keepers can trigger time-based actions
* **Public goods**: Anyone can advance the state of a protocol
* **Gasless transactions**: Users don't need to hold fee tokens
## Account Lifecycle[](#account-lifecycle "Direct link to Account Lifecycle")
### 1. Pre-deployment (Counterfactual State)[](#1-pre-deployment-counterfactual-state "Direct link to 1. Pre-deployment (Counterfactual State)")
Before deployment, an account exists in a **counterfactual state**:
* The address can be computed deterministically
* Can receive funds (notes can be encrypted to the address)
* Cannot send transactions (no code deployed)
### 2. Deployment[](#2-deployment "Direct link to 2. Deployment")
Deploying an account involves:
1. Submitting the account contract code
2. Registering in the contract instance registry
3. Paying deployment fees (either self-funded or sponsored)
See [Creating Accounts](/developers/testnet/docs/aztec-js/how_to_create_account.md) for code examples.
### 3. Initialization[](#3-initialization "Direct link to 3. Initialization")
Accounts can be initialized for different purposes:
* **Private-only**: Just needs initialization, no public deployment
* **Public interaction**: Requires both initialization and deployment
The contract is initialized when one of the functions marked with the `#[initializer]` annotation has been invoked. Multiple functions in the contract can be marked as initializers. Contracts may have functions that skip the initialization check (marked with `#[noinitcheck]`).
note
Account deployment and initialization are not required to receive notes. The user address is deterministically derived, so funds can be sent to an account that hasn't been deployed yet.
### 4. Active Use[](#4-active-use "Direct link to 4. Active Use")
Once deployed and initialized, accounts can:
* Send and receive private notes
* Interact with public and private functions
* Authorize actions via authentication witnesses
* Pay fees in various ways
## Authentication Witnesses (AuthWit)[](#authentication-witnesses-authwit "Direct link to Authentication Witnesses (AuthWit)")
Aztec replaces Ethereum's dangerous "infinite approval" pattern with **Authentication Witnesses** - a more secure authorization scheme where users sign specific actions rather than granting blanket permissions.
Instead of approving unlimited token transfers, users authorize exact actions with precise parameters. This eliminates persistent security risks while enabling better UX through batched operations.
For detailed information about how AuthWit works in both private and public contexts, see the [Authentication Witness documentation](/developers/testnet/docs/foundational-topics/advanced/authwit.md).
## Transaction Abstractions[](#transaction-abstractions "Direct link to Transaction Abstractions")
Aztec abstracts two cr프로젝트로 돌아가기