@aztec/aztec.js 0.0.1-commit.e61ad554 → 0.0.1-commit.ec5f612

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 (92) hide show
  1. package/dest/api/contract.d.ts +2 -2
  2. package/dest/api/contract.js +2 -2
  3. package/dest/api/deployment.d.ts +1 -2
  4. package/dest/api/deployment.d.ts.map +1 -1
  5. package/dest/api/deployment.js +0 -1
  6. package/dest/api/events.d.ts +10 -6
  7. package/dest/api/events.d.ts.map +1 -1
  8. package/dest/api/events.js +30 -20
  9. package/dest/api/fields.d.ts +2 -1
  10. package/dest/api/fields.d.ts.map +1 -1
  11. package/dest/api/fields.js +1 -0
  12. package/dest/api/keys.d.ts +1 -1
  13. package/dest/api/keys.js +1 -1
  14. package/dest/api/wallet.d.ts +3 -2
  15. package/dest/api/wallet.d.ts.map +1 -1
  16. package/dest/api/wallet.js +2 -1
  17. package/dest/contract/batch_call.d.ts +3 -3
  18. package/dest/contract/batch_call.d.ts.map +1 -1
  19. package/dest/contract/batch_call.js +8 -5
  20. package/dest/contract/contract_function_interaction.d.ts +3 -12
  21. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  22. package/dest/contract/contract_function_interaction.js +10 -7
  23. package/dest/contract/deploy_method.d.ts +19 -6
  24. package/dest/contract/deploy_method.d.ts.map +1 -1
  25. package/dest/contract/deploy_method.js +25 -10
  26. package/dest/contract/get_gas_limits.js +3 -3
  27. package/dest/contract/interaction_options.d.ts +8 -1
  28. package/dest/contract/interaction_options.d.ts.map +1 -1
  29. package/dest/contract/protocol_contracts/auth-registry.d.ts +1 -1
  30. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -1
  31. package/dest/contract/protocol_contracts/auth-registry.js +40 -6
  32. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +2 -22
  33. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -1
  34. package/dest/contract/protocol_contracts/contract-class-registry.js +13 -658
  35. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +2 -11
  36. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -1
  37. package/dest/contract/protocol_contracts/contract-instance-registry.js +80 -473
  38. package/dest/contract/protocol_contracts/fee-juice.d.ts +1 -10
  39. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -1
  40. package/dest/contract/protocol_contracts/fee-juice.js +0 -401
  41. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +1 -1
  42. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -1
  43. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +31 -1
  44. package/dest/contract/protocol_contracts/public-checks.d.ts +1 -1
  45. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -1
  46. package/dest/contract/protocol_contracts/public-checks.js +31 -9
  47. package/dest/fee/fee_juice_payment_method_with_claim.js +6 -6
  48. package/dest/fee/private_fee_payment_method.js +10 -10
  49. package/dest/fee/public_fee_payment_method.js +10 -10
  50. package/dest/fee/sponsored_fee_payment.js +3 -3
  51. package/dest/wallet/capabilities.d.ts +452 -0
  52. package/dest/wallet/capabilities.d.ts.map +1 -0
  53. package/dest/wallet/capabilities.js +3 -0
  54. package/dest/wallet/deploy_account_method.d.ts +15 -4
  55. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  56. package/dest/wallet/deploy_account_method.js +26 -0
  57. package/dest/wallet/index.d.ts +2 -1
  58. package/dest/wallet/index.d.ts.map +1 -1
  59. package/dest/wallet/index.js +1 -0
  60. package/dest/wallet/wallet.d.ts +1590 -89
  61. package/dest/wallet/wallet.d.ts.map +1 -1
  62. package/dest/wallet/wallet.js +154 -25
  63. package/package.json +20 -11
  64. package/src/api/contract.ts +2 -2
  65. package/src/api/deployment.ts +0 -1
  66. package/src/api/events.ts +35 -27
  67. package/src/api/fields.ts +1 -0
  68. package/src/api/keys.ts +2 -2
  69. package/src/api/wallet.ts +43 -1
  70. package/src/contract/batch_call.ts +7 -12
  71. package/src/contract/contract_function_interaction.ts +17 -7
  72. package/src/contract/deploy_method.ts +48 -14
  73. package/src/contract/get_gas_limits.ts +3 -3
  74. package/src/contract/interaction_options.ts +7 -0
  75. package/src/contract/protocol_contracts/auth-registry.ts +8 -2
  76. package/src/contract/protocol_contracts/contract-class-registry.ts +4 -338
  77. package/src/contract/protocol_contracts/contract-instance-registry.ts +34 -225
  78. package/src/contract/protocol_contracts/fee-juice.ts +0 -193
  79. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +6 -1
  80. package/src/contract/protocol_contracts/public-checks.ts +6 -3
  81. package/src/fee/fee_juice_payment_method_with_claim.ts +5 -5
  82. package/src/fee/private_fee_payment_method.ts +7 -7
  83. package/src/fee/public_fee_payment_method.ts +8 -8
  84. package/src/fee/sponsored_fee_payment.ts +3 -3
  85. package/src/wallet/capabilities.ts +500 -0
  86. package/src/wallet/deploy_account_method.ts +39 -2
  87. package/src/wallet/index.ts +1 -0
  88. package/src/wallet/wallet.ts +205 -39
  89. package/dest/deployment/broadcast_function.d.ts +0 -24
  90. package/dest/deployment/broadcast_function.d.ts.map +0 -1
  91. package/dest/deployment/broadcast_function.js +0 -74
  92. package/src/deployment/broadcast_function.ts +0 -148
