@aztec/aztec.js 0.0.1-commit.24de95ac → 0.0.1-commit.3469e52

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 (238) hide show
  1. package/dest/account/account.d.ts +26 -42
  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 +9 -10
  5. package/dest/account/account_contract.d.ts.map +1 -1
  6. package/dest/account/account_with_secret_key.d.ts +20 -9
  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 +4 -3
  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 +7 -9
  13. package/dest/account/signerless_account.d.ts.map +1 -1
  14. package/dest/account/signerless_account.js +8 -11
  15. package/dest/api/abi.d.ts +1 -1
  16. package/dest/api/account.d.ts +3 -4
  17. package/dest/api/account.d.ts.map +1 -1
  18. package/dest/api/account.js +2 -3
  19. package/dest/api/addresses.d.ts +1 -1
  20. package/dest/api/authorization.d.ts +2 -2
  21. package/dest/api/authorization.d.ts.map +1 -1
  22. package/dest/api/authorization.js +1 -1
  23. package/dest/api/block.d.ts +2 -2
  24. package/dest/api/block.d.ts.map +1 -1
  25. package/dest/api/block.js +1 -1
  26. package/dest/api/contract.d.ts +3 -3
  27. package/dest/api/contract.d.ts.map +1 -1
  28. package/dest/api/contract.js +1 -1
  29. package/dest/api/crypto.d.ts +1 -1
  30. package/dest/api/deployment.d.ts +1 -1
  31. package/dest/api/eth_address.d.ts +1 -1
  32. package/dest/api/ethereum.d.ts +1 -1
  33. package/dest/api/events.d.ts +1 -1
  34. package/dest/api/fee.d.ts +1 -1
  35. package/dest/api/fee_testing.d.ts +1 -1
  36. package/dest/api/fields.d.ts +3 -2
  37. package/dest/api/fields.d.ts.map +1 -1
  38. package/dest/api/fields.js +2 -1
  39. package/dest/api/keys.d.ts +1 -1
  40. package/dest/api/log.d.ts +1 -1
  41. package/dest/api/messaging.d.ts +1 -1
  42. package/dest/api/node.d.ts +1 -1
  43. package/dest/api/note.d.ts +2 -2
  44. package/dest/api/note.d.ts.map +1 -1
  45. package/dest/api/note.js +1 -1
  46. package/dest/api/protocol.d.ts +7 -1
  47. package/dest/api/protocol.d.ts.map +1 -1
  48. package/dest/api/protocol.js +6 -0
  49. package/dest/api/trees.d.ts +1 -1
  50. package/dest/api/tx.d.ts +2 -2
  51. package/dest/api/tx.d.ts.map +1 -1
  52. package/dest/api/tx.js +1 -1
  53. package/dest/api/utils.d.ts +1 -1
  54. package/dest/api/wallet.d.ts +2 -3
  55. package/dest/api/wallet.d.ts.map +1 -1
  56. package/dest/api/wallet.js +1 -2
  57. package/dest/authorization/call_authorization_request.d.ts +2 -2
  58. package/dest/authorization/call_authorization_request.d.ts.map +1 -1
  59. package/dest/contract/base_contract_interaction.d.ts +2 -3
  60. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  61. package/dest/contract/base_contract_interaction.js +1 -1
  62. package/dest/contract/batch_call.d.ts +8 -9
  63. package/dest/contract/batch_call.d.ts.map +1 -1
  64. package/dest/contract/batch_call.js +54 -34
  65. package/dest/contract/checker.d.ts +1 -1
  66. package/dest/contract/contract.d.ts +2 -2
  67. package/dest/contract/contract.d.ts.map +1 -1
  68. package/dest/contract/contract.js +4 -5
  69. package/dest/contract/contract_base.d.ts +6 -10
  70. package/dest/contract/contract_base.d.ts.map +1 -1
  71. package/dest/contract/contract_base.js +5 -12
  72. package/dest/contract/contract_function_interaction.d.ts +3 -3
  73. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  74. package/dest/contract/contract_function_interaction.js +9 -6
  75. package/dest/contract/deploy_method.d.ts +9 -8
  76. package/dest/contract/deploy_method.d.ts.map +1 -1
  77. package/dest/contract/deploy_method.js +14 -11
  78. package/dest/contract/deploy_sent_tx.d.ts +12 -7
  79. package/dest/contract/deploy_sent_tx.d.ts.map +1 -1
  80. package/dest/contract/deploy_sent_tx.js +10 -4
  81. package/dest/contract/get_gas_limits.d.ts +1 -1
  82. package/dest/contract/interaction_options.d.ts +4 -4
  83. package/dest/contract/interaction_options.d.ts.map +1 -1
  84. package/dest/contract/interaction_options.js +4 -10
  85. package/dest/contract/protocol_contracts/auth-registry.d.ts +36 -0
  86. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
  87. package/dest/contract/protocol_contracts/auth-registry.js +976 -0
  88. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +35 -0
  89. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
  90. package/dest/contract/protocol_contracts/contract-class-registry.js +797 -0
  91. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +31 -0
  92. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
  93. package/dest/contract/protocol_contracts/contract-instance-registry.js +871 -0
  94. package/dest/contract/protocol_contracts/fee-juice.d.ts +30 -0
  95. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
  96. package/dest/contract/protocol_contracts/fee-juice.js +840 -0
  97. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +34 -0
  98. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -0
  99. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +576 -0
  100. package/dest/contract/protocol_contracts/public-checks.d.ts +26 -0
  101. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -0
  102. package/dest/contract/protocol_contracts/public-checks.js +592 -0
  103. package/dest/contract/sent_tx.d.ts +2 -3
  104. package/dest/contract/sent_tx.d.ts.map +1 -1
  105. package/dest/contract/sent_tx.js +1 -1
  106. package/dest/contract/wait_for_proven.d.ts +2 -2
  107. package/dest/contract/wait_for_proven.d.ts.map +1 -1
  108. package/dest/deployment/broadcast_function.d.ts +1 -1
  109. package/dest/deployment/broadcast_function.js +4 -4
  110. package/dest/deployment/contract_deployer.d.ts +1 -1
  111. package/dest/deployment/contract_deployer.d.ts.map +1 -1
  112. package/dest/deployment/contract_deployer.js +1 -1
  113. package/dest/deployment/publish_class.d.ts +1 -1
  114. package/dest/deployment/publish_class.js +3 -3
  115. package/dest/deployment/publish_instance.d.ts +2 -2
  116. package/dest/deployment/publish_instance.d.ts.map +1 -1
  117. package/dest/deployment/publish_instance.js +3 -3
  118. package/dest/ethereum/portal_manager.d.ts +7 -6
  119. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  120. package/dest/ethereum/portal_manager.js +48 -22
  121. package/dest/fee/fee_juice_payment_method_with_claim.d.ts +2 -2
  122. package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
  123. package/dest/fee/fee_juice_payment_method_with_claim.js +3 -3
  124. package/dest/fee/fee_payment_method.d.ts +2 -2
  125. package/dest/fee/fee_payment_method.d.ts.map +1 -1
  126. package/dest/fee/private_fee_payment_method.d.ts +2 -2
  127. package/dest/fee/private_fee_payment_method.d.ts.map +1 -1
  128. package/dest/fee/private_fee_payment_method.js +4 -4
  129. package/dest/fee/public_fee_payment_method.d.ts +2 -2
  130. package/dest/fee/public_fee_payment_method.d.ts.map +1 -1
  131. package/dest/fee/public_fee_payment_method.js +4 -4
  132. package/dest/fee/sponsored_fee_payment.d.ts +2 -2
  133. package/dest/fee/sponsored_fee_payment.d.ts.map +1 -1
  134. package/dest/fee/sponsored_fee_payment.js +2 -2
  135. package/dest/scripts/generate_protocol_contract_types.d.ts +2 -0
  136. package/dest/scripts/generate_protocol_contract_types.d.ts.map +1 -0
  137. package/dest/scripts/generate_protocol_contract_types.js +120 -0
  138. package/dest/utils/abi_types.d.ts +2 -2
  139. package/dest/utils/abi_types.d.ts.map +1 -1
  140. package/dest/utils/authwit.d.ts +9 -7
  141. package/dest/utils/authwit.d.ts.map +1 -1
  142. package/dest/utils/authwit.js +25 -14
  143. package/dest/utils/cross_chain.d.ts +2 -2
  144. package/dest/utils/cross_chain.d.ts.map +1 -1
  145. package/dest/utils/fee_juice.d.ts +2 -2
  146. package/dest/utils/fee_juice.js +2 -2
  147. package/dest/utils/field_compressed_string.d.ts +1 -1
  148. package/dest/utils/field_compressed_string.d.ts.map +1 -1
  149. package/dest/utils/field_compressed_string.js +1 -1
  150. package/dest/utils/node.d.ts +2 -2
  151. package/dest/utils/node.d.ts.map +1 -1
  152. package/dest/utils/pub_key.d.ts +2 -2
  153. package/dest/utils/pub_key.d.ts.map +1 -1
  154. package/dest/utils/pub_key.js +1 -1
  155. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +6 -9
  156. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
  157. package/dest/wallet/account_entrypoint_meta_payment_method.js +29 -44
  158. package/dest/wallet/account_manager.d.ts +3 -9
  159. package/dest/wallet/account_manager.d.ts.map +1 -1
  160. package/dest/wallet/account_manager.js +6 -12
  161. package/dest/wallet/deploy_account_method.d.ts +20 -6
  162. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  163. package/dest/wallet/deploy_account_method.js +9 -7
  164. package/dest/wallet/index.d.ts +1 -2
  165. package/dest/wallet/index.d.ts.map +1 -1
  166. package/dest/wallet/index.js +0 -1
  167. package/dest/wallet/wallet.d.ts +273 -1499
  168. package/dest/wallet/wallet.d.ts.map +1 -1
  169. package/dest/wallet/wallet.js +71 -114
  170. package/package.json +16 -13
  171. package/src/account/account.ts +35 -60
  172. package/src/account/account_contract.ts +7 -8
  173. package/src/account/account_with_secret_key.ts +34 -9
  174. package/src/account/index.ts +3 -2
  175. package/src/account/signerless_account.ts +15 -15
  176. package/src/api/account.ts +10 -3
  177. package/src/api/authorization.ts +1 -0
  178. package/src/api/block.ts +1 -1
  179. package/src/api/contract.ts +2 -1
  180. package/src/api/fields.ts +2 -1
  181. package/src/api/note.ts +1 -1
  182. package/src/api/protocol.ts +7 -0
  183. package/src/api/tx.ts +2 -0
  184. package/src/api/wallet.ts +5 -9
  185. package/src/authorization/call_authorization_request.ts +1 -1
  186. package/src/contract/base_contract_interaction.ts +2 -3
  187. package/src/contract/batch_call.ts +67 -48
  188. package/src/contract/contract.ts +7 -5
  189. package/src/contract/contract_base.ts +5 -15
  190. package/src/contract/contract_function_interaction.ts +10 -11
  191. package/src/contract/deploy_method.ts +20 -18
  192. package/src/contract/deploy_sent_tx.ts +17 -10
  193. package/src/contract/interaction_options.ts +4 -10
  194. package/src/contract/protocol_contracts/auth-registry.ts +554 -0
  195. package/src/contract/protocol_contracts/contract-class-registry.ts +442 -0
  196. package/src/contract/protocol_contracts/contract-instance-registry.ts +502 -0
  197. package/src/contract/protocol_contracts/fee-juice.ts +466 -0
  198. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +338 -0
  199. package/src/contract/protocol_contracts/public-checks.ts +324 -0
  200. package/src/contract/sent_tx.ts +2 -3
  201. package/src/deployment/broadcast_function.ts +4 -4
  202. package/src/deployment/contract_deployer.ts +3 -2
  203. package/src/deployment/publish_class.ts +3 -3
  204. package/src/deployment/publish_instance.ts +3 -6
  205. package/src/ethereum/portal_manager.ts +65 -34
  206. package/src/fee/fee_juice_payment_method_with_claim.ts +4 -2
  207. package/src/fee/fee_payment_method.ts +1 -1
  208. package/src/fee/private_fee_payment_method.ts +5 -3
  209. package/src/fee/public_fee_payment_method.ts +5 -3
  210. package/src/fee/sponsored_fee_payment.ts +3 -1
  211. package/src/scripts/generate_protocol_contract_types.ts +150 -0
  212. package/src/utils/abi_types.ts +1 -1
  213. package/src/utils/authwit.ts +24 -18
  214. package/src/utils/cross_chain.ts +1 -1
  215. package/src/utils/fee_juice.ts +2 -2
  216. package/src/utils/field_compressed_string.ts +1 -1
  217. package/src/utils/pub_key.ts +2 -2
  218. package/src/wallet/account_entrypoint_meta_payment_method.ts +29 -60
  219. package/src/wallet/account_manager.ts +7 -15
  220. package/src/wallet/deploy_account_method.ts +23 -13
  221. package/src/wallet/index.ts +0 -1
  222. package/src/wallet/wallet.ts +177 -142
  223. package/dest/account/interface.d.ts +0 -19
  224. package/dest/account/interface.d.ts.map +0 -1
  225. package/dest/account/interface.js +0 -5
  226. package/dest/contract/protocol_contracts.d.ts +0 -9
  227. package/dest/contract/protocol_contracts.d.ts.map +0 -1
  228. package/dest/contract/protocol_contracts.js +0 -26
  229. package/dest/contract/unsafe_contract.d.ts +0 -15
  230. package/dest/contract/unsafe_contract.d.ts.map +0 -1
  231. package/dest/contract/unsafe_contract.js +0 -6
  232. package/dest/wallet/base_wallet.d.ts +0 -91
  233. package/dest/wallet/base_wallet.d.ts.map +0 -1
  234. package/dest/wallet/base_wallet.js +0 -238
  235. package/src/account/interface.ts +0 -25
  236. package/src/contract/protocol_contracts.ts +0 -35
  237. package/src/contract/unsafe_contract.ts +0 -19
  238. package/src/wallet/base_wallet.ts +0 -350
