@aztec/aztec.js 0.0.1-commit.b655e406 → 0.0.1-commit.bf2612ae

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 (246) hide show
  1. package/dest/account/account.d.ts +26 -42
  2. package/dest/account/account.d.ts.map +1 -1
  3. package/dest/account/account.js +19 -47
  4. package/dest/account/account_contract.d.ts +9 -10
  5. package/dest/account/account_contract.d.ts.map +1 -1
  6. package/dest/account/account_with_secret_key.d.ts +20 -9
  7. package/dest/account/account_with_secret_key.d.ts.map +1 -1
  8. package/dest/account/account_with_secret_key.js +21 -4
  9. package/dest/account/index.d.ts +4 -3
  10. package/dest/account/index.d.ts.map +1 -1
  11. package/dest/account/index.js +2 -0
  12. package/dest/account/signerless_account.d.ts +7 -9
  13. package/dest/account/signerless_account.d.ts.map +1 -1
  14. package/dest/account/signerless_account.js +8 -11
  15. package/dest/api/abi.d.ts +1 -1
  16. package/dest/api/account.d.ts +3 -4
  17. package/dest/api/account.d.ts.map +1 -1
  18. package/dest/api/account.js +2 -3
  19. package/dest/api/addresses.d.ts +1 -1
  20. package/dest/api/authorization.d.ts +2 -2
  21. package/dest/api/authorization.d.ts.map +1 -1
  22. package/dest/api/authorization.js +1 -1
  23. package/dest/api/block.d.ts +1 -1
  24. package/dest/api/contract.d.ts +17 -11
  25. package/dest/api/contract.d.ts.map +1 -1
  26. package/dest/api/contract.js +15 -9
  27. package/dest/api/crypto.d.ts +1 -1
  28. package/dest/api/deployment.d.ts +1 -1
  29. package/dest/api/eth_address.d.ts +1 -1
  30. package/dest/api/ethereum.d.ts +1 -1
  31. package/dest/api/events.d.ts +1 -1
  32. package/dest/api/fee.d.ts +1 -1
  33. package/dest/api/fee_testing.d.ts +1 -1
  34. package/dest/api/fields.d.ts +3 -2
  35. package/dest/api/fields.d.ts.map +1 -1
  36. package/dest/api/fields.js +2 -1
  37. package/dest/api/keys.d.ts +1 -1
  38. package/dest/api/log.d.ts +1 -1
  39. package/dest/api/messaging.d.ts +1 -1
  40. package/dest/api/node.d.ts +8 -4
  41. package/dest/api/node.d.ts.map +1 -1
  42. package/dest/api/node.js +7 -3
  43. package/dest/api/note.d.ts +2 -2
  44. package/dest/api/note.d.ts.map +1 -1
  45. package/dest/api/note.js +1 -1
  46. package/dest/api/protocol.d.ts +7 -1
  47. package/dest/api/protocol.d.ts.map +1 -1
  48. package/dest/api/protocol.js +6 -0
  49. package/dest/api/trees.d.ts +1 -1
  50. package/dest/api/tx.d.ts +2 -2
  51. package/dest/api/tx.d.ts.map +1 -1
  52. package/dest/api/tx.js +1 -1
  53. package/dest/api/utils.d.ts +1 -1
  54. package/dest/api/wallet.d.ts +2 -3
  55. package/dest/api/wallet.d.ts.map +1 -1
  56. package/dest/api/wallet.js +1 -2
  57. package/dest/authorization/call_authorization_request.d.ts +2 -2
  58. package/dest/authorization/call_authorization_request.d.ts.map +1 -1
  59. package/dest/contract/base_contract_interaction.d.ts +8 -11
  60. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  61. package/dest/contract/base_contract_interaction.js +5 -17
  62. package/dest/contract/batch_call.d.ts +8 -9
  63. package/dest/contract/batch_call.d.ts.map +1 -1
  64. package/dest/contract/batch_call.js +54 -34
  65. package/dest/contract/checker.d.ts +1 -1
  66. package/dest/contract/contract.d.ts +2 -2
  67. package/dest/contract/contract.d.ts.map +1 -1
  68. package/dest/contract/contract.js +4 -5
  69. package/dest/contract/contract_base.d.ts +6 -10
  70. package/dest/contract/contract_base.d.ts.map +1 -1
  71. package/dest/contract/contract_base.js +5 -12
  72. package/dest/contract/contract_function_interaction.d.ts +3 -3
  73. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  74. package/dest/contract/contract_function_interaction.js +9 -6
  75. package/dest/contract/deploy_method.d.ts +71 -23
  76. package/dest/contract/deploy_method.d.ts.map +1 -1
  77. package/dest/contract/deploy_method.js +49 -29
  78. package/dest/contract/get_gas_limits.d.ts +1 -1
  79. package/dest/contract/interaction_options.d.ts +44 -7
  80. package/dest/contract/interaction_options.d.ts.map +1 -1
  81. package/dest/contract/interaction_options.js +12 -11
  82. package/dest/contract/protocol_contracts/auth-registry.d.ts +36 -0
  83. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
  84. package/dest/contract/protocol_contracts/auth-registry.js +963 -0
  85. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +35 -0
  86. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
  87. package/dest/contract/protocol_contracts/contract-class-registry.js +784 -0
  88. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +31 -0
  89. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
  90. package/dest/contract/protocol_contracts/contract-instance-registry.js +858 -0
  91. package/dest/contract/protocol_contracts/fee-juice.d.ts +30 -0
  92. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
  93. package/dest/contract/protocol_contracts/fee-juice.js +827 -0
  94. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +34 -0
  95. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -0
  96. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +563 -0
  97. package/dest/contract/protocol_contracts/public-checks.d.ts +26 -0
  98. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -0
  99. package/dest/contract/protocol_contracts/public-checks.js +579 -0
  100. package/dest/contract/wait_for_proven.d.ts +2 -2
  101. package/dest/contract/wait_for_proven.d.ts.map +1 -1
  102. package/dest/contract/wait_for_proven.js +1 -1
  103. package/dest/contract/wait_opts.d.ts +16 -0
  104. package/dest/contract/wait_opts.d.ts.map +1 -0
  105. package/dest/contract/wait_opts.js +5 -0
  106. package/dest/deployment/broadcast_function.d.ts +1 -1
  107. package/dest/deployment/broadcast_function.js +4 -4
  108. package/dest/deployment/contract_deployer.d.ts +1 -1
  109. package/dest/deployment/contract_deployer.d.ts.map +1 -1
  110. package/dest/deployment/contract_deployer.js +1 -1
  111. package/dest/deployment/publish_class.d.ts +1 -1
  112. package/dest/deployment/publish_class.js +3 -3
  113. package/dest/deployment/publish_instance.d.ts +2 -2
  114. package/dest/deployment/publish_instance.d.ts.map +1 -1
  115. package/dest/deployment/publish_instance.js +3 -3
  116. package/dest/ethereum/portal_manager.d.ts +7 -6
  117. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  118. package/dest/ethereum/portal_manager.js +48 -22
  119. package/dest/fee/fee_juice_payment_method_with_claim.d.ts +2 -2
  120. package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
  121. package/dest/fee/fee_juice_payment_method_with_claim.js +3 -3
  122. package/dest/fee/fee_payment_method.d.ts +2 -2
  123. package/dest/fee/fee_payment_method.d.ts.map +1 -1
  124. package/dest/fee/private_fee_payment_method.d.ts +2 -2
  125. package/dest/fee/private_fee_payment_method.d.ts.map +1 -1
  126. package/dest/fee/private_fee_payment_method.js +4 -4
  127. package/dest/fee/public_fee_payment_method.d.ts +2 -2
  128. package/dest/fee/public_fee_payment_method.d.ts.map +1 -1
  129. package/dest/fee/public_fee_payment_method.js +4 -4
  130. package/dest/fee/sponsored_fee_payment.d.ts +2 -2
  131. package/dest/fee/sponsored_fee_payment.d.ts.map +1 -1
  132. package/dest/fee/sponsored_fee_payment.js +2 -2
  133. package/dest/scripts/generate_protocol_contract_types.d.ts +2 -0
  134. package/dest/scripts/generate_protocol_contract_types.d.ts.map +1 -0
  135. package/dest/scripts/generate_protocol_contract_types.js +120 -0
  136. package/dest/utils/abi_types.d.ts +2 -2
  137. package/dest/utils/abi_types.d.ts.map +1 -1
  138. package/dest/utils/authwit.d.ts +14 -12
  139. package/dest/utils/authwit.d.ts.map +1 -1
  140. package/dest/utils/authwit.js +27 -20
  141. package/dest/utils/cross_chain.d.ts +2 -2
  142. package/dest/utils/cross_chain.d.ts.map +1 -1
  143. package/dest/utils/fee_juice.d.ts +2 -2
  144. package/dest/utils/fee_juice.js +2 -2
  145. package/dest/utils/field_compressed_string.d.ts +1 -1
  146. package/dest/utils/field_compressed_string.d.ts.map +1 -1
  147. package/dest/utils/field_compressed_string.js +1 -1
  148. package/dest/utils/node.d.ts +13 -2
  149. package/dest/utils/node.d.ts.map +1 -1
  150. package/dest/utils/node.js +46 -0
  151. package/dest/utils/pub_key.d.ts +2 -2
  152. package/dest/utils/pub_key.d.ts.map +1 -1
  153. package/dest/utils/pub_key.js +1 -1
  154. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +6 -9
  155. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
  156. package/dest/wallet/account_entrypoint_meta_payment_method.js +29 -44
  157. package/dest/wallet/account_manager.d.ts +3 -9
  158. package/dest/wallet/account_manager.d.ts.map +1 -1
  159. package/dest/wallet/account_manager.js +6 -12
  160. package/dest/wallet/deploy_account_method.d.ts +37 -9
  161. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  162. package/dest/wallet/deploy_account_method.js +9 -7
  163. package/dest/wallet/index.d.ts +1 -2
  164. package/dest/wallet/index.d.ts.map +1 -1
  165. package/dest/wallet/index.js +0 -1
  166. package/dest/wallet/wallet.d.ts +323 -1504
  167. package/dest/wallet/wallet.d.ts.map +1 -1
  168. package/dest/wallet/wallet.js +85 -115
  169. package/package.json +16 -13
  170. package/src/account/account.ts +35 -60
  171. package/src/account/account_contract.ts +7 -8
  172. package/src/account/account_with_secret_key.ts +34 -9
  173. package/src/account/index.ts +3 -2
  174. package/src/account/signerless_account.ts +15 -15
  175. package/src/api/account.ts +10 -3
  176. package/src/api/authorization.ts +1 -0
  177. package/src/api/contract.ts +24 -8
  178. package/src/api/fields.ts +2 -1
  179. package/src/api/node.ts +7 -3
  180. package/src/api/note.ts +1 -1
  181. package/src/api/protocol.ts +7 -0
  182. package/src/api/tx.ts +4 -0
  183. package/src/api/wallet.ts +10 -9
  184. package/src/authorization/call_authorization_request.ts +1 -1
  185. package/src/contract/base_contract_interaction.ts +27 -16
  186. package/src/contract/batch_call.ts +67 -48
  187. package/src/contract/contract.ts +7 -5
  188. package/src/contract/contract_base.ts +5 -15
  189. package/src/contract/contract_function_interaction.ts +10 -11
  190. package/src/contract/deploy_method.ts +134 -40
  191. package/src/contract/interaction_options.ts +52 -13
  192. package/src/contract/protocol_contracts/auth-registry.ts +545 -0
  193. package/src/contract/protocol_contracts/contract-class-registry.ts +433 -0
  194. package/src/contract/protocol_contracts/contract-instance-registry.ts +493 -0
  195. package/src/contract/protocol_contracts/fee-juice.ts +457 -0
  196. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +329 -0
  197. package/src/contract/protocol_contracts/public-checks.ts +315 -0
  198. package/src/contract/wait_for_proven.ts +1 -1
  199. package/src/contract/wait_opts.ts +21 -0
  200. package/src/deployment/broadcast_function.ts +4 -4
  201. package/src/deployment/contract_deployer.ts +3 -2
  202. package/src/deployment/publish_class.ts +3 -3
  203. package/src/deployment/publish_instance.ts +3 -6
  204. package/src/ethereum/portal_manager.ts +65 -34
  205. package/src/fee/fee_juice_payment_method_with_claim.ts +4 -2
  206. package/src/fee/fee_payment_method.ts +1 -1
  207. package/src/fee/private_fee_payment_method.ts +5 -3
  208. package/src/fee/public_fee_payment_method.ts +5 -3
  209. package/src/fee/sponsored_fee_payment.ts +3 -1
  210. package/src/scripts/generate_protocol_contract_types.ts +150 -0
  211. package/src/utils/abi_types.ts +1 -1
  212. package/src/utils/authwit.ts +40 -22
  213. package/src/utils/cross_chain.ts +1 -1
  214. package/src/utils/fee_juice.ts +2 -2
  215. package/src/utils/field_compressed_string.ts +1 -1
  216. package/src/utils/node.ts +62 -0
  217. package/src/utils/pub_key.ts +2 -2
  218. package/src/wallet/account_entrypoint_meta_payment_method.ts +29 -60
  219. package/src/wallet/account_manager.ts +7 -15
  220. package/src/wallet/deploy_account_method.ts +41 -16
  221. package/src/wallet/index.ts +0 -1
  222. package/src/wallet/wallet.ts +207 -152
  223. package/dest/account/interface.d.ts +0 -19
  224. package/dest/account/interface.d.ts.map +0 -1
  225. package/dest/account/interface.js +0 -5
  226. package/dest/contract/deploy_sent_tx.d.ts +0 -43
  227. package/dest/contract/deploy_sent_tx.d.ts.map +0 -1
  228. package/dest/contract/deploy_sent_tx.js +0 -40
  229. package/dest/contract/protocol_contracts.d.ts +0 -9
  230. package/dest/contract/protocol_contracts.d.ts.map +0 -1
  231. package/dest/contract/protocol_contracts.js +0 -26
  232. package/dest/contract/sent_tx.d.ts +0 -51
  233. package/dest/contract/sent_tx.d.ts.map +0 -1
  234. package/dest/contract/sent_tx.js +0 -90
  235. package/dest/contract/unsafe_contract.d.ts +0 -15
  236. package/dest/contract/unsafe_contract.d.ts.map +0 -1
  237. package/dest/contract/unsafe_contract.js +0 -6
  238. package/dest/wallet/base_wallet.d.ts +0 -91
  239. package/dest/wallet/base_wallet.d.ts.map +0 -1
  240. package/dest/wallet/base_wallet.js +0 -238
  241. package/src/account/interface.ts +0 -25
  242. package/src/contract/deploy_sent_tx.ts +0 -68
  243. package/src/contract/protocol_contracts.ts +0 -35
  244. package/src/contract/sent_tx.ts +0 -130
  245. package/src/contract/unsafe_contract.ts +0 -19
  246. package/src/wallet/base_wallet.ts +0 -350
