@aztec/aztec.js 0.0.1-commit.d431d1c → 0.0.1-commit.e3c1de76

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 (94) hide show
  1. package/dest/api/block.d.ts +2 -2
  2. package/dest/api/block.d.ts.map +1 -1
  3. package/dest/api/block.js +1 -1
  4. package/dest/api/contract.d.ts +16 -10
  5. package/dest/api/contract.d.ts.map +1 -1
  6. package/dest/api/contract.js +14 -8
  7. package/dest/api/node.d.ts +8 -4
  8. package/dest/api/node.d.ts.map +1 -1
  9. package/dest/api/node.js +7 -3
  10. package/dest/api/tx.d.ts +2 -2
  11. package/dest/api/tx.d.ts.map +1 -1
  12. package/dest/api/tx.js +1 -1
  13. package/dest/api/wallet.d.ts +3 -2
  14. package/dest/api/wallet.d.ts.map +1 -1
  15. package/dest/api/wallet.js +2 -1
  16. package/dest/contract/base_contract_interaction.d.ts +8 -10
  17. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  18. package/dest/contract/base_contract_interaction.js +5 -17
  19. package/dest/contract/deploy_method.d.ts +63 -16
  20. package/dest/contract/deploy_method.d.ts.map +1 -1
  21. package/dest/contract/deploy_method.js +36 -19
  22. package/dest/contract/interaction_options.d.ts +42 -5
  23. package/dest/contract/interaction_options.d.ts.map +1 -1
  24. package/dest/contract/interaction_options.js +8 -1
  25. package/dest/contract/protocol_contracts/auth-registry.d.ts +1 -10
  26. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -1
  27. package/dest/contract/protocol_contracts/auth-registry.js +61 -479
  28. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +2 -11
  29. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -1
  30. package/dest/contract/protocol_contracts/contract-class-registry.js +10 -422
  31. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +2 -11
  32. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -1
  33. package/dest/contract/protocol_contracts/contract-instance-registry.js +80 -486
  34. package/dest/contract/protocol_contracts/fee-juice.d.ts +1 -10
  35. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -1
  36. package/dest/contract/protocol_contracts/fee-juice.js +0 -414
  37. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +3 -3
  38. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -1
  39. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +13 -14
  40. package/dest/contract/protocol_contracts/public-checks.d.ts +3 -3
  41. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -1
  42. package/dest/contract/protocol_contracts/public-checks.js +13 -22
  43. package/dest/contract/wait_for_proven.js +1 -1
  44. package/dest/contract/wait_opts.d.ts +16 -0
  45. package/dest/contract/wait_opts.d.ts.map +1 -0
  46. package/dest/contract/wait_opts.js +5 -0
  47. package/dest/utils/authwit.d.ts +6 -6
  48. package/dest/utils/authwit.d.ts.map +1 -1
  49. package/dest/utils/authwit.js +2 -6
  50. package/dest/utils/node.d.ts +12 -1
  51. package/dest/utils/node.d.ts.map +1 -1
  52. package/dest/utils/node.js +46 -0
  53. package/dest/wallet/capabilities.d.ts +444 -0
  54. package/dest/wallet/capabilities.d.ts.map +1 -0
  55. package/dest/wallet/capabilities.js +3 -0
  56. package/dest/wallet/deploy_account_method.d.ts +19 -5
  57. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  58. package/dest/wallet/index.d.ts +2 -1
  59. package/dest/wallet/index.d.ts.map +1 -1
  60. package/dest/wallet/index.js +1 -0
  61. package/dest/wallet/wallet.d.ts +1356 -18
  62. package/dest/wallet/wallet.d.ts.map +1 -1
  63. package/dest/wallet/wallet.js +136 -4
  64. package/package.json +9 -9
  65. package/src/api/block.ts +1 -1
  66. package/src/api/contract.ts +22 -7
  67. package/src/api/node.ts +7 -3
  68. package/src/api/tx.ts +2 -0
  69. package/src/api/wallet.ts +43 -0
  70. package/src/contract/base_contract_interaction.ts +27 -15
  71. package/src/contract/deploy_method.ts +115 -23
  72. package/src/contract/interaction_options.ts +49 -4
  73. package/src/contract/protocol_contracts/auth-registry.ts +37 -240
  74. package/src/contract/protocol_contracts/contract-class-registry.ts +3 -204
  75. package/src/contract/protocol_contracts/contract-instance-registry.ts +34 -234
  76. package/src/contract/protocol_contracts/fee-juice.ts +0 -202
  77. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +6 -12
  78. package/src/contract/protocol_contracts/public-checks.ts +6 -14
  79. package/src/contract/wait_for_proven.ts +1 -1
  80. package/src/contract/wait_opts.ts +21 -0
  81. package/src/utils/authwit.ts +16 -4
  82. package/src/utils/node.ts +62 -0
  83. package/src/wallet/capabilities.ts +491 -0
  84. package/src/wallet/deploy_account_method.ts +19 -4
  85. package/src/wallet/index.ts +1 -0
  86. package/src/wallet/wallet.ts +148 -12
  87. package/dest/contract/deploy_sent_tx.d.ts +0 -48
  88. package/dest/contract/deploy_sent_tx.d.ts.map +0 -1
  89. package/dest/contract/deploy_sent_tx.js +0 -46
  90. package/dest/contract/sent_tx.d.ts +0 -50
  91. package/dest/contract/sent_tx.d.ts.map +0 -1
  92. package/dest/contract/sent_tx.js +0 -90
  93. package/src/contract/deploy_sent_tx.ts +0 -75
  94. package/src/contract/sent_tx.ts +0 -129
