Aztec.js API Reference (TypeDoc)
This documentation is auto-generated from the Aztec.js TypeScript source code using TypeDoc.
This is an auto-generated reference using TypeDoc. For tutorials and guides, see the Aztec.js Overview.
Package: @aztec/aztec.js
Generated: 2025-11-05T19:31:53.805Z
This document provides a comprehensive reference for all public APIs in the Aztec.js library.
Each section is organized by module, with classes, interfaces, types, and functions documented with their full signatures, parameters, and return types.
Table of Contents
- Account / Account
- Account / Account contract
- Account / Account with secret key
- Account / Interface
- Account / Signerless account
- Authorization / Call authorization request
- Contract / Base contract interaction
- Contract / Batch call
- Contract / Checker
- Contract / Contract
- Contract / Contract base
- Contract / Contract function interaction
- Contract / Deploy method
- Contract / Deploy sent tx
- Contract / Get gas limits
- Contract / Interaction options
- Contract / Protocol contracts
- Contract / Sent tx
- Contract / Unsafe contract
- Contract / Wait for proven
- Deployment / Broadcast function
- Deployment / Contract deployer
- Deployment / Publish class
- Deployment / Publish instance
- Ethereum / Portal manager
- Fee / Fee juice payment method with claim
- Fee / Fee payment method
- Fee / Private fee payment method
- Fee / Public fee payment method
- Fee / Sponsored fee payment
- Utils / Abi types
- Utils / Authwit
- Utils / Cross chain
- Utils / Fee juice
- Utils / Field compressed string
- Utils / Node
- Utils / Pub key
- Wallet / Account entrypoint meta payment method
- Wallet / Account manager
- Wallet / Base wallet
- Wallet / Deploy account method
- Wallet / Wallet
- Aliased
- BatchableMethods
- BatchedMethod
- BatchedMethodResult
- BatchedMethodResultWrapper
- BatchResults
- ContractInstanceAndArtifact
- ProfileOptions
- SendOptions
- SimulateOptions
- UserFeeOptions
- Wallet
- BatchedMethodSchema
- ContractClassMetadataSchema
- ContractInstantiationDataSchema
- ContractMetadataSchema
- EventMetadataDefinitionSchema
- ExecutionPayloadSchema
- FunctionCallSchema
- InstanceDataSchema
- MessageHashOrIntentSchema
- ProfileOptionsSchema
- SendOptionsSchema
- SimulateOptionsSchema
- UserFeeOptionsSchema
- WalletSchema
- WalletSimulationFeeOptionSchema
Account / Account
account/account
Classes
Type Aliases
BaseAccount
Defined in: account/account.ts:34
An account implementation that uses authwits as an authentication mechanism and can assemble transaction execution requests for an entrypoint.
Extended by
Implements
Constructors
Constructor
new BaseAccount(
account):BaseAccount
Defined in: account/account.ts:35
Parameters
account
Returns
BaseAccount
Properties
account
protectedaccount:AccountInterface
Defined in: account/account.ts:35
Methods
createTxExecutionRequest()
createTxExecutionRequest(
exec,gasSettings,options):Promise<TxExecutionRequest>
Defined in: account/account.ts:37
Parameters
exec
ExecutionPayload
gasSettings
GasSettings
options
DefaultAccountEntrypointOptions
Returns
Promise<TxExecutionRequest>
getChainId()
getChainId():
Fr
Defined in: account/account.ts:45
Returns the chain id for this account
Returns
Fr
Implementation of
Account.getChainId
getVersion()
getVersion():
Fr
Defined in: account/account.ts:49
Returns the rollup version for this account
Returns
Fr
Implementation of
Account.getVersion
getCompleteAddress()
getCompleteAddress():
CompleteAddress
Defined in: account/account.ts:54
Returns the complete address of the account that implements this wallet.
Returns
CompleteAddress
Implementation of
Account.getCompleteAddress
getAddress()
getAddress():
any
Defined in: account/account.ts:59
Returns the address of the account that implements this wallet.
Returns
any
Implementation of
Account.getAddress
createAuthWit()
createAuthWit(
messageHashOrIntent):Promise<AuthWitness>
Defined in: account/account.ts:73
Computes an authentication witness from either a message hash or an intent.
If a message hash is provided, it will create a witness for the hash directly. Otherwise, it will compute the message hash using the intent, along with the chain id and the version values provided by the wallet.
Parameters
messageHashOrIntent
any
The message hash of the intent to approve
Returns
Promise<AuthWitness>
The authentication witness
Implementation of
Account.createAuthWit
Account
Account =
AccountInterface&AuthwitnessIntentProvider
Defined in: account/account.ts:28
A type defining an account, capable of both creating authwits and using them to authenticate transaction execution requests.
Account / Account contract
account/account_contract
Interfaces
Functions
getAccountContractAddress()
getAccountContractAddress(
accountContract,secret,salt):Promise<any>
Defined in: account/account_contract.ts:53
Compute the address of an account contract from secret and salt.
Parameters
accountContract
secret
Fr
salt
Fr
Returns
Promise<any>
AccountContract
Defined in: account/account_contract.ts:14
An account contract instance. Knows its artifact, deployment arguments, how to create transaction execution requests out of function calls, and how to authorize actions.
Methods
getContractArtifact()
getContractArtifact():
Promise<ContractArtifact>
Defined in: account/account_contract.ts:18
Returns the artifact of this account contract.
Returns
Promise<ContractArtifact>
getInitializationFunctionAndArgs()
getInitializationFunctionAndArgs():
Promise<{constructorName:string;constructorArgs:any[]; } |undefined>
Defined in: account/account_contract.ts:23
Returns the initializer function name and arguments for this instance, or undefined if this contract does not require initialization.
Returns
Promise<{ constructorName: string; constructorArgs: any[]; } | undefined>
getInterface()
getInterface(
address,chainInfo):AccountInterface
Defined in: account/account_contract.ts:41
Returns the account interface for this account contract given an instance at the provided address. The account interface is responsible for assembling tx requests given requested function calls, and for creating signed auth witnesses given action identifiers (message hashes).
Parameters
address
CompleteAddress
Address of this account contract.
chainInfo
ChainInfo
Chain id and version of the rollup where the account contract is initialized / published.
Returns
An account interface instance for creating tx requests and authorizing actions.
getAuthWitnessProvider()
getAuthWitnessProvider(
address):AuthWitnessProvider
Defined in: account/account_contract.ts:47
Returns the auth witness provider for the given address.
Parameters
address
CompleteAddress
Address for which to create auth witnesses.
Returns
AuthWitnessProvider
Account / Account with secret key
account/account_with_secret_key
Classes
AccountWithSecretKey
Defined in: account/account_with_secret_key.ts:13
Extends Account with the encryption private key. Not required for implementing the wallet interface but useful for testing purposes or exporting an account to another pxe.
Extends
Constructors
Constructor
new AccountWithSecretKey(
account,secretKey,salt):AccountWithSecretKey
Defined in: account/account_with_secret_key.ts:14
Parameters
account
secretKey
Fr
salt
any
Deployment salt for this account contract.
Returns
AccountWithSecretKey
Overrides
Properties
account
protectedaccount:AccountInterface
Defined in: account/account.ts:35
Inherited from
salt
readonlysalt:any
Defined in: account/account_with_secret_key.ts:18
Deployment salt for this account contract.
Methods
createTxExecutionRequest()
createTxExecutionRequest(
exec,gasSettings,options):Promise<TxExecutionRequest>
Defined in: account/account.ts:37
Parameters
exec
ExecutionPayload
gasSettings
GasSettings
options
DefaultAccountEntrypointOptions
Returns
Promise<TxExecutionRequest>
Inherited from
BaseAccount.createTxExecutionRequest
getChainId()
getChainId():
Fr
Defined in: account/account.ts:45
Returns the chain id for this account
Returns
Fr
Inherited from
getVersion()
getVersion():
Fr
Defined in: account/account.ts:49
Returns the rollup version for this account
Returns
Fr
Inherited from
getCompleteAddress()
getCompleteAddress():
CompleteAddress
Defined in: account/account.ts:54
Returns the complete address of the account that implements this wallet.
Returns
CompleteAddress
Inherited from
BaseAccount.getCompleteAddress
getAddress()
getAddress():
any
Defined in: account/account.ts:59
Returns the address of the account that implements this wallet.
Returns
any
Inherited from
createAuthWit()
createAuthWit(
messageHashOrIntent):Promise<AuthWitness>
Defined in: account/account.ts:73
Computes an authentication witness from either a message hash or an intent.
If a message hash is provided, it will create a witness for the hash directly. Otherwise, it will compute the message hash using the intent, along with the chain id and the version values provided by the wallet.
Parameters
messageHashOrIntent
any
The message hash of the intent to approve
Returns
Promise<AuthWitness>
The authentication witness
Inherited from
getSecretKey()
getSecretKey():
Fr
Defined in: account/account_with_secret_key.ts:24
Returns the encryption private key associated with this account.
Returns
Fr
getEncryptionSecret()
getEncryptionSecret():
Promise<any>
Defined in: account/account_with_secret_key.ts:32
Returns the encryption secret, the secret of the encryption point—the point that others use to encrypt messages to this account note - this ensures that the address secret always corresponds to an address point with y being positive dev - this is also referred to as the address secret, which decrypts payloads encrypted to an address point
Returns
Promise<any>
Account / Interface
account/interface
Interfaces
AccountInterface
Defined in: account/interface.ts:12
Handler for interfacing with an account. Knows how to create transaction execution requests and authorize actions for its corresponding account.
Extends
Methods
getCompleteAddress()
getCompleteAddress():
CompleteAddress
Defined in: account/interface.ts:14
Returns the complete address for this account.
Returns
CompleteAddress
getAddress()
getAddress():
AztecAddress
Defined in: account/interface.ts:17
Returns the address for this account.
Returns
AztecAddress
getChainId()
getChainId():
Fr
Defined in: account/interface.ts:20
Returns the chain id for this account
Returns
Fr
getVersion()
getVersion():
Fr
Defined in: account/interface.ts:23
Returns the rollup version for this account
Returns
Fr
Account / Signerless account
account/signerless_account
Classes
SignerlessAccount
Defined in: account/signerless_account.ts:17
Account implementation which creates a transaction using the multicall protocol contract as entrypoint.
Implements
Constructors
Constructor
new SignerlessAccount(
chainInfo):SignerlessAccount
Defined in: account/signerless_account.ts:19
Parameters
chainInfo
ChainInfo
Returns
SignerlessAccount
Methods
createTxExecutionRequest()
createTxExecutionRequest(
exec,gasSettings):Promise<TxExecutionRequest>
Defined in: account/signerless_account.ts:23
Parameters
exec
ExecutionPayload
gasSettings
GasSettings
Returns
Promise<TxExecutionRequest>
getChainId()
getChainId():
Fr
Defined in: account/signerless_account.ts:27
Returns the chain id for this account
Returns
Fr
Implementation of
Account.getChainId
getVersion()
getVersion():
Fr
Defined in: account/signerless_account.ts:31
Returns the rollup version for this account
Returns
Fr
Implementation of
Account.getVersion
getCompleteAddress()
getCompleteAddress():
CompleteAddress
Defined in: account/signerless_account.ts:35
Returns the complete address for this account.
Returns
CompleteAddress
Implementation of
Account.getCompleteAddress
getAddress()
getAddress():
AztecAddress
Defined in: account/signerless_account.ts:39
Returns the address for this account.
Returns
AztecAddress
Implementation of
Account.getAddress
createAuthWit()
createAuthWit(
_intent):Promise<AuthWitness>
Defined in: account/signerless_account.ts:43
Creates a private authwit from an intent or inner hash, to be provided during function execution
Parameters
_intent
any
Returns
Promise<AuthWitness>
Implementation of
Account.createAuthWit
Authorization / Call authorization request
authorization/call_authorization_request
Classes
CallAuthorizationRequest
Defined in: authorization/call_authorization_request.ts:10
An authwit request for a function call. Includes the preimage of the data to be signed, as opposed of just the inner hash.
Constructors
Constructor
new CallAuthorizationRequest(
selector,innerHash,msgSender,functionSelector,argsHash,args):CallAuthorizationRequest
Defined in: authorization/call_authorization_request.ts:11
Parameters
selector
AuthorizationSelector
The selector of the authwit type, used to identify it
when emitted from emit_offchain_effectoracle.
Computed as poseidon2("CallAuthwit((Field),(u32),Field)".to_bytes())
innerHash
Fr
The inner hash of the authwit, computed as poseidon2([msg_sender, selector, args_hash])
msgSender
AztecAddress
The address performing the call
functionSelector
FunctionSelector
The selector of the function that is to be authorized
argsHash
Fr
The hash of the arguments to the function call,
args
Fr[]
The arguments to the function call.
Returns
CallAuthorizationRequest
Properties
selector
selector:
AuthorizationSelector
Defined in: authorization/call_authorization_request.ts:17
The selector of the authwit type, used to identify it
when emitted from emit_offchain_effectoracle.
Computed as poseidon2("CallAuthwit((Field),(u32),Field)".to_bytes())
innerHash
innerHash:
Fr
Defined in: authorization/call_authorization_request.ts:22
The inner hash of the authwit, computed as poseidon2([msg_sender, selector, args_hash])
msgSender
msgSender:
AztecAddress
Defined in: authorization/call_authorization_request.ts:26
The address performing the call
functionSelector
functionSelector:
FunctionSelector
Defined in: authorization/call_authorization_request.ts:30
The selector of the function that is to be authorized
argsHash
argsHash:
Fr
Defined in: authorization/call_authorization_request.ts:34
The hash of the arguments to the function call,
args
args:
Fr[]
Defined in: authorization/call_authorization_request.ts:38
The arguments to the function call.
Methods
getSelector()
staticgetSelector():Promise<AuthorizationSelector>
Defined in: authorization/call_authorization_request.ts:41
Returns
Promise<AuthorizationSelector>
fromFields()
staticfromFields(fields):Promise<CallAuthorizationRequest>
Defined in: authorization/call_authorization_request.ts:45
Parameters
fields
Fr[]
Returns
Promise<CallAuthorizationRequest>
Contract / Base contract interaction
contract/base_contract_interaction
Classes
BaseContractInteraction
Defined in: contract/base_contract_interaction.ts:14
Base class for an interaction with a contract, be it a deployment, a function call, or a batch. Implements the sequence create/simulate/send.
Extended by
Constructors
Constructor
new BaseContractInteraction(
wallet,authWitnesses,capsules):BaseContractInteraction
Defined in: contract/base_contract_interaction.ts:17
Parameters
wallet
authWitnesses
AuthWitness[] = []
capsules
Capsule[] = []
Returns
BaseContractInteraction
Properties
log
protectedlog:any
Defined in: contract/base_contract_interaction.ts:15
wallet
protectedwallet:Wallet
Defined in: contract/base_contract_interaction.ts:18
authWitnesses
protectedauthWitnesses:AuthWitness[] =[]
Defined in: contract/base_contract_interaction.ts:19
capsules
protectedcapsules:Capsule[] =[]
Defined in: contract/base_contract_interaction.ts:20
Methods
request()
abstractrequest(options?):Promise<ExecutionPayload>
Defined in: contract/base_contract_interaction.ts:29
Returns an execution request that represents this operation. Can be used as a building block for constructing batch requests.
Parameters
options?
An optional object containing additional configuration for the transaction.
Returns
Promise<ExecutionPayload>
An execution request wrapped in promise.
send()
send(
options):SentTx
Defined in: contract/base_contract_interaction.ts:41
Sends a transaction to the contract function with the specified options. This function throws an error if called on a utility function. It creates and signs the transaction if necessary, and returns a SentTx instance, which can be used to track the transaction status, receipt, and events.
Parameters
options
An object containing 'from' property representing the AztecAddress of the sender and optional fee configuration
Returns
A SentTx instance for tracking the transaction status and information.
Contract / Batch call
contract/batch_call
Classes
BatchCall
Defined in: contract/batch_call.ts:13
A batch of function calls to be sent as a single transaction through a wallet.
Extends
Constructors
Constructor
new BatchCall(
wallet,interactions):BatchCall
Defined in: contract/batch_call.ts:14
Parameters
wallet
interactions
any[]
Returns
BatchCall
Overrides
BaseContractInteraction.constructor
Properties
log
protectedlog:any
Defined in: contract/base_contract_interaction.ts:15
Inherited from
wallet
protectedwallet:Wallet
Defined in: contract/base_contract_interaction.ts:18
Inherited from
BaseContractInteraction.wallet
authWitnesses
protectedauthWitnesses:AuthWitness[] =[]
Defined in: contract/base_contract_interaction.ts:19
Inherited from
BaseContractInteraction.authWitnesses
capsules
protectedcapsules:Capsule[] =[]
Defined in: contract/base_contract_interaction.ts:20
Inherited from
BaseContractInteraction.capsules
interactions
protectedinteractions:any[]
Defined in: contract/batch_call.ts:16
Methods
send()
send(
options):SentTx
Defined in: contract/base_contract_interaction.ts:41
Sends a transaction to the contract function with the specified options. This function throws an error if called on a utility function. It creates and signs the transaction if necessary, and returns a SentTx instance, which can be used to track the transaction status, receipt, and events.
Parameters
options
An object containing 'from' property representing the AztecAddress of the sender and optional fee configuration
Returns
A SentTx instance for tracking the transaction status and information.
Inherited from
request()
request(
options):Promise<ExecutionPayload>
Defined in: contract/batch_call.ts:26
Returns an execution request that represents this operation.
Parameters
options
RequestInteractionOptions = {}
An optional object containing additional configuration for the request generation.
Returns
Promise<ExecutionPayload>
An execution payload wrapped in promise.
Overrides
BaseContractInteraction.request
simulate()
simulate(
options):Promise<any>
Defined in: contract/batch_call.ts:46
Simulate a transaction and get its return values Differs from prove in a few important ways:
- It returns the values of the function execution
- It supports
utility,privateandpublicfunctions