@@ -0,0 +1,579 @@
1
+ /* Autogenerated file, do not edit! */ /* eslint-disable */ import { ProtocolContractAddress } from '@aztec/protocol-contracts';
2
+ import { FunctionType } from '@aztec/stdlib/abi';
3
+ import { ContractBase } from '../contract_base.js';
4
+ const PublicChecksContractArtifact = {
5
+ name: 'PublicChecks',
6
+ functions: [
7
+ {
8
+ ...{
9
+ functionType: FunctionType.UTILITY,
10
+ name: 'process_message',
11
+ isOnlySelf: false,
12
+ isStatic: false,
13
+ isInitializer: false,
14
+ parameters: [
15
+ {
16
+ name: 'message_ciphertext',
17
+ type: {
18
+ kind: 'struct',
19
+ fields: [
20
+ {
21
+ name: 'storage',
22
+ type: {
23
+ kind: 'array',
24
+ length: 17,
25
+ type: {
26
+ kind: 'field'
27
+ }
28
+ }
29
+ },
30
+ {
31
+ name: 'len',
32
+ type: {
33
+ kind: 'integer',
34
+ sign: 'unsigned',
35
+ width: 32
36
+ }
37
+ }
38
+ ],
39
+ path: 'std::collections::bounded_vec::BoundedVec'
40
+ },
41
+ visibility: 'private'
42
+ },
43
+ {
44
+ name: 'message_context',
45
+ type: {
46
+ kind: 'struct',
47
+ fields: [
48
+ {
49
+ name: 'tx_hash',
50
+ type: {
51
+ kind: 'field'
52
+ }
53
+ },
54
+ {
55
+ name: 'unique_note_hashes_in_tx',
56
+ type: {
57
+ kind: 'struct',
58
+ fields: [
59
+ {
60
+ name: 'storage',
61
+ type: {
62
+ kind: 'array',
63
+ length: 64,
64
+ type: {
65
+ kind: 'field'
66
+ }
67
+ }
68
+ },
69
+ {
70
+ name: 'len',
71
+ type: {
72
+ kind: 'integer',
73
+ sign: 'unsigned',
74
+ width: 32
75
+ }
76
+ }
77
+ ],
78
+ path: 'std::collections::bounded_vec::BoundedVec'
79
+ }
80
+ },
81
+ {
82
+ name: 'first_nullifier_in_tx',
83
+ type: {
84
+ kind: 'field'
85
+ }
86
+ },
87
+ {
88
+ name: 'recipient',
89
+ type: {
90
+ kind: 'struct',
91
+ fields: [
92
+ {
93
+ name: 'inner',
94
+ type: {
95
+ kind: 'field'
96
+ }
97
+ }
98
+ ],
99
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress'
100
+ }
101
+ }
102
+ ],
103
+ path: 'aztec::messages::processing::message_context::MessageContext'
104
+ },
105
+ visibility: 'private'
106
+ }
107
+ ],
108
+ returnTypes: [],
109
+ errorTypes: {
110
+ '361444214588792908': {
111
+ error_kind: 'string',
112
+ string: 'attempt to multiply with overflow'
113
+ },
114
+ '992401946138144806': {
115
+ error_kind: 'string',
116
+ string: 'Attempted to read past end of BoundedVec'
117
+ },
118
+ '1998584279744703196': {
119
+ error_kind: 'string',
120
+ string: 'attempt to subtract with overflow'
121
+ },
122
+ '2967937905572420042': {
123
+ error_kind: 'fmtstring',
124
+ length: 61,
125
+ item_types: [
126
+ {
127
+ kind: 'field'
128
+ },
129
+ {
130
+ kind: 'field'
131
+ }
132
+ ]
133
+ },
134
+ '3330370348214585450': {
135
+ error_kind: 'fmtstring',
136
+ length: 48,
137
+ item_types: [
138
+ {
139
+ kind: 'field'
140
+ },
141
+ {
142
+ kind: 'field'
143
+ }
144
+ ]
145
+ },
146
+ '3670003311596808700': {
147
+ error_kind: 'fmtstring',
148
+ length: 77,
149
+ item_types: [
150
+ {
151
+ kind: 'integer',
152
+ sign: 'unsigned',
153
+ width: 32
154
+ }
155
+ ]
156
+ },
157
+ '4261968856572588300': {
158
+ error_kind: 'string',
159
+ string: 'Value does not fit in field'
160
+ },
161
+ '4440399188109668273': {
162
+ error_kind: 'string',
163
+ string: 'Input length must be a multiple of 32'
164
+ },
165
+ '9791669845391776238': {
166
+ error_kind: 'string',
167
+ string: '0 has a square root; you cannot claim it is not square'
168
+ },
169
+ '10135509984888824963': {
170
+ error_kind: 'fmtstring',
171
+ length: 58,
172
+ item_types: [
173
+ {
174
+ kind: 'field'
175
+ }
176
+ ]
177
+ },
178
+ '10791800398362570014': {
179
+ error_kind: 'string',
180
+ string: 'extend_from_bounded_vec out of bounds'
181
+ },
182
+ '11692359521570349358': {
183
+ error_kind: 'fmtstring',
184
+ length: 40,
185
+ item_types: []
186
+ },
187
+ '12469291177396340830': {
188
+ error_kind: 'string',
189
+ string: 'call to assert_max_bit_size'
190
+ },
191
+ '12913276134398371456': {
192
+ error_kind: 'string',
193
+ string: 'push out of bounds'
194
+ },
195
+ '13557316507370296400': {
196
+ error_kind: 'fmtstring',
197
+ length: 130,
198
+ item_types: [
199
+ {
200
+ kind: 'integer',
201
+ sign: 'unsigned',
202
+ width: 32
203
+ }
204
+ ]
205
+ },
206
+ '14938672389828944159': {
207
+ error_kind: 'fmtstring',
208
+ length: 146,
209
+ item_types: [
210
+ {
211
+ kind: 'integer',
212
+ sign: 'unsigned',
213
+ width: 32
214
+ }
215
+ ]
216
+ },
217
+ '14990209321349310352': {
218
+ error_kind: 'string',
219
+ string: 'attempt to add with overflow'
220
+ },
221
+ '15764276373176857197': {
222
+ error_kind: 'string',
223
+ string: 'Stack too deep'
224
+ },
225
+ '16431471497789672479': {
226
+ error_kind: 'string',
227
+ string: 'Index out of bounds'
228
+ },
229
+ '17531474008201752295': {
230
+ error_kind: 'fmtstring',
231
+ length: 133,
232
+ item_types: [
233
+ {
234
+ kind: 'integer',
235
+ sign: 'unsigned',
236
+ width: 32
237
+ }
238
+ ]
239
+ }
240
+ }
241
+ },
242
+ bytecode: Buffer.from([]),
243
+ debugSymbols: ''
244
+ },
245
+ {
246
+ ...{
247
+ functionType: FunctionType.PUBLIC,
248
+ name: 'public_dispatch',
249
+ isOnlySelf: false,
250
+ isStatic: false,
251
+ isInitializer: false,
252
+ parameters: [
253
+ {
254
+ name: 'selector',
255
+ type: {
256
+ kind: 'field'
257
+ },
258
+ visibility: 'private'
259
+ }
260
+ ],
261
+ returnTypes: [],
262
+ errorTypes: {
263
+ '3445904810750103705': {
264
+ error_kind: 'string',
265
+ string: 'Block number mismatch.'
266
+ },
267
+ '6989792215391248978': {
268
+ error_kind: 'string',
269
+ string: 'Function check_timestamp can only be called statically'
270
+ },
271
+ '7259463707251703666': {
272
+ error_kind: 'string',
273
+ string: 'Function check_block_number can only be called statically'
274
+ },
275
+ '12511970388699677811': {
276
+ error_kind: 'fmtstring',
277
+ length: 27,
278
+ item_types: [
279
+ {
280
+ kind: 'field'
281
+ }
282
+ ]
283
+ },
284
+ '13950240626967988787': {
285
+ error_kind: 'string',
286
+ string: 'Timestamp mismatch.'
287
+ },
288
+ '14990209321349310352': {
289
+ error_kind: 'string',
290
+ string: 'attempt to add with overflow'
291
+ },
292
+ '15015303112667403944': {
293
+ error_kind: 'fmtstring',
294
+ length: 17,
295
+ item_types: []
296
+ },
297
+ '15764276373176857197': {
298
+ error_kind: 'string',
299
+ string: 'Stack too deep'
300
+ },
301
+ '16431471497789672479': {
302
+ error_kind: 'string',
303
+ string: 'Index out of bounds'
304
+ }
305
+ }
306
+ },
307
+ bytecode: Buffer.from([]),
308
+ debugSymbols: ''
309
+ },
310
+ {
311
+ ...{
312
+ functionType: FunctionType.UTILITY,
313
+ name: 'sync_state',
314
+ isOnlySelf: false,
315
+ isStatic: false,
316
+ isInitializer: false,
317
+ parameters: [],
318
+ returnTypes: [],
319
+ errorTypes: {
320
+ '361444214588792908': {
321
+ error_kind: 'string',
322
+ string: 'attempt to multiply with overflow'
323
+ },
324
+ '992401946138144806': {
325
+ error_kind: 'string',
326
+ string: 'Attempted to read past end of BoundedVec'
327
+ },
328
+ '1998584279744703196': {
329
+ error_kind: 'string',
330
+ string: 'attempt to subtract with overflow'
331
+ },
332
+ '2967937905572420042': {
333
+ error_kind: 'fmtstring',
334
+ length: 61,
335
+ item_types: [
336
+ {
337
+ kind: 'field'
338
+ },
339
+ {
340
+ kind: 'field'
341
+ }
342
+ ]
343
+ },
344
+ '3330370348214585450': {
345
+ error_kind: 'fmtstring',
346
+ length: 48,
347
+ item_types: [
348
+ {
349
+ kind: 'field'
350
+ },
351
+ {
352
+ kind: 'field'
353
+ }
354
+ ]
355
+ },
356
+ '3670003311596808700': {
357
+ error_kind: 'fmtstring',
358
+ length: 77,
359
+ item_types: [
360
+ {
361
+ kind: 'integer',
362
+ sign: 'unsigned',
363
+ width: 32
364
+ }
365
+ ]
366
+ },
367
+ '4261968856572588300': {
368
+ error_kind: 'string',
369
+ string: 'Value does not fit in field'
370
+ },
371
+ '4440399188109668273': {
372
+ error_kind: 'string',
373
+ string: 'Input length must be a multiple of 32'
374
+ },
375
+ '9791669845391776238': {
376
+ error_kind: 'string',
377
+ string: '0 has a square root; you cannot claim it is not square'
378
+ },
379
+ '9885968605480832328': {
380
+ error_kind: 'string',
381
+ string: 'Attempted to read past the length of a CapsuleArray'
382
+ },
383
+ '10135509984888824963': {
384
+ error_kind: 'fmtstring',
385
+ length: 58,
386
+ item_types: [
387
+ {
388
+ kind: 'field'
389
+ }
390
+ ]
391
+ },
392
+ '10791800398362570014': {
393
+ error_kind: 'string',
394
+ string: 'extend_from_bounded_vec out of bounds'
395
+ },
396
+ '11021520179822076911': {
397
+ error_kind: 'string',
398
+ string: 'Attempted to delete past the length of a CapsuleArray'
399
+ },
400
+ '11692359521570349358': {
401
+ error_kind: 'fmtstring',
402
+ length: 40,
403
+ item_types: []
404
+ },
405
+ '12327971061804302172': {
406
+ error_kind: 'fmtstring',
407
+ length: 98,
408
+ item_types: []
409
+ },
410
+ '12469291177396340830': {
411
+ error_kind: 'string',
412
+ string: 'call to assert_max_bit_size'
413
+ },
414
+ '12913276134398371456': {
415
+ error_kind: 'string',
416
+ string: 'push out of bounds'
417
+ },
418
+ '13557316507370296400': {
419
+ error_kind: 'fmtstring',
420
+ length: 130,
421
+ item_types: [
422
+ {
423
+ kind: 'integer',
424
+ sign: 'unsigned',
425
+ width: 32
426
+ }
427
+ ]
428
+ },
429
+ '14938672389828944159': {
430
+ error_kind: 'fmtstring',
431
+ length: 146,
432
+ item_types: [
433
+ {
434
+ kind: 'integer',
435
+ sign: 'unsigned',
436
+ width: 32
437
+ }
438
+ ]
439
+ },
440
+ '14990209321349310352': {
441
+ error_kind: 'string',
442
+ string: 'attempt to add with overflow'
443
+ },
444
+ '15764276373176857197': {
445
+ error_kind: 'string',
446
+ string: 'Stack too deep'
447
+ },
448
+ '16431471497789672479': {
449
+ error_kind: 'string',
450
+ string: 'Index out of bounds'
451
+ },
452
+ '17531474008201752295': {
453
+ error_kind: 'fmtstring',
454
+ length: 133,
455
+ item_types: [
456
+ {
457
+ kind: 'integer',
458
+ sign: 'unsigned',
459
+ width: 32
460
+ }
461
+ ]
462
+ }
463
+ }
464
+ },
465
+ bytecode: Buffer.from([]),
466
+ debugSymbols: ''
467
+ }
468
+ ],
469
+ nonDispatchPublicFunctions: [
470
+ {
471
+ functionType: FunctionType.PUBLIC,
472
+ name: 'check_block_number',
473
+ isOnlySelf: false,
474
+ isStatic: true,
475
+ isInitializer: false,
476
+ parameters: [
477
+ {
478
+ name: 'operation',
479
+ type: {
480
+ kind: 'integer',
481
+ sign: 'unsigned',
482
+ width: 8
483
+ },
484
+ visibility: 'private'
485
+ },
486
+ {
487
+ name: 'value',
488
+ type: {
489
+ kind: 'integer',
490
+ sign: 'unsigned',
491
+ width: 32
492
+ },
493
+ visibility: 'private'
494
+ }
495
+ ],
496
+ returnTypes: [],
497
+ errorTypes: {
498
+ '3445904810750103705': {
499
+ error_kind: 'string',
500
+ string: 'Block number mismatch.'
501
+ },
502
+ '7259463707251703666': {
503
+ error_kind: 'string',
504
+ string: 'Function check_block_number can only be called statically'
505
+ },
506
+ '15015303112667403944': {
507
+ error_kind: 'fmtstring',
508
+ length: 17,
509
+ item_types: []
510
+ },
511
+ '15764276373176857197': {
512
+ error_kind: 'string',
513
+ string: 'Stack too deep'
514
+ }
515
+ }
516
+ },
517
+ {
518
+ functionType: FunctionType.PUBLIC,
519
+ name: 'check_timestamp',
520
+ isOnlySelf: false,
521
+ isStatic: true,
522
+ isInitializer: false,
523
+ parameters: [
524
+ {
525
+ name: 'operation',
526
+ type: {
527
+ kind: 'integer',
528
+ sign: 'unsigned',
529
+ width: 8
530
+ },
531
+ visibility: 'private'
532
+ },
533
+ {
534
+ name: 'value',
535
+ type: {
536
+ kind: 'integer',
537
+ sign: 'unsigned',
538
+ width: 64
539
+ },
540
+ visibility: 'private'
541
+ }
542
+ ],
543
+ returnTypes: [],
544
+ errorTypes: {
545
+ '6989792215391248978': {
546
+ error_kind: 'string',
547
+ string: 'Function check_timestamp can only be called statically'
548
+ },
549
+ '13950240626967988787': {
550
+ error_kind: 'string',
551
+ string: 'Timestamp mismatch.'
552
+ },
553
+ '15015303112667403944': {
554
+ error_kind: 'fmtstring',
555
+ length: 17,
556
+ item_types: []
557
+ },
558
+ '15764276373176857197': {
559
+ error_kind: 'string',
560
+ string: 'Stack too deep'
561
+ }
562
+ }
563
+ }
564
+ ],
565
+ outputs: {
566
+ structs: {},
567
+ globals: {}
568
+ },
569
+ storageLayout: {},
570
+ fileMap: {}
571
+ };
572
+ export class PublicChecksContract extends ContractBase {
573
+ constructor(wallet){
574
+ super(ProtocolContractAddress.PublicChecks, PublicChecksContractArtifact, wallet);
575
+ }
576
+ static at(wallet) {
577
+ return new PublicChecksContract(wallet);
578
+ }
579
+ }
@@ -13,5 +13,5 @@ export declare const DefaultWaitForProvenOpts: WaitForProvenOpts;
13
13
  /**
14
14
  * Wait for a transaction to be proven by polling the node
15
15
  */
