@aztec/aztec.js 0.0.1-commit.4d79d1f2d → 0.0.1-commit.4eabbdb

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.
Files changed (29) hide show
  1. package/dest/api/wallet.d.ts +2 -2
  2. package/dest/api/wallet.d.ts.map +1 -1
  3. package/dest/contract/batch_call.d.ts +3 -3
  4. package/dest/contract/batch_call.d.ts.map +1 -1
  5. package/dest/contract/batch_call.js +4 -4
  6. package/dest/contract/contract_function_interaction.js +1 -1
  7. package/dest/contract/protocol_contracts/auth-registry.d.ts +10 -1
  8. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -1
  9. package/dest/contract/protocol_contracts/auth-registry.js +490 -59
  10. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +1 -1
  11. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -1
  12. package/dest/contract/protocol_contracts/contract-class-registry.js +12 -0
  13. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +1 -1
  14. package/dest/contract/protocol_contracts/public-checks.js +1 -1
  15. package/dest/wallet/capabilities.d.ts +5 -5
  16. package/dest/wallet/capabilities.d.ts.map +1 -1
  17. package/dest/wallet/wallet.d.ts +18 -18
  18. package/dest/wallet/wallet.d.ts.map +1 -1
  19. package/dest/wallet/wallet.js +3 -3
  20. package/package.json +9 -9
  21. package/src/api/wallet.ts +1 -1
  22. package/src/contract/batch_call.ts +6 -11
  23. package/src/contract/contract_function_interaction.ts +1 -1
  24. package/src/contract/protocol_contracts/auth-registry.ts +235 -37
  25. package/src/contract/protocol_contracts/contract-class-registry.ts +3 -0
  26. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +1 -1
  27. package/src/contract/protocol_contracts/public-checks.ts +1 -1
  28. package/src/wallet/capabilities.ts +4 -4
  29. package/src/wallet/wallet.ts +7 -7
