@walletmesh/aztec-rpc-wallet 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +290 -228
- package/dist/.tsbuildinfo +1 -1
- package/dist/client/aztec-dapp-wallet.d.ts +401 -0
- package/dist/client/aztec-dapp-wallet.d.ts.map +1 -0
- package/dist/client/aztec-dapp-wallet.js +705 -0
- package/dist/client/aztec-router-provider.d.ts +58 -0
- package/dist/client/aztec-router-provider.d.ts.map +1 -0
- package/dist/client/aztec-router-provider.js +62 -0
- package/dist/client/helpers.d.ts +44 -0
- package/dist/client/helpers.d.ts.map +1 -0
- package/dist/client/helpers.js +79 -0
- package/dist/client/register-serializers.d.ts +41 -0
- package/dist/client/register-serializers.d.ts.map +1 -0
- package/dist/client/register-serializers.js +97 -0
- package/dist/contractArtifactCache.d.ts +49 -32
- package/dist/contractArtifactCache.d.ts.map +1 -1
- package/dist/contractArtifactCache.js +47 -34
- package/dist/errors.d.ts +50 -8
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +50 -10
- package/dist/index.d.ts +53 -40
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +52 -17
- package/dist/types.d.ts +345 -270
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +10 -8
- package/dist/wallet/create-node.d.ts +73 -0
- package/dist/wallet/create-node.d.ts.map +1 -0
- package/dist/wallet/create-node.js +99 -0
- package/dist/wallet/handlers/account.d.ts +67 -0
- package/dist/wallet/handlers/account.d.ts.map +1 -0
- package/dist/wallet/handlers/account.js +85 -0
- package/dist/wallet/handlers/contract-interaction.d.ts +77 -0
- package/dist/wallet/handlers/contract-interaction.d.ts.map +1 -0
- package/dist/wallet/handlers/contract-interaction.js +219 -0
- package/dist/wallet/handlers/contract.d.ts +96 -0
- package/dist/wallet/handlers/contract.d.ts.map +1 -0
- package/dist/wallet/handlers/contract.js +146 -0
- package/dist/wallet/handlers/event.d.ts +62 -0
- package/dist/wallet/handlers/event.d.ts.map +1 -0
- package/dist/wallet/handlers/event.js +85 -0
- package/dist/wallet/handlers/index.d.ts +88 -0
- package/dist/wallet/handlers/index.d.ts.map +1 -0
- package/dist/wallet/handlers/index.js +47 -0
- package/dist/wallet/handlers/node.d.ts +117 -0
- package/dist/wallet/handlers/node.d.ts.map +1 -0
- package/dist/wallet/handlers/node.js +196 -0
- package/dist/wallet/handlers/senders.d.ts +70 -0
- package/dist/wallet/handlers/senders.d.ts.map +1 -0
- package/dist/wallet/handlers/senders.js +92 -0
- package/dist/wallet/handlers/transaction.d.ts +123 -0
- package/dist/wallet/handlers/transaction.d.ts.map +1 -0
- package/dist/wallet/handlers/transaction.js +191 -0
- package/dist/wallet/serializers.d.ts +75 -0
- package/dist/wallet/serializers.d.ts.map +1 -0
- package/dist/wallet/serializers.js +501 -0
- package/docs/README.md +290 -229
- package/docs/classes/AztecDappWallet.md +1304 -0
- package/docs/classes/AztecRouterProvider.md +1058 -0
- package/docs/classes/AztecWalletError.md +124 -47
- package/docs/classes/ContractArtifactCache.md +48 -31
- package/docs/functions/connectAztec.md +62 -0
- package/docs/functions/createAztecWallet.md +46 -0
- package/docs/functions/createAztecWalletNode.md +96 -0
- package/docs/functions/registerAztecSerializers.md +61 -0
- package/docs/functions/registerWalletAztecSerializers.md +39 -0
- package/docs/globals.md +16 -14
- package/docs/interfaces/AztecHandlerContext.md +54 -0
- package/docs/interfaces/AztecWalletContext.md +50 -0
- package/docs/interfaces/AztecWalletMethodMap.md +470 -477
- package/docs/type-aliases/AztecChainId.md +16 -3
- package/docs/variables/ALL_AZTEC_METHODS.md +20 -0
- package/docs/variables/AztecWalletErrorMap.md +9 -4
- package/docs/variables/AztecWalletSerializer.md +45 -0
- package/package.json +9 -9
- package/src/client/aztec-dapp-wallet.test.ts +628 -0
- package/src/client/aztec-dapp-wallet.ts +879 -0
- package/src/client/aztec-router-provider.test.ts +235 -0
- package/src/client/aztec-router-provider.ts +64 -0
- package/src/client/helpers.test.ts +187 -0
- package/src/client/helpers.ts +91 -0
- package/src/client/register-serializers.ts +108 -0
- package/src/contractArtifactCache.test.ts +21 -10
- package/src/contractArtifactCache.ts +54 -35
- package/src/errors.ts +58 -10
- package/src/index.test.ts +2 -6
- package/src/index.ts +73 -37
- package/src/types.ts +379 -217
- package/src/wallet/create-node.test.ts +332 -0
- package/src/wallet/create-node.ts +120 -0
- package/src/wallet/handlers/account.test.ts +172 -0
- package/src/wallet/handlers/account.ts +99 -0
- package/src/wallet/handlers/contract-interaction.test.ts +248 -0
- package/src/wallet/handlers/contract-interaction.ts +269 -0
- package/src/wallet/handlers/contract.test.ts +245 -0
- package/src/wallet/handlers/contract.ts +174 -0
- package/src/wallet/handlers/event.test.ts +216 -0
- package/src/wallet/handlers/event.ts +99 -0
- package/src/wallet/handlers/index.ts +84 -0
- package/src/wallet/handlers/node.test.ts +304 -0
- package/src/wallet/handlers/node.ts +230 -0
- package/src/wallet/handlers/senders.test.ts +172 -0
- package/src/wallet/handlers/senders.ts +106 -0
- package/src/wallet/handlers/transaction.test.ts +371 -0
- package/src/wallet/handlers/transaction.ts +239 -0
- package/src/wallet/serializers.test.ts +253 -0
- package/src/wallet/serializers.ts +586 -0
- package/typedoc.json +23 -1
- package/dist/aztecRemoteWallet.d.ts +0 -70
- package/dist/aztecRemoteWallet.d.ts.map +0 -1
- package/dist/aztecRemoteWallet.js +0 -335
- package/dist/chainProvider.d.ts +0 -56
- package/dist/chainProvider.d.ts.map +0 -1
- package/dist/chainProvider.js +0 -98
- package/dist/handlers/aztecAccountWallet.d.ts +0 -4
- package/dist/handlers/aztecAccountWallet.d.ts.map +0 -1
- package/dist/handlers/aztecAccountWallet.js +0 -295
- package/dist/handlers/transactions.d.ts +0 -21
- package/dist/handlers/transactions.d.ts.map +0 -1
- package/dist/handlers/transactions.js +0 -98
- package/dist/handlers.d.ts +0 -27
- package/dist/handlers.d.ts.map +0 -1
- package/dist/handlers.js +0 -55
- package/dist/provider.d.ts +0 -105
- package/dist/provider.d.ts.map +0 -1
- package/dist/provider.js +0 -160
- package/dist/serializers/account.d.ts +0 -164
- package/dist/serializers/account.d.ts.map +0 -1
- package/dist/serializers/account.js +0 -244
- package/dist/serializers/contract.d.ts +0 -62
- package/dist/serializers/contract.d.ts.map +0 -1
- package/dist/serializers/contract.js +0 -130
- package/dist/serializers/index.d.ts +0 -21
- package/dist/serializers/index.d.ts.map +0 -1
- package/dist/serializers/index.js +0 -154
- package/dist/serializers/log.d.ts +0 -66
- package/dist/serializers/log.d.ts.map +0 -1
- package/dist/serializers/log.js +0 -222
- package/dist/serializers/note.d.ts +0 -124
- package/dist/serializers/note.d.ts.map +0 -1
- package/dist/serializers/note.js +0 -208
- package/dist/serializers/transaction.d.ts +0 -99
- package/dist/serializers/transaction.d.ts.map +0 -1
- package/dist/serializers/transaction.js +0 -275
- package/dist/wallet.d.ts +0 -62
- package/dist/wallet.d.ts.map +0 -1
- package/dist/wallet.js +0 -77
- package/docs/classes/AztecChainProvider.md +0 -553
- package/docs/classes/AztecChainWallet.md +0 -409
- package/docs/classes/AztecProvider.md +0 -1112
- package/docs/interfaces/AztecWalletBaseMethodMap.md +0 -135
- package/docs/interfaces/AztecWalletEventMap.md +0 -17
- package/docs/type-aliases/AztecChainWalletMiddleware.md +0 -13
- package/docs/type-aliases/AztecWalletContext.md +0 -29
- package/docs/type-aliases/AztecWalletMethodHandler.md +0 -37
- package/docs/type-aliases/AztecWalletMiddleware.md +0 -13
- package/docs/type-aliases/AztecWalletRouterClient.md +0 -13
- package/docs/type-aliases/TransactionFunctionCall.md +0 -33
- package/docs/type-aliases/TransactionParams.md +0 -27
- package/src/aztecRemoteWallet.test.ts +0 -505
- package/src/aztecRemoteWallet.ts +0 -467
- package/src/chainProvider.test.ts +0 -401
- package/src/chainProvider.ts +0 -116
- package/src/handlers/aztecAccountWallet.test.ts +0 -650
- package/src/handlers/aztecAccountWallet.ts +0 -531
- package/src/handlers/transactions.ts +0 -124
- package/src/handlers.test.ts +0 -270
- package/src/handlers.ts +0 -70
- package/src/provider.test.ts +0 -277
- package/src/provider.ts +0 -189
- package/src/serializers/account.test.ts +0 -125
- package/src/serializers/account.ts +0 -301
- package/src/serializers/contract.test.ts +0 -24
- package/src/serializers/contract.ts +0 -183
- package/src/serializers/index.test.ts +0 -136
- package/src/serializers/index.ts +0 -191
- package/src/serializers/log.test.ts +0 -286
- package/src/serializers/log.ts +0 -292
- package/src/serializers/note.test.ts +0 -125
- package/src/serializers/note.ts +0 -250
- package/src/serializers/transaction.test.ts +0 -320
- package/src/serializers/transaction.ts +0 -409
- package/src/wallet.test.ts +0 -275
- package/src/wallet.ts +0 -94
@@ -0,0 +1,1304 @@
|
|
1
|
+
[**@walletmesh/aztec-rpc-wallet v0.4.0**](../README.md)
|
2
|
+
|
3
|
+
***
|
4
|
+
|
5
|
+
[@walletmesh/aztec-rpc-wallet](../globals.md) / AztecDappWallet
|
6
|
+
|
7
|
+
# Class: AztecDappWallet
|
8
|
+
|
9
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:84](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L84)
|
10
|
+
|
11
|
+
Aztec DApp Wallet that implements the aztec.js Wallet interface.
|
12
|
+
This class provides a client-side representation of an Aztec wallet,
|
13
|
+
interacting with a remote wallet implementation (typically an AccountWallet
|
14
|
+
managed by a JSONRPCNode created via `createAztecWalletNode`)
|
15
|
+
through the WalletMesh router system.
|
16
|
+
|
17
|
+
It requires an [AztecRouterProvider](AztecRouterProvider.md) instance to handle the
|
18
|
+
serialization and deserialization of Aztec-specific types (e.g., `AztecAddress`, `Fr`)
|
19
|
+
when communicating with the router.
|
20
|
+
|
21
|
+
An instance of this wallet should typically be created using the
|
22
|
+
[createAztecWallet](../functions/createAztecWallet.md) helper function, which also handles initialization.
|
23
|
+
|
24
|
+
## Example
|
25
|
+
|
26
|
+
```typescript
|
27
|
+
// Assuming 'provider' is an initialized AztecRouterProvider
|
28
|
+
const wallet = await createAztecWallet(provider, 'aztec:mainnet');
|
29
|
+
const address = wallet.getAddress(); // Synchronous access after initialization
|
30
|
+
const txHash = await wallet.sendTx(someTx);
|
31
|
+
```
|
32
|
+
|
33
|
+
## Implements
|
34
|
+
|
35
|
+
- `Wallet`
|
36
|
+
|
37
|
+
## Constructors
|
38
|
+
|
39
|
+
### Constructor
|
40
|
+
|
41
|
+
> **new AztecDappWallet**(`routerProvider`, `chainId`): `AztecDappWallet`
|
42
|
+
|
43
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:100](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L100)
|
44
|
+
|
45
|
+
Creates an instance of AztecDappWallet.
|
46
|
+
Note: Prefer using the [createAztecWallet](../functions/createAztecWallet.md) helper function for creating
|
47
|
+
and initializing wallet instances.
|
48
|
+
|
49
|
+
#### Parameters
|
50
|
+
|
51
|
+
##### routerProvider
|
52
|
+
|
53
|
+
[`AztecRouterProvider`](AztecRouterProvider.md)
|
54
|
+
|
55
|
+
The AztecRouterProvider instance used for communication.
|
56
|
+
|
57
|
+
##### chainId
|
58
|
+
|
59
|
+
`` `aztec:${string}` ``
|
60
|
+
|
61
|
+
The Aztec chain ID this wallet is associated with.
|
62
|
+
|
63
|
+
#### Returns
|
64
|
+
|
65
|
+
`AztecDappWallet`
|
66
|
+
|
67
|
+
## Methods
|
68
|
+
|
69
|
+
### createAuthWit()
|
70
|
+
|
71
|
+
#### Call Signature
|
72
|
+
|
73
|
+
> **createAuthWit**(`messageHash`): `Promise`\<`AuthWitness`\>
|
74
|
+
|
75
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:437](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L437)
|
76
|
+
|
77
|
+
Creates an authorization witness for a given message hash or intent by making an RPC call to the remote wallet.
|
78
|
+
Implements Wallet.createAuthWit.
|
79
|
+
|
80
|
+
##### Parameters
|
81
|
+
|
82
|
+
###### messageHash
|
83
|
+
|
84
|
+
`Fr` | `Buffer`\<`ArrayBufferLike`\>
|
85
|
+
|
86
|
+
##### Returns
|
87
|
+
|
88
|
+
`Promise`\<`AuthWitness`\>
|
89
|
+
|
90
|
+
A promise that resolves to the AuthWitness.
|
91
|
+
|
92
|
+
##### See
|
93
|
+
|
94
|
+
[AztecWalletMethodMap.aztec\_createAuthWit](../interfaces/AztecWalletMethodMap.md#aztec_createauthwit)
|
95
|
+
|
96
|
+
##### Implementation of
|
97
|
+
|
98
|
+
`Wallet.createAuthWit`
|
99
|
+
|
100
|
+
#### Call Signature
|
101
|
+
|
102
|
+
> **createAuthWit**(`intent`): `Promise`\<`AuthWitness`\>
|
103
|
+
|
104
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:438](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L438)
|
105
|
+
|
106
|
+
Creates an authorization witness for a given message hash or intent by making an RPC call to the remote wallet.
|
107
|
+
Implements Wallet.createAuthWit.
|
108
|
+
|
109
|
+
##### Parameters
|
110
|
+
|
111
|
+
###### intent
|
112
|
+
|
113
|
+
The message hash (Fr or Buffer) or intent object (IntentInnerHash or IntentAction) to authorize.
|
114
|
+
|
115
|
+
`IntentAction` | `IntentInnerHash`
|
116
|
+
|
117
|
+
##### Returns
|
118
|
+
|
119
|
+
`Promise`\<`AuthWitness`\>
|
120
|
+
|
121
|
+
A promise that resolves to the AuthWitness.
|
122
|
+
|
123
|
+
##### See
|
124
|
+
|
125
|
+
[AztecWalletMethodMap.aztec\_createAuthWit](../interfaces/AztecWalletMethodMap.md#aztec_createauthwit)
|
126
|
+
|
127
|
+
##### Implementation of
|
128
|
+
|
129
|
+
`Wallet.createAuthWit`
|
130
|
+
|
131
|
+
***
|
132
|
+
|
133
|
+
### createTxExecutionRequest()
|
134
|
+
|
135
|
+
> **createTxExecutionRequest**(`exec`, `fee`, `options`): `Promise`\<`TxExecutionRequest`\>
|
136
|
+
|
137
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:415](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L415)
|
138
|
+
|
139
|
+
Creates a transaction execution request using the wallet's entrypoint.
|
140
|
+
Implements Wallet.createTxExecutionRequest.
|
141
|
+
|
142
|
+
#### Parameters
|
143
|
+
|
144
|
+
##### exec
|
145
|
+
|
146
|
+
`ExecutionPayload`
|
147
|
+
|
148
|
+
The execution payload.
|
149
|
+
|
150
|
+
##### fee
|
151
|
+
|
152
|
+
`FeeOptions`
|
153
|
+
|
154
|
+
Fee payment options.
|
155
|
+
|
156
|
+
##### options
|
157
|
+
|
158
|
+
`TxExecutionOptions`
|
159
|
+
|
160
|
+
Transaction execution options.
|
161
|
+
|
162
|
+
#### Returns
|
163
|
+
|
164
|
+
`Promise`\<`TxExecutionRequest`\>
|
165
|
+
|
166
|
+
A promise that resolves to the TxExecutionRequest.
|
167
|
+
|
168
|
+
#### Throws
|
169
|
+
|
170
|
+
If the wallet or its entrypoint is not initialized.
|
171
|
+
|
172
|
+
#### Implementation of
|
173
|
+
|
174
|
+
`Wallet.createTxExecutionRequest`
|
175
|
+
|
176
|
+
***
|
177
|
+
|
178
|
+
### deployContract()
|
179
|
+
|
180
|
+
> **deployContract**(`artifact`, `args`, `constructorName?`): `Promise`\<`DeploySentTx`\<`Contract`\>\>
|
181
|
+
|
182
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:815](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L815)
|
183
|
+
|
184
|
+
Deploys a contract using its artifact and constructor arguments.
|
185
|
+
This WalletMesh-specific helper method makes an RPC call to the `aztec_wmDeployContract`
|
186
|
+
method on the remote wallet. The remote wallet handles the deployment process.
|
187
|
+
|
188
|
+
#### Parameters
|
189
|
+
|
190
|
+
##### artifact
|
191
|
+
|
192
|
+
`ContractArtifact`
|
193
|
+
|
194
|
+
The ContractArtifact of the contract to deploy.
|
195
|
+
|
196
|
+
##### args
|
197
|
+
|
198
|
+
`unknown`[]
|
199
|
+
|
200
|
+
An array of arguments for the contract's constructor.
|
201
|
+
|
202
|
+
##### constructorName?
|
203
|
+
|
204
|
+
`string`
|
205
|
+
|
206
|
+
Optional name of the constructor function if the artifact has multiple.
|
207
|
+
|
208
|
+
#### Returns
|
209
|
+
|
210
|
+
`Promise`\<`DeploySentTx`\<`Contract`\>\>
|
211
|
+
|
212
|
+
A DeploySentTx object that can be used to track the deployment transaction
|
213
|
+
and get the deployed contract instance.
|
214
|
+
|
215
|
+
#### See
|
216
|
+
|
217
|
+
[AztecWalletMethodMap.aztec\_wmDeployContract](../interfaces/AztecWalletMethodMap.md#aztec_wmdeploycontract)
|
218
|
+
|
219
|
+
***
|
220
|
+
|
221
|
+
### getAddress()
|
222
|
+
|
223
|
+
> **getAddress**(): `AztecAddress`
|
224
|
+
|
225
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:170](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L170)
|
226
|
+
|
227
|
+
Gets the primary Aztec address for this wallet.
|
228
|
+
This value is cached during initialization.
|
229
|
+
Implements Wallet.getAddress.
|
230
|
+
|
231
|
+
#### Returns
|
232
|
+
|
233
|
+
`AztecAddress`
|
234
|
+
|
235
|
+
The wallet's AztecAddress.
|
236
|
+
|
237
|
+
#### Throws
|
238
|
+
|
239
|
+
If the wallet is not initialized.
|
240
|
+
|
241
|
+
#### Implementation of
|
242
|
+
|
243
|
+
`Wallet.getAddress`
|
244
|
+
|
245
|
+
***
|
246
|
+
|
247
|
+
### getAddressAsync()
|
248
|
+
|
249
|
+
> **getAddressAsync**(): `Promise`\<`AztecAddress`\>
|
250
|
+
|
251
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:184](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L184)
|
252
|
+
|
253
|
+
Asynchronously fetches the primary Aztec address from the remote wallet via an RPC call.
|
254
|
+
This method directly queries the connected wallet node.
|
255
|
+
|
256
|
+
#### Returns
|
257
|
+
|
258
|
+
`Promise`\<`AztecAddress`\>
|
259
|
+
|
260
|
+
A promise that resolves to the wallet's AztecAddress.
|
261
|
+
|
262
|
+
#### See
|
263
|
+
|
264
|
+
[AztecWalletMethodMap.aztec\_getAddress](../interfaces/AztecWalletMethodMap.md#aztec_getaddress)
|
265
|
+
|
266
|
+
***
|
267
|
+
|
268
|
+
### getBlock()
|
269
|
+
|
270
|
+
> **getBlock**(`number`): `Promise`\<`undefined` \| `L2Block`\>
|
271
|
+
|
272
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:372](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L372)
|
273
|
+
|
274
|
+
Retrieves a specific L2 block by its number via an RPC call.
|
275
|
+
Implements Wallet.getBlock.
|
276
|
+
|
277
|
+
#### Parameters
|
278
|
+
|
279
|
+
##### number
|
280
|
+
|
281
|
+
`number`
|
282
|
+
|
283
|
+
The block number to retrieve.
|
284
|
+
|
285
|
+
#### Returns
|
286
|
+
|
287
|
+
`Promise`\<`undefined` \| `L2Block`\>
|
288
|
+
|
289
|
+
A promise that resolves to the L2Block or `undefined` if not found.
|
290
|
+
|
291
|
+
#### See
|
292
|
+
|
293
|
+
[AztecWalletMethodMap.aztec\_getBlock](../interfaces/AztecWalletMethodMap.md#aztec_getblock)
|
294
|
+
|
295
|
+
***
|
296
|
+
|
297
|
+
### getBlockNumber()
|
298
|
+
|
299
|
+
> **getBlockNumber**(): `Promise`\<`number`\>
|
300
|
+
|
301
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:386](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L386)
|
302
|
+
|
303
|
+
Retrieves the current L2 block number via an RPC call.
|
304
|
+
Implements Wallet.getBlockNumber.
|
305
|
+
|
306
|
+
#### Returns
|
307
|
+
|
308
|
+
`Promise`\<`number`\>
|
309
|
+
|
310
|
+
A promise that resolves to the current block number.
|
311
|
+
|
312
|
+
#### See
|
313
|
+
|
314
|
+
[AztecWalletMethodMap.aztec\_getBlockNumber](../interfaces/AztecWalletMethodMap.md#aztec_getblocknumber)
|
315
|
+
|
316
|
+
***
|
317
|
+
|
318
|
+
### getChainId()
|
319
|
+
|
320
|
+
> **getChainId**(): `Fr`
|
321
|
+
|
322
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:111](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L111)
|
323
|
+
|
324
|
+
Gets the chain ID for this wallet.
|
325
|
+
This value is cached during initialization.
|
326
|
+
|
327
|
+
#### Returns
|
328
|
+
|
329
|
+
`Fr`
|
330
|
+
|
331
|
+
The chain ID as an Fr.
|
332
|
+
|
333
|
+
#### Throws
|
334
|
+
|
335
|
+
If the wallet is not initialized (e.g., if not created via `createAztecWallet`).
|
336
|
+
|
337
|
+
#### Implementation of
|
338
|
+
|
339
|
+
`Wallet.getChainId`
|
340
|
+
|
341
|
+
***
|
342
|
+
|
343
|
+
### getChainIdAsync()
|
344
|
+
|
345
|
+
> **getChainIdAsync**(): `Promise`\<`Fr`\>
|
346
|
+
|
347
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:127](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L127)
|
348
|
+
|
349
|
+
Asynchronously fetches the chain ID from the remote wallet via an RPC call.
|
350
|
+
This method directly queries the connected wallet node.
|
351
|
+
|
352
|
+
#### Returns
|
353
|
+
|
354
|
+
`Promise`\<`Fr`\>
|
355
|
+
|
356
|
+
A promise that resolves to the chain ID as an Fr.
|
357
|
+
|
358
|
+
#### See
|
359
|
+
|
360
|
+
[AztecWalletMethodMap.aztec\_getChainId](../interfaces/AztecWalletMethodMap.md#aztec_getchainid)
|
361
|
+
|
362
|
+
***
|
363
|
+
|
364
|
+
### getCompleteAddress()
|
365
|
+
|
366
|
+
> **getCompleteAddress**(): `CompleteAddress`
|
367
|
+
|
368
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:198](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L198)
|
369
|
+
|
370
|
+
Gets the complete address (including public keys) for this wallet.
|
371
|
+
This value is cached during initialization.
|
372
|
+
Implements Wallet.getCompleteAddress.
|
373
|
+
|
374
|
+
#### Returns
|
375
|
+
|
376
|
+
`CompleteAddress`
|
377
|
+
|
378
|
+
The wallet's CompleteAddress.
|
379
|
+
|
380
|
+
#### Throws
|
381
|
+
|
382
|
+
If the wallet is not initialized.
|
383
|
+
|
384
|
+
#### Implementation of
|
385
|
+
|
386
|
+
`Wallet.getCompleteAddress`
|
387
|
+
|
388
|
+
***
|
389
|
+
|
390
|
+
### getCompleteAddressAsync()
|
391
|
+
|
392
|
+
> **getCompleteAddressAsync**(): `Promise`\<`CompleteAddress`\>
|
393
|
+
|
394
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:212](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L212)
|
395
|
+
|
396
|
+
Asynchronously fetches the complete address (including public keys) from the remote wallet via an RPC call.
|
397
|
+
This method directly queries the connected wallet node.
|
398
|
+
|
399
|
+
#### Returns
|
400
|
+
|
401
|
+
`Promise`\<`CompleteAddress`\>
|
402
|
+
|
403
|
+
A promise that resolves to the wallet's CompleteAddress.
|
404
|
+
|
405
|
+
#### See
|
406
|
+
|
407
|
+
[AztecWalletMethodMap.aztec\_getCompleteAddress](../interfaces/AztecWalletMethodMap.md#aztec_getcompleteaddress)
|
408
|
+
|
409
|
+
***
|
410
|
+
|
411
|
+
### getContractClassMetadata()
|
412
|
+
|
413
|
+
> **getContractClassMetadata**(`id`, `includeArtifact?`): `Promise`\<`ContractClassMetadata`\>
|
414
|
+
|
415
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:701](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L701)
|
416
|
+
|
417
|
+
Retrieves metadata for a contract class by making an RPC call to the remote wallet.
|
418
|
+
Implements Wallet.getContractClassMetadata.
|
419
|
+
|
420
|
+
#### Parameters
|
421
|
+
|
422
|
+
##### id
|
423
|
+
|
424
|
+
`Fr`
|
425
|
+
|
426
|
+
The Fr ID of the contract class.
|
427
|
+
|
428
|
+
##### includeArtifact?
|
429
|
+
|
430
|
+
`boolean`
|
431
|
+
|
432
|
+
Optional flag to include the ContractArtifact in the metadata.
|
433
|
+
|
434
|
+
#### Returns
|
435
|
+
|
436
|
+
`Promise`\<`ContractClassMetadata`\>
|
437
|
+
|
438
|
+
A promise that resolves to the ContractClassMetadata.
|
439
|
+
|
440
|
+
#### See
|
441
|
+
|
442
|
+
[AztecWalletMethodMap.aztec\_getContractClassMetadata](../interfaces/AztecWalletMethodMap.md#aztec_getcontractclassmetadata)
|
443
|
+
|
444
|
+
#### Implementation of
|
445
|
+
|
446
|
+
`Wallet.getContractClassMetadata`
|
447
|
+
|
448
|
+
***
|
449
|
+
|
450
|
+
### getContractMetadata()
|
451
|
+
|
452
|
+
> **getContractMetadata**(`address`): `Promise`\<`ContractMetadata`\>
|
453
|
+
|
454
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:685](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L685)
|
455
|
+
|
456
|
+
Retrieves metadata for a specific contract by making an RPC call to the remote wallet.
|
457
|
+
Implements Wallet.getContractMetadata.
|
458
|
+
|
459
|
+
#### Parameters
|
460
|
+
|
461
|
+
##### address
|
462
|
+
|
463
|
+
`AztecAddress`
|
464
|
+
|
465
|
+
The AztecAddress of the contract.
|
466
|
+
|
467
|
+
#### Returns
|
468
|
+
|
469
|
+
`Promise`\<`ContractMetadata`\>
|
470
|
+
|
471
|
+
A promise that resolves to the ContractMetadata.
|
472
|
+
|
473
|
+
#### See
|
474
|
+
|
475
|
+
[AztecWalletMethodMap.aztec\_getContractMetadata](../interfaces/AztecWalletMethodMap.md#aztec_getcontractmetadata)
|
476
|
+
|
477
|
+
#### Implementation of
|
478
|
+
|
479
|
+
`Wallet.getContractMetadata`
|
480
|
+
|
481
|
+
***
|
482
|
+
|
483
|
+
### getContracts()
|
484
|
+
|
485
|
+
> **getContracts**(): `Promise`\<`AztecAddress`[]\>
|
486
|
+
|
487
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:734](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L734)
|
488
|
+
|
489
|
+
Retrieves a list of all contracts registered with the remote wallet via an RPC call.
|
490
|
+
Implements Wallet.getContracts.
|
491
|
+
|
492
|
+
#### Returns
|
493
|
+
|
494
|
+
`Promise`\<`AztecAddress`[]\>
|
495
|
+
|
496
|
+
A promise that resolves to an array of AztecAddress objects for the contracts.
|
497
|
+
|
498
|
+
#### See
|
499
|
+
|
500
|
+
[AztecWalletMethodMap.aztec\_getContracts](../interfaces/AztecWalletMethodMap.md#aztec_getcontracts)
|
501
|
+
|
502
|
+
***
|
503
|
+
|
504
|
+
### getCurrentBaseFees()
|
505
|
+
|
506
|
+
> **getCurrentBaseFees**(): `Promise`\<`GasFees`\>
|
507
|
+
|
508
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:399](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L399)
|
509
|
+
|
510
|
+
Retrieves the current base gas fees on the network via an RPC call.
|
511
|
+
Implements Wallet.getCurrentBaseFees.
|
512
|
+
|
513
|
+
#### Returns
|
514
|
+
|
515
|
+
`Promise`\<`GasFees`\>
|
516
|
+
|
517
|
+
A promise that resolves to the GasFees.
|
518
|
+
|
519
|
+
#### See
|
520
|
+
|
521
|
+
[AztecWalletMethodMap.aztec\_getCurrentBaseFees](../interfaces/AztecWalletMethodMap.md#aztec_getcurrentbasefees)
|
522
|
+
|
523
|
+
#### Implementation of
|
524
|
+
|
525
|
+
`Wallet.getCurrentBaseFees`
|
526
|
+
|
527
|
+
***
|
528
|
+
|
529
|
+
### getNodeInfo()
|
530
|
+
|
531
|
+
> **getNodeInfo**(): `Promise`\<`NodeInfo`\>
|
532
|
+
|
533
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:345](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L345)
|
534
|
+
|
535
|
+
Retrieves information about the connected Aztec node via an RPC call.
|
536
|
+
Implements Wallet.getNodeInfo.
|
537
|
+
|
538
|
+
#### Returns
|
539
|
+
|
540
|
+
`Promise`\<`NodeInfo`\>
|
541
|
+
|
542
|
+
A promise that resolves to the NodeInfo.
|
543
|
+
|
544
|
+
#### See
|
545
|
+
|
546
|
+
[AztecWalletMethodMap.aztec\_getNodeInfo](../interfaces/AztecWalletMethodMap.md#aztec_getnodeinfo)
|
547
|
+
|
548
|
+
#### Implementation of
|
549
|
+
|
550
|
+
`Wallet.getNodeInfo`
|
551
|
+
|
552
|
+
***
|
553
|
+
|
554
|
+
### getPrivateEvents()
|
555
|
+
|
556
|
+
> **getPrivateEvents**\<`T`\>(`contractAddress`, `eventMetadata`, `from`, `numBlocks`, `recipients`): `Promise`\<`T`[]\>
|
557
|
+
|
558
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:642](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L642)
|
559
|
+
|
560
|
+
Retrieves private events (encrypted logs) by making an RPC call to the remote wallet.
|
561
|
+
Implements Wallet.getPrivateEvents.
|
562
|
+
|
563
|
+
#### Type Parameters
|
564
|
+
|
565
|
+
##### T
|
566
|
+
|
567
|
+
`T`
|
568
|
+
|
569
|
+
The expected type of the decoded event data.
|
570
|
+
|
571
|
+
#### Parameters
|
572
|
+
|
573
|
+
##### contractAddress
|
574
|
+
|
575
|
+
`AztecAddress`
|
576
|
+
|
577
|
+
The AztecAddress of the contract emitting the events.
|
578
|
+
|
579
|
+
##### eventMetadata
|
580
|
+
|
581
|
+
`EventMetadataDefinition`
|
582
|
+
|
583
|
+
EventMetadataDefinition of the event to query.
|
584
|
+
|
585
|
+
##### from
|
586
|
+
|
587
|
+
`number`
|
588
|
+
|
589
|
+
Starting block number (inclusive).
|
590
|
+
|
591
|
+
##### numBlocks
|
592
|
+
|
593
|
+
`number`
|
594
|
+
|
595
|
+
Number of blocks to query from the `from` block.
|
596
|
+
|
597
|
+
##### recipients
|
598
|
+
|
599
|
+
`AztecAddress`[]
|
600
|
+
|
601
|
+
Array of AztecAddress recipients for the events.
|
602
|
+
|
603
|
+
#### Returns
|
604
|
+
|
605
|
+
`Promise`\<`T`[]\>
|
606
|
+
|
607
|
+
A promise that resolves to an array of decoded event data of type `T`.
|
608
|
+
|
609
|
+
#### See
|
610
|
+
|
611
|
+
[AztecWalletMethodMap.aztec\_getPrivateEvents](../interfaces/AztecWalletMethodMap.md#aztec_getprivateevents)
|
612
|
+
|
613
|
+
#### Implementation of
|
614
|
+
|
615
|
+
`Wallet.getPrivateEvents`
|
616
|
+
|
617
|
+
***
|
618
|
+
|
619
|
+
### getPublicEvents()
|
620
|
+
|
621
|
+
> **getPublicEvents**\<`T`\>(`eventMetadata`, `from`, `limit`): `Promise`\<`T`[]\>
|
622
|
+
|
623
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:666](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L666)
|
624
|
+
|
625
|
+
Retrieves public events (unencrypted logs) by making an RPC call to the remote wallet.
|
626
|
+
Implements Wallet.getPublicEvents.
|
627
|
+
|
628
|
+
#### Type Parameters
|
629
|
+
|
630
|
+
##### T
|
631
|
+
|
632
|
+
`T`
|
633
|
+
|
634
|
+
The expected type of the decoded event data.
|
635
|
+
|
636
|
+
#### Parameters
|
637
|
+
|
638
|
+
##### eventMetadata
|
639
|
+
|
640
|
+
`EventMetadataDefinition`
|
641
|
+
|
642
|
+
EventMetadataDefinition of the event to query.
|
643
|
+
|
644
|
+
##### from
|
645
|
+
|
646
|
+
`number`
|
647
|
+
|
648
|
+
Starting block number (inclusive).
|
649
|
+
|
650
|
+
##### limit
|
651
|
+
|
652
|
+
`number`
|
653
|
+
|
654
|
+
Maximum number of events to return.
|
655
|
+
|
656
|
+
#### Returns
|
657
|
+
|
658
|
+
`Promise`\<`T`[]\>
|
659
|
+
|
660
|
+
A promise that resolves to an array of decoded event data of type `T`.
|
661
|
+
|
662
|
+
#### See
|
663
|
+
|
664
|
+
[AztecWalletMethodMap.aztec\_getPublicEvents](../interfaces/AztecWalletMethodMap.md#aztec_getpublicevents)
|
665
|
+
|
666
|
+
#### Implementation of
|
667
|
+
|
668
|
+
`Wallet.getPublicEvents`
|
669
|
+
|
670
|
+
***
|
671
|
+
|
672
|
+
### getPXEInfo()
|
673
|
+
|
674
|
+
> **getPXEInfo**(): `Promise`\<`PXEInfo`\>
|
675
|
+
|
676
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:358](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L358)
|
677
|
+
|
678
|
+
Retrieves information about the PXE service via an RPC call.
|
679
|
+
Implements Wallet.getPXEInfo.
|
680
|
+
|
681
|
+
#### Returns
|
682
|
+
|
683
|
+
`Promise`\<`PXEInfo`\>
|
684
|
+
|
685
|
+
A promise that resolves to the PXEInfo.
|
686
|
+
|
687
|
+
#### See
|
688
|
+
|
689
|
+
[AztecWalletMethodMap.aztec\_getPXEInfo](../interfaces/AztecWalletMethodMap.md#aztec_getpxeinfo)
|
690
|
+
|
691
|
+
#### Implementation of
|
692
|
+
|
693
|
+
`Wallet.getPXEInfo`
|
694
|
+
|
695
|
+
***
|
696
|
+
|
697
|
+
### getSenders()
|
698
|
+
|
699
|
+
> **getSenders**(): `Promise`\<`AztecAddress`[]\>
|
700
|
+
|
701
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:281](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L281)
|
702
|
+
|
703
|
+
Retrieves the list of registered senders for this account by making an RPC call to the remote wallet.
|
704
|
+
Implements Wallet.getSenders.
|
705
|
+
|
706
|
+
#### Returns
|
707
|
+
|
708
|
+
`Promise`\<`AztecAddress`[]\>
|
709
|
+
|
710
|
+
A promise that resolves to an array of AztecAddress objects.
|
711
|
+
|
712
|
+
#### See
|
713
|
+
|
714
|
+
[AztecWalletMethodMap.aztec\_getSenders](../interfaces/AztecWalletMethodMap.md#aztec_getsenders)
|
715
|
+
|
716
|
+
#### Implementation of
|
717
|
+
|
718
|
+
`Wallet.getSenders`
|
719
|
+
|
720
|
+
***
|
721
|
+
|
722
|
+
### getTxReceipt()
|
723
|
+
|
724
|
+
> **getTxReceipt**(`txHash`): `Promise`\<`TxReceipt`\>
|
725
|
+
|
726
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:505](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L505)
|
727
|
+
|
728
|
+
Retrieves the receipt for a given transaction hash via an RPC call to the remote wallet.
|
729
|
+
Implements Wallet.getTxReceipt.
|
730
|
+
|
731
|
+
#### Parameters
|
732
|
+
|
733
|
+
##### txHash
|
734
|
+
|
735
|
+
`TxHash`
|
736
|
+
|
737
|
+
The TxHash of the transaction.
|
738
|
+
|
739
|
+
#### Returns
|
740
|
+
|
741
|
+
`Promise`\<`TxReceipt`\>
|
742
|
+
|
743
|
+
A promise that resolves to the TxReceipt.
|
744
|
+
|
745
|
+
#### See
|
746
|
+
|
747
|
+
[AztecWalletMethodMap.aztec\_getTxReceipt](../interfaces/AztecWalletMethodMap.md#aztec_gettxreceipt)
|
748
|
+
|
749
|
+
#### Implementation of
|
750
|
+
|
751
|
+
`Wallet.getTxReceipt`
|
752
|
+
|
753
|
+
***
|
754
|
+
|
755
|
+
### getVersion()
|
756
|
+
|
757
|
+
> **getVersion**(): `Fr`
|
758
|
+
|
759
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:140](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L140)
|
760
|
+
|
761
|
+
Gets the version of the wallet (typically PXE version).
|
762
|
+
This value is cached during initialization.
|
763
|
+
|
764
|
+
#### Returns
|
765
|
+
|
766
|
+
`Fr`
|
767
|
+
|
768
|
+
The wallet version as an Fr.
|
769
|
+
|
770
|
+
#### Throws
|
771
|
+
|
772
|
+
If the wallet is not initialized.
|
773
|
+
|
774
|
+
#### Implementation of
|
775
|
+
|
776
|
+
`Wallet.getVersion`
|
777
|
+
|
778
|
+
***
|
779
|
+
|
780
|
+
### getVersionAsync()
|
781
|
+
|
782
|
+
> **getVersionAsync**(): `Promise`\<`Fr`\>
|
783
|
+
|
784
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:156](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L156)
|
785
|
+
|
786
|
+
Asynchronously fetches the wallet version (typically the PXE version) from the remote wallet via an RPC call.
|
787
|
+
This method directly queries the connected wallet node.
|
788
|
+
|
789
|
+
#### Returns
|
790
|
+
|
791
|
+
`Promise`\<`Fr`\>
|
792
|
+
|
793
|
+
A promise that resolves to the wallet version as an Fr.
|
794
|
+
|
795
|
+
#### See
|
796
|
+
|
797
|
+
[AztecWalletMethodMap.aztec\_getVersion](../interfaces/AztecWalletMethodMap.md#aztec_getversion)
|
798
|
+
|
799
|
+
***
|
800
|
+
|
801
|
+
### initialize()
|
802
|
+
|
803
|
+
> **initialize**(): `Promise`\<`void`\>
|
804
|
+
|
805
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:237](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L237)
|
806
|
+
|
807
|
+
**`Internal`**
|
808
|
+
|
809
|
+
Initializes the wallet instance by fetching and caching necessary values.
|
810
|
+
This method is called by [createAztecWallet](../functions/createAztecWallet.md).
|
811
|
+
|
812
|
+
#### Returns
|
813
|
+
|
814
|
+
`Promise`\<`void`\>
|
815
|
+
|
816
|
+
***
|
817
|
+
|
818
|
+
### profileTx()
|
819
|
+
|
820
|
+
> **profileTx**(`txRequest`, `profileMode`, `skipProofGeneration?`, `msgSender?`): `Promise`\<`TxProfileResult`\>
|
821
|
+
|
822
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:566](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L566)
|
823
|
+
|
824
|
+
Profiles a transaction for performance analysis by making an RPC call to the remote wallet.
|
825
|
+
Implements Wallet.profileTx.
|
826
|
+
|
827
|
+
#### Parameters
|
828
|
+
|
829
|
+
##### txRequest
|
830
|
+
|
831
|
+
`TxExecutionRequest`
|
832
|
+
|
833
|
+
The TxExecutionRequest to profile.
|
834
|
+
|
835
|
+
##### profileMode
|
836
|
+
|
837
|
+
The mode for profiling: 'gates', 'execution-steps', or 'full'.
|
838
|
+
|
839
|
+
`"gates"` | `"execution-steps"` | `"full"`
|
840
|
+
|
841
|
+
##### skipProofGeneration?
|
842
|
+
|
843
|
+
`boolean`
|
844
|
+
|
845
|
+
Optional flag to skip proof generation during profiling.
|
846
|
+
|
847
|
+
##### msgSender?
|
848
|
+
|
849
|
+
`AztecAddress`
|
850
|
+
|
851
|
+
Optional AztecAddress of the message sender for profiling context.
|
852
|
+
|
853
|
+
#### Returns
|
854
|
+
|
855
|
+
`Promise`\<`TxProfileResult`\>
|
856
|
+
|
857
|
+
A promise that resolves to the TxProfileResult.
|
858
|
+
|
859
|
+
#### See
|
860
|
+
|
861
|
+
[AztecWalletMethodMap.aztec\_profileTx](../interfaces/AztecWalletMethodMap.md#aztec_profiletx)
|
862
|
+
|
863
|
+
#### Implementation of
|
864
|
+
|
865
|
+
`Wallet.profileTx`
|
866
|
+
|
867
|
+
***
|
868
|
+
|
869
|
+
### proveTx()
|
870
|
+
|
871
|
+
> **proveTx**(`txRequest`, `privateExecutionResult?`): `Promise`\<`TxProvingResult`\>
|
872
|
+
|
873
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:455](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L455)
|
874
|
+
|
875
|
+
Proves a transaction execution request by making an RPC call to the remote wallet.
|
876
|
+
Implements Wallet.proveTx.
|
877
|
+
|
878
|
+
#### Parameters
|
879
|
+
|
880
|
+
##### txRequest
|
881
|
+
|
882
|
+
`TxExecutionRequest`
|
883
|
+
|
884
|
+
The TxExecutionRequest to prove.
|
885
|
+
|
886
|
+
##### privateExecutionResult?
|
887
|
+
|
888
|
+
`PrivateExecutionResult`
|
889
|
+
|
890
|
+
Optional PrivateExecutionResult from a private execution phase.
|
891
|
+
|
892
|
+
#### Returns
|
893
|
+
|
894
|
+
`Promise`\<`TxProvingResult`\>
|
895
|
+
|
896
|
+
A promise that resolves to the TxProvingResult.
|
897
|
+
|
898
|
+
#### See
|
899
|
+
|
900
|
+
[AztecWalletMethodMap.aztec\_proveTx](../interfaces/AztecWalletMethodMap.md#aztec_provetx)
|
901
|
+
|
902
|
+
#### Implementation of
|
903
|
+
|
904
|
+
`Wallet.proveTx`
|
905
|
+
|
906
|
+
***
|
907
|
+
|
908
|
+
### registerContract()
|
909
|
+
|
910
|
+
> **registerContract**(`contract`): `Promise`\<`void`\>
|
911
|
+
|
912
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:309](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L309)
|
913
|
+
|
914
|
+
Registers a deployed contract instance with the remote wallet via an RPC call.
|
915
|
+
Implements Wallet.registerContract.
|
916
|
+
|
917
|
+
#### Parameters
|
918
|
+
|
919
|
+
##### contract
|
920
|
+
|
921
|
+
An object containing the contract's ContractInstanceWithAddress and optionally its ContractArtifact.
|
922
|
+
|
923
|
+
###### artifact?
|
924
|
+
|
925
|
+
`ContractArtifact`
|
926
|
+
|
927
|
+
###### instance
|
928
|
+
|
929
|
+
`ContractInstanceWithAddress`
|
930
|
+
|
931
|
+
#### Returns
|
932
|
+
|
933
|
+
`Promise`\<`void`\>
|
934
|
+
|
935
|
+
A promise that resolves when the contract is registered by the remote wallet.
|
936
|
+
|
937
|
+
#### See
|
938
|
+
|
939
|
+
[AztecWalletMethodMap.aztec\_registerContract](../interfaces/AztecWalletMethodMap.md#aztec_registercontract)
|
940
|
+
|
941
|
+
#### Implementation of
|
942
|
+
|
943
|
+
`Wallet.registerContract`
|
944
|
+
|
945
|
+
***
|
946
|
+
|
947
|
+
### registerContractClass()
|
948
|
+
|
949
|
+
> **registerContractClass**(`artifact`): `Promise`\<`void`\>
|
950
|
+
|
951
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:332](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L332)
|
952
|
+
|
953
|
+
Registers a contract class (artifact/bytecode) with the remote wallet via an RPC call.
|
954
|
+
Implements Wallet.registerContractClass.
|
955
|
+
|
956
|
+
#### Parameters
|
957
|
+
|
958
|
+
##### artifact
|
959
|
+
|
960
|
+
`ContractArtifact`
|
961
|
+
|
962
|
+
The ContractArtifact to register.
|
963
|
+
|
964
|
+
#### Returns
|
965
|
+
|
966
|
+
`Promise`\<`void`\>
|
967
|
+
|
968
|
+
A promise that resolves when the class is registered by the remote wallet.
|
969
|
+
|
970
|
+
#### See
|
971
|
+
|
972
|
+
[AztecWalletMethodMap.aztec\_registerContractClass](../interfaces/AztecWalletMethodMap.md#aztec_registercontractclass)
|
973
|
+
|
974
|
+
#### Implementation of
|
975
|
+
|
976
|
+
`Wallet.registerContractClass`
|
977
|
+
|
978
|
+
***
|
979
|
+
|
980
|
+
### registerSender()
|
981
|
+
|
982
|
+
> **registerSender**(`address`): `Promise`\<`AztecAddress`\>
|
983
|
+
|
984
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:267](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L267)
|
985
|
+
|
986
|
+
Registers an authorized sender for this account by making an RPC call to the remote wallet.
|
987
|
+
Implements Wallet.registerSender.
|
988
|
+
|
989
|
+
#### Parameters
|
990
|
+
|
991
|
+
##### address
|
992
|
+
|
993
|
+
`AztecAddress`
|
994
|
+
|
995
|
+
The AztecAddress of the sender to register.
|
996
|
+
|
997
|
+
#### Returns
|
998
|
+
|
999
|
+
`Promise`\<`AztecAddress`\>
|
1000
|
+
|
1001
|
+
A promise that resolves to the registered sender's AztecAddress.
|
1002
|
+
|
1003
|
+
#### See
|
1004
|
+
|
1005
|
+
[AztecWalletMethodMap.aztec\_registerSender](../interfaces/AztecWalletMethodMap.md#aztec_registersender)
|
1006
|
+
|
1007
|
+
#### Implementation of
|
1008
|
+
|
1009
|
+
`Wallet.registerSender`
|
1010
|
+
|
1011
|
+
***
|
1012
|
+
|
1013
|
+
### removeSender()
|
1014
|
+
|
1015
|
+
> **removeSender**(`sender`): `Promise`\<`void`\>
|
1016
|
+
|
1017
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:295](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L295)
|
1018
|
+
|
1019
|
+
Removes an authorized sender from this account by making an RPC call to the remote wallet.
|
1020
|
+
Implements Wallet.removeSender.
|
1021
|
+
|
1022
|
+
#### Parameters
|
1023
|
+
|
1024
|
+
##### sender
|
1025
|
+
|
1026
|
+
`AztecAddress`
|
1027
|
+
|
1028
|
+
The AztecAddress of the sender to remove.
|
1029
|
+
|
1030
|
+
#### Returns
|
1031
|
+
|
1032
|
+
`Promise`\<`void`\>
|
1033
|
+
|
1034
|
+
A promise that resolves when the sender is removed by the remote wallet.
|
1035
|
+
|
1036
|
+
#### See
|
1037
|
+
|
1038
|
+
[AztecWalletMethodMap.aztec\_removeSender](../interfaces/AztecWalletMethodMap.md#aztec_removesender)
|
1039
|
+
|
1040
|
+
#### Implementation of
|
1041
|
+
|
1042
|
+
`Wallet.removeSender`
|
1043
|
+
|
1044
|
+
***
|
1045
|
+
|
1046
|
+
### sendTx()
|
1047
|
+
|
1048
|
+
> **sendTx**(`tx`): `Promise`\<`TxHash`\>
|
1049
|
+
|
1050
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:490](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L490)
|
1051
|
+
|
1052
|
+
Sends a proven transaction to the network via an RPC call to the remote wallet.
|
1053
|
+
Implements Wallet.sendTx.
|
1054
|
+
|
1055
|
+
#### Parameters
|
1056
|
+
|
1057
|
+
##### tx
|
1058
|
+
|
1059
|
+
`Tx`
|
1060
|
+
|
1061
|
+
The proven Tx to send.
|
1062
|
+
|
1063
|
+
#### Returns
|
1064
|
+
|
1065
|
+
`Promise`\<`TxHash`\>
|
1066
|
+
|
1067
|
+
A promise that resolves to the TxHash.
|
1068
|
+
|
1069
|
+
#### See
|
1070
|
+
|
1071
|
+
[AztecWalletMethodMap.aztec\_sendTx](../interfaces/AztecWalletMethodMap.md#aztec_sendtx)
|
1072
|
+
|
1073
|
+
#### Implementation of
|
1074
|
+
|
1075
|
+
`Wallet.sendTx`
|
1076
|
+
|
1077
|
+
***
|
1078
|
+
|
1079
|
+
### simulateTx()
|
1080
|
+
|
1081
|
+
> **simulateTx**(`txRequest`, `simulatePublic`, `msgSender?`, `skipTxValidation?`, `skipFeeEnforcement?`, `scopes?`): `Promise`\<`TxSimulationResult`\>
|
1082
|
+
|
1083
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:525](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L525)
|
1084
|
+
|
1085
|
+
Simulates a transaction by making an RPC call to the remote wallet.
|
1086
|
+
Implements Wallet.simulateTx.
|
1087
|
+
|
1088
|
+
#### Parameters
|
1089
|
+
|
1090
|
+
##### txRequest
|
1091
|
+
|
1092
|
+
`TxExecutionRequest`
|
1093
|
+
|
1094
|
+
The TxExecutionRequest to simulate.
|
1095
|
+
|
1096
|
+
##### simulatePublic
|
1097
|
+
|
1098
|
+
`boolean`
|
1099
|
+
|
1100
|
+
Whether to simulate public parts of the transaction.
|
1101
|
+
|
1102
|
+
##### msgSender?
|
1103
|
+
|
1104
|
+
`AztecAddress`
|
1105
|
+
|
1106
|
+
Optional AztecAddress of the message sender for simulation context.
|
1107
|
+
|
1108
|
+
##### skipTxValidation?
|
1109
|
+
|
1110
|
+
`boolean`
|
1111
|
+
|
1112
|
+
Optional flag to skip transaction validation during simulation.
|
1113
|
+
|
1114
|
+
##### skipFeeEnforcement?
|
1115
|
+
|
1116
|
+
`boolean`
|
1117
|
+
|
1118
|
+
Optional flag to skip fee enforcement during simulation.
|
1119
|
+
|
1120
|
+
##### scopes?
|
1121
|
+
|
1122
|
+
`AztecAddress`[]
|
1123
|
+
|
1124
|
+
Optional array of AztecAddress scopes for the simulation.
|
1125
|
+
|
1126
|
+
#### Returns
|
1127
|
+
|
1128
|
+
`Promise`\<`TxSimulationResult`\>
|
1129
|
+
|
1130
|
+
A promise that resolves to the TxSimulationResult.
|
1131
|
+
|
1132
|
+
#### See
|
1133
|
+
|
1134
|
+
[AztecWalletMethodMap.aztec\_simulateTx](../interfaces/AztecWalletMethodMap.md#aztec_simulatetx)
|
1135
|
+
|
1136
|
+
#### Implementation of
|
1137
|
+
|
1138
|
+
`Wallet.simulateTx`
|
1139
|
+
|
1140
|
+
***
|
1141
|
+
|
1142
|
+
### simulateUtility()
|
1143
|
+
|
1144
|
+
> **simulateUtility**(`functionName`, `args`, `to`, `authWits?`, `from?`): `Promise`\<`UtilitySimulationResult`\>
|
1145
|
+
|
1146
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:602](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L602)
|
1147
|
+
|
1148
|
+
Simulates a utility function call (view function) by making an RPC call to the remote wallet.
|
1149
|
+
Implements Wallet.simulateUtility.
|
1150
|
+
|
1151
|
+
#### Parameters
|
1152
|
+
|
1153
|
+
##### functionName
|
1154
|
+
|
1155
|
+
`string`
|
1156
|
+
|
1157
|
+
The name of the utility function to call.
|
1158
|
+
|
1159
|
+
##### args
|
1160
|
+
|
1161
|
+
`unknown`[]
|
1162
|
+
|
1163
|
+
Arguments for the function call.
|
1164
|
+
|
1165
|
+
##### to
|
1166
|
+
|
1167
|
+
`AztecAddress`
|
1168
|
+
|
1169
|
+
The AztecAddress of the contract or account to call.
|
1170
|
+
|
1171
|
+
##### authWits?
|
1172
|
+
|
1173
|
+
`AuthWitness`[]
|
1174
|
+
|
1175
|
+
Optional array of AuthWitness for authorization.
|
1176
|
+
|
1177
|
+
##### from?
|
1178
|
+
|
1179
|
+
`AztecAddress`
|
1180
|
+
|
1181
|
+
Optional AztecAddress of the sender.
|
1182
|
+
|
1183
|
+
#### Returns
|
1184
|
+
|
1185
|
+
`Promise`\<`UtilitySimulationResult`\>
|
1186
|
+
|
1187
|
+
A promise that resolves to the UtilitySimulationResult.
|
1188
|
+
|
1189
|
+
#### See
|
1190
|
+
|
1191
|
+
[AztecWalletMethodMap.aztec\_simulateUtility](../interfaces/AztecWalletMethodMap.md#aztec_simulateutility)
|
1192
|
+
|
1193
|
+
#### Implementation of
|
1194
|
+
|
1195
|
+
`Wallet.simulateUtility`
|
1196
|
+
|
1197
|
+
***
|
1198
|
+
|
1199
|
+
### updateContract()
|
1200
|
+
|
1201
|
+
> **updateContract**(`_contractAddress`, `artifact`): `Promise`\<`void`\>
|
1202
|
+
|
1203
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:721](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L721)
|
1204
|
+
|
1205
|
+
Updates a contract's artifact by re-registering its class with the remote wallet via an RPC call.
|
1206
|
+
Implements Wallet.updateContract.
|
1207
|
+
|
1208
|
+
#### Parameters
|
1209
|
+
|
1210
|
+
##### \_contractAddress
|
1211
|
+
|
1212
|
+
`AztecAddress`
|
1213
|
+
|
1214
|
+
The AztecAddress of the contract to update (often unused if primarily updating the class).
|
1215
|
+
|
1216
|
+
##### artifact
|
1217
|
+
|
1218
|
+
`ContractArtifact`
|
1219
|
+
|
1220
|
+
The new ContractArtifact.
|
1221
|
+
|
1222
|
+
#### Returns
|
1223
|
+
|
1224
|
+
`Promise`\<`void`\>
|
1225
|
+
|
1226
|
+
A promise that resolves when the update is complete on the remote wallet.
|
1227
|
+
|
1228
|
+
#### See
|
1229
|
+
|
1230
|
+
[AztecWalletMethodMap.aztec\_registerContractClass](../interfaces/AztecWalletMethodMap.md#aztec_registercontractclass) (as this is what it typically calls)
|
1231
|
+
|
1232
|
+
#### Implementation of
|
1233
|
+
|
1234
|
+
`Wallet.updateContract`
|
1235
|
+
|
1236
|
+
***
|
1237
|
+
|
1238
|
+
### wmExecuteTx()
|
1239
|
+
|
1240
|
+
> **wmExecuteTx**(`interaction`): `Promise`\<`SentTx`\>
|
1241
|
+
|
1242
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:752](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L752)
|
1243
|
+
|
1244
|
+
Executes a transaction based on a ContractFunctionInteraction.
|
1245
|
+
This WalletMesh-specific helper method simplifies sending a transaction by deriving
|
1246
|
+
the necessary ExecutionPayload from the interaction and making an RPC call
|
1247
|
+
to the `aztec_wmExecuteTx` method on the remote wallet.
|
1248
|
+
The remote wallet is expected to handle fee configuration, proof generation, and submission.
|
1249
|
+
|
1250
|
+
#### Parameters
|
1251
|
+
|
1252
|
+
##### interaction
|
1253
|
+
|
1254
|
+
`ContractFunctionInteraction`
|
1255
|
+
|
1256
|
+
The ContractFunctionInteraction representing the desired contract call.
|
1257
|
+
|
1258
|
+
#### Returns
|
1259
|
+
|
1260
|
+
`Promise`\<`SentTx`\>
|
1261
|
+
|
1262
|
+
A SentTx object that can be used to track the transaction.
|
1263
|
+
|
1264
|
+
#### See
|
1265
|
+
|
1266
|
+
[AztecWalletMethodMap.aztec\_wmExecuteTx](../interfaces/AztecWalletMethodMap.md#aztec_wmexecutetx)
|
1267
|
+
|
1268
|
+
***
|
1269
|
+
|
1270
|
+
### wmSimulateTx()
|
1271
|
+
|
1272
|
+
> **wmSimulateTx**(`interaction`): `Promise`\<`TxSimulationResult`\>
|
1273
|
+
|
1274
|
+
Defined in: [aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts:785](https://github.com/WalletMesh/walletmesh-packages/blob/cb714b71a23dbdbacd8723a799d14c589fdf51f9/aztec/rpc-wallet/src/client/aztec-dapp-wallet.ts#L785)
|
1275
|
+
|
1276
|
+
Simulates a transaction based on a ContractFunctionInteraction.
|
1277
|
+
This WalletMesh-specific helper method simplifies simulating a transaction by deriving
|
1278
|
+
the necessary ExecutionPayload from the interaction and making an RPC call
|
1279
|
+
to the `aztec_wmSimulateTx` method on the remote wallet.
|
1280
|
+
|
1281
|
+
#### Parameters
|
1282
|
+
|
1283
|
+
##### interaction
|
1284
|
+
|
1285
|
+
`ContractFunctionInteraction`
|
1286
|
+
|
1287
|
+
The ContractFunctionInteraction representing the desired contract call.
|
1288
|
+
|
1289
|
+
#### Returns
|
1290
|
+
|
1291
|
+
`Promise`\<`TxSimulationResult`\>
|
1292
|
+
|
1293
|
+
A promise that resolves to the TxSimulationResult.
|
1294
|
+
|
1295
|
+
#### Remarks
|
1296
|
+
|
1297
|
+
TODO(twt): This should return a more useful result, not the raw TxSimulationResult.
|
1298
|
+
Copying the logic from `aztec.js/src/contract/contract_function_interaction.ts`
|
1299
|
+
could work if we can get the Function ABI or maybe have `aztec_wmSimulateTx` return hints
|
1300
|
+
about how to interpret the result.
|
1301
|
+
|
1302
|
+
#### See
|
1303
|
+
|
1304
|
+
[AztecWalletMethodMap.aztec\_wmSimulateTx](../interfaces/AztecWalletMethodMap.md#aztec_wmsimulatetx)
|