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

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 (161) 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 +8 -9
  5. package/dest/account/account_contract.d.ts.map +1 -1
  6. package/dest/account/account_with_secret_key.d.ts +19 -7
  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 +3 -2
  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 +5 -6
  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 +16 -10
  22. package/dest/api/contract.d.ts.map +1 -1
  23. package/dest/api/contract.js +14 -8
  24. package/dest/api/node.d.ts +8 -4
  25. package/dest/api/node.d.ts.map +1 -1
  26. package/dest/api/node.js +7 -3
  27. package/dest/api/protocol.d.ts +7 -1
  28. package/dest/api/protocol.d.ts.map +1 -1
  29. package/dest/api/protocol.js +6 -0
  30. package/dest/api/tx.d.ts +2 -2
  31. package/dest/api/tx.d.ts.map +1 -1
  32. package/dest/api/tx.js +1 -1
  33. package/dest/api/wallet.d.ts +2 -2
  34. package/dest/api/wallet.d.ts.map +1 -1
  35. package/dest/api/wallet.js +1 -1
  36. package/dest/authorization/call_authorization_request.d.ts +22 -1
  37. package/dest/authorization/call_authorization_request.d.ts.map +1 -1
  38. package/dest/contract/base_contract_interaction.d.ts +8 -10
  39. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  40. package/dest/contract/base_contract_interaction.js +5 -17
  41. package/dest/contract/batch_call.d.ts +1 -1
  42. package/dest/contract/batch_call.d.ts.map +1 -1
  43. package/dest/contract/batch_call.js +3 -1
  44. package/dest/contract/contract_base.d.ts +4 -1
  45. package/dest/contract/contract_base.d.ts.map +1 -1
  46. package/dest/contract/contract_function_interaction.d.ts +1 -1
  47. package/dest/contract/deploy_method.d.ts +63 -16
  48. package/dest/contract/deploy_method.d.ts.map +1 -1
  49. package/dest/contract/deploy_method.js +41 -23
  50. package/dest/contract/interaction_options.d.ts +42 -5
  51. package/dest/contract/interaction_options.d.ts.map +1 -1
  52. package/dest/contract/interaction_options.js +8 -1
  53. package/dest/contract/protocol_contracts/auth-registry.d.ts +36 -0
  54. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
  55. package/dest/contract/protocol_contracts/auth-registry.js +963 -0
  56. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +35 -0
  57. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
  58. package/dest/contract/protocol_contracts/contract-class-registry.js +784 -0
  59. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +31 -0
  60. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
  61. package/dest/contract/protocol_contracts/contract-instance-registry.js +858 -0
  62. package/dest/contract/protocol_contracts/fee-juice.d.ts +30 -0
  63. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
  64. package/dest/contract/protocol_contracts/fee-juice.js +827 -0
  65. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +34 -0
  66. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -0
  67. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +563 -0
  68. package/dest/contract/protocol_contracts/public-checks.d.ts +26 -0
  69. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -0
  70. package/dest/contract/protocol_contracts/public-checks.js +579 -0
  71. package/dest/contract/wait_for_proven.d.ts +2 -2
  72. package/dest/contract/wait_for_proven.d.ts.map +1 -1
  73. package/dest/contract/wait_for_proven.js +1 -1
  74. package/dest/contract/wait_opts.d.ts +16 -0
  75. package/dest/contract/wait_opts.d.ts.map +1 -0
  76. package/dest/contract/wait_opts.js +5 -0
  77. package/dest/deployment/broadcast_function.js +3 -3
  78. package/dest/deployment/publish_class.js +2 -2
  79. package/dest/deployment/publish_instance.d.ts +2 -2
  80. package/dest/deployment/publish_instance.d.ts.map +1 -1
  81. package/dest/deployment/publish_instance.js +3 -3
  82. package/dest/ethereum/portal_manager.d.ts +6 -3
  83. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  84. package/dest/ethereum/portal_manager.js +10 -10
  85. package/dest/scripts/generate_protocol_contract_types.d.ts +2 -0
  86. package/dest/scripts/generate_protocol_contract_types.d.ts.map +1 -0
  87. package/dest/scripts/generate_protocol_contract_types.js +120 -0
  88. package/dest/utils/authwit.d.ts +8 -6
  89. package/dest/utils/authwit.d.ts.map +1 -1
  90. package/dest/utils/authwit.js +5 -9
  91. package/dest/utils/node.d.ts +12 -1
  92. package/dest/utils/node.d.ts.map +1 -1
  93. package/dest/utils/node.js +46 -0
  94. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +5 -8
  95. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
  96. package/dest/wallet/account_entrypoint_meta_payment_method.js +28 -43
  97. package/dest/wallet/account_manager.d.ts +5 -8
  98. package/dest/wallet/account_manager.d.ts.map +1 -1
  99. package/dest/wallet/account_manager.js +5 -11
  100. package/dest/wallet/deploy_account_method.d.ts +34 -6
  101. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  102. package/dest/wallet/deploy_account_method.js +7 -5
  103. package/dest/wallet/wallet.d.ts +233 -2490
  104. package/dest/wallet/wallet.d.ts.map +1 -1
  105. package/dest/wallet/wallet.js +61 -87
  106. package/package.json +14 -12
  107. package/src/account/account.ts +34 -58
  108. package/src/account/account_contract.ts +6 -7
  109. package/src/account/account_with_secret_key.ts +33 -8
  110. package/src/account/index.ts +2 -1
  111. package/src/account/signerless_account.ts +13 -12
  112. package/src/api/account.ts +9 -3
  113. package/src/api/authorization.ts +1 -0
  114. package/src/api/contract.ts +22 -7
  115. package/src/api/node.ts +7 -3
  116. package/src/api/protocol.ts +7 -0
  117. package/src/api/tx.ts +2 -0
  118. package/src/api/wallet.ts +5 -2
  119. package/src/contract/base_contract_interaction.ts +27 -15
  120. package/src/contract/batch_call.ts +4 -2
  121. package/src/contract/deploy_method.ts +122 -29
  122. package/src/contract/interaction_options.ts +49 -4
  123. package/src/contract/protocol_contracts/auth-registry.ts +545 -0
  124. package/src/contract/protocol_contracts/contract-class-registry.ts +433 -0
  125. package/src/contract/protocol_contracts/contract-instance-registry.ts +493 -0
  126. package/src/contract/protocol_contracts/fee-juice.ts +457 -0
  127. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +329 -0
  128. package/src/contract/protocol_contracts/public-checks.ts +315 -0
  129. package/src/contract/wait_for_proven.ts +1 -1
  130. package/src/contract/wait_opts.ts +21 -0
  131. package/src/deployment/broadcast_function.ts +3 -3
  132. package/src/deployment/publish_class.ts +2 -2
  133. package/src/deployment/publish_instance.ts +3 -6
  134. package/src/ethereum/portal_manager.ts +9 -8
  135. package/src/scripts/generate_protocol_contract_types.ts +150 -0
  136. package/src/utils/authwit.ts +19 -7
  137. package/src/utils/node.ts +62 -0
  138. package/src/wallet/account_entrypoint_meta_payment_method.ts +28 -60
  139. package/src/wallet/account_manager.ts +5 -13
  140. package/src/wallet/deploy_account_method.ts +37 -13
  141. package/src/wallet/wallet.ts +140 -92
  142. package/dest/account/interface.d.ts +0 -19
  143. package/dest/account/interface.d.ts.map +0 -1
  144. package/dest/account/interface.js +0 -5
  145. package/dest/contract/deploy_sent_tx.d.ts +0 -48
  146. package/dest/contract/deploy_sent_tx.d.ts.map +0 -1
  147. package/dest/contract/deploy_sent_tx.js +0 -46
  148. package/dest/contract/protocol_contracts.d.ts +0 -9
  149. package/dest/contract/protocol_contracts.d.ts.map +0 -1
  150. package/dest/contract/protocol_contracts.js +0 -26
  151. package/dest/contract/sent_tx.d.ts +0 -50
  152. package/dest/contract/sent_tx.d.ts.map +0 -1
  153. package/dest/contract/sent_tx.js +0 -90
  154. package/dest/contract/unsafe_contract.d.ts +0 -15
  155. package/dest/contract/unsafe_contract.d.ts.map +0 -1
  156. package/dest/contract/unsafe_contract.js +0 -6
  157. package/src/account/interface.ts +0 -25
  158. package/src/contract/deploy_sent_tx.ts +0 -75
  159. package/src/contract/protocol_contracts.ts +0 -35
  160. package/src/contract/sent_tx.ts +0 -129
  161. package/src/contract/unsafe_contract.ts +0 -19
