@walletmesh/aztec-rpc-wallet 0.4.0 → 0.5.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 +12 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/client/aztec-dapp-wallet.d.ts +6 -6
- package/dist/client/aztec-dapp-wallet.d.ts.map +1 -1
- package/dist/client/aztec-dapp-wallet.js +7 -7
- package/dist/client/aztec-router-provider.d.ts +1 -1
- package/dist/client/aztec-router-provider.d.ts.map +1 -1
- package/dist/client/aztec-router-provider.js +1 -1
- package/dist/client/helpers.d.ts.map +1 -1
- package/dist/client/helpers.js +2 -2
- package/dist/client/register-serializers.js +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/types.d.ts +11 -9
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/wallet/create-node.d.ts +1 -1
- package/dist/wallet/create-node.d.ts.map +1 -1
- package/dist/wallet/create-node.js +1 -1
- package/dist/wallet/handlers/account.d.ts +1 -1
- package/dist/wallet/handlers/account.d.ts.map +1 -1
- package/dist/wallet/handlers/account.js +1 -1
- package/dist/wallet/handlers/contract-interaction.d.ts +1 -1
- package/dist/wallet/handlers/contract-interaction.d.ts.map +1 -1
- package/dist/wallet/handlers/contract-interaction.js +4 -4
- package/dist/wallet/handlers/contract.d.ts.map +1 -1
- package/dist/wallet/handlers/contract.js +1 -1
- package/dist/wallet/handlers/event.d.ts +1 -1
- package/dist/wallet/handlers/event.d.ts.map +1 -1
- package/dist/wallet/handlers/event.js +1 -1
- package/dist/wallet/handlers/index.d.ts.map +1 -1
- package/dist/wallet/handlers/index.js +2 -2
- package/dist/wallet/handlers/node.d.ts +1 -1
- package/dist/wallet/handlers/node.d.ts.map +1 -1
- package/dist/wallet/handlers/node.js +1 -1
- package/dist/wallet/handlers/senders.d.ts +1 -1
- package/dist/wallet/handlers/senders.d.ts.map +1 -1
- package/dist/wallet/handlers/senders.js +1 -1
- package/dist/wallet/handlers/transaction.d.ts +5 -4
- package/dist/wallet/handlers/transaction.d.ts.map +1 -1
- package/dist/wallet/handlers/transaction.js +9 -6
- package/dist/wallet/serializers.d.ts +1 -1
- package/dist/wallet/serializers.d.ts.map +1 -1
- package/dist/wallet/serializers.js +25 -25
- package/docs/README.md +1 -1
- package/docs/classes/AztecDappWallet.md +47 -47
- package/docs/classes/AztecRouterProvider.md +4 -4
- package/docs/classes/AztecWalletError.md +31 -7
- package/docs/classes/ContractArtifactCache.md +4 -4
- package/docs/functions/connectAztec.md +2 -2
- package/docs/functions/createAztecWallet.md +2 -2
- package/docs/functions/createAztecWalletNode.md +2 -2
- package/docs/functions/registerAztecSerializers.md +2 -2
- package/docs/functions/registerWalletAztecSerializers.md +2 -2
- package/docs/globals.md +2 -2
- package/docs/interfaces/AztecHandlerContext.md +5 -5
- package/docs/interfaces/AztecWalletContext.md +5 -5
- package/docs/interfaces/AztecWalletMethodMap.md +41 -37
- package/docs/type-aliases/AztecChainId.md +2 -2
- package/docs/variables/ALL_AZTEC_METHODS.md +2 -2
- package/docs/variables/AztecWalletErrorMap.md +2 -2
- package/docs/variables/AztecWalletSerializer.md +2 -2
- package/package.json +11 -9
- package/src/client/aztec-dapp-wallet.test.ts +8 -6
- package/src/client/aztec-dapp-wallet.ts +15 -14
- package/src/client/aztec-router-provider.test.ts +2 -2
- package/src/client/aztec-router-provider.ts +1 -1
- package/src/client/helpers.test.ts +3 -3
- package/src/client/helpers.ts +1 -2
- package/src/client/register-serializers.ts +1 -1
- package/src/contractArtifactCache.test.ts +1 -1
- package/src/index.test.ts +1 -1
- package/src/index.ts +21 -28
- package/src/types.ts +20 -20
- package/src/wallet/create-node.test.ts +3 -3
- package/src/wallet/create-node.ts +3 -4
- package/src/wallet/handlers/account.test.ts +6 -6
- package/src/wallet/handlers/account.ts +2 -2
- package/src/wallet/handlers/contract-interaction.test.ts +6 -7
- package/src/wallet/handlers/contract-interaction.ts +7 -7
- package/src/wallet/handlers/contract.test.ts +5 -5
- package/src/wallet/handlers/contract.ts +1 -1
- package/src/wallet/handlers/event.test.ts +4 -4
- package/src/wallet/handlers/event.ts +2 -2
- package/src/wallet/handlers/index.ts +1 -1
- package/src/wallet/handlers/node.test.ts +5 -6
- package/src/wallet/handlers/node.ts +2 -2
- package/src/wallet/handlers/senders.test.ts +4 -4
- package/src/wallet/handlers/senders.ts +2 -2
- package/src/wallet/handlers/transaction.test.ts +22 -13
- package/src/wallet/handlers/transaction.ts +10 -7
- package/src/wallet/serializers.test.ts +4 -6
- package/src/wallet/serializers.ts +44 -42
@@ -1,4 +1,4 @@
|
|
1
|
-
[**@walletmesh/aztec-rpc-wallet v0.
|
1
|
+
[**@walletmesh/aztec-rpc-wallet v0.5.0**](../README.md)
|
2
2
|
|
3
3
|
***
|
4
4
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
# Interface: AztecHandlerContext
|
8
8
|
|
9
|
-
Defined in: [aztec/rpc-wallet/src/wallet/handlers/index.ts:26](https://github.com/WalletMesh/walletmesh-packages/blob/
|
9
|
+
Defined in: [aztec/rpc-wallet/src/wallet/handlers/index.ts:26](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/wallet/handlers/index.ts#L26)
|
10
10
|
|
11
11
|
Defines the context object that is passed to all Aztec wallet JSON-RPC method handlers.
|
12
12
|
This context provides handlers with the necessary dependencies to perform their operations.
|
@@ -26,7 +26,7 @@ It extends the base JSONRPCContext with Aztec-specific instances.
|
|
26
26
|
|
27
27
|
> **cache**: [`ContractArtifactCache`](../classes/ContractArtifactCache.md)
|
28
28
|
|
29
|
-
Defined in: [aztec/rpc-wallet/src/wallet/handlers/index.ts:29](https://github.com/WalletMesh/walletmesh-packages/blob/
|
29
|
+
Defined in: [aztec/rpc-wallet/src/wallet/handlers/index.ts:29](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/wallet/handlers/index.ts#L29)
|
30
30
|
|
31
31
|
An instance of [ContractArtifactCache](../classes/ContractArtifactCache.md) used for caching
|
32
32
|
contract artifacts to optimize performance.
|
@@ -37,7 +37,7 @@ An instance of [ContractArtifactCache](../classes/ContractArtifactCache.md) used
|
|
37
37
|
|
38
38
|
> **pxe**: `PXE`
|
39
39
|
|
40
|
-
Defined in: [aztec/rpc-wallet/src/wallet/handlers/index.ts:28](https://github.com/WalletMesh/walletmesh-packages/blob/
|
40
|
+
Defined in: [aztec/rpc-wallet/src/wallet/handlers/index.ts:28](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/wallet/handlers/index.ts#L28)
|
41
41
|
|
42
42
|
An instance of PXE (Private Execution Environment) client
|
43
43
|
from `aztec.js`, used for interacting with the Aztec network.
|
@@ -48,7 +48,7 @@ An instance of PXE (Private Execution Environment) client
|
|
48
48
|
|
49
49
|
> **wallet**: `AccountWallet`
|
50
50
|
|
51
|
-
Defined in: [aztec/rpc-wallet/src/wallet/handlers/index.ts:27](https://github.com/WalletMesh/walletmesh-packages/blob/
|
51
|
+
Defined in: [aztec/rpc-wallet/src/wallet/handlers/index.ts:27](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/wallet/handlers/index.ts#L27)
|
52
52
|
|
53
53
|
An instance of AccountWallet from `aztec.js`,
|
54
54
|
representing the user's account and signing capabilities.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
[**@walletmesh/aztec-rpc-wallet v0.
|
1
|
+
[**@walletmesh/aztec-rpc-wallet v0.5.0**](../README.md)
|
2
2
|
|
3
3
|
***
|
4
4
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
# Interface: AztecWalletContext
|
8
8
|
|
9
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
9
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:70](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L70)
|
10
10
|
|
11
11
|
Defines the context object provided to all Aztec wallet-side JSON-RPC method handlers.
|
12
12
|
This context aggregates essential dependencies required by handlers to perform their operations.
|
@@ -21,7 +21,7 @@ This context aggregates essential dependencies required by handlers to perform t
|
|
21
21
|
|
22
22
|
> **cache**: [`ContractArtifactCache`](../classes/ContractArtifactCache.md)
|
23
23
|
|
24
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
24
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:86](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L86)
|
25
25
|
|
26
26
|
An instance of [ContractArtifactCache](../classes/ContractArtifactCache.md) used for caching contract artifacts.
|
27
27
|
This helps optimize performance by avoiding redundant fetches of artifact data.
|
@@ -32,7 +32,7 @@ This helps optimize performance by avoiding redundant fetches of artifact data.
|
|
32
32
|
|
33
33
|
> **pxe**: `PXE`
|
34
34
|
|
35
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
35
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:81](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L81)
|
36
36
|
|
37
37
|
The `aztec.js` PXE (Private Execution Environment) client instance.
|
38
38
|
This is used for interacting with the Aztec network, such as simulating transactions,
|
@@ -44,7 +44,7 @@ getting node information, fetching blocks, and managing private state.
|
|
44
44
|
|
45
45
|
> **wallet**: `AccountWallet`
|
46
46
|
|
47
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
47
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:75](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L75)
|
48
48
|
|
49
49
|
The `aztec.js` AccountWallet instance. This wallet holds the user's account keys
|
50
50
|
and provides methods for signing, creating transactions, and interacting with the PXE.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
[**@walletmesh/aztec-rpc-wallet v0.
|
1
|
+
[**@walletmesh/aztec-rpc-wallet v0.5.0**](../README.md)
|
2
2
|
|
3
3
|
***
|
4
4
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
# Interface: AztecWalletMethodMap
|
8
8
|
|
9
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
9
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:115](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L115)
|
10
10
|
|
11
11
|
Defines the complete map of all JSON-RPC methods supported by the Aztec RPC Wallet.
|
12
12
|
This interface extends the base WalletMethodMap from `@walletmesh/router`
|
@@ -39,7 +39,7 @@ Methods are loosely grouped by functionality (Chain/Node, Account, Sender, etc.)
|
|
39
39
|
|
40
40
|
> **aztec\_createAuthWit**: `object`
|
41
41
|
|
42
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
42
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:199](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L199)
|
43
43
|
|
44
44
|
Creates an AuthWitness (authorization witness) for a given message hash or intent.
|
45
45
|
Used for delegating actions.
|
@@ -70,7 +70,7 @@ result - The created AuthWitness.
|
|
70
70
|
|
71
71
|
> **aztec\_getAddress**: `object`
|
72
72
|
|
73
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
73
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:183](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L183)
|
74
74
|
|
75
75
|
Retrieves the primary AztecAddress of the wallet's account.
|
76
76
|
|
@@ -96,7 +96,7 @@ result - The wallet's AztecAddress.
|
|
96
96
|
|
97
97
|
> **aztec\_getBlock**: `object`
|
98
98
|
|
99
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
99
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:133](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L133)
|
100
100
|
|
101
101
|
Retrieves a specific L2 block by its number.
|
102
102
|
|
@@ -126,7 +126,7 @@ result - The L2Block data, or null/undefined if not found (behavior depends on P
|
|
126
126
|
|
127
127
|
> **aztec\_getBlockNumber**: `object`
|
128
128
|
|
129
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
129
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:139](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L139)
|
130
130
|
|
131
131
|
Retrieves the current (latest) L2 block number.
|
132
132
|
|
@@ -152,7 +152,7 @@ result - The current block number.
|
|
152
152
|
|
153
153
|
> **aztec\_getChainId**: `object`
|
154
154
|
|
155
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
155
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:145](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L145)
|
156
156
|
|
157
157
|
Retrieves the chain ID of the connected Aztec network.
|
158
158
|
|
@@ -178,7 +178,7 @@ result - The chain ID as an Fr.
|
|
178
178
|
|
179
179
|
> **aztec\_getCompleteAddress**: `object`
|
180
180
|
|
181
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
181
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:189](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L189)
|
182
182
|
|
183
183
|
Retrieves the CompleteAddress of the wallet's account, including public keys.
|
184
184
|
|
@@ -204,7 +204,7 @@ result - The wallet's CompleteAddress.
|
|
204
204
|
|
205
205
|
> **aztec\_getContractClassMetadata**: `object`
|
206
206
|
|
207
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
207
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:256](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L256)
|
208
208
|
|
209
209
|
Retrieves ContractClassMetadata for a specific contract class.
|
210
210
|
|
@@ -238,7 +238,7 @@ result - The ContractClassMetadata.
|
|
238
238
|
|
239
239
|
> **aztec\_getContractMetadata**: `object`
|
240
240
|
|
241
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
241
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:245](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L245)
|
242
242
|
|
243
243
|
Retrieves ContractMetadata for a specific deployed contract.
|
244
244
|
|
@@ -268,7 +268,7 @@ result - The ContractMetadata for the specified contract.
|
|
268
268
|
|
269
269
|
> **aztec\_getContracts**: `object`
|
270
270
|
|
271
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
271
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:238](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L238)
|
272
272
|
|
273
273
|
Retrieves a list of all AztecAddresses of contracts known to the PXE/wallet.
|
274
274
|
|
@@ -294,7 +294,7 @@ result - An array of contract AztecAddresses.
|
|
294
294
|
|
295
295
|
> **aztec\_getCurrentBaseFees**: `object`
|
296
296
|
|
297
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
297
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:175](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L175)
|
298
298
|
|
299
299
|
Retrieves the current base gas fees on the network.
|
300
300
|
|
@@ -320,7 +320,7 @@ result - A GasFees object.
|
|
320
320
|
|
321
321
|
> **aztec\_getNodeInfo**: `object`
|
322
322
|
|
323
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
323
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:157](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L157)
|
324
324
|
|
325
325
|
Retrieves comprehensive information about the connected Aztec node.
|
326
326
|
|
@@ -346,7 +346,7 @@ result - A NodeInfo object.
|
|
346
346
|
|
347
347
|
> **aztec\_getPrivateEvents**: `object`
|
348
348
|
|
349
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:386](https://github.com/WalletMesh/walletmesh-packages/blob/
|
349
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:386](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L386)
|
350
350
|
|
351
351
|
Retrieves private (encrypted) events from the blockchain.
|
352
352
|
|
@@ -392,7 +392,7 @@ result - An array of decoded private event data (type `unknown[]`, actual type d
|
|
392
392
|
|
393
393
|
> **aztec\_getProvenBlockNumber**: `object`
|
394
394
|
|
395
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
395
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:163](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L163)
|
396
396
|
|
397
397
|
Retrieves the latest L2 block number that has been proven.
|
398
398
|
|
@@ -418,7 +418,7 @@ result - The latest proven block number.
|
|
418
418
|
|
419
419
|
> **aztec\_getPublicEvents**: `object`
|
420
420
|
|
421
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:404](https://github.com/WalletMesh/walletmesh-packages/blob/
|
421
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:404](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L404)
|
422
422
|
|
423
423
|
Retrieves public (unencrypted) events from the blockchain.
|
424
424
|
|
@@ -456,7 +456,7 @@ result - An array of decoded public event data (type `unknown[]`, actual type de
|
|
456
456
|
|
457
457
|
> **aztec\_getPXEInfo**: `object`
|
458
458
|
|
459
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
459
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:169](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L169)
|
460
460
|
|
461
461
|
Retrieves information about the PXE service, including capabilities and version.
|
462
462
|
|
@@ -482,7 +482,7 @@ result - A PXEInfo object.
|
|
482
482
|
|
483
483
|
> **aztec\_getSenders**: `object`
|
484
484
|
|
485
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
485
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:220](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L220)
|
486
486
|
|
487
487
|
Retrieves a list of all currently authorized sender AztecAddresses.
|
488
488
|
|
@@ -508,7 +508,7 @@ result - An array of authorized AztecAddresses.
|
|
508
508
|
|
509
509
|
> **aztec\_getTxReceipt**: `object`
|
510
510
|
|
511
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
511
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:310](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L310)
|
512
512
|
|
513
513
|
Retrieves the TxReceipt for a transaction.
|
514
514
|
|
@@ -538,7 +538,7 @@ result - The TxReceipt.
|
|
538
538
|
|
539
539
|
> **aztec\_getVersion**: `object`
|
540
540
|
|
541
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
541
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:151](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L151)
|
542
542
|
|
543
543
|
Retrieves the version of the connected PXE (Private Execution Environment) or node.
|
544
544
|
|
@@ -564,7 +564,7 @@ result - The version as an Fr.
|
|
564
564
|
|
565
565
|
> **aztec\_profileTx**: `object`
|
566
566
|
|
567
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:345](https://github.com/WalletMesh/walletmesh-packages/blob/
|
567
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:345](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L345)
|
568
568
|
|
569
569
|
Profiles a TxExecutionRequest for performance analysis.
|
570
570
|
|
@@ -606,7 +606,7 @@ result - The TxProfileResult.
|
|
606
606
|
|
607
607
|
> **aztec\_proveTx**: `object`
|
608
608
|
|
609
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
609
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:290](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L290)
|
610
610
|
|
611
611
|
Generates proofs for a transaction execution request.
|
612
612
|
|
@@ -640,7 +640,7 @@ result - The TxProvingResult, including the proven transaction.
|
|
640
640
|
|
641
641
|
> **aztec\_registerContract**: `object`
|
642
642
|
|
643
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
643
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:267](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L267)
|
644
644
|
|
645
645
|
Registers a deployed contract instance with the wallet.
|
646
646
|
|
@@ -674,7 +674,7 @@ result - `true` if registration was successful.
|
|
674
674
|
|
675
675
|
> **aztec\_registerContractClass**: `object`
|
676
676
|
|
677
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
677
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:277](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L277)
|
678
678
|
|
679
679
|
Registers a contract class (bytecode and ABI) with the wallet.
|
680
680
|
|
@@ -704,7 +704,7 @@ result - `true` if registration was successful.
|
|
704
704
|
|
705
705
|
> **aztec\_registerSender**: `object`
|
706
706
|
|
707
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
707
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:211](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L211)
|
708
708
|
|
709
709
|
Registers a new authorized sender AztecAddress.
|
710
710
|
|
@@ -734,7 +734,7 @@ result - The registered AztecAddress.
|
|
734
734
|
|
735
735
|
> **aztec\_removeSender**: `object`
|
736
736
|
|
737
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
737
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:227](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L227)
|
738
738
|
|
739
739
|
Removes an AztecAddress from the list of authorized senders.
|
740
740
|
|
@@ -764,7 +764,7 @@ result - `true` if removal was successful.
|
|
764
764
|
|
765
765
|
> **aztec\_sendTx**: `object`
|
766
766
|
|
767
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
767
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:300](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L300)
|
768
768
|
|
769
769
|
Sends a proven Tx (transaction) to the network.
|
770
770
|
|
@@ -794,13 +794,13 @@ result - The TxHash of the sent transaction.
|
|
794
794
|
|
795
795
|
> **aztec\_simulateTx**: `object`
|
796
796
|
|
797
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
797
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:325](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L325)
|
798
798
|
|
799
799
|
Simulates a TxExecutionRequest without sending it to the network.
|
800
800
|
|
801
801
|
#### params
|
802
802
|
|
803
|
-
> **params**: \[`TxExecutionRequest`, `boolean`?, `
|
803
|
+
> **params**: \[`TxExecutionRequest`, `boolean`?, `boolean`?, `boolean`?, `SimulationOverrides`?, `AztecAddress`[]?\]
|
804
804
|
|
805
805
|
#### result
|
806
806
|
|
@@ -820,15 +820,19 @@ simulatePublic - Optional: Whether to simulate public parts. Defaults to `false`
|
|
820
820
|
|
821
821
|
#### Param
|
822
822
|
|
823
|
-
|
823
|
+
skipTxValidation - Optional: Flag to skip validation. Defaults to `false`.
|
824
824
|
|
825
825
|
#### Param
|
826
826
|
|
827
|
-
|
827
|
+
skipFeeEnforcement - Optional: Flag to skip fee enforcement. Defaults to `false`.
|
828
828
|
|
829
829
|
#### Param
|
830
830
|
|
831
|
-
|
831
|
+
overrides - Optional: SimulationOverrides for simulation context (includes msgSender).
|
832
|
+
|
833
|
+
#### Param
|
834
|
+
|
835
|
+
scopes - Optional: Array of AztecAddress scopes for the simulation.
|
832
836
|
|
833
837
|
#### Returns
|
834
838
|
|
@@ -840,7 +844,7 @@ result - The TxSimulationResult.
|
|
840
844
|
|
841
845
|
> **aztec\_simulateUtility**: `object`
|
842
846
|
|
843
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:364](https://github.com/WalletMesh/walletmesh-packages/blob/
|
847
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:364](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L364)
|
844
848
|
|
845
849
|
Simulates a utility (view) function call.
|
846
850
|
|
@@ -886,7 +890,7 @@ result - The UtilitySimulationResult.
|
|
886
890
|
|
887
891
|
> **aztec\_wmDeployContract**: `object`
|
888
892
|
|
889
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:434](https://github.com/WalletMesh/walletmesh-packages/blob/
|
893
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:434](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L434)
|
890
894
|
|
891
895
|
WalletMesh specific: Deploys a new contract using its artifact and constructor arguments.
|
892
896
|
The wallet handles address computation, proving, and sending the deployment transaction.
|
@@ -926,7 +930,7 @@ result - An object with `txHash` (TxHash) and `contractAddress` (AztecAddress).
|
|
926
930
|
|
927
931
|
> **aztec\_wmExecuteTx**: `object`
|
928
932
|
|
929
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:421](https://github.com/WalletMesh/walletmesh-packages/blob/
|
933
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:421](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L421)
|
930
934
|
|
931
935
|
WalletMesh specific: Executes a contract function interaction using a pre-constructed ExecutionPayload.
|
932
936
|
The wallet handles simulation, proving, and sending.
|
@@ -957,7 +961,7 @@ result - The TxHash of the sent transaction.
|
|
957
961
|
|
958
962
|
> **aztec\_wmSimulateTx**: `object`
|
959
963
|
|
960
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:454](https://github.com/WalletMesh/walletmesh-packages/blob/
|
964
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:454](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L454)
|
961
965
|
|
962
966
|
WalletMesh specific: Simulates a contract function interaction using a pre-constructed ExecutionPayload.
|
963
967
|
|
@@ -987,7 +991,7 @@ result - The TxSimulationResult.
|
|
987
991
|
|
988
992
|
> **wm\_getSupportedMethods**: `object`
|
989
993
|
|
990
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
994
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:124](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L124)
|
991
995
|
|
992
996
|
Retrieves a list of all JSON-RPC methods supported by this wallet implementation.
|
993
997
|
Allows clients to discover the capabilities of the wallet.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
[**@walletmesh/aztec-rpc-wallet v0.
|
1
|
+
[**@walletmesh/aztec-rpc-wallet v0.5.0**](../README.md)
|
2
2
|
|
3
3
|
***
|
4
4
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
> **AztecChainId** = `` `aztec:${string}` ``
|
10
10
|
|
11
|
-
Defined in: [aztec/rpc-wallet/src/types.ts:
|
11
|
+
Defined in: [aztec/rpc-wallet/src/types.ts:62](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/types.ts#L62)
|
12
12
|
|
13
13
|
Type-safe Aztec chain ID format following the CAIP-2 standard.
|
14
14
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
[**@walletmesh/aztec-rpc-wallet v0.
|
1
|
+
[**@walletmesh/aztec-rpc-wallet v0.5.0**](../README.md)
|
2
2
|
|
3
3
|
***
|
4
4
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
> `const` **ALL\_AZTEC\_METHODS**: readonly \[`"aztec_getAddress"`, `"aztec_getCompleteAddress"`, `"aztec_getChainId"`, `"aztec_getVersion"`, `"aztec_sendTx"`, `"aztec_getTxReceipt"`, `"aztec_simulateTx"`, `"aztec_getNodeInfo"`, `"aztec_getBlockNumber"`, `"aztec_getCurrentBaseFees"`, `"aztec_registerSender"`, `"aztec_getSenders"`, `"aztec_removeSender"`, `"aztec_registerContract"`, `"aztec_registerContractClass"`, `"aztec_getContractMetadata"`, `"aztec_getContractClassMetadata"`, `"aztec_proveTx"`, `"aztec_profileTx"`, `"aztec_simulateUtility"`, `"aztec_getPrivateEvents"`, `"aztec_getPublicEvents"`, `"aztec_getPXEInfo"`, `"aztec_getBlock"`, `"aztec_createAuthWit"`, `"aztec_wmDeployContract"`, `"aztec_wmExecuteTx"`, `"aztec_wmSimulateTx"`\]
|
10
10
|
|
11
|
-
Defined in: [aztec/rpc-wallet/src/client/helpers.ts:17](https://github.com/WalletMesh/walletmesh-packages/blob/
|
11
|
+
Defined in: [aztec/rpc-wallet/src/client/helpers.ts:17](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/client/helpers.ts#L17)
|
12
12
|
|
13
13
|
A comprehensive list of all JSON-RPC methods supported by the Aztec RPC wallet.
|
14
14
|
This array includes standard Aztec wallet methods as well as WalletMesh-specific extensions (prefixed with `wm_`).
|
@@ -1,4 +1,4 @@
|
|
1
|
-
[**@walletmesh/aztec-rpc-wallet v0.
|
1
|
+
[**@walletmesh/aztec-rpc-wallet v0.5.0**](../README.md)
|
2
2
|
|
3
3
|
***
|
4
4
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
> `const` `readonly` **AztecWalletErrorMap**: `Record`\<`AztecWalletErrorType`, \{ `code`: `number`; `message`: `string`; \}\>
|
10
10
|
|
11
|
-
Defined in: [aztec/rpc-wallet/src/errors.ts:59](https://github.com/WalletMesh/walletmesh-packages/blob/
|
11
|
+
Defined in: [aztec/rpc-wallet/src/errors.ts:59](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/errors.ts#L59)
|
12
12
|
|
13
13
|
A map associating each AztecWalletErrorType with a specific JSON-RPC error code
|
14
14
|
and a human-readable message. This map is used by the [AztecWalletError](../classes/AztecWalletError.md) class
|
@@ -1,4 +1,4 @@
|
|
1
|
-
[**@walletmesh/aztec-rpc-wallet v0.
|
1
|
+
[**@walletmesh/aztec-rpc-wallet v0.5.0**](../README.md)
|
2
2
|
|
3
3
|
***
|
4
4
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
> `const` **AztecWalletSerializer**: [`JSONRPCSerializer`](https://github.com/WalletMesh/walletmesh-packages/tree/main/core/jsonrpc/docs/interfaces/JSONRPCSerializer.md)\<`JSONRPCParams`, `unknown`\>
|
10
10
|
|
11
|
-
Defined in: [aztec/rpc-wallet/src/wallet/serializers.ts:
|
11
|
+
Defined in: [aztec/rpc-wallet/src/wallet/serializers.ts:263](https://github.com/WalletMesh/walletmesh-packages/blob/fd734440d9c5e6ff3c77f868722c74b1be65d39d/aztec/rpc-wallet/src/wallet/serializers.ts#L263)
|
12
12
|
|
13
13
|
A comprehensive [JSONRPCSerializer](https://github.com/WalletMesh/walletmesh-packages/tree/main/core/jsonrpc/docs/interfaces/JSONRPCSerializer.md) for all Aztec wallet methods.
|
14
14
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@walletmesh/aztec-rpc-wallet",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.5.0",
|
4
4
|
"description": "",
|
5
5
|
"type": "module",
|
6
6
|
"main": "dist/index.js",
|
@@ -17,16 +17,18 @@
|
|
17
17
|
"author": "",
|
18
18
|
"license": "Apache-2.0",
|
19
19
|
"devDependencies": {
|
20
|
-
"typedoc": "^0.28.
|
21
|
-
"typedoc-plugin-markdown": "^4.
|
20
|
+
"typedoc": "^0.28.12",
|
21
|
+
"typedoc-plugin-markdown": "^4.8.1"
|
22
22
|
},
|
23
23
|
"dependencies": {
|
24
|
-
"@aztec/aztec.js": "
|
25
|
-
"@aztec/blob-lib": "
|
26
|
-
"@aztec/entrypoints": "
|
27
|
-
"@aztec/
|
28
|
-
"@
|
29
|
-
"
|
24
|
+
"@aztec/aztec.js": "1.2.1",
|
25
|
+
"@aztec/blob-lib": "1.2.1",
|
26
|
+
"@aztec/entrypoints": "1.2.1",
|
27
|
+
"@aztec/foundation": "1.2.1",
|
28
|
+
"@aztec/stdlib": "1.2.1",
|
29
|
+
"zod": "^3.25.76",
|
30
|
+
"@walletmesh/jsonrpc": "^0.5.2",
|
31
|
+
"@walletmesh/router": "^0.5.2"
|
30
32
|
},
|
31
33
|
"scripts": {
|
32
34
|
"build": "tsc --build tsconfig.build.json",
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { describe, it, expect, vi, beforeEach, beforeAll, type Mock } from 'vitest';
|
2
|
-
import { AztecDappWallet, createAztecWallet } from './aztec-dapp-wallet.js';
|
3
|
-
import { AztecAddress, TxHash, CompleteAddress, Fr } from '@aztec/aztec.js';
|
4
1
|
import type { ContractArtifact, ContractInstanceWithAddress, Tx, TxExecutionRequest } from '@aztec/aztec.js';
|
5
|
-
import
|
2
|
+
import { AztecAddress, CompleteAddress, Fr, TxHash } from '@aztec/aztec.js';
|
6
3
|
import type { FeeOptions, TxExecutionOptions } from '@aztec/entrypoints/interfaces';
|
4
|
+
import type { ExecutionPayload } from '@aztec/entrypoints/payload';
|
7
5
|
import type { WalletRouterProvider } from '@walletmesh/router';
|
6
|
+
import { beforeAll, beforeEach, describe, expect, it, type Mock, vi } from 'vitest';
|
7
|
+
import { AztecDappWallet, createAztecWallet } from './aztec-dapp-wallet.js';
|
8
8
|
|
9
9
|
// Mock provider
|
10
10
|
const createMockProvider = () => {
|
@@ -543,14 +543,16 @@ describe('AztecDappWallet', () => {
|
|
543
543
|
const msgSender = await AztecAddress.random();
|
544
544
|
provider.call.mockResolvedValue(simulatedTx);
|
545
545
|
|
546
|
-
const result = await wallet.simulateTx(txRequest, true, msgSender);
|
546
|
+
const result = await wallet.simulateTx(txRequest, true, false, false, { msgSender });
|
547
547
|
|
548
548
|
expect(provider.call).toHaveBeenCalledWith(testChainId, {
|
549
549
|
method: 'aztec_simulateTx',
|
550
550
|
params: {
|
551
551
|
txRequest,
|
552
552
|
simulatePublic: true,
|
553
|
-
|
553
|
+
skipTxValidation: false,
|
554
|
+
skipFeeEnforcement: false,
|
555
|
+
overrides: { msgSender },
|
554
556
|
},
|
555
557
|
});
|
556
558
|
expect(result).toEqual(simulatedTx);
|
@@ -15,25 +15,26 @@ import type {
|
|
15
15
|
} from '@aztec/aztec.js';
|
16
16
|
import { Contract, DeploySentTx, SentTx } from '@aztec/aztec.js';
|
17
17
|
import type { IntentAction, IntentInnerHash } from '@aztec/aztec.js/utils';
|
18
|
+
import { DefaultAccountEntrypoint } from '@aztec/entrypoints/account';
|
19
|
+
import type { AuthWitnessProvider, FeeOptions, TxExecutionOptions } from '@aztec/entrypoints/interfaces';
|
20
|
+
import type { ExecutionPayload } from '@aztec/entrypoints/payload';
|
21
|
+
import { createLogger } from '@aztec/foundation/log';
|
22
|
+
import type { NodeInfo } from '@aztec/stdlib/contract';
|
23
|
+
import type { GasFees } from '@aztec/stdlib/gas';
|
18
24
|
import type {
|
25
|
+
ContractClassMetadata,
|
26
|
+
ContractMetadata,
|
19
27
|
EventMetadataDefinition,
|
20
28
|
PXEInfo,
|
21
|
-
ContractMetadata,
|
22
|
-
ContractClassMetadata,
|
23
29
|
} from '@aztec/stdlib/interfaces/client';
|
24
|
-
import type { NodeInfo } from '@aztec/stdlib/contract';
|
25
|
-
import type { GasFees } from '@aztec/stdlib/gas';
|
26
30
|
import type {
|
27
31
|
PrivateExecutionResult,
|
32
|
+
SimulationOverrides,
|
28
33
|
TxProfileResult,
|
29
34
|
TxProvingResult,
|
30
35
|
TxSimulationResult,
|
31
36
|
UtilitySimulationResult,
|
32
37
|
} from '@aztec/stdlib/tx';
|
33
|
-
import type { ExecutionPayload } from '@aztec/entrypoints/payload';
|
34
|
-
import type { FeeOptions, TxExecutionOptions, AuthWitnessProvider } from '@aztec/entrypoints/interfaces';
|
35
|
-
import { DefaultAccountEntrypoint } from '@aztec/entrypoints/account';
|
36
|
-
import { createLogger } from '@aztec/foundation/log';
|
37
38
|
|
38
39
|
import type { AztecChainId } from '../types.js';
|
39
40
|
import type { AztecRouterProvider } from './aztec-router-provider.js';
|
@@ -515,9 +516,9 @@ export class AztecDappWallet implements Wallet {
|
|
515
516
|
* Implements {@link Wallet.simulateTx}.
|
516
517
|
* @param txRequest - The {@link TxExecutionRequest} to simulate.
|
517
518
|
* @param simulatePublic - Whether to simulate public parts of the transaction.
|
518
|
-
* @param msgSender - Optional {@link AztecAddress} of the message sender for simulation context.
|
519
519
|
* @param skipTxValidation - Optional flag to skip transaction validation during simulation.
|
520
520
|
* @param skipFeeEnforcement - Optional flag to skip fee enforcement during simulation.
|
521
|
+
* @param overrides - Optional {@link SimulationOverrides} for simulation context (includes msgSender).
|
521
522
|
* @param scopes - Optional array of {@link AztecAddress} scopes for the simulation.
|
522
523
|
* @returns A promise that resolves to the {@link TxSimulationResult}.
|
523
524
|
* @see {@link AztecWalletMethodMap.aztec_simulateTx}
|
@@ -525,25 +526,25 @@ export class AztecDappWallet implements Wallet {
|
|
525
526
|
async simulateTx(
|
526
527
|
txRequest: TxExecutionRequest,
|
527
528
|
simulatePublic: boolean,
|
528
|
-
msgSender?: AztecAddress,
|
529
529
|
skipTxValidation?: boolean,
|
530
530
|
skipFeeEnforcement?: boolean,
|
531
|
+
overrides?: SimulationOverrides,
|
531
532
|
scopes?: AztecAddress[],
|
532
533
|
): Promise<TxSimulationResult> {
|
533
534
|
const params: {
|
534
535
|
txRequest: TxExecutionRequest;
|
535
536
|
simulatePublic?: boolean;
|
536
|
-
msgSender?: AztecAddress;
|
537
537
|
skipTxValidation?: boolean;
|
538
538
|
skipFeeEnforcement?: boolean;
|
539
|
+
overrides?: SimulationOverrides;
|
539
540
|
scopes?: AztecAddress[];
|
540
541
|
} = {
|
541
542
|
txRequest,
|
542
543
|
};
|
543
544
|
if (simulatePublic !== undefined) params.simulatePublic = simulatePublic;
|
544
|
-
if (msgSender !== undefined) params.msgSender = msgSender;
|
545
545
|
if (skipTxValidation !== undefined) params.skipTxValidation = skipTxValidation;
|
546
546
|
if (skipFeeEnforcement !== undefined) params.skipFeeEnforcement = skipFeeEnforcement;
|
547
|
+
if (overrides !== undefined) params.overrides = overrides;
|
547
548
|
if (scopes !== undefined) params.scopes = scopes;
|
548
549
|
|
549
550
|
const result = await this.routerProvider.call(this.chainId, {
|
@@ -764,7 +765,7 @@ export class AztecDappWallet implements Wallet {
|
|
764
765
|
},
|
765
766
|
});
|
766
767
|
|
767
|
-
const txHashPromise = Promise.resolve(result as TxHash);
|
768
|
+
const txHashPromise = () => Promise.resolve(result as TxHash);
|
768
769
|
return new SentTx(this, txHashPromise);
|
769
770
|
}
|
770
771
|
|
@@ -828,7 +829,7 @@ export class AztecDappWallet implements Wallet {
|
|
828
829
|
})) as { txHash: TxHash; contractAddress: AztecAddress };
|
829
830
|
|
830
831
|
// Create a promise that resolves with the transaction hash
|
831
|
-
const txHashPromise = Promise.resolve(result.txHash);
|
832
|
+
const txHashPromise = () => Promise.resolve(result.txHash);
|
832
833
|
|
833
834
|
// Create the post-deploy constructor function
|
834
835
|
const postDeployCtor = async (address: AztecAddress, wallet: Wallet) => {
|