@aztec/aztec.js 0.0.1-commit.c7c42ec → 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 (88) hide show
  1. package/dest/account/account.d.ts +3 -3
  2. package/dest/account/account.d.ts.map +1 -1
  3. package/dest/account/account_contract.d.ts +2 -2
  4. package/dest/account/account_contract.d.ts.map +1 -1
  5. package/dest/account/account_with_secret_key.d.ts +2 -1
  6. package/dest/account/account_with_secret_key.d.ts.map +1 -1
  7. package/dest/api/block.d.ts +2 -2
  8. package/dest/api/block.d.ts.map +1 -1
  9. package/dest/api/block.js +1 -1
  10. package/dest/api/protocol.d.ts +7 -1
  11. package/dest/api/protocol.d.ts.map +1 -1
  12. package/dest/api/protocol.js +6 -0
  13. package/dest/api/wallet.d.ts +2 -2
  14. package/dest/api/wallet.d.ts.map +1 -1
  15. package/dest/api/wallet.js +1 -1
  16. package/dest/authorization/call_authorization_request.d.ts +22 -1
  17. package/dest/authorization/call_authorization_request.d.ts.map +1 -1
  18. package/dest/contract/batch_call.d.ts +1 -1
  19. package/dest/contract/batch_call.d.ts.map +1 -1
  20. package/dest/contract/batch_call.js +3 -1
  21. package/dest/contract/contract_base.d.ts +4 -1
  22. package/dest/contract/contract_base.d.ts.map +1 -1
  23. package/dest/contract/contract_function_interaction.d.ts +1 -1
  24. package/dest/contract/deploy_method.d.ts +1 -1
  25. package/dest/contract/deploy_method.d.ts.map +1 -1
  26. package/dest/contract/deploy_method.js +5 -4
  27. package/dest/contract/protocol_contracts/auth-registry.d.ts +36 -0
  28. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
  29. package/dest/contract/protocol_contracts/auth-registry.js +928 -0
  30. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +35 -0
  31. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
  32. package/dest/contract/protocol_contracts/contract-class-registry.js +797 -0
  33. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +31 -0
  34. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
  35. package/dest/contract/protocol_contracts/contract-instance-registry.js +867 -0
  36. package/dest/contract/protocol_contracts/fee-juice.d.ts +30 -0
  37. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
  38. package/dest/contract/protocol_contracts/fee-juice.js +824 -0
  39. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +34 -0
  40. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -0
  41. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +576 -0
  42. package/dest/contract/protocol_contracts/public-checks.d.ts +26 -0
  43. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -0
  44. package/dest/contract/protocol_contracts/public-checks.js +592 -0
  45. package/dest/contract/wait_for_proven.d.ts +2 -2
  46. package/dest/contract/wait_for_proven.d.ts.map +1 -1
  47. package/dest/deployment/broadcast_function.js +3 -3
  48. package/dest/deployment/publish_class.js +2 -2
  49. package/dest/deployment/publish_instance.d.ts +2 -2
  50. package/dest/deployment/publish_instance.d.ts.map +1 -1
  51. package/dest/deployment/publish_instance.js +3 -3
  52. package/dest/ethereum/portal_manager.d.ts +6 -3
  53. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  54. package/dest/ethereum/portal_manager.js +10 -10
  55. package/dest/scripts/generate_protocol_contract_types.d.ts +2 -0
  56. package/dest/scripts/generate_protocol_contract_types.d.ts.map +1 -0
  57. package/dest/scripts/generate_protocol_contract_types.js +120 -0
  58. package/dest/wallet/account_manager.d.ts +5 -2
  59. package/dest/wallet/account_manager.d.ts.map +1 -1
  60. package/dest/wallet/wallet.d.ts +181 -2483
  61. package/dest/wallet/wallet.d.ts.map +1 -1
  62. package/dest/wallet/wallet.js +46 -84
  63. package/package.json +14 -12
  64. package/src/api/block.ts +1 -1
  65. package/src/api/protocol.ts +7 -0
  66. package/src/api/wallet.ts +0 -2
  67. package/src/contract/batch_call.ts +4 -2
  68. package/src/contract/deploy_method.ts +7 -6
  69. package/src/contract/protocol_contracts/auth-registry.ts +542 -0
  70. package/src/contract/protocol_contracts/contract-class-registry.ts +442 -0
  71. package/src/contract/protocol_contracts/contract-instance-registry.ts +501 -0
  72. package/src/contract/protocol_contracts/fee-juice.ts +462 -0
  73. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +338 -0
  74. package/src/contract/protocol_contracts/public-checks.ts +324 -0
  75. package/src/deployment/broadcast_function.ts +3 -3
  76. package/src/deployment/publish_class.ts +2 -2
  77. package/src/deployment/publish_instance.ts +3 -6
  78. package/src/ethereum/portal_manager.ts +9 -8
  79. package/src/scripts/generate_protocol_contract_types.ts +150 -0
  80. package/src/wallet/wallet.ts +109 -80
  81. package/dest/contract/protocol_contracts.d.ts +0 -9
  82. package/dest/contract/protocol_contracts.d.ts.map +0 -1
  83. package/dest/contract/protocol_contracts.js +0 -26
  84. package/dest/contract/unsafe_contract.d.ts +0 -15
  85. package/dest/contract/unsafe_contract.d.ts.map +0 -1
  86. package/dest/contract/unsafe_contract.js +0 -6
  87. package/src/contract/protocol_contracts.ts +0 -35
  88. package/src/contract/unsafe_contract.ts +0 -19