@@ -0,0 +1,963 @@
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 AuthRegistryContractArtifact = {
5
+ name: 'AuthRegistry',
6
+ functions: [
7
+ {
8
+ ...{
9
+ functionType: FunctionType.PRIVATE,
10
+ name: 'set_authorized_private',
11
+ isOnlySelf: false,
12
+ isStatic: false,
13
+ isInitializer: false,
14
+ parameters: [
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',
33
+ type: {
34
+ kind: 'field'
35
+ },
36
+ visibility: 'private'
37
+ },
38
+ {
39
+ name: 'authorize',
40
+ type: {
41
+ kind: 'boolean'
42
+ },
43
+ visibility: 'private'
44
+ }
45
+ ],
46
+ returnTypes: [],
47
+ errorTypes: {
48
+ '2754040237334517471': {
49
+ error_kind: 'fmtstring',
50
+ length: 92,
51
+ item_types: []
52
+ },
53
+ '7555607922535724711': {
54
+ error_kind: 'string',
55
+ string: 'Preimage mismatch'
56
+ },
57
+ '9894212961085021188': {
58
+ error_kind: 'string',
59
+ string: 'Message not authorized by account'
60
+ },
61
+ '14990209321349310352': {
62
+ error_kind: 'string',
63
+ string: 'attempt to add with overflow'
64
+ },
65
+ '15764276373176857197': {
66
+ error_kind: 'string',
67
+ string: 'Stack too deep'
68
+ },
69
+ '16431471497789672479': {
70
+ error_kind: 'string',
71
+ string: 'Index out of bounds'
72
+ }
73
+ }
74
+ },
75
+ bytecode: Buffer.from([]),
76
+ debugSymbols: ''
77
+ },
78
+ {
79
+ ...{
80
+ functionType: FunctionType.UTILITY,
81
+ name: 'utility_is_consumable',
82
+ isOnlySelf: false,
83
+ isStatic: false,
84
+ isInitializer: false,
85
+ parameters: [
86
+ {
87
+ name: 'on_behalf_of',
88
+ type: {
89
+ kind: 'struct',
90
+ fields: [
91
+ {
92
+ name: 'inner',
93
+ type: {
94
+ kind: 'field'
95
+ }
96
+ }
97
+ ],
98
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
99
+ },
100
+ visibility: 'private'
101
+ },
102
+ {
103
+ name: 'message_hash',
104
+ type: {
105
+ kind: 'field'
106
+ },
107
+ visibility: 'private'
108
+ }
109
+ ],
110
+ returnTypes: [
111
+ {
112
+ kind: 'boolean'
113
+ }
114
+ ],
115
+ errorTypes: {
116
+ '361444214588792908': {
117
+ error_kind: 'string',
118
+ string: 'attempt to multiply with overflow'
119
+ },
120
+ '1998584279744703196': {
121
+ error_kind: 'string',
122
+ string: 'attempt to subtract with overflow'
123
+ },
124
+ '13455385521185560676': {
125
+ error_kind: 'string',
126
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
127
+ },
128
+ '14990209321349310352': {
129
+ error_kind: 'string',
130
+ string: 'attempt to add with overflow'
131
+ },
132
+ '15764276373176857197': {
133
+ error_kind: 'string',
134
+ string: 'Stack too deep'
135
+ },
136
+ '16431471497789672479': {
137
+ error_kind: 'string',
138
+ string: 'Index out of bounds'
139
+ }
140
+ }
141
+ },
142
+ bytecode: Buffer.from([]),
143
+ debugSymbols: ''
144
+ },
145
+ {
146
+ ...{
147
+ functionType: FunctionType.UTILITY,
148
+ name: 'process_message',
149
+ isOnlySelf: false,
150
+ isStatic: false,
151
+ isInitializer: false,
152
+ parameters: [
153
+ {
154
+ name: 'message_ciphertext',
155
+ type: {
156
+ kind: 'struct',
157
+ fields: [
158
+ {
159
+ name: 'storage',
160
+ type: {
161
+ kind: 'array',
162
+ length: 17,
163
+ type: {
164
+ kind: 'field'
165
+ }
166
+ }
167
+ },
168
+ {
169
+ name: 'len',
170
+ type: {
171
+ kind: 'integer',
172
+ sign: 'unsigned',
173
+ width: 32
174
+ }
175
+ }
176
+ ],
177
+ path: 'std::collections::bounded_vec::BoundedVec'
178
+ },
179
+ visibility: 'private'
180
+ },
181
+ {
182
+ name: 'message_context',
183
+ 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'
242
+ },
243
+ visibility: 'private'
244
+ }
245
+ ],
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: [
391
+ {
392
+ name: 'selector',
393
+ type: {
394
+ kind: 'field'
395
+ },
396
+ visibility: 'private'
397
+ }
398
+ ],
399
+ returnTypes: [],
400
+ errorTypes: {
401
+ '361444214588792908': {
402
+ error_kind: 'string',
403
+ string: 'attempt to multiply with overflow'
404
+ },
405
+ '1998584279744703196': {
406
+ error_kind: 'string',
407
+ string: 'attempt to subtract with overflow'
408
+ },
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
+ '13455385521185560676': {
427
+ error_kind: 'string',
428
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
429
+ },
430
+ '13929691561421487185': {
431
+ error_kind: 'string',
432
+ string: 'Function _set_authorized can only be called by the same contract'
433
+ },
434
+ '14990209321349310352': {
435
+ error_kind: 'string',
436
+ string: 'attempt to add with overflow'
437
+ },
438
+ '15764276373176857197': {
439
+ error_kind: 'string',
440
+ string: 'Stack too deep'
441
+ },
442
+ '16431471497789672479': {
443
+ error_kind: 'string',
444
+ 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_private_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
+ }
612
+ }
613
+ },
614
+ bytecode: Buffer.from([]),
615
+ debugSymbols: ''
616
+ }
617
+ ],
618
+ nonDispatchPublicFunctions: [
619
+ {
620
+ functionType: FunctionType.PUBLIC,
621
+ name: '_set_authorized',
622
+ isOnlySelf: true,
623
+ isStatic: false,
624
+ isInitializer: false,
625
+ parameters: [
626
+ {
627
+ name: 'approver',
628
+ type: {
629
+ kind: 'struct',
630
+ fields: [
631
+ {
632
+ name: 'inner',
633
+ type: {
634
+ kind: 'field'
635
+ }
636
+ }
637
+ ],
638
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
639
+ },
640
+ visibility: 'private'
641
+ },
642
+ {
643
+ name: 'message_hash',
644
+ type: {
645
+ kind: 'field'
646
+ },
647
+ visibility: 'private'
648
+ },
649
+ {
650
+ name: 'authorize',
651
+ type: {
652
+ kind: 'boolean'
653
+ },
654
+ visibility: 'private'
655
+ }
656
+ ],
657
+ returnTypes: [],
658
+ errorTypes: {
659
+ '361444214588792908': {
660
+ error_kind: 'string',
661
+ string: 'attempt to multiply with overflow'
662
+ },
663
+ '1998584279744703196': {
664
+ error_kind: 'string',
665
+ string: 'attempt to subtract with overflow'
666
+ },
667
+ '13455385521185560676': {
668
+ error_kind: 'string',
669
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
670
+ },
671
+ '13929691561421487185': {
672
+ error_kind: 'string',
673
+ string: 'Function _set_authorized can only be called by the same contract'
674
+ },
675
+ '14990209321349310352': {
676
+ error_kind: 'string',
677
+ string: 'attempt to add with overflow'
678
+ },
679
+ '15764276373176857197': {
680
+ error_kind: 'string',
681
+ string: 'Stack too deep'
682
+ },
683
+ '16431471497789672479': {
684
+ error_kind: 'string',
685
+ string: 'Index out of bounds'
686
+ }
687
+ }
688
+ },
689
+ {
690
+ functionType: FunctionType.PUBLIC,
691
+ name: 'consume',
692
+ isOnlySelf: false,
693
+ isStatic: false,
694
+ isInitializer: false,
695
+ parameters: [
696
+ {
697
+ name: 'on_behalf_of',
698
+ type: {
699
+ kind: 'struct',
700
+ fields: [
701
+ {
702
+ name: 'inner',
703
+ type: {
704
+ kind: 'field'
705
+ }
706
+ }
707
+ ],
708
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
709
+ },
710
+ visibility: 'private'
711
+ },
712
+ {
713
+ name: 'inner_hash',
714
+ type: {
715
+ kind: 'field'
716
+ },
717
+ visibility: 'private'
718
+ }
719
+ ],
720
+ returnTypes: [
721
+ {
722
+ kind: 'field'
723
+ }
724
+ ],
725
+ errorTypes: {
726
+ '361444214588792908': {
727
+ error_kind: 'string',
728
+ string: 'attempt to multiply with overflow'
729
+ },
730
+ '1998584279744703196': {
731
+ error_kind: 'string',
732
+ string: 'attempt to subtract with overflow'
733
+ },
734
+ '5525725861591553972': {
735
+ error_kind: 'string',
736
+ string: 'rejecting all'
737
+ },
738
+ '13455385521185560676': {
739
+ error_kind: 'string',
740
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
741
+ },
742
+ '14990209321349310352': {
743
+ error_kind: 'string',
744
+ string: 'attempt to add with overflow'
745
+ },
746
+ '15764276373176857197': {
747
+ error_kind: 'string',
748
+ string: 'Stack too deep'
749
+ },
750
+ '16431471497789672479': {
751
+ error_kind: 'string',
752
+ string: 'Index out of bounds'
753
+ },
754
+ '17089945683942782951': {
755
+ error_kind: 'string',
756
+ string: 'unauthorized'
757
+ }
758
+ }
759
+ },
760
+ {
761
+ functionType: FunctionType.PUBLIC,
762
+ name: 'is_consumable',
763
+ isOnlySelf: false,
764
+ isStatic: true,
765
+ isInitializer: false,
766
+ parameters: [
767
+ {
768
+ name: 'on_behalf_of',
769
+ type: {
770
+ kind: 'struct',
771
+ fields: [
772
+ {
773
+ name: 'inner',
774
+ type: {
775
+ kind: 'field'
776
+ }
777
+ }
778
+ ],
779
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
780
+ },
781
+ visibility: 'private'
782
+ },
783
+ {
784
+ name: 'message_hash',
785
+ type: {
786
+ kind: 'field'
787
+ },
788
+ visibility: 'private'
789
+ }
790
+ ],
791
+ returnTypes: [
792
+ {
793
+ kind: 'boolean'
794
+ }
795
+ ],
796
+ errorTypes: {
797
+ '361444214588792908': {
798
+ error_kind: 'string',
799
+ string: 'attempt to multiply with overflow'
800
+ },
801
+ '1998584279744703196': {
802
+ error_kind: 'string',
803
+ string: 'attempt to subtract with overflow'
804
+ },
805
+ '13455385521185560676': {
806
+ error_kind: 'string',
807
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
808
+ },
809
+ '14990209321349310352': {
810
+ error_kind: 'string',
811
+ string: 'attempt to add with overflow'
812
+ },
813
+ '15764276373176857197': {
814
+ error_kind: 'string',
815
+ string: 'Stack too deep'
816
+ },
817
+ '16431471497789672479': {
818
+ error_kind: 'string',
819
+ string: 'Index out of bounds'
820
+ },
821
+ '17312933876399746100': {
822
+ error_kind: 'string',
823
+ string: 'Function is_consumable can only be called statically'
824
+ }
825
+ }
826
+ },
827
+ {
828
+ functionType: FunctionType.PUBLIC,
829
+ name: 'is_reject_all',
830
+ isOnlySelf: false,
831
+ isStatic: true,
832
+ isInitializer: false,
833
+ parameters: [
834
+ {
835
+ name: 'on_behalf_of',
836
+ type: {
837
+ kind: 'struct',
838
+ fields: [
839
+ {
840
+ name: 'inner',
841
+ type: {
842
+ kind: 'field'
843
+ }
844
+ }
845
+ ],
846
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
847
+ },
848
+ visibility: 'private'
849
+ }
850
+ ],
851
+ returnTypes: [
852
+ {
853
+ kind: 'boolean'
854
+ }
855
+ ],
856
+ errorTypes: {
857
+ '11691217184967371519': {
858
+ error_kind: 'string',
859
+ string: 'Function is_reject_all can only be called statically'
860
+ },
861
+ '13455385521185560676': {
862
+ error_kind: 'string',
863
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
864
+ },
865
+ '15764276373176857197': {
866
+ error_kind: 'string',
867
+ string: 'Stack too deep'
868
+ }
869
+ }
870
+ },
871
+ {
872
+ functionType: FunctionType.PUBLIC,
873
+ name: 'set_authorized',
874
+ isOnlySelf: false,
875
+ isStatic: false,
876
+ isInitializer: false,
877
+ parameters: [
878
+ {
879
+ name: 'message_hash',
880
+ type: {
881
+ kind: 'field'
882
+ },
883
+ visibility: 'private'
884
+ },
885
+ {
886
+ name: 'authorize',
887
+ type: {
888
+ kind: 'boolean'
889
+ },
890
+ visibility: 'private'
891
+ }
892
+ ],
893
+ returnTypes: [],
894
+ errorTypes: {
895
+ '361444214588792908': {
896
+ error_kind: 'string',
897
+ string: 'attempt to multiply with overflow'
898
+ },
899
+ '1998584279744703196': {
900
+ error_kind: 'string',
901
+ string: 'attempt to subtract with overflow'
902
+ },
903
+ '13455385521185560676': {
904
+ error_kind: 'string',
905
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
906
+ },
907
+ '14990209321349310352': {
908
+ error_kind: 'string',
909
+ string: 'attempt to add with overflow'
910
+ },
911
+ '15764276373176857197': {
912
+ error_kind: 'string',
913
+ string: 'Stack too deep'
914
+ },
915
+ '16431471497789672479': {
916
+ error_kind: 'string',
917
+ string: 'Index out of bounds'
918
+ }
919
+ }
920
+ },
921
+ {
922
+ functionType: FunctionType.PUBLIC,
923
+ name: 'set_reject_all',
924
+ isOnlySelf: false,
925
+ isStatic: false,
926
+ isInitializer: false,
927
+ parameters: [
928
+ {
929
+ name: 'reject',
930
+ type: {
931
+ kind: 'boolean'
932
+ },
933
+ visibility: 'private'
934
+ }
935
+ ],
936
+ returnTypes: [],
937
+ errorTypes: {
938
+ '13455385521185560676': {
939
+ error_kind: 'string',
940
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
941
+ },
942
+ '15764276373176857197': {
943
+ error_kind: 'string',
944
+ string: 'Stack too deep'
945
+ }
946
+ }
947
+ }
948
+ ],
949
+ outputs: {
950
+ structs: {},
951
+ globals: {}
952
+ },
953
+ storageLayout: {},
954
+ fileMap: {}
955
+ };
956
+ export class AuthRegistryContract extends ContractBase {
957
+ constructor(wallet){
958
+ super(ProtocolContractAddress.AuthRegistry, AuthRegistryContractArtifact, wallet);
959
+ }
960
+ static at(wallet) {
961
+ return new AuthRegistryContract(wallet);
962
+ }
963
+ }