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

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