@aztec/aztec.js 0.0.1-commit.c80b6263 → 0.0.1-commit.cf93bcc56

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 (77) 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.js +4 -1
  18. package/dest/contract/contract_function_interaction.d.ts +3 -12
  19. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  20. package/dest/contract/contract_function_interaction.js +10 -7
  21. package/dest/contract/protocol_contracts/auth-registry.d.ts +1 -10
  22. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -1
  23. package/dest/contract/protocol_contracts/auth-registry.js +61 -466
  24. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +2 -22
  25. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -1
  26. package/dest/contract/protocol_contracts/contract-class-registry.js +13 -658
  27. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +2 -11
  28. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -1
  29. package/dest/contract/protocol_contracts/contract-instance-registry.js +76 -473
  30. package/dest/contract/protocol_contracts/fee-juice.d.ts +1 -10
  31. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -1
  32. package/dest/contract/protocol_contracts/fee-juice.js +0 -401
  33. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +1 -1
  34. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -1
  35. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +23 -1
  36. package/dest/contract/protocol_contracts/public-checks.d.ts +1 -1
  37. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -1
  38. package/dest/contract/protocol_contracts/public-checks.js +23 -9
  39. package/dest/fee/fee_juice_payment_method_with_claim.js +6 -6
  40. package/dest/fee/private_fee_payment_method.js +10 -10
  41. package/dest/fee/public_fee_payment_method.js +10 -10
  42. package/dest/fee/sponsored_fee_payment.js +3 -3
  43. package/dest/wallet/capabilities.d.ts +444 -0
  44. package/dest/wallet/capabilities.d.ts.map +1 -0
  45. package/dest/wallet/capabilities.js +3 -0
  46. package/dest/wallet/index.d.ts +2 -1
  47. package/dest/wallet/index.d.ts.map +1 -1
  48. package/dest/wallet/index.js +1 -0
  49. package/dest/wallet/wallet.d.ts +1451 -88
  50. package/dest/wallet/wallet.d.ts.map +1 -1
  51. package/dest/wallet/wallet.js +145 -22
  52. package/package.json +19 -10
  53. package/src/api/contract.ts +2 -2
  54. package/src/api/deployment.ts +0 -1
  55. package/src/api/events.ts +35 -27
  56. package/src/api/fields.ts +1 -0
  57. package/src/api/keys.ts +2 -2
  58. package/src/api/wallet.ts +43 -1
  59. package/src/contract/batch_call.ts +1 -1
  60. package/src/contract/contract_function_interaction.ts +17 -7
  61. package/src/contract/protocol_contracts/auth-registry.ts +37 -231
  62. package/src/contract/protocol_contracts/contract-class-registry.ts +4 -338
  63. package/src/contract/protocol_contracts/contract-instance-registry.ts +33 -225
  64. package/src/contract/protocol_contracts/fee-juice.ts +0 -193
  65. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +4 -1
  66. package/src/contract/protocol_contracts/public-checks.ts +4 -3
  67. package/src/fee/fee_juice_payment_method_with_claim.ts +5 -5
  68. package/src/fee/private_fee_payment_method.ts +7 -7
  69. package/src/fee/public_fee_payment_method.ts +8 -8
  70. package/src/fee/sponsored_fee_payment.ts +3 -3
  71. package/src/wallet/capabilities.ts +491 -0
  72. package/src/wallet/index.ts +1 -0
  73. package/src/wallet/wallet.ts +198 -35
  74. package/dest/deployment/broadcast_function.d.ts +0 -24
  75. package/dest/deployment/broadcast_function.d.ts.map +0 -1
  76. package/dest/deployment/broadcast_function.js +0 -74
  77. package/src/deployment/broadcast_function.ts +0 -148
