@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,302 @@
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 ContractInstanceRegistryContractArtifact: ContractArtifact = {
20
+ name: 'ContractInstanceRegistry',
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
+ '5755400808989454547': {
35
+ error_kind: 'string',
36
+ string: 'Function get_update_delay can only be called statically',
37
+ },
38
+ '6804164082532189961': { error_kind: 'string', string: 'New update delay is too low' },
39
+ '12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
40
+ '12579274401768182412': { error_kind: 'string', string: 'New contract class is not registered' },
41
+ '13455385521185560676': {
42
+ error_kind: 'string',
43
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
44
+ },
45
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
46
+ '15353471697975175405': { error_kind: 'string', string: 'msg.sender is not deployed' },
47
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
48
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
49
+ },
50
+ },
51
+ bytecode: Buffer.from([]),
52
+ debugSymbols: '',
53
+ },
54
+ {
55
+ ...{
56
+ functionType: FunctionType.PRIVATE,
57
+ name: 'publish_for_public_execution',
58
+ isOnlySelf: false,
59
+ isStatic: false,
60
+ isInitializer: false,
61
+ parameters: [
62
+ { name: 'salt', type: { kind: 'field' }, visibility: 'private' },
63
+ {
64
+ name: 'contract_class_id',
65
+ type: {
66
+ kind: 'struct',
67
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
68
+ path: 'aztec::protocol_types::contract_class_id::ContractClassId',
69
+ },
70
+ visibility: 'private',
71
+ },
72
+ { name: 'initialization_hash', type: { kind: 'field' }, visibility: 'private' },
73
+ {
74
+ name: 'public_keys',
75
+ type: {
76
+ kind: 'struct',
77
+ fields: [
78
+ {
79
+ name: 'npk_m',
80
+ type: {
81
+ kind: 'struct',
82
+ fields: [
83
+ {
84
+ name: 'inner',
85
+ type: {
86
+ kind: 'struct',
87
+ fields: [
88
+ { name: 'x', type: { kind: 'field' } },
89
+ { name: 'y', type: { kind: 'field' } },
90
+ { name: 'is_infinite', type: { kind: 'boolean' } },
91
+ ],
92
+ path: 'std::embedded_curve_ops::EmbeddedCurvePoint',
93
+ },
94
+ },
95
+ ],
96
+ path: 'aztec::protocol_types::public_keys::NpkM',
97
+ },
98
+ },
99
+ {
100
+ name: 'ivpk_m',
101
+ type: {
102
+ kind: 'struct',
103
+ fields: [
104
+ {
105
+ name: 'inner',
106
+ type: {
107
+ kind: 'struct',
108
+ fields: [
109
+ { name: 'x', type: { kind: 'field' } },
110
+ { name: 'y', type: { kind: 'field' } },
111
+ { name: 'is_infinite', type: { kind: 'boolean' } },
112
+ ],
113
+ path: 'std::embedded_curve_ops::EmbeddedCurvePoint',
114
+ },
115
+ },
116
+ ],
117
+ path: 'aztec::protocol_types::public_keys::IvpkM',
118
+ },
119
+ },
120
+ {
121
+ name: 'ovpk_m',
122
+ type: {
123
+ kind: 'struct',
124
+ fields: [
125
+ {
126
+ name: 'inner',
127
+ type: {
128
+ kind: 'struct',
129
+ fields: [
130
+ { name: 'x', type: { kind: 'field' } },
131
+ { name: 'y', type: { kind: 'field' } },
132
+ { name: 'is_infinite', type: { kind: 'boolean' } },
133
+ ],
134
+ path: 'std::embedded_curve_ops::EmbeddedCurvePoint',
135
+ },
136
+ },
137
+ ],
138
+ path: 'aztec::protocol_types::public_keys::OvpkM',
139
+ },
140
+ },
141
+ {
142
+ name: 'tpk_m',
143
+ type: {
144
+ kind: 'struct',
145
+ fields: [
146
+ {
147
+ name: 'inner',
148
+ type: {
149
+ kind: 'struct',
150
+ fields: [
151
+ { name: 'x', type: { kind: 'field' } },
152
+ { name: 'y', type: { kind: 'field' } },
153
+ { name: 'is_infinite', type: { kind: 'boolean' } },
154
+ ],
155
+ path: 'std::embedded_curve_ops::EmbeddedCurvePoint',
156
+ },
157
+ },
158
+ ],
159
+ path: 'aztec::protocol_types::public_keys::TpkM',
160
+ },
161
+ },
162
+ ],
163
+ path: 'aztec::protocol_types::public_keys::PublicKeys',
164
+ },
165
+ visibility: 'private',
166
+ },
167
+ { name: 'universal_deploy', type: { kind: 'boolean' }, visibility: 'private' },
168
+ ],
169
+ returnTypes: [],
170
+ errorTypes: {
171
+ '718532354304118388': { error_kind: 'string', string: 'Point not on curve' },
172
+ '4135474769840782447': {
173
+ error_kind: 'string',
174
+ string: 'Point at infinity should have canonical representation (0 0)',
175
+ },
176
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
177
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
178
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
179
+ },
180
+ },
181
+ bytecode: Buffer.from([]),
182
+ debugSymbols: '',
183
+ },
184
+ ],
185
+ nonDispatchPublicFunctions: [
186
+ {
187
+ functionType: FunctionType.PUBLIC,
188
+ name: 'get_update_delay',
189
+ isOnlySelf: false,
190
+ isStatic: true,
191
+ isInitializer: false,
192
+ parameters: [],
193
+ returnTypes: [{ kind: 'integer', sign: 'unsigned', width: 64 }],
194
+ errorTypes: {
195
+ '5755400808989454547': {
196
+ error_kind: 'string',
197
+ string: 'Function get_update_delay can only be called statically',
198
+ },
199
+ '13455385521185560676': {
200
+ error_kind: 'string',
201
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
202
+ },
203
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
204
+ },
205
+ },
206
+ {
207
+ functionType: FunctionType.PUBLIC,
208
+ name: 'set_update_delay',
209
+ isOnlySelf: false,
210
+ isStatic: false,
211
+ isInitializer: false,
212
+ parameters: [
213
+ { name: 'new_update_delay', type: { kind: 'integer', sign: 'unsigned', width: 64 }, visibility: 'private' },
214
+ ],
215
+ returnTypes: [],
216
+ errorTypes: {
217
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
218
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
219
+ '6804164082532189961': { error_kind: 'string', string: 'New update delay is too low' },
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
+ '15353471697975175405': { error_kind: 'string', string: 'msg.sender is not deployed' },
226
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
227
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
228
+ },
229
+ },
230
+ {
231
+ functionType: FunctionType.PUBLIC,
232
+ name: 'update',
233
+ isOnlySelf: false,
234
+ isStatic: false,
235
+ isInitializer: false,
236
+ parameters: [
237
+ {
238
+ name: 'new_contract_class_id',
239
+ type: {
240
+ kind: 'struct',
241
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
242
+ path: 'aztec::protocol_types::contract_class_id::ContractClassId',
243
+ },
244
+ visibility: 'private',
245
+ },
246
+ ],
247
+ returnTypes: [],
248
+ errorTypes: {
249
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
250
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
251
+ '12579274401768182412': { error_kind: 'string', string: 'New contract class is not registered' },
252
+ '13455385521185560676': {
253
+ error_kind: 'string',
254
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
255
+ },
256
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
257
+ '15353471697975175405': { error_kind: 'string', string: 'msg.sender is not deployed' },
258
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
259
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
260
+ },
261
+ },
262
+ ],
263
+ outputs: { structs: {}, globals: {} },
264
+ storageLayout: {},
265
+ fileMap: {},
266
+ };
267
+
268
+ export class ContractInstanceRegistryContract extends ContractBase {
269
+ private constructor(wallet: Wallet) {
270
+ super(ProtocolContractAddress.ContractInstanceRegistry, ContractInstanceRegistryContractArtifact, wallet);
271
+ }
272
+
273
+ public static at(wallet: Wallet): ContractInstanceRegistryContract {
274
+ return new ContractInstanceRegistryContract(wallet);
275
+ }
276
+
277
+ declare public methods: {
278
+ /** get_update_delay() */
279
+ get_update_delay: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
280
+
281
+ /** public_dispatch(selector: field) */
282
+ public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
283
+
284
+ /** publish_for_public_execution(salt: field, contract_class_id: struct, initialization_hash: field, public_keys: struct, universal_deploy: boolean) */
285
+ publish_for_public_execution: ((
286
+ salt: FieldLike,
287
+ contract_class_id: WrappedFieldLike,
288
+ initialization_hash: FieldLike,
289
+ public_keys: PublicKeys,
290
+ universal_deploy: boolean,
291
+ ) => ContractFunctionInteraction) &
292
+ Pick<ContractMethod, 'selector'>;
293
+
294
+ /** set_update_delay(new_update_delay: integer) */
295
+ set_update_delay: ((new_update_delay: bigint | number) => ContractFunctionInteraction) &
296
+ Pick<ContractMethod, 'selector'>;
297
+
298
+ /** update(new_contract_class_id: struct) */
299
+ update: ((new_contract_class_id: WrappedFieldLike) => ContractFunctionInteraction) &
300
+ Pick<ContractMethod, 'selector'>;
301
+ };
302
+ }
@@ -0,0 +1,264 @@
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 FeeJuiceContractArtifact: ContractArtifact = {
20
+ name: 'FeeJuice',
21
+ functions: [
22
+ {
23
+ ...{
24
+ functionType: FunctionType.PRIVATE,
25
+ name: 'claim',
26
+ isOnlySelf: false,
27
+ isStatic: false,
28
+ isInitializer: false,
29
+ parameters: [
30
+ {
31
+ name: 'to',
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: 'amount', type: { kind: 'integer', sign: 'unsigned', width: 128 }, visibility: 'private' },
40
+ { name: 'secret', type: { kind: 'field' }, visibility: 'private' },
41
+ { name: 'message_leaf_index', type: { kind: 'field' }, visibility: 'private' },
42
+ ],
43
+ returnTypes: [],
44
+ errorTypes: {
45
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
46
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
47
+ '6609888949476313245': { error_kind: 'string', string: 'Message not in state' },
48
+ '11019205087382408538': { error_kind: 'string', string: 'Field failed to decompose into specified 4 limbs' },
49
+ '12370419938245003393': { error_kind: 'string', string: 'Field failed to decompose into specified 36 limbs' },
50
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
51
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
52
+ '15835548349546956319': { error_kind: 'string', string: 'Field failed to decompose into specified 32 limbs' },
53
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
54
+ },
55
+ },
56
+ bytecode: Buffer.from([]),
57
+ debugSymbols: '',
58
+ },
59
+ {
60
+ ...{
61
+ functionType: FunctionType.PRIVATE,
62
+ name: 'claim_and_end_setup',
63
+ isOnlySelf: false,
64
+ isStatic: false,
65
+ isInitializer: false,
66
+ parameters: [
67
+ {
68
+ name: 'to',
69
+ type: {
70
+ kind: 'struct',
71
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
72
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
73
+ },
74
+ visibility: 'private',
75
+ },
76
+ { name: 'amount', type: { kind: 'integer', sign: 'unsigned', width: 128 }, visibility: 'private' },
77
+ { name: 'secret', type: { kind: 'field' }, visibility: 'private' },
78
+ { name: 'message_leaf_index', type: { kind: 'field' }, visibility: 'private' },
79
+ ],
80
+ returnTypes: [],
81
+ errorTypes: {
82
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
83
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
84
+ '6609888949476313245': { error_kind: 'string', string: 'Message not in state' },
85
+ '11019205087382408538': { error_kind: 'string', string: 'Field failed to decompose into specified 4 limbs' },
86
+ '12370419938245003393': { error_kind: 'string', string: 'Field failed to decompose into specified 36 limbs' },
87
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
88
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
89
+ '15835548349546956319': { error_kind: 'string', string: 'Field failed to decompose into specified 32 limbs' },
90
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
91
+ },
92
+ },
93
+ bytecode: Buffer.from([]),
94
+ debugSymbols: '',
95
+ },
96
+ {
97
+ ...{
98
+ functionType: FunctionType.PUBLIC,
99
+ name: 'public_dispatch',
100
+ isOnlySelf: false,
101
+ isStatic: false,
102
+ isInitializer: false,
103
+ parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
104
+ returnTypes: [],
105
+ errorTypes: {
106
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
107
+ '1080336462466469436': {
108
+ error_kind: 'string',
109
+ string: 'Function check_balance can only be called statically',
110
+ },
111
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
112
+ '8637882143979902881': {
113
+ error_kind: 'string',
114
+ string: 'Function _increase_public_balance can only be called by the same contract',
115
+ },
116
+ '9543832133280402246': { error_kind: 'string', string: 'Balance too low' },
117
+ '12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
118
+ '13455385521185560676': {
119
+ error_kind: 'string',
120
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
121
+ },
122
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
123
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
124
+ '15860392472534760515': {
125
+ error_kind: 'string',
126
+ string: 'Function balance_of_public can only be called statically',
127
+ },
128
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
129
+ },
130
+ },
131
+ bytecode: Buffer.from([]),
132
+ debugSymbols: '',
133
+ },
134
+ ],
135
+ nonDispatchPublicFunctions: [
136
+ {
137
+ functionType: FunctionType.PUBLIC,
138
+ name: '_increase_public_balance',
139
+ isOnlySelf: true,
140
+ isStatic: false,
141
+ isInitializer: false,
142
+ parameters: [
143
+ {
144
+ name: 'to',
145
+ type: {
146
+ kind: 'struct',
147
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
148
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
149
+ },
150
+ visibility: 'private',
151
+ },
152
+ { name: 'amount', type: { kind: 'integer', sign: 'unsigned', width: 128 }, visibility: 'private' },
153
+ ],
154
+ returnTypes: [],
155
+ errorTypes: {
156
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
157
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
158
+ '8637882143979902881': {
159
+ error_kind: 'string',
160
+ string: 'Function _increase_public_balance can only be called by the same contract',
161
+ },
162
+ '13455385521185560676': {
163
+ error_kind: 'string',
164
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
165
+ },
166
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
167
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
168
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
169
+ },
170
+ },
171
+ {
172
+ functionType: FunctionType.PUBLIC,
173
+ name: 'balance_of_public',
174
+ isOnlySelf: false,
175
+ isStatic: true,
176
+ isInitializer: false,
177
+ parameters: [
178
+ {
179
+ name: 'owner',
180
+ type: {
181
+ kind: 'struct',
182
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
183
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
184
+ },
185
+ visibility: 'private',
186
+ },
187
+ ],
188
+ returnTypes: [{ kind: 'integer', sign: 'unsigned', width: 128 }],
189
+ errorTypes: {
190
+ '13455385521185560676': {
191
+ error_kind: 'string',
192
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
193
+ },
194
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
195
+ '15860392472534760515': {
196
+ error_kind: 'string',
197
+ string: 'Function balance_of_public can only be called statically',
198
+ },
199
+ },
200
+ },
201
+ {
202
+ functionType: FunctionType.PUBLIC,
203
+ name: 'check_balance',
204
+ isOnlySelf: false,
205
+ isStatic: true,
206
+ isInitializer: false,
207
+ parameters: [
208
+ { name: 'fee_limit', type: { kind: 'integer', sign: 'unsigned', width: 128 }, visibility: 'private' },
209
+ ],
210
+ returnTypes: [],
211
+ errorTypes: {
212
+ '1080336462466469436': { error_kind: 'string', string: 'Function check_balance can only be called statically' },
213
+ '9543832133280402246': { error_kind: 'string', string: 'Balance too low' },
214
+ '13455385521185560676': {
215
+ error_kind: 'string',
216
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
217
+ },
218
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
219
+ },
220
+ },
221
+ ],
222
+ outputs: { structs: {}, globals: {} },
223
+ storageLayout: {},
224
+ fileMap: {},
225
+ };
226
+
227
+ export class FeeJuiceContract extends ContractBase {
228
+ private constructor(wallet: Wallet) {
229
+ super(ProtocolContractAddress.FeeJuice, FeeJuiceContractArtifact, wallet);
230
+ }
231
+
232
+ public static at(wallet: Wallet): FeeJuiceContract {
233
+ return new FeeJuiceContract(wallet);
234
+ }
235
+
236
+ declare public methods: {
237
+ /** balance_of_public(owner: struct) */
238
+ balance_of_public: ((owner: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
239
+
240
+ /** check_balance(fee_limit: integer) */
241
+ check_balance: ((fee_limit: bigint | number) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
242
+
243
+ /** claim(to: struct, amount: integer, secret: field, message_leaf_index: field) */
244
+ claim: ((
245
+ to: AztecAddressLike,
246
+ amount: bigint | number,
247
+ secret: FieldLike,
248
+ message_leaf_index: FieldLike,
249
+ ) => ContractFunctionInteraction) &
250
+ Pick<ContractMethod, 'selector'>;
251
+
252
+ /** claim_and_end_setup(to: struct, amount: integer, secret: field, message_leaf_index: field) */
253
+ claim_and_end_setup: ((
254
+ to: AztecAddressLike,
255
+ amount: bigint | number,
256
+ secret: FieldLike,
257
+ message_leaf_index: FieldLike,
258
+ ) => ContractFunctionInteraction) &
259
+ Pick<ContractMethod, 'selector'>;
260
+
261
+ /** public_dispatch(selector: field) */
262
+ public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
263
+ };
264
+ }