@aztec/aztec.js 3.0.3 → 4.0.0-devnet.1-patch.0

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 +1 -1
  53. package/dest/contract/batch_call.d.ts.map +1 -1
  54. package/dest/contract/batch_call.js +3 -1
  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 +6 -6
  60. package/dest/contract/deploy_method.d.ts +63 -16
  61. package/dest/contract/deploy_method.d.ts.map +1 -1
  62. package/dest/contract/deploy_method.js +41 -23
  63. package/dest/contract/interaction_options.d.ts +42 -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 +27 -0
  67. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
  68. package/dest/contract/protocol_contracts/auth-registry.js +558 -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 +127 -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 +585 -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 +593 -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 +7 -4
  95. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  96. package/dest/ethereum/portal_manager.js +15 -16
  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 +444 -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 +34 -6
  120. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  121. package/dest/wallet/deploy_account_method.js +7 -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 +1642 -1007
  126. package/dest/wallet/wallet.d.ts.map +1 -1
  127. package/dest/wallet/wallet.js +201 -107
  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 +47 -3
  145. package/src/contract/base_contract_interaction.ts +27 -15
  146. package/src/contract/batch_call.ts +4 -2
  147. package/src/contract/contract_function_interaction.ts +13 -6
  148. package/src/contract/deploy_method.ts +122 -29
  149. package/src/contract/interaction_options.ts +49 -4
  150. package/src/contract/protocol_contracts/auth-registry.ts +351 -0
  151. package/src/contract/protocol_contracts/contract-class-registry.ts +96 -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 +332 -0
  155. package/src/contract/protocol_contracts/public-checks.ts +316 -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 +17 -21
  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 +491 -0
  171. package/src/wallet/deploy_account_method.ts +37 -13
  172. package/src/wallet/index.ts +1 -0
  173. package/src/wallet/wallet.ts +319 -118
  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,351 @@
