@aztec/aztec.js 3.0.0-canary.a9708bd → 3.0.0-devnet.2-patch.1

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 (326) hide show
  1. package/README.md +1 -1
  2. package/dest/account/account.d.ts +59 -0
  3. package/dest/account/account.d.ts.map +1 -0
  4. package/dest/account/account.js +59 -0
  5. package/dest/account/account_contract.d.ts +7 -7
  6. package/dest/account/account_contract.d.ts.map +1 -1
  7. package/dest/account/account_contract.js +0 -1
  8. package/dest/account/account_with_secret_key.d.ts +24 -0
  9. package/dest/account/account_with_secret_key.d.ts.map +1 -0
  10. package/dest/{wallet/account_wallet_with_private_key.js → account/account_with_secret_key.js} +5 -5
  11. package/dest/account/index.d.ts +3 -6
  12. package/dest/account/index.d.ts.map +1 -1
  13. package/dest/account/index.js +1 -4
  14. package/dest/account/interface.d.ts +2 -2
  15. package/dest/account/interface.d.ts.map +1 -1
  16. package/dest/account/signerless_account.d.ts +23 -0
  17. package/dest/account/signerless_account.d.ts.map +1 -0
  18. package/dest/account/signerless_account.js +27 -0
  19. package/dest/api/abi.d.ts +2 -1
  20. package/dest/api/abi.d.ts.map +1 -1
  21. package/dest/api/account.d.ts +6 -3
  22. package/dest/api/account.d.ts.map +1 -1
  23. package/dest/api/account.js +4 -1
  24. package/dest/api/addresses.d.ts +2 -1
  25. package/dest/api/addresses.d.ts.map +1 -1
  26. package/dest/api/addresses.js +1 -0
  27. package/dest/api/authorization.d.ts +3 -1
  28. package/dest/api/authorization.d.ts.map +1 -1
  29. package/dest/api/authorization.js +2 -0
  30. package/dest/api/block.d.ts +3 -0
  31. package/dest/api/block.d.ts.map +1 -0
  32. package/dest/api/block.js +2 -0
  33. package/dest/api/contract.d.ts +8 -9
  34. package/dest/api/contract.d.ts.map +1 -1
  35. package/dest/api/contract.js +6 -6
  36. package/dest/api/crypto.d.ts +2 -0
  37. package/dest/api/crypto.d.ts.map +1 -0
  38. package/dest/api/crypto.js +1 -0
  39. package/dest/api/deployment.d.ts +1 -1
  40. package/dest/api/eth_address.d.ts +1 -1
  41. package/dest/api/ethereum.d.ts +1 -2
  42. package/dest/api/ethereum.d.ts.map +1 -1
  43. package/dest/api/ethereum.js +0 -1
  44. package/dest/api/events.d.ts +12 -0
  45. package/dest/api/events.d.ts.map +1 -0
  46. package/dest/api/events.js +30 -0
  47. package/dest/api/fee.d.ts +2 -3
  48. package/dest/api/fee.d.ts.map +1 -1
  49. package/dest/api/fee.js +0 -1
  50. package/dest/api/fee_testing.d.ts +1 -1
  51. package/dest/api/fields.d.ts +3 -2
  52. package/dest/api/fields.d.ts.map +1 -1
  53. package/dest/api/fields.js +2 -1
  54. package/dest/api/keys.d.ts +4 -0
  55. package/dest/api/keys.d.ts.map +1 -0
  56. package/dest/api/keys.js +3 -0
  57. package/dest/api/log.d.ts +2 -1
  58. package/dest/api/log.d.ts.map +1 -1
  59. package/dest/api/log.js +1 -0
  60. package/dest/api/messaging.d.ts +3 -0
  61. package/dest/api/messaging.d.ts.map +1 -0
  62. package/dest/api/messaging.js +2 -0
  63. package/dest/api/node.d.ts +21 -0
  64. package/dest/api/node.d.ts.map +1 -0
  65. package/dest/api/node.js +18 -0
  66. package/dest/api/note.d.ts +2 -0
  67. package/dest/api/note.d.ts.map +1 -0
  68. package/dest/api/note.js +1 -0
  69. package/dest/api/protocol.d.ts +3 -0
  70. package/dest/api/protocol.d.ts.map +1 -0
  71. package/dest/api/protocol.js +2 -0
  72. package/dest/api/trees.d.ts +3 -0
  73. package/dest/api/trees.d.ts.map +1 -0
  74. package/dest/api/trees.js +2 -0
  75. package/dest/api/tx.d.ts +2 -0
  76. package/dest/api/tx.d.ts.map +1 -0
  77. package/dest/api/tx.js +1 -0
  78. package/dest/api/utils.d.ts +11 -7
  79. package/dest/api/utils.d.ts.map +1 -1
  80. package/dest/api/utils.js +10 -5
  81. package/dest/api/wallet.d.ts +4 -2
  82. package/dest/api/wallet.d.ts.map +1 -1
  83. package/dest/api/wallet.js +3 -1
  84. package/dest/authorization/call_authorization_request.d.ts +2 -23
  85. package/dest/authorization/call_authorization_request.d.ts.map +1 -1
  86. package/dest/contract/base_contract_interaction.d.ts +7 -50
  87. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  88. package/dest/contract/base_contract_interaction.js +6 -106
  89. package/dest/contract/batch_call.d.ts +14 -23
  90. package/dest/contract/batch_call.d.ts.map +1 -1
  91. package/dest/contract/batch_call.js +72 -64
  92. package/dest/contract/checker.d.ts +1 -1
  93. package/dest/contract/contract.d.ts +3 -3
  94. package/dest/contract/contract.d.ts.map +1 -1
  95. package/dest/contract/contract.js +5 -16
  96. package/dest/contract/contract_base.d.ts +5 -12
  97. package/dest/contract/contract_base.d.ts.map +1 -1
  98. package/dest/contract/contract_base.js +5 -12
  99. package/dest/contract/contract_function_interaction.d.ts +32 -43
  100. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  101. package/dest/contract/contract_function_interaction.js +47 -56
  102. package/dest/contract/deploy_method.d.ts +69 -61
  103. package/dest/contract/deploy_method.d.ts.map +1 -1
  104. package/dest/contract/deploy_method.js +72 -88
  105. package/dest/contract/deploy_sent_tx.d.ts +12 -8
  106. package/dest/contract/deploy_sent_tx.d.ts.map +1 -1
  107. package/dest/contract/deploy_sent_tx.js +15 -12
  108. package/dest/contract/get_gas_limits.d.ts +1 -1
  109. package/dest/contract/interaction_options.d.ts +76 -21
  110. package/dest/contract/interaction_options.d.ts.map +1 -1
  111. package/dest/contract/interaction_options.js +45 -3
  112. package/dest/contract/protocol_contracts.d.ts +1 -1
  113. package/dest/contract/sent_tx.d.ts +5 -6
  114. package/dest/contract/sent_tx.d.ts.map +1 -1
  115. package/dest/contract/sent_tx.js +6 -6
  116. package/dest/contract/unsafe_contract.d.ts +1 -1
  117. package/dest/contract/unsafe_contract.d.ts.map +1 -1
  118. package/dest/contract/unsafe_contract.js +1 -1
  119. package/dest/contract/wait_for_proven.d.ts +4 -4
  120. package/dest/contract/wait_for_proven.d.ts.map +1 -1
  121. package/dest/contract/wait_for_proven.js +2 -2
  122. package/dest/deployment/broadcast_function.d.ts +1 -1
  123. package/dest/deployment/broadcast_function.js +1 -1
  124. package/dest/deployment/contract_deployer.d.ts +1 -1
  125. package/dest/deployment/contract_deployer.d.ts.map +1 -1
  126. package/dest/deployment/contract_deployer.js +1 -1
  127. package/dest/deployment/publish_class.d.ts +1 -1
  128. package/dest/deployment/publish_class.js +1 -1
  129. package/dest/deployment/publish_instance.d.ts +2 -2
  130. package/dest/deployment/publish_instance.d.ts.map +1 -1
  131. package/dest/deployment/publish_instance.js +2 -5
  132. package/dest/ethereum/portal_manager.d.ts +7 -10
  133. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  134. package/dest/ethereum/portal_manager.js +43 -19
  135. package/dest/fee/fee_juice_payment_method_with_claim.d.ts +14 -9
  136. package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
  137. package/dest/fee/fee_juice_payment_method_with_claim.js +24 -15
  138. package/dest/fee/fee_payment_method.d.ts +26 -0
  139. package/dest/fee/fee_payment_method.d.ts.map +1 -0
  140. package/dest/fee/fee_payment_method.js +3 -0
  141. package/dest/fee/private_fee_payment_method.d.ts +24 -7
  142. package/dest/fee/private_fee_payment_method.d.ts.map +1 -1
  143. package/dest/fee/private_fee_payment_method.js +38 -17
  144. package/dest/fee/public_fee_payment_method.d.ts +24 -7
  145. package/dest/fee/public_fee_payment_method.d.ts.map +1 -1
  146. package/dest/fee/public_fee_payment_method.js +41 -18
  147. package/dest/fee/sponsored_fee_payment.d.ts +4 -2
  148. package/dest/fee/sponsored_fee_payment.d.ts.map +1 -1
  149. package/dest/fee/sponsored_fee_payment.js +6 -2
  150. package/dest/utils/abi_types.d.ts +2 -2
  151. package/dest/utils/abi_types.d.ts.map +1 -1
  152. package/dest/utils/authwit.d.ts +80 -28
  153. package/dest/utils/authwit.d.ts.map +1 -1
  154. package/dest/utils/authwit.js +231 -25
  155. package/dest/utils/cross_chain.d.ts +24 -0
  156. package/dest/utils/cross_chain.d.ts.map +1 -0
  157. package/dest/utils/cross_chain.js +30 -0
  158. package/dest/utils/fee_juice.d.ts +4 -3
  159. package/dest/utils/fee_juice.d.ts.map +1 -1
  160. package/dest/utils/fee_juice.js +4 -3
  161. package/dest/utils/field_compressed_string.d.ts +1 -1
  162. package/dest/utils/field_compressed_string.d.ts.map +1 -1
  163. package/dest/utils/field_compressed_string.js +1 -1
  164. package/dest/utils/node.d.ts +2 -2
  165. package/dest/utils/node.d.ts.map +1 -1
  166. package/dest/utils/pub_key.d.ts +2 -2
  167. package/dest/utils/pub_key.d.ts.map +1 -1
  168. package/dest/utils/pub_key.js +2 -3
  169. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +34 -0
  170. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -0
  171. package/dest/wallet/account_entrypoint_meta_payment_method.js +76 -0
  172. package/dest/wallet/account_manager.d.ts +66 -0
  173. package/dest/wallet/account_manager.d.ts.map +1 -0
  174. package/dest/wallet/account_manager.js +113 -0
  175. package/dest/wallet/deploy_account_method.d.ts +52 -0
  176. package/dest/wallet/deploy_account_method.d.ts.map +1 -0
  177. package/dest/wallet/deploy_account_method.js +77 -0
  178. package/dest/wallet/index.d.ts +2 -16
  179. package/dest/wallet/index.d.ts.map +1 -1
  180. package/dest/wallet/index.js +1 -19
  181. package/dest/wallet/wallet.d.ts +2012 -7
  182. package/dest/wallet/wallet.d.ts.map +1 -1
  183. package/dest/wallet/wallet.js +198 -3
  184. package/package.json +29 -24
  185. package/src/account/account.ts +96 -0
  186. package/src/account/account_contract.ts +5 -7
  187. package/src/{wallet/account_wallet_with_private_key.ts → account/account_with_secret_key.ts} +7 -9
  188. package/src/account/index.ts +2 -5
  189. package/src/account/interface.ts +1 -1
  190. package/src/account/signerless_account.ts +45 -0
  191. package/src/api/abi.ts +11 -0
  192. package/src/api/account.ts +5 -2
  193. package/src/api/addresses.ts +1 -0
  194. package/src/api/authorization.ts +11 -0
  195. package/src/api/block.ts +2 -0
  196. package/src/api/contract.ts +20 -11
  197. package/src/api/crypto.ts +1 -0
  198. package/src/api/ethereum.ts +0 -1
  199. package/src/api/events.ts +44 -0
  200. package/src/api/fee.ts +1 -2
  201. package/src/api/fields.ts +2 -1
  202. package/src/api/keys.ts +8 -0
  203. package/src/api/log.ts +1 -0
  204. package/src/api/messaging.ts +2 -0
  205. package/src/api/node.ts +20 -0
  206. package/src/api/note.ts +1 -0
  207. package/src/api/protocol.ts +2 -0
  208. package/src/api/trees.ts +2 -0
  209. package/src/api/tx.ts +13 -0
  210. package/src/api/utils.ts +12 -19
  211. package/src/api/wallet.ts +31 -5
  212. package/src/authorization/call_authorization_request.ts +1 -1
  213. package/src/contract/base_contract_interaction.ts +9 -139
  214. package/src/contract/batch_call.ts +87 -79
  215. package/src/contract/contract.ts +8 -16
  216. package/src/contract/contract_base.ts +5 -15
  217. package/src/contract/contract_function_interaction.ts +72 -105
  218. package/src/contract/deploy_method.ts +123 -104
  219. package/src/contract/deploy_sent_tx.ts +19 -18
  220. package/src/contract/interaction_options.ts +121 -25
  221. package/src/contract/sent_tx.ts +6 -7
  222. package/src/contract/unsafe_contract.ts +1 -1
  223. package/src/contract/wait_for_proven.ts +4 -4
  224. package/src/deployment/broadcast_function.ts +1 -1
  225. package/src/deployment/contract_deployer.ts +3 -2
  226. package/src/deployment/publish_class.ts +1 -1
  227. package/src/deployment/publish_instance.ts +3 -8
  228. package/src/ethereum/portal_manager.ts +62 -40
  229. package/src/fee/fee_juice_payment_method_with_claim.ts +30 -19
  230. package/src/fee/fee_payment_method.ts +26 -0
  231. package/src/fee/private_fee_payment_method.ts +64 -43
  232. package/src/fee/public_fee_payment_method.ts +77 -51
  233. package/src/fee/sponsored_fee_payment.ts +9 -1
  234. package/src/utils/abi_types.ts +1 -1
  235. package/src/utils/authwit.ts +257 -39
  236. package/src/utils/cross_chain.ts +53 -0
  237. package/src/utils/fee_juice.ts +5 -4
  238. package/src/utils/field_compressed_string.ts +1 -1
  239. package/src/utils/pub_key.ts +3 -4
  240. package/src/wallet/account_entrypoint_meta_payment_method.ts +106 -0
  241. package/src/wallet/account_manager.ts +154 -0
  242. package/src/wallet/deploy_account_method.ts +126 -0
  243. package/src/wallet/index.ts +1 -32
  244. package/src/wallet/wallet.ts +358 -29
  245. package/dest/account_manager/account_manager.d.ts +0 -119
  246. package/dest/account_manager/account_manager.d.ts.map +0 -1
  247. package/dest/account_manager/account_manager.js +0 -202
  248. package/dest/account_manager/deploy_account_sent_tx.d.ts +0 -30
  249. package/dest/account_manager/deploy_account_sent_tx.d.ts.map +0 -1
  250. package/dest/account_manager/deploy_account_sent_tx.js +0 -29
  251. package/dest/account_manager/index.d.ts +0 -3
  252. package/dest/account_manager/index.d.ts.map +0 -1
  253. package/dest/account_manager/index.js +0 -2
  254. package/dest/api/interfaces.d.ts +0 -2
  255. package/dest/api/interfaces.d.ts.map +0 -1
  256. package/dest/api/interfaces.js +0 -1
  257. package/dest/api/log_id.d.ts +0 -2
  258. package/dest/api/log_id.d.ts.map +0 -1
  259. package/dest/api/log_id.js +0 -1
  260. package/dest/api/rpc.d.ts +0 -3
  261. package/dest/api/rpc.d.ts.map +0 -1
  262. package/dest/api/rpc.js +0 -2
  263. package/dest/api/tx_hash.d.ts +0 -2
  264. package/dest/api/tx_hash.d.ts.map +0 -1
  265. package/dest/api/tx_hash.js +0 -1
  266. package/dest/contract/deploy_proven_tx.d.ts +0 -21
  267. package/dest/contract/deploy_proven_tx.d.ts.map +0 -1
  268. package/dest/contract/deploy_proven_tx.js +0 -21
  269. package/dest/contract/proven_tx.d.ts +0 -21
  270. package/dest/contract/proven_tx.d.ts.map +0 -1
  271. package/dest/contract/proven_tx.js +0 -23
  272. package/dest/ethereum/l1_contracts.d.ts +0 -3
  273. package/dest/ethereum/l1_contracts.d.ts.map +0 -1
  274. package/dest/ethereum/l1_contracts.js +0 -13
  275. package/dest/fee/account_entrypoint_meta_payment_method.d.ts +0 -31
  276. package/dest/fee/account_entrypoint_meta_payment_method.d.ts.map +0 -1
  277. package/dest/fee/account_entrypoint_meta_payment_method.js +0 -64
  278. package/dest/fee/fee_juice_payment_method.d.ts +0 -14
  279. package/dest/fee/fee_juice_payment_method.d.ts.map +0 -1
  280. package/dest/fee/fee_juice_payment_method.js +0 -21
  281. package/dest/fee/utils.d.ts +0 -13
  282. package/dest/fee/utils.d.ts.map +0 -1
  283. package/dest/fee/utils.js +0 -32
  284. package/dest/index.d.ts +0 -59
  285. package/dest/index.d.ts.map +0 -1
  286. package/dest/index.js +0 -62
  287. package/dest/rpc_clients/node/index.d.ts +0 -12
  288. package/dest/rpc_clients/node/index.d.ts.map +0 -1
  289. package/dest/rpc_clients/node/index.js +0 -72
  290. package/dest/rpc_clients/pxe_client.d.ts +0 -10
  291. package/dest/rpc_clients/pxe_client.d.ts.map +0 -1
  292. package/dest/rpc_clients/pxe_client.js +0 -23
  293. package/dest/utils/pxe.d.ts +0 -4
  294. package/dest/utils/pxe.d.ts.map +0 -1
  295. package/dest/utils/pxe.js +0 -14
  296. package/dest/wallet/account_wallet.d.ts +0 -74
  297. package/dest/wallet/account_wallet.d.ts.map +0 -1
  298. package/dest/wallet/account_wallet.js +0 -232
  299. package/dest/wallet/account_wallet_with_private_key.d.ts +0 -26
  300. package/dest/wallet/account_wallet_with_private_key.d.ts.map +0 -1
  301. package/dest/wallet/base_wallet.d.ts +0 -48
  302. package/dest/wallet/base_wallet.d.ts.map +0 -1
  303. package/dest/wallet/base_wallet.js +0 -70
  304. package/dest/wallet/signerless_wallet.d.ts +0 -23
  305. package/dest/wallet/signerless_wallet.d.ts.map +0 -1
  306. package/dest/wallet/signerless_wallet.js +0 -33
  307. package/src/account_manager/account_manager.ts +0 -276
  308. package/src/account_manager/deploy_account_sent_tx.ts +0 -46
  309. package/src/account_manager/index.ts +0 -2
  310. package/src/api/interfaces.ts +0 -1
  311. package/src/api/log_id.ts +0 -1
  312. package/src/api/rpc.ts +0 -2
  313. package/src/api/tx_hash.ts +0 -1
  314. package/src/contract/deploy_proven_tx.ts +0 -45
  315. package/src/contract/proven_tx.ts +0 -36
  316. package/src/ethereum/l1_contracts.ts +0 -21
  317. package/src/fee/account_entrypoint_meta_payment_method.ts +0 -89
  318. package/src/fee/fee_juice_payment_method.ts +0 -25
  319. package/src/fee/utils.ts +0 -39
  320. package/src/index.ts +0 -85
  321. package/src/rpc_clients/node/index.ts +0 -77
  322. package/src/rpc_clients/pxe_client.ts +0 -25
  323. package/src/utils/pxe.ts +0 -17
  324. package/src/wallet/account_wallet.ts +0 -246
  325. package/src/wallet/base_wallet.ts +0 -141
  326. package/src/wallet/signerless_wallet.ts +0 -56
