@aztec/aztec.js 0.0.1-commit.24de95ac → 0.0.1-commit.27d773e65

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 (261) 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 +19 -13
  25. package/dest/api/contract.d.ts.map +1 -1
  26. package/dest/api/contract.js +17 -11
  27. package/dest/api/crypto.d.ts +1 -1
  28. package/dest/api/deployment.d.ts +1 -2
  29. package/dest/api/deployment.d.ts.map +1 -1
  30. package/dest/api/deployment.js +0 -1
  31. package/dest/api/eth_address.d.ts +1 -1
  32. package/dest/api/ethereum.d.ts +1 -1
  33. package/dest/api/events.d.ts +10 -6
  34. package/dest/api/events.d.ts.map +1 -1
  35. package/dest/api/events.js +30 -20
  36. package/dest/api/fee.d.ts +1 -1
  37. package/dest/api/fee_testing.d.ts +1 -1
  38. package/dest/api/fields.d.ts +4 -2
  39. package/dest/api/fields.d.ts.map +1 -1
  40. package/dest/api/fields.js +3 -1
  41. package/dest/api/keys.d.ts +2 -2
  42. package/dest/api/keys.js +1 -1
  43. package/dest/api/log.d.ts +1 -1
  44. package/dest/api/messaging.d.ts +1 -1
  45. package/dest/api/node.d.ts +8 -4
  46. package/dest/api/node.d.ts.map +1 -1
  47. package/dest/api/node.js +7 -3
  48. package/dest/api/note.d.ts +2 -2
  49. package/dest/api/note.d.ts.map +1 -1
  50. package/dest/api/note.js +1 -1
  51. package/dest/api/protocol.d.ts +7 -1
  52. package/dest/api/protocol.d.ts.map +1 -1
  53. package/dest/api/protocol.js +6 -0
  54. package/dest/api/trees.d.ts +1 -1
  55. package/dest/api/tx.d.ts +2 -2
  56. package/dest/api/tx.d.ts.map +1 -1
  57. package/dest/api/tx.js +1 -1
  58. package/dest/api/utils.d.ts +1 -1
  59. package/dest/api/wallet.d.ts +3 -3
  60. package/dest/api/wallet.d.ts.map +1 -1
  61. package/dest/api/wallet.js +2 -2
  62. package/dest/authorization/call_authorization_request.d.ts +2 -2
  63. package/dest/authorization/call_authorization_request.d.ts.map +1 -1
  64. package/dest/contract/base_contract_interaction.d.ts +8 -11
  65. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  66. package/dest/contract/base_contract_interaction.js +5 -17
  67. package/dest/contract/batch_call.d.ts +8 -9
  68. package/dest/contract/batch_call.d.ts.map +1 -1
  69. package/dest/contract/batch_call.js +59 -36
  70. package/dest/contract/checker.d.ts +1 -1
  71. package/dest/contract/contract.d.ts +2 -2
  72. package/dest/contract/contract.d.ts.map +1 -1
  73. package/dest/contract/contract.js +4 -5
  74. package/dest/contract/contract_base.d.ts +6 -10
  75. package/dest/contract/contract_base.d.ts.map +1 -1
  76. package/dest/contract/contract_base.js +5 -12
  77. package/dest/contract/contract_function_interaction.d.ts +5 -14
  78. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  79. package/dest/contract/contract_function_interaction.js +18 -12
  80. package/dest/contract/deploy_method.d.ts +85 -24
  81. package/dest/contract/deploy_method.d.ts.map +1 -1
  82. package/dest/contract/deploy_method.js +71 -36
  83. package/dest/contract/get_gas_limits.d.ts +1 -1
  84. package/dest/contract/get_gas_limits.js +3 -3
  85. package/dest/contract/interaction_options.d.ts +51 -7
  86. package/dest/contract/interaction_options.d.ts.map +1 -1
  87. package/dest/contract/interaction_options.js +12 -11
  88. package/dest/contract/protocol_contracts/auth-registry.d.ts +36 -0
  89. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
  90. package/dest/contract/protocol_contracts/auth-registry.js +997 -0
  91. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +15 -0
  92. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
  93. package/dest/contract/protocol_contracts/contract-class-registry.js +139 -0
  94. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +22 -0
  95. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
  96. package/dest/contract/protocol_contracts/contract-instance-registry.js +465 -0
  97. package/dest/contract/protocol_contracts/fee-juice.d.ts +21 -0
  98. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
  99. package/dest/contract/protocol_contracts/fee-juice.js +426 -0
  100. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +34 -0
  101. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -0
  102. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +593 -0
  103. package/dest/contract/protocol_contracts/public-checks.d.ts +26 -0
  104. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -0
  105. package/dest/contract/protocol_contracts/public-checks.js +601 -0
  106. package/dest/contract/wait_for_proven.d.ts +2 -2
  107. package/dest/contract/wait_for_proven.d.ts.map +1 -1
  108. package/dest/contract/wait_for_proven.js +1 -1
  109. package/dest/contract/wait_opts.d.ts +16 -0
  110. package/dest/contract/wait_opts.d.ts.map +1 -0
  111. package/dest/contract/wait_opts.js +5 -0
  112. package/dest/deployment/contract_deployer.d.ts +1 -1
  113. package/dest/deployment/contract_deployer.d.ts.map +1 -1
  114. package/dest/deployment/contract_deployer.js +1 -1
  115. package/dest/deployment/publish_class.d.ts +1 -1
  116. package/dest/deployment/publish_class.js +3 -3
  117. package/dest/deployment/publish_instance.d.ts +2 -2
  118. package/dest/deployment/publish_instance.d.ts.map +1 -1
  119. package/dest/deployment/publish_instance.js +3 -3
  120. package/dest/ethereum/portal_manager.d.ts +7 -6
  121. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  122. package/dest/ethereum/portal_manager.js +48 -22
  123. package/dest/fee/fee_juice_payment_method_with_claim.d.ts +2 -2
  124. package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
  125. package/dest/fee/fee_juice_payment_method_with_claim.js +9 -9
  126. package/dest/fee/fee_payment_method.d.ts +2 -2
  127. package/dest/fee/fee_payment_method.d.ts.map +1 -1
  128. package/dest/fee/private_fee_payment_method.d.ts +2 -2
  129. package/dest/fee/private_fee_payment_method.d.ts.map +1 -1
  130. package/dest/fee/private_fee_payment_method.js +14 -14
  131. package/dest/fee/public_fee_payment_method.d.ts +2 -2
  132. package/dest/fee/public_fee_payment_method.d.ts.map +1 -1
  133. package/dest/fee/public_fee_payment_method.js +14 -14
  134. package/dest/fee/sponsored_fee_payment.d.ts +2 -2
  135. package/dest/fee/sponsored_fee_payment.d.ts.map +1 -1
  136. package/dest/fee/sponsored_fee_payment.js +5 -5
  137. package/dest/scripts/generate_protocol_contract_types.d.ts +2 -0
  138. package/dest/scripts/generate_protocol_contract_types.d.ts.map +1 -0
  139. package/dest/scripts/generate_protocol_contract_types.js +120 -0
  140. package/dest/utils/abi_types.d.ts +2 -2
  141. package/dest/utils/abi_types.d.ts.map +1 -1
  142. package/dest/utils/authwit.d.ts +14 -12
  143. package/dest/utils/authwit.d.ts.map +1 -1
  144. package/dest/utils/authwit.js +27 -20
  145. package/dest/utils/cross_chain.d.ts +2 -2
  146. package/dest/utils/cross_chain.d.ts.map +1 -1
  147. package/dest/utils/fee_juice.d.ts +2 -2
  148. package/dest/utils/fee_juice.js +2 -2
  149. package/dest/utils/field_compressed_string.d.ts +1 -1
  150. package/dest/utils/field_compressed_string.d.ts.map +1 -1
  151. package/dest/utils/field_compressed_string.js +1 -1
  152. package/dest/utils/node.d.ts +13 -2
  153. package/dest/utils/node.d.ts.map +1 -1
  154. package/dest/utils/node.js +46 -0
  155. package/dest/utils/pub_key.d.ts +2 -2
  156. package/dest/utils/pub_key.d.ts.map +1 -1
  157. package/dest/utils/pub_key.js +1 -1
  158. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +6 -9
  159. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
  160. package/dest/wallet/account_entrypoint_meta_payment_method.js +29 -44
  161. package/dest/wallet/account_manager.d.ts +3 -9
  162. package/dest/wallet/account_manager.d.ts.map +1 -1
  163. package/dest/wallet/account_manager.js +6 -12
  164. package/dest/wallet/capabilities.d.ts +452 -0
  165. package/dest/wallet/capabilities.d.ts.map +1 -0
  166. package/dest/wallet/capabilities.js +3 -0
  167. package/dest/wallet/deploy_account_method.d.ts +49 -10
  168. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  169. package/dest/wallet/deploy_account_method.js +35 -7
  170. package/dest/wallet/index.d.ts +2 -2
  171. package/dest/wallet/index.d.ts.map +1 -1
  172. package/dest/wallet/index.js +1 -1
  173. package/dest/wallet/wallet.d.ts +1853 -1533
  174. package/dest/wallet/wallet.d.ts.map +1 -1
  175. package/dest/wallet/wallet.js +223 -124
  176. package/package.json +27 -15
  177. package/src/account/account.ts +35 -60
  178. package/src/account/account_contract.ts +7 -8
  179. package/src/account/account_with_secret_key.ts +34 -9
  180. package/src/account/index.ts +3 -2
  181. package/src/account/signerless_account.ts +15 -15
  182. package/src/api/account.ts +10 -3
  183. package/src/api/authorization.ts +1 -0
  184. package/src/api/contract.ts +26 -10
  185. package/src/api/deployment.ts +0 -1
  186. package/src/api/events.ts +35 -27
  187. package/src/api/fields.ts +3 -1
  188. package/src/api/keys.ts +2 -2
  189. package/src/api/node.ts +7 -3
  190. package/src/api/note.ts +1 -1
  191. package/src/api/protocol.ts +7 -0
  192. package/src/api/tx.ts +4 -0
  193. package/src/api/wallet.ts +52 -9
  194. package/src/authorization/call_authorization_request.ts +1 -1
  195. package/src/contract/base_contract_interaction.ts +27 -16
  196. package/src/contract/batch_call.ts +62 -48
  197. package/src/contract/contract.ts +7 -5
  198. package/src/contract/contract_base.ts +5 -15
  199. package/src/contract/contract_function_interaction.ts +26 -17
  200. package/src/contract/deploy_method.ts +175 -47
  201. package/src/contract/get_gas_limits.ts +3 -3
  202. package/src/contract/interaction_options.ts +59 -13
  203. package/src/contract/protocol_contracts/auth-registry.ts +551 -0
  204. package/src/contract/protocol_contracts/contract-class-registry.ts +99 -0
  205. package/src/contract/protocol_contracts/contract-instance-registry.ts +302 -0
  206. package/src/contract/protocol_contracts/fee-juice.ts +264 -0
  207. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +334 -0
  208. package/src/contract/protocol_contracts/public-checks.ts +318 -0
  209. package/src/contract/wait_for_proven.ts +1 -1
  210. package/src/contract/wait_opts.ts +21 -0
  211. package/src/deployment/contract_deployer.ts +3 -2
  212. package/src/deployment/publish_class.ts +3 -3
  213. package/src/deployment/publish_instance.ts +3 -6
  214. package/src/ethereum/portal_manager.ts +65 -34
  215. package/src/fee/fee_juice_payment_method_with_claim.ts +9 -7
  216. package/src/fee/fee_payment_method.ts +1 -1
  217. package/src/fee/private_fee_payment_method.ts +12 -10
  218. package/src/fee/public_fee_payment_method.ts +13 -11
  219. package/src/fee/sponsored_fee_payment.ts +6 -4
  220. package/src/scripts/generate_protocol_contract_types.ts +150 -0
  221. package/src/utils/abi_types.ts +1 -1
  222. package/src/utils/authwit.ts +40 -22
  223. package/src/utils/cross_chain.ts +1 -1
  224. package/src/utils/fee_juice.ts +2 -2
  225. package/src/utils/field_compressed_string.ts +1 -1
  226. package/src/utils/node.ts +62 -0
  227. package/src/utils/pub_key.ts +2 -2
  228. package/src/wallet/account_entrypoint_meta_payment_method.ts +29 -60
  229. package/src/wallet/account_manager.ts +7 -15
  230. package/src/wallet/capabilities.ts +500 -0
  231. package/src/wallet/deploy_account_method.ts +78 -16
  232. package/src/wallet/index.ts +1 -1
  233. package/src/wallet/wallet.ts +387 -166
  234. package/dest/account/interface.d.ts +0 -19
  235. package/dest/account/interface.d.ts.map +0 -1
  236. package/dest/account/interface.js +0 -5
  237. package/dest/contract/deploy_sent_tx.d.ts +0 -43
  238. package/dest/contract/deploy_sent_tx.d.ts.map +0 -1
  239. package/dest/contract/deploy_sent_tx.js +0 -40
  240. package/dest/contract/protocol_contracts.d.ts +0 -9
  241. package/dest/contract/protocol_contracts.d.ts.map +0 -1
  242. package/dest/contract/protocol_contracts.js +0 -26
  243. package/dest/contract/sent_tx.d.ts +0 -51
  244. package/dest/contract/sent_tx.d.ts.map +0 -1
  245. package/dest/contract/sent_tx.js +0 -90
  246. package/dest/contract/unsafe_contract.d.ts +0 -15
  247. package/dest/contract/unsafe_contract.d.ts.map +0 -1
  248. package/dest/contract/unsafe_contract.js +0 -6
  249. package/dest/deployment/broadcast_function.d.ts +0 -24
  250. package/dest/deployment/broadcast_function.d.ts.map +0 -1
  251. package/dest/deployment/broadcast_function.js +0 -74
  252. package/dest/wallet/base_wallet.d.ts +0 -91
  253. package/dest/wallet/base_wallet.d.ts.map +0 -1
  254. package/dest/wallet/base_wallet.js +0 -238
  255. package/src/account/interface.ts +0 -25
  256. package/src/contract/deploy_sent_tx.ts +0 -68
  257. package/src/contract/protocol_contracts.ts +0 -35
  258. package/src/contract/sent_tx.ts +0 -130
  259. package/src/contract/unsafe_contract.ts +0 -19
  260. package/src/deployment/broadcast_function.ts +0 -148
  261. package/src/wallet/base_wallet.ts +0 -350
