@aztec/aztec.js 3.0.3 → 4.0.0-devnet.1-patch.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.
Files changed (197) 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 +8 -9
  5. package/dest/account/account_contract.d.ts.map +1 -1
  6. package/dest/account/account_with_secret_key.d.ts +19 -7
  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 +3 -2
  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 +5 -6
  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/contract.d.ts +18 -12
  22. package/dest/api/contract.d.ts.map +1 -1
  23. package/dest/api/contract.js +16 -10
  24. package/dest/api/deployment.d.ts +1 -2
  25. package/dest/api/deployment.d.ts.map +1 -1
  26. package/dest/api/deployment.js +0 -1
  27. package/dest/api/events.d.ts +10 -6
  28. package/dest/api/events.d.ts.map +1 -1
  29. package/dest/api/events.js +30 -20
  30. package/dest/api/fields.d.ts +2 -1
  31. package/dest/api/fields.d.ts.map +1 -1
  32. package/dest/api/fields.js +1 -0
  33. package/dest/api/keys.d.ts +1 -1
  34. package/dest/api/keys.js +1 -1
  35. package/dest/api/node.d.ts +8 -4
  36. package/dest/api/node.d.ts.map +1 -1
  37. package/dest/api/node.js +7 -3
  38. package/dest/api/protocol.d.ts +7 -1
  39. package/dest/api/protocol.d.ts.map +1 -1
  40. package/dest/api/protocol.js +6 -0
  41. package/dest/api/tx.d.ts +2 -2
  42. package/dest/api/tx.d.ts.map +1 -1
  43. package/dest/api/tx.js +1 -1
  44. package/dest/api/wallet.d.ts +3 -2
  45. package/dest/api/wallet.d.ts.map +1 -1
  46. package/dest/api/wallet.js +2 -1
  47. package/dest/authorization/call_authorization_request.d.ts +22 -1
  48. package/dest/authorization/call_authorization_request.d.ts.map +1 -1
  49. package/dest/contract/base_contract_interaction.d.ts +8 -10
  50. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  51. package/dest/contract/base_contract_interaction.js +5 -17
  52. package/dest/contract/batch_call.d.ts +1 -1
  53. package/dest/contract/batch_call.d.ts.map +1 -1
  54. package/dest/contract/batch_call.js +3 -1
  55. package/dest/contract/contract_base.d.ts +4 -1
  56. package/dest/contract/contract_base.d.ts.map +1 -1
  57. package/dest/contract/contract_function_interaction.d.ts +3 -12
  58. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  59. package/dest/contract/contract_function_interaction.js +6 -6
  60. package/dest/contract/deploy_method.d.ts +63 -16
  61. package/dest/contract/deploy_method.d.ts.map +1 -1
  62. package/dest/contract/deploy_method.js +41 -23
  63. package/dest/contract/interaction_options.d.ts +42 -5
  64. package/dest/contract/interaction_options.d.ts.map +1 -1
  65. package/dest/contract/interaction_options.js +8 -1
  66. package/dest/contract/protocol_contracts/auth-registry.d.ts +27 -0
  67. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
  68. package/dest/contract/protocol_contracts/auth-registry.js +558 -0
  69. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +15 -0
  70. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
  71. package/dest/contract/protocol_contracts/contract-class-registry.js +127 -0
  72. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +22 -0
  73. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
  74. package/dest/contract/protocol_contracts/contract-instance-registry.js +465 -0
  75. package/dest/contract/protocol_contracts/fee-juice.d.ts +21 -0
  76. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
  77. package/dest/contract/protocol_contracts/fee-juice.js +426 -0
  78. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +34 -0
  79. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -0
  80. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +585 -0
  81. package/dest/contract/protocol_contracts/public-checks.d.ts +26 -0
  82. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -0
  83. package/dest/contract/protocol_contracts/public-checks.js +593 -0
  84. package/dest/contract/wait_for_proven.d.ts +2 -2
  85. package/dest/contract/wait_for_proven.d.ts.map +1 -1
  86. package/dest/contract/wait_for_proven.js +1 -1
  87. package/dest/contract/wait_opts.d.ts +16 -0
  88. package/dest/contract/wait_opts.d.ts.map +1 -0
  89. package/dest/contract/wait_opts.js +5 -0
  90. package/dest/deployment/publish_class.js +2 -2
  91. package/dest/deployment/publish_instance.d.ts +2 -2
  92. package/dest/deployment/publish_instance.d.ts.map +1 -1
  93. package/dest/deployment/publish_instance.js +3 -3
  94. package/dest/ethereum/portal_manager.d.ts +7 -4
  95. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  96. package/dest/ethereum/portal_manager.js +15 -16
  97. package/dest/fee/fee_juice_payment_method_with_claim.js +6 -6
  98. package/dest/fee/private_fee_payment_method.js +10 -10
  99. package/dest/fee/public_fee_payment_method.js +10 -10
  100. package/dest/fee/sponsored_fee_payment.js +3 -3
  101. package/dest/scripts/generate_protocol_contract_types.d.ts +2 -0
  102. package/dest/scripts/generate_protocol_contract_types.d.ts.map +1 -0
  103. package/dest/scripts/generate_protocol_contract_types.js +120 -0
  104. package/dest/utils/authwit.d.ts +8 -6
  105. package/dest/utils/authwit.d.ts.map +1 -1
  106. package/dest/utils/authwit.js +5 -9
  107. package/dest/utils/node.d.ts +12 -1
  108. package/dest/utils/node.d.ts.map +1 -1
  109. package/dest/utils/node.js +46 -0
  110. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +5 -8
  111. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
  112. package/dest/wallet/account_entrypoint_meta_payment_method.js +28 -43
  113. package/dest/wallet/account_manager.d.ts +5 -8
  114. package/dest/wallet/account_manager.d.ts.map +1 -1
  115. package/dest/wallet/account_manager.js +5 -11
  116. package/dest/wallet/capabilities.d.ts +444 -0
  117. package/dest/wallet/capabilities.d.ts.map +1 -0
  118. package/dest/wallet/capabilities.js +3 -0
  119. package/dest/wallet/deploy_account_method.d.ts +34 -6
  120. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  121. package/dest/wallet/deploy_account_method.js +7 -5
  122. package/dest/wallet/index.d.ts +2 -1
  123. package/dest/wallet/index.d.ts.map +1 -1
  124. package/dest/wallet/index.js +1 -0
  125. package/dest/wallet/wallet.d.ts +1642 -1007
  126. package/dest/wallet/wallet.d.ts.map +1 -1
  127. package/dest/wallet/wallet.js +201 -107
  128. package/package.json +24 -13
  129. package/src/account/account.ts +34 -58
  130. package/src/account/account_contract.ts +6 -7
  131. package/src/account/account_with_secret_key.ts +33 -8
  132. package/src/account/index.ts +2 -1
  133. package/src/account/signerless_account.ts +13 -12
  134. package/src/api/account.ts +9 -3
  135. package/src/api/authorization.ts +1 -0
  136. package/src/api/contract.ts +24 -9
  137. package/src/api/deployment.ts +0 -1
  138. package/src/api/events.ts +35 -27
  139. package/src/api/fields.ts +1 -0
  140. package/src/api/keys.ts +2 -2
  141. package/src/api/node.ts +7 -3
  142. package/src/api/protocol.ts +7 -0
  143. package/src/api/tx.ts +2 -0
  144. package/src/api/wallet.ts +47 -3
  145. package/src/contract/base_contract_interaction.ts +27 -15
  146. package/src/contract/batch_call.ts +4 -2
  147. package/src/contract/contract_function_interaction.ts +13 -6
  148. package/src/contract/deploy_method.ts +122 -29
  149. package/src/contract/interaction_options.ts +49 -4
  150. package/src/contract/protocol_contracts/auth-registry.ts +351 -0
  151. package/src/contract/protocol_contracts/contract-class-registry.ts +96 -0
  152. package/src/contract/protocol_contracts/contract-instance-registry.ts +302 -0
  153. package/src/contract/protocol_contracts/fee-juice.ts +264 -0
  154. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +332 -0
  155. package/src/contract/protocol_contracts/public-checks.ts +316 -0
  156. package/src/contract/wait_for_proven.ts +1 -1
  157. package/src/contract/wait_opts.ts +21 -0
  158. package/src/deployment/publish_class.ts +2 -2
  159. package/src/deployment/publish_instance.ts +3 -6
  160. package/src/ethereum/portal_manager.ts +17 -21
  161. package/src/fee/fee_juice_payment_method_with_claim.ts +5 -5
  162. package/src/fee/private_fee_payment_method.ts +7 -7
  163. package/src/fee/public_fee_payment_method.ts +8 -8
  164. package/src/fee/sponsored_fee_payment.ts +3 -3
  165. package/src/scripts/generate_protocol_contract_types.ts +150 -0
  166. package/src/utils/authwit.ts +19 -7
  167. package/src/utils/node.ts +62 -0
  168. package/src/wallet/account_entrypoint_meta_payment_method.ts +28 -60
  169. package/src/wallet/account_manager.ts +5 -13
  170. package/src/wallet/capabilities.ts +491 -0
  171. package/src/wallet/deploy_account_method.ts +37 -13
  172. package/src/wallet/index.ts +1 -0
  173. package/src/wallet/wallet.ts +319 -118
  174. package/dest/account/interface.d.ts +0 -19
  175. package/dest/account/interface.d.ts.map +0 -1
  176. package/dest/account/interface.js +0 -5
  177. package/dest/contract/deploy_sent_tx.d.ts +0 -48
  178. package/dest/contract/deploy_sent_tx.d.ts.map +0 -1
  179. package/dest/contract/deploy_sent_tx.js +0 -46
  180. package/dest/contract/protocol_contracts.d.ts +0 -9
  181. package/dest/contract/protocol_contracts.d.ts.map +0 -1
  182. package/dest/contract/protocol_contracts.js +0 -26
  183. package/dest/contract/sent_tx.d.ts +0 -50
  184. package/dest/contract/sent_tx.d.ts.map +0 -1
  185. package/dest/contract/sent_tx.js +0 -90
  186. package/dest/contract/unsafe_contract.d.ts +0 -15
  187. package/dest/contract/unsafe_contract.d.ts.map +0 -1
  188. package/dest/contract/unsafe_contract.js +0 -6
  189. package/dest/deployment/broadcast_function.d.ts +0 -24
  190. package/dest/deployment/broadcast_function.d.ts.map +0 -1
  191. package/dest/deployment/broadcast_function.js +0 -74
  192. package/src/account/interface.ts +0 -25
  193. package/src/contract/deploy_sent_tx.ts +0 -75
  194. package/src/contract/protocol_contracts.ts +0 -35
  195. package/src/contract/sent_tx.ts +0 -129
  196. package/src/contract/unsafe_contract.ts +0 -19
  197. package/src/deployment/broadcast_function.ts +0 -148
