Reference
This documentation is auto-generated from the Aztec.js TypeScript source code.
This is an auto-generated reference. For tutorials and guides, see the Aztec.js Guide.
Package: @aztec/aztec.js
Generated: 2025-12-10T22:27:41.987Z
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
- Authorization
- Contract
- BaseContractInteraction
- BatchCall
- abiChecker
- ContractMethod
- ContractStorageLayout
- ContractBase
- ContractFunctionInteraction
- Contract
- RequestDeployOptions
- DeployOptions
- SimulateDeployOptions
- DeployMethod
- DeployedWaitOpts
- DeployTxReceipt
- DeploySentTx
- getGasLimits
- FeeEstimationOptions
- FeePaymentMethodOption
- GasSettingsOption
- InteractionFeeOptions
- SimulationInteractionFeeOptions
- RequestInteractionOptions
- SendInteractionOptions
- SimulateInteractionOptions
- ProfileInteractionOptions
- SimulationReturn
- toSendOptions
- toSimulateOptions
- toProfileOptions
- getClassRegistryContract
- getInstanceRegistryContract
- getFeeJuice
- WaitOpts
- DefaultWaitOpts
- SentTx
- UnsafeContract
- WaitForProvenOpts
- DefaultWaitForProvenOpts
- waitForProven
- Deployment
- Ethereum
- Fee
- Utils
- FieldLike
- EthAddressLike
- AztecAddressLike
- FunctionSelectorLike
- EventSelectorLike
- U128Like
- WrappedFieldLike
- IntentInnerHash
- CallIntent
- ContractFunctionInteractionCallIntent
- computeAuthWitMessageHash
- getMessageHashFromIntent
- computeInnerAuthWitHashFromAction
- lookupValidity
- SetPublicAuthwitContractInteraction
- waitForL1ToL2MessageReady
- isL1ToL2MessageReady
- getFeeJuiceBalance
- readFieldCompressedString
- waitForNode
- createAztecNodeClient
- AztecNode
- generatePublicKey
- Wallet
- AccountEntrypointMetaPaymentMethod
- AccountManager
- RequestDeployAccountOptions
- DeployAccountOptions
- SimulateDeployAccountOptions
- DeployAccountMethod
- Aliased
- SimulateOptions
- ProfileOptions
- SendOptions
- BatchableMethods
- BatchedMethod
- BatchedMethodResult
- BatchedMethodResultWrapper
- BatchResults
- PrivateEventFilter
- PrivateEvent
- Wallet
- FunctionCallSchema
- ExecutionPayloadSchema
- GasSettingsOptionSchema
- WalletSimulationFeeOptionSchema
- SendOptionsSchema
- SimulateOptionsSchema
- ProfileOptionsSchema
- MessageHashOrIntentSchema
- BatchedMethodSchema
- ContractMetadataSchema
- ContractClassMetadataSchema
- EventMetadataDefinitionSchema
- PrivateEventSchema
- PrivateEventFilterSchema
- WalletSchema
Account
account/account_contract.ts
AccountContract
Type: Interface
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
Returns the artifact of this account contract.
Signature:
getContractArtifact(): Promise<ContractArtifact>
Returns:
Promise<ContractArtifact>
getInitializationFunctionAndArgs
Returns the initializer function name and arguments for this instance, or undefined if this contract does not require initialization.
Signature:
getInitializationFunctionAndArgs(): Promise<{
constructorName: string;
constructorArgs: any[];
} | undefined>
Returns:
Promise<
| {
/** The name of the function used to initialize the contract */
constructorName: string;
/** The args to the function used to initialize the contract */
constructorArgs: any[];
}
| undefined
>
getInterface
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).
Signature:
getInterface(
address: CompleteAddress,
chainInfo: ChainInfo
): AccountInterface
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:
AccountInterface - An account interface instance for creating tx requests and authorizing actions.
getAuthWitnessProvider
Returns the auth witness provider for the given address.
Signature:
getAuthWitnessProvider(address: CompleteAddress): AuthWitnessProvider
Parameters:
address:CompleteAddress- Address for which to create auth witnesses.
Returns:
AuthWitnessProvider
getAccountContractAddress
Type: Function
Compute the address of an account contract from secret and salt.
Signature:
export async getAccountContractAddress(
accountContract: AccountContract,
secret: Fr,
salt: Fr
)
Parameters:
accountContract:AccountContractsecret:Frsalt:Fr
Returns:
Promise<any>
account/account_with_secret_key.ts
AccountWithSecretKey
Type: Class
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: BaseAccount
Constructor
Signature:
constructor(
account: AccountInterface,
private secretKey: Fr,
public readonly salt: Salt
)
Parameters:
account:AccountInterfacesecretKey:Frsalt:Salt- Deployment salt for this account contract.
Methods
getSecretKey
Returns the encryption private key associated with this account.
Signature:
public getSecretKey()
Returns:
Fr
getEncryptionSecret
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
Signature:
public async getEncryptionSecret()
Returns:
Promise<any>
account/account.ts
Account
Type: Type Alias
A type defining an account, capable of both creating authwits and using them to authenticate transaction execution requests.
Signature:
export type Account = AccountInterface & AuthwitnessIntentProvider;
BaseAccount
Type: Class
An account implementation that uses authwits as an authentication mechanism and can assemble transaction execution requests for an entrypoint.
Implements: Account
Constructor
Signature:
constructor(protected account: AccountInterface)
Parameters:
account:AccountInterface
Methods
createTxExecutionRequest
Signature:
createTxExecutionRequest(
exec: ExecutionPayload,
gasSettings: GasSettings,
options: DefaultAccountEntrypointOptions
): Promise<TxExecutionRequest>
Parameters:
exec:ExecutionPayloadgasSettings:GasSettingsoptions:DefaultAccountEntrypointOptions
Returns:
Promise<TxExecutionRequest>
getChainId
Signature:
getChainId(): Fr
Returns:
Fr
getVersion
Signature:
getVersion(): Fr
Returns:
Fr
getCompleteAddress
Returns the complete address of the account that implements this wallet.
Signature:
public getCompleteAddress()
Returns:
CompleteAddress
getAddress
Returns the address of the account that implements this wallet.
Signature:
public getAddress()
Returns:
any
createAuthWit
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.
Signature:
async createAuthWit(messageHashOrIntent: Fr | Buffer | CallIntent | IntentInnerHash): Promise<AuthWitness>
Parameters:
messageHashOrIntent:Fr | Buffer | CallIntent | IntentInnerHash- The message hash of the intent to approve
Returns:
Promise<AuthWitness> - The authentication witness
account/interface.ts
AccountInterface
Type: Interface
Handler for interfacing with an account. Knows how to create transaction execution requests and authorize actions for its corresponding account.
Extends: EntrypointInterface, AuthWitnessProvider
Methods
getCompleteAddress
Returns the complete address for this account.
Signature:
getCompleteAddress(): CompleteAddress
Returns:
CompleteAddress
getAddress
Returns the address for this account.
Signature:
getAddress(): AztecAddress
Returns:
AztecAddress
getChainId
Returns the chain id for this account
Signature:
getChainId(): Fr
Returns:
Fr
getVersion
Returns the rollup version for this account
Signature:
getVersion(): Fr
Returns:
Fr
account/signerless_account.ts
SignerlessAccount
Type: Class
Account implementation which creates a transaction using the multicall protocol contract as entrypoint.
Implements: Account
Constructor
Signature:
constructor(chainInfo: ChainInfo)
Parameters:
chainInfo:ChainInfo
Methods
createTxExecutionRequest
Signature:
createTxExecutionRequest(
exec: ExecutionPayload,
gasSettings: GasSettings
): Promise<TxExecutionRequest>
Parameters:
exec:ExecutionPayloadgasSettings:GasSettings
Returns:
Promise<TxExecutionRequest>
getChainId
Signature:
getChainId(): Fr
Returns:
Fr
getVersion
Signature:
getVersion(): Fr
Returns:
Fr
getCompleteAddress
Signature:
getCompleteAddress(): CompleteAddress
Returns:
CompleteAddress
getAddress
Signature:
getAddress(): AztecAddress
Returns:
AztecAddress
createAuthWit
Signature:
createAuthWit(_intent: Fr | Buffer | IntentInnerHash | CallIntent): Promise<AuthWitness>
Parameters:
_intent:Fr | Buffer | IntentInnerHash | CallIntent
Returns:
Promise<AuthWitness>
Authorization
authorization/call_authorization_request.ts
CallAuthorizationRequest
Type: Class
An authwit request for a function call. Includes the preimage of the data to be signed, as opposed of just the inner hash.
Constructor
Signature:
constructor(
public selector: AuthorizationSelector,
public innerHash: Fr,
public msgSender: AztecAddress,
public functionSelector: FunctionSelector,
public argsHash: Fr,
public args: Fr[]
)
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())
- The selector of the authwit type, used to identify it when emitted from
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.
Methods
getSelector
Signature:
static getSelector(): Promise<AuthorizationSelector>
Returns:
Promise<AuthorizationSelector>
fromFields
Signature:
static async fromFields(fields: Fr[]): Promise<CallAuthorizationRequest>
Parameters:
fields:Fr[]
Returns:
Promise<CallAuthorizationRequest>
Contract
contract/base_contract_interaction.ts
BaseContractInteraction
Type: Class
Base class for an interaction with a contract, be it a deployment, a function call, or a batch. Implements the sequence create/simulate/send.
Constructor
Signature:
constructor(
protected wallet: Wallet,
protected authWitnesses: AuthWitness[] = [],
protected capsules: Capsule[] = []
)
Parameters:
wallet:WalletauthWitnesses(optional):AuthWitness[]capsules(optional):Capsule[]
Properties
log
Type: any
Methods
request
Returns an execution request that represents this operation. Can be used as a building block for constructing batch requests.
Signature:
public abstract request(options?: RequestInteractionOptions): Promise<ExecutionPayload>
Parameters:
options(optional):RequestInteractionOptions- An optional object containing additional configuration for the transaction.
Returns:
Promise<ExecutionPayload> - An execution request wrapped in promise.
send
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.
Signature:
public send(options: SendInteractionOptions): SentTx
Parameters:
options:SendInteractionOptions- An object containing 'from' property representing the AztecAddress of the sender and optional fee configuration
Returns:
SentTx - A SentTx instance for tracking the transaction status and information.
contract/batch_call.ts
BatchCall
Type: Class
A batch of function calls to be sent as a single transaction through a wallet.
Extends: BaseContractInteraction