1
+ /* Autogenerated file, do not edit! */
2
+ /* eslint-disable */
3
+ import { ProtocolContractAddress } from '@aztec/protocol-contracts';
4
+ import { FunctionType } from '@aztec/stdlib/abi';
5
+
6
+ import type { ContractArtifact } from '../../api/abi.js';
7
+ import { PublicKeys } from '../../api/keys.js';
8
+ import type {
9
+ AztecAddressLike,
10
+ EthAddressLike,
11
+ FieldLike,
12
+ FunctionSelectorLike,
13
+ WrappedFieldLike,
14
+ } from '../../utils/abi_types.js';
15
+ import type { Wallet } from '../../wallet/wallet.js';
16
+ import { ContractBase, type ContractMethod } from '../contract_base.js';
17
+ import { ContractFunctionInteraction } from '../contract_function_interaction.js';
18
+
19
+ const AuthRegistryContractArtifact: ContractArtifact = {
20
+ name: 'AuthRegistry',
21
+ functions: [
22
+ {
23
+ ...{
24
+ functionType: FunctionType.PUBLIC,
25
+ name: 'public_dispatch',
26
+ isOnlySelf: false,
27
+ isStatic: false,
28
+ isInitializer: false,
29
+ parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
30
+ returnTypes: [],
31
+ errorTypes: {
32
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
33
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
34
+ '5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
35
+ '11691217184967371519': {
36
+ error_kind: 'string',
37
+ string: 'Function is_reject_all can only be called statically',
38
+ },
39
+ '12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
40
+ '13455385521185560676': {
41
+ error_kind: 'string',
42
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
43
+ },
44
+ '13929691561421487185': {
45
+ error_kind: 'string',
46
+ string: 'Function _set_authorized can only be called by the same contract',
47
+ },
48
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
49
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
50
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
51
+ '17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
52
+ '17312933876399746100': {
53
+ error_kind: 'string',
54
+ string: 'Function is_consumable can only be called statically',
55
+ },
56
+ },
57
+ },
58
+ bytecode: Buffer.from([]),
59
+ debugSymbols: '',
60
+ },
61
+ {
62
+ ...{
63
+ functionType: FunctionType.PRIVATE,
64
+ name: 'set_authorized_private',
65
+ isOnlySelf: false,
66
+ isStatic: false,
67
+ isInitializer: false,
68
+ parameters: [
69
+ {
70
+ name: 'approver',
71
+ type: {
72
+ kind: 'struct',
73
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
74
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
75
+ },
76
+ visibility: 'private',
77
+ },
78
+ { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
79
+ { name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
80
+ ],
81
+ returnTypes: [],
82
+ errorTypes: {
83
+ '7555607922535724711': { error_kind: 'string', string: 'Preimage mismatch' },
84
+ '9894212961085021188': { error_kind: 'string', string: 'Message not authorized by account' },
85
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
86
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
87
+ },
88
+ },
89
+ bytecode: Buffer.from([]),
90
+ debugSymbols: '',
91
+ },
92
+ {
93
+ ...{
94
+ functionType: FunctionType.UTILITY,
95
+ name: 'utility_is_consumable',
96
+ isOnlySelf: false,
97
+ isStatic: false,
98
+ isInitializer: false,
99
+ parameters: [
100
+ {
101
+ name: 'on_behalf_of',
102
+ type: {
103
+ kind: 'struct',
104
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
105
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
106
+ },
107
+ visibility: 'private',
108
+ },
109
+ { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
110
+ ],
111
+ returnTypes: [{ kind: 'boolean' }],
112
+ errorTypes: {
113
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
114
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
115
+ '13455385521185560676': {
116
+ error_kind: 'string',
117
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
118
+ },
119
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
120
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
121
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
122
+ },
123
+ },
124
+ bytecode: Buffer.from([]),
125
+ debugSymbols: '',
126
+ },
127
+ ],
128
+ nonDispatchPublicFunctions: [
129
+ {
130
+ functionType: FunctionType.PUBLIC,
131
+ name: '_set_authorized',
132
+ isOnlySelf: true,
133
+ isStatic: false,
134
+ isInitializer: false,
135
+ parameters: [
136
+ {
137
+ name: 'approver',
138
+ type: {
139
+ kind: 'struct',
140
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
141
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
142
+ },
143
+ visibility: 'private',
144
+ },
145
+ { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
146
+ { name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
147
+ ],
148
+ returnTypes: [],
149
+ errorTypes: {
150
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
151
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
152
+ '13455385521185560676': {
153
+ error_kind: 'string',
154
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
155
+ },
156
+ '13929691561421487185': {
157
+ error_kind: 'string',
158
+ string: 'Function _set_authorized can only be called by the same contract',
159
+ },
160
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
161
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
162
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
163
+ },
164
+ },
165
+ {
166
+ functionType: FunctionType.PUBLIC,
167
+ name: 'consume',
168
+ isOnlySelf: false,
169
+ isStatic: false,
170
+ isInitializer: false,
171
+ parameters: [
172
+ {
173
+ name: 'on_behalf_of',
174
+ type: {
175
+ kind: 'struct',
176
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
177
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
178
+ },
179
+ visibility: 'private',
180
+ },
181
+ { name: 'inner_hash', type: { kind: 'field' }, visibility: 'private' },
182
+ ],
183
+ returnTypes: [{ kind: 'field' }],
184
+ errorTypes: {
185
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
186
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
187
+ '5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
188
+ '13455385521185560676': {
189
+ error_kind: 'string',
190
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
191
+ },
192
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
193
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
194
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
195
+ '17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
196
+ },
197
+ },
198
+ {
199
+ functionType: FunctionType.PUBLIC,
200
+ name: 'is_consumable',
201
+ isOnlySelf: false,
202
+ isStatic: true,
203
+ isInitializer: false,
204
+ parameters: [
205
+ {
206
+ name: 'on_behalf_of',
207
+ type: {
208
+ kind: 'struct',
209
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
210
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
211
+ },
212
+ visibility: 'private',
213
+ },
214
+ { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
215
+ ],
216
+ returnTypes: [{ kind: 'boolean' }],
217
+ errorTypes: {
218
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
219
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
220
+ '13455385521185560676': {
221
+ error_kind: 'string',
222
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
223
+ },
224
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
225
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
226
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
227
+ '17312933876399746100': {
228
+ error_kind: 'string',
229
+ string: 'Function is_consumable can only be called statically',
230
+ },
231
+ },
232
+ },
233
+ {
234
+ functionType: FunctionType.PUBLIC,
235
+ name: 'is_reject_all',
236
+ isOnlySelf: false,
237
+ isStatic: true,
238
+ isInitializer: false,
239
+ parameters: [
240
+ {
241
+ name: 'on_behalf_of',
242
+ type: {
243
+ kind: 'struct',
244
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
245
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
246
+ },
247
+ visibility: 'private',
248
+ },
249
+ ],
250
+ returnTypes: [{ kind: 'boolean' }],
251
+ errorTypes: {
252
+ '11691217184967371519': {
253
+ error_kind: 'string',
254
+ string: 'Function is_reject_all can only be called statically',
255
+ },
256
+ '13455385521185560676': {
257
+ error_kind: 'string',
258
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
259
+ },
260
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
261
+ },
262
+ },
263
+ {
264
+ functionType: FunctionType.PUBLIC,
265
+ name: 'set_authorized',
266
+ isOnlySelf: false,
267
+ isStatic: false,
268
+ isInitializer: false,
269
+ parameters: [
270
+ { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
271
+ { name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
272
+ ],
273
+ returnTypes: [],
274
+ errorTypes: {
275
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
276
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
277
+ '13455385521185560676': {
278
+ error_kind: 'string',
279
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
280
+ },
281
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
282
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
283
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
284
+ },
285
+ },
286
+ {
287
+ functionType: FunctionType.PUBLIC,
288
+ name: 'set_reject_all',
289
+ isOnlySelf: false,
290
+ isStatic: false,
291
+ isInitializer: false,
292
+ parameters: [{ name: 'reject', type: { kind: 'boolean' }, visibility: 'private' }],
293
+ returnTypes: [],
294
+ errorTypes: {
295
+ '13455385521185560676': {
296
+ error_kind: 'string',
297
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
298
+ },
299
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
300
+ },
301
+ },
302
+ ],
303
+ outputs: { structs: {}, globals: {} },
304
+ storageLayout: {},
305
+ fileMap: {},
306
+ };
307
+
308
+ export class AuthRegistryContract extends ContractBase {
309
+ private constructor(wallet: Wallet) {
310
+ super(ProtocolContractAddress.AuthRegistry, AuthRegistryContractArtifact, wallet);
311
+ }
312
+
313
+ public static at(wallet: Wallet): AuthRegistryContract {
314
+ return new AuthRegistryContract(wallet);
315
+ }
316
+
317
+ declare public methods: {
318
+ /** consume(on_behalf_of: struct, inner_hash: field) */
319
+ consume: ((on_behalf_of: AztecAddressLike, inner_hash: FieldLike) => ContractFunctionInteraction) &
320
+ Pick<ContractMethod, 'selector'>;
321
+
322
+ /** is_consumable(on_behalf_of: struct, message_hash: field) */
323
+ is_consumable: ((on_behalf_of: AztecAddressLike, message_hash: FieldLike) => ContractFunctionInteraction) &
324
+ Pick<ContractMethod, 'selector'>;
325
+
326
+ /** is_reject_all(on_behalf_of: struct) */
327
+ is_reject_all: ((on_behalf_of: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
328
+
329
+ /** public_dispatch(selector: field) */
330
+ public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
331
+
332
+ /** set_authorized(message_hash: field, authorize: boolean) */
333
+ set_authorized: ((message_hash: FieldLike, authorize: boolean) => ContractFunctionInteraction) &
334
+ Pick<ContractMethod, 'selector'>;
335
+
336
+ /** set_authorized_private(approver: struct, message_hash: field, authorize: boolean) */
337
+ set_authorized_private: ((
338
+ approver: AztecAddressLike,
339
+ message_hash: FieldLike,
340
+ authorize: boolean,
341
+ ) => ContractFunctionInteraction) &
342
+ Pick<ContractMethod, 'selector'>;
343
+
344
+ /** set_reject_all(reject: boolean) */
345
+ set_reject_all: ((reject: boolean) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
346
+
347
+ /** utility_is_consumable(on_behalf_of: struct, message_hash: field) */
348
+ utility_is_consumable: ((on_behalf_of: AztecAddressLike, message_hash: FieldLike) => ContractFunctionInteraction) &
349
+ Pick<ContractMethod, 'selector'>;
350
+ };
351
+ }
@@ -0,0 +1,96 @@
1
+ /* Autogenerated file, do not edit! */
2
+ /* eslint-disable */
3
+ import { ProtocolContractAddress } from '@aztec/protocol-contracts';
4
+ import { FunctionType } from '@aztec/stdlib/abi';
5
+
6
+ import type { ContractArtifact } from '../../api/abi.js';
7
+ import { PublicKeys } from '../../api/keys.js';
8
+ import type {
9
+ AztecAddressLike,
10
+ EthAddressLike,
11
+ FieldLike,
12
+ FunctionSelectorLike,
13
+ WrappedFieldLike,
14
+ } from '../../utils/abi_types.js';
15
+ import type { Wallet } from '../../wallet/wallet.js';
16
+ import { ContractBase, type ContractMethod } from '../contract_base.js';
17
+ import { ContractFunctionInteraction } from '../contract_function_interaction.js';
18
+
19
+ const ContractClassRegistryContractArtifact: ContractArtifact = {
20
+ name: 'ContractClassRegistry',
21
+ functions: [
22
+ {
23
+ ...{
24
+ functionType: FunctionType.PRIVATE,
25
+ name: 'publish',
26
+ isOnlySelf: false,
27
+ isStatic: false,
28
+ isInitializer: false,
29
+ parameters: [
30
+ { name: 'artifact_hash', type: { kind: 'field' }, visibility: 'private' },
31
+ { name: 'private_functions_root', type: { kind: 'field' }, visibility: 'private' },
32
+ { name: 'public_bytecode_commitment', type: { kind: 'field' }, visibility: 'private' },
33
+ ],
34
+ returnTypes: [],
35
+ errorTypes: {
36
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
37
+ '922421554006670918': { error_kind: 'string', string: 'num_items is greater than MAX_ITEMS' },
38
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
39
+ '10965409165809799877': {
40
+ error_kind: 'string',
41
+ string: 'Given in_len to absorb is larger than the input array len',
42
+ },
43
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
44
+ '15669273164684982983': { error_kind: 'string', string: 'num_permutations is greater than MAX_PERMUTATIONS' },
45
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
46
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
47
+ '16450579948625159707': { error_kind: 'string', string: 'Sponge must be in cache_size=1' },
48
+ '17655676068928457687': { error_kind: 'string', string: 'Reader did not read all data' },
49
+ },
50
+ },
51
+ bytecode: Buffer.from([]),
52
+ debugSymbols: '',
53
+ },
54
+ {
55
+ ...{
56
+ functionType: FunctionType.PUBLIC,
57
+ name: 'public_dispatch',
58
+ isOnlySelf: false,
59
+ isStatic: false,
60
+ isInitializer: false,
61
+ parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
62
+ returnTypes: [],
63
+ errorTypes: { '1335198680857977525': { error_kind: 'string', string: 'No public functions' } },
64
+ },
65
+ bytecode: Buffer.from([]),
66
+ debugSymbols: '',
67
+ },
68
+ ],
69
+ nonDispatchPublicFunctions: [],
70
+ outputs: { structs: {}, globals: {} },
71
+ storageLayout: {},
72
+ fileMap: {},
73
+ };
74
+
75
+ export class ContractClassRegistryContract extends ContractBase {
76
+ private constructor(wallet: Wallet) {
77
+ super(ProtocolContractAddress.ContractClassRegistry, ContractClassRegistryContractArtifact, wallet);
78
+ }
79
+
80
+ public static at(wallet: Wallet): ContractClassRegistryContract {
81
+ return new ContractClassRegistryContract(wallet);
82
+ }
83
+
84
+ declare public methods: {
85
+ /** public_dispatch(selector: field) */
86
+ public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
87
+
88
+ /** publish(artifact_hash: field, private_functions_root: field, public_bytecode_commitment: field) */
89
+ publish: ((
90
+ artifact_hash: FieldLike,
91
+ private_functions_root: FieldLike,
92
+ public_bytecode_commitment: FieldLike,
93
+ ) => ContractFunctionInteraction) &
94
+ Pick<ContractMethod, 'selector'>;
95
+ };
96
+ }