@@ -0,0 +1,593 @@
1
+ /* Autogenerated file, do not edit! */ /* eslint-disable */ import { ProtocolContractAddress } from '@aztec/protocol-contracts';
2
+ import { FunctionType } from '@aztec/stdlib/abi';
3
+ import { ContractBase } from '../contract_base.js';
4
+ const PublicChecksContractArtifact = {
5
+ name: 'PublicChecks',
6
+ functions: [
7
+ {
8
+ ...{
9
+ functionType: FunctionType.UTILITY,
10
+ name: 'process_message',
11
+ isOnlySelf: false,
12
+ isStatic: false,
13
+ isInitializer: false,
14
+ parameters: [
15
+ {
16
+ name: 'message_ciphertext',
17
+ type: {
18
+ kind: 'struct',
19
+ fields: [
20
+ {
21
+ name: 'storage',
22
+ type: {
23
+ kind: 'array',
24
+ length: 17,
25
+ type: {
26
+ kind: 'field'
27
+ }
28
+ }
29
+ },
30
+ {
31
+ name: 'len',
32
+ type: {
33
+ kind: 'integer',
34
+ sign: 'unsigned',
35
+ width: 32
36
+ }
37
+ }
38
+ ],
39
+ path: 'std::collections::bounded_vec::BoundedVec'
40
+ },
41
+ visibility: 'private'
42
+ },
43
+ {
44
+ name: 'message_context',
45
+ type: {
46
+ kind: 'struct',
47
+ fields: [
48
+ {
49
+ name: 'tx_hash',
50
+ type: {
51
+ kind: 'field'
52
+ }
53
+ },
54
+ {
55
+ name: 'unique_note_hashes_in_tx',
56
+ type: {
57
+ kind: 'struct',
58
+ fields: [
59
+ {
60
+ name: 'storage',
61
+ type: {
62
+ kind: 'array',
63
+ length: 64,
64
+ type: {
65
+ kind: 'field'
66
+ }
67
+ }
68
+ },
69
+ {
70
+ name: 'len',
71
+ type: {
72
+ kind: 'integer',
73
+ sign: 'unsigned',
74
+ width: 32
75
+ }
76
+ }
77
+ ],
78
+ path: 'std::collections::bounded_vec::BoundedVec'
79
+ }
80
+ },
81
+ {
82
+ name: 'first_nullifier_in_tx',
83
+ type: {
84
+ kind: 'field'
85
+ }
86
+ },
87
+ {
88
+ name: 'recipient',
89
+ type: {
90
+ kind: 'struct',
91
+ fields: [
92
+ {
93
+ name: 'inner',
94
+ type: {
95
+ kind: 'field'
96
+ }
97
+ }
98
+ ],
99
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
100
+ }
101
+ }
102
+ ],
103
+ path: 'aztec::messages::processing::message_context::MessageContext'
104
+ },
105
+ visibility: 'private'
106
+ }
107
+ ],
108
+ returnTypes: [],
109
+ errorTypes: {
110
+ '361444214588792908': {
111
+ error_kind: 'string',
112
+ string: 'attempt to multiply with overflow'
113
+ },
114
+ '992401946138144806': {
115
+ error_kind: 'string',
116
+ string: 'Attempted to read past end of BoundedVec'
117
+ },
118
+ '1998584279744703196': {
119
+ error_kind: 'string',
120
+ string: 'attempt to subtract with overflow'
121
+ },
122
+ '2967937905572420042': {
123
+ error_kind: 'fmtstring',
124
+ length: 61,
125
+ item_types: [
126
+ {
127
+ kind: 'field'
128
+ },
129
+ {
130
+ kind: 'field'
131
+ }
132
+ ]
133
+ },
134
+ '3330370348214585450': {
135
+ error_kind: 'fmtstring',
136
+ length: 48,
137
+ item_types: [
138
+ {
139
+ kind: 'field'
140
+ },
141
+ {
142
+ kind: 'field'
143
+ }
144
+ ]
145
+ },
146
+ '3670003311596808700': {
147
+ error_kind: 'fmtstring',
148
+ length: 77,
149
+ item_types: [
150
+ {
151
+ kind: 'integer',
152
+ sign: 'unsigned',
153
+ width: 32
154
+ }
155
+ ]
156
+ },
157
+ '4261968856572588300': {
158
+ error_kind: 'string',
159
+ string: 'Value does not fit in field'
160
+ },
161
+ '4440399188109668273': {
162
+ error_kind: 'string',
163
+ string: 'Input length must be a multiple of 32'
164
+ },
165
+ '5417577161503694006': {
166
+ error_kind: 'fmtstring',
167
+ length: 56,
168
+ item_types: [
169
+ {
170
+ kind: 'field'
171
+ }
172
+ ]
173
+ },
174
+ '9791669845391776238': {
175
+ error_kind: 'string',
176
+ string: '0 has a square root; you cannot claim it is not square'
177
+ },
178
+ '10135509984888824963': {
179
+ error_kind: 'fmtstring',
180
+ length: 58,
181
+ item_types: [
182
+ {
183
+ kind: 'field'
184
+ }
185
+ ]
186
+ },
187
+ '10791800398362570014': {
188
+ error_kind: 'string',
189
+ string: 'extend_from_bounded_vec out of bounds'
190
+ },
191
+ '11692359521570349358': {
192
+ error_kind: 'fmtstring',
193
+ length: 40,
194
+ item_types: []
195
+ },
196
+ '12469291177396340830': {
197
+ error_kind: 'string',
198
+ string: 'call to assert_max_bit_size'
199
+ },
200
+ '12913276134398371456': {
201
+ error_kind: 'string',
202
+ string: 'push out of bounds'
203
+ },
204
+ '13557316507370296400': {
205
+ error_kind: 'fmtstring',
206
+ length: 130,
207
+ item_types: [
208
+ {
209
+ kind: 'integer',
210
+ sign: 'unsigned',
211
+ width: 32
212
+ }
213
+ ]
214
+ },
215
+ '14938672389828944159': {
216
+ error_kind: 'fmtstring',
217
+ length: 146,
218
+ item_types: [
219
+ {
220
+ kind: 'integer',
221
+ sign: 'unsigned',
222
+ width: 32
223
+ }
224
+ ]
225
+ },
226
+ '14990209321349310352': {
227
+ error_kind: 'string',
228
+ string: 'attempt to add with overflow'
229
+ },
230
+ '15764276373176857197': {
231
+ error_kind: 'string',
232
+ string: 'Stack too deep'
233
+ },
234
+ '16431471497789672479': {
235
+ error_kind: 'string',
236
+ string: 'Index out of bounds'
237
+ },
238
+ '17531474008201752295': {
239
+ error_kind: 'fmtstring',
240
+ length: 133,
241
+ item_types: [
242
+ {
243
+ kind: 'integer',
244
+ sign: 'unsigned',
245
+ width: 32
246
+ }
247
+ ]
248
+ }
249
+ }
250
+ },
251
+ bytecode: Buffer.from([]),
252
+ debugSymbols: ''
253
+ },
254
+ {
255
+ ...{
256
+ functionType: FunctionType.PUBLIC,
257
+ name: 'public_dispatch',
258
+ isOnlySelf: false,
259
+ isStatic: false,
260
+ isInitializer: false,
261
+ parameters: [
262
+ {
263
+ name: 'selector',
264
+ type: {
265
+ kind: 'field'
266
+ },
267
+ visibility: 'private'
268
+ }
269
+ ],
270
+ returnTypes: [],
271
+ errorTypes: {
272
+ '3445904810750103705': {
273
+ error_kind: 'string',
274
+ string: 'Block number mismatch.'
275
+ },
276
+ '6989792215391248978': {
277
+ error_kind: 'string',
278
+ string: 'Function check_timestamp can only be called statically'
279
+ },
280
+ '7259463707251703666': {
281
+ error_kind: 'string',
282
+ string: 'Function check_block_number can only be called statically'
283
+ },
284
+ '12511970388699677811': {
285
+ error_kind: 'fmtstring',
286
+ length: 27,
287
+ item_types: [
288
+ {
289
+ kind: 'field'
290
+ }
291
+ ]
292
+ },
293
+ '13950240626967988787': {
294
+ error_kind: 'string',
295
+ string: 'Timestamp mismatch.'
296
+ },
297
+ '15015303112667403944': {
298
+ error_kind: 'fmtstring',
299
+ length: 17,
300
+ item_types: []
301
+ },
302
+ '15764276373176857197': {
303
+ error_kind: 'string',
304
+ string: 'Stack too deep'
305
+ }
306
+ }
307
+ },
308
+ bytecode: Buffer.from([]),
309
+ debugSymbols: ''
310
+ },
311
+ {
312
+ ...{
313
+ functionType: FunctionType.UTILITY,
314
+ name: 'sync_state',
315
+ isOnlySelf: false,
316
+ isStatic: false,
317
+ isInitializer: false,
318
+ parameters: [],
319
+ returnTypes: [],
320
+ errorTypes: {
321
+ '361444214588792908': {
322
+ error_kind: 'string',
323
+ string: 'attempt to multiply with overflow'
324
+ },
325
+ '992401946138144806': {
326
+ error_kind: 'string',
327
+ string: 'Attempted to read past end of BoundedVec'
328
+ },
329
+ '1998584279744703196': {
330
+ error_kind: 'string',
331
+ string: 'attempt to subtract with overflow'
332
+ },
333
+ '2967937905572420042': {
334
+ error_kind: 'fmtstring',
335
+ length: 61,
336
+ item_types: [
337
+ {
338
+ kind: 'field'
339
+ },
340
+ {
341
+ kind: 'field'
342
+ }
343
+ ]
344
+ },
345
+ '3330370348214585450': {
346
+ error_kind: 'fmtstring',
347
+ length: 48,
348
+ item_types: [
349
+ {
350
+ kind: 'field'
351
+ },
352
+ {
353
+ kind: 'field'
354
+ }
355
+ ]
356
+ },
357
+ '3670003311596808700': {
358
+ error_kind: 'fmtstring',
359
+ length: 77,
360
+ item_types: [
361
+ {
362
+ kind: 'integer',
363
+ sign: 'unsigned',
364
+ width: 32
365
+ }
366
+ ]
367
+ },
368
+ '4261968856572588300': {
369
+ error_kind: 'string',
370
+ string: 'Value does not fit in field'
371
+ },
372
+ '4440399188109668273': {
373
+ error_kind: 'string',
374
+ string: 'Input length must be a multiple of 32'
375
+ },
376
+ '5417577161503694006': {
377
+ error_kind: 'fmtstring',
378
+ length: 56,
379
+ item_types: [
380
+ {
381
+ kind: 'field'
382
+ }
383
+ ]
384
+ },
385
+ '9791669845391776238': {
386
+ error_kind: 'string',
387
+ string: '0 has a square root; you cannot claim it is not square'
388
+ },
389
+ '9885968605480832328': {
390
+ error_kind: 'string',
391
+ string: 'Attempted to read past the length of a CapsuleArray'
392
+ },
393
+ '10135509984888824963': {
394
+ error_kind: 'fmtstring',
395
+ length: 58,
396
+ item_types: [
397
+ {
398
+ kind: 'field'
399
+ }
400
+ ]
401
+ },
402
+ '10791800398362570014': {
403
+ error_kind: 'string',
404
+ string: 'extend_from_bounded_vec out of bounds'
405
+ },
406
+ '11021520179822076911': {
407
+ error_kind: 'string',
408
+ string: 'Attempted to delete past the length of a CapsuleArray'
409
+ },
410
+ '11692359521570349358': {
411
+ error_kind: 'fmtstring',
412
+ length: 40,
413
+ item_types: []
414
+ },
415
+ '12327971061804302172': {
416
+ error_kind: 'fmtstring',
417
+ length: 98,
418
+ item_types: []
419
+ },
420
+ '12469291177396340830': {
421
+ error_kind: 'string',
422
+ string: 'call to assert_max_bit_size'
423
+ },
424
+ '12913276134398371456': {
425
+ error_kind: 'string',
426
+ string: 'push out of bounds'
427
+ },
428
+ '13557316507370296400': {
429
+ error_kind: 'fmtstring',
430
+ length: 130,
431
+ item_types: [
432
+ {
433
+ kind: 'integer',
434
+ sign: 'unsigned',
435
+ width: 32
436
+ }
437
+ ]
438
+ },
439
+ '14938672389828944159': {
440
+ error_kind: 'fmtstring',
441
+ length: 146,
442
+ item_types: [
443
+ {
444
+ kind: 'integer',
445
+ sign: 'unsigned',
446
+ width: 32
447
+ }
448
+ ]
449
+ },
450
+ '14990209321349310352': {
451
+ error_kind: 'string',
452
+ string: 'attempt to add with overflow'
453
+ },
454
+ '15764276373176857197': {
455
+ error_kind: 'string',
456
+ string: 'Stack too deep'
457
+ },
458
+ '16431471497789672479': {
459
+ error_kind: 'string',
460
+ string: 'Index out of bounds'
461
+ },
462
+ '17531474008201752295': {
463
+ error_kind: 'fmtstring',
464
+ length: 133,
465
+ item_types: [
466
+ {
467
+ kind: 'integer',
468
+ sign: 'unsigned',
469
+ width: 32
470
+ }
471
+ ]
472
+ },
473
+ '17655676068928457687': {
474
+ error_kind: 'string',
475
+ string: 'Reader did not read all data'
476
+ }
477
+ }
478
+ },
479
+ bytecode: Buffer.from([]),
480
+ debugSymbols: ''
481
+ }
482
+ ],
483
+ nonDispatchPublicFunctions: [
484
+ {
485
+ functionType: FunctionType.PUBLIC,
486
+ name: 'check_block_number',
487
+ isOnlySelf: false,
488
+ isStatic: true,
489
+ isInitializer: false,
490
+ parameters: [
491
+ {
492
+ name: 'operation',
493
+ type: {
494
+ kind: 'integer',
495
+ sign: 'unsigned',
496
+ width: 8
497
+ },
498
+ visibility: 'private'
499
+ },
500
+ {
501
+ name: 'value',
502
+ type: {
503
+ kind: 'integer',
504
+ sign: 'unsigned',
505
+ width: 32
506
+ },
507
+ visibility: 'private'
508
+ }
509
+ ],
510
+ returnTypes: [],
511
+ errorTypes: {
512
+ '3445904810750103705': {
513
+ error_kind: 'string',
514
+ string: 'Block number mismatch.'
515
+ },
516
+ '7259463707251703666': {
517
+ error_kind: 'string',
518
+ string: 'Function check_block_number can only be called statically'
519
+ },
520
+ '15015303112667403944': {
521
+ error_kind: 'fmtstring',
522
+ length: 17,
523
+ item_types: []
524
+ },
525
+ '15764276373176857197': {
526
+ error_kind: 'string',
527
+ string: 'Stack too deep'
528
+ }
529
+ }
530
+ },
531
+ {
532
+ functionType: FunctionType.PUBLIC,
533
+ name: 'check_timestamp',
534
+ isOnlySelf: false,
535
+ isStatic: true,
536
+ isInitializer: false,
537
+ parameters: [
538
+ {
539
+ name: 'operation',
540
+ type: {
541
+ kind: 'integer',
542
+ sign: 'unsigned',
543
+ width: 8
544
+ },
545
+ visibility: 'private'
546
+ },
547
+ {
548
+ name: 'value',
549
+ type: {
550
+ kind: 'integer',
551
+ sign: 'unsigned',
552
+ width: 64
553
+ },
554
+ visibility: 'private'
555
+ }
556
+ ],
557
+ returnTypes: [],
558
+ errorTypes: {
559
+ '6989792215391248978': {
560
+ error_kind: 'string',
561
+ string: 'Function check_timestamp can only be called statically'
562
+ },
563
+ '13950240626967988787': {
564
+ error_kind: 'string',
565
+ string: 'Timestamp mismatch.'
566
+ },
567
+ '15015303112667403944': {
568
+ error_kind: 'fmtstring',
569
+ length: 17,
570
+ item_types: []
571
+ },
572
+ '15764276373176857197': {
573
+ error_kind: 'string',
574
+ string: 'Stack too deep'
575
+ }
576
+ }
577
+ }
578
+ ],
579
+ outputs: {
580
+ structs: {},
581
+ globals: {}
582
+ },
583
+ storageLayout: {},
584
+ fileMap: {}
585
+ };
586
+ export class PublicChecksContract extends ContractBase {
587
+ constructor(wallet){
588
+ super(ProtocolContractAddress.PublicChecks, PublicChecksContractArtifact, wallet);
589
+ }
590
+ static at(wallet) {
591
+ return new PublicChecksContract(wallet);
592
+ }
593
+ }
@@ -13,5 +13,5 @@ export declare const DefaultWaitForProvenOpts: WaitForProvenOpts;
13
13
  /**
14
14
  * Wait for a transaction to be proven by polling the node
15
15
  */