@@ -0,0 +1,338 @@
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 MultiCallEntrypointContractArtifact: ContractArtifact = {
20
+ name: 'MultiCallEntrypoint',
21
+ functions: [
22
+ {
23
+ ...{
24
+ functionType: FunctionType.PRIVATE,
25
+ name: 'entrypoint',
26
+ isOnlySelf: false,
27
+ isStatic: false,
28
+ isInitializer: false,
29
+ parameters: [
30
+ {
31
+ name: 'app_payload',
32
+ type: {
33
+ kind: 'struct',
34
+ fields: [
35
+ {
36
+ name: 'function_calls',
37
+ type: {
38
+ kind: 'array',
39
+ length: 5,
40
+ type: {
41
+ kind: 'struct',
42
+ fields: [
43
+ { name: 'args_hash', type: { kind: 'field' } },
44
+ {
45
+ name: 'function_selector',
46
+ type: {
47
+ kind: 'struct',
48
+ fields: [{ name: 'inner', type: { kind: 'integer', sign: 'unsigned', width: 32 } }],
49
+ path: 'aztec::protocol_types::abis::function_selector::FunctionSelector',
50
+ },
51
+ },
52
+ {
53
+ name: 'target_address',
54
+ type: {
55
+ kind: 'struct',
56
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
57
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
58
+ },
59
+ },
60
+ { name: 'is_public', type: { kind: 'boolean' } },
61
+ { name: 'hide_msg_sender', type: { kind: 'boolean' } },
62
+ { name: 'is_static', type: { kind: 'boolean' } },
63
+ ],
64
+ path: 'aztec::authwit::entrypoint::function_call::FunctionCall',
65
+ },
66
+ },
67
+ },
68
+ { name: 'tx_nonce', type: { kind: 'field' } },
69
+ ],
70
+ path: 'aztec::authwit::entrypoint::app::AppPayload',
71
+ },
72
+ visibility: 'private',
73
+ },
74
+ ],
75
+ returnTypes: [],
76
+ errorTypes: {
77
+ '10365856833277169390': {
78
+ error_kind: 'string',
79
+ string: 'Incompatible flag. `hide_msg_sender = true` is only available for public calls.',
80
+ },
81
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
82
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
83
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
84
+ },
85
+ },
86
+ bytecode: Buffer.from([]),
87
+ debugSymbols: '',
88
+ },
89
+ {
90
+ ...{
91
+ functionType: FunctionType.UTILITY,
92
+ name: 'process_message',
93
+ isOnlySelf: false,
94
+ isStatic: false,
95
+ isInitializer: false,
96
+ parameters: [
97
+ {
98
+ name: 'message_ciphertext',
99
+ type: {
100
+ kind: 'struct',
101
+ fields: [
102
+ { name: 'storage', type: { kind: 'array', length: 17, type: { kind: 'field' } } },
103
+ { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
104
+ ],
105
+ path: 'std::collections::bounded_vec::BoundedVec',
106
+ },
107
+ visibility: 'private',
108
+ },
109
+ {
110
+ name: 'message_context',
111
+ type: {
112
+ kind: 'struct',
113
+ fields: [
114
+ { name: 'tx_hash', type: { kind: 'field' } },
115
+ {
116
+ name: 'unique_note_hashes_in_tx',
117
+ type: {
118
+ kind: 'struct',
119
+ fields: [
120
+ { name: 'storage', type: { kind: 'array', length: 64, type: { kind: 'field' } } },
121
+ { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
122
+ ],
123
+ path: 'std::collections::bounded_vec::BoundedVec',
124
+ },
125
+ },
126
+ { name: 'first_nullifier_in_tx', type: { kind: 'field' } },
127
+ {
128
+ name: 'recipient',
129
+ type: {
130
+ kind: 'struct',
131
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
132
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
133
+ },
134
+ },
135
+ ],
136
+ path: 'aztec::messages::processing::message_context::MessageContext',
137
+ },
138
+ visibility: 'private',
139
+ },
140
+ ],
141
+ returnTypes: [],
142
+ errorTypes: {
143
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
144
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
145
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
146
+ '2967937905572420042': {
147
+ error_kind: 'fmtstring',
148
+ length: 61,
149
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
150
+ },
151
+ '3330370348214585450': {
152
+ error_kind: 'fmtstring',
153
+ length: 48,
154
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
155
+ },
156
+ '3670003311596808700': {
157
+ error_kind: 'fmtstring',
158
+ length: 77,
159
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
160
+ },
161
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
162
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
163
+ '9791669845391776238': {
164
+ error_kind: 'string',
165
+ string: '0 has a square root; you cannot claim it is not square',
166
+ },
167
+ '9885968605480832328': {
168
+ error_kind: 'string',
169
+ string: 'Attempted to read past the length of a CapsuleArray',
170
+ },
171
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
172
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
173
+ '11021520179822076911': {
174
+ error_kind: 'string',
175
+ string: 'Attempted to delete past the length of a CapsuleArray',
176
+ },
177
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
178
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
179
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
180
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
181
+ '13557316507370296400': {
182
+ error_kind: 'fmtstring',
183
+ length: 130,
184
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
185
+ },
186
+ '14938672389828944159': {
187
+ error_kind: 'fmtstring',
188
+ length: 146,
189
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
190
+ },
191
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
192
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
193
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
194
+ '17531474008201752295': {
195
+ error_kind: 'fmtstring',
196
+ length: 133,
197
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
198
+ },
199
+ },
200
+ },
201
+ bytecode: Buffer.from([]),
202
+ debugSymbols: '',
203
+ },
204
+ {
205
+ ...{
206
+ functionType: FunctionType.UTILITY,
207
+ name: 'sync_private_state',
208
+ isOnlySelf: false,
209
+ isStatic: false,
210
+ isInitializer: false,
211
+ parameters: [],
212
+ returnTypes: [],
213
+ errorTypes: {
214
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
215
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
216
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
217
+ '2967937905572420042': {
218
+ error_kind: 'fmtstring',
219
+ length: 61,
220
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
221
+ },
222
+ '3330370348214585450': {
223
+ error_kind: 'fmtstring',
224
+ length: 48,
225
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
226
+ },
227
+ '3670003311596808700': {
228
+ error_kind: 'fmtstring',
229
+ length: 77,
230
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
231
+ },
232
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
233
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
234
+ '9791669845391776238': {
235
+ error_kind: 'string',
236
+ string: '0 has a square root; you cannot claim it is not square',
237
+ },
238
+ '9885968605480832328': {
239
+ error_kind: 'string',
240
+ string: 'Attempted to read past the length of a CapsuleArray',
241
+ },
242
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
243
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
244
+ '11021520179822076911': {
245
+ error_kind: 'string',
246
+ string: 'Attempted to delete past the length of a CapsuleArray',
247
+ },
248
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
249
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
250
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
251
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
252
+ '13557316507370296400': {
253
+ error_kind: 'fmtstring',
254
+ length: 130,
255
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
256
+ },
257
+ '14938672389828944159': {
258
+ error_kind: 'fmtstring',
259
+ length: 146,
260
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
261
+ },
262
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
263
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
264
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
265
+ '17531474008201752295': {
266
+ error_kind: 'fmtstring',
267
+ length: 133,
268
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
269
+ },
270
+ },
271
+ },
272
+ bytecode: Buffer.from([]),
273
+ debugSymbols: '',
274
+ },
275
+ {
276
+ ...{
277
+ functionType: FunctionType.PUBLIC,
278
+ name: 'public_dispatch',
279
+ isOnlySelf: false,
280
+ isStatic: false,
281
+ isInitializer: false,
282
+ parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
283
+ returnTypes: [],
284
+ errorTypes: { '1335198680857977525': { error_kind: 'string', string: 'No public functions' } },
285
+ },
286
+ bytecode: Buffer.from([]),
287
+ debugSymbols: '',
288
+ },
289
+ ],
290
+ nonDispatchPublicFunctions: [],
291
+ outputs: { structs: {}, globals: {} },
292
+ storageLayout: {},
293
+ fileMap: {},
294
+ };
295
+
296
+ export class MultiCallEntrypointContract extends ContractBase {
297
+ private constructor(wallet: Wallet) {
298
+ super(ProtocolContractAddress.MultiCallEntrypoint, MultiCallEntrypointContractArtifact, wallet);
299
+ }
300
+
301
+ public static at(wallet: Wallet): MultiCallEntrypointContract {
302
+ return new MultiCallEntrypointContract(wallet);
303
+ }
304
+
305
+ declare public methods: {
306
+ /** entrypoint(app_payload: struct) */
307
+ entrypoint: ((app_payload: {
308
+ function_calls: {
309
+ args_hash: FieldLike;
310
+ function_selector: FunctionSelectorLike;
311
+ target_address: AztecAddressLike;
312
+ is_public: boolean;
313
+ hide_msg_sender: boolean;
314
+ is_static: boolean;
315
+ }[];
316
+ tx_nonce: FieldLike;
317
+ }) => ContractFunctionInteraction) &
318
+ Pick<ContractMethod, 'selector'>;
319
+
320
+ /** process_message(message_ciphertext: struct, message_context: struct) */
321
+ process_message: ((
322
+ message_ciphertext: FieldLike[],
323
+ message_context: {
324
+ tx_hash: FieldLike;
325
+ unique_note_hashes_in_tx: FieldLike[];
326
+ first_nullifier_in_tx: FieldLike;
327
+ recipient: AztecAddressLike;
328
+ },
329
+ ) => ContractFunctionInteraction) &
330
+ Pick<ContractMethod, 'selector'>;
331
+
332
+ /** public_dispatch(selector: field) */
333
+ public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
334
+
335
+ /** sync_private_state() */
336
+ sync_private_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
337
+ };
338
+ }
@@ -0,0 +1,324 @@
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 PublicChecksContractArtifact: ContractArtifact = {
20
+ name: 'PublicChecks',
21
+ functions: [
22
+ {
23
+ ...{
24
+ functionType: FunctionType.UTILITY,
25
+ name: 'process_message',
26
+ isOnlySelf: false,
27
+ isStatic: false,
28
+ isInitializer: false,
29
+ parameters: [
30
+ {
31
+ name: 'message_ciphertext',
32
+ type: {
33
+ kind: 'struct',
34
+ fields: [
35
+ { name: 'storage', type: { kind: 'array', length: 17, type: { kind: 'field' } } },
36
+ { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
37
+ ],
38
+ path: 'std::collections::bounded_vec::BoundedVec',
39
+ },
40
+ visibility: 'private',
41
+ },
42
+ {
43
+ name: 'message_context',
44
+ type: {
45
+ kind: 'struct',
46
+ fields: [
47
+ { name: 'tx_hash', type: { kind: 'field' } },
48
+ {
49
+ name: 'unique_note_hashes_in_tx',
50
+ type: {
51
+ kind: 'struct',
52
+ fields: [
53
+ { name: 'storage', type: { kind: 'array', length: 64, type: { kind: 'field' } } },
54
+ { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
55
+ ],
56
+ path: 'std::collections::bounded_vec::BoundedVec',
57
+ },
58
+ },
59
+ { name: 'first_nullifier_in_tx', type: { kind: 'field' } },
60
+ {
61
+ name: 'recipient',
62
+ type: {
63
+ kind: 'struct',
64
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
65
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
66
+ },
67
+ },
68
+ ],
69
+ path: 'aztec::messages::processing::message_context::MessageContext',
70
+ },
71
+ visibility: 'private',
72
+ },
73
+ ],
74
+ returnTypes: [],
75
+ errorTypes: {
76
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
77
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
78
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
79
+ '2967937905572420042': {
80
+ error_kind: 'fmtstring',
81
+ length: 61,
82
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
83
+ },
84
+ '3330370348214585450': {
85
+ error_kind: 'fmtstring',
86
+ length: 48,
87
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
88
+ },
89
+ '3670003311596808700': {
90
+ error_kind: 'fmtstring',
91
+ length: 77,
92
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
93
+ },
94
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
95
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
96
+ '9791669845391776238': {
97
+ error_kind: 'string',
98
+ string: '0 has a square root; you cannot claim it is not square',
99
+ },
100
+ '9885968605480832328': {
101
+ error_kind: 'string',
102
+ string: 'Attempted to read past the length of a CapsuleArray',
103
+ },
104
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
105
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
106
+ '11021520179822076911': {
107
+ error_kind: 'string',
108
+ string: 'Attempted to delete past the length of a CapsuleArray',
109
+ },
110
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
111
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
112
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
113
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
114
+ '13557316507370296400': {
115
+ error_kind: 'fmtstring',
116
+ length: 130,
117
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
118
+ },
119
+ '14938672389828944159': {
120
+ error_kind: 'fmtstring',
121
+ length: 146,
122
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
123
+ },
124
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
125
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
126
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
127
+ '17531474008201752295': {
128
+ error_kind: 'fmtstring',
129
+ length: 133,
130
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
131
+ },
132
+ },
133
+ },
134
+ bytecode: Buffer.from([]),
135
+ debugSymbols: '',
136
+ },
137
+ {
138
+ ...{
139
+ functionType: FunctionType.PUBLIC,
140
+ name: 'public_dispatch',
141
+ isOnlySelf: false,
142
+ isStatic: false,
143
+ isInitializer: false,
144
+ parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
145
+ returnTypes: [],
146
+ errorTypes: {
147
+ '3445904810750103705': { error_kind: 'string', string: 'Block number mismatch.' },
148
+ '6989792215391248978': {
149
+ error_kind: 'string',
150
+ string: 'Function check_timestamp can only be called statically',
151
+ },
152
+ '7259463707251703666': {
153
+ error_kind: 'string',
154
+ string: 'Function check_block_number can only be called statically',
155
+ },
156
+ '12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
157
+ '13950240626967988787': { error_kind: 'string', string: 'Timestamp mismatch.' },
158
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
159
+ '15015303112667403944': { error_kind: 'fmtstring', length: 17, item_types: [] },
160
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
161
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
162
+ },
163
+ },
164
+ bytecode: Buffer.from([]),
165
+ debugSymbols: '',
166
+ },
167
+ {
168
+ ...{
169
+ functionType: FunctionType.UTILITY,
170
+ name: 'sync_private_state',
171
+ isOnlySelf: false,
172
+ isStatic: false,
173
+ isInitializer: false,
174
+ parameters: [],
175
+ returnTypes: [],
176
+ errorTypes: {
177
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
178
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
179
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
180
+ '2967937905572420042': {
181
+ error_kind: 'fmtstring',
182
+ length: 61,
183
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
184
+ },
185
+ '3330370348214585450': {
186
+ error_kind: 'fmtstring',
187
+ length: 48,
188
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
189
+ },
190
+ '3670003311596808700': {
191
+ error_kind: 'fmtstring',
192
+ length: 77,
193
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
194
+ },
195
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
196
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
197
+ '9791669845391776238': {
198
+ error_kind: 'string',
199
+ string: '0 has a square root; you cannot claim it is not square',
200
+ },
201
+ '9885968605480832328': {
202
+ error_kind: 'string',
203
+ string: 'Attempted to read past the length of a CapsuleArray',
204
+ },
205
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
206
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
207
+ '11021520179822076911': {
208
+ error_kind: 'string',
209
+ string: 'Attempted to delete past the length of a CapsuleArray',
210
+ },
211
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
212
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
213
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
214
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
215
+ '13557316507370296400': {
216
+ error_kind: 'fmtstring',
217
+ length: 130,
218
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
219
+ },
220
+ '14938672389828944159': {
221
+ error_kind: 'fmtstring',
222
+ length: 146,
223
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
224
+ },
225
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
226
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
227
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
228
+ '17531474008201752295': {
229
+ error_kind: 'fmtstring',
230
+ length: 133,
231
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
232
+ },
233
+ },
234
+ },
235
+ bytecode: Buffer.from([]),
236
+ debugSymbols: '',
237
+ },
238
+ ],
239
+ nonDispatchPublicFunctions: [
240
+ {
241
+ functionType: FunctionType.PUBLIC,
242
+ name: 'check_block_number',
243
+ isOnlySelf: false,
244
+ isStatic: true,
245
+ isInitializer: false,
246
+ parameters: [
247
+ { name: 'operation', type: { kind: 'integer', sign: 'unsigned', width: 8 }, visibility: 'private' },
248
+ { name: 'value', type: { kind: 'integer', sign: 'unsigned', width: 32 }, visibility: 'private' },
249
+ ],
250
+ returnTypes: [],
251
+ errorTypes: {
252
+ '3445904810750103705': { error_kind: 'string', string: 'Block number mismatch.' },
253
+ '7259463707251703666': {
254
+ error_kind: 'string',
255
+ string: 'Function check_block_number can only be called statically',
256
+ },
257
+ '15015303112667403944': { error_kind: 'fmtstring', length: 17, item_types: [] },
258
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
259
+ },
260
+ },
261
+ {
262
+ functionType: FunctionType.PUBLIC,
263
+ name: 'check_timestamp',
264
+ isOnlySelf: false,
265
+ isStatic: true,
266
+ isInitializer: false,
267
+ parameters: [
268
+ { name: 'operation', type: { kind: 'integer', sign: 'unsigned', width: 8 }, visibility: 'private' },
269
+ { name: 'value', type: { kind: 'integer', sign: 'unsigned', width: 64 }, visibility: 'private' },
270
+ ],
271
+ returnTypes: [],
272
+ errorTypes: {
273
+ '6989792215391248978': {
274
+ error_kind: 'string',
275
+ string: 'Function check_timestamp can only be called statically',
276
+ },
277
+ '13950240626967988787': { error_kind: 'string', string: 'Timestamp mismatch.' },
278
+ '15015303112667403944': { error_kind: 'fmtstring', length: 17, item_types: [] },
279
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
280
+ },
281
+ },
282
+ ],
283
+ outputs: { structs: {}, globals: {} },
284
+ storageLayout: {},
285
+ fileMap: {},
286
+ };
287
+
288
+ export class PublicChecksContract extends ContractBase {
289
+ private constructor(wallet: Wallet) {
290
+ super(ProtocolContractAddress.PublicChecks, PublicChecksContractArtifact, wallet);
291
+ }
292
+
293
+ public static at(wallet: Wallet): PublicChecksContract {
294
+ return new PublicChecksContract(wallet);
295
+ }
296
+
297
+ declare public methods: {
298
+ /** check_block_number(operation: integer, value: integer) */
299
+ check_block_number: ((operation: bigint | number, value: bigint | number) => ContractFunctionInteraction) &
300
+ Pick<ContractMethod, 'selector'>;
301
+
302
+ /** check_timestamp(operation: integer, value: integer) */
303
+ check_timestamp: ((operation: bigint | number, value: bigint | number) => ContractFunctionInteraction) &
304
+ Pick<ContractMethod, 'selector'>;
305
+
306
+ /** process_message(message_ciphertext: struct, message_context: struct) */
307
+ process_message: ((
308
+ message_ciphertext: FieldLike[],
309
+ message_context: {
310
+ tx_hash: FieldLike;
311
+ unique_note_hashes_in_tx: FieldLike[];
312
+ first_nullifier_in_tx: FieldLike;
313
+ recipient: AztecAddressLike;
314
+ },
315
+ ) => ContractFunctionInteraction) &
316
+ Pick<ContractMethod, 'selector'>;
317
+
318
+ /** public_dispatch(selector: field) */
319
+ public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
320
+
321
+ /** sync_private_state() */
322
+ sync_private_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
323
+ };
324
+ }