@@ -1 +1 @@
1
- {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,gBAAgB,GACnC,IAAI,CACF,GAAG,EACD,YAAY,GACZ,iBAAiB,GACjB,WAAW,GACX,QAAQ,GACR,0BAA0B,GAC1B,qBAAqB,GACrB,kBAAkB,GAClB,uBAAuB,GACvB,SAAS,GACT,aAAa,GACb,YAAY,GACZ,oBAAoB,GACpB,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,cAAc,GACd,cAAc,GACd,kBAAkB,GAClB,iBAAiB,CACpB,GAAG;IACF,aAAa,CAAC,MAAM,EAAE,eAAe,GAAG,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CAC7E,CAAC"}
1
+ {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wall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6B;;;;;;;;;;;;EAIxC,CAAC;AAEH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,CAG9D,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;EAMnC,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,MAAM,CAgD7C,CAAC"}
@@ -1,3 +1,198 @@
1
- /**
2
- * The wallet interface.
3
- */ export { };
1
+ import { BlockNumberPositiveSchema } from '@aztec/foundation/branded-types';
2
+ import { AbiTypeSchema, ContractArtifactSchema, FunctionType } from '@aztec/stdlib/abi';
3
+ import { AuthWitness } from '@aztec/stdlib/auth-witness';
4
+ import { ContractClassWithIdSchema, ContractInstanceWithAddressSchema } from '@aztec/stdlib/contract';
5
+ import { Gas } from '@aztec/stdlib/gas';
6
+ import { AbiDecodedSchema, optional, schemas } from '@aztec/stdlib/schemas';
7
+ import { Capsule, HashedValues, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult, inTxSchema } from '@aztec/stdlib/tx';
8
+ import { z } from 'zod';
9
+ export const FunctionCallSchema = z.object({
10
+ name: z.string(),
11
+ to: schemas.AztecAddress,
12
+ selector: schemas.FunctionSelector,
13
+ type: z.nativeEnum(FunctionType),
14
+ isStatic: z.boolean(),
15
+ hideMsgSender: z.boolean(),
16
+ args: z.array(schemas.Fr),
17
+ returnTypes: z.array(AbiTypeSchema)
18
+ });
19
+ export const ExecutionPayloadSchema = z.object({
20
+ calls: z.array(FunctionCallSchema),
21
+ authWitnesses: z.array(AuthWitness.schema),
22
+ capsules: z.array(Capsule.schema),
23
+ extraHashedArgs: z.array(HashedValues.schema),
24
+ feePayer: optional(schemas.AztecAddress)
25
+ });
26
+ export const GasSettingsOptionSchema = z.object({
27
+ gasSettings: optional(z.object({
28
+ gasLimits: optional(Gas.schema),
29
+ teardownGasLimits: optional(Gas.schema),
30
+ maxFeePerGas: optional(z.object({
31
+ feePerDaGas: schemas.BigInt,
32
+ feePerL2Gas: schemas.BigInt
33
+ })),
34
+ maxPriorityFeePerGas: optional(z.object({
35
+ feePerDaGas: schemas.BigInt,
36
+ feePerL2Gas: schemas.BigInt
37
+ }))
38
+ }))
39
+ });
40
+ export const WalletSimulationFeeOptionSchema = GasSettingsOptionSchema.extend({
41
+ estimatedGasPadding: optional(z.number()),
42
+ estimateGas: optional(z.boolean())
43
+ });
44
+ export const SendOptionsSchema = z.object({
45
+ from: schemas.AztecAddress,
46
+ authWitnesses: optional(z.array(AuthWitness.schema)),
47
+ capsules: optional(z.array(Capsule.schema)),
48
+ fee: optional(GasSettingsOptionSchema)
49
+ });
50
+ export const SimulateOptionsSchema = z.object({
51
+ from: schemas.AztecAddress,
52
+ authWitnesses: optional(z.array(AuthWitness.schema)),
53
+ capsules: optional(z.array(Capsule.schema)),
54
+ fee: optional(WalletSimulationFeeOptionSchema),
55
+ skipTxValidation: optional(z.boolean()),
56
+ skipFeeEnforcement: optional(z.boolean()),
57
+ includeMetadata: optional(z.boolean())
58
+ });
59
+ export const ProfileOptionsSchema = SimulateOptionsSchema.extend({
60
+ profileMode: z.enum([
61
+ 'gates',
62
+ 'execution-steps',
63
+ 'full'
64
+ ]),
65
+ skipProofGeneration: optional(z.boolean())
66
+ });
67
+ export const MessageHashOrIntentSchema = z.union([
68
+ schemas.Fr,
69
+ z.object({
70
+ consumer: schemas.AztecAddress,
71
+ innerHash: schemas.Fr
72
+ }),
73
+ z.object({
74
+ caller: schemas.AztecAddress,
75
+ call: FunctionCallSchema
76
+ })
77
+ ]);
78
+ export const BatchedMethodSchema = z.union([
79
+ z.object({
80
+ name: z.literal('registerSender'),
81
+ args: z.tuple([
82
+ schemas.AztecAddress,
83
+ optional(z.string())
84
+ ])
85
+ }),
86
+ z.object({
87
+ name: z.literal('registerContract'),
88
+ args: z.tuple([
89
+ ContractInstanceWithAddressSchema,
90
+ optional(ContractArtifactSchema),
91
+ optional(schemas.Fr)
92
+ ])
93
+ }),
94
+ z.object({
95
+ name: z.literal('sendTx'),
96
+ args: z.tuple([
97
+ ExecutionPayloadSchema,
98
+ SendOptionsSchema
99
+ ])
100
+ }),
101
+ z.object({
102
+ name: z.literal('simulateUtility'),
103
+ args: z.tuple([
104
+ FunctionCallSchema,
105
+ optional(z.array(AuthWitness.schema))
106
+ ])
107
+ }),
108
+ z.object({
109
+ name: z.literal('simulateTx'),
110
+ args: z.tuple([
111
+ ExecutionPayloadSchema,
112
+ SimulateOptionsSchema
113
+ ])
114
+ })
115
+ ]);
116
+ export const ContractMetadataSchema = z.object({
117
+ contractInstance: z.union([
118
+ ContractInstanceWithAddressSchema,
119
+ z.undefined()
120
+ ]),
121
+ isContractInitialized: z.boolean(),
122
+ isContractPublished: z.boolean()
123
+ });
124
+ export const ContractClassMetadataSchema = z.object({
125
+ contractClass: z.union([
126
+ ContractClassWithIdSchema,
127
+ z.undefined()
128
+ ]),
129
+ isContractClassPubliclyRegistered: z.boolean(),
130
+ artifact: z.union([
131
+ ContractArtifactSchema,
132
+ z.undefined()
133
+ ])
134
+ });
135
+ export const EventMetadataDefinitionSchema = z.object({
136
+ eventSelector: schemas.EventSelector,
137
+ abiType: AbiTypeSchema,
138
+ fieldNames: z.array(z.string())
139
+ });
140
+ export const PrivateEventSchema = z.object({
141
+ event: AbiDecodedSchema,
142
+ metadata: inTxSchema()
143
+ });
144
+ export const PrivateEventFilterSchema = z.object({
145
+ contractAddress: schemas.AztecAddress,
146
+ scopes: z.array(schemas.AztecAddress),
147
+ txHash: optional(TxHash.schema),
148
+ fromBlock: optional(BlockNumberPositiveSchema),
149
+ toBlock: optional(BlockNumberPositiveSchema)
150
+ });
151
+ export const WalletSchema = {
152
+ getChainInfo: z.function().args().returns(z.object({
153
+ chainId: schemas.Fr,
154
+ version: schemas.Fr
155
+ })),
156
+ getContractClassMetadata: z.function().args(schemas.Fr, optional(z.boolean())).returns(ContractClassMetadataSchema),
157
+ getContractMetadata: z.function().args(schemas.AztecAddress).returns(ContractMetadataSchema),
158
+ getTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema),
159
+ getPrivateEvents: z.function().args(EventMetadataDefinitionSchema, PrivateEventFilterSchema).returns(z.array(PrivateEventSchema)),
160
+ registerSender: z.function().args(schemas.AztecAddress, optional(z.string())).returns(schemas.AztecAddress),
161
+ getAddressBook: z.function().args().returns(z.array(z.object({
162
+ alias: z.string(),
163
+ item: schemas.AztecAddress
164
+ }))),
165
+ getAccounts: z.function().args().returns(z.array(z.object({
166
+ alias: z.string(),
167
+ item: schemas.AztecAddress
168
+ }))),
169
+ registerContract: z.function().args(ContractInstanceWithAddressSchema, optional(ContractArtifactSchema), optional(schemas.Fr)).returns(ContractInstanceWithAddressSchema),
170
+ simulateTx: z.function().args(ExecutionPayloadSchema, SimulateOptionsSchema).returns(TxSimulationResult.schema),
171
+ simulateUtility: z.function().args(FunctionCallSchema, optional(z.array(AuthWitness.schema))).returns(UtilitySimulationResult.schema),
172
+ profileTx: z.function().args(ExecutionPayloadSchema, ProfileOptionsSchema).returns(TxProfileResult.schema),
173
+ sendTx: z.function().args(ExecutionPayloadSchema, SendOptionsSchema).returns(TxHash.schema),
174
+ createAuthWit: z.function().args(schemas.AztecAddress, MessageHashOrIntentSchema).returns(AuthWitness.schema),
175
+ // @ts-expect-error - ApiSchemaFor cannot properly type generic methods with readonly arrays
176
+ batch: z.function().args(z.array(BatchedMethodSchema)).returns(z.array(z.discriminatedUnion('name', [
177
+ z.object({
178
+ name: z.literal('registerSender'),
179
+ result: schemas.AztecAddress
180
+ }),
181
+ z.object({
182
+ name: z.literal('registerContract'),
183
+ result: ContractInstanceWithAddressSchema
184
+ }),
185
+ z.object({
186
+ name: z.literal('sendTx'),
187
+ result: TxHash.schema
188
+ }),
189
+ z.object({
190
+ name: z.literal('simulateUtility'),
191
+ result: UtilitySimulationResult.schema
192
+ }),
193
+ z.object({
194
+ name: z.literal('simulateTx'),
195
+ result: TxSimulationResult.schema
196
+ })
197
+ ])))
198
+ };
package/package.json CHANGED
@@ -1,29 +1,32 @@
1
1
  {
2
2
  "name": "@aztec/aztec.js",
3
3
  "homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/aztec.js",
4
- "version": "3.0.0-canary.a9708bd",
4
+ "version": "3.0.0-devnet.2-patch.1",
5
5
  "type": "module",
6
6
  "exports": {
7
- ".": "./dest/index.js",
8
- "./interfaces": "./dest/api/interfaces.js",
9
7
  "./abi": "./dest/api/abi.js",
10
8
  "./account": "./dest/api/account.js",
11
9
  "./addresses": "./dest/api/addresses.js",
12
- "./cheatcodes": "./dest/api/cheatcodes.js",
10
+ "./authorization": "./dest/api/authorization.js",
11
+ "./block": "./dest/api/block.js",
13
12
  "./contracts": "./dest/api/contract.js",
13
+ "./crypto": "./dest/api/crypto.js",
14
14
  "./deployment": "./dest/api/deployment.js",
15
- "./entrypoint": "./dest/api/entrypoint.js",
16
- "./eth_address": "./dest/api/eth_address.js",
17
15
  "./ethereum": "./dest/api/ethereum.js",
16
+ "./events": "./dest/api/events.js",
18
17
  "./fee": "./dest/api/fee.js",
18
+ "./fee/testing": "./dest/api/fee_testing.js",
19
19
  "./fields": "./dest/api/fields.js",
20
+ "./keys": "./dest/api/keys.js",
20
21
  "./log": "./dest/api/log.js",
21
- "./log_id": "./dest/api/log_id.js",
22
- "./rpc": "./dest/api/rpc.js",
23
- "./tx_hash": "./dest/api/tx_hash.js",
24
- "./wallet": "./dest/api/wallet.js",
22
+ "./messaging": "./dest/api/messaging.js",
23
+ "./node": "./dest/api/node.js",
24
+ "./note": "./dest/api/note.js",
25
+ "./protocol": "./dest/api/protocol.js",
26
+ "./trees": "./dest/api/trees.js",
27
+ "./tx": "./dest/api/tx.js",
25
28
  "./utils": "./dest/api/utils.js",
26
- "./fee/testing": "./dest/api/fee_testing.js"
29
+ "./wallet": "./dest/api/wallet.js"
27
30
  },
28
31
  "typedocOptions": {
29
32
  "entryPoints": [
@@ -33,9 +36,9 @@
33
36
  "tsconfig": "./tsconfig.json"
34
37
  },
35
38
  "scripts": {
36
- "build": "yarn clean && tsc -b",
37
- "build:dev": "tsc -b --watch",
38
- "build:ts": "tsc -b",
39
+ "build": "yarn clean && ../scripts/tsc.sh",
40
+ "build:dev": "../scripts/tsc.sh --watch",
41
+ "build:ts": "tsgo -b",
39
42
  "clean": "rm -rf ./dest .tsbuildinfo ./src/account_contract/artifacts",
40
43
  "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
41
44
  },
@@ -81,21 +84,23 @@
81
84
  ]
82
85
  },
83
86
  "dependencies": {
84
- "@aztec/constants": "3.0.0-canary.a9708bd",
85
- "@aztec/entrypoints": "3.0.0-canary.a9708bd",
86
- "@aztec/ethereum": "3.0.0-canary.a9708bd",
87
- "@aztec/foundation": "3.0.0-canary.a9708bd",
88
- "@aztec/l1-artifacts": "3.0.0-canary.a9708bd",
89
- "@aztec/protocol-contracts": "3.0.0-canary.a9708bd",
90
- "@aztec/stdlib": "3.0.0-canary.a9708bd",
91
- "axios": "^1.8.2",
87
+ "@aztec/constants": "3.0.0-devnet.2-patch.1",
88
+ "@aztec/entrypoints": "3.0.0-devnet.2-patch.1",
89
+ "@aztec/ethereum": "3.0.0-devnet.2-patch.1",
90
+ "@aztec/foundation": "3.0.0-devnet.2-patch.1",
91
+ "@aztec/l1-artifacts": "3.0.0-devnet.2-patch.1",
92
+ "@aztec/protocol-contracts": "3.0.0-devnet.2-patch.1",
93
+ "@aztec/stdlib": "3.0.0-devnet.2-patch.1",
94
+ "axios": "^1.12.0",
92
95
  "tslib": "^2.4.0",
93
- "viem": "2.23.7"
96
+ "viem": "npm:@aztec/viem@2.38.2",
97
+ "zod": "^3.23.8"
94
98
  },
95
99
  "devDependencies": {
96
100
  "@jest/globals": "^30.0.0",
97
101
  "@types/jest": "^30.0.0",
98
102
  "@types/node": "^22.15.17",
103
+ "@typescript/native-preview": "7.0.0-dev.20251126.1",
99
104
  "buffer": "^6.0.3",
100
105
  "crypto-browserify": "^3.12.1",
101
106
  "jest": "^30.0.0",
@@ -103,7 +108,7 @@
103
108
  "process": "^0.11.10",
104
109
  "resolve-typescript-plugin": "^2.0.1",
105
110
  "stream-browserify": "^3.0.0",
106
- "ts-loader": "^9.4.4",
111
+ "ts-loader": "^9.5.4",
107
112
  "ts-node": "^10.9.1",
108
113
  "typescript": "^5.3.3",
109
114
  "util": "^0.12.5"
@@ -0,0 +1,96 @@
1
+ import type { DefaultAccountEntrypointOptions } from '@aztec/entrypoints/account';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
+ import { AuthWitness } from '@aztec/stdlib/auth-witness';
4
+ import type { GasSettings } from '@aztec/stdlib/gas';
5
+ import type { ExecutionPayload, TxExecutionRequest } from '@aztec/stdlib/tx';
6
+
7
+ import { type CallIntent, type IntentInnerHash, computeAuthWitMessageHash } from '../utils/authwit.js';
8
+ import type { AccountInterface } from './interface.js';
9
+
10
+ /**
11
+ * An authwit provider that can create both private and public authwits
12
+ * with an intent as input, as opposed to just a precomputed inner hash
13
+ */
14
+ interface AuthwitnessIntentProvider {
15
+ /**
16
+ * Creates a private authwit from an intent or inner hash, to be provided
17
+ * during function execution
18
+ * @param intent - The action (or inner hash) to authorize
19
+ */
20
+ createAuthWit(intent: IntentInnerHash | CallIntent | Buffer | Fr): Promise<AuthWitness>;
21
+ }
22
+
23
+ /**
24
+ * A type defining an account, capable of both creating authwits and using them
25
+ * to authenticate transaction execution requests.
26
+ */
27
+ export type Account = AccountInterface & AuthwitnessIntentProvider;
28
+
29
+ /**
30
+ * An account implementation that uses authwits as an authentication mechanism
31
+ * and can assemble transaction execution requests for an entrypoint.
32
+ */
33
+ export class BaseAccount implements Account {
34
+ constructor(protected account: AccountInterface) {}
35
+
36
+ createTxExecutionRequest(
37
+ exec: ExecutionPayload,
38
+ gasSettings: GasSettings,
39
+ options: DefaultAccountEntrypointOptions,
40
+ ): Promise<TxExecutionRequest> {
41
+ return this.account.createTxExecutionRequest(exec, gasSettings, options);
42
+ }
43
+
44
+ getChainId(): Fr {
45
+ return this.account.getChainId();
46
+ }
47
+
48
+ getVersion(): Fr {
49
+ return this.account.getVersion();
50
+ }
51
+
52
+ /** Returns the complete address of the account that implements this wallet. */
53
+ public getCompleteAddress() {
54
+ return this.account.getCompleteAddress();
55
+ }
56
+
57
+ /** Returns the address of the account that implements this wallet. */
58
+ public getAddress() {
59
+ return this.getCompleteAddress().address;
60
+ }
61
+
62
+ /**
63
+ * Computes an authentication witness from either a message hash or an intent.
64
+ *
65
+ * If a message hash is provided, it will create a witness for the hash directly.
66
+ * Otherwise, it will compute the message hash using the intent, along with the
67
+ * chain id and the version values provided by the wallet.
68
+ *
69
+ * @param messageHashOrIntent - The message hash of the intent to approve
70
+ * @returns The authentication witness
71
+ */
72
+ async createAuthWit(messageHashOrIntent: Fr | Buffer | CallIntent | IntentInnerHash): Promise<AuthWitness> {
73
+ let messageHash: Fr;
74
+ if (Buffer.isBuffer(messageHashOrIntent)) {
75
+ messageHash = Fr.fromBuffer(messageHashOrIntent);
76
+ } else if (messageHashOrIntent instanceof Fr) {
77
+ messageHash = messageHashOrIntent;
78
+ } else {
79
+ messageHash = await this.getMessageHash(messageHashOrIntent);
80
+ }
81
+
82
+ return this.account.createAuthWit(messageHash);
83
+ }
84
+
85
+ /**
86
+ * Returns the message hash for the given intent
87
+ *
88
+ * @param intent - A tuple of (consumer and inner hash) or (caller and action)
89
+ * @returns The message hash
90
+ */
91
+ private getMessageHash(intent: IntentInnerHash | CallIntent): Promise<Fr> {
92
+ const chainId = this.getChainId();
93
+ const version = this.getVersion();
94
+ return computeAuthWitMessageHash(intent, { chainId, version });
95
+ }
96
+ }
@@ -1,13 +1,12 @@
1
- import type { AuthWitnessProvider } from '@aztec/entrypoints/interfaces';
2
- import { Fr } from '@aztec/foundation/fields';
1
+ import type { AuthWitnessProvider, ChainInfo } from '@aztec/entrypoints/interfaces';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import type { ContractArtifact } from '@aztec/stdlib/abi';
4
- import type { CompleteAddress, NodeInfo } from '@aztec/stdlib/contract';
4
+ import type { CompleteAddress } from '@aztec/stdlib/contract';
5
5
  import { getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract';
6
6
  import { deriveKeys } from '@aztec/stdlib/keys';
7
7
 
8
8
  import type { AccountInterface } from './interface.js';
9
9
 
10
- // docs:start:account-contract-interface
11
10
  /**
12
11
  * An account contract instance. Knows its artifact, deployment arguments, how to create
13
12
  * transaction execution requests out of function calls, and how to authorize actions.
@@ -36,10 +35,10 @@ export interface AccountContract {
36
35
  * The account interface is responsible for assembling tx requests given requested function calls, and
37
36
  * for creating signed auth witnesses given action identifiers (message hashes).
38
37
  * @param address - Address of this account contract.
39
- * @param nodeInfo - Info on the chain where it is initialized / published.
38
+ * @param chainInfo - Chain id and version of the rollup where the account contract is initialized / published.
40
39
  * @returns An account interface instance for creating tx requests and authorizing actions.
41
40
  */
42
- getInterface(address: CompleteAddress, nodeInfo: NodeInfo): AccountInterface;
41
+ getInterface(address: CompleteAddress, chainInfo: ChainInfo): AccountInterface;
43
42
 
44
43
  /**
45
44
  * Returns the auth witness provider for the given address.
@@ -47,7 +46,6 @@ export interface AccountContract {
47
46
  */
48
47
  getAuthWitnessProvider(address: CompleteAddress): AuthWitnessProvider;
49
48
  }
50
- // docs:end:account-contract-interface
51
49
 
52
50
  /**
53
51
  * Compute the address of an account contract from secret and salt.
@@ -1,25 +1,23 @@
1
- import type { Fr } from '@aztec/foundation/fields';
2
- import type { PXE } from '@aztec/stdlib/interfaces/client';
1
+ import type { Fr } from '@aztec/foundation/curves/bn254';
3
2
  import { computeAddressSecret, deriveMasterIncomingViewingSecretKey } from '@aztec/stdlib/keys';
4
3
 
5
- import type { Salt } from '../account/index.js';
6
- import type { AccountInterface } from '../account/interface.js';
7
- import { AccountWallet } from './account_wallet.js';
4
+ import { BaseAccount } from './account.js';
5
+ import type { Salt } from './index.js';
6
+ import type { AccountInterface } from './interface.js';
8
7
 
9
8
  /**
10
- * Extends {@link AccountWallet} with the encryption private key. Not required for
9
+ * Extends {@link Account} with the encryption private key. Not required for
11
10
  * implementing the wallet interface but useful for testing purposes or exporting
12
11
  * an account to another pxe.
13
12
  */
14
- export class AccountWalletWithSecretKey extends AccountWallet {
13
+ export class AccountWithSecretKey extends BaseAccount {
15
14
  constructor(
16
- pxe: PXE,
17
15
  account: AccountInterface,
18
16
  private secretKey: Fr,
19
17
  /** Deployment salt for this account contract. */
20
18
  public readonly salt: Salt,
21
19
  ) {
22
- super(pxe, account);
20
+ super(account);
23
21
  }
24
22
 
25
23
  /** Returns the encryption private key associated with this account. */
@@ -1,12 +1,9 @@
1
1
  /**
2
- * The `account` module provides utilities for managing accounts. The {@link AccountManager} class
3
- * allows to instantiate, initialize and publish a fresh account, or to obtain a `Wallet` instance out of an
4
- * already-deployed account. Use the `@aztec/accounts` package to load default account implementations that rely
5
- * on ECDSA or Schnorr signatures.
2
+ * The `account` module provides utilities for managing accounts.
6
3
  *
7
4
  * @packageDocumentation
8
5
  */
9
- import type { Fr } from '@aztec/foundation/fields';
6
+ import type { Fr } from '@aztec/foundation/curves/bn254';
10
7
 
11
8
  export { type AccountContract, getAccountContractAddress } from './account_contract.js';
12
9
  export { type AccountInterface } from './interface.js';
@@ -1,5 +1,5 @@
1
1
  import type { AuthWitnessProvider, EntrypointInterface } from '@aztec/entrypoints/interfaces';
2
- import type { Fr } from '@aztec/foundation/fields';
2
+ import type { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import type { CompleteAddress } from '@aztec/stdlib/contract';
5
5
 
@@ -0,0 +1,45 @@
1
+ import type { ChainInfo, EntrypointInterface } from '@aztec/entrypoints/interfaces';
2
+ import { DefaultMultiCallEntrypoint } from '@aztec/entrypoints/multicall';
3
+ import type { Fr } from '@aztec/foundation/curves/bn254';
4
+ import { AuthWitness } from '@aztec/stdlib/auth-witness';
5
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
6
+ import type { CompleteAddress } from '@aztec/stdlib/contract';
7
+ import type { GasSettings } from '@aztec/stdlib/gas';
8
+ import type { ExecutionPayload, TxExecutionRequest } from '@aztec/stdlib/tx';
9
+
10
+ import type { CallIntent, IntentInnerHash } from '../utils/authwit.js';
11
+ import type { Account } from './account.js';
12
+
13
+ /**
14
+ * Account implementation which creates a transaction using the multicall protocol contract as entrypoint.
15
+ */
16
+ export class SignerlessAccount implements Account {
17
+ private entrypoint: EntrypointInterface;
18
+ constructor(chainInfo: ChainInfo) {
19
+ this.entrypoint = new DefaultMultiCallEntrypoint(chainInfo.chainId.toNumber(), chainInfo.version.toNumber());
20
+ }
21
+
22
+ createTxExecutionRequest(exec: ExecutionPayload, gasSettings: GasSettings): Promise<TxExecutionRequest> {
23
+ return this.entrypoint.createTxExecutionRequest(exec, gasSettings);
24
+ }
25
+
26
+ getChainId(): Fr {
27
+ throw new Error('SignerlessAccount: Method getChainId not implemented.');
28
+ }
29
+
30
+ getVersion(): Fr {
31
+ throw new Error('SignerlessAccount: Method getVersion not implemented.');
32
+ }
33
+
34
+ getCompleteAddress(): CompleteAddress {
35
+ throw new Error('SignerlessAccount: Method getCompleteAddress not implemented.');
36
+ }
37
+
38
+ getAddress(): AztecAddress {
39
+ throw new Error('SignerlessAccount: Method getAddress not implemented.');
40
+ }
41
+
42
+ createAuthWit(_intent: Fr | Buffer | IntentInnerHash | CallIntent): Promise<AuthWitness> {
43
+ throw new Error('SignerlessAccount: Method createAuthWit not implemented.');
44
+ }
45
+ }
package/src/api/abi.ts CHANGED
@@ -23,3 +23,14 @@ export {
23
23
  contractArtifactFromBuffer,
24
24
  } from '@aztec/stdlib/abi';
25
25
  export { type NoirCompiledContract } from '@aztec/stdlib/noir';
26
+
27
+ // Type converters for flexible parameter types in contract calls
28
+ export {
29
+ type AztecAddressLike,
30
+ type EthAddressLike,
31
+ type EventSelectorLike,
32
+ type FieldLike,
33
+ type FunctionSelectorLike,
34
+ type U128Like,
35
+ type WrappedFieldLike,
36
+ } from '../utils/abi_types.js';
@@ -1,4 +1,7 @@
1
1
  export { type AccountContract, type AccountInterface, type Salt, getAccountContractAddress } from '../account/index.js';
2
- export type { AuthWitnessProvider } from '@aztec/entrypoints/interfaces';
2
+ export type { AuthWitnessProvider, ChainInfo } from '@aztec/entrypoints/interfaces';
3
+ export { ChainInfoSchema } from '@aztec/entrypoints/interfaces';
3
4
 
4
- export { AccountManager, type DeployAccountOptions } from '../account_manager/index.js';
5
+ export { AccountWithSecretKey } from '../account/account_with_secret_key.js';
6
+ export { type Account, BaseAccount } from '../account/account.js';
7
+ export { SignerlessAccount } from '../account/signerless_account.js';
@@ -1,2 +1,3 @@
1
1
  export { AztecAddress } from '@aztec/stdlib/aztec-address';
2
2
  export { CompleteAddress } from '@aztec/stdlib/contract';
3
+ export { EthAddress } from '@aztec/foundation/eth-address';
@@ -1,3 +1,14 @@
1
1
  export { AuthWitness } from '@aztec/stdlib/auth-witness';
2
+ export {
3
+ SetPublicAuthwitContractInteraction,
4
+ type ContractFunctionInteractionCallIntent,
5
+ getMessageHashFromIntent,
6
+ computeAuthWitMessageHash,
7
+ computeInnerAuthWitHashFromAction,
8
+ lookupValidity,
9
+ type CallIntent,
10
+ type IntentInnerHash,
11
+ } from '../utils/authwit.js';
12
+ export { computeInnerAuthWitHash } from '@aztec/stdlib/auth-witness';
2
13
 
3
14
  export { CallAuthorizationRequest } from '../authorization/call_authorization_request.js';
@@ -0,0 +1,2 @@
1
+ export { Body, L2Block } from '@aztec/stdlib/block';
2
+ export { getTimestampRangeForEpoch } from '@aztec/stdlib/epoch-helpers';