@@ -6,57 +6,54 @@ const AuthRegistryContractArtifact = {
6
6
  functions: [
7
7
  {
8
8
  ...{
9
- functionType: FunctionType.PRIVATE,
10
- name: 'set_authorized_private',
9
+ functionType: FunctionType.PUBLIC,
10
+ name: 'public_dispatch',
11
11
  isOnlySelf: false,
12
12
  isStatic: false,
13
13
  isInitializer: false,
14
14
  parameters: [
15
15
  {
16
- name: 'approver',
17
- type: {
18
- kind: 'struct',
19
- fields: [
20
- {
21
- name: 'inner',
22
- type: {
23
- kind: 'field'
24
- }
25
- }
26
- ],
27
- path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
28
- },
29
- visibility: 'private'
30
- },
31
- {
32
- name: 'message_hash',
16
+ name: 'selector',
33
17
  type: {
34
18
  kind: 'field'
35
19
  },
36
20
  visibility: 'private'
37
- },
38
- {
39
- name: 'authorize',
40
- type: {
41
- kind: 'boolean'
42
- },
43
- visibility: 'private'
44
21
  }
45
22
  ],
46
23
  returnTypes: [],
47
24
  errorTypes: {
48
- '2754040237334517471': {
25
+ '361444214588792908': {
26
+ error_kind: 'string',
27
+ string: 'attempt to multiply with overflow'
28
+ },
29
+ '1998584279744703196': {
30
+ error_kind: 'string',
31
+ string: 'attempt to subtract with overflow'
32
+ },
33
+ '5525725861591553972': {
34
+ error_kind: 'string',
35
+ string: 'rejecting all'
36
+ },
37
+ '11691217184967371519': {
38
+ error_kind: 'string',
39
+ string: 'Function is_reject_all can only be called statically'
40
+ },
41
+ '12511970388699677811': {
49
42
  error_kind: 'fmtstring',
50
- length: 92,
51
- item_types: []
43
+ length: 27,
44
+ item_types: [
45
+ {
46
+ kind: 'field'
47
+ }
48
+ ]
52
49
  },
53
- '7555607922535724711': {
50
+ '13455385521185560676': {
54
51
  error_kind: 'string',
55
- string: 'Preimage mismatch'
52
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
56
53
  },
57
- '9894212961085021188': {
54
+ '13929691561421487185': {
58
55
  error_kind: 'string',
59
- string: 'Message not authorized by account'
56
+ string: 'Function _set_authorized can only be called by the same contract'
60
57
  },
61
58
  '14990209321349310352': {
62
59
  error_kind: 'string',
@@ -69,6 +66,14 @@ const AuthRegistryContractArtifact = {
69
66
  '16431471497789672479': {
70
67
  error_kind: 'string',
71
68
  string: 'Index out of bounds'
69
+ },
70
+ '17089945683942782951': {
71
+ error_kind: 'string',
72
+ string: 'unauthorized'
73
+ },
74
+ '17312933876399746100': {
75
+ error_kind: 'string',
76
+ string: 'Function is_consumable can only be called statically'
72
77
  }
73
78
  }
74
79
  },
@@ -77,14 +82,14 @@ const AuthRegistryContractArtifact = {
77
82
  },
78
83
  {
79
84
  ...{
80
- functionType: FunctionType.UTILITY,
81
- name: 'utility_is_consumable',
85
+ functionType: FunctionType.PRIVATE,
86
+ name: 'set_authorized_private',
82
87
  isOnlySelf: false,
83
88
  isStatic: false,
84
89
  isInitializer: false,
85
90
  parameters: [
86
91
  {
87
- name: 'on_behalf_of',
92
+ name: 'approver',
88
93
  type: {
89
94
  kind: 'struct',
90
95
  fields: [
@@ -105,25 +110,24 @@ const AuthRegistryContractArtifact = {
105
110
  kind: 'field'
106
111
  },
107
112
  visibility: 'private'
108
- }
109
- ],
110
- returnTypes: [
113
+ },
111
114
  {
112
- kind: 'boolean'
115
+ name: 'authorize',
116
+ type: {
117
+ kind: 'boolean'
118
+ },
119
+ visibility: 'private'
113
120
  }
114
121
  ],
122
+ returnTypes: [],
115
123
  errorTypes: {
116
- '361444214588792908': {
117
- error_kind: 'string',
118
- string: 'attempt to multiply with overflow'
119
- },
120
- '1998584279744703196': {
124
+ '7555607922535724711': {
121
125
  error_kind: 'string',
122
- string: 'attempt to subtract with overflow'
126
+ string: 'Preimage mismatch'
123
127
  },
124
- '13455385521185560676': {
128
+ '9894212961085021188': {
125
129
  error_kind: 'string',
126
- string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
130
+ string: 'Message not authorized by account'
127
131
  },
128
132
  '14990209321349310352': {
129
133
  error_kind: 'string',
@@ -132,10 +136,6 @@ const AuthRegistryContractArtifact = {
132
136
  '15764276373176857197': {
133
137
  error_kind: 'string',
134
138
  string: 'Stack too deep'
135
- },
136
- '16431471497789672479': {
137
- error_kind: 'string',
138
- string: 'Index out of bounds'
139
139
  }
140
140
  }
141
141
  },
@@ -145,258 +145,40 @@ const AuthRegistryContractArtifact = {
145
145
  {
146
146
  ...{
147
147
  functionType: FunctionType.UTILITY,
148
- name: 'process_message',
148
+ name: 'utility_is_consumable',
149
149
  isOnlySelf: false,
150
150
  isStatic: false,
151
151
  isInitializer: false,
152
152
  parameters: [
153
153
  {
154
- name: 'message_ciphertext',
154
+ name: 'on_behalf_of',
155
155
  type: {
156
156
  kind: 'struct',
157
157
  fields: [
158
158
  {
159
- name: 'storage',
160
- type: {
161
- kind: 'array',
162
- length: 17,
163
- type: {
164
- kind: 'field'
165
- }
166
- }
167
- },
168
- {
169
- name: 'len',
159
+ name: 'inner',
170
160
  type: {
171
- kind: 'integer',
172
- sign: 'unsigned',
173
- width: 32
161
+ kind: 'field'
174
162
  }
175
163
  }
176
164
  ],
177
- path: 'std::collections::bounded_vec::BoundedVec'
165
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
178
166
  },
179
167
  visibility: 'private'
180
168
  },
181
169
  {
182
- name: 'message_context',
170
+ name: 'message_hash',
183
171
  type: {
184
- kind: 'struct',
185
- fields: [
186
- {
187
- name: 'tx_hash',
188
- type: {
189
- kind: 'field'
190
- }
191
- },
192
- {
193
- name: 'unique_note_hashes_in_tx',
194
- type: {
195
- kind: 'struct',
196
- fields: [
197
- {
198
- name: 'storage',
199
- type: {
200
- kind: 'array',
201
- length: 64,
202
- type: {
203
- kind: 'field'
204
- }
205
- }
206
- },
207
- {
208
- name: 'len',
209
- type: {
210
- kind: 'integer',
211
- sign: 'unsigned',
212
- width: 32
213
- }
214
- }
215
- ],
216
- path: 'std::collections::bounded_vec::BoundedVec'
217
- }
218
- },
219
- {
220
- name: 'first_nullifier_in_tx',
221
- type: {
222
- kind: 'field'
223
- }
224
- },
225
- {
226
- name: 'recipient',
227
- type: {
228
- kind: 'struct',
229
- fields: [
230
- {
231
- name: 'inner',
232
- type: {
233
- kind: 'field'
234
- }
235
- }
236
- ],
237
- path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
238
- }
239
- }
240
- ],
241
- path: 'aztec::messages::processing::message_context::MessageContext'
172
+ kind: 'field'
242
173
  },
243
174
  visibility: 'private'
244
175
  }
245
176
  ],
246
- returnTypes: [],
247
- errorTypes: {
248
- '361444214588792908': {
249
- error_kind: 'string',
250
- string: 'attempt to multiply with overflow'
251
- },
252
- '992401946138144806': {
253
- error_kind: 'string',
254
- string: 'Attempted to read past end of BoundedVec'
255
- },
256
- '1998584279744703196': {
257
- error_kind: 'string',
258
- string: 'attempt to subtract with overflow'
259
- },
260
- '2967937905572420042': {
261
- error_kind: 'fmtstring',
262
- length: 61,
263
- item_types: [
264
- {
265
- kind: 'field'
266
- },
267
- {
268
- kind: 'field'
269
- }
270
- ]
271
- },
272
- '3330370348214585450': {
273
- error_kind: 'fmtstring',
274
- length: 48,
275
- item_types: [
276
- {
277
- kind: 'field'
278
- },
279
- {
280
- kind: 'field'
281
- }
282
- ]
283
- },
284
- '3670003311596808700': {
285
- error_kind: 'fmtstring',
286
- length: 77,
287
- item_types: [
288
- {
289
- kind: 'integer',
290
- sign: 'unsigned',
291
- width: 32
292
- }
293
- ]
294
- },
295
- '4261968856572588300': {
296
- error_kind: 'string',
297
- string: 'Value does not fit in field'
298
- },
299
- '4440399188109668273': {
300
- error_kind: 'string',
301
- string: 'Input length must be a multiple of 32'
302
- },
303
- '9791669845391776238': {
304
- error_kind: 'string',
305
- string: '0 has a square root; you cannot claim it is not square'
306
- },
307
- '10135509984888824963': {
308
- error_kind: 'fmtstring',
309
- length: 58,
310
- item_types: [
311
- {
312
- kind: 'field'
313
- }
314
- ]
315
- },
316
- '10791800398362570014': {
317
- error_kind: 'string',
318
- string: 'extend_from_bounded_vec out of bounds'
319
- },
320
- '11692359521570349358': {
321
- error_kind: 'fmtstring',
322
- length: 40,
323
- item_types: []
324
- },
325
- '12469291177396340830': {
326
- error_kind: 'string',
327
- string: 'call to assert_max_bit_size'
328
- },
329
- '12913276134398371456': {
330
- error_kind: 'string',
331
- string: 'push out of bounds'
332
- },
333
- '13557316507370296400': {
334
- error_kind: 'fmtstring',
335
- length: 130,
336
- item_types: [
337
- {
338
- kind: 'integer',
339
- sign: 'unsigned',
340
- width: 32
341
- }
342
- ]
343
- },
344
- '14938672389828944159': {
345
- error_kind: 'fmtstring',
346
- length: 146,
347
- item_types: [
348
- {
349
- kind: 'integer',
350
- sign: 'unsigned',
351
- width: 32
352
- }
353
- ]
354
- },
355
- '14990209321349310352': {
356
- error_kind: 'string',
357
- string: 'attempt to add with overflow'
358
- },
359
- '15764276373176857197': {
360
- error_kind: 'string',
361
- string: 'Stack too deep'
362
- },
363
- '16431471497789672479': {
364
- error_kind: 'string',
365
- string: 'Index out of bounds'
366
- },
367
- '17531474008201752295': {
368
- error_kind: 'fmtstring',
369
- length: 133,
370
- item_types: [
371
- {
372
- kind: 'integer',
373
- sign: 'unsigned',
374
- width: 32
375
- }
376
- ]
377
- }
378
- }
379
- },
380
- bytecode: Buffer.from([]),
381
- debugSymbols: ''
382
- },
383
- {
384
- ...{
385
- functionType: FunctionType.PUBLIC,
386
- name: 'public_dispatch',
387
- isOnlySelf: false,
388
- isStatic: false,
389
- isInitializer: false,
390
- parameters: [
177
+ returnTypes: [
391
178
  {
392
- name: 'selector',
393
- type: {
394
- kind: 'field'
395
- },
396
- visibility: 'private'
179
+ kind: 'boolean'
397
180
  }
398
181
  ],
399
- returnTypes: [],
400
182
  errorTypes: {
401
183
  '361444214588792908': {
402
184
  error_kind: 'string',
@@ -406,31 +188,10 @@ const AuthRegistryContractArtifact = {
406
188
  error_kind: 'string',
407
189
  string: 'attempt to subtract with overflow'
408
190
  },
409
- '5525725861591553972': {
410
- error_kind: 'string',
411
- string: 'rejecting all'
412
- },
413
- '11691217184967371519': {
414
- error_kind: 'string',
415
- string: 'Function is_reject_all can only be called statically'
416
- },
417
- '12511970388699677811': {
418
- error_kind: 'fmtstring',
419
- length: 27,
420
- item_types: [
421
- {
422
- kind: 'field'
423
- }
424
- ]
425
- },
426
191
  '13455385521185560676': {
427
192
  error_kind: 'string',
428
193
  string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
429
194
  },
430
- '13929691561421487185': {
431
- error_kind: 'string',
432
- string: 'Function _set_authorized can only be called by the same contract'
433
- },
434
195
  '14990209321349310352': {
435
196
  error_kind: 'string',
436
197
  string: 'attempt to add with overflow'
@@ -442,172 +203,6 @@ const AuthRegistryContractArtifact = {
442
203
  '16431471497789672479': {
443
204
  error_kind: 'string',
444
205
  string: 'Index out of bounds'
445
- },
446
- '17089945683942782951': {
447
- error_kind: 'string',
448
- string: 'unauthorized'
449
- },
450
- '17312933876399746100': {
451
- error_kind: 'string',
452
- string: 'Function is_consumable can only be called statically'
453
- }
454
- }
455
- },
456
- bytecode: Buffer.from([]),
457
- debugSymbols: ''
458
- },
459
- {
460
- ...{
461
- functionType: FunctionType.UTILITY,
462
- name: 'sync_state',
463
- isOnlySelf: false,
464
- isStatic: false,
465
- isInitializer: false,
466
- parameters: [],
467
- returnTypes: [],
468
- errorTypes: {
469
- '361444214588792908': {
470
- error_kind: 'string',
471
- string: 'attempt to multiply with overflow'
472
- },
473
- '992401946138144806': {
474
- error_kind: 'string',
475
- string: 'Attempted to read past end of BoundedVec'
476
- },
477
- '1998584279744703196': {
478
- error_kind: 'string',
479
- string: 'attempt to subtract with overflow'
480
- },
481
- '2967937905572420042': {
482
- error_kind: 'fmtstring',
483
- length: 61,
484
- item_types: [
485
- {
486
- kind: 'field'
487
- },
488
- {
489
- kind: 'field'
490
- }
491
- ]
492
- },
493
- '3330370348214585450': {
494
- error_kind: 'fmtstring',
495
- length: 48,
496
- item_types: [
497
- {
498
- kind: 'field'
499
- },
500
- {
501
- kind: 'field'
502
- }
503
- ]
504
- },
505
- '3670003311596808700': {
506
- error_kind: 'fmtstring',
507
- length: 77,
508
- item_types: [
509
- {
510
- kind: 'integer',
511
- sign: 'unsigned',
512
- width: 32
513
- }
514
- ]
515
- },
516
- '4261968856572588300': {
517
- error_kind: 'string',
518
- string: 'Value does not fit in field'
519
- },
520
- '4440399188109668273': {
521
- error_kind: 'string',
522
- string: 'Input length must be a multiple of 32'
523
- },
524
- '9791669845391776238': {
525
- error_kind: 'string',
526
- string: '0 has a square root; you cannot claim it is not square'
527
- },
528
- '9885968605480832328': {
529
- error_kind: 'string',
530
- string: 'Attempted to read past the length of a CapsuleArray'
531
- },
532
- '10135509984888824963': {
533
- error_kind: 'fmtstring',
534
- length: 58,
535
- item_types: [
536
- {
537
- kind: 'field'
538
- }
539
- ]
540
- },
541
- '10791800398362570014': {
542
- error_kind: 'string',
543
- string: 'extend_from_bounded_vec out of bounds'
544
- },
545
- '11021520179822076911': {
546
- error_kind: 'string',
547
- string: 'Attempted to delete past the length of a CapsuleArray'
548
- },
549
- '11692359521570349358': {
550
- error_kind: 'fmtstring',
551
- length: 40,
552
- item_types: []
553
- },
554
- '12327971061804302172': {
555
- error_kind: 'fmtstring',
556
- length: 98,
557
- item_types: []
558
- },
559
- '12469291177396340830': {
560
- error_kind: 'string',
561
- string: 'call to assert_max_bit_size'
562
- },
563
- '12913276134398371456': {
564
- error_kind: 'string',
565
- string: 'push out of bounds'
566
- },
567
- '13557316507370296400': {
568
- error_kind: 'fmtstring',
569
- length: 130,
570
- item_types: [
571
- {
572
- kind: 'integer',
573
- sign: 'unsigned',
574
- width: 32
575
- }
576
- ]
577
- },
578
- '14938672389828944159': {
579
- error_kind: 'fmtstring',
580
- length: 146,
581
- item_types: [
582
- {
583
- kind: 'integer',
584
- sign: 'unsigned',
585
- width: 32
586
- }
587
- ]
588
- },
589
- '14990209321349310352': {
590
- error_kind: 'string',
591
- string: 'attempt to add with overflow'
592
- },
593
- '15764276373176857197': {
594
- error_kind: 'string',
595
- string: 'Stack too deep'
596
- },
597
- '16431471497789672479': {
598
- error_kind: 'string',
599
- string: 'Index out of bounds'
600
- },
601
- '17531474008201752295': {
602
- error_kind: 'fmtstring',
603
- length: 133,
604
- item_types: [
605
- {
606
- kind: 'integer',
607
- sign: 'unsigned',
608
- width: 32
609
- }
610
- ]
611
206
  }
612
207
  }
613
208
  },