16
- export declare function waitForProven(node: AztecNode, receipt: TxReceipt, opts?: WaitForProvenOpts): Promise<number>;
17
- //# sourceMappingURL=wait_for_proven.d.ts.map
16
+ export declare function waitForProven(node: AztecNode, receipt: TxReceipt, opts?: WaitForProvenOpts): Promise<NonNullable<import("@aztec/foundation/branded-types").BlockNumber>>;
17
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FpdF9mb3JfcHJvdmVuLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJhY3Qvd2FpdF9mb3JfcHJvdmVuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ2pFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBSWxEOztHQUVHO0FBQ0gsTUFBTSxNQUFNLGlCQUFpQixHQUFHO0lBQzlCLDZEQUE2RDtJQUM3RCxhQUFhLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDdkIsNkNBQTZDO0lBQzdDLFFBQVEsQ0FBQyxFQUFFLE1BQU0sQ0FBQztDQUNuQixDQUFDO0FBRUYsZUFBTyxNQUFNLHdCQUF3QixFQUFFLGlCQUd0QyxDQUFDO0FBRUY7O0dBRUc7QUFDSCx3QkFBc0IsYUFBYSxDQUFDLElBQUksRUFBRSxTQUFTLEVBQUUsT0FBTyxFQUFFLFNBQVMsRUFBRSxJQUFJLENBQUMsRUFBRSxpQkFBaUIsK0VBYWhHIn0=
@@ -1 +1 @@
1
- {"version":3,"file":"wait_for_proven.d.ts","sourceRoot":"","sources":["../../src/contract/wait_for_proven.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAIlD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAGtC,CAAC;AAEF;;GAEG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,iBAAiB,mBAahG"}
1
+ {"version":3,"file":"wait_for_proven.d.ts","sourceRoot":"","sources":["../../src/contract/wait_for_proven.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAIlD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAGtC,CAAC;AAEF;;GAEG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,iBAAiB,+EAahG"}
@@ -1,5 +1,5 @@
1
1
  import { retryUntil } from '@aztec/foundation/retry';
2
- import { DefaultWaitOpts } from './sent_tx.js';
2
+ import { DefaultWaitOpts } from './wait_opts.js';
3
3
  export const DefaultWaitForProvenOpts = {
4
4
  provenTimeout: 600,
5
5
  interval: DefaultWaitOpts.interval
@@ -0,0 +1,16 @@
1
+ import type { TxStatus } from '@aztec/stdlib/tx';
2
+ /** Options related to waiting for a tx. */
3
+ export type WaitOpts = {
4
+ /** The amount of time to ignore TxStatus.DROPPED receipts (in seconds) due to the presumption that it is being propagated by the p2p network. Defaults to 5. */
5
+ ignoreDroppedReceiptsFor?: number;
6
+ /** The maximum time (in seconds) to wait for the transaction to be mined. Defaults to 60. */
7
+ timeout?: number;
8
+ /** The time interval (in seconds) between retries to fetch the transaction receipt. Defaults to 1. */
9
+ interval?: number;
10
+ /** Whether to accept a revert as a status code for the tx when waiting for it. If false, will throw if the tx reverts. */
11
+ dontThrowOnRevert?: boolean;
12
+ /** The minimum inclusion status to wait for. If set, waits until the receipt reaches this status or higher. Defaults to CHECKPOINTED. */
13
+ waitForStatus?: TxStatus;
14
+ };
15
+ export declare const DefaultWaitOpts: WaitOpts;
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FpdF9vcHRzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJhY3Qvd2FpdF9vcHRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRWpELDJDQUEyQztBQUMzQyxNQUFNLE1BQU0sUUFBUSxHQUFHO0lBQ3JCLGdLQUFnSztJQUNoSyx3QkFBd0IsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNsQyw2RkFBNkY7SUFDN0YsT0FBTyxDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ2pCLHNHQUFzRztJQUN0RyxRQUFRLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDbEIsMEhBQTBIO0lBQzFILGlCQUFpQixDQUFDLEVBQUUsT0FBTyxDQUFDO0lBQzVCLHlJQUF5STtJQUN6SSxhQUFhLENBQUMsRUFBRSxRQUFRLENBQUM7Q0FDMUIsQ0FBQztBQUVGLGVBQU8sTUFBTSxlQUFlLEVBQUUsUUFJN0IsQ0FBQyJ9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wait_opts.d.ts","sourceRoot":"","sources":["../../src/contract/wait_opts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,2CAA2C;AAC3C,MAAM,MAAM,QAAQ,GAAG;IACrB,gKAAgK;IAChK,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,6FAA6F;IAC7F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0HAA0H;IAC1H,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yIAAyI;IACzI,aAAa,CAAC,EAAE,QAAQ,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,QAI7B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const DefaultWaitOpts = {
2
+ ignoreDroppedReceiptsFor: 5,
3
+ timeout: 300,
4
+ interval: 1
5
+ };
@@ -21,4 +21,4 @@ export declare function broadcastPrivateFunction(wallet: Wallet, artifact: Contr
21
21
  * @returns A ContractFunctionInteraction object that can be used to send the transaction.
22
22
  */
23
23
  export declare function broadcastUtilityFunction(wallet: Wallet, artifact: ContractArtifact, selector: FunctionSelector): Promise<ContractFunctionInteraction>;
24
- //# sourceMappingURL=broadcast_function.d.ts.map
24
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJvYWRjYXN0X2Z1bmN0aW9uLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZGVwbG95bWVudC9icm9hZGNhc3RfZnVuY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUUEsT0FBTyxFQUFFLEtBQUssZ0JBQWdCLEVBQUUsZ0JBQWdCLEVBQWdDLE1BQU0sbUJBQW1CLENBQUM7QUFTMUcsT0FBTyxLQUFLLEVBQUUsMkJBQTJCLEVBQUUsTUFBTSw4Q0FBOEMsQ0FBQztBQUVoRyxPQUFPLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUVqRDs7Ozs7Ozs7R0FRRztBQUNILHdCQUFzQix3QkFBd0IsQ0FDNUMsTUFBTSxFQUFFLE1BQU0sRUFDZCxRQUFRLEVBQUUsZ0JBQWdCLEVBQzFCLFFBQVEsRUFBRSxnQkFBZ0IsR0FDekIsT0FBTyxDQUFDLDJCQUEyQixDQUFDLENBb0R0QztBQUVEOzs7Ozs7OztHQVFHO0FBQ0gsd0JBQXNCLHdCQUF3QixDQUM1QyxNQUFNLEVBQUUsTUFBTSxFQUNkLFFBQVEsRUFBRSxnQkFBZ0IsRUFDMUIsUUFBUSxFQUFFLGdCQUFnQixHQUN6QixPQUFPLENBQUMsMkJBQTJCLENBQUMsQ0E4Q3RDIn0=
@@ -1,11 +1,11 @@
1
1
  import { ARTIFACT_FUNCTION_TREE_MAX_HEIGHT, CONTRACT_CLASS_REGISTRY_BYTECODE_CAPSULE_SLOT, MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS } from '@aztec/constants';
2
2
  import { padArrayEnd } from '@aztec/foundation/collection';
3
- import { Fr } from '@aztec/foundation/fields';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import { ProtocolContractAddress } from '@aztec/protocol-contracts';
5
5
  import { FunctionSelector, FunctionType, bufferAsFields } from '@aztec/stdlib/abi';
6
6
  import { computeVerificationKeyHash, createPrivateFunctionMembershipProof, createUtilityFunctionMembershipProof, getContractClassFromArtifact } from '@aztec/stdlib/contract';
7
7
  import { Capsule } from '@aztec/stdlib/tx';
8
- import { getClassRegistryContract } from '../contract/protocol_contracts.js';
8
+ import { ContractClassRegistryContract } from '../contract/protocol_contracts/contract-class-registry.js';
9
9
  /**
10
10
  * Sets up a call to broadcast a private function's bytecode via the ClassRegistry contract.
11
11
  * Note that this is not required for users to call the function, but is rather a convenience to make
@@ -27,7 +27,7 @@ import { getClassRegistryContract } from '../contract/protocol_contracts.js';
27
27
  }
28
28
  const { artifactTreeSiblingPath, artifactTreeLeafIndex, artifactMetadataHash, functionMetadataHash, utilityFunctionsTreeRoot, privateFunctionTreeSiblingPath, privateFunctionTreeLeafIndex } = await createPrivateFunctionMembershipProof(selector, artifact);
29
29
  const vkHash = await computeVerificationKeyHash(privateFunctionArtifact);
30
- const classRegistry = await getClassRegistryContract(wallet);
30
+ const classRegistry = ContractClassRegistryContract.at(wallet);
31
31
  const bytecode = bufferAsFields(privateFunctionArtifact.bytecode, MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS);
32
32
  return classRegistry.methods.broadcast_private_function(contractClass.id, artifactMetadataHash, utilityFunctionsTreeRoot, privateFunctionTreeSiblingPath, privateFunctionTreeLeafIndex, padArrayEnd(artifactTreeSiblingPath, Fr.ZERO, ARTIFACT_FUNCTION_TREE_MAX_HEIGHT), artifactTreeLeafIndex, // eslint-disable-next-line camelcase
33
33
  {
@@ -60,7 +60,7 @@ import { getClassRegistryContract } from '../contract/protocol_contracts.js';
60
60
  throw new Error(`Utility function with selector ${selector.toString()} not found`);
61
61
  }
62
62
  const { artifactMetadataHash, artifactTreeLeafIndex, artifactTreeSiblingPath, functionMetadataHash, privateFunctionsArtifactTreeRoot } = await createUtilityFunctionMembershipProof(selector, artifact);
63
- const classRegistry = await getClassRegistryContract(wallet);
63
+ const classRegistry = ContractClassRegistryContract.at(wallet);
64
64
  const bytecode = bufferAsFields(utilityFunctionArtifact.bytecode, MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS);
65
65
  return classRegistry.methods.broadcast_utility_function(contractClass.id, artifactMetadataHash, privateFunctionsArtifactTreeRoot, padArrayEnd(artifactTreeSiblingPath, Fr.ZERO, ARTIFACT_FUNCTION_TREE_MAX_HEIGHT), artifactTreeLeafIndex, // eslint-disable-next-line camelcase
66
66
  {