@aztec/aztec.js 0.0.1-commit.d3ec352c → 0.0.1-commit.d431d1c

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 (155) hide show
  1. package/dest/account/account.d.ts +25 -40
  2. package/dest/account/account.d.ts.map +1 -1
  3. package/dest/account/account.js +19 -47
  4. package/dest/account/account_contract.d.ts +9 -10
  5. package/dest/account/account_contract.d.ts.map +1 -1
  6. package/dest/account/account_with_secret_key.d.ts +21 -9
  7. package/dest/account/account_with_secret_key.d.ts.map +1 -1
  8. package/dest/account/account_with_secret_key.js +21 -4
  9. package/dest/account/index.d.ts +4 -3
  10. package/dest/account/index.d.ts.map +1 -1
  11. package/dest/account/index.js +2 -0
  12. package/dest/account/signerless_account.d.ts +6 -7
  13. package/dest/account/signerless_account.d.ts.map +1 -1
  14. package/dest/account/signerless_account.js +8 -11
  15. package/dest/api/account.d.ts +2 -4
  16. package/dest/api/account.d.ts.map +1 -1
  17. package/dest/api/account.js +1 -3
  18. package/dest/api/authorization.d.ts +2 -2
  19. package/dest/api/authorization.d.ts.map +1 -1
  20. package/dest/api/authorization.js +1 -1
  21. package/dest/api/block.d.ts +2 -2
  22. package/dest/api/block.d.ts.map +1 -1
  23. package/dest/api/block.js +1 -1
  24. package/dest/api/fields.d.ts +3 -2
  25. package/dest/api/fields.d.ts.map +1 -1
  26. package/dest/api/fields.js +2 -1
  27. package/dest/api/protocol.d.ts +7 -1
  28. package/dest/api/protocol.d.ts.map +1 -1
  29. package/dest/api/protocol.js +6 -0
  30. package/dest/api/wallet.d.ts +2 -2
  31. package/dest/api/wallet.d.ts.map +1 -1
  32. package/dest/api/wallet.js +1 -1
  33. package/dest/authorization/call_authorization_request.d.ts +23 -2
  34. package/dest/authorization/call_authorization_request.d.ts.map +1 -1
  35. package/dest/contract/batch_call.d.ts +1 -1
  36. package/dest/contract/batch_call.d.ts.map +1 -1
  37. package/dest/contract/batch_call.js +3 -1
  38. package/dest/contract/contract_base.d.ts +4 -1
  39. package/dest/contract/contract_base.d.ts.map +1 -1
  40. package/dest/contract/contract_function_interaction.d.ts +1 -1
  41. package/dest/contract/deploy_method.d.ts +2 -2
  42. package/dest/contract/deploy_method.d.ts.map +1 -1
  43. package/dest/contract/deploy_method.js +6 -5
  44. package/dest/contract/protocol_contracts/auth-registry.d.ts +36 -0
  45. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
  46. package/dest/contract/protocol_contracts/auth-registry.js +976 -0
  47. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +35 -0
  48. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
  49. package/dest/contract/protocol_contracts/contract-class-registry.js +797 -0
  50. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +31 -0
  51. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
  52. package/dest/contract/protocol_contracts/contract-instance-registry.js +871 -0
  53. package/dest/contract/protocol_contracts/fee-juice.d.ts +30 -0
  54. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
  55. package/dest/contract/protocol_contracts/fee-juice.js +840 -0
  56. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +34 -0
  57. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -0
  58. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +576 -0
  59. package/dest/contract/protocol_contracts/public-checks.d.ts +26 -0
  60. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -0
  61. package/dest/contract/protocol_contracts/public-checks.js +592 -0
  62. package/dest/contract/sent_tx.d.ts +2 -3
  63. package/dest/contract/sent_tx.d.ts.map +1 -1
  64. package/dest/contract/wait_for_proven.d.ts +2 -2
  65. package/dest/contract/wait_for_proven.d.ts.map +1 -1
  66. package/dest/deployment/broadcast_function.js +4 -4
  67. package/dest/deployment/publish_class.js +3 -3
  68. package/dest/deployment/publish_instance.d.ts +2 -2
  69. package/dest/deployment/publish_instance.d.ts.map +1 -1
  70. package/dest/deployment/publish_instance.js +3 -3
  71. package/dest/ethereum/portal_manager.d.ts +9 -6
  72. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  73. package/dest/ethereum/portal_manager.js +17 -18
  74. package/dest/fee/fee_juice_payment_method_with_claim.js +1 -1
  75. package/dest/fee/private_fee_payment_method.js +1 -1
  76. package/dest/fee/public_fee_payment_method.js +1 -1
  77. package/dest/scripts/generate_protocol_contract_types.d.ts +2 -0
  78. package/dest/scripts/generate_protocol_contract_types.d.ts.map +1 -0
  79. package/dest/scripts/generate_protocol_contract_types.js +120 -0
  80. package/dest/utils/abi_types.d.ts +2 -2
  81. package/dest/utils/abi_types.d.ts.map +1 -1
  82. package/dest/utils/authwit.d.ts +4 -2
  83. package/dest/utils/authwit.d.ts.map +1 -1
  84. package/dest/utils/authwit.js +4 -4
  85. package/dest/utils/cross_chain.d.ts +2 -2
  86. package/dest/utils/cross_chain.d.ts.map +1 -1
  87. package/dest/utils/fee_juice.js +1 -1
  88. package/dest/utils/field_compressed_string.js +1 -1
  89. package/dest/utils/pub_key.d.ts +2 -2
  90. package/dest/utils/pub_key.d.ts.map +1 -1
  91. package/dest/utils/pub_key.js +1 -1
  92. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +5 -8
  93. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
  94. package/dest/wallet/account_entrypoint_meta_payment_method.js +28 -43
  95. package/dest/wallet/account_manager.d.ts +6 -9
  96. package/dest/wallet/account_manager.d.ts.map +1 -1
  97. package/dest/wallet/account_manager.js +6 -12
  98. package/dest/wallet/deploy_account_method.d.ts +18 -4
  99. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  100. package/dest/wallet/deploy_account_method.js +8 -6
  101. package/dest/wallet/wallet.d.ts +242 -955
  102. package/dest/wallet/wallet.d.ts.map +1 -1
  103. package/dest/wallet/wallet.js +61 -88
  104. package/package.json +14 -12
  105. package/src/account/account.ts +34 -58
  106. package/src/account/account_contract.ts +7 -8
  107. package/src/account/account_with_secret_key.ts +34 -9
  108. package/src/account/index.ts +3 -2
  109. package/src/account/signerless_account.ts +14 -13
  110. package/src/api/account.ts +9 -3
  111. package/src/api/authorization.ts +1 -0
  112. package/src/api/block.ts +1 -1
  113. package/src/api/fields.ts +2 -1
  114. package/src/api/protocol.ts +7 -0
  115. package/src/api/wallet.ts +4 -2
  116. package/src/authorization/call_authorization_request.ts +1 -1
  117. package/src/contract/batch_call.ts +4 -2
  118. package/src/contract/deploy_method.ts +8 -7
  119. package/src/contract/protocol_contracts/auth-registry.ts +554 -0
  120. package/src/contract/protocol_contracts/contract-class-registry.ts +442 -0
  121. package/src/contract/protocol_contracts/contract-instance-registry.ts +502 -0
  122. package/src/contract/protocol_contracts/fee-juice.ts +466 -0
  123. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +338 -0
  124. package/src/contract/protocol_contracts/public-checks.ts +324 -0
  125. package/src/contract/sent_tx.ts +1 -2
  126. package/src/deployment/broadcast_function.ts +4 -4
  127. package/src/deployment/publish_class.ts +3 -3
  128. package/src/deployment/publish_instance.ts +3 -6
  129. package/src/ethereum/portal_manager.ts +20 -24
  130. package/src/fee/fee_juice_payment_method_with_claim.ts +1 -1
  131. package/src/fee/private_fee_payment_method.ts +1 -1
  132. package/src/fee/public_fee_payment_method.ts +1 -1
  133. package/src/scripts/generate_protocol_contract_types.ts +150 -0
  134. package/src/utils/abi_types.ts +1 -1
  135. package/src/utils/authwit.ts +4 -4
  136. package/src/utils/cross_chain.ts +1 -1
  137. package/src/utils/fee_juice.ts +1 -1
  138. package/src/utils/field_compressed_string.ts +1 -1
  139. package/src/utils/pub_key.ts +2 -2
  140. package/src/wallet/account_entrypoint_meta_payment_method.ts +28 -60
  141. package/src/wallet/account_manager.ts +6 -14
  142. package/src/wallet/deploy_account_method.ts +20 -11
  143. package/src/wallet/wallet.ts +162 -83
  144. package/dest/account/interface.d.ts +0 -19
  145. package/dest/account/interface.d.ts.map +0 -1
  146. package/dest/account/interface.js +0 -5
  147. package/dest/contract/protocol_contracts.d.ts +0 -9
  148. package/dest/contract/protocol_contracts.d.ts.map +0 -1
  149. package/dest/contract/protocol_contracts.js +0 -26
  150. package/dest/contract/unsafe_contract.d.ts +0 -15
  151. package/dest/contract/unsafe_contract.d.ts.map +0 -1
  152. package/dest/contract/unsafe_contract.js +0 -6
  153. package/src/account/interface.ts +0 -25
  154. package/src/contract/protocol_contracts.ts +0 -35
  155. package/src/contract/unsafe_contract.ts +0 -19
