@aztec/aztec.js 0.0.1-commit.fce3e4f → 0.0.1-commit.ff7989d6c

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 (212) 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/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 +4 -2
  31. package/dest/api/fields.d.ts.map +1 -1
  32. package/dest/api/fields.js +3 -1
  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 +23 -2
  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 +3 -3
  53. package/dest/contract/batch_call.d.ts.map +1 -1
  54. package/dest/contract/batch_call.js +11 -6
  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 +10 -7
  60. package/dest/contract/deploy_method.d.ts +77 -18
  61. package/dest/contract/deploy_method.d.ts.map +1 -1
  62. package/dest/contract/deploy_method.js +56 -30
  63. package/dest/contract/interaction_options.d.ts +49 -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 +36 -0
  67. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
  68. package/dest/contract/protocol_contracts/auth-registry.js +997 -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 +139 -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 +593 -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 +601 -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 +3 -3
  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 +9 -6
  95. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  96. package/dest/ethereum/portal_manager.js +17 -18
  97. package/dest/fee/fee_juice_payment_method_with_claim.js +7 -7
  98. package/dest/fee/private_fee_payment_method.js +11 -11
  99. package/dest/fee/public_fee_payment_method.js +11 -11
  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/abi_types.d.ts +2 -2
  105. package/dest/utils/abi_types.d.ts.map +1 -1
  106. package/dest/utils/authwit.d.ts +9 -7
  107. package/dest/utils/authwit.d.ts.map +1 -1
  108. package/dest/utils/authwit.js +6 -10
  109. package/dest/utils/cross_chain.d.ts +2 -2
  110. package/dest/utils/cross_chain.d.ts.map +1 -1
  111. package/dest/utils/fee_juice.js +1 -1
  112. package/dest/utils/field_compressed_string.js +1 -1
  113. package/dest/utils/node.d.ts +12 -1
  114. package/dest/utils/node.d.ts.map +1 -1
  115. package/dest/utils/node.js +46 -0
  116. package/dest/utils/pub_key.d.ts +2 -2
  117. package/dest/utils/pub_key.d.ts.map +1 -1
  118. package/dest/utils/pub_key.js +1 -1
  119. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +5 -8
  120. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
  121. package/dest/wallet/account_entrypoint_meta_payment_method.js +28 -43
  122. package/dest/wallet/account_manager.d.ts +6 -9
  123. package/dest/wallet/account_manager.d.ts.map +1 -1
  124. package/dest/wallet/account_manager.js +6 -12
  125. package/dest/wallet/capabilities.d.ts +452 -0
  126. package/dest/wallet/capabilities.d.ts.map +1 -0
  127. package/dest/wallet/capabilities.js +3 -0
  128. package/dest/wallet/deploy_account_method.d.ts +47 -8
  129. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  130. package/dest/wallet/deploy_account_method.js +34 -6
  131. package/dest/wallet/index.d.ts +2 -1
  132. package/dest/wallet/index.d.ts.map +1 -1
  133. package/dest/wallet/index.js +1 -0
  134. package/dest/wallet/wallet.d.ts +1817 -984
  135. package/dest/wallet/wallet.d.ts.map +1 -1
  136. package/dest/wallet/wallet.js +216 -101
  137. package/package.json +25 -14
  138. package/src/account/account.ts +34 -58
  139. package/src/account/account_contract.ts +7 -8
  140. package/src/account/account_with_secret_key.ts +34 -9
  141. package/src/account/index.ts +3 -2
  142. package/src/account/signerless_account.ts +14 -13
  143. package/src/api/account.ts +9 -3
  144. package/src/api/authorization.ts +1 -0
  145. package/src/api/contract.ts +24 -9
  146. package/src/api/deployment.ts +0 -1
  147. package/src/api/events.ts +35 -27
  148. package/src/api/fields.ts +3 -1
  149. package/src/api/keys.ts +2 -2
  150. package/src/api/node.ts +7 -3
  151. package/src/api/protocol.ts +7 -0
  152. package/src/api/tx.ts +2 -0
  153. package/src/api/wallet.ts +52 -3
  154. package/src/authorization/call_authorization_request.ts +1 -1
  155. package/src/contract/base_contract_interaction.ts +27 -15
  156. package/src/contract/batch_call.ts +10 -13
  157. package/src/contract/contract_function_interaction.ts +17 -7
  158. package/src/contract/deploy_method.ts +146 -36
  159. package/src/contract/interaction_options.ts +56 -4
  160. package/src/contract/protocol_contracts/auth-registry.ts +551 -0
  161. package/src/contract/protocol_contracts/contract-class-registry.ts +99 -0
  162. package/src/contract/protocol_contracts/contract-instance-registry.ts +302 -0
  163. package/src/contract/protocol_contracts/fee-juice.ts +264 -0
  164. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +334 -0
  165. package/src/contract/protocol_contracts/public-checks.ts +318 -0
  166. package/src/contract/wait_for_proven.ts +1 -1
  167. package/src/contract/wait_opts.ts +21 -0
  168. package/src/deployment/publish_class.ts +3 -3
  169. package/src/deployment/publish_instance.ts +3 -6
  170. package/src/ethereum/portal_manager.ts +20 -24
  171. package/src/fee/fee_juice_payment_method_with_claim.ts +6 -6
  172. package/src/fee/private_fee_payment_method.ts +8 -8
  173. package/src/fee/public_fee_payment_method.ts +9 -9
  174. package/src/fee/sponsored_fee_payment.ts +3 -3
  175. package/src/scripts/generate_protocol_contract_types.ts +150 -0
  176. package/src/utils/abi_types.ts +1 -1
  177. package/src/utils/authwit.ts +20 -8
  178. package/src/utils/cross_chain.ts +1 -1
  179. package/src/utils/fee_juice.ts +1 -1
  180. package/src/utils/field_compressed_string.ts +1 -1
  181. package/src/utils/node.ts +62 -0
  182. package/src/utils/pub_key.ts +2 -2
  183. package/src/wallet/account_entrypoint_meta_payment_method.ts +28 -60
  184. package/src/wallet/account_manager.ts +6 -14
  185. package/src/wallet/capabilities.ts +500 -0
  186. package/src/wallet/deploy_account_method.ts +75 -14
  187. package/src/wallet/index.ts +1 -0
  188. package/src/wallet/wallet.ts +375 -110
  189. package/dest/account/interface.d.ts +0 -19
  190. package/dest/account/interface.d.ts.map +0 -1
  191. package/dest/account/interface.js +0 -5
  192. package/dest/contract/deploy_sent_tx.d.ts +0 -48
  193. package/dest/contract/deploy_sent_tx.d.ts.map +0 -1
  194. package/dest/contract/deploy_sent_tx.js +0 -46
  195. package/dest/contract/protocol_contracts.d.ts +0 -9
  196. package/dest/contract/protocol_contracts.d.ts.map +0 -1
  197. package/dest/contract/protocol_contracts.js +0 -26
  198. package/dest/contract/sent_tx.d.ts +0 -51
  199. package/dest/contract/sent_tx.d.ts.map +0 -1
  200. package/dest/contract/sent_tx.js +0 -90
  201. package/dest/contract/unsafe_contract.d.ts +0 -15
  202. package/dest/contract/unsafe_contract.d.ts.map +0 -1
  203. package/dest/contract/unsafe_contract.js +0 -6
  204. package/dest/deployment/broadcast_function.d.ts +0 -24
  205. package/dest/deployment/broadcast_function.d.ts.map +0 -1
  206. package/dest/deployment/broadcast_function.js +0 -74
  207. package/src/account/interface.ts +0 -25
  208. package/src/contract/deploy_sent_tx.ts +0 -75
  209. package/src/contract/protocol_contracts.ts +0 -35
  210. package/src/contract/sent_tx.ts +0 -130
  211. package/src/contract/unsafe_contract.ts +0 -19
  212. package/src/deployment/broadcast_function.ts +0 -148