@@ -4,266 +4,6 @@ import { ContractBase } from '../contract_base.js';
4
4
  const ContractClassRegistryContractArtifact = {
5
5
  name: 'ContractClassRegistry',
6
6
  functions: [
7
- {
8
- ...{
9
- functionType: FunctionType.PRIVATE,
10
- name: 'broadcast_private_function',
11
- isOnlySelf: false,
12
- isStatic: false,
13
- isInitializer: false,
14
- parameters: [
15
- {
16
- name: 'contract_class_id',
17
- type: {
18
- kind: 'struct',
19
- fields: [
20
- {
21
- name: 'inner',
22
- type: {
23
- kind: 'field'
24
- }
25
- }
26
- ],
27
- path: 'aztec::protocol_types::contract_class_id::ContractClassId'
28
- },
29
- visibility: 'private'
30
- },
31
- {
32
- name: 'artifact_metadata_hash',
33
- type: {
34
- kind: 'field'
35
- },
36
- visibility: 'private'
37
- },
38
- {
39
- name: 'utility_functions_artifact_tree_root',
40
- type: {
41
- kind: 'field'
42
- },
43
- visibility: 'private'
44
- },
45
- {
46
- name: 'private_function_tree_sibling_path',
47
- type: {
48
- kind: 'array',
49
- length: 7,
50
- type: {
51
- kind: 'field'
52
- }
53
- },
54
- visibility: 'private'
55
- },
56
- {
57
- name: 'private_function_tree_leaf_index',
58
- type: {
59
- kind: 'field'
60
- },
61
- visibility: 'private'
62
- },
63
- {
64
- name: 'artifact_function_tree_sibling_path',
65
- type: {
66
- kind: 'array',
67
- length: 7,
68
- type: {
69
- kind: 'field'
70
- }
71
- },
72
- visibility: 'private'
73
- },
74
- {
75
- name: 'artifact_function_tree_leaf_index',
76
- type: {
77
- kind: 'field'
78
- },
79
- visibility: 'private'
80
- },
81
- {
82
- name: 'function_data',
83
- type: {
84
- kind: 'struct',
85
- fields: [
86
- {
87
- name: 'selector',
88
- type: {
89
- kind: 'struct',
90
- fields: [
91
- {
92
- name: 'inner',
93
- type: {
94
- kind: 'integer',
95
- sign: 'unsigned',
96
- width: 32
97
- }
98
- }
99
- ],
100
- path: 'aztec::protocol_types::abis::function_selector::FunctionSelector'
101
- }
102
- },
103
- {
104
- name: 'metadata_hash',
105
- type: {
106
- kind: 'field'
107
- }
108
- },
109
- {
110
- name: 'vk_hash',
111
- type: {
112
- kind: 'field'
113
- }
114
- }
115
- ],
116
- path: 'events::private_function_broadcasted::InnerPrivateFunction'
117
- },
118
- visibility: 'private'
119
- }
120
- ],
121
- returnTypes: [],
122
- errorTypes: {
123
- '1998584279744703196': {
124
- error_kind: 'string',
125
- string: 'attempt to subtract with overflow'
126
- },
127
- '2754040237334517471': {
128
- error_kind: 'fmtstring',
129
- length: 92,
130
- item_types: []
131
- },
132
- '14990209321349310352': {
133
- error_kind: 'string',
134
- string: 'attempt to add with overflow'
135
- },
136
- '15764276373176857197': {
137
- error_kind: 'string',
138
- string: 'Stack too deep'
139
- },
140
- '16431471497789672479': {
141
- error_kind: 'string',
142
- string: 'Index out of bounds'
143
- }
144
- }
145
- },
146
- bytecode: Buffer.from([]),
147
- debugSymbols: ''
148
- },
149
- {
150
- ...{
151
- functionType: FunctionType.PRIVATE,
152
- name: 'broadcast_utility_function',
153
- isOnlySelf: false,
154
- isStatic: false,
155
- isInitializer: false,
156
- parameters: [
157
- {
158
- name: 'contract_class_id',
159
- type: {
160
- kind: 'struct',
161
- fields: [
162
- {
163
- name: 'inner',
164
- type: {
165
- kind: 'field'
166
- }
167
- }
168
- ],
169
- path: 'aztec::protocol_types::contract_class_id::ContractClassId'
170
- },
171
- visibility: 'private'
172
- },
173
- {
174
- name: 'artifact_metadata_hash',
175
- type: {
176
- kind: 'field'
177
- },
178
- visibility: 'private'
179
- },
180
- {
181
- name: 'private_functions_artifact_tree_root',
182
- type: {
183
- kind: 'field'
184
- },
185
- visibility: 'private'
186
- },
187
- {
188
- name: 'artifact_function_tree_sibling_path',
189
- type: {
190
- kind: 'array',
191
- length: 7,
192
- type: {
193
- kind: 'field'
194
- }
195
- },
196
- visibility: 'private'
197
- },
198
- {
199
- name: 'artifact_function_tree_leaf_index',
200
- type: {
201
- kind: 'field'
202
- },
203
- visibility: 'private'
204
- },
205
- {
206
- name: 'function_data',
207
- type: {
208
- kind: 'struct',
209
- fields: [
210
- {
211
- name: 'selector',
212
- type: {
213
- kind: 'struct',
214
- fields: [
215
- {
216
- name: 'inner',
217
- type: {
218
- kind: 'integer',
219
- sign: 'unsigned',
220
- width: 32
221
- }
222
- }
223
- ],
224
- path: 'aztec::protocol_types::abis::function_selector::FunctionSelector'
225
- }
226
- },
227
- {
228
- name: 'metadata_hash',
229
- type: {
230
- kind: 'field'
231
- }
232
- }
233
- ],
234
- path: 'events::utility_function_broadcasted::InnerUtilityFunction'
235
- },
236
- visibility: 'private'
237
- }
238
- ],
239
- returnTypes: [],
240
- errorTypes: {
241
- '1998584279744703196': {
242
- error_kind: 'string',
243
- string: 'attempt to subtract with overflow'
244
- },
245
- '2754040237334517471': {
246
- error_kind: 'fmtstring',
247
- length: 92,
248
- item_types: []
249
- },
250
- '14990209321349310352': {
251
- error_kind: 'string',
252
- string: 'attempt to add with overflow'
253
- },
254
- '15764276373176857197': {
255
- error_kind: 'string',
256
- string: 'Stack too deep'
257
- },
258
- '16431471497789672479': {
259
- error_kind: 'string',
260
- string: 'Index out of bounds'
261
- }
262
- }
263
- },
264
- bytecode: Buffer.from([]),
265
- debugSymbols: ''
266
- },
267
7
  {
268
8
  ...{
269
9
  functionType: FunctionType.PRIVATE,
@@ -308,15 +48,18 @@ const ContractClassRegistryContractArtifact = {
308
48
  error_kind: 'string',
309
49
  string: 'attempt to subtract with overflow'
310
50
  },
311
- '2754040237334517471': {
312
- error_kind: 'fmtstring',
313
- length: 92,
314
- item_types: []
51
+ '9475115977882098926': {
52
+ error_kind: 'string',
53
+ string: 'Extra bytes in the last field of the bytecode'
315
54
  },
316
55
  '10965409165809799877': {
317
56
  error_kind: 'string',
318
57
  string: 'Given in_len to absorb is larger than the input array len'
319
58
  },
59
+ '12469291177396340830': {
60
+ error_kind: 'string',
61
+ string: 'call to assert_max_bit_size'
62
+ },
320
63
  '14990209321349310352': {
321
64
  error_kind: 'string',
322
65
  string: 'attempt to add with overflow'
@@ -329,409 +72,21 @@ const ContractClassRegistryContractArtifact = {
329
72
  error_kind: 'string',
330
73
  string: 'Stack too deep'
331
74
  },
332
- '16431471497789672479': {
333
- error_kind: 'string',
334
- string: 'Index out of bounds'
335
- },
336
- '16450579948625159707': {
75
+ '15835548349546956319': {
337
76
  error_kind: 'string',
338
- string: 'Sponge must be in cache_size=1'
339
- }
340
- }
341
- },
342
- bytecode: Buffer.from([]),
343
- debugSymbols: ''
344
- },
345
- {
346
- ...{
347
- functionType: FunctionType.UTILITY,
348
- name: 'process_message',
349
- isOnlySelf: false,
350
- isStatic: false,
351
- isInitializer: false,
352
- parameters: [
353
- {
354
- name: 'message_ciphertext',
355
- type: {
356
- kind: 'struct',
357
- fields: [
358
- {
359
- name: 'storage',
360
- type: {
361
- kind: 'array',
362
- length: 17,
363
- type: {
364
- kind: 'field'
365
- }
366
- }
367
- },
368
- {
369
- name: 'len',
370
- type: {
371
- kind: 'integer',
372
- sign: 'unsigned',
373
- width: 32
374
- }
375
- }
376
- ],
377
- path: 'std::collections::bounded_vec::BoundedVec'
378
- },
379
- visibility: 'private'
380
- },
381
- {
382
- name: 'message_context',
383
- type: {
384
- kind: 'struct',
385
- fields: [
386
- {
387
- name: 'tx_hash',
388
- type: {
389
- kind: 'field'
390
- }
391
- },
392
- {
393
- name: 'unique_note_hashes_in_tx',
394
- type: {
395
- kind: 'struct',
396
- fields: [
397
- {
398
- name: 'storage',
399
- type: {
400
- kind: 'array',
401
- length: 64,
402
- type: {
403
- kind: 'field'
404
- }
405
- }
406
- },
407
- {
408
- name: 'len',
409
- type: {
410
- kind: 'integer',
411
- sign: 'unsigned',
412
- width: 32
413
- }
414
- }
415
- ],
416
- path: 'std::collections::bounded_vec::BoundedVec'
417
- }
418
- },
419
- {
420
- name: 'first_nullifier_in_tx',
421
- type: {
422
- kind: 'field'
423
- }
424
- },
425
- {
426
- name: 'recipient',
427
- type: {
428
- kind: 'struct',
429
- fields: [
430
- {
431
- name: 'inner',
432
- type: {
433
- kind: 'field'
434
- }
435
- }
436
- ],
437
- path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
438
- }
439
- }
440
- ],
441
- path: 'aztec::messages::processing::message_context::MessageContext'
442
- },
443
- visibility: 'private'
444
- }
445
- ],
446
- returnTypes: [],
447
- errorTypes: {
448
- '361444214588792908': {
449
- error_kind: 'string',
450
- string: 'attempt to multiply with overflow'
451
- },
452
- '992401946138144806': {
453
- error_kind: 'string',
454
- string: 'Attempted to read past end of BoundedVec'
455
- },
456
- '1998584279744703196': {
457
- error_kind: 'string',
458
- string: 'attempt to subtract with overflow'
459
- },
460
- '2967937905572420042': {
461
- error_kind: 'fmtstring',
462
- length: 61,
463
- item_types: [
464
- {
465
- kind: 'field'
466
- },
467
- {
468
- kind: 'field'
469
- }
470
- ]
471
- },
472
- '3330370348214585450': {
473
- error_kind: 'fmtstring',
474
- length: 48,
475
- item_types: [
476
- {
477
- kind: 'field'
478
- },
479
- {
480
- kind: 'field'
481
- }
482
- ]
483
- },
484
- '3670003311596808700': {
485
- error_kind: 'fmtstring',
486
- length: 77,
487
- item_types: [
488
- {
489
- kind: 'integer',
490
- sign: 'unsigned',
491
- width: 32
492
- }
493
- ]
494
- },
495
- '4261968856572588300': {
496
- error_kind: 'string',
497
- string: 'Value does not fit in field'
498
- },
499
- '4440399188109668273': {
500
- error_kind: 'string',
501
- string: 'Input length must be a multiple of 32'
502
- },
503
- '9791669845391776238': {
504
- error_kind: 'string',
505
- string: '0 has a square root; you cannot claim it is not square'
506
- },
507
- '10135509984888824963': {
508
- error_kind: 'fmtstring',
509
- length: 58,
510
- item_types: [
511
- {
512
- kind: 'field'
513
- }
514
- ]
515
- },
516
- '10791800398362570014': {
517
- error_kind: 'string',
518
- string: 'extend_from_bounded_vec out of bounds'
519
- },
520
- '11692359521570349358': {
521
- error_kind: 'fmtstring',
522
- length: 40,
523
- item_types: []
524
- },
525
- '12469291177396340830': {
526
- error_kind: 'string',
527
- string: 'call to assert_max_bit_size'
528
- },
529
- '12913276134398371456': {
530
- error_kind: 'string',
531
- string: 'push out of bounds'
532
- },
533
- '13557316507370296400': {
534
- error_kind: 'fmtstring',
535
- length: 130,
536
- item_types: [
537
- {
538
- kind: 'integer',
539
- sign: 'unsigned',
540
- width: 32
541
- }
542
- ]
543
- },
544
- '14938672389828944159': {
545
- error_kind: 'fmtstring',
546
- length: 146,
547
- item_types: [
548
- {
549
- kind: 'integer',
550
- sign: 'unsigned',
551
- width: 32
552
- }
553
- ]
554
- },
555
- '14990209321349310352': {
556
- error_kind: 'string',
557
- string: 'attempt to add with overflow'
558
- },
559
- '15764276373176857197': {
560
- error_kind: 'string',
561
- string: 'Stack too deep'
77
+ string: 'Field failed to decompose into specified 32 limbs'
562
78
  },
563
79
  '16431471497789672479': {
564
80
  error_kind: 'string',
565
81
  string: 'Index out of bounds'
566
82
  },
567
- '17531474008201752295': {
568
- error_kind: 'fmtstring',
569
- length: 133,
570
- item_types: [
571
- {
572
- kind: 'integer',
573
- sign: 'unsigned',
574
- width: 32
575
- }
576
- ]
577
- }
578
- }
579
- },
580
- bytecode: Buffer.from([]),
581
- debugSymbols: ''
582
- },
583
- {
584
- ...{
585
- functionType: FunctionType.UTILITY,
586
- name: 'sync_state',
587
- isOnlySelf: false,
588
- isStatic: false,
589
- isInitializer: false,
590
- parameters: [],
591
- returnTypes: [],
592
- errorTypes: {
593
- '361444214588792908': {
594
- error_kind: 'string',
595
- string: 'attempt to multiply with overflow'
596
- },
597
- '992401946138144806': {
598
- error_kind: 'string',
599
- string: 'Attempted to read past end of BoundedVec'
600
- },
601
- '1998584279744703196': {
602
- error_kind: 'string',
603
- string: 'attempt to subtract with overflow'
604
- },
605
- '2967937905572420042': {
606
- error_kind: 'fmtstring',
607
- length: 61,
608
- item_types: [
609
- {
610
- kind: 'field'
611
- },
612
- {
613
- kind: 'field'
614
- }
615
- ]
616
- },
617
- '3330370348214585450': {
618
- error_kind: 'fmtstring',
619
- length: 48,
620
- item_types: [
621
- {
622
- kind: 'field'
623
- },
624
- {
625
- kind: 'field'
626
- }
627
- ]
628
- },
629
- '3670003311596808700': {
630
- error_kind: 'fmtstring',
631
- length: 77,
632
- item_types: [
633
- {
634
- kind: 'integer',
635
- sign: 'unsigned',
636
- width: 32
637
- }
638
- ]
639
- },
640
- '4261968856572588300': {
641
- error_kind: 'string',
642
- string: 'Value does not fit in field'
643
- },
644
- '4440399188109668273': {
645
- error_kind: 'string',
646
- string: 'Input length must be a multiple of 32'
647
- },
648
- '9791669845391776238': {
649
- error_kind: 'string',
650
- string: '0 has a square root; you cannot claim it is not square'
651
- },
652
- '9885968605480832328': {
653
- error_kind: 'string',
654
- string: 'Attempted to read past the length of a CapsuleArray'
655
- },
656
- '10135509984888824963': {
657
- error_kind: 'fmtstring',
658
- length: 58,
659
- item_types: [
660
- {
661
- kind: 'field'
662
- }
663
- ]
664
- },
665
- '10791800398362570014': {
666
- error_kind: 'string',
667
- string: 'extend_from_bounded_vec out of bounds'
668
- },
669
- '11021520179822076911': {
670
- error_kind: 'string',
671
- string: 'Attempted to delete past the length of a CapsuleArray'
672
- },
673
- '11692359521570349358': {
674
- error_kind: 'fmtstring',
675
- length: 40,
676
- item_types: []
677
- },
678
- '12327971061804302172': {
679
- error_kind: 'fmtstring',
680
- length: 98,
681
- item_types: []
682
- },
683
- '12469291177396340830': {
684
- error_kind: 'string',
685
- string: 'call to assert_max_bit_size'
686
- },
687
- '12913276134398371456': {
688
- error_kind: 'string',
689
- string: 'push out of bounds'
690
- },
691
- '13557316507370296400': {
692
- error_kind: 'fmtstring',
693
- length: 130,
694
- item_types: [
695
- {
696
- kind: 'integer',
697
- sign: 'unsigned',
698
- width: 32
699
- }
700
- ]
701
- },
702
- '14938672389828944159': {
703
- error_kind: 'fmtstring',
704
- length: 146,
705
- item_types: [
706
- {
707
- kind: 'integer',
708
- sign: 'unsigned',
709
- width: 32
710
- }
711
- ]
712
- },
713
- '14990209321349310352': {
714
- error_kind: 'string',
715
- string: 'attempt to add with overflow'
716
- },
717
- '15764276373176857197': {
83
+ '16450579948625159707': {
718
84
  error_kind: 'string',
719
- string: 'Stack too deep'
85
+ string: 'Sponge must be in cache_size=1'
720
86
  },
721
- '16431471497789672479': {
87
+ '17655676068928457687': {
722
88
  error_kind: 'string',
723
- string: 'Index out of bounds'
724
- },
725
- '17531474008201752295': {
726
- error_kind: 'fmtstring',
727
- length: 133,
728
- item_types: [
729
- {
730
- kind: 'integer',
731
- sign: 'unsigned',
732
- width: 32
733
- }
734
- ]
89
+ string: 'Reader did not read all data'
735
90
  }
736
91
  }
737
92
  },