16
- export declare function waitForProven(node: AztecNode, receipt: TxReceipt, opts?: WaitForProvenOpts): Promise<NonNullable<import("../../../foundation/dest/branded-types/block_number.js").BlockNumber>>;
17
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FpdF9mb3JfcHJvdmVuLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJhY3Qvd2FpdF9mb3JfcHJvdmVuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ2pFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBSWxEOztHQUVHO0FBQ0gsTUFBTSxNQUFNLGlCQUFpQixHQUFHO0lBQzlCLDZEQUE2RDtJQUM3RCxhQUFhLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDdkIsNkNBQTZDO0lBQzdDLFFBQVEsQ0FBQyxFQUFFLE1BQU0sQ0FBQztDQUNuQixDQUFDO0FBRUYsZUFBTyxNQUFNLHdCQUF3QixFQUFFLGlCQUd0QyxDQUFDO0FBRUY7O0dBRUc7QUFDSCx3QkFBc0IsYUFBYSxDQUFDLElBQUksRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFLFNBQVMsRUFBRSxJQUFJLENBQUMsRUFBRSxpQkFBaUIsc0dBYWhHIn0=
16
+ export declare function waitForProven(node: AztecNode, receipt: TxReceipt, opts?: WaitForProvenOpts): Promise<NonNullable<import("@aztec/foundation/branded-types").BlockNumber>>;
17
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FpdF9mb3JfcHJvdmVuLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJhY3Qvd2FpdF9mb3JfcHJvdmVuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ2pFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBSWxEOztHQUVHO0FBQ0gsTUFBTSxNQUFNLGlCQUFpQixHQUFHO0lBQzlCLDZEQUE2RDtJQUM3RCxhQUFhLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDdkIsNkNBQTZDO0lBQzdDLFFBQVEsQ0FBQyxFQUFFLE1BQU0sQ0FBQztDQUNuQixDQUFDO0FBRUYsZUFBTyxNQUFNLHdCQUF3QixFQUFFLGlCQUd0QyxDQUFDO0FBRUY7O0dBRUc7QUFDSCx3QkFBc0IsYUFBYSxDQUFDLElBQUksRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFLFNBQVMsRUFBRSxJQUFJLENBQUMsRUFBRSxpQkFBaUIsK0VBYWhHIn0=
@@ -1 +1 @@
1
- {"version":3,"file":"wait_for_proven.d.ts","sourceRoot":"","sources":["../../src/contract/wait_for_proven.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAIlD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAGtC,CAAC;AAEF;;GAEG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,iBAAiB,sGAahG"}
1
+ {"version":3,"file":"wait_for_proven.d.ts","sourceRoot":"","sources":["../../src/contract/wait_for_proven.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAIlD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAGtC,CAAC;AAEF;;GAEG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,iBAAiB,+EAahG"}
@@ -1,5 +1,5 @@
1
1
  import { retryUntil } from '@aztec/foundation/retry';
2
- import { DefaultWaitOpts } from './sent_tx.js';
2
+ import { DefaultWaitOpts } from './wait_opts.js';
3
3
  export const DefaultWaitForProvenOpts = {
4
4
  provenTimeout: 600,
5
5
  interval: DefaultWaitOpts.interval
@@ -0,0 +1,16 @@
1
+ import type { TxStatus } from '@aztec/stdlib/tx';
2
+ /** Options related to waiting for a tx. */
3
+ export type WaitOpts = {
4
+ /** The amount of time to ignore TxStatus.DROPPED receipts (in seconds) due to the presumption that it is being propagated by the p2p network. Defaults to 5. */
5
+ ignoreDroppedReceiptsFor?: number;
6
+ /** The maximum time (in seconds) to wait for the transaction to be mined. Defaults to 60. */
7
+ timeout?: number;
8
+ /** The time interval (in seconds) between retries to fetch the transaction receipt. Defaults to 1. */
9
+ interval?: number;
10
+ /** Whether to accept a revert as a status code for the tx when waiting for it. If false, will throw if the tx reverts. */
11
+ dontThrowOnRevert?: boolean;
12
+ /** The minimum inclusion status to wait for. If set, waits until the receipt reaches this status or higher. Defaults to CHECKPOINTED. */
13
+ waitForStatus?: TxStatus;
14
+ };
15
+ export declare const DefaultWaitOpts: WaitOpts;
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FpdF9vcHRzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJhY3Qvd2FpdF9vcHRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRWpELDJDQUEyQztBQUMzQyxNQUFNLE1BQU0sUUFBUSxHQUFHO0lBQ3JCLGdLQUFnSztJQUNoSyx3QkFBd0IsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNsQyw2RkFBNkY7SUFDN0YsT0FBTyxDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ2pCLHNHQUFzRztJQUN0RyxRQUFRLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDbEIsMEhBQTBIO0lBQzFILGlCQUFpQixDQUFDLEVBQUUsT0FBTyxDQUFDO0lBQzVCLHlJQUF5STtJQUN6SSxhQUFhLENBQUMsRUFBRSxRQUFRLENBQUM7Q0FDMUIsQ0FBQztBQUVGLGVBQU8sTUFBTSxlQUFlLEVBQUUsUUFJN0IsQ0FBQyJ9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wait_opts.d.ts","sourceRoot":"","sources":["../../src/contract/wait_opts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,2CAA2C;AAC3C,MAAM,MAAM,QAAQ,GAAG;IACrB,gKAAgK;IAChK,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,6FAA6F;IAC7F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0HAA0H;IAC1H,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yIAAyI;IACzI,aAAa,CAAC,EAAE,QAAQ,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,QAI7B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const DefaultWaitOpts = {
2
+ ignoreDroppedReceiptsFor: 5,
3
+ timeout: 300,
4
+ interval: 1
5
+ };
@@ -4,10 +4,10 @@ import { ProtocolContractAddress } from '@aztec/protocol-contracts';
4
4
  import { bufferAsFields } from '@aztec/stdlib/abi';
5
5
  import { getContractClassFromArtifact } from '@aztec/stdlib/contract';
6
6
  import { Capsule } from '@aztec/stdlib/tx';
7
- import { getClassRegistryContract } from '../contract/protocol_contracts.js';
7
+ import { ContractClassRegistryContract } from '../contract/protocol_contracts/contract-class-registry.js';
8
8
  /** Sets up a call to publish a contract class given its artifact. */ export async function publishContractClass(wallet, artifact) {
9
9
  const { artifactHash, privateFunctionsRoot, publicBytecodeCommitment, packedBytecode } = await getContractClassFromArtifact(artifact);
10
- const classRegistry = await getClassRegistryContract(wallet);
10
+ const classRegistry = ContractClassRegistryContract.at(wallet);
11
11
  const encodedBytecode = bufferAsFields(packedBytecode, MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS);
12
12
  return classRegistry.methods.publish(artifactHash, privateFunctionsRoot, publicBytecodeCommitment).with({
13
13
  capsules: [
@@ -6,5 +6,5 @@ import type { Wallet } from '../wallet/wallet.js';
6
6
  * @param wallet - The wallet to use for the publication (setup) tx.
7
7
  * @param instance - The instance to publish.
8
8
  */
9
- export declare function publishInstance(wallet: Wallet, instance: ContractInstanceWithAddress): Promise<ContractFunctionInteraction>;
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGlzaF9pbnN0YW5jZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RlcGxveW1lbnQvcHVibGlzaF9pbnN0YW5jZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSwyQkFBMkIsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRTFFLE9BQU8sS0FBSyxFQUFFLDJCQUEyQixFQUFFLE1BQU0sOENBQThDLENBQUM7QUFFaEcsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFFbEQ7Ozs7R0FJRztBQUNILHdCQUFzQixlQUFlLENBQ25DLE1BQU0sRUFBRSxNQUFNLEVBQ2QsUUFBUSxFQUFFLDJCQUEyQixHQUNwQyxPQUFPLENBQUMsMkJBQTJCLENBQUMsQ0FXdEMifQ==
9
+ export declare function publishInstance(wallet: Wallet, instance: ContractInstanceWithAddress): ContractFunctionInteraction;
10
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGlzaF9pbnN0YW5jZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RlcGxveW1lbnQvcHVibGlzaF9pbnN0YW5jZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSwyQkFBMkIsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRTFFLE9BQU8sS0FBSyxFQUFFLDJCQUEyQixFQUFFLE1BQU0sOENBQThDLENBQUM7QUFFaEcsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFFbEQ7Ozs7R0FJRztBQUNILHdCQUFnQixlQUFlLENBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxRQUFRLEVBQUUsMkJBQTJCLEdBQUcsMkJBQTJCLENBV2xIIn0=
@@ -1 +1 @@
1
- {"version":3,"file":"publish_instance.d.ts","sourceRoot":"","sources":["../../src/deployment/publish_instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAE1E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAEhG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,2BAA2B,GACpC,OAAO,CAAC,2BAA2B,CAAC,CAWtC"}
1
+ {"version":3,"file":"publish_instance.d.ts","sourceRoot":"","sources":["../../src/deployment/publish_instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAE1E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAEhG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,2BAA2B,GAAG,2BAA2B,CAWlH"}