@@ -0,0 +1,601 @@
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: 15,
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
+ '9530675838293881722': {
175
+ error_kind: 'string',
176
+ string: 'Writer did not write all data'
177
+ },
178
+ '9791669845391776238': {
179
+ error_kind: 'string',
180
+ string: '0 has a square root; you cannot claim it is not square'
181
+ },
182
+ '10135509984888824963': {
183
+ error_kind: 'fmtstring',
184
+ length: 58,
185
+ item_types: [
186
+ {
187
+ kind: 'field'
188
+ }
189
+ ]
190
+ },
191
+ '10791800398362570014': {
192
+ error_kind: 'string',
193
+ string: 'extend_from_bounded_vec out of bounds'
194
+ },
195
+ '11692359521570349358': {
196
+ error_kind: 'fmtstring',
197
+ length: 40,
198
+ item_types: []
199
+ },
200
+ '12469291177396340830': {
201
+ error_kind: 'string',
202
+ string: 'call to assert_max_bit_size'
203
+ },
204
+ '12913276134398371456': {
205
+ error_kind: 'string',
206
+ string: 'push out of bounds'
207
+ },
208
+ '13557316507370296400': {
209
+ error_kind: 'fmtstring',
210
+ length: 130,
211
+ item_types: [
212
+ {
213
+ kind: 'integer',
214
+ sign: 'unsigned',
215
+ width: 32
216
+ }
217
+ ]
218
+ },
219
+ '14938672389828944159': {
220
+ error_kind: 'fmtstring',
221
+ length: 146,
222
+ item_types: [
223
+ {
224
+ kind: 'integer',
225
+ sign: 'unsigned',
226
+ width: 32
227
+ }
228
+ ]
229
+ },
230
+ '14990209321349310352': {
231
+ error_kind: 'string',
232
+ string: 'attempt to add with overflow'
233
+ },
234
+ '15764276373176857197': {
235
+ error_kind: 'string',
236
+ string: 'Stack too deep'
237
+ },
238
+ '16431471497789672479': {
239
+ error_kind: 'string',
240
+ string: 'Index out of bounds'
241
+ },
242
+ '17531474008201752295': {
243
+ error_kind: 'fmtstring',
244
+ length: 133,
245
+ item_types: [
246
+ {
247
+ kind: 'integer',
248
+ sign: 'unsigned',
249
+ width: 32
250
+ }
251
+ ]
252
+ }
253
+ }
254
+ },
255
+ bytecode: Buffer.from([]),
256
+ debugSymbols: ''
257
+ },
258
+ {
259
+ ...{
260
+ functionType: FunctionType.PUBLIC,
261
+ name: 'public_dispatch',
262
+ isOnlySelf: false,
263
+ isStatic: false,
264
+ isInitializer: false,
265
+ parameters: [
266
+ {
267
+ name: 'selector',
268
+ type: {
269
+ kind: 'field'
270
+ },
271
+ visibility: 'private'
272
+ }
273
+ ],
274
+ returnTypes: [],
275
+ errorTypes: {
276
+ '3445904810750103705': {
277
+ error_kind: 'string',
278
+ string: 'Block number mismatch.'
279
+ },
280
+ '6989792215391248978': {
281
+ error_kind: 'string',
282
+ string: 'Function check_timestamp can only be called statically'
283
+ },
284
+ '7259463707251703666': {
285
+ error_kind: 'string',
286
+ string: 'Function check_block_number can only be called statically'
287
+ },
288
+ '12511970388699677811': {
289
+ error_kind: 'fmtstring',
290
+ length: 27,
291
+ item_types: [
292
+ {
293
+ kind: 'field'
294
+ }
295
+ ]
296
+ },
297
+ '13950240626967988787': {
298
+ error_kind: 'string',
299
+ string: 'Timestamp mismatch.'
300
+ },
301
+ '15015303112667403944': {
302
+ error_kind: 'fmtstring',
303
+ length: 17,
304
+ item_types: []
305
+ },
306
+ '15764276373176857197': {
307
+ error_kind: 'string',
308
+ string: 'Stack too deep'
309
+ }
310
+ }
311
+ },
312
+ bytecode: Buffer.from([]),
313
+ debugSymbols: ''
314
+ },
315
+ {
316
+ ...{
317
+ functionType: FunctionType.UTILITY,
318
+ name: 'sync_state',
319
+ isOnlySelf: false,
320
+ isStatic: false,
321
+ isInitializer: false,
322
+ parameters: [],
323
+ returnTypes: [],
324
+ errorTypes: {
325
+ '361444214588792908': {
326
+ error_kind: 'string',
327
+ string: 'attempt to multiply with overflow'
328
+ },
329
+ '992401946138144806': {
330
+ error_kind: 'string',
331
+ string: 'Attempted to read past end of BoundedVec'
332
+ },
333
+ '1998584279744703196': {
334
+ error_kind: 'string',
335
+ string: 'attempt to subtract with overflow'
336
+ },
337
+ '2967937905572420042': {
338
+ error_kind: 'fmtstring',
339
+ length: 61,
340
+ item_types: [
341
+ {
342
+ kind: 'field'
343
+ },
344
+ {
345
+ kind: 'field'
346
+ }
347
+ ]
348
+ },
349
+ '3330370348214585450': {
350
+ error_kind: 'fmtstring',
351
+ length: 48,
352
+ item_types: [
353
+ {
354
+ kind: 'field'
355
+ },
356
+ {
357
+ kind: 'field'
358
+ }
359
+ ]
360
+ },
361
+ '3670003311596808700': {
362
+ error_kind: 'fmtstring',
363
+ length: 77,
364
+ item_types: [
365
+ {
366
+ kind: 'integer',
367
+ sign: 'unsigned',
368
+ width: 32
369
+ }
370
+ ]
371
+ },
372
+ '4261968856572588300': {
373
+ error_kind: 'string',
374
+ string: 'Value does not fit in field'
375
+ },
376
+ '4440399188109668273': {
377
+ error_kind: 'string',
378
+ string: 'Input length must be a multiple of 32'
379
+ },
380
+ '5417577161503694006': {
381
+ error_kind: 'fmtstring',
382
+ length: 56,
383
+ item_types: [
384
+ {
385
+ kind: 'field'
386
+ }
387
+ ]
388
+ },
389
+ '9530675838293881722': {
390
+ error_kind: 'string',
391
+ string: 'Writer did not write all data'
392
+ },
393
+ '9791669845391776238': {
394
+ error_kind: 'string',
395
+ string: '0 has a square root; you cannot claim it is not square'
396
+ },
397
+ '9885968605480832328': {
398
+ error_kind: 'string',
399
+ string: 'Attempted to read past the length of a CapsuleArray'
400
+ },
401
+ '10135509984888824963': {
402
+ error_kind: 'fmtstring',
403
+ length: 58,
404
+ item_types: [
405
+ {
406
+ kind: 'field'
407
+ }
408
+ ]
409
+ },
410
+ '10791800398362570014': {
411
+ error_kind: 'string',
412
+ string: 'extend_from_bounded_vec out of bounds'
413
+ },
414
+ '11021520179822076911': {
415
+ error_kind: 'string',
416
+ string: 'Attempted to delete past the length of a CapsuleArray'
417
+ },
418
+ '11692359521570349358': {
419
+ error_kind: 'fmtstring',
420
+ length: 40,
421
+ item_types: []
422
+ },
423
+ '12327971061804302172': {
424
+ error_kind: 'fmtstring',
425
+ length: 98,
426
+ item_types: []
427
+ },
428
+ '12469291177396340830': {
429
+ error_kind: 'string',
430
+ string: 'call to assert_max_bit_size'
431
+ },
432
+ '12913276134398371456': {
433
+ error_kind: 'string',
434
+ string: 'push out of bounds'
435
+ },
436
+ '13557316507370296400': {
437
+ error_kind: 'fmtstring',
438
+ length: 130,
439
+ item_types: [
440
+ {
441
+ kind: 'integer',
442
+ sign: 'unsigned',
443
+ width: 32
444
+ }
445
+ ]
446
+ },
447
+ '14938672389828944159': {
448
+ error_kind: 'fmtstring',
449
+ length: 146,
450
+ item_types: [
451
+ {
452
+ kind: 'integer',
453
+ sign: 'unsigned',
454
+ width: 32
455
+ }
456
+ ]
457
+ },
458
+ '14990209321349310352': {
459
+ error_kind: 'string',
460
+ string: 'attempt to add with overflow'
461
+ },
462
+ '15764276373176857197': {
463
+ error_kind: 'string',
464
+ string: 'Stack too deep'
465
+ },
466
+ '16431471497789672479': {
467
+ error_kind: 'string',
468
+ string: 'Index out of bounds'
469
+ },
470
+ '17531474008201752295': {
471
+ error_kind: 'fmtstring',
472
+ length: 133,
473
+ item_types: [
474
+ {
475
+ kind: 'integer',
476
+ sign: 'unsigned',
477
+ width: 32
478
+ }
479
+ ]
480
+ },
481
+ '17655676068928457687': {
482
+ error_kind: 'string',
483
+ string: 'Reader did not read all data'
484
+ }
485
+ }
486
+ },
487
+ bytecode: Buffer.from([]),
488
+ debugSymbols: ''
489
+ }
490
+ ],
491
+ nonDispatchPublicFunctions: [
492
+ {
493
+ functionType: FunctionType.PUBLIC,
494
+ name: 'check_block_number',
495
+ isOnlySelf: false,
496
+ isStatic: true,
497
+ isInitializer: false,
498
+ parameters: [
499
+ {
500
+ name: 'operation',
501
+ type: {
502
+ kind: 'integer',
503
+ sign: 'unsigned',
504
+ width: 8
505
+ },
506
+ visibility: 'private'
507
+ },
508
+ {
509
+ name: 'value',
510
+ type: {
511
+ kind: 'integer',
512
+ sign: 'unsigned',
513
+ width: 32
514
+ },
515
+ visibility: 'private'
516
+ }
517
+ ],
518
+ returnTypes: [],
519
+ errorTypes: {
520
+ '3445904810750103705': {
521
+ error_kind: 'string',
522
+ string: 'Block number mismatch.'
523
+ },
524
+ '7259463707251703666': {
525
+ error_kind: 'string',
526
+ string: 'Function check_block_number can only be called statically'
527
+ },
528
+ '15015303112667403944': {
529
+ error_kind: 'fmtstring',
530
+ length: 17,
531
+ item_types: []
532
+ },
533
+ '15764276373176857197': {
534
+ error_kind: 'string',
535
+ string: 'Stack too deep'
536
+ }
537
+ }
538
+ },
539
+ {
540
+ functionType: FunctionType.PUBLIC,
541
+ name: 'check_timestamp',
542
+ isOnlySelf: false,
543
+ isStatic: true,
544
+ isInitializer: false,
545
+ parameters: [
546
+ {
547
+ name: 'operation',
548
+ type: {
549
+ kind: 'integer',
550
+ sign: 'unsigned',
551
+ width: 8
552
+ },
553
+ visibility: 'private'
554
+ },
555
+ {
556
+ name: 'value',
557
+ type: {
558
+ kind: 'integer',
559
+ sign: 'unsigned',
560
+ width: 64
561
+ },
562
+ visibility: 'private'
563
+ }
564
+ ],
565
+ returnTypes: [],
566
+ errorTypes: {
567
+ '6989792215391248978': {
568
+ error_kind: 'string',
569
+ string: 'Function check_timestamp can only be called statically'
570
+ },
571
+ '13950240626967988787': {
572
+ error_kind: 'string',
573
+ string: 'Timestamp mismatch.'
574
+ },
575
+ '15015303112667403944': {
576
+ error_kind: 'fmtstring',
577
+ length: 17,
578
+ item_types: []
579
+ },
580
+ '15764276373176857197': {
581
+ error_kind: 'string',
582
+ string: 'Stack too deep'
583
+ }
584
+ }
585
+ }
586
+ ],
587
+ outputs: {
588
+ structs: {},
589
+ globals: {}
590
+ },
591
+ storageLayout: {},
592
+ fileMap: {}
593
+ };
594
+ export class PublicChecksContract extends ContractBase {
595
+ constructor(wallet){
596
+ super(ProtocolContractAddress.PublicChecks, PublicChecksContractArtifact, wallet);
597
+ }
598
+ static at(wallet) {
599
+ return new PublicChecksContract(wallet);
600
+ }
601
+ }
@@ -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<number>;
17
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FpdF9mb3JfcHJvdmVuLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJhY3Qvd2FpdF9mb3JfcHJvdmVuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ2pFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBSWxEOztHQUVHO0FBQ0gsTUFBTSxNQUFNLGlCQUFpQixHQUFHO0lBQzlCLDZEQUE2RDtJQUM3RCxhQUFhLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDdkIsNkNBQTZDO0lBQzdDLFFBQVEsQ0FBQyxFQUFFLE1BQU0sQ0FBQztDQUNuQixDQUFDO0FBRUYsZUFBTyxNQUFNLHdCQUF3QixFQUFFLGlCQUd0QyxDQUFDO0FBRUY7O0dBRUc7QUFDSCx3QkFBc0IsYUFBYSxDQUFDLElBQUksRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFLFNBQVMsRUFBRSxJQUFJLENBQUMsRUFBRSxpQkFBaUIsbUJBYWhHIn0=
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,mBAahG"}
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
+ };
@@ -1,13 +1,13 @@
1
1
  import { CONTRACT_CLASS_REGISTRY_BYTECODE_CAPSULE_SLOT, MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  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: [