@aztec/aztec.js 0.0.1-commit.c7c42ec → 0.0.1-commit.f295ac2

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 (88) hide show
  1. package/dest/account/account.d.ts +3 -3
  2. package/dest/account/account.d.ts.map +1 -1
  3. package/dest/account/account_contract.d.ts +2 -2
  4. package/dest/account/account_contract.d.ts.map +1 -1
  5. package/dest/account/account_with_secret_key.d.ts +2 -1
  6. package/dest/account/account_with_secret_key.d.ts.map +1 -1
  7. package/dest/api/block.d.ts +2 -2
  8. package/dest/api/block.d.ts.map +1 -1
  9. package/dest/api/block.js +1 -1
  10. package/dest/api/protocol.d.ts +7 -1
  11. package/dest/api/protocol.d.ts.map +1 -1
  12. package/dest/api/protocol.js +6 -0
  13. package/dest/api/wallet.d.ts +2 -2
  14. package/dest/api/wallet.d.ts.map +1 -1
  15. package/dest/api/wallet.js +1 -1
  16. package/dest/authorization/call_authorization_request.d.ts +22 -1
  17. package/dest/authorization/call_authorization_request.d.ts.map +1 -1
  18. package/dest/contract/batch_call.d.ts +1 -1
  19. package/dest/contract/batch_call.d.ts.map +1 -1
  20. package/dest/contract/batch_call.js +3 -1
  21. package/dest/contract/contract_base.d.ts +4 -1
  22. package/dest/contract/contract_base.d.ts.map +1 -1
  23. package/dest/contract/contract_function_interaction.d.ts +1 -1
  24. package/dest/contract/deploy_method.d.ts +1 -1
  25. package/dest/contract/deploy_method.d.ts.map +1 -1
  26. package/dest/contract/deploy_method.js +5 -4
  27. package/dest/contract/protocol_contracts/auth-registry.d.ts +36 -0
  28. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
  29. package/dest/contract/protocol_contracts/auth-registry.js +928 -0
  30. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +35 -0
  31. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
  32. package/dest/contract/protocol_contracts/contract-class-registry.js +797 -0
  33. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +31 -0
  34. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
  35. package/dest/contract/protocol_contracts/contract-instance-registry.js +867 -0
  36. package/dest/contract/protocol_contracts/fee-juice.d.ts +30 -0
  37. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
  38. package/dest/contract/protocol_contracts/fee-juice.js +824 -0
  39. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +34 -0
  40. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -0
  41. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +576 -0
  42. package/dest/contract/protocol_contracts/public-checks.d.ts +26 -0
  43. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -0
  44. package/dest/contract/protocol_contracts/public-checks.js +592 -0
  45. package/dest/contract/wait_for_proven.d.ts +2 -2
  46. package/dest/contract/wait_for_proven.d.ts.map +1 -1
  47. package/dest/deployment/broadcast_function.js +3 -3
  48. package/dest/deployment/publish_class.js +2 -2
  49. package/dest/deployment/publish_instance.d.ts +2 -2
  50. package/dest/deployment/publish_instance.d.ts.map +1 -1
  51. package/dest/deployment/publish_instance.js +3 -3
  52. package/dest/ethereum/portal_manager.d.ts +6 -3
  53. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  54. package/dest/ethereum/portal_manager.js +10 -10
  55. package/dest/scripts/generate_protocol_contract_types.d.ts +2 -0
  56. package/dest/scripts/generate_protocol_contract_types.d.ts.map +1 -0
  57. package/dest/scripts/generate_protocol_contract_types.js +120 -0
  58. package/dest/wallet/account_manager.d.ts +5 -2
  59. package/dest/wallet/account_manager.d.ts.map +1 -1
  60. package/dest/wallet/wallet.d.ts +181 -2483
  61. package/dest/wallet/wallet.d.ts.map +1 -1
  62. package/dest/wallet/wallet.js +46 -84
  63. package/package.json +14 -12
  64. package/src/api/block.ts +1 -1
  65. package/src/api/protocol.ts +7 -0
  66. package/src/api/wallet.ts +0 -2
  67. package/src/contract/batch_call.ts +4 -2
  68. package/src/contract/deploy_method.ts +7 -6
  69. package/src/contract/protocol_contracts/auth-registry.ts +542 -0
  70. package/src/contract/protocol_contracts/contract-class-registry.ts +442 -0
  71. package/src/contract/protocol_contracts/contract-instance-registry.ts +501 -0
  72. package/src/contract/protocol_contracts/fee-juice.ts +462 -0
  73. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +338 -0
  74. package/src/contract/protocol_contracts/public-checks.ts +324 -0
  75. package/src/deployment/broadcast_function.ts +3 -3
  76. package/src/deployment/publish_class.ts +2 -2
  77. package/src/deployment/publish_instance.ts +3 -6
  78. package/src/ethereum/portal_manager.ts +9 -8
  79. package/src/scripts/generate_protocol_contract_types.ts +150 -0
  80. package/src/wallet/wallet.ts +109 -80
  81. package/dest/contract/protocol_contracts.d.ts +0 -9
  82. package/dest/contract/protocol_contracts.d.ts.map +0 -1
  83. package/dest/contract/protocol_contracts.js +0 -26
  84. package/dest/contract/unsafe_contract.d.ts +0 -15
  85. package/dest/contract/unsafe_contract.d.ts.map +0 -1
  86. package/dest/contract/unsafe_contract.js +0 -6
  87. package/src/contract/protocol_contracts.ts +0 -35
  88. package/src/contract/unsafe_contract.ts +0 -19
