@aztec/aztec.js 0.0.1-commit.fcb71a6 → 0.0.1-commit.ff7989d6c

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 (197) 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 +18 -12
  22. package/dest/api/contract.d.ts.map +1 -1
  23. package/dest/api/contract.js +16 -10
  24. package/dest/api/deployment.d.ts +1 -2
  25. package/dest/api/deployment.d.ts.map +1 -1
  26. package/dest/api/deployment.js +0 -1
  27. package/dest/api/events.d.ts +10 -6
  28. package/dest/api/events.d.ts.map +1 -1
  29. package/dest/api/events.js +30 -20
  30. package/dest/api/fields.d.ts +2 -1
  31. package/dest/api/fields.d.ts.map +1 -1
  32. package/dest/api/fields.js +1 -0
  33. package/dest/api/keys.d.ts +1 -1
  34. package/dest/api/keys.js +1 -1
  35. package/dest/api/node.d.ts +8 -4
  36. package/dest/api/node.d.ts.map +1 -1
  37. package/dest/api/node.js +7 -3
  38. package/dest/api/protocol.d.ts +7 -1
  39. package/dest/api/protocol.d.ts.map +1 -1
  40. package/dest/api/protocol.js +6 -0
  41. package/dest/api/tx.d.ts +2 -2
  42. package/dest/api/tx.d.ts.map +1 -1
  43. package/dest/api/tx.js +1 -1
  44. package/dest/api/wallet.d.ts +3 -2
  45. package/dest/api/wallet.d.ts.map +1 -1
  46. package/dest/api/wallet.js +2 -1
  47. package/dest/authorization/call_authorization_request.d.ts +22 -1
  48. package/dest/authorization/call_authorization_request.d.ts.map +1 -1
  49. package/dest/contract/base_contract_interaction.d.ts +8 -10
  50. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  51. package/dest/contract/base_contract_interaction.js +5 -17
  52. package/dest/contract/batch_call.d.ts +3 -3
  53. package/dest/contract/batch_call.d.ts.map +1 -1
  54. package/dest/contract/batch_call.js +11 -6
  55. package/dest/contract/contract_base.d.ts +4 -1
  56. package/dest/contract/contract_base.d.ts.map +1 -1
  57. package/dest/contract/contract_function_interaction.d.ts +3 -12
  58. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  59. package/dest/contract/contract_function_interaction.js +10 -7
  60. package/dest/contract/deploy_method.d.ts +76 -17
  61. package/dest/contract/deploy_method.d.ts.map +1 -1
  62. package/dest/contract/deploy_method.js +55 -29
  63. package/dest/contract/interaction_options.d.ts +49 -5
  64. package/dest/contract/interaction_options.d.ts.map +1 -1
  65. package/dest/contract/interaction_options.js +8 -1
  66. package/dest/contract/protocol_contracts/auth-registry.d.ts +36 -0
  67. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
  68. package/dest/contract/protocol_contracts/auth-registry.js +997 -0
  69. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +15 -0
  70. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
  71. package/dest/contract/protocol_contracts/contract-class-registry.js +139 -0
  72. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +22 -0
  73. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
  74. package/dest/contract/protocol_contracts/contract-instance-registry.js +465 -0
  75. package/dest/contract/protocol_contracts/fee-juice.d.ts +21 -0
  76. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
  77. package/dest/contract/protocol_contracts/fee-juice.js +426 -0
  78. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +34 -0
  79. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -0
  80. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +593 -0
  81. package/dest/contract/protocol_contracts/public-checks.d.ts +26 -0
  82. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -0
  83. package/dest/contract/protocol_contracts/public-checks.js +601 -0
  84. package/dest/contract/wait_for_proven.d.ts +2 -2
  85. package/dest/contract/wait_for_proven.d.ts.map +1 -1
  86. package/dest/contract/wait_for_proven.js +1 -1
  87. package/dest/contract/wait_opts.d.ts +16 -0
  88. package/dest/contract/wait_opts.d.ts.map +1 -0
  89. package/dest/contract/wait_opts.js +5 -0
  90. package/dest/deployment/publish_class.js +2 -2
  91. package/dest/deployment/publish_instance.d.ts +2 -2
  92. package/dest/deployment/publish_instance.d.ts.map +1 -1
  93. package/dest/deployment/publish_instance.js +3 -3
  94. package/dest/ethereum/portal_manager.d.ts +6 -3
  95. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  96. package/dest/ethereum/portal_manager.js +10 -10
  97. package/dest/fee/fee_juice_payment_method_with_claim.js +6 -6
  98. package/dest/fee/private_fee_payment_method.js +10 -10
  99. package/dest/fee/public_fee_payment_method.js +10 -10
  100. package/dest/fee/sponsored_fee_payment.js +3 -3
  101. package/dest/scripts/generate_protocol_contract_types.d.ts +2 -0
  102. package/dest/scripts/generate_protocol_contract_types.d.ts.map +1 -0
  103. package/dest/scripts/generate_protocol_contract_types.js +120 -0
  104. package/dest/utils/authwit.d.ts +8 -6
  105. package/dest/utils/authwit.d.ts.map +1 -1
  106. package/dest/utils/authwit.js +5 -9
  107. package/dest/utils/node.d.ts +12 -1
  108. package/dest/utils/node.d.ts.map +1 -1
  109. package/dest/utils/node.js +46 -0
  110. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +5 -8
  111. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
  112. package/dest/wallet/account_entrypoint_meta_payment_method.js +28 -43
  113. package/dest/wallet/account_manager.d.ts +5 -8
  114. package/dest/wallet/account_manager.d.ts.map +1 -1
  115. package/dest/wallet/account_manager.js +5 -11
  116. package/dest/wallet/capabilities.d.ts +452 -0
  117. package/dest/wallet/capabilities.d.ts.map +1 -0
  118. package/dest/wallet/capabilities.js +3 -0
  119. package/dest/wallet/deploy_account_method.d.ts +46 -7
  120. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  121. package/dest/wallet/deploy_account_method.js +33 -5
  122. package/dest/wallet/index.d.ts +2 -1
  123. package/dest/wallet/index.d.ts.map +1 -1
  124. package/dest/wallet/index.js +1 -0
  125. package/dest/wallet/wallet.d.ts +1740 -2496
  126. package/dest/wallet/wallet.d.ts.map +1 -1
  127. package/dest/wallet/wallet.js +211 -108
  128. package/package.json +24 -13
  129. package/src/account/account.ts +34 -58
  130. package/src/account/account_contract.ts +6 -7
  131. package/src/account/account_with_secret_key.ts +33 -8
  132. package/src/account/index.ts +2 -1
  133. package/src/account/signerless_account.ts +13 -12
  134. package/src/api/account.ts +9 -3
  135. package/src/api/authorization.ts +1 -0
  136. package/src/api/contract.ts +24 -9
  137. package/src/api/deployment.ts +0 -1
  138. package/src/api/events.ts +35 -27
  139. package/src/api/fields.ts +1 -0
  140. package/src/api/keys.ts +2 -2
  141. package/src/api/node.ts +7 -3
  142. package/src/api/protocol.ts +7 -0
  143. package/src/api/tx.ts +2 -0
  144. package/src/api/wallet.ts +48 -3
  145. package/src/contract/base_contract_interaction.ts +27 -15
  146. package/src/contract/batch_call.ts +10 -13
  147. package/src/contract/contract_function_interaction.ts +17 -7
  148. package/src/contract/deploy_method.ts +145 -35
  149. package/src/contract/interaction_options.ts +56 -4
  150. package/src/contract/protocol_contracts/auth-registry.ts +551 -0
  151. package/src/contract/protocol_contracts/contract-class-registry.ts +99 -0
  152. package/src/contract/protocol_contracts/contract-instance-registry.ts +302 -0
  153. package/src/contract/protocol_contracts/fee-juice.ts +264 -0
  154. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +334 -0
  155. package/src/contract/protocol_contracts/public-checks.ts +318 -0
  156. package/src/contract/wait_for_proven.ts +1 -1
  157. package/src/contract/wait_opts.ts +21 -0
  158. package/src/deployment/publish_class.ts +2 -2
  159. package/src/deployment/publish_instance.ts +3 -6
  160. package/src/ethereum/portal_manager.ts +9 -8
  161. package/src/fee/fee_juice_payment_method_with_claim.ts +5 -5
  162. package/src/fee/private_fee_payment_method.ts +7 -7
  163. package/src/fee/public_fee_payment_method.ts +8 -8
  164. package/src/fee/sponsored_fee_payment.ts +3 -3
  165. package/src/scripts/generate_protocol_contract_types.ts +150 -0
  166. package/src/utils/authwit.ts +19 -7
  167. package/src/utils/node.ts +62 -0
  168. package/src/wallet/account_entrypoint_meta_payment_method.ts +28 -60
  169. package/src/wallet/account_manager.ts +5 -13
  170. package/src/wallet/capabilities.ts +500 -0
  171. package/src/wallet/deploy_account_method.ts +74 -13
  172. package/src/wallet/index.ts +1 -0
  173. package/src/wallet/wallet.ts +344 -130
  174. package/dest/account/interface.d.ts +0 -19
  175. package/dest/account/interface.d.ts.map +0 -1
  176. package/dest/account/interface.js +0 -5
  177. package/dest/contract/deploy_sent_tx.d.ts +0 -48
  178. package/dest/contract/deploy_sent_tx.d.ts.map +0 -1
  179. package/dest/contract/deploy_sent_tx.js +0 -46
  180. package/dest/contract/protocol_contracts.d.ts +0 -9
  181. package/dest/contract/protocol_contracts.d.ts.map +0 -1
  182. package/dest/contract/protocol_contracts.js +0 -26
  183. package/dest/contract/sent_tx.d.ts +0 -50
  184. package/dest/contract/sent_tx.d.ts.map +0 -1
  185. package/dest/contract/sent_tx.js +0 -90
  186. package/dest/contract/unsafe_contract.d.ts +0 -15
  187. package/dest/contract/unsafe_contract.d.ts.map +0 -1
  188. package/dest/contract/unsafe_contract.js +0 -6
  189. package/dest/deployment/broadcast_function.d.ts +0 -24
  190. package/dest/deployment/broadcast_function.d.ts.map +0 -1
  191. package/dest/deployment/broadcast_function.js +0 -74
  192. package/src/account/interface.ts +0 -25
  193. package/src/contract/deploy_sent_tx.ts +0 -75
  194. package/src/contract/protocol_contracts.ts +0 -35
  195. package/src/contract/sent_tx.ts +0 -129
  196. package/src/contract/unsafe_contract.ts +0 -19
  197. package/src/deployment/broadcast_function.ts +0 -148