@@ -0,0 +1,334 @@
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: 15, 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
+ '5417577161503694006': { error_kind: 'fmtstring', length: 56, item_types: [{ kind: 'field' }] },
164
+ '9530675838293881722': { error_kind: 'string', string: 'Writer did not write all data' },
165
+ '9791669845391776238': {
166
+ error_kind: 'string',
167
+ string: '0 has a square root; you cannot claim it is not square',
168
+ },
169
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
170
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
171
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
172
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
173
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
174
+ '13557316507370296400': {
175
+ error_kind: 'fmtstring',
176
+ length: 130,
177
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
178
+ },
179
+ '14938672389828944159': {
180
+ error_kind: 'fmtstring',
181
+ length: 146,
182
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
183
+ },
184
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
185
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
186
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
187
+ '17531474008201752295': {
188
+ error_kind: 'fmtstring',
189
+ length: 133,
190
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
191
+ },
192
+ },
193
+ },
194
+ bytecode: Buffer.from([]),
195
+ debugSymbols: '',
196
+ },
197
+ {
198
+ ...{
199
+ functionType: FunctionType.UTILITY,
200
+ name: 'sync_state',
201
+ isOnlySelf: false,
202
+ isStatic: false,
203
+ isInitializer: false,
204
+ parameters: [],
205
+ returnTypes: [],
206
+ errorTypes: {
207
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
208
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
209
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
210
+ '2967937905572420042': {
211
+ error_kind: 'fmtstring',
212
+ length: 61,
213
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
214
+ },
215
+ '3330370348214585450': {
216
+ error_kind: 'fmtstring',
217
+ length: 48,
218
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
219
+ },
220
+ '3670003311596808700': {
221
+ error_kind: 'fmtstring',
222
+ length: 77,
223
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
224
+ },
225
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
226
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
227
+ '5417577161503694006': { error_kind: 'fmtstring', length: 56, item_types: [{ kind: 'field' }] },
228
+ '9530675838293881722': { error_kind: 'string', string: 'Writer did not write all data' },
229
+ '9791669845391776238': {
230
+ error_kind: 'string',
231
+ string: '0 has a square root; you cannot claim it is not square',
232
+ },
233
+ '9885968605480832328': {
234
+ error_kind: 'string',
235
+ string: 'Attempted to read past the length of a CapsuleArray',
236
+ },
237
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
238
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
239
+ '11021520179822076911': {
240
+ error_kind: 'string',
241
+ string: 'Attempted to delete past the length of a CapsuleArray',
242
+ },
243
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
244
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
245
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
246
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
247
+ '13557316507370296400': {
248
+ error_kind: 'fmtstring',
249
+ length: 130,
250
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
251
+ },
252
+ '14938672389828944159': {
253
+ error_kind: 'fmtstring',
254
+ length: 146,
255
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
256
+ },
257
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
258
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
259
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
260
+ '17531474008201752295': {
261
+ error_kind: 'fmtstring',
262
+ length: 133,
263
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
264
+ },
265
+ '17655676068928457687': { error_kind: 'string', string: 'Reader did not read all data' },
266
+ },
267
+ },
268
+ bytecode: Buffer.from([]),
269
+ debugSymbols: '',
270
+ },
271
+ {
272
+ ...{
273
+ functionType: FunctionType.PUBLIC,
274
+ name: 'public_dispatch',
275
+ isOnlySelf: false,
276
+ isStatic: false,
277
+ isInitializer: false,
278
+ parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
279
+ returnTypes: [],
280
+ errorTypes: { '1335198680857977525': { error_kind: 'string', string: 'No public functions' } },
281
+ },
282
+ bytecode: Buffer.from([]),
283
+ debugSymbols: '',
284
+ },
285
+ ],
286
+ nonDispatchPublicFunctions: [],
287
+ outputs: { structs: {}, globals: {} },
288
+ storageLayout: {},
289
+ fileMap: {},
290
+ };
291
+
292
+ export class MultiCallEntrypointContract extends ContractBase {
293
+ private constructor(wallet: Wallet) {
294
+ super(ProtocolContractAddress.MultiCallEntrypoint, MultiCallEntrypointContractArtifact, wallet);
295
+ }
296
+
297
+ public static at(wallet: Wallet): MultiCallEntrypointContract {
298
+ return new MultiCallEntrypointContract(wallet);
299
+ }
300
+
301
+ declare public methods: {
302
+ /** entrypoint(app_payload: struct) */
303
+ entrypoint: ((app_payload: {
304
+ function_calls: {
305
+ args_hash: FieldLike;
306
+ function_selector: FunctionSelectorLike;
307
+ target_address: AztecAddressLike;
308
+ is_public: boolean;
309
+ hide_msg_sender: boolean;
310
+ is_static: boolean;
311
+ }[];
312
+ tx_nonce: FieldLike;
313
+ }) => ContractFunctionInteraction) &
314
+ Pick<ContractMethod, 'selector'>;
315
+
316
+ /** process_message(message_ciphertext: struct, message_context: struct) */
317
+ process_message: ((
318
+ message_ciphertext: FieldLike[],
319
+ message_context: {
320
+ tx_hash: FieldLike;
321
+ unique_note_hashes_in_tx: FieldLike[];
322
+ first_nullifier_in_tx: FieldLike;
323
+ recipient: AztecAddressLike;
324
+ },
325
+ ) => ContractFunctionInteraction) &
326
+ Pick<ContractMethod, 'selector'>;
327
+
328
+ /** public_dispatch(selector: field) */
329
+ public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
330
+
331
+ /** sync_state() */
332
+ sync_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
333
+ };
334
+ }
@@ -0,0 +1,318 @@
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: 15, 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
+ '5417577161503694006': { error_kind: 'fmtstring', length: 56, item_types: [{ kind: 'field' }] },
97
+ '9530675838293881722': { error_kind: 'string', string: 'Writer did not write all data' },
98
+ '9791669845391776238': {
99
+ error_kind: 'string',
100
+ string: '0 has a square root; you cannot claim it is not square',
101
+ },
102
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
103
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
104
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
105
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
106
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
107
+ '13557316507370296400': {
108
+ error_kind: 'fmtstring',
109
+ length: 130,
110
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
111
+ },
112
+ '14938672389828944159': {
113
+ error_kind: 'fmtstring',
114
+ length: 146,
115
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
116
+ },
117
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
118
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
119
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
120
+ '17531474008201752295': {
121
+ error_kind: 'fmtstring',
122
+ length: 133,
123
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
124
+ },
125
+ },
126
+ },
127
+ bytecode: Buffer.from([]),
128
+ debugSymbols: '',
129
+ },
130
+ {
131
+ ...{
132
+ functionType: FunctionType.PUBLIC,
133
+ name: 'public_dispatch',
134
+ isOnlySelf: false,
135
+ isStatic: false,
136
+ isInitializer: false,
137
+ parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
138
+ returnTypes: [],
139
+ errorTypes: {
140
+ '3445904810750103705': { error_kind: 'string', string: 'Block number mismatch.' },
141
+ '6989792215391248978': {
142
+ error_kind: 'string',
143
+ string: 'Function check_timestamp can only be called statically',
144
+ },
145
+ '7259463707251703666': {
146
+ error_kind: 'string',
147
+ string: 'Function check_block_number can only be called statically',
148
+ },
149
+ '12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
150
+ '13950240626967988787': { error_kind: 'string', string: 'Timestamp mismatch.' },
151
+ '15015303112667403944': { error_kind: 'fmtstring', length: 17, item_types: [] },
152
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
153
+ },
154
+ },
155
+ bytecode: Buffer.from([]),
156
+ debugSymbols: '',
157
+ },
158
+ {
159
+ ...{
160
+ functionType: FunctionType.UTILITY,
161
+ name: 'sync_state',
162
+ isOnlySelf: false,
163
+ isStatic: false,
164
+ isInitializer: false,
165
+ parameters: [],
166
+ returnTypes: [],
167
+ errorTypes: {
168
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
169
+ '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
170
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
171
+ '2967937905572420042': {
172
+ error_kind: 'fmtstring',
173
+ length: 61,
174
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
175
+ },
176
+ '3330370348214585450': {
177
+ error_kind: 'fmtstring',
178
+ length: 48,
179
+ item_types: [{ kind: 'field' }, { kind: 'field' }],
180
+ },
181
+ '3670003311596808700': {
182
+ error_kind: 'fmtstring',
183
+ length: 77,
184
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
185
+ },
186
+ '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
187
+ '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
188
+ '5417577161503694006': { error_kind: 'fmtstring', length: 56, item_types: [{ kind: 'field' }] },
189
+ '9530675838293881722': { error_kind: 'string', string: 'Writer did not write all data' },
190
+ '9791669845391776238': {
191
+ error_kind: 'string',
192
+ string: '0 has a square root; you cannot claim it is not square',
193
+ },
194
+ '9885968605480832328': {
195
+ error_kind: 'string',
196
+ string: 'Attempted to read past the length of a CapsuleArray',
197
+ },
198
+ '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
199
+ '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
200
+ '11021520179822076911': {
201
+ error_kind: 'string',
202
+ string: 'Attempted to delete past the length of a CapsuleArray',
203
+ },
204
+ '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
205
+ '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
206
+ '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
207
+ '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
208
+ '13557316507370296400': {
209
+ error_kind: 'fmtstring',
210
+ length: 130,
211
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
212
+ },
213
+ '14938672389828944159': {
214
+ error_kind: 'fmtstring',
215
+ length: 146,
216
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
217
+ },
218
+ '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
219
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
220
+ '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
221
+ '17531474008201752295': {
222
+ error_kind: 'fmtstring',
223
+ length: 133,
224
+ item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
225
+ },
226
+ '17655676068928457687': { error_kind: 'string', string: 'Reader did not read all data' },
227
+ },
228
+ },
229
+ bytecode: Buffer.from([]),
230
+ debugSymbols: '',
231
+ },
232
+ ],
233
+ nonDispatchPublicFunctions: [
234
+ {
235
+ functionType: FunctionType.PUBLIC,
236
+ name: 'check_block_number',
237
+ isOnlySelf: false,
238
+ isStatic: true,
239
+ isInitializer: false,
240
+ parameters: [
241
+ { name: 'operation', type: { kind: 'integer', sign: 'unsigned', width: 8 }, visibility: 'private' },
242
+ { name: 'value', type: { kind: 'integer', sign: 'unsigned', width: 32 }, visibility: 'private' },
243
+ ],
244
+ returnTypes: [],
245
+ errorTypes: {
246
+ '3445904810750103705': { error_kind: 'string', string: 'Block number mismatch.' },
247
+ '7259463707251703666': {
248
+ error_kind: 'string',
249
+ string: 'Function check_block_number can only be called statically',
250
+ },
251
+ '15015303112667403944': { error_kind: 'fmtstring', length: 17, item_types: [] },
252
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
253
+ },
254
+ },
255
+ {
256
+ functionType: FunctionType.PUBLIC,
257
+ name: 'check_timestamp',
258
+ isOnlySelf: false,
259
+ isStatic: true,
260
+ isInitializer: false,
261
+ parameters: [
262
+ { name: 'operation', type: { kind: 'integer', sign: 'unsigned', width: 8 }, visibility: 'private' },
263
+ { name: 'value', type: { kind: 'integer', sign: 'unsigned', width: 64 }, visibility: 'private' },
264
+ ],
265
+ returnTypes: [],
266
+ errorTypes: {
267
+ '6989792215391248978': {
268
+ error_kind: 'string',
269
+ string: 'Function check_timestamp can only be called statically',
270
+ },
271
+ '13950240626967988787': { error_kind: 'string', string: 'Timestamp mismatch.' },
272
+ '15015303112667403944': { error_kind: 'fmtstring', length: 17, item_types: [] },
273
+ '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
274
+ },
275
+ },
276
+ ],
277
+ outputs: { structs: {}, globals: {} },
278
+ storageLayout: {},
279
+ fileMap: {},
280
+ };
281
+
282
+ export class PublicChecksContract extends ContractBase {
283
+ private constructor(wallet: Wallet) {
284
+ super(ProtocolContractAddress.PublicChecks, PublicChecksContractArtifact, wallet);
285
+ }
286
+
287
+ public static at(wallet: Wallet): PublicChecksContract {
288
+ return new PublicChecksContract(wallet);
289
+ }
290
+
291
+ declare public methods: {
292
+ /** check_block_number(operation: integer, value: integer) */
293
+ check_block_number: ((operation: bigint | number, value: bigint | number) => ContractFunctionInteraction) &
294
+ Pick<ContractMethod, 'selector'>;
295
+
296
+ /** check_timestamp(operation: integer, value: integer) */
297
+ check_timestamp: ((operation: bigint | number, value: bigint | number) => ContractFunctionInteraction) &
298
+ Pick<ContractMethod, 'selector'>;
299
+
300
+ /** process_message(message_ciphertext: struct, message_context: struct) */
301
+ process_message: ((
302
+ message_ciphertext: FieldLike[],
303
+ message_context: {
304
+ tx_hash: FieldLike;
305
+ unique_note_hashes_in_tx: FieldLike[];
306
+ first_nullifier_in_tx: FieldLike;
307
+ recipient: AztecAddressLike;
308
+ },
309
+ ) => ContractFunctionInteraction) &
310
+ Pick<ContractMethod, 'selector'>;
311
+
312
+ /** public_dispatch(selector: field) */
313
+ public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
314
+
315
+ /** sync_state() */
316
+ sync_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
317
+ };
318
+ }
@@ -2,7 +2,7 @@ import { retryUntil } from '@aztec/foundation/retry';
2
2
  import type { AztecNode } from '@aztec/stdlib/interfaces/client';
