@aztec/aztec.js 0.0.1-commit.d3ec352c → 0.0.1-commit.f295ac2

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 (139) hide show
  1. package/dest/account/account.d.ts +4 -4
  2. package/dest/account/account.d.ts.map +1 -1
  3. package/dest/account/account.js +1 -1
  4. package/dest/account/account_contract.d.ts +3 -3
  5. package/dest/account/account_contract.d.ts.map +1 -1
  6. package/dest/account/account_with_secret_key.d.ts +4 -3
  7. package/dest/account/account_with_secret_key.d.ts.map +1 -1
  8. package/dest/account/index.d.ts +2 -2
  9. package/dest/account/index.d.ts.map +1 -1
  10. package/dest/account/interface.d.ts +2 -2
  11. package/dest/account/interface.d.ts.map +1 -1
  12. package/dest/account/signerless_account.d.ts +2 -2
  13. package/dest/account/signerless_account.d.ts.map +1 -1
  14. package/dest/api/block.d.ts +2 -2
  15. package/dest/api/block.d.ts.map +1 -1
  16. package/dest/api/block.js +1 -1
  17. package/dest/api/fields.d.ts +3 -2
  18. package/dest/api/fields.d.ts.map +1 -1
  19. package/dest/api/fields.js +2 -1
  20. package/dest/api/protocol.d.ts +7 -1
  21. package/dest/api/protocol.d.ts.map +1 -1
  22. package/dest/api/protocol.js +6 -0
  23. package/dest/api/wallet.d.ts +2 -2
  24. package/dest/api/wallet.d.ts.map +1 -1
  25. package/dest/api/wallet.js +1 -1
  26. package/dest/authorization/call_authorization_request.d.ts +23 -2
  27. package/dest/authorization/call_authorization_request.d.ts.map +1 -1
  28. package/dest/contract/batch_call.d.ts +1 -1
  29. package/dest/contract/batch_call.d.ts.map +1 -1
  30. package/dest/contract/batch_call.js +3 -1
  31. package/dest/contract/contract_base.d.ts +4 -1
  32. package/dest/contract/contract_base.d.ts.map +1 -1
  33. package/dest/contract/contract_function_interaction.d.ts +1 -1
  34. package/dest/contract/deploy_method.d.ts +2 -2
  35. package/dest/contract/deploy_method.d.ts.map +1 -1
  36. package/dest/contract/deploy_method.js +6 -5
  37. package/dest/contract/protocol_contracts/auth-registry.d.ts +36 -0
  38. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
  39. package/dest/contract/protocol_contracts/auth-registry.js +928 -0
  40. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +35 -0
  41. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
  42. package/dest/contract/protocol_contracts/contract-class-registry.js +797 -0
  43. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +31 -0
  44. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
  45. package/dest/contract/protocol_contracts/contract-instance-registry.js +867 -0
  46. package/dest/contract/protocol_contracts/fee-juice.d.ts +30 -0
  47. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
  48. package/dest/contract/protocol_contracts/fee-juice.js +824 -0
  49. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +34 -0
  50. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -0
  51. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +576 -0
  52. package/dest/contract/protocol_contracts/public-checks.d.ts +26 -0
  53. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -0
  54. package/dest/contract/protocol_contracts/public-checks.js +592 -0
  55. package/dest/contract/sent_tx.d.ts +2 -3
  56. package/dest/contract/sent_tx.d.ts.map +1 -1
  57. package/dest/contract/wait_for_proven.d.ts +2 -2
  58. package/dest/contract/wait_for_proven.d.ts.map +1 -1
  59. package/dest/deployment/broadcast_function.js +4 -4
  60. package/dest/deployment/publish_class.js +3 -3
  61. package/dest/deployment/publish_instance.d.ts +2 -2
  62. package/dest/deployment/publish_instance.d.ts.map +1 -1
  63. package/dest/deployment/publish_instance.js +3 -3
  64. package/dest/ethereum/portal_manager.d.ts +9 -6
  65. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  66. package/dest/ethereum/portal_manager.js +17 -18
  67. package/dest/fee/fee_juice_payment_method_with_claim.js +1 -1
  68. package/dest/fee/private_fee_payment_method.js +1 -1
  69. package/dest/fee/public_fee_payment_method.js +1 -1
  70. package/dest/scripts/generate_protocol_contract_types.d.ts +2 -0
  71. package/dest/scripts/generate_protocol_contract_types.d.ts.map +1 -0
  72. package/dest/scripts/generate_protocol_contract_types.js +120 -0
  73. package/dest/utils/abi_types.d.ts +2 -2
  74. package/dest/utils/abi_types.d.ts.map +1 -1
  75. package/dest/utils/authwit.d.ts +2 -2
  76. package/dest/utils/authwit.d.ts.map +1 -1
  77. package/dest/utils/authwit.js +1 -1
  78. package/dest/utils/cross_chain.d.ts +2 -2
  79. package/dest/utils/cross_chain.d.ts.map +1 -1
  80. package/dest/utils/fee_juice.js +1 -1
  81. package/dest/utils/field_compressed_string.js +1 -1
  82. package/dest/utils/pub_key.d.ts +2 -2
  83. package/dest/utils/pub_key.d.ts.map +1 -1
  84. package/dest/utils/pub_key.js +1 -1
  85. package/dest/wallet/account_manager.d.ts +6 -3
  86. package/dest/wallet/account_manager.d.ts.map +1 -1
  87. package/dest/wallet/account_manager.js +1 -1
  88. package/dest/wallet/deploy_account_method.d.ts +2 -2
  89. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  90. package/dest/wallet/deploy_account_method.js +1 -1
  91. package/dest/wallet/wallet.d.ts +241 -954
  92. package/dest/wallet/wallet.d.ts.map +1 -1
  93. package/dest/wallet/wallet.js +61 -87
  94. package/package.json +14 -12
  95. package/src/account/account.ts +1 -1
  96. package/src/account/account_contract.ts +1 -1
  97. package/src/account/account_with_secret_key.ts +1 -1
  98. package/src/account/index.ts +1 -1
  99. package/src/account/interface.ts +1 -1
  100. package/src/account/signerless_account.ts +1 -1
  101. package/src/api/block.ts +1 -1
  102. package/src/api/fields.ts +2 -1
  103. package/src/api/protocol.ts +7 -0
  104. package/src/api/wallet.ts +4 -2
  105. package/src/authorization/call_authorization_request.ts +1 -1
  106. package/src/contract/batch_call.ts +4 -2
  107. package/src/contract/deploy_method.ts +8 -7
  108. package/src/contract/protocol_contracts/auth-registry.ts +542 -0
  109. package/src/contract/protocol_contracts/contract-class-registry.ts +442 -0
  110. package/src/contract/protocol_contracts/contract-instance-registry.ts +501 -0
  111. package/src/contract/protocol_contracts/fee-juice.ts +462 -0
  112. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +338 -0
  113. package/src/contract/protocol_contracts/public-checks.ts +324 -0
  114. package/src/contract/sent_tx.ts +1 -2
  115. package/src/deployment/broadcast_function.ts +4 -4
  116. package/src/deployment/publish_class.ts +3 -3
  117. package/src/deployment/publish_instance.ts +3 -6
  118. package/src/ethereum/portal_manager.ts +20 -24
  119. package/src/fee/fee_juice_payment_method_with_claim.ts +1 -1
  120. package/src/fee/private_fee_payment_method.ts +1 -1
  121. package/src/fee/public_fee_payment_method.ts +1 -1
  122. package/src/scripts/generate_protocol_contract_types.ts +150 -0
  123. package/src/utils/abi_types.ts +1 -1
  124. package/src/utils/authwit.ts +1 -1
  125. package/src/utils/cross_chain.ts +1 -1
  126. package/src/utils/fee_juice.ts +1 -1
  127. package/src/utils/field_compressed_string.ts +1 -1
  128. package/src/utils/pub_key.ts +2 -2
  129. package/src/wallet/account_manager.ts +1 -1
  130. package/src/wallet/deploy_account_method.ts +1 -1
  131. package/src/wallet/wallet.ts +161 -81
  132. package/dest/contract/protocol_contracts.d.ts +0 -9
  133. package/dest/contract/protocol_contracts.d.ts.map +0 -1
  134. package/dest/contract/protocol_contracts.js +0 -26
  135. package/dest/contract/unsafe_contract.d.ts +0 -15
  136. package/dest/contract/unsafe_contract.d.ts.map +0 -1
  137. package/dest/contract/unsafe_contract.js +0 -6
  138. package/src/contract/protocol_contracts.ts +0 -35
  139. package/src/contract/unsafe_contract.ts +0 -19