@@ -0,0 +1,997 @@
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
+ '7555607922535724711': {
49
+ error_kind: 'string',
50
+ string: 'Preimage mismatch'
51
+ },
52
+ '9530675838293881722': {
53
+ error_kind: 'string',
54
+ string: 'Writer did not write all data'
55
+ },
56
+ '9894212961085021188': {
57
+ error_kind: 'string',
58
+ string: 'Message not authorized by account'
59
+ },
60
+ '12327971061804302172': {
61
+ error_kind: 'fmtstring',
62
+ length: 98,
63
+ item_types: []
64
+ },
65
+ '14990209321349310352': {
66
+ error_kind: 'string',
67
+ string: 'attempt to add with overflow'
68
+ },
69
+ '15764276373176857197': {
70
+ error_kind: 'string',
71
+ string: 'Stack too deep'
72
+ },
73
+ '16431471497789672479': {
74
+ error_kind: 'string',
75
+ string: 'Index out of bounds'
76
+ }
77
+ }
78
+ },
79
+ bytecode: Buffer.from([]),
80
+ debugSymbols: ''
81
+ },
82
+ {
83
+ ...{
84
+ functionType: FunctionType.UTILITY,
85
+ name: 'utility_is_consumable',
86
+ isOnlySelf: false,
87
+ isStatic: false,
88
+ isInitializer: false,
89
+ parameters: [
90
+ {
91
+ name: 'on_behalf_of',
92
+ type: {
93
+ kind: 'struct',
94
+ fields: [
95
+ {
96
+ name: 'inner',
97
+ type: {
98
+ kind: 'field'
99
+ }
100
+ }
101
+ ],
102
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
103
+ },
104
+ visibility: 'private'
105
+ },
106
+ {
107
+ name: 'message_hash',
108
+ type: {
109
+ kind: 'field'
110
+ },
111
+ visibility: 'private'
112
+ }
113
+ ],
114
+ returnTypes: [
115
+ {
116
+ kind: 'boolean'
117
+ }
118
+ ],
119
+ errorTypes: {
120
+ '361444214588792908': {
121
+ error_kind: 'string',
122
+ string: 'attempt to multiply with overflow'
123
+ },
124
+ '1998584279744703196': {
125
+ error_kind: 'string',
126
+ string: 'attempt to subtract with overflow'
127
+ },
128
+ '13455385521185560676': {
129
+ error_kind: 'string',
130
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
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.UTILITY,
152
+ name: 'process_message',
153
+ isOnlySelf: false,
154
+ isStatic: false,
155
+ isInitializer: false,
156
+ parameters: [
157
+ {
158
+ name: 'message_ciphertext',
159
+ type: {
160
+ kind: 'struct',
161
+ fields: [
162
+ {
163
+ name: 'storage',
164
+ type: {
165
+ kind: 'array',
166
+ length: 15,
167
+ type: {
168
+ kind: 'field'
169
+ }
170
+ }
171
+ },
172
+ {
173
+ name: 'len',
174
+ type: {
175
+ kind: 'integer',
176
+ sign: 'unsigned',
177
+ width: 32
178
+ }
179
+ }
180
+ ],
181
+ path: 'std::collections::bounded_vec::BoundedVec'
182
+ },
183
+ visibility: 'private'
184
+ },
185
+ {
186
+ name: 'message_context',
187
+ type: {
188
+ kind: 'struct',
189
+ fields: [
190
+ {
191
+ name: 'tx_hash',
192
+ type: {
193
+ kind: 'field'
194
+ }
195
+ },
196
+ {
197
+ name: 'unique_note_hashes_in_tx',
198
+ type: {
199
+ kind: 'struct',
200
+ fields: [
201
+ {
202
+ name: 'storage',
203
+ type: {
204
+ kind: 'array',
205
+ length: 64,
206
+ type: {
207
+ kind: 'field'
208
+ }
209
+ }
210
+ },
211
+ {
212
+ name: 'len',
213
+ type: {
214
+ kind: 'integer',
215
+ sign: 'unsigned',
216
+ width: 32
217
+ }
218
+ }
219
+ ],
220
+ path: 'std::collections::bounded_vec::BoundedVec'
221
+ }
222
+ },
223
+ {
224
+ name: 'first_nullifier_in_tx',
225
+ type: {
226
+ kind: 'field'
227
+ }
228
+ },
229
+ {
230
+ name: 'recipient',
231
+ type: {
232
+ kind: 'struct',
233
+ fields: [
234
+ {
235
+ name: 'inner',
236
+ type: {
237
+ kind: 'field'
238
+ }
239
+ }
240
+ ],
241
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
242
+ }
243
+ }
244
+ ],
245
+ path: 'aztec::messages::processing::message_context::MessageContext'
246
+ },
247
+ visibility: 'private'
248
+ }
249
+ ],
250
+ returnTypes: [],
251
+ errorTypes: {
252
+ '361444214588792908': {
253
+ error_kind: 'string',
254
+ string: 'attempt to multiply with overflow'
255
+ },
256
+ '992401946138144806': {
257
+ error_kind: 'string',
258
+ string: 'Attempted to read past end of BoundedVec'
259
+ },
260
+ '1998584279744703196': {
261
+ error_kind: 'string',
262
+ string: 'attempt to subtract with overflow'
263
+ },
264
+ '2967937905572420042': {
265
+ error_kind: 'fmtstring',
266
+ length: 61,
267
+ item_types: [
268
+ {
269
+ kind: 'field'
270
+ },
271
+ {
272
+ kind: 'field'
273
+ }
274
+ ]
275
+ },
276
+ '3330370348214585450': {
277
+ error_kind: 'fmtstring',
278
+ length: 48,
279
+ item_types: [
280
+ {
281
+ kind: 'field'
282
+ },
283
+ {
284
+ kind: 'field'
285
+ }
286
+ ]
287
+ },
288
+ '3670003311596808700': {
289
+ error_kind: 'fmtstring',
290
+ length: 77,
291
+ item_types: [
292
+ {
293
+ kind: 'integer',
294
+ sign: 'unsigned',
295
+ width: 32
296
+ }
297
+ ]
298
+ },
299
+ '4261968856572588300': {
300
+ error_kind: 'string',
301
+ string: 'Value does not fit in field'
302
+ },
303
+ '4440399188109668273': {
304
+ error_kind: 'string',
305
+ string: 'Input length must be a multiple of 32'
306
+ },
307
+ '5417577161503694006': {
308
+ error_kind: 'fmtstring',
309
+ length: 56,
310
+ item_types: [
311
+ {
312
+ kind: 'field'
313
+ }
314
+ ]
315
+ },
316
+ '9530675838293881722': {
317
+ error_kind: 'string',
318
+ string: 'Writer did not write all data'
319
+ },
320
+ '9791669845391776238': {
321
+ error_kind: 'string',
322
+ string: '0 has a square root; you cannot claim it is not square'
323
+ },
324
+ '10135509984888824963': {
325
+ error_kind: 'fmtstring',
326
+ length: 58,
327
+ item_types: [
328
+ {
329
+ kind: 'field'
330
+ }
331
+ ]
332
+ },
333
+ '10791800398362570014': {
334
+ error_kind: 'string',
335
+ string: 'extend_from_bounded_vec out of bounds'
336
+ },
337
+ '11692359521570349358': {
338
+ error_kind: 'fmtstring',
339
+ length: 40,
340
+ item_types: []
341
+ },
342
+ '12469291177396340830': {
343
+ error_kind: 'string',
344
+ string: 'call to assert_max_bit_size'
345
+ },
346
+ '12913276134398371456': {
347
+ error_kind: 'string',
348
+ string: 'push out of bounds'
349
+ },
350
+ '13557316507370296400': {
351
+ error_kind: 'fmtstring',
352
+ length: 130,
353
+ item_types: [
354
+ {
355
+ kind: 'integer',
356
+ sign: 'unsigned',
357
+ width: 32
358
+ }
359
+ ]
360
+ },
361
+ '14938672389828944159': {
362
+ error_kind: 'fmtstring',
363
+ length: 146,
364
+ item_types: [
365
+ {
366
+ kind: 'integer',
367
+ sign: 'unsigned',
368
+ width: 32
369
+ }
370
+ ]
371
+ },
372
+ '14990209321349310352': {
373
+ error_kind: 'string',
374
+ string: 'attempt to add with overflow'
375
+ },
376
+ '15764276373176857197': {
377
+ error_kind: 'string',
378
+ string: 'Stack too deep'
379
+ },
380
+ '16431471497789672479': {
381
+ error_kind: 'string',
382
+ string: 'Index out of bounds'
383
+ },
384
+ '17531474008201752295': {
385
+ error_kind: 'fmtstring',
386
+ length: 133,
387
+ item_types: [
388
+ {
389
+ kind: 'integer',
390
+ sign: 'unsigned',
391
+ width: 32
392
+ }
393
+ ]
394
+ }
395
+ }
396
+ },
397
+ bytecode: Buffer.from([]),
398
+ debugSymbols: ''
399
+ },
400
+ {
401
+ ...{
402
+ functionType: FunctionType.PUBLIC,
403
+ name: 'public_dispatch',
404
+ isOnlySelf: false,
405
+ isStatic: false,
406
+ isInitializer: false,
407
+ parameters: [
408
+ {
409
+ name: 'selector',
410
+ type: {
411
+ kind: 'field'
412
+ },
413
+ visibility: 'private'
414
+ }
415
+ ],
416
+ returnTypes: [],
417
+ errorTypes: {
418
+ '361444214588792908': {
419
+ error_kind: 'string',
420
+ string: 'attempt to multiply with overflow'
421
+ },
422
+ '1998584279744703196': {
423
+ error_kind: 'string',
424
+ string: 'attempt to subtract with overflow'
425
+ },
426
+ '5525725861591553972': {
427
+ error_kind: 'string',
428
+ string: 'rejecting all'
429
+ },
430
+ '11691217184967371519': {
431
+ error_kind: 'string',
432
+ string: 'Function is_reject_all can only be called statically'
433
+ },
434
+ '12511970388699677811': {
435
+ error_kind: 'fmtstring',
436
+ length: 27,
437
+ item_types: [
438
+ {
439
+ kind: 'field'
440
+ }
441
+ ]
442
+ },
443
+ '13455385521185560676': {
444
+ error_kind: 'string',
445
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
446
+ },
447
+ '13929691561421487185': {
448
+ error_kind: 'string',
449
+ string: 'Function _set_authorized can only be called by the same contract'
450
+ },
451
+ '14990209321349310352': {
452
+ error_kind: 'string',
453
+ string: 'attempt to add with overflow'
454
+ },
455
+ '15764276373176857197': {
456
+ error_kind: 'string',
457
+ string: 'Stack too deep'
458
+ },
459
+ '16431471497789672479': {
460
+ error_kind: 'string',
461
+ string: 'Index out of bounds'
462
+ },
463
+ '17089945683942782951': {
464
+ error_kind: 'string',
465
+ string: 'unauthorized'
466
+ },
467
+ '17312933876399746100': {
468
+ error_kind: 'string',
469
+ string: 'Function is_consumable can only be called statically'
470
+ }
471
+ }
472
+ },
473
+ bytecode: Buffer.from([]),
474
+ debugSymbols: ''
475
+ },
476
+ {
477
+ ...{
478
+ functionType: FunctionType.UTILITY,
479
+ name: 'sync_state',
480
+ isOnlySelf: false,
481
+ isStatic: false,
482
+ isInitializer: false,
483
+ parameters: [],
484
+ returnTypes: [],
485
+ errorTypes: {
486
+ '361444214588792908': {
487
+ error_kind: 'string',
488
+ string: 'attempt to multiply with overflow'
489
+ },
490
+ '992401946138144806': {
491
+ error_kind: 'string',
492
+ string: 'Attempted to read past end of BoundedVec'
493
+ },
494
+ '1998584279744703196': {
495
+ error_kind: 'string',
496
+ string: 'attempt to subtract with overflow'
497
+ },
498
+ '2967937905572420042': {
499
+ error_kind: 'fmtstring',
500
+ length: 61,
501
+ item_types: [
502
+ {
503
+ kind: 'field'
504
+ },
505
+ {
506
+ kind: 'field'
507
+ }
508
+ ]
509
+ },
510
+ '3330370348214585450': {
511
+ error_kind: 'fmtstring',
512
+ length: 48,
513
+ item_types: [
514
+ {
515
+ kind: 'field'
516
+ },
517
+ {
518
+ kind: 'field'
519
+ }
520
+ ]
521
+ },
522
+ '3670003311596808700': {
523
+ error_kind: 'fmtstring',
524
+ length: 77,
525
+ item_types: [
526
+ {
527
+ kind: 'integer',
528
+ sign: 'unsigned',
529
+ width: 32
530
+ }
531
+ ]
532
+ },
533
+ '4261968856572588300': {
534
+ error_kind: 'string',
535
+ string: 'Value does not fit in field'
536
+ },
537
+ '4440399188109668273': {
538
+ error_kind: 'string',
539
+ string: 'Input length must be a multiple of 32'
540
+ },
541
+ '5417577161503694006': {
542
+ error_kind: 'fmtstring',
543
+ length: 56,
544
+ item_types: [
545
+ {
546
+ kind: 'field'
547
+ }
548
+ ]
549
+ },
550
+ '9530675838293881722': {
551
+ error_kind: 'string',
552
+ string: 'Writer did not write all data'
553
+ },
554
+ '9791669845391776238': {
555
+ error_kind: 'string',
556
+ string: '0 has a square root; you cannot claim it is not square'
557
+ },
558
+ '9885968605480832328': {
559
+ error_kind: 'string',
560
+ string: 'Attempted to read past the length of a CapsuleArray'
561
+ },
562
+ '10135509984888824963': {
563
+ error_kind: 'fmtstring',
564
+ length: 58,
565
+ item_types: [
566
+ {
567
+ kind: 'field'
568
+ }
569
+ ]
570
+ },
571
+ '10791800398362570014': {
572
+ error_kind: 'string',
573
+ string: 'extend_from_bounded_vec out of bounds'
574
+ },
575
+ '11021520179822076911': {
576
+ error_kind: 'string',
577
+ string: 'Attempted to delete past the length of a CapsuleArray'
578
+ },
579
+ '11692359521570349358': {
580
+ error_kind: 'fmtstring',
581
+ length: 40,
582
+ item_types: []
583
+ },
584
+ '12327971061804302172': {
585
+ error_kind: 'fmtstring',
586
+ length: 98,
587
+ item_types: []
588
+ },
589
+ '12469291177396340830': {
590
+ error_kind: 'string',
591
+ string: 'call to assert_max_bit_size'
592
+ },
593
+ '12913276134398371456': {
594
+ error_kind: 'string',
595
+ string: 'push out of bounds'
596
+ },
597
+ '13557316507370296400': {
598
+ error_kind: 'fmtstring',
599
+ length: 130,
600
+ item_types: [
601
+ {
602
+ kind: 'integer',
603
+ sign: 'unsigned',
604
+ width: 32
605
+ }
606
+ ]
607
+ },
608
+ '14938672389828944159': {
609
+ error_kind: 'fmtstring',
610
+ length: 146,
611
+ item_types: [
612
+ {
613
+ kind: 'integer',
614
+ sign: 'unsigned',
615
+ width: 32
616
+ }
617
+ ]
618
+ },
619
+ '14990209321349310352': {
620
+ error_kind: 'string',
621
+ string: 'attempt to add with overflow'
622
+ },
623
+ '15764276373176857197': {
624
+ error_kind: 'string',
625
+ string: 'Stack too deep'
626
+ },
627
+ '16431471497789672479': {
628
+ error_kind: 'string',
629
+ string: 'Index out of bounds'
630
+ },
631
+ '17531474008201752295': {
632
+ error_kind: 'fmtstring',
633
+ length: 133,
634
+ item_types: [
635
+ {
636
+ kind: 'integer',
637
+ sign: 'unsigned',
638
+ width: 32
639
+ }
640
+ ]
641
+ },
642
+ '17655676068928457687': {
643
+ error_kind: 'string',
644
+ string: 'Reader did not read all data'
645
+ }
646
+ }
647
+ },
648
+ bytecode: Buffer.from([]),
649
+ debugSymbols: ''
650
+ }
651
+ ],
652
+ nonDispatchPublicFunctions: [
653
+ {
654
+ functionType: FunctionType.PUBLIC,
655
+ name: '_set_authorized',
656
+ isOnlySelf: true,
657
+ isStatic: false,
658
+ isInitializer: false,
659
+ parameters: [
660
+ {
661
+ name: 'approver',
662
+ type: {
663
+ kind: 'struct',
664
+ fields: [
665
+ {
666
+ name: 'inner',
667
+ type: {
668
+ kind: 'field'
669
+ }
670
+ }
671
+ ],
672
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
673
+ },
674
+ visibility: 'private'
675
+ },
676
+ {
677
+ name: 'message_hash',
678
+ type: {
679
+ kind: 'field'
680
+ },
681
+ visibility: 'private'
682
+ },
683
+ {
684
+ name: 'authorize',
685
+ type: {
686
+ kind: 'boolean'
687
+ },
688
+ visibility: 'private'
689
+ }
690
+ ],
691
+ returnTypes: [],
692
+ errorTypes: {
693
+ '361444214588792908': {
694
+ error_kind: 'string',
695
+ string: 'attempt to multiply with overflow'
696
+ },
697
+ '1998584279744703196': {
698
+ error_kind: 'string',
699
+ string: 'attempt to subtract with overflow'
700
+ },
701
+ '13455385521185560676': {
702
+ error_kind: 'string',
703
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
704
+ },
705
+ '13929691561421487185': {
706
+ error_kind: 'string',
707
+ string: 'Function _set_authorized can only be called by the same contract'
708
+ },
709
+ '14990209321349310352': {
710
+ error_kind: 'string',
711
+ string: 'attempt to add with overflow'
712
+ },
713
+ '15764276373176857197': {
714
+ error_kind: 'string',
715
+ string: 'Stack too deep'
716
+ },
717
+ '16431471497789672479': {
718
+ error_kind: 'string',
719
+ string: 'Index out of bounds'
720
+ }
721
+ }
722
+ },
723
+ {
724
+ functionType: FunctionType.PUBLIC,
725
+ name: 'consume',
726
+ isOnlySelf: false,
727
+ isStatic: false,
728
+ isInitializer: false,
729
+ parameters: [
730
+ {
731
+ name: 'on_behalf_of',
732
+ type: {
733
+ kind: 'struct',
734
+ fields: [
735
+ {
736
+ name: 'inner',
737
+ type: {
738
+ kind: 'field'
739
+ }
740
+ }
741
+ ],
742
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
743
+ },
744
+ visibility: 'private'
745
+ },
746
+ {
747
+ name: 'inner_hash',
748
+ type: {
749
+ kind: 'field'
750
+ },
751
+ visibility: 'private'
752
+ }
753
+ ],
754
+ returnTypes: [
755
+ {
756
+ kind: 'field'
757
+ }
758
+ ],
759
+ errorTypes: {
760
+ '361444214588792908': {
761
+ error_kind: 'string',
762
+ string: 'attempt to multiply with overflow'
763
+ },
764
+ '1998584279744703196': {
765
+ error_kind: 'string',
766
+ string: 'attempt to subtract with overflow'
767
+ },
768
+ '5525725861591553972': {
769
+ error_kind: 'string',
770
+ string: 'rejecting all'
771
+ },
772
+ '13455385521185560676': {
773
+ error_kind: 'string',
774
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
775
+ },
776
+ '14990209321349310352': {
777
+ error_kind: 'string',
778
+ string: 'attempt to add with overflow'
779
+ },
780
+ '15764276373176857197': {
781
+ error_kind: 'string',
782
+ string: 'Stack too deep'
783
+ },
784
+ '16431471497789672479': {
785
+ error_kind: 'string',
786
+ string: 'Index out of bounds'
787
+ },
788
+ '17089945683942782951': {
789
+ error_kind: 'string',
790
+ string: 'unauthorized'
791
+ }
792
+ }
793
+ },
794
+ {
795
+ functionType: FunctionType.PUBLIC,
796
+ name: 'is_consumable',
797
+ isOnlySelf: false,
798
+ isStatic: true,
799
+ isInitializer: false,
800
+ parameters: [
801
+ {
802
+ name: 'on_behalf_of',
803
+ type: {
804
+ kind: 'struct',
805
+ fields: [
806
+ {
807
+ name: 'inner',
808
+ type: {
809
+ kind: 'field'
810
+ }
811
+ }
812
+ ],
813
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
814
+ },
815
+ visibility: 'private'
816
+ },
817
+ {
818
+ name: 'message_hash',
819
+ type: {
820
+ kind: 'field'
821
+ },
822
+ visibility: 'private'
823
+ }
824
+ ],
825
+ returnTypes: [
826
+ {
827
+ kind: 'boolean'
828
+ }
829
+ ],
830
+ errorTypes: {
831
+ '361444214588792908': {
832
+ error_kind: 'string',
833
+ string: 'attempt to multiply with overflow'
834
+ },
835
+ '1998584279744703196': {
836
+ error_kind: 'string',
837
+ string: 'attempt to subtract with overflow'
838
+ },
839
+ '13455385521185560676': {
840
+ error_kind: 'string',
841
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
842
+ },
843
+ '14990209321349310352': {
844
+ error_kind: 'string',
845
+ string: 'attempt to add with overflow'
846
+ },
847
+ '15764276373176857197': {
848
+ error_kind: 'string',
849
+ string: 'Stack too deep'
850
+ },
851
+ '16431471497789672479': {
852
+ error_kind: 'string',
853
+ string: 'Index out of bounds'
854
+ },
855
+ '17312933876399746100': {
856
+ error_kind: 'string',
857
+ string: 'Function is_consumable can only be called statically'
858
+ }
859
+ }
860
+ },
861
+ {
862
+ functionType: FunctionType.PUBLIC,
863
+ name: 'is_reject_all',
864
+ isOnlySelf: false,
865
+ isStatic: true,
866
+ isInitializer: false,
867
+ parameters: [
868
+ {
869
+ name: 'on_behalf_of',
870
+ type: {
871
+ kind: 'struct',
872
+ fields: [
873
+ {
874
+ name: 'inner',
875
+ type: {
876
+ kind: 'field'
877
+ }
878
+ }
879
+ ],
880
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
881
+ },
882
+ visibility: 'private'
883
+ }
884
+ ],
885
+ returnTypes: [
886
+ {
887
+ kind: 'boolean'
888
+ }
889
+ ],
890
+ errorTypes: {
891
+ '11691217184967371519': {
892
+ error_kind: 'string',
893
+ string: 'Function is_reject_all can only be called statically'
894
+ },
895
+ '13455385521185560676': {
896
+ error_kind: 'string',
897
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
898
+ },
899
+ '15764276373176857197': {
900
+ error_kind: 'string',
901
+ string: 'Stack too deep'
902
+ }
903
+ }
904
+ },
905
+ {
906
+ functionType: FunctionType.PUBLIC,
907
+ name: 'set_authorized',
908
+ isOnlySelf: false,
909
+ isStatic: false,
910
+ isInitializer: false,
911
+ parameters: [
912
+ {
913
+ name: 'message_hash',
914
+ type: {
915
+ kind: 'field'
916
+ },
917
+ visibility: 'private'
918
+ },
919
+ {
920
+ name: 'authorize',
921
+ type: {
922
+ kind: 'boolean'
923
+ },
924
+ visibility: 'private'
925
+ }
926
+ ],
927
+ returnTypes: [],
928
+ errorTypes: {
929
+ '361444214588792908': {
930
+ error_kind: 'string',
931
+ string: 'attempt to multiply with overflow'
932
+ },
933
+ '1998584279744703196': {
934
+ error_kind: 'string',
935
+ string: 'attempt to subtract with overflow'
936
+ },
937
+ '13455385521185560676': {
938
+ error_kind: 'string',
939
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
940
+ },
941
+ '14990209321349310352': {
942
+ error_kind: 'string',
943
+ string: 'attempt to add with overflow'
944
+ },
945
+ '15764276373176857197': {
946
+ error_kind: 'string',
947
+ string: 'Stack too deep'
948
+ },
949
+ '16431471497789672479': {
950
+ error_kind: 'string',
951
+ string: 'Index out of bounds'
952
+ }
953
+ }
954
+ },
955
+ {
956
+ functionType: FunctionType.PUBLIC,
957
+ name: 'set_reject_all',
958
+ isOnlySelf: false,
959
+ isStatic: false,
960
+ isInitializer: false,
961
+ parameters: [
962
+ {
963
+ name: 'reject',
964
+ type: {
965
+ kind: 'boolean'
966
+ },
967
+ visibility: 'private'
968
+ }
969
+ ],
970
+ returnTypes: [],
971
+ errorTypes: {
972
+ '13455385521185560676': {
973
+ error_kind: 'string',
974
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
975
+ },
976
+ '15764276373176857197': {
977
+ error_kind: 'string',
978
+ string: 'Stack too deep'
979
+ }
980
+ }
981
+ }
982
+ ],
983
+ outputs: {
984
+ structs: {},
985
+ globals: {}
986
+ },
987
+ storageLayout: {},
988
+ fileMap: {}
989
+ };
990
+ export class AuthRegistryContract extends ContractBase {
991
+ constructor(wallet){
992
+ super(ProtocolContractAddress.AuthRegistry, AuthRegistryContractArtifact, wallet);
993
+ }
994
+ static at(wallet) {
995
+ return new AuthRegistryContract(wallet);
996
+ }
997
+ }