@@ -0,0 +1,976 @@
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
+ '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: [
404
+ {
405
+ name: 'selector',
406
+ type: {
407
+ kind: 'field'
408
+ },
409
+ visibility: 'private'
410
+ }
411
+ ],
412
+ returnTypes: [],
413
+ errorTypes: {
414
+ '361444214588792908': {
415
+ error_kind: 'string',
416
+ string: 'attempt to multiply with overflow'
417
+ },
418
+ '1998584279744703196': {
419
+ error_kind: 'string',
420
+ string: 'attempt to subtract with overflow'
421
+ },
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
+ '13455385521185560676': {
440
+ error_kind: 'string',
441
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
442
+ },
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
+ '14990209321349310352': {
603
+ error_kind: 'string',
604
+ string: 'attempt to add with overflow'
605
+ },
606
+ '15764276373176857197': {
607
+ error_kind: 'string',
608
+ string: 'Stack too deep'
609
+ },
610
+ '16431471497789672479': {
611
+ error_kind: 'string',
612
+ 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
+ }
625
+ }
626
+ },
627
+ bytecode: Buffer.from([]),
628
+ debugSymbols: ''
629
+ }
630
+ ],
631
+ nonDispatchPublicFunctions: [
632
+ {
633
+ functionType: FunctionType.PUBLIC,
634
+ name: '_set_authorized',
635
+ isOnlySelf: true,
636
+ isStatic: false,
637
+ isInitializer: false,
638
+ parameters: [
639
+ {
640
+ name: 'approver',
641
+ type: {
642
+ kind: 'struct',
643
+ fields: [
644
+ {
645
+ name: 'inner',
646
+ type: {
647
+ kind: 'field'
648
+ }
649
+ }
650
+ ],
651
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
652
+ },
653
+ visibility: 'private'
654
+ },
655
+ {
656
+ name: 'message_hash',
657
+ type: {
658
+ kind: 'field'
659
+ },
660
+ visibility: 'private'
661
+ },
662
+ {
663
+ name: 'authorize',
664
+ type: {
665
+ kind: 'boolean'
666
+ },
667
+ visibility: 'private'
668
+ }
669
+ ],
670
+ returnTypes: [],
671
+ errorTypes: {
672
+ '361444214588792908': {
673
+ error_kind: 'string',
674
+ string: 'attempt to multiply with overflow'
675
+ },
676
+ '1998584279744703196': {
677
+ error_kind: 'string',
678
+ string: 'attempt to subtract with overflow'
679
+ },
680
+ '13455385521185560676': {
681
+ error_kind: 'string',
682
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
683
+ },
684
+ '13929691561421487185': {
685
+ error_kind: 'string',
686
+ string: 'Function _set_authorized can only be called by the same contract'
687
+ },
688
+ '14990209321349310352': {
689
+ error_kind: 'string',
690
+ string: 'attempt to add with overflow'
691
+ },
692
+ '15764276373176857197': {
693
+ error_kind: 'string',
694
+ string: 'Stack too deep'
695
+ },
696
+ '16431471497789672479': {
697
+ error_kind: 'string',
698
+ string: 'Index out of bounds'
699
+ }
700
+ }
701
+ },
702
+ {
703
+ functionType: FunctionType.PUBLIC,
704
+ name: 'consume',
705
+ isOnlySelf: false,
706
+ isStatic: false,
707
+ isInitializer: false,
708
+ parameters: [
709
+ {
710
+ name: 'on_behalf_of',
711
+ type: {
712
+ kind: 'struct',
713
+ fields: [
714
+ {
715
+ name: 'inner',
716
+ type: {
717
+ kind: 'field'
718
+ }
719
+ }
720
+ ],
721
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
722
+ },
723
+ visibility: 'private'
724
+ },
725
+ {
726
+ name: 'inner_hash',
727
+ type: {
728
+ kind: 'field'
729
+ },
730
+ visibility: 'private'
731
+ }
732
+ ],
733
+ returnTypes: [
734
+ {
735
+ kind: 'field'
736
+ }
737
+ ],
738
+ errorTypes: {
739
+ '361444214588792908': {
740
+ error_kind: 'string',
741
+ string: 'attempt to multiply with overflow'
742
+ },
743
+ '1998584279744703196': {
744
+ error_kind: 'string',
745
+ string: 'attempt to subtract with overflow'
746
+ },
747
+ '5525725861591553972': {
748
+ error_kind: 'string',
749
+ string: 'rejecting all'
750
+ },
751
+ '13455385521185560676': {
752
+ error_kind: 'string',
753
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
754
+ },
755
+ '14990209321349310352': {
756
+ error_kind: 'string',
757
+ string: 'attempt to add with overflow'
758
+ },
759
+ '15764276373176857197': {
760
+ error_kind: 'string',
761
+ string: 'Stack too deep'
762
+ },
763
+ '16431471497789672479': {
764
+ error_kind: 'string',
765
+ string: 'Index out of bounds'
766
+ },
767
+ '17089945683942782951': {
768
+ error_kind: 'string',
769
+ string: 'unauthorized'
770
+ }
771
+ }
772
+ },
773
+ {
774
+ functionType: FunctionType.PUBLIC,
775
+ name: 'is_consumable',
776
+ isOnlySelf: false,
777
+ isStatic: true,
778
+ isInitializer: false,
779
+ parameters: [
780
+ {
781
+ name: 'on_behalf_of',
782
+ type: {
783
+ kind: 'struct',
784
+ fields: [
785
+ {
786
+ name: 'inner',
787
+ type: {
788
+ kind: 'field'
789
+ }
790
+ }
791
+ ],
792
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
793
+ },
794
+ visibility: 'private'
795
+ },
796
+ {
797
+ name: 'message_hash',
798
+ type: {
799
+ kind: 'field'
800
+ },
801
+ visibility: 'private'
802
+ }
803
+ ],
804
+ returnTypes: [
805
+ {
806
+ kind: 'boolean'
807
+ }
808
+ ],
809
+ errorTypes: {
810
+ '361444214588792908': {
811
+ error_kind: 'string',
812
+ string: 'attempt to multiply with overflow'
813
+ },
814
+ '1998584279744703196': {
815
+ error_kind: 'string',
816
+ string: 'attempt to subtract with overflow'
817
+ },
818
+ '13455385521185560676': {
819
+ error_kind: 'string',
820
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
821
+ },
822
+ '14990209321349310352': {
823
+ error_kind: 'string',
824
+ string: 'attempt to add with overflow'
825
+ },
826
+ '15764276373176857197': {
827
+ error_kind: 'string',
828
+ string: 'Stack too deep'
829
+ },
830
+ '16431471497789672479': {
831
+ error_kind: 'string',
832
+ string: 'Index out of bounds'
833
+ },
834
+ '17312933876399746100': {
835
+ error_kind: 'string',
836
+ string: 'Function is_consumable can only be called statically'
837
+ }
838
+ }
839
+ },
840
+ {
841
+ functionType: FunctionType.PUBLIC,
842
+ name: 'is_reject_all',
843
+ isOnlySelf: false,
844
+ isStatic: true,
845
+ isInitializer: false,
846
+ parameters: [
847
+ {
848
+ name: 'on_behalf_of',
849
+ type: {
850
+ kind: 'struct',
851
+ fields: [
852
+ {
853
+ name: 'inner',
854
+ type: {
855
+ kind: 'field'
856
+ }
857
+ }
858
+ ],
859
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
860
+ },
861
+ visibility: 'private'
862
+ }
863
+ ],
864
+ returnTypes: [
865
+ {
866
+ kind: 'boolean'
867
+ }
868
+ ],
869
+ errorTypes: {
870
+ '11691217184967371519': {
871
+ error_kind: 'string',
872
+ string: 'Function is_reject_all can only be called statically'
873
+ },
874
+ '13455385521185560676': {
875
+ error_kind: 'string',
876
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
877
+ },
878
+ '15764276373176857197': {
879
+ error_kind: 'string',
880
+ string: 'Stack too deep'
881
+ }
882
+ }
883
+ },
884
+ {
885
+ functionType: FunctionType.PUBLIC,
886
+ name: 'set_authorized',
887
+ isOnlySelf: false,
888
+ isStatic: false,
889
+ isInitializer: false,
890
+ parameters: [
891
+ {
892
+ name: 'message_hash',
893
+ type: {
894
+ kind: 'field'
895
+ },
896
+ visibility: 'private'
897
+ },
898
+ {
899
+ name: 'authorize',
900
+ type: {
901
+ kind: 'boolean'
902
+ },
903
+ visibility: 'private'
904
+ }
905
+ ],
906
+ returnTypes: [],
907
+ errorTypes: {
908
+ '361444214588792908': {
909
+ error_kind: 'string',
910
+ string: 'attempt to multiply with overflow'
911
+ },
912
+ '1998584279744703196': {
913
+ error_kind: 'string',
914
+ string: 'attempt to subtract with overflow'
915
+ },
916
+ '13455385521185560676': {
917
+ error_kind: 'string',
918
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
919
+ },
920
+ '14990209321349310352': {
921
+ error_kind: 'string',
922
+ string: 'attempt to add with overflow'
923
+ },
924
+ '15764276373176857197': {
925
+ error_kind: 'string',
926
+ string: 'Stack too deep'
927
+ },
928
+ '16431471497789672479': {
929
+ error_kind: 'string',
930
+ string: 'Index out of bounds'
931
+ }
932
+ }
933
+ },
934
+ {
935
+ functionType: FunctionType.PUBLIC,
936
+ name: 'set_reject_all',
937
+ isOnlySelf: false,
938
+ isStatic: false,
939
+ isInitializer: false,
940
+ parameters: [
941
+ {
942
+ name: 'reject',
943
+ type: {
944
+ kind: 'boolean'
945
+ },
946
+ visibility: 'private'
947
+ }
948
+ ],
949
+ returnTypes: [],
950
+ errorTypes: {
951
+ '13455385521185560676': {
952
+ error_kind: 'string',
953
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.'
954
+ },
955
+ '15764276373176857197': {
956
+ error_kind: 'string',
957
+ string: 'Stack too deep'
958
+ }
959
+ }
960
+ }
961
+ ],
962
+ outputs: {
963
+ structs: {},
964
+ globals: {}
965
+ },
966
+ storageLayout: {},
967
+ fileMap: {}
968
+ };
969
+ export class AuthRegistryContract extends ContractBase {
970
+ constructor(wallet){
971
+ super(ProtocolContractAddress.AuthRegistry, AuthRegistryContractArtifact, wallet);
972
+ }
973
+ static at(wallet) {
974
+ return new AuthRegistryContract(wallet);
975
+ }
976
+ }