3
3
  import type { TxReceipt } from '@aztec/stdlib/tx';
4
4
 
5
- import { DefaultWaitOpts } from './sent_tx.js';
5
+ import { DefaultWaitOpts } from './wait_opts.js';
6
6
 
7
7
  /**
8
8
  * Options for waiting for a transaction to be proven.
@@ -0,0 +1,21 @@
1
+ import type { TxStatus } from '@aztec/stdlib/tx';
2
+
3
+ /** Options related to waiting for a tx. */
4
+ export type WaitOpts = {
5
+ /** 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. */
6
+ ignoreDroppedReceiptsFor?: number;
7
+ /** The maximum time (in seconds) to wait for the transaction to be mined. Defaults to 60. */
8
+ timeout?: number;
9
+ /** The time interval (in seconds) between retries to fetch the transaction receipt. Defaults to 1. */
10
+ interval?: number;
11
+ /** Whether to accept a revert as a status code for the tx when waiting for it. If false, will throw if the tx reverts. */
12
+ dontThrowOnRevert?: boolean;
13
+ /** The minimum inclusion status to wait for. If set, waits until the receipt reaches this status or higher. Defaults to CHECKPOINTED. */
14
+ waitForStatus?: TxStatus;
15
+ };
16
+
17
+ export const DefaultWaitOpts: WaitOpts = {
18
+ ignoreDroppedReceiptsFor: 5,
19
+ timeout: 300,
20
+ interval: 1,
21
+ };