@aztec/aztec.js 0.0.1-commit.fce3e4f → 0.0.1-commit.ff7989d6c

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