@@ -0,0 +1,592 @@
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
+ '9791669845391776238': {
166
+ error_kind: 'string',
167
+ string: '0 has a square root; you cannot claim it is not square'
168
+ },
169
+ '9885968605480832328': {
170
+ error_kind: 'string',
171
+ string: 'Attempted to read past the length of a CapsuleArray'
172
+ },
173
+ '10135509984888824963': {
174
+ error_kind: 'fmtstring',
175
+ length: 58,
176
+ item_types: [
177
+ {
178
+ kind: 'field'
179
+ }
180
+ ]
181
+ },
182
+ '10791800398362570014': {
183
+ error_kind: 'string',
184
+ string: 'extend_from_bounded_vec out of bounds'
185
+ },
186
+ '11021520179822076911': {
187
+ error_kind: 'string',
188
+ string: 'Attempted to delete past the length of a CapsuleArray'
189
+ },
190
+ '11692359521570349358': {
191
+ error_kind: 'fmtstring',
192
+ length: 40,
193
+ item_types: []
194
+ },
195
+ '12327971061804302172': {
196
+ error_kind: 'fmtstring',
197
+ length: 98,
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
+ '14990209321349310352': {
302
+ error_kind: 'string',
303
+ string: 'attempt to add with overflow'
304
+ },
305
+ '15015303112667403944': {
306
+ error_kind: 'fmtstring',
307
+ length: 17,
308
+ item_types: []
309
+ },
310
+ '15764276373176857197': {
311
+ error_kind: 'string',
312
+ string: 'Stack too deep'
313
+ },
314
+ '16431471497789672479': {
315
+ error_kind: 'string',
316
+ string: 'Index out of bounds'
317
+ }
318
+ }
319
+ },
320
+ bytecode: Buffer.from([]),
321
+ debugSymbols: ''
322
+ },
323
+ {
324
+ ...{
325
+ functionType: FunctionType.UTILITY,
326
+ name: 'sync_private_state',
327
+ isOnlySelf: false,
328
+ isStatic: false,
329
+ isInitializer: false,
330
+ parameters: [],
331
+ returnTypes: [],
332
+ errorTypes: {
333
+ '361444214588792908': {
334
+ error_kind: 'string',
335
+ string: 'attempt to multiply with overflow'
336
+ },
337
+ '992401946138144806': {
338
+ error_kind: 'string',
339
+ string: 'Attempted to read past end of BoundedVec'
340
+ },
341
+ '1998584279744703196': {
342
+ error_kind: 'string',
343
+ string: 'attempt to subtract with overflow'
344
+ },
345
+ '2967937905572420042': {
346
+ error_kind: 'fmtstring',
347
+ length: 61,
348
+ item_types: [
349
+ {
350
+ kind: 'field'
351
+ },
352
+ {
353
+ kind: 'field'
354
+ }
355
+ ]
356
+ },
357
+ '3330370348214585450': {
358
+ error_kind: 'fmtstring',
359
+ length: 48,
360
+ item_types: [
361
+ {
362
+ kind: 'field'
363
+ },
364
+ {
365
+ kind: 'field'
366
+ }
367
+ ]
368
+ },
369
+ '3670003311596808700': {
370
+ error_kind: 'fmtstring',
371
+ length: 77,
372
+ item_types: [
373
+ {
374
+ kind: 'integer',
375
+ sign: 'unsigned',
376
+ width: 32
377
+ }
378
+ ]
379
+ },
380
+ '4261968856572588300': {
381
+ error_kind: 'string',
382
+ string: 'Value does not fit in field'
383
+ },
384
+ '4440399188109668273': {
385
+ error_kind: 'string',
386
+ string: 'Input length must be a multiple of 32'
387
+ },
388
+ '9791669845391776238': {
389
+ error_kind: 'string',
390
+ string: '0 has a square root; you cannot claim it is not square'
391
+ },
392
+ '9885968605480832328': {
393
+ error_kind: 'string',
394
+ string: 'Attempted to read past the length of a CapsuleArray'
395
+ },
396
+ '10135509984888824963': {
397
+ error_kind: 'fmtstring',
398
+ length: 58,
399
+ item_types: [
400
+ {
401
+ kind: 'field'
402
+ }
403
+ ]
404
+ },
405
+ '10791800398362570014': {
406
+ error_kind: 'string',
407
+ string: 'extend_from_bounded_vec out of bounds'
408
+ },
409
+ '11021520179822076911': {
410
+ error_kind: 'string',
411
+ string: 'Attempted to delete past the length of a CapsuleArray'
412
+ },
413
+ '11692359521570349358': {
414
+ error_kind: 'fmtstring',
415
+ length: 40,
416
+ item_types: []
417
+ },
418
+ '12327971061804302172': {
419
+ error_kind: 'fmtstring',
420
+ length: 98,
421
+ item_types: []
422
+ },
423
+ '12469291177396340830': {
424
+ error_kind: 'string',
425
+ string: 'call to assert_max_bit_size'
426
+ },
427
+ '12913276134398371456': {
428
+ error_kind: 'string',
429
+ string: 'push out of bounds'
430
+ },
431
+ '13557316507370296400': {
432
+ error_kind: 'fmtstring',
433
+ length: 130,
434
+ item_types: [
435
+ {
436
+ kind: 'integer',
437
+ sign: 'unsigned',
438
+ width: 32
439
+ }
440
+ ]
441
+ },
442
+ '14938672389828944159': {
443
+ error_kind: 'fmtstring',
444
+ length: 146,
445
+ item_types: [
446
+ {
447
+ kind: 'integer',
448
+ sign: 'unsigned',
449
+ width: 32
450
+ }
451
+ ]
452
+ },
453
+ '14990209321349310352': {
454
+ error_kind: 'string',
455
+ string: 'attempt to add with overflow'
456
+ },
457
+ '15764276373176857197': {
458
+ error_kind: 'string',
459
+ string: 'Stack too deep'
460
+ },
461
+ '16431471497789672479': {
462
+ error_kind: 'string',
463
+ string: 'Index out of bounds'
464
+ },
465
+ '17531474008201752295': {
466
+ error_kind: 'fmtstring',
467
+ length: 133,
468
+ item_types: [
469
+ {
470
+ kind: 'integer',
471
+ sign: 'unsigned',
472
+ width: 32
473
+ }
474
+ ]
475
+ }
476
+ }
477
+ },
478
+ bytecode: Buffer.from([]),
479
+ debugSymbols: ''
480
+ }
481
+ ],
482
+ nonDispatchPublicFunctions: [
483
+ {
484
+ functionType: FunctionType.PUBLIC,
485
+ name: 'check_block_number',
486
+ isOnlySelf: false,
487
+ isStatic: true,
488
+ isInitializer: false,
489
+ parameters: [
490
+ {
491
+ name: 'operation',
492
+ type: {
493
+ kind: 'integer',
494
+ sign: 'unsigned',
495
+ width: 8
496
+ },
497
+ visibility: 'private'
498
+ },
499
+ {
500
+ name: 'value',
501
+ type: {
502
+ kind: 'integer',
503
+ sign: 'unsigned',
504
+ width: 32
505
+ },
506
+ visibility: 'private'
507
+ }
508
+ ],
509
+ returnTypes: [],
510
+ errorTypes: {
511
+ '3445904810750103705': {
512
+ error_kind: 'string',
513
+ string: 'Block number mismatch.'
514
+ },
515
+ '7259463707251703666': {
516
+ error_kind: 'string',
517
+ string: 'Function check_block_number can only be called statically'
518
+ },
519
+ '15015303112667403944': {
520
+ error_kind: 'fmtstring',
521
+ length: 17,
522
+ item_types: []
523
+ },
524
+ '15764276373176857197': {
525
+ error_kind: 'string',
526
+ string: 'Stack too deep'
527
+ }
528
+ }
529
+ },
530
+ {
531
+ functionType: FunctionType.PUBLIC,
532
+ name: 'check_timestamp',
533
+ isOnlySelf: false,
534
+ isStatic: true,
535
+ isInitializer: false,
536
+ parameters: [
537
+ {
538
+ name: 'operation',
539
+ type: {
540
+ kind: 'integer',
541
+ sign: 'unsigned',
542
+ width: 8
543
+ },
544
+ visibility: 'private'
545
+ },
546
+ {
547
+ name: 'value',
548
+ type: {
549
+ kind: 'integer',
550
+ sign: 'unsigned',
551
+ width: 64
552
+ },
553
+ visibility: 'private'
554
+ }
555
+ ],
556
+ returnTypes: [],
557
+ errorTypes: {
558
+ '6989792215391248978': {
559
+ error_kind: 'string',
560
+ string: 'Function check_timestamp can only be called statically'
561
+ },
562
+ '13950240626967988787': {
563
+ error_kind: 'string',
564
+ string: 'Timestamp mismatch.'
565
+ },
566
+ '15015303112667403944': {
567
+ error_kind: 'fmtstring',
568
+ length: 17,
569
+ item_types: []
570
+ },
571
+ '15764276373176857197': {
572
+ error_kind: 'string',
573
+ string: 'Stack too deep'
574
+ }
575
+ }
576
+ }
577
+ ],
578
+ outputs: {
579
+ structs: {},
580
+ globals: {}
581
+ },
582
+ storageLayout: {},
583
+ fileMap: {}
584
+ };
585
+ export class PublicChecksContract extends ContractBase {
586
+ constructor(wallet){
587
+ super(ProtocolContractAddress.PublicChecks, PublicChecksContractArtifact, wallet);
588
+ }
589
+ static at(wallet) {
590
+ return new PublicChecksContract(wallet);
591
+ }
592
+ }
@@ -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"}
@@ -5,7 +5,7 @@ import { ProtocolContractAddress } from '@aztec/protocol-contracts';
5
5
  import { FunctionSelector, FunctionType, bufferAsFields } from '@aztec/stdlib/abi';