@@ -0,0 +1,338 @@
1
+ /* Autogenerated file, do not edit! */
2
+ /* eslint-disable */
3
+ import { ProtocolContractAddress } from '@aztec/protocol-contracts';
4
+ import { FunctionType } from '@aztec/stdlib/abi';
5
+
6
+ import type { ContractArtifact } from '../../api/abi.js';
7
+ import { PublicKeys } from '../../api/keys.js';
8
+ import type {
9
+ AztecAddressLike,
10
+ EthAddressLike,
11
+ FieldLike,
12
+ FunctionSelectorLike,
13
+ WrappedFieldLike,
14
+ } from '../../utils/abi_types.js';
15
+ import type { Wallet } from '../../wallet/wallet.js';
16
+ import { ContractBase, type ContractMethod } from '../contract_base.js';
17
+ import { ContractFunctionInteraction } from '../contract_function_interaction.js';
18
+
19
+ const MultiCallEntrypointContractArtifact: ContractArtifact = {
20
+ name: 'MultiCallEntrypoint',
21
+ functions: [
22
+ {
23
+ ...{
24
+ functionType: FunctionType.PRIVATE,
25
+ name: 'entrypoint',
26
+ isOnlySelf: false,
27
+ isStatic: false,
28
+ isInitializer: false,
29
+ parameters: [
30
+ {
31
+ name: 'app_payload',
32
+ type: {
33
+ kind: 'struct',
34
+ fields: [
35
+ {
36
+ name: 'function_calls',
37
+ type: {
38
+ kind: 'array',
39
+ length: 5,
40
+ type: {
41
+ kind: 'struct',
42
+ fields: [
43
+ { name: 'args_hash', type: { kind: 'field' } },
44
+ {
45
+ name: 'function_selector',
46
+ type: {
47
+ kind: 'struct',
48
+ fields: [{ name: 'inner', type: { kind: 'integer', sign: 'unsigned', width: 32 } }],
49
+ path: 'aztec::protocol_types::abis::function_selector::FunctionSelector',
50
+ },
51
+ },
52
+ {
53
+ name: 'target_address',
54
+ type: {
55
+ kind: 'struct',
56
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
57
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
58
+ },
59
+ },
60
+ { name: 'is_public', type: { kind: 'boolean' } },
61
+ { name: 'hide_msg_sender', type: { kind: 'boolean' } },
62
+ { name: 'is_static', type: { kind: 'boolean' } },
63
+ ],
64
+ path: 'aztec::authwit::entrypoint::function_call::FunctionCall',
65
+ },
66
+ },
67
+ },
68
+ { name: 'tx_nonce', type: { kind: 'field' } },
69
+ ],
70
+ path: 'aztec::authwit::entrypoint::app::AppPayload',
71
+ },
72
+ visibility: 'private',
73
+ },
74
+ ],
75
+ returnTypes: [],
76
+ errorTypes: {
77
+ '10365856833277169390': {
78
+ error_kind: 'string',
79
+ string: 'Incompatible flag. `hide_msg_sender = true` is only available for public calls.',
80
+ },
81
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
82
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
83
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
84
+ },
85
+ },
86
+ bytecode: Buffer.from([]),
87
+ debugSymbols: '',
88
+ },
89
+ {
90
+ ...{
91
+ functionType: FunctionType.UTILITY,
92
+ name: 'process_message',
93
+ isOnlySelf: false,
94
+ isStatic: false,
95
+ isInitializer: false,
96
+ parameters: [
97
+ {
98
+ name: 'message_ciphertext',
99
+ type: {
100
+ kind: 'struct',
101
+ fields: [
102
+ { name: 'storage', type: { kind: 'array', length: 17, type: { kind: 'field' } } },
103
+ { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
104
+ ],
105
+ path: 'std::collections::bounded_vec::BoundedVec',
106
+ },
107
+ visibility: 'private',
108
+ },
109
+ {
110
+ name: 'message_context',
111
+ type: {
112
+ kind: 'struct',
113
+ fields: [
114
+ { name: 'tx_hash', type: { kind: 'field' } },
115
+ {
116
+ name: 'unique_note_hashes_in_tx',
117
+ type: {
118
+ kind: 'struct',
119
+ fields: [
120
+ { name: 'storage', type: { kind: 'array', length: 64, type: { kind: 'field' } } },
121
+ { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
122
+ ],
123
+ path: 'std::collections::bounded_vec::BoundedVec',
124
+ },
125
+ },
126
+ { name: 'first_nullifier_in_tx', type: { kind: 'field' } },
127
+ {
128
+ name: 'recipient',
129
+ type: {
130
+ kind: 'struct',
131
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
132
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
133
+ },
134
+ },
135
+ ],
136
+ path: 'aztec::messages::processing::message_context::MessageContext',
137
+ },
138
+ visibility: 'private',
139
+ },
140
+ ],
141
+ returnTypes: [],
142
+ errorTypes: {
143
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
144
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
145
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
146
+ '2967937905572420042': {
147
+ error_kind: 'fmtstring',
148
+ length: 61,
149
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
150
+ },
151
+ '3330370348214585450': {
152
+ error_kind: 'fmtstring',
153
+ length: 48,
154
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
155
+ },
156
+ '3670003311596808700': {
157
+ error_kind: 'fmtstring',
158
+ length: 77,
159
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
160
+ },
161
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
162
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
163
+ '9791669845391776238': {
164
+ error_kind: 'string',
165
+ string: '0 has a square root; you cannot claim it is not square',
166
+ },
167
+ '9885968605480832328': {
168
+ error_kind: 'string',
169
+ string: 'Attempted to read past the length of a CapsuleArray',
170
+ },
171
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
172
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
173
+ '11021520179822076911': {
174
+ error_kind: 'string',
175
+ string: 'Attempted to delete past the length of a CapsuleArray',
176
+ },
177
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
178
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
179
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
180
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
181
+ '13557316507370296400': {
182
+ error_kind: 'fmtstring',
183
+ length: 130,
184
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
185
+ },
186
+ '14938672389828944159': {
187
+ error_kind: 'fmtstring',
188
+ length: 146,
189
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
190
+ },
191
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
192
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
193
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
194
+ '17531474008201752295': {
195
+ error_kind: 'fmtstring',
196
+ length: 133,
197
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
198
+ },
199
+ },
200
+ },
201
+ bytecode: Buffer.from([]),
202
+ debugSymbols: '',
203
+ },
204
+ {
205
+ ...{
206
+ functionType: FunctionType.UTILITY,
207
+ name: 'sync_private_state',
208
+ isOnlySelf: false,
209
+ isStatic: false,
210
+ isInitializer: false,
211
+ parameters: [],
212
+ returnTypes: [],
213
+ errorTypes: {
214
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
215
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
216
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
217
+ '2967937905572420042': {
218
+ error_kind: 'fmtstring',
219
+ length: 61,
220
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
221
+ },
222
+ '3330370348214585450': {
223
+ error_kind: 'fmtstring',
224
+ length: 48,
225
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
226
+ },
227
+ '3670003311596808700': {
228
+ error_kind: 'fmtstring',
229
+ length: 77,
230
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
231
+ },
232
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
233
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
234
+ '9791669845391776238': {
235
+ error_kind: 'string',
236
+ string: '0 has a square root; you cannot claim it is not square',
237
+ },
238
+ '9885968605480832328': {
239
+ error_kind: 'string',
240
+ string: 'Attempted to read past the length of a CapsuleArray',
241
+ },
242
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
243
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
244
+ '11021520179822076911': {
245
+ error_kind: 'string',
246
+ string: 'Attempted to delete past the length of a CapsuleArray',
247
+ },
248
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
249
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
250
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
251
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
252
+ '13557316507370296400': {
253
+ error_kind: 'fmtstring',
254
+ length: 130,
255
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
256
+ },
257
+ '14938672389828944159': {
258
+ error_kind: 'fmtstring',
259
+ length: 146,
260
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
261
+ },
262
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
263
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
264
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
265
+ '17531474008201752295': {
266
+ error_kind: 'fmtstring',
267
+ length: 133,
268
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
269
+ },
270
+ },
271
+ },
272
+ bytecode: Buffer.from([]),
273
+ debugSymbols: '',
274
+ },
275
+ {
276
+ ...{
277
+ functionType: FunctionType.PUBLIC,
278
+ name: 'public_dispatch',
279
+ isOnlySelf: false,
280
+ isStatic: false,
281
+ isInitializer: false,
282
+ parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
283
+ returnTypes: [],
284
+ errorTypes: { '1335198680857977525': { error_kind: 'string', string: 'No public functions' } },
285
+ },
286
+ bytecode: Buffer.from([]),
287
+ debugSymbols: '',
288
+ },
289
+ ],
290
+ nonDispatchPublicFunctions: [],
291
+ outputs: { structs: {}, globals: {} },
292
+ storageLayout: {},
293
+ fileMap: {},
294
+ };
295
+
296
+ export class MultiCallEntrypointContract extends ContractBase {
297
+ private constructor(wallet: Wallet) {
298
+ super(ProtocolContractAddress.MultiCallEntrypoint, MultiCallEntrypointContractArtifact, wallet);
299
+ }
300
+
301
+ public static at(wallet: Wallet): MultiCallEntrypointContract {
302
+ return new MultiCallEntrypointContract(wallet);
303
+ }
304
+
305
+ declare public methods: {
306
+ /** entrypoint(app_payload: struct) */
307
+ entrypoint: ((app_payload: {
308
+ function_calls: {
309
+ args_hash: FieldLike;
310
+ function_selector: FunctionSelectorLike;
311
+ target_address: AztecAddressLike;
312
+ is_public: boolean;
313
+ hide_msg_sender: boolean;
314
+ is_static: boolean;
315
+ }[];
316
+ tx_nonce: FieldLike;
317
+ }) => ContractFunctionInteraction) &
318
+ Pick<ContractMethod, 'selector'>;
319
+
320
+ /** process_message(message_ciphertext: struct, message_context: struct) */
321
+ process_message: ((
322
+ message_ciphertext: FieldLike[],
323
+ message_context: {
324
+ tx_hash: FieldLike;
325
+ unique_note_hashes_in_tx: FieldLike[];
326
+ first_nullifier_in_tx: FieldLike;
327
+ recipient: AztecAddressLike;
328
+ },
329
+ ) => ContractFunctionInteraction) &
330
+ Pick<ContractMethod, 'selector'>;
331
+
332
+ /** public_dispatch(selector: field) */
333
+ public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
334
+
335
+ /** sync_private_state() */
336
+ sync_private_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
337
+ };
338
+ }
@@ -0,0 +1,324 @@
1
+ /* Autogenerated file, do not edit! */
2
+ /* eslint-disable */
3
+ import { ProtocolContractAddress } from '@aztec/protocol-contracts';
4
+ import { FunctionType } from '@aztec/stdlib/abi';
5
+
6
+ import type { ContractArtifact } from '../../api/abi.js';
7
+ import { PublicKeys } from '../../api/keys.js';
8
+ import type {
9
+ AztecAddressLike,
10
+ EthAddressLike,
11
+ FieldLike,
12
+ FunctionSelectorLike,
13
+ WrappedFieldLike,
14
+ } from '../../utils/abi_types.js';
15
+ import type { Wallet } from '../../wallet/wallet.js';
16
+ import { ContractBase, type ContractMethod } from '../contract_base.js';
17
+ import { ContractFunctionInteraction } from '../contract_function_interaction.js';
18
+
19
+ const PublicChecksContractArtifact: ContractArtifact = {
20
+ name: 'PublicChecks',
21
+ functions: [
22
+ {
23
+ ...{
24
+ functionType: FunctionType.UTILITY,
25
+ name: 'process_message',
26
+ isOnlySelf: false,
27
+ isStatic: false,
28
+ isInitializer: false,
29
+ parameters: [
30
+ {
31
+ name: 'message_ciphertext',
32
+ type: {
33
+ kind: 'struct',
34
+ fields: [
35
+ { name: 'storage', type: { kind: 'array', length: 17, type: { kind: 'field' } } },
36
+ { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
37
+ ],
38
+ path: 'std::collections::bounded_vec::BoundedVec',
39
+ },
40
+ visibility: 'private',
41
+ },
42
+ {
43
+ name: 'message_context',
44
+ type: {
45
+ kind: 'struct',
46
+ fields: [
47
+ { name: 'tx_hash', type: { kind: 'field' } },
48
+ {
49
+ name: 'unique_note_hashes_in_tx',
50
+ type: {
51
+ kind: 'struct',
52
+ fields: [
53
+ { name: 'storage', type: { kind: 'array', length: 64, type: { kind: 'field' } } },
54
+ { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
55
+ ],
56
+ path: 'std::collections::bounded_vec::BoundedVec',
57
+ },
58
+ },
59
+ { name: 'first_nullifier_in_tx', type: { kind: 'field' } },
60
+ {
61
+ name: 'recipient',
62
+ type: {
63
+ kind: 'struct',
64
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
65
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
66
+ },
67
+ },
68
+ ],
69
+ path: 'aztec::messages::processing::message_context::MessageContext',
70
+ },
71
+ visibility: 'private',
72
+ },
73
+ ],
74
+ returnTypes: [],
75
+ errorTypes: {
76
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
77
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
78
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
79
+ '2967937905572420042': {
80
+ error_kind: 'fmtstring',
81
+ length: 61,
82
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
83
+ },
84
+ '3330370348214585450': {
85
+ error_kind: 'fmtstring',
86
+ length: 48,
87
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
88
+ },
89
+ '3670003311596808700': {
90
+ error_kind: 'fmtstring',
91
+ length: 77,
92
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
93
+ },
94
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
95
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
96
+ '9791669845391776238': {
97
+ error_kind: 'string',
98
+ string: '0 has a square root; you cannot claim it is not square',
99
+ },
100
+ '9885968605480832328': {
101
+ error_kind: 'string',
102
+ string: 'Attempted to read past the length of a CapsuleArray',
103
+ },
104
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
105
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
106
+ '11021520179822076911': {
107
+ error_kind: 'string',
108
+ string: 'Attempted to delete past the length of a CapsuleArray',
109
+ },
110
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
111
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
112
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
113
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
114
+ '13557316507370296400': {
115
+ error_kind: 'fmtstring',
116
+ length: 130,
117
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
118
+ },
119
+ '14938672389828944159': {
120
+ error_kind: 'fmtstring',
121
+ length: 146,
122
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
123
+ },
124
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
125
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
126
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
127
+ '17531474008201752295': {
128
+ error_kind: 'fmtstring',
129
+ length: 133,
130
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
131
+ },
132
+ },
133
+ },
134
+ bytecode: Buffer.from([]),
135
+ debugSymbols: '',
136
+ },
137
+ {
138
+ ...{
139
+ functionType: FunctionType.PUBLIC,
140
+ name: 'public_dispatch',
141
+ isOnlySelf: false,
142
+ isStatic: false,
143
+ isInitializer: false,
144
+ parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
145
+ returnTypes: [],
146
+ errorTypes: {
147
+ '3445904810750103705': { error_kind: 'string', string: 'Block number mismatch.' },
148
+ '6989792215391248978': {
149
+ error_kind: 'string',
150
+ string: 'Function check_timestamp can only be called statically',
151
+ },
152
+ '7259463707251703666': {
153
+ error_kind: 'string',
154
+ string: 'Function check_block_number can only be called statically',
155
+ },
156
+ '12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
157
+ '13950240626967988787': { error_kind: 'string', string: 'Timestamp mismatch.' },
158
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
159
+ '15015303112667403944': { error_kind: 'fmtstring', length: 17, item_types: [] },
160
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
161
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
162
+ },
163
+ },
164
+ bytecode: Buffer.from([]),
165
+ debugSymbols: '',
166
+ },
167
+ {
168
+ ...{
169
+ functionType: FunctionType.UTILITY,
170
+ name: 'sync_private_state',
171
+ isOnlySelf: false,
172
+ isStatic: false,
173
+ isInitializer: false,
174
+ parameters: [],
175
+ returnTypes: [],
176
+ errorTypes: {
177
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
178
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
179
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
180
+ '2967937905572420042': {
181
+ error_kind: 'fmtstring',
182
+ length: 61,
183
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
184
+ },
185
+ '3330370348214585450': {
186
+ error_kind: 'fmtstring',
187
+ length: 48,
188
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
189
+ },
190
+ '3670003311596808700': {
191
+ error_kind: 'fmtstring',
192
+ length: 77,
193
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
194
+ },
195
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
196
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
197
+ '9791669845391776238': {
198
+ error_kind: 'string',
199
+ string: '0 has a square root; you cannot claim it is not square',
200
+ },
201
+ '9885968605480832328': {
202
+ error_kind: 'string',
203
+ string: 'Attempted to read past the length of a CapsuleArray',
204
+ },
205
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
206
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
207
+ '11021520179822076911': {
208
+ error_kind: 'string',
209
+ string: 'Attempted to delete past the length of a CapsuleArray',
210
+ },
211
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
212
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
213
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
214
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
215
+ '13557316507370296400': {
216
+ error_kind: 'fmtstring',
217
+ length: 130,
218
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
219
+ },
220
+ '14938672389828944159': {
221
+ error_kind: 'fmtstring',
222
+ length: 146,
223
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
224
+ },
225
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
226
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
227
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
228
+ '17531474008201752295': {
229
+ error_kind: 'fmtstring',
230
+ length: 133,
231
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
232
+ },
233
+ },
234
+ },
235
+ bytecode: Buffer.from([]),
236
+ debugSymbols: '',
237
+ },
238
+ ],
239
+ nonDispatchPublicFunctions: [
240
+ {
241
+ functionType: FunctionType.PUBLIC,
242
+ name: 'check_block_number',
243
+ isOnlySelf: false,
244
+ isStatic: true,
245
+ isInitializer: false,
246
+ parameters: [
247
+ { name: 'operation', type: { kind: 'integer', sign: 'unsigned', width: 8 }, visibility: 'private' },
248
+ { name: 'value', type: { kind: 'integer', sign: 'unsigned', width: 32 }, visibility: 'private' },
249
+ ],
250
+ returnTypes: [],
251
+ errorTypes: {
252
+ '3445904810750103705': { error_kind: 'string', string: 'Block number mismatch.' },
253
+ '7259463707251703666': {
254
+ error_kind: 'string',
255
+ string: 'Function check_block_number can only be called statically',
256
+ },
257
+ '15015303112667403944': { error_kind: 'fmtstring', length: 17, item_types: [] },
258
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
259
+ },
260
+ },
261
+ {
262
+ functionType: FunctionType.PUBLIC,
263
+ name: 'check_timestamp',
264
+ isOnlySelf: false,
265
+ isStatic: true,
266
+ isInitializer: false,
267
+ parameters: [
268
+ { name: 'operation', type: { kind: 'integer', sign: 'unsigned', width: 8 }, visibility: 'private' },
269
+ { name: 'value', type: { kind: 'integer', sign: 'unsigned', width: 64 }, visibility: 'private' },
270
+ ],
271
+ returnTypes: [],
272
+ errorTypes: {
273
+ '6989792215391248978': {
274
+ error_kind: 'string',
275
+ string: 'Function check_timestamp can only be called statically',
276
+ },
277
+ '13950240626967988787': { error_kind: 'string', string: 'Timestamp mismatch.' },
278
+ '15015303112667403944': { error_kind: 'fmtstring', length: 17, item_types: [] },
279
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
280
+ },
281
+ },
282
+ ],
283
+ outputs: { structs: {}, globals: {} },
284
+ storageLayout: {},
285
+ fileMap: {},
286
+ };
287
+
288
+ export class PublicChecksContract extends ContractBase {
289
+ private constructor(wallet: Wallet) {
290
+ super(ProtocolContractAddress.PublicChecks, PublicChecksContractArtifact, wallet);
291
+ }
292
+
293
+ public static at(wallet: Wallet): PublicChecksContract {
294
+ return new PublicChecksContract(wallet);
295
+ }
296
+
297
+ declare public methods: {
298
+ /** check_block_number(operation: integer, value: integer) */
299
+ check_block_number: ((operation: bigint | number, value: bigint | number) => ContractFunctionInteraction) &
300
+ Pick<ContractMethod, 'selector'>;
301
+
302
+ /** check_timestamp(operation: integer, value: integer) */
303
+ check_timestamp: ((operation: bigint | number, value: bigint | number) => ContractFunctionInteraction) &
304
+ Pick<ContractMethod, 'selector'>;
305
+
306
+ /** process_message(message_ciphertext: struct, message_context: struct) */
307
+ process_message: ((
308
+ message_ciphertext: FieldLike[],
309
+ message_context: {
310
+ tx_hash: FieldLike;
311
+ unique_note_hashes_in_tx: FieldLike[];
312
+ first_nullifier_in_tx: FieldLike;
313
+ recipient: AztecAddressLike;
314
+ },
315
+ ) => ContractFunctionInteraction) &
316
+ Pick<ContractMethod, 'selector'>;
317
+
318
+ /** public_dispatch(selector: field) */
319
+ public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
320
+
321
+ /** sync_private_state() */
322
+ sync_private_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
323
+ };
324
+ }
@@ -1,6 +1,5 @@
1
1
  import { promiseWithResolvers } from '@aztec/foundation/promise';
2
2
  import { retryUntil } from '@aztec/foundation/retry';
3
- import type { FieldsOf } from '@aztec/foundation/types';
4
3
  import type { AztecNode } from '@aztec/stdlib/interfaces/client';
5
4
  import { TxHash, type TxReceipt, TxStatus } from '@aztec/stdlib/tx';
6
5
 
@@ -88,7 +87,7 @@ export class SentTx {
88
87
  * @param opts - Options for configuring the waiting for the tx to be mined.
89
88
  * @returns The transaction receipt.
90
89
  */
91
- public async wait(opts?: WaitOpts): Promise<FieldsOf<TxReceipt>> {
90
+ public async wait(opts?: WaitOpts): Promise<TxReceipt> {
92
91
  const receipt = await this.waitForReceipt(opts);
93
92
  if (receipt.status !== TxStatus.SUCCESS && !opts?.dontThrowOnRevert) {
94
93
  throw new Error(