bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 13쪽
ntract interaction capability. The wallet may reduce the scope (e.g., from '\*' to specific addresses).
**Extends:** `ContractsCapability`
#### ContractClassesCapability[](#contractclassescapability "Direct link to ContractClassesCapability")
**Type:** Interface
Contract class capability - for querying contract class metadata and registering contract classes. Maps to wallet methods: - getContractClassMetadata (when canGetMetadata: true) - registerContractClass (when canRegister: true) Contract classes are identified by their class ID (Fr), not by contract address. Multiple contract instances can share the same class. This capability grants permission to query metadata for, and register, specific contract classes. Apps typically acquire this permission automatically when registering a contract with an artifact (the wallet auto-grants permission for that contract's class ID).
#### Properties[](#properties-11 "Direct link to Properties")
##### type[](#type-2 "Direct link to type")
Discriminator for capability type
**Type:** `'contractClasses'`
##### classes[](#classes "Direct link to classes")
Which contract classes this applies to: - '\*': Any contract class ID - Fr\[]: Specific contract class IDs
**Type:** `'*' | Fr[]`
##### canRegister[](#canregister-1 "Direct link to canRegister")
Can register a contract class artifact in the local PXE. Maps to: registerContractClass
**Type:** `boolean`
##### canGetMetadata[](#cangetmetadata-1 "Direct link to canGetMetadata")
Can query contract class metadata. Maps to: getContractClassMetadata
**Type:** `boolean`
#### GrantedContractClassesCapability[](#grantedcontractclassescapability "Direct link to GrantedContractClassesCapability")
**Type:** Interface
Granted contract class capability. The wallet may reduce the scope (e.g., from '\*' to specific class IDs).
**Extends:** `ContractClassesCapability`
#### SimulationCapability[](#simulationcapability "Direct link to SimulationCapability")
**Type:** Interface
Transaction simulation capability - for simulating transactions and executing utilities. Maps to wallet methods: - simulateTx (when transactions scope specified) - executeUtility (when utilities scope specified) - profileTx (when transactions scope specified)
#### Properties[](#properties-12 "Direct link to Properties")
##### type[](#type-3 "Direct link to type")
Discriminator for capability type
**Type:** `'simulation'`
##### transactions[](#transactions "Direct link to transactions")
Transaction simulation scope. Maps to: simulateTx, profileTx
**Type:**
```
{
/**
* Which contracts/functions to allow:
* - '*': Any transaction
* - ContractFunctionPattern[]: Specific contract functions
*/
scope: '*' | ContractFunctionPattern[];
}
```
##### utilities[](#utilities "Direct link to utilities")
Utility execution scope (unconstrained calls). Maps to: executeUtility
**Type:**
```
{
/**
* Which contracts/functions to allow:
* - '*': Any utility call
* - ContractFunctionPattern[]: Specific contract functions
*/
scope: '*' | ContractFunctionPattern[];
}
```
#### GrantedSimulationCapability[](#grantedsimulationcapability "Direct link to GrantedSimulationCapability")
**Type:** Interface
Granted transaction simulation capability. The wallet may reduce the scope (e.g., from '\*' to specific patterns).
**Extends:** `SimulationCapability`
#### TransactionCapability[](#transactioncapability "Direct link to TransactionCapability")
**Type:** Interface
Transaction execution capability - for sending transactions. Maps to wallet methods: - sendTx Policy enforcement (rate limits, spending limits) should be handled at the contract level in Aztec, not at the wallet level.
#### Properties[](#properties-13 "Direct link to Properties")
##### type[](#type-4 "Direct link to type")
Discriminator for capability type
**Type:** `'transaction'`
##### scope[](#scope "Direct link to scope")
Which contracts/functions to allow: - '\*': Any transaction - ContractFunctionPattern\[]: Specific patterns
**Type:** `'*' | ContractFunctionPattern[]`
#### GrantedTransactionCapability[](#grantedtransactioncapability "Direct link to GrantedTransactionCapability")
**Type:** Interface
Granted transaction execution capability. The wallet may reduce the scope (e.g., from '\*' to specific patterns).
**Extends:** `TransactionCapability`
#### DataCapability[](#datacapability "Direct link to DataCapability")
**Type:** Interface
Data access capability - for querying private data. Maps to wallet methods: - getAddressBook (when addressBook: true) - getPrivateEvents (when privateEvents specified)
#### Properties[](#properties-14 "Direct link to Properties")
##### type[](#type-5 "Direct link to type")
Discriminator for capability type
**Type:** `'data'`
##### addressBook[](#addressbook "Direct link to addressBook")
Access to address book. Maps to: getAddressBook
**Type:** `boolean`
##### privateEvents[](#privateevents "Direct link to privateEvents")
Access to private events. Maps to: getPrivateEvents
**Type:**
```
{
/**
* Which contracts to allow event queries from:
* - '*': Any contract
* - AztecAddress[]: Specific contracts
*/
contracts: '*' | AztecAddress[];
}
```
#### GrantedDataCapability[](#granteddatacapability "Direct link to GrantedDataCapability")
**Type:** Interface
Granted data access capability. The wallet may reduce the scope (e.g., from '\*' to specific contracts).
**Extends:** `DataCapability`
#### Capability[](#capability "Direct link to Capability")
**Type:** Type Alias
Union type of all capability scopes (app request). Capabilities group wallet operations by their security sensitivity and functional cohesion, making permission requests understandable to users.
**Signature:**
```
export type Capability =
| AccountsCapability
| ContractsCapability
| ContractClassesCapability
| SimulationCapability
| TransactionCapability
| DataCapability;
```
#### GrantedCapability[](#grantedcapability "Direct link to GrantedCapability")
**Type:** Type Alias
Union type of all granted capabilities (wallet response). The wallet may augment capabilities with additional information: - AccountsCapability: adds specific accounts granted - Other capabilities: may reduce scope (e.g., '\*' to specific addresses)
**Signature:**
```
export type GrantedCapability =
| GrantedAccountsCapability
| GrantedContractsCapability
| GrantedContractClassesCapability
| GrantedSimulationCapability
| GrantedTransactionCapability
| GrantedDataCapability;
```
#### AppCapabilities[](#appcapabilities "Direct link to AppCapabilities")
**Type:** Interface
Application capability manifest. Sent by dApp to declare all operations it needs. This reduces authorization friction from multiple dialogs to a single comprehensive permission request.
#### Properties[](#properties-15 "Direct link to Properties")
##### version[](#version "Direct link to version")
Manifest version for forward compatibility. Currently only '1.0' is supported.
**Type:** `typeof CAPABILITY_VERSION`
##### metadata[](#metadata "Direct link to metadata")
Application metadata for display in authorization dialogs.
**Type:**
```
{
/** Human-readable app name */
name: string;
/** App version */
version: string;
/** Optional description of what the app does */
description?: string;
/** Optional website URL */
url?: string;
/** Optional icon URL or data URI */
icon?: string;
}
```
##### capabilities[](#capabilities "Direct link to capabilities")
Requested capabilities grouped by scope.
**Type:** `Capability[]`
#### WalletCapabilities[](#walletcapabilities "Direct link to WalletCapabilities")
**Type:** Interface
Wallet capability response. Returned by wallet after user reviews and approves/denies the capability request. The wallet can modify requested capabilities: - Reduce scope (e.g., restrict to specific contracts instead of '\*') - Add information (e.g., specify which accounts are granted) - Deny capabilities (by omitting them from the `granted` array)
#### Properties[](#properties-16 "Direct link to Properties")
##### version[](#version-1 "Direct link to version")
Response version for forward compatibility.
**Type:** `typeof CAPABILITY_VERSION`
##### granted[](#granted "Direct link to granted")
Capabilities granted by the wallet. Capabilities not in this array were implicitly denied. Empty array means the user denied all capabilities.
**Type:** `GrantedCapability[]`
##### wallet[](#wallet-1 "Direct link to wallet")
Wallet implementation details.
**Type:**
```
{
/** Wallet name/implementation */
name: string;
/** Wallet version */
version: string;
}
```
***
### `wallet/deploy_account_method.ts`[](#walletdeploy_account_methodts "Direct link to walletdeploy_account_methodts")
#### DeployAccountFeePaymentMethodOption[](#deployaccountfeepaymentmethodoption "Direct link to DeployAccountFeePaymentMethodOption")
**Type:** Type Alias
Extended fee payment method option for account deployments that includes entrypoint wrapping options
**Signature:**
```
export type DeployAccountFeePaymentMethodOption = FeePaymentMethodOption & {
feeEntrypointOptions?: unknown;
};
```
**Type Members:**
##### feeEntrypointOptions[](#feeentrypointoptions "Direct link to feeEntrypointOptions")
Optional entrypoint-specific options for wrapping execution payloads
**Type:** `unknown`
#### RequestDeployAccountOptions[](#requestdeployaccountoptions "Direct link to RequestDeployAccountOptions")
**Type:** Type Alias
The configuration options for the request method.
**Signature:**
```
export type RequestDeployAccountOptions = Omit<RequestDeployOptions, 'fee'> & {
fee?: DeployAccountFeePaymentMethodOption;
from?: AztecAddress | NoFrom;
};
```
**Type Members:**
##### fee[](#fee-5 "Direct link to fee")
Fee options specific to account deployment
**Type:** `DeployAccountFeePaymentMethodOption`
##### from[](#from-1 "Direct link to from")
Sender of the request. When NO\_FROM, the to-be-deployed account pays for its own deployment (self-paid deploy) and the payload is wrapped through the multicall entrypoint.
**Type:** `AztecAddress | NoFrom`
#### DeployAccountOptions[](#deployaccountoptions "Direct link to DeployAccountOptions")
**Type:** Type Alias
The configuration options for the send/prove methods.
**Signature:**
```
export type DeployAccountOptions<W extends InteractionWaitOptions = undefined> = DeployOptionsWithoutWait & {
wait?: W;
};
```
**Type Members:**
##### wait[](#wait-2 "Direct link to wait")
Whether to wait for the transaction to be mined. - undefined (default): wait with default options and return TxReceipt - WaitOpts object: wait with custom options and return TxReceipt - false: return txHash immediately without waiting
**Type:** `W`
#### SimulateDeployAccountOptions[](#simulatedeployaccountoptions "Direct link to SimulateDeployAccountOptions")
**Type:** Type Alias
The configuration options for the simulate method.
**Signature:**
```
export type SimulateDeployAccountOptions = SimulateDeployOptions;
```
#### DeployAccountMethod[](#deployaccountmethod "Direct link to DeployAccountMethod")
**Type:** Class
Modified version of the DeployMethod used to deploy account contracts. Supports deploying contracts that can pay for their own fee, plus some preconfigured options to avoid errors.
**Extends:** `UniversalDeployMethod`
#### Constructor[](#constructor-22 "Direct link to Constructor")
**Signature:**
```
constructor(
publicKeys: PublicKeys,
wallet: Wallet,
artifact: ContractArtifact,
postDeployCtor: (instance: ContractInstanceWithAddress, wallet: Wallet) => TContract,
salt: Fr,
immutablesHash: Fr,
private account: Account,
args: any[] = [],
constructorNameOrArtifact?: string | FunctionArtifact,
authWitnesses: AuthWitness[] = [],
capsules: Capsule[] = [],
extraHashedArgs: HashedValues[] = []
)
```
**Parameters:**
* `publicKeys`: `PublicKeys`
* `wallet`: `Wallet`
* `artifact`: `ContractArtifact`
* `postDeployCtor`: `(instance: ContractInstanceWithAddress, wallet: Wallet) => TContract`
* `salt`: `Fr`
* `immutablesHash`: `Fr`
* `account`: `Account`
* `args` (optional): `any[]`
* `constructorNameOrArtifact` (optional): `string | FunctionArtifact`
* `authWitnesses` (optional): `AuthWitness[]`
* `capsules` (optional): `Capsule[]`
* `extraHashedArgs` (optional): `HashedValues[]`
#### Methods[](#methods-27 "Direct link to Methods")
##### request[](#request-4 "Direct link to request")
Returns the execution payload that allows this operation to happen on chain. For self-deployments (from === NO\_FROM), the payload is wrapped through the multicall entrypoint on the app side so the wallet can execute it directly.
**Signature:**
```
public override async request(opts?: RequestDeployAccountOptions): Promise<ExecutionPayload>
```
**Parameters:**
* `opts` (optional): `RequestDeployAccountOptions`
* Configuration options.
**Returns:**
`Promise<ExecutionPayload>` - The execution payload for this operation
##### convertDeployOptionsToSendOptions[](#convertdeployoptionstosendoptions-1 "Direct link to convertDeployOptionsToSendOptions")
**Signature:**
```
protected override convertDeployOptionsToSendOptions<W extends InteractionWaitOptions>(options: DeployOptions<W>): SendOptions<W>
```
**Parameters:**
* `options`: `DeployOptions<W>`
**Returns:**
`SendOptions<W>`
##### convertDeployOptionsToSimulateOptions[](#convertdeployoptionstosimulateoptions-1 "Direct link to convertDeployOptionsToSimulateOptions")
**Signature:**
```
protected override convertDeployOptionsToSimulateOptions(options: SimulateDeployOptions): SimulateOptions
```
**Parameters:**
* `options`: `SimulateDeployOptions`
**Returns:**
`SimulateOptions`
##### convertDeployOptionsToProfileOptions[](#convertdeployoptionstoprofileoptions-1 "Direct link to convertDeployOptionsToProfileOptions")
**Signature:**
```
protected override convertDeployOptionsToProfileOptions(options: DeployOptionsWithoutWait & ProfileInteractionOptions): ProfileOptions
```
**Parameters:**
* `options`: `DeployOptionsWithoutWait & ProfileInteractionOptions`
**Returns:**
`ProfileOptions`
##### with[](#with-2 "Direct link to with")
Augments this DeployAccountMethod with additional metadata, such as authWitnesses and capsules.
**Signature:**
```
public override with({ authWitnesses = [], capsules = [], extraHashedArgs = [], }: {
authWitnesses?: AuthWitness[];
capsules?: Capsule[];
extraHashedArgs?: HashedValues[];
}): DeployAccountMethod<TContract>
```
**Parameters:**
* `{ authWitnesses = [], capsules = [], extraHashedArgs = [], }`:
```
{
/** The authWitnesses to add to the deployment */
authWitnesses?: AuthWitness[];
/** The capsules to add to the deployment */
capsules?: Capsule[];
/** The extra hashed args to add to the deployment */
extraHashedArgs?: HashedValues[];
}
```
**Returns:**
`DeployAccountMethod<TContract>` - A new DeployAccountMethod with the added metadata
***
### `wallet/tx_simulation_result_with_app_offset.ts`[](#wallettx_simulation_result_with_app_offsetts "Direct link to wallettx_simulation_result_with_app_offsetts")
#### TxSimulationResultWithAppOffset[](#txsimulationresultwithappoffset "Direct link to TxSimulationResultWithAppOffset")
**Type:** Class
Extends TxSimulationResult with the app call offset, which tracks where the app's calls begin in the flattened array of calls. Tracking of app call offset is a wallet-level concern: the wallet may wrap the app payload in an entrypoint or may prepend calls (this is typically done for fee payments).
**Extends:** `TxSimulationResult`
#### Constructor[](#constructor-23 "Direct link to Constructor")
**Signature:**
```
constructor(
privateExecutionResult: PrivateExecutionResult,
publicInputs: PrivateKernelTailCircuitPublicInputs,
publicOutput?: PublicSimulationOutput,
stats?: SimulationStats,
public readonly appCallOffset: number | undefined = undefined
)
```
**Parameters:**
* `privateExecutionResult`: `PrivateExecutionResult`
* `publicInputs`: `PrivateKernelTailCircuitPublicInputs`
* `publicOutput` (optional): `PublicSimulationOutput`
* `stats` (optional): `SimulationStats`
* `appCallOffset` (optional): `number | undefined`
* Index of the app's first call in a flattened array of calls. 0 = app call is the root execution itself (DefaultEntrypoint / NO\_FROM). 1..N = wallet prepended calls before the app call. undefined = wallet did not send the field; use heuristic fallback.
#### Methods[](#methods-28 "Direct link to Methods")
##### getPrivateReturnValuesOfAppCall[](#getprivatereturnvaluesofappcall "Direct link to getPrivateReturnValuesOfAppCall")
Returns the private return values that correspond to the provided app call.
**Signature:**
```
getPrivateReturnValuesOfAppCall(appCallIndex: number = 0): NestedProcessReturnValues | undefined
```
**Parameters:**
* `appCallIndex` (optional): `number`
* Index of the app call within the app calls.
**Returns:**
`NestedProcessReturnValues | undefined`
##### fromResultAndOffset[](#fromresultandoffset "Direct link to fromResultAndOffset")
Creates a TxSimulationResultWithAppOffset from an existing TxSimulationResult, attaching the app call offset computed by the wallet (i.e. how many calls precede the first app call in the flattened execution tree).
**Signature:**
```
static fromResultAndOffset(
result: TxSimulationResult,
appCallOffset: number
): TxSimulationResultWithAppOffset
```
**Parameters:**
* `result`: `TxSimulationResult`
* The simulation result to wrap.
* `appCallOffset`: `number`
* The index of the app's first call in the flattened execution tree.
**Returns:**
`TxSimulationResultWithAppOffset`
##### random[](#random "Direct link to random")
**Signature:**
```
static override async random()
```
**Returns:**
`Promise<TxSimulationResultWithAppOffset>`
#### Getters[](#getters-1 "Direct link to Getters")
##### schema (getter)[](#schema-getter "Direct link to schema (getter)")
**Signature:**
```
static override get schema(): ZodFor<TxSimulationResultWithAppOffset> {
```
**Returns:**
`ZodFor<TxSimulationResultWithAppOffset>`
***
### `wallet/wallet.ts`[](#walletwalletts "Direct link to walletwalletts")
#### Aliased[](#aliased "Direct link to Aliased")
**Type:** Type Alias
A wrapper type that allows any item to be associated with an alias.
**Signature:**
```
export type Aliased<T> = {
alias: string;
item: T;
};
```
**Type Members:**
##### alias[](#alias "Direct link to alias")
The alias
**Type:** `string`
##### item[](#item "Direct link to item")
The item being aliased.
**Type:** `T`
#### SimulateOptions[](#simulateoptions "Direct link to SimulateOptions")
**Type:** Type Alias
Options for simulating interactions with the wallet. Overrides the fee settings of an interaction with a simplified version that only hints at the wallet whether the interaction contains a fee payment method or not
**Signature:**
```
export type SimulateOptions = Omit<SimulateInteractionOptions, 'fee'> & {
fee?: GasSettingsOption;
};
```
**Type Members:**
##### fee[](#fee-6 "Direct link to fee")
The fee options
**Type:** `GasSettingsOption`
#### ProfileOptions[](#profileoptions "Direct link to ProfileOptions")
**Type:** Type Alias
Options for profiling interactions with the wallet. Overrides the fee settings of an interaction with a simplified version that only hints at the wallet whether the interaction contains a fee payment method or not
**Signature:**
```
export type ProfileOptions = Omit<ProfileInteractionOptions, 'fee'> & {
fee?: GasSettingsOption;
};
```
**Type Members:**
##### fee[](#fee-7 "Direct link to fee")
The fee options
**Type:** `GasSettingsOption`
#### SendOptions[](#sendoptions "Direct link to SendOptions")
**Type:** Type Alias
Op프로젝트로 돌아가기