@@ -21,38 +21,33 @@ const AuthRegistryContractArtifact: ContractArtifact = {
21
21
  functions: [
22
22
  {
23
23
  ...{
24
- functionType: FunctionType.PUBLIC,
25
- name: 'public_dispatch',
24
+ functionType: FunctionType.PRIVATE,
25
+ name: 'set_authorized_private',
26
26
  isOnlySelf: false,
27
27
  isStatic: false,
28
28
  isInitializer: false,
29
- parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
29
+ parameters: [
30
+ {
31
+ name: 'approver',
32
+ type: {
33
+ kind: 'struct',
34
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
35
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
36
+ },
37
+ visibility: 'private',
38
+ },
39
+ { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
40
+ { name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
41
+ ],
30
42
  returnTypes: [],
31
43
  errorTypes: {
32
- '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
33
- '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
34
- '5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
35
- '11691217184967371519': {
36
- error_kind: 'string',
37
- string: 'Function is_reject_all can only be called statically',
38
- },
39
- '12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
40
- '13455385521185560676': {
41
- error_kind: 'string',
42
- string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
43
- },
44
- '13929691561421487185': {
45
- error_kind: 'string',
46
- string: 'Function _set_authorized can only be called by the same contract',
47
- },
44
+ '7555607922535724711': { error_kind: 'string', string: 'Preimage mismatch' },
45
+ '9530675838293881722': { error_kind: 'string', string: 'Writer did not write all data' },
46
+ '9894212961085021188': { error_kind: 'string', string: 'Message not authorized by account' },
47
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
48
48
  '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
49
49
  '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
50
50
  '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
51
- '17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
52
- '17312933876399746100': {
53
- error_kind: 'string',
54
- string: 'Function is_consumable can only be called statically',
55
- },
56
51
  },
57
52
  },
58
53
  bytecode: Buffer.from([]),
@@ -60,14 +55,14 @@ const AuthRegistryContractArtifact: ContractArtifact = {
60
55
  },
61
56
  {
62
57
  ...{
63
- functionType: FunctionType.PRIVATE,
64
- name: 'set_authorized_private',
58
+ functionType: FunctionType.UTILITY,
59
+ name: 'utility_is_consumable',
65
60
  isOnlySelf: false,
66
61
  isStatic: false,
67
62
  isInitializer: false,
68
63
  parameters: [
69
64
  {
70
- name: 'approver',
65
+ name: 'on_behalf_of',
71
66
  type: {
72
67
  kind: 'struct',
73
68
  fields: [{ name: 'inner', type: { kind: 'field' } }],
@@ -76,14 +71,18 @@ const AuthRegistryContractArtifact: ContractArtifact = {
76
71
  visibility: 'private',
77
72
  },
78
73
  { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
79
- { name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
80
74
  ],
81
- returnTypes: [],
75
+ returnTypes: [{ kind: 'boolean' }],
82
76
  errorTypes: {
83
- '7555607922535724711': { error_kind: 'string', string: 'Preimage mismatch' },
84
- '9894212961085021188': { error_kind: 'string', string: 'Message not authorized by account' },
77
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
78
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
79
+ '13455385521185560676': {
80
+ error_kind: 'string',
81
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
82
+ },
85
83
  '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
86
84
  '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
85
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
87
86
  },
88
87
  },
89
88
  bytecode: Buffer.from([]),
@@ -92,33 +91,217 @@ const AuthRegistryContractArtifact: ContractArtifact = {
92
91
  {
93
92
  ...{
94
93
  functionType: FunctionType.UTILITY,
95
- name: 'utility_is_consumable',
94
+ name: 'process_message',
96
95
  isOnlySelf: false,
97
96
  isStatic: false,
98
97
  isInitializer: false,
99
98
  parameters: [
100
99
  {
101
- name: 'on_behalf_of',
100
+ name: 'message_ciphertext',
102
101
  type: {
103
102
  kind: 'struct',
104
- fields: [{ name: 'inner', type: { kind: 'field' } }],
105
- path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
103
+ fields: [
104
+ { name: 'storage', type: { kind: 'array', length: 15, type: { kind: 'field' } } },
105
+ { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
106
+ ],
107
+ path: 'std::collections::bounded_vec::BoundedVec',
108
+ },
109
+ visibility: 'private',
110
+ },
111
+ {
112
+ name: 'message_context',
113
+ type: {
114
+ kind: 'struct',
115
+ fields: [
116
+ { name: 'tx_hash', type: { kind: 'field' } },
117
+ {
118
+ name: 'unique_note_hashes_in_tx',
119
+ type: {
120
+ kind: 'struct',
121
+ fields: [
122
+ { name: 'storage', type: { kind: 'array', length: 64, type: { kind: 'field' } } },
123
+ { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
124
+ ],
125
+ path: 'std::collections::bounded_vec::BoundedVec',
126
+ },
127
+ },
128
+ { name: 'first_nullifier_in_tx', type: { kind: 'field' } },
129
+ {
130
+ name: 'recipient',
131
+ type: {
132
+ kind: 'struct',
133
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
134
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
135
+ },
136
+ },
137
+ ],
138
+ path: 'aztec::messages::processing::message_context::MessageContext',
106
139
  },
107
140
  visibility: 'private',
108
141
  },
109
- { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
110
142
  ],
111
- returnTypes: [{ kind: 'boolean' }],
143
+ returnTypes: [],
144
+ errorTypes: {
145
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
146
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
147
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
148
+ '2967937905572420042': {
149
+ error_kind: 'fmtstring',
150
+ length: 61,
151
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
152
+ },
153
+ '3330370348214585450': {
154
+ error_kind: 'fmtstring',
155
+ length: 48,
156
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
157
+ },
158
+ '3670003311596808700': {
159
+ error_kind: 'fmtstring',
160
+ length: 77,
161
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
162
+ },
163
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
164
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
165
+ '5417577161503694006': { error_kind: 'fmtstring', length: 56, item_types: [{ kind: 'field' }] },
166
+ '9791669845391776238': {
167
+ error_kind: 'string',
168
+ string: '0 has a square root; you cannot claim it is not square',
169
+ },
170
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
171
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
172
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
173
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
174
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
175
+ '13557316507370296400': {
176
+ error_kind: 'fmtstring',
177
+ length: 130,
178
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
179
+ },
180
+ '14938672389828944159': {
181
+ error_kind: 'fmtstring',
182
+ length: 146,
183
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
184
+ },
185
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
186
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
187
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
188
+ '17531474008201752295': {
189
+ error_kind: 'fmtstring',
190
+ length: 133,
191
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
192
+ },
193
+ },
194
+ },
195
+ bytecode: Buffer.from([]),
196
+ debugSymbols: '',
197
+ },
198
+ {
199
+ ...{
200
+ functionType: FunctionType.PUBLIC,
201
+ name: 'public_dispatch',
202
+ isOnlySelf: false,
203
+ isStatic: false,
204
+ isInitializer: false,
205
+ parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
206
+ returnTypes: [],
112
207
  errorTypes: {
113
208
  '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
114
209
  '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
210
+ '5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
211
+ '11691217184967371519': {
212
+ error_kind: 'string',
213
+ string: 'Function is_reject_all can only be called statically',
214
+ },
215
+ '12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
115
216
  '13455385521185560676': {
116
217
  error_kind: 'string',
117
218
  string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
118
219
  },
220
+ '13929691561421487185': {
221
+ error_kind: 'string',
222
+ string: 'Function _set_authorized can only be called by the same contract',
223
+ },
119
224
  '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
120
225
  '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
121
226
  '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
227
+ '17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
228
+ '17312933876399746100': {
229
+ error_kind: 'string',
230
+ string: 'Function is_consumable can only be called statically',
231
+ },
232
+ },
233
+ },
234
+ bytecode: Buffer.from([]),
235
+ debugSymbols: '',
236
+ },
237
+ {
238
+ ...{
239
+ functionType: FunctionType.UTILITY,
240
+ name: 'sync_state',
241
+ isOnlySelf: false,
242
+ isStatic: false,
243
+ isInitializer: false,
244
+ parameters: [],
245
+ returnTypes: [],
246
+ errorTypes: {
247
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
248
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
249
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
250
+ '2967937905572420042': {
251
+ error_kind: 'fmtstring',
252
+ length: 61,
253
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
254
+ },
255
+ '3330370348214585450': {
256
+ error_kind: 'fmtstring',
257
+ length: 48,
258
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
259
+ },
260
+ '3670003311596808700': {
261
+ error_kind: 'fmtstring',
262
+ length: 77,
263
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
264
+ },
265
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
266
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
267
+ '5417577161503694006': { error_kind: 'fmtstring', length: 56, item_types: [{ kind: 'field' }] },
268
+ '9791669845391776238': {
269
+ error_kind: 'string',
270
+ string: '0 has a square root; you cannot claim it is not square',
271
+ },
272
+ '9885968605480832328': {
273
+ error_kind: 'string',
274
+ string: 'Attempted to read past the length of a CapsuleArray',
275
+ },
276
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
277
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
278
+ '11021520179822076911': {
279
+ error_kind: 'string',
280
+ string: 'Attempted to delete past the length of a CapsuleArray',
281
+ },
282
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
283
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
284
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
285
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
286
+ '13557316507370296400': {
287
+ error_kind: 'fmtstring',
288
+ length: 130,
289
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
290
+ },
291
+ '14938672389828944159': {
292
+ error_kind: 'fmtstring',
293
+ length: 146,
294
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
295
+ },
296
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
297
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
298
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
299
+ '17531474008201752295': {
300
+ error_kind: 'fmtstring',
301
+ length: 133,
302
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
303
+ },
304
+ '17655676068928457687': { error_kind: 'string', string: 'Reader did not read all data' },
122
305
  },
123
306
  },
124
307
  bytecode: Buffer.from([]),
@@ -326,6 +509,18 @@ export class AuthRegistryContract extends ContractBase {
326
509
  /** is_reject_all(on_behalf_of: struct) */
327
510
  is_reject_all: ((on_behalf_of: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
328
511
 
512
+ /** process_message(message_ciphertext: struct, message_context: struct) */
513
+ process_message: ((
514
+ message_ciphertext: FieldLike[],
515
+ message_context: {
516
+ tx_hash: FieldLike;
517
+ unique_note_hashes_in_tx: FieldLike[];
518
+ first_nullifier_in_tx: FieldLike;
519
+ recipient: AztecAddressLike;
520
+ },
521
+ ) => ContractFunctionInteraction) &
522
+ Pick<ContractMethod, 'selector'>;
523
+
329
524
  /** public_dispatch(selector: field) */
330
525
  public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
331
526
 
@@ -344,6 +539,9 @@ export class AuthRegistryContract extends ContractBase {
344
539
  /** set_reject_all(reject: boolean) */
345
540
  set_reject_all: ((reject: boolean) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
346
541
 
542
+ /** sync_state() */
543
+ sync_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
544
+
347
545
  /** utility_is_consumable(on_behalf_of: struct, message_hash: field) */
348
546
  utility_is_consumable: ((on_behalf_of: AztecAddressLike, message_hash: FieldLike) => ContractFunctionInteraction) &
349
547
  Pick<ContractMethod, 'selector'>;
@@ -36,13 +36,16 @@ const ContractClassRegistryContractArtifact: ContractArtifact = {
36
36
  '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
37
37
  '922421554006670918': { error_kind: 'string', string: 'num_items is greater than MAX_ITEMS' },
38
38
  '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
39
+ '9475115977882098926': { error_kind: 'string', string: 'Extra bytes in the last field of the bytecode' },
39
40
  '10965409165809799877': {
40
41
  error_kind: 'string',
41
42
  string: 'Given in_len to absorb is larger than the input array len',
42
43
  },
44
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
43
45
  '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
44
46
  '15669273164684982983': { error_kind: 'string', string: 'num_permutations is greater than MAX_PERMUTATIONS' },
45
47
  '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
48
+ '15835548349546956319': { error_kind: 'string', string: 'Field failed to decompose into specified 32 limbs' },
46
49
  '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
47
50
  '16450579948625159707': { error_kind: 'string', string: 'Sponge must be in cache_size=1' },
48
51
  '17655676068928457687': { error_kind: 'string', string: 'Reader did not read all data' },
@@ -99,7 +99,7 @@ const MultiCallEntrypointContractArtifact: ContractArtifact = {
99
99
  type: {
100
100
  kind: 'struct',
101
101
  fields: [
102
- { name: 'storage', type: { kind: 'array', length: 17, type: { kind: 'field' } } },
102
+ { name: 'storage', type: { kind: 'array', length: 15, type: { kind: 'field' } } },
103
103
  { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
104
104
  ],
105
105
  path: 'std::collections::bounded_vec::BoundedVec',
@@ -32,7 +32,7 @@ const PublicChecksContractArtifact: ContractArtifact = {
32
32
  type: {
33
33
  kind: 'struct',
34
34
  fields: [
35
- { name: 'storage', type: { kind: 'array', length: 17, type: { kind: 'field' } } },
35
+ { name: 'storage', type: { kind: 'array', length: 15, type: { kind: 'field' } } },
36
36
  { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
37
37
  ],
38
38
  path: 'std::collections::bounded_vec::BoundedVec',
@@ -180,11 +180,11 @@ export interface ContractClassesCapability {
180
180
  export interface GrantedContractClassesCapability extends ContractClassesCapability {}
181
181
 
182
182
  /**
183
- * Transaction simulation capability - for simulating transactions and utilities.
183
+ * Transaction simulation capability - for simulating transactions and executing utilities.
184
184
  *
185
185
  * Maps to wallet methods:
186
186
  * - simulateTx (when transactions scope specified)
187
- * - simulateUtility (when utilities scope specified)
187
+ * - executeUtility (when utilities scope specified)
188
188
  * - profileTx (when transactions scope specified)
189
189
  *
190
190
  * @example
@@ -200,7 +200,7 @@ export interface GrantedContractClassesCapability extends ContractClassesCapabil
200
200
  * \}
201
201
  *
202
202
  * @example
203
- * // Simulate any transaction and utility call
203
+ * // Simulate any transaction and execute any utility call
204
204
  * \{
205
205
  * type: 'simulation',
206
206
  * transactions: \{ scope: '*' \},
@@ -221,7 +221,7 @@ export interface SimulationCapability {
221
221
  scope: '*' | ContractFunctionPattern[];
222
222
  };
223
223
 
224
- /** Utility simulation scope (unconstrained calls). Maps to: simulateUtility */
224
+ /** Utility execution scope (unconstrained calls). Maps to: executeUtility */
225
225
  utilities?: {
226
226
  /**
227
227
  * Which contracts/functions to allow:
@@ -22,7 +22,7 @@ import {
22
22
  TxProfileResult,
23
23
  TxReceipt,
24
24
  TxSimulationResult,
25
- UtilitySimulationResult,
25
+ UtilityExecutionResult,
26
26
  inTxSchema,
27
27
  } from '@aztec/stdlib/tx';
28
28
 
@@ -226,10 +226,10 @@ export type ContractClassMetadata = {
226
226
  };
227
227
 
228
228
  /**
229
- * Options for simulating a utility function call.
229
+ * Options for executing a utility function call.
230
230
  */
231
- export type SimulateUtilityOptions = {
232
- /** The scope for the utility simulation (determines which notes and keys are visible). */
231
+ export type ExecuteUtilityOptions = {
232
+ /** The scope for the utility execution (determines which notes and keys are visible). */
233
233
  scope: AztecAddress;
234
234
  /** Optional auth witnesses to use during execution. */
235
235
  authWitnesses?: AuthWitness[];
@@ -255,7 +255,7 @@ export type Wallet = {
255
255
  secretKey?: Fr,
256
256
  ): Promise<ContractInstanceWithAddress>;
257
257
  simulateTx(exec: ExecutionPayload, opts: SimulateOptions): Promise<TxSimulationResult>;
258
- simulateUtility(call: FunctionCall, opts: SimulateUtilityOptions): Promise<UtilitySimulationResult>;
258
+ executeUtility(call: FunctionCall, opts: ExecuteUtilityOptions): Promise<UtilityExecutionResult>;
259
259
  profileTx(exec: ExecutionPayload, opts: ProfileOptions): Promise<TxProfileResult>;
260
260
  sendTx<W extends InteractionWaitOptions = undefined>(
261
261
  exec: ExecutionPayload,
@@ -518,7 +518,7 @@ const WalletMethodSchemas = {
518
518
  .args(ContractInstanceWithAddressSchema, optional(ContractArtifactSchema), optional(schemas.Fr))
519
519
  .returns(ContractInstanceWithAddressSchema),
520
520
  simulateTx: z.function().args(ExecutionPayloadSchema, SimulateOptionsSchema).returns(TxSimulationResult.schema),
521
- simulateUtility: z
521
+ executeUtility: z
522
522
  .function()
523
523
  .args(
524
524
  FunctionCall.schema,
@@ -527,7 +527,7 @@ const WalletMethodSchemas = {
527
527
  authWitnesses: optional(z.array(AuthWitness.schema)),
528
528
  }),
529
529
  )
530
- .returns(UtilitySimulationResult.schema),
530
+ .returns(UtilityExecutionResult.schema),
531
531
  profileTx: z.function().args(ExecutionPayloadSchema, ProfileOptionsSchema).returns(TxProfileResult.schema),
532
532
  sendTx: z
533
533
  .function()