6
6
  import { computeVerificationKeyHash, createPrivateFunctionMembershipProof, createUtilityFunctionMembershipProof, getContractClassFromArtifact } from '@aztec/stdlib/contract';
7
7
  import { Capsule } from '@aztec/stdlib/tx';
8
- import { getClassRegistryContract } from '../contract/protocol_contracts.js';
8
+ import { ContractClassRegistryContract } from '../contract/protocol_contracts/contract-class-registry.js';
9
9
  /**
10
10
  * Sets up a call to broadcast a private function's bytecode via the ClassRegistry contract.
11
11
  * Note that this is not required for users to call the function, but is rather a convenience to make
@@ -27,7 +27,7 @@ import { getClassRegistryContract } from '../contract/protocol_contracts.js';
27
27
  }
28
28
  const { artifactTreeSiblingPath, artifactTreeLeafIndex, artifactMetadataHash, functionMetadataHash, utilityFunctionsTreeRoot, privateFunctionTreeSiblingPath, privateFunctionTreeLeafIndex } = await createPrivateFunctionMembershipProof(selector, artifact);
29
29
  const vkHash = await computeVerificationKeyHash(privateFunctionArtifact);
30
- const classRegistry = await getClassRegistryContract(wallet);
30
+ const classRegistry = ContractClassRegistryContract.at(wallet);
31
31
  const bytecode = bufferAsFields(privateFunctionArtifact.bytecode, MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS);
32
32
  return classRegistry.methods.broadcast_private_function(contractClass.id, artifactMetadataHash, utilityFunctionsTreeRoot, privateFunctionTreeSiblingPath, privateFunctionTreeLeafIndex, padArrayEnd(artifactTreeSiblingPath, Fr.ZERO, ARTIFACT_FUNCTION_TREE_MAX_HEIGHT), artifactTreeLeafIndex, // eslint-disable-next-line camelcase
33
33
  {
@@ -60,7 +60,7 @@ import { getClassRegistryContract } from '../contract/protocol_contracts.js';
60
60
  throw new Error(`Utility function with selector ${selector.toString()} not found`);
61
61
  }
62
62
  const { artifactMetadataHash, artifactTreeLeafIndex, artifactTreeSiblingPath, functionMetadataHash, privateFunctionsArtifactTreeRoot } = await createUtilityFunctionMembershipProof(selector, artifact);
63
- const classRegistry = await getClassRegistryContract(wallet);
63
+ const classRegistry = ContractClassRegistryContract.at(wallet);
64
64
  const bytecode = bufferAsFields(utilityFunctionArtifact.bytecode, MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS);
65
65
  return classRegistry.methods.broadcast_utility_function(contractClass.id, artifactMetadataHash, privateFunctionsArtifactTreeRoot, padArrayEnd(artifactTreeSiblingPath, Fr.ZERO, ARTIFACT_FUNCTION_TREE_MAX_HEIGHT), artifactTreeLeafIndex, // eslint-disable-next-line camelcase
66
66
  {
@@ -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"}