@@ -0,0 +1,542 @@
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.PRIVATE,
25
+ name: 'set_authorized_private',
26
+ isOnlySelf: false,
27
+ isStatic: false,
28
+ isInitializer: false,
29
+ parameters: [
30
+ {
31
+ name: 'approver',
32
+ type: {
33
+ kind: 'struct',
34
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
35
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
36
+ },
37
+ visibility: 'private',
38
+ },
39
+ { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
40
+ { name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
41
+ ],
42
+ returnTypes: [],
43
+ errorTypes: {
44
+ '2754040237334517471': { error_kind: 'fmtstring', length: 92, item_types: [] },
45
+ '7555607922535724711': { error_kind: 'string', string: 'Preimage mismatch' },
46
+ '9894212961085021188': { error_kind: 'string', string: 'Message not authorized by account' },
47
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
48
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
49
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
50
+ },
51
+ },
52
+ bytecode: Buffer.from([]),
53
+ debugSymbols: '',
54
+ },
55
+ {
56
+ ...{
57
+ functionType: FunctionType.UTILITY,
58
+ name: 'utility_is_consumable',
59
+ isOnlySelf: false,
60
+ isStatic: false,
61
+ isInitializer: false,
62
+ parameters: [
63
+ {
64
+ name: 'on_behalf_of',
65
+ type: {
66
+ kind: 'struct',
67
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
68
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
69
+ },
70
+ visibility: 'private',
71
+ },
72
+ { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
73
+ ],
74
+ returnTypes: [{ kind: 'boolean' }],
75
+ errorTypes: {
76
+ '13455385521185560676': {
77
+ error_kind: 'string',
78
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
79
+ },
80
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
81
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
82
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
83
+ },
84
+ },
85
+ bytecode: Buffer.from([]),
86
+ debugSymbols: '',
87
+ },
88
+ {
89
+ ...{
90
+ functionType: FunctionType.UTILITY,
91
+ name: 'process_message',
92
+ isOnlySelf: false,
93
+ isStatic: false,
94
+ isInitializer: false,
95
+ parameters: [
96
+ {
97
+ name: 'message_ciphertext',
98
+ type: {
99
+ kind: 'struct',
100
+ fields: [
101
+ { name: 'storage', type: { kind: 'array', length: 17, type: { kind: 'field' } } },
102
+ { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
103
+ ],
104
+ path: 'std::collections::bounded_vec::BoundedVec',
105
+ },
106
+ visibility: 'private',
107
+ },
108
+ {
109
+ name: 'message_context',
110
+ type: {
111
+ kind: 'struct',
112
+ fields: [
113
+ { name: 'tx_hash', type: { kind: 'field' } },
114
+ {
115
+ name: 'unique_note_hashes_in_tx',
116
+ type: {
117
+ kind: 'struct',
118
+ fields: [
119
+ { name: 'storage', type: { kind: 'array', length: 64, type: { kind: 'field' } } },
120
+ { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
121
+ ],
122
+ path: 'std::collections::bounded_vec::BoundedVec',
123
+ },
124
+ },
125
+ { name: 'first_nullifier_in_tx', type: { kind: 'field' } },
126
+ {
127
+ name: 'recipient',
128
+ type: {
129
+ kind: 'struct',
130
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
131
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
132
+ },
133
+ },
134
+ ],
135
+ path: 'aztec::messages::processing::message_context::MessageContext',
136
+ },
137
+ visibility: 'private',
138
+ },
139
+ ],
140
+ returnTypes: [],
141
+ errorTypes: {
142
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
143
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
144
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
145
+ '2967937905572420042': {
146
+ error_kind: 'fmtstring',
147
+ length: 61,
148
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
149
+ },
150
+ '3330370348214585450': {
151
+ error_kind: 'fmtstring',
152
+ length: 48,
153
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
154
+ },
155
+ '3670003311596808700': {
156
+ error_kind: 'fmtstring',
157
+ length: 77,
158
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
159
+ },
160
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
161
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
162
+ '9791669845391776238': {
163
+ error_kind: 'string',
164
+ string: '0 has a square root; you cannot claim it is not square',
165
+ },
166
+ '9885968605480832328': {
167
+ error_kind: 'string',
168
+ string: 'Attempted to read past the length of a CapsuleArray',
169
+ },
170
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
171
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
172
+ '11021520179822076911': {
173
+ error_kind: 'string',
174
+ string: 'Attempted to delete past the length of a CapsuleArray',
175
+ },
176
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
177
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
178
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
179
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
180
+ '13557316507370296400': {
181
+ error_kind: 'fmtstring',
182
+ length: 130,
183
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
184
+ },
185
+ '14938672389828944159': {
186
+ error_kind: 'fmtstring',
187
+ length: 146,
188
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
189
+ },
190
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
191
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
192
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
193
+ '17531474008201752295': {
194
+ error_kind: 'fmtstring',
195
+ length: 133,
196
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
197
+ },
198
+ },
199
+ },
200
+ bytecode: Buffer.from([]),
201
+ debugSymbols: '',
202
+ },
203
+ {
204
+ ...{
205
+ functionType: FunctionType.PUBLIC,
206
+ name: 'public_dispatch',
207
+ isOnlySelf: false,
208
+ isStatic: false,
209
+ isInitializer: false,
210
+ parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
211
+ returnTypes: [],
212
+ errorTypes: {
213
+ '5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
214
+ '11691217184967371519': {
215
+ error_kind: 'string',
216
+ string: 'Function is_reject_all can only be called statically',
217
+ },
218
+ '12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
219
+ '13455385521185560676': {
220
+ error_kind: 'string',
221
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
222
+ },
223
+ '13929691561421487185': {
224
+ error_kind: 'string',
225
+ string: 'Function _set_authorized can only be called by the same contract',
226
+ },
227
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
228
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
229
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
230
+ '17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
231
+ '17312933876399746100': {
232
+ error_kind: 'string',
233
+ string: 'Function is_consumable can only be called statically',
234
+ },
235
+ },
236
+ },
237
+ bytecode: Buffer.from([]),
238
+ debugSymbols: '',
239
+ },
240
+ {
241
+ ...{
242
+ functionType: FunctionType.UTILITY,
243
+ name: 'sync_private_state',
244
+ isOnlySelf: false,
245
+ isStatic: false,
246
+ isInitializer: false,
247
+ parameters: [],
248
+ returnTypes: [],
249
+ errorTypes: {
250
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
251
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
252
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
253
+ '2967937905572420042': {
254
+ error_kind: 'fmtstring',
255
+ length: 61,
256
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
257
+ },
258
+ '3330370348214585450': {
259
+ error_kind: 'fmtstring',
260
+ length: 48,
261
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
262
+ },
263
+ '3670003311596808700': {
264
+ error_kind: 'fmtstring',
265
+ length: 77,
266
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
267
+ },
268
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
269
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
270
+ '9791669845391776238': {
271
+ error_kind: 'string',
272
+ string: '0 has a square root; you cannot claim it is not square',
273
+ },
274
+ '9885968605480832328': {
275
+ error_kind: 'string',
276
+ string: 'Attempted to read past the length of a CapsuleArray',
277
+ },
278
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
279
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
280
+ '11021520179822076911': {
281
+ error_kind: 'string',
282
+ string: 'Attempted to delete past the length of a CapsuleArray',
283
+ },
284
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
285
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
286
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
287
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
288
+ '13557316507370296400': {
289
+ error_kind: 'fmtstring',
290
+ length: 130,
291
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
292
+ },
293
+ '14938672389828944159': {
294
+ error_kind: 'fmtstring',
295
+ length: 146,
296
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
297
+ },
298
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
299
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
300
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
301
+ '17531474008201752295': {
302
+ error_kind: 'fmtstring',
303
+ length: 133,
304
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
305
+ },
306
+ },
307
+ },
308
+ bytecode: Buffer.from([]),
309
+ debugSymbols: '',
310
+ },
311
+ ],
312
+ nonDispatchPublicFunctions: [
313
+ {
314
+ functionType: FunctionType.PUBLIC,
315
+ name: '_set_authorized',
316
+ isOnlySelf: true,
317
+ isStatic: false,
318
+ isInitializer: false,
319
+ parameters: [
320
+ {
321
+ name: 'approver',
322
+ type: {
323
+ kind: 'struct',
324
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
325
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
326
+ },
327
+ visibility: 'private',
328
+ },
329
+ { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
330
+ { name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
331
+ ],
332
+ returnTypes: [],
333
+ errorTypes: {
334
+ '13455385521185560676': {
335
+ error_kind: 'string',
336
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
337
+ },
338
+ '13929691561421487185': {
339
+ error_kind: 'string',
340
+ string: 'Function _set_authorized can only be called by the same contract',
341
+ },
342
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
343
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
344
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
345
+ },
346
+ },
347
+ {
348
+ functionType: FunctionType.PUBLIC,
349
+ name: 'consume',
350
+ isOnlySelf: false,
351
+ isStatic: false,
352
+ isInitializer: false,
353
+ parameters: [
354
+ {
355
+ name: 'on_behalf_of',
356
+ type: {
357
+ kind: 'struct',
358
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
359
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
360
+ },
361
+ visibility: 'private',
362
+ },
363
+ { name: 'inner_hash', type: { kind: 'field' }, visibility: 'private' },
364
+ ],
365
+ returnTypes: [{ kind: 'field' }],
366
+ errorTypes: {
367
+ '5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
368
+ '13455385521185560676': {
369
+ error_kind: 'string',
370
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
371
+ },
372
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
373
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
374
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
375
+ '17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
376
+ },
377
+ },
378
+ {
379
+ functionType: FunctionType.PUBLIC,
380
+ name: 'is_consumable',
381
+ isOnlySelf: false,
382
+ isStatic: true,
383
+ isInitializer: false,
384
+ parameters: [
385
+ {
386
+ name: 'on_behalf_of',
387
+ type: {
388
+ kind: 'struct',
389
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
390
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
391
+ },
392
+ visibility: 'private',
393
+ },
394
+ { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
395
+ ],
396
+ returnTypes: [{ kind: 'boolean' }],
397
+ errorTypes: {
398
+ '13455385521185560676': {
399
+ error_kind: 'string',
400
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
401
+ },
402
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
403
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
404
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
405
+ '17312933876399746100': {
406
+ error_kind: 'string',
407
+ string: 'Function is_consumable can only be called statically',
408
+ },
409
+ },
410
+ },
411
+ {
412
+ functionType: FunctionType.PUBLIC,
413
+ name: 'is_reject_all',
414
+ isOnlySelf: false,
415
+ isStatic: true,
416
+ isInitializer: false,
417
+ parameters: [
418
+ {
419
+ name: 'on_behalf_of',
420
+ type: {
421
+ kind: 'struct',
422
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
423
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
424
+ },
425
+ visibility: 'private',
426
+ },
427
+ ],
428
+ returnTypes: [{ kind: 'boolean' }],
429
+ errorTypes: {
430
+ '11691217184967371519': {
431
+ error_kind: 'string',
432
+ string: 'Function is_reject_all can only be called statically',
433
+ },
434
+ '13455385521185560676': {
435
+ error_kind: 'string',
436
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
437
+ },
438
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
439
+ },
440
+ },
441
+ {
442
+ functionType: FunctionType.PUBLIC,
443
+ name: 'set_authorized',
444
+ isOnlySelf: false,
445
+ isStatic: false,
446
+ isInitializer: false,
447
+ parameters: [
448
+ { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
449
+ { name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
450
+ ],
451
+ returnTypes: [],
452
+ errorTypes: {
453
+ '13455385521185560676': {
454
+ error_kind: 'string',
455
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
456
+ },
457
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
458
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
459
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
460
+ },
461
+ },
462
+ {
463
+ functionType: FunctionType.PUBLIC,
464
+ name: 'set_reject_all',
465
+ isOnlySelf: false,
466
+ isStatic: false,
467
+ isInitializer: false,
468
+ parameters: [{ name: 'reject', type: { kind: 'boolean' }, visibility: 'private' }],
469
+ returnTypes: [],
470
+ errorTypes: {
471
+ '13455385521185560676': {
472
+ error_kind: 'string',
473
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
474
+ },
475
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
476
+ },
477
+ },
478
+ ],
479
+ outputs: { structs: {}, globals: {} },
480
+ storageLayout: {},
481
+ fileMap: {},
482
+ };
483
+
484
+ export class AuthRegistryContract extends ContractBase {
485
+ private constructor(wallet: Wallet) {
486
+ super(ProtocolContractAddress.AuthRegistry, AuthRegistryContractArtifact, wallet);
487
+ }
488
+
489
+ public static at(wallet: Wallet): AuthRegistryContract {
490
+ return new AuthRegistryContract(wallet);
491
+ }
492
+
493
+ declare public methods: {
494
+ /** consume(on_behalf_of: struct, inner_hash: field) */
495
+ consume: ((on_behalf_of: AztecAddressLike, inner_hash: FieldLike) => ContractFunctionInteraction) &
496
+ Pick<ContractMethod, 'selector'>;
497
+
498
+ /** is_consumable(on_behalf_of: struct, message_hash: field) */
499
+ is_consumable: ((on_behalf_of: AztecAddressLike, message_hash: FieldLike) => ContractFunctionInteraction) &
500
+ Pick<ContractMethod, 'selector'>;
501
+
502
+ /** is_reject_all(on_behalf_of: struct) */
503
+ is_reject_all: ((on_behalf_of: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
504
+
505
+ /** process_message(message_ciphertext: struct, message_context: struct) */
506
+ process_message: ((
507
+ message_ciphertext: FieldLike[],
508
+ message_context: {
509
+ tx_hash: FieldLike;
510
+ unique_note_hashes_in_tx: FieldLike[];
511
+ first_nullifier_in_tx: FieldLike;
512
+ recipient: AztecAddressLike;
513
+ },
514
+ ) => ContractFunctionInteraction) &
515
+ Pick<ContractMethod, 'selector'>;
516
+
517
+ /** public_dispatch(selector: field) */
518
+ public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
519
+
520
+ /** set_authorized(message_hash: field, authorize: boolean) */
521
+ set_authorized: ((message_hash: FieldLike, authorize: boolean) => ContractFunctionInteraction) &
522
+ Pick<ContractMethod, 'selector'>;
523
+
524
+ /** set_authorized_private(approver: struct, message_hash: field, authorize: boolean) */
525
+ set_authorized_private: ((
526
+ approver: AztecAddressLike,
527
+ message_hash: FieldLike,
528
+ authorize: boolean,
529
+ ) => ContractFunctionInteraction) &
530
+ Pick<ContractMethod, 'selector'>;
531
+
532
+ /** set_reject_all(reject: boolean) */
533
+ set_reject_all: ((reject: boolean) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
534
+
535
+ /** sync_private_state() */
536
+ sync_private_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
537
+
538
+ /** utility_is_consumable(on_behalf_of: struct, message_hash: field) */
539
+ utility_is_consumable: ((on_behalf_of: AztecAddressLike, message_hash: FieldLike) => ContractFunctionInteraction) &
540
+ Pick<ContractMethod, 'selector'>;
541
+ };
542
+ }