@@ -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,271 +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
- '9885968605480832328': {
308
- error_kind: 'string',
309
- string: 'Attempted to read past the length of a CapsuleArray'
310
- },
311
- '10135509984888824963': {
312
- error_kind: 'fmtstring',
313
- length: 58,
314
- item_types: [
315
- {
316
- kind: 'field'
317
- }
318
- ]
319
- },
320
- '10791800398362570014': {
321
- error_kind: 'string',
322
- string: 'extend_from_bounded_vec out of bounds'
323
- },
324
- '11021520179822076911': {
325
- error_kind: 'string',
326
- string: 'Attempted to delete past the length of a CapsuleArray'
327
- },
328
- '11692359521570349358': {
329
- error_kind: 'fmtstring',
330
- length: 40,
331
- item_types: []
332
- },
333
- '12327971061804302172': {
334
- error_kind: 'fmtstring',
335
- length: 98,
336
- item_types: []
337
- },
338
- '12469291177396340830': {
339
- error_kind: 'string',
340
- string: 'call to assert_max_bit_size'
341
- },
342
- '12913276134398371456': {
343
- error_kind: 'string',
344
- string: 'push out of bounds'
345
- },
346
- '13557316507370296400': {
347
- error_kind: 'fmtstring',
348
- length: 130,
349
- item_types: [
350
- {
351
- kind: 'integer',
352
- sign: 'unsigned',
353
- width: 32
354
- }
355
- ]
356
- },
357
- '14938672389828944159': {
358
- error_kind: 'fmtstring',
359
- length: 146,
360
- item_types: [
361
- {
362
- kind: 'integer',
363
- sign: 'unsigned',
364
- width: 32
365
- }
366
- ]
367
- },
368
- '14990209321349310352': {
369
- error_kind: 'string',
370
- string: 'attempt to add with overflow'
371
- },
372
- '15764276373176857197': {
373
- error_kind: 'string',
374
- string: 'Stack too deep'
375
- },
376
- '16431471497789672479': {
377
- error_kind: 'string',
378
- string: 'Index out of bounds'
379
- },
380
- '17531474008201752295': {
381
- error_kind: 'fmtstring',
382
- length: 133,
383
- item_types: [
384
- {
385
- kind: 'integer',
386
- sign: 'unsigned',
387
- width: 32
388
- }
389
- ]
390
- }
391
- }
392
- },
393
- bytecode: Buffer.from([]),
394
- debugSymbols: ''
395
- },
396
- {
397
- ...{
398
- functionType: FunctionType.PUBLIC,
399
- name: 'public_dispatch',
400
- isOnlySelf: false,
401
- isStatic: false,
402
- isInitializer: false,
403
- parameters: [
177
+ returnTypes: [
404
178
  {
405
- name: 'selector',
406
- type: {
407
- kind: 'field'
408
- },
409
- visibility: 'private'
179
+ kind: 'boolean'
410
180
  }
411
181
  ],
412
- returnTypes: [],
413
182
  errorTypes: {
414
183
  '361444214588792908': {
415
184
  error_kind: 'string',
@@ -419,186 +188,10 @@ const AuthRegistryContractArtifact = {
419
188
  error_kind: 'string',
420
189
  string: 'attempt to subtract with overflow'
421
190
  },
422
- '5525725861591553972': {
423
- error_kind: 'string',
424
- string: 'rejecting all'
425
- },
426
- '11691217184967371519': {
427
- error_kind: 'string',
428
- string: 'Function is_reject_all can only be called statically'
429
- },
430
- '12511970388699677811': {
431
- error_kind: 'fmtstring',
432
- length: 27,
433
- item_types: [
434
- {
435
- kind: 'field'
436
- }
437
- ]
438
- },
439
191
  '13455385521185560676': {
440
192
  error_kind: 'string',
441
193
  string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
442
194
  },
443
- '13929691561421487185': {
444
- error_kind: 'string',
445
- string: 'Function _set_authorized can only be called by the same contract'
446
- },
447
- '14990209321349310352': {
448
- error_kind: 'string',
449
- string: 'attempt to add with overflow'
450
- },
451
- '15764276373176857197': {
452
- error_kind: 'string',
453
- string: 'Stack too deep'
454
- },
455
- '16431471497789672479': {
456
- error_kind: 'string',
457
- string: 'Index out of bounds'
458
- },
459
- '17089945683942782951': {
460
- error_kind: 'string',
461
- string: 'unauthorized'
462
- },
463
- '17312933876399746100': {
464
- error_kind: 'string',
465
- string: 'Function is_consumable can only be called statically'
466
- }
467
- }
468
- },
469
- bytecode: Buffer.from([]),
470
- debugSymbols: ''
471
- },
472
- {
473
- ...{
474
- functionType: FunctionType.UTILITY,
475
- name: 'sync_private_state',
476
- isOnlySelf: false,
477
- isStatic: false,
478
- isInitializer: false,
479
- parameters: [],
480
- returnTypes: [],
481
- errorTypes: {
482
- '361444214588792908': {
483
- error_kind: 'string',
484
- string: 'attempt to multiply with overflow'
485
- },
486
- '992401946138144806': {
487
- error_kind: 'string',
488
- string: 'Attempted to read past end of BoundedVec'
489
- },
490
- '1998584279744703196': {
491
- error_kind: 'string',
492
- string: 'attempt to subtract with overflow'
493
- },
494
- '2967937905572420042': {
495
- error_kind: 'fmtstring',
496
- length: 61,
497
- item_types: [
498
- {
499
- kind: 'field'
500
- },
501
- {
502
- kind: 'field'
503
- }
504
- ]
505
- },
506
- '3330370348214585450': {
507
- error_kind: 'fmtstring',
508
- length: 48,
509
- item_types: [
510
- {
511
- kind: 'field'
512
- },
513
- {
514
- kind: 'field'
515
- }
516
- ]
517
- },
518
- '3670003311596808700': {
519
- error_kind: 'fmtstring',
520
- length: 77,
521
- item_types: [
522
- {
523
- kind: 'integer',
524
- sign: 'unsigned',
525
- width: 32
526
- }
527
- ]
528
- },
529
- '4261968856572588300': {
530
- error_kind: 'string',
531
- string: 'Value does not fit in field'
532
- },
533
- '4440399188109668273': {
534
- error_kind: 'string',
535
- string: 'Input length must be a multiple of 32'
536
- },
537
- '9791669845391776238': {
538
- error_kind: 'string',
539
- string: '0 has a square root; you cannot claim it is not square'
540
- },
541
- '9885968605480832328': {
542
- error_kind: 'string',
543
- string: 'Attempted to read past the length of a CapsuleArray'
544
- },
545
- '10135509984888824963': {
546
- error_kind: 'fmtstring',
547
- length: 58,
548
- item_types: [
549
- {
550
- kind: 'field'
551
- }
552
- ]
553
- },
554
- '10791800398362570014': {
555
- error_kind: 'string',
556
- string: 'extend_from_bounded_vec out of bounds'
557
- },
558
- '11021520179822076911': {
559
- error_kind: 'string',
560
- string: 'Attempted to delete past the length of a CapsuleArray'
561
- },
562
- '11692359521570349358': {
563
- error_kind: 'fmtstring',
564
- length: 40,
565
- item_types: []
566
- },
567
- '12327971061804302172': {
568
- error_kind: 'fmtstring',
569
- length: 98,
570
- item_types: []
571
- },
572
- '12469291177396340830': {
573
- error_kind: 'string',
574
- string: 'call to assert_max_bit_size'
575
- },
576
- '12913276134398371456': {
577
- error_kind: 'string',
578
- string: 'push out of bounds'
579
- },
580
- '13557316507370296400': {
581
- error_kind: 'fmtstring',
582
- length: 130,
583
- item_types: [
584
- {
585
- kind: 'integer',
586
- sign: 'unsigned',
587
- width: 32
588
- }
589
- ]
590
- },
591
- '14938672389828944159': {
592
- error_kind: 'fmtstring',
593
- length: 146,
594
- item_types: [
595
- {
596
- kind: 'integer',
597
- sign: 'unsigned',
598
- width: 32
599
- }
600
- ]
601
- },
602
195
  '14990209321349310352': {
603
196
  error_kind: 'string',
604
197
  string: 'attempt to add with overflow'
@@ -610,17 +203,6 @@ const AuthRegistryContractArtifact = {
610
203
  '16431471497789672479': {
611
204
  error_kind: 'string',
612
205
  string: 'Index out of bounds'
613
- },
614
- '17531474008201752295': {
615
- error_kind: 'fmtstring',
616
- length: 133,
617
- item_types: [
618
- {
619
- kind: 'integer',
620
- sign: 'unsigned',
621
- width: 32
622
- }
623
- ]
624
206
  }
625
207
  }
626
208
  },