@aztec/aztec.js 0.0.0-test.1 → 0.0.1-commit.5476d83

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 (403) 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 +43 -0
  6. package/dest/account/account_contract.d.ts.map +1 -0
  7. package/dest/account/{contract.js → account_contract.js} +7 -4
  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 +4 -8
  12. package/dest/account/index.d.ts.map +1 -1
  13. package/dest/account/index.js +2 -6
  14. package/dest/account/interface.d.ts +2 -14
  15. package/dest/account/interface.d.ts.map +1 -1
  16. package/dest/account/interface.js +1 -0
  17. package/dest/account/signerless_account.d.ts +23 -0
  18. package/dest/account/signerless_account.d.ts.map +1 -0
  19. package/dest/account/signerless_account.js +27 -0
  20. package/dest/api/abi.d.ts +3 -2
  21. package/dest/api/abi.d.ts.map +1 -1
  22. package/dest/api/abi.js +1 -1
  23. package/dest/api/account.d.ts +7 -3
  24. package/dest/api/account.d.ts.map +1 -1
  25. package/dest/api/account.js +4 -1
  26. package/dest/api/addresses.d.ts +2 -1
  27. package/dest/api/addresses.d.ts.map +1 -1
  28. package/dest/api/addresses.js +1 -0
  29. package/dest/api/authorization.d.ts +5 -0
  30. package/dest/api/authorization.d.ts.map +1 -0
  31. package/dest/api/authorization.js +4 -0
  32. package/dest/api/block.d.ts +3 -0
  33. package/dest/api/block.d.ts.map +1 -0
  34. package/dest/api/block.js +2 -0
  35. package/dest/api/contract.d.ts +49 -0
  36. package/dest/api/contract.d.ts.map +1 -0
  37. package/dest/{contract/index.js → api/contract.js} +15 -11
  38. package/dest/api/crypto.d.ts +2 -0
  39. package/dest/api/crypto.d.ts.map +1 -0
  40. package/dest/api/crypto.js +1 -0
  41. package/dest/api/deployment.d.ts +5 -4
  42. package/dest/api/deployment.d.ts.map +1 -1
  43. package/dest/api/deployment.js +4 -3
  44. package/dest/api/eth_address.d.ts +1 -1
  45. package/dest/api/ethereum.d.ts +2 -0
  46. package/dest/api/ethereum.d.ts.map +1 -0
  47. package/dest/api/ethereum.js +1 -0
  48. package/dest/api/events.d.ts +12 -0
  49. package/dest/api/events.d.ts.map +1 -0
  50. package/dest/api/events.js +30 -0
  51. package/dest/api/fee.d.ts +2 -2
  52. package/dest/api/fee.d.ts.map +1 -1
  53. package/dest/api/fee.js +1 -1
  54. package/dest/api/fee_testing.d.ts +2 -0
  55. package/dest/api/fee_testing.d.ts.map +1 -0
  56. package/dest/api/fee_testing.js +1 -0
  57. package/dest/api/fields.d.ts +1 -1
  58. package/dest/api/keys.d.ts +4 -0
  59. package/dest/api/keys.d.ts.map +1 -0
  60. package/dest/api/keys.js +3 -0
  61. package/dest/api/log.d.ts +2 -1
  62. package/dest/api/log.d.ts.map +1 -1
  63. package/dest/api/log.js +1 -0
  64. package/dest/api/messaging.d.ts +3 -0
  65. package/dest/api/messaging.d.ts.map +1 -0
  66. package/dest/api/messaging.js +2 -0
  67. package/dest/api/node.d.ts +21 -0
  68. package/dest/api/node.d.ts.map +1 -0
  69. package/dest/api/node.js +18 -0
  70. package/dest/api/note.d.ts +2 -0
  71. package/dest/api/note.d.ts.map +1 -0
  72. package/dest/api/note.js +1 -0
  73. package/dest/api/protocol.d.ts +3 -0
  74. package/dest/api/protocol.d.ts.map +1 -0
  75. package/dest/api/protocol.js +2 -0
  76. package/dest/api/trees.d.ts +3 -0
  77. package/dest/api/trees.d.ts.map +1 -0
  78. package/dest/api/trees.js +2 -0
  79. package/dest/api/tx.d.ts +2 -0
  80. package/dest/api/tx.d.ts.map +1 -0
  81. package/dest/api/tx.js +1 -0
  82. package/dest/api/utils.d.ts +13 -0
  83. package/dest/api/utils.d.ts.map +1 -0
  84. package/dest/api/utils.js +12 -0
  85. package/dest/api/wallet.d.ts +4 -2
  86. package/dest/api/wallet.d.ts.map +1 -1
  87. package/dest/api/wallet.js +3 -1
  88. package/dest/authorization/call_authorization_request.d.ts +46 -0
  89. package/dest/authorization/call_authorization_request.d.ts.map +1 -0
  90. package/dest/authorization/call_authorization_request.js +49 -0
  91. package/dest/contract/base_contract_interaction.d.ts +16 -80
  92. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  93. package/dest/contract/base_contract_interaction.js +15 -128
  94. package/dest/contract/batch_call.d.ts +19 -21
  95. package/dest/contract/batch_call.d.ts.map +1 -1
  96. package/dest/contract/batch_call.js +86 -68
  97. package/dest/contract/checker.d.ts +2 -2
  98. package/dest/contract/checker.d.ts.map +1 -1
  99. package/dest/contract/checker.js +2 -2
  100. package/dest/contract/contract.d.ts +9 -8
  101. package/dest/contract/contract.d.ts.map +1 -1
  102. package/dest/contract/contract.js +10 -20
  103. package/dest/contract/contract_base.d.ts +7 -20
  104. package/dest/contract/contract_base.d.ts.map +1 -1
  105. package/dest/contract/contract_base.js +7 -14
  106. package/dest/contract/contract_function_interaction.d.ts +53 -45
  107. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  108. package/dest/contract/contract_function_interaction.js +78 -74
  109. package/dest/contract/deploy_method.d.ts +106 -60
  110. package/dest/contract/deploy_method.d.ts.map +1 -1
  111. package/dest/contract/deploy_method.js +125 -133
  112. package/dest/contract/deploy_sent_tx.d.ts +14 -11
  113. package/dest/contract/deploy_sent_tx.d.ts.map +1 -1
  114. package/dest/contract/deploy_sent_tx.js +18 -15
  115. package/dest/contract/get_gas_limits.d.ts +6 -7
  116. package/dest/contract/get_gas_limits.d.ts.map +1 -1
  117. package/dest/contract/get_gas_limits.js +9 -3
  118. package/dest/contract/interaction_options.d.ts +114 -0
  119. package/dest/contract/interaction_options.d.ts.map +1 -0
  120. package/dest/contract/interaction_options.js +46 -0
  121. package/dest/contract/protocol_contracts.d.ts +7 -7
  122. package/dest/contract/protocol_contracts.d.ts.map +1 -1
  123. package/dest/contract/protocol_contracts.js +7 -7
  124. package/dest/contract/sent_tx.d.ts +9 -19
  125. package/dest/contract/sent_tx.d.ts.map +1 -1
  126. package/dest/contract/sent_tx.js +31 -43
  127. package/dest/contract/unsafe_contract.d.ts +2 -2
  128. package/dest/contract/unsafe_contract.d.ts.map +1 -1
  129. package/dest/contract/unsafe_contract.js +1 -1
  130. package/dest/contract/wait_for_proven.d.ts +17 -0
  131. package/dest/contract/wait_for_proven.d.ts.map +1 -0
  132. package/dest/contract/wait_for_proven.js +17 -0
  133. package/dest/deployment/broadcast_function.d.ts +4 -4
  134. package/dest/deployment/broadcast_function.d.ts.map +1 -1
  135. package/dest/deployment/broadcast_function.js +27 -23
  136. package/dest/deployment/contract_deployer.d.ts +2 -2
  137. package/dest/deployment/contract_deployer.d.ts.map +1 -1
  138. package/dest/deployment/contract_deployer.js +1 -1
  139. package/dest/deployment/publish_class.d.ts +6 -0
  140. package/dest/deployment/publish_class.d.ts.map +1 -0
  141. package/dest/deployment/publish_class.js +17 -0
  142. package/dest/deployment/publish_instance.d.ts +10 -0
  143. package/dest/deployment/publish_instance.d.ts.map +1 -0
  144. package/dest/deployment/publish_instance.js +11 -0
  145. package/dest/ethereum/portal_manager.d.ts +138 -0
  146. package/dest/ethereum/portal_manager.d.ts.map +1 -0
  147. package/dest/{api/ethereum → ethereum}/portal_manager.js +136 -76
  148. package/dest/fee/fee_juice_payment_method_with_claim.d.ts +17 -12
  149. package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
  150. package/dest/fee/fee_juice_payment_method_with_claim.js +26 -16
  151. package/dest/fee/fee_payment_method.d.ts +12 -8
  152. package/dest/fee/fee_payment_method.d.ts.map +1 -1
  153. package/dest/fee/private_fee_payment_method.d.ts +26 -9
  154. package/dest/fee/private_fee_payment_method.d.ts.map +1 -1
  155. package/dest/fee/private_fee_payment_method.js +44 -22
  156. package/dest/fee/public_fee_payment_method.d.ts +27 -10
  157. package/dest/fee/public_fee_payment_method.d.ts.map +1 -1
  158. package/dest/fee/public_fee_payment_method.js +46 -24
  159. package/dest/fee/sponsored_fee_payment.d.ts +17 -0
  160. package/dest/fee/sponsored_fee_payment.d.ts.map +1 -0
  161. package/dest/fee/sponsored_fee_payment.js +34 -0
  162. package/dest/utils/abi_types.d.ts +1 -3
  163. package/dest/utils/abi_types.d.ts.map +1 -1
  164. package/dest/utils/authwit.d.ts +82 -25
  165. package/dest/utils/authwit.d.ts.map +1 -1
  166. package/dest/utils/authwit.js +237 -40
  167. package/dest/utils/cross_chain.d.ts +24 -0
  168. package/dest/utils/cross_chain.d.ts.map +1 -0
  169. package/dest/utils/cross_chain.js +30 -0
  170. package/dest/utils/fee_juice.d.ts +4 -3
  171. package/dest/utils/fee_juice.d.ts.map +1 -1
  172. package/dest/utils/fee_juice.js +3 -2
  173. package/dest/utils/field_compressed_string.d.ts +1 -1
  174. package/dest/utils/field_compressed_string.d.ts.map +1 -1
  175. package/dest/utils/node.d.ts +2 -2
  176. package/dest/utils/node.d.ts.map +1 -1
  177. package/dest/utils/node.js +1 -1
  178. package/dest/utils/pub_key.d.ts +1 -1
  179. package/dest/utils/pub_key.d.ts.map +1 -1
  180. package/dest/utils/pub_key.js +1 -2
  181. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +34 -0
  182. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -0
  183. package/dest/wallet/account_entrypoint_meta_payment_method.js +76 -0
  184. package/dest/wallet/account_manager.d.ts +66 -0
  185. package/dest/wallet/account_manager.d.ts.map +1 -0
  186. package/dest/wallet/account_manager.js +113 -0
  187. package/dest/wallet/deploy_account_method.d.ts +52 -0
  188. package/dest/wallet/deploy_account_method.d.ts.map +1 -0
  189. package/dest/wallet/deploy_account_method.js +77 -0
  190. package/dest/wallet/index.d.ts +3 -17
  191. package/dest/wallet/index.d.ts.map +1 -1
  192. package/dest/wallet/index.js +2 -20
  193. package/dest/wallet/wallet.d.ts +1965 -0
  194. package/dest/wallet/wallet.d.ts.map +1 -0
  195. package/dest/wallet/wallet.js +186 -0
  196. package/package.json +44 -35
  197. package/src/account/account.ts +96 -0
  198. package/src/account/{contract.ts → account_contract.ts} +24 -13
  199. package/src/{wallet/account_wallet_with_private_key.ts → account/account_with_secret_key.ts} +6 -8
  200. package/src/account/index.ts +3 -7
  201. package/src/account/interface.ts +1 -12
  202. package/src/account/signerless_account.ts +45 -0
  203. package/src/api/abi.ts +26 -0
  204. package/src/api/account.ts +6 -9
  205. package/src/api/addresses.ts +1 -0
  206. package/src/api/authorization.ts +14 -0
  207. package/src/api/block.ts +2 -0
  208. package/src/{contract/index.ts → api/contract.ts} +39 -14
  209. package/src/api/crypto.ts +1 -0
  210. package/src/api/deployment.ts +4 -3
  211. package/src/api/ethereum.ts +10 -0
  212. package/src/api/events.ts +44 -0
  213. package/src/api/fee.ts +1 -1
  214. package/src/api/fee_testing.ts +1 -0
  215. package/src/api/keys.ts +8 -0
  216. package/src/api/log.ts +1 -0
  217. package/src/api/messaging.ts +2 -0
  218. package/src/api/node.ts +20 -0
  219. package/src/api/note.ts +1 -0
  220. package/src/api/protocol.ts +2 -0
  221. package/src/api/trees.ts +2 -0
  222. package/src/api/tx.ts +13 -0
  223. package/src/api/utils.ts +14 -0
  224. package/src/api/wallet.ts +27 -5
  225. package/src/authorization/call_authorization_request.ts +63 -0
  226. package/src/contract/base_contract_interaction.ts +23 -166
  227. package/src/contract/batch_call.ts +106 -57
  228. package/src/contract/checker.ts +8 -3
  229. package/src/contract/contract.ts +14 -21
  230. package/src/contract/contract_base.ts +9 -26
  231. package/src/contract/contract_function_interaction.ts +135 -106
  232. package/src/contract/deploy_method.ts +205 -134
  233. package/src/contract/deploy_sent_tx.ts +24 -23
  234. package/src/contract/get_gas_limits.ts +15 -8
  235. package/src/contract/interaction_options.ts +163 -0
  236. package/src/contract/protocol_contracts.ts +10 -10
  237. package/src/contract/sent_tx.ts +41 -52
  238. package/src/contract/unsafe_contract.ts +2 -2
  239. package/src/contract/wait_for_proven.ts +38 -0
  240. package/src/deployment/broadcast_function.ts +57 -57
  241. package/src/deployment/contract_deployer.ts +4 -3
  242. package/src/deployment/publish_class.ts +34 -0
  243. package/src/deployment/publish_instance.ts +26 -0
  244. package/src/{api/ethereum → ethereum}/portal_manager.ts +164 -83
  245. package/src/fee/fee_juice_payment_method_with_claim.ts +48 -33
  246. package/src/fee/fee_payment_method.ts +11 -7
  247. package/src/fee/private_fee_payment_method.ts +79 -57
  248. package/src/fee/public_fee_payment_method.ts +93 -67
  249. package/src/fee/sponsored_fee_payment.ts +46 -0
  250. package/src/utils/authwit.ts +261 -53
  251. package/src/utils/cross_chain.ts +53 -0
  252. package/src/utils/fee_juice.ts +4 -4
  253. package/src/utils/node.ts +1 -1
  254. package/src/utils/pub_key.ts +1 -2
  255. package/src/wallet/account_entrypoint_meta_payment_method.ts +106 -0
  256. package/src/wallet/account_manager.ts +154 -0
  257. package/src/wallet/deploy_account_method.ts +126 -0
  258. package/src/wallet/index.ts +2 -33
  259. package/src/wallet/wallet.ts +318 -0
  260. package/dest/account/contract.d.ts +0 -37
  261. package/dest/account/contract.d.ts.map +0 -1
  262. package/dest/account/wallet.d.ts +0 -11
  263. package/dest/account/wallet.d.ts.map +0 -1
  264. package/dest/account/wallet.js +0 -3
  265. package/dest/account_manager/deploy_account_method.d.ts +0 -15
  266. package/dest/account_manager/deploy_account_method.d.ts.map +0 -1
  267. package/dest/account_manager/deploy_account_method.js +0 -43
  268. package/dest/account_manager/deploy_account_sent_tx.d.ts +0 -30
  269. package/dest/account_manager/deploy_account_sent_tx.d.ts.map +0 -1
  270. package/dest/account_manager/deploy_account_sent_tx.js +0 -29
  271. package/dest/account_manager/index.d.ts +0 -108
  272. package/dest/account_manager/index.d.ts.map +0 -1
  273. package/dest/account_manager/index.js +0 -159
  274. package/dest/api/cheat_codes.d.ts +0 -26
  275. package/dest/api/cheat_codes.d.ts.map +0 -1
  276. package/dest/api/cheat_codes.js +0 -25
  277. package/dest/api/entrypoint.d.ts +0 -2
  278. package/dest/api/entrypoint.d.ts.map +0 -1
  279. package/dest/api/entrypoint.js +0 -1
  280. package/dest/api/ethereum/anvil_test_watcher.d.ts +0 -32
  281. package/dest/api/ethereum/anvil_test_watcher.d.ts.map +0 -1
  282. package/dest/api/ethereum/anvil_test_watcher.js +0 -133
  283. package/dest/api/ethereum/chain_monitor.d.ts +0 -25
  284. package/dest/api/ethereum/chain_monitor.d.ts.map +0 -1
  285. package/dest/api/ethereum/chain_monitor.js +0 -74
  286. package/dest/api/ethereum/cheat_codes.d.ts +0 -63
  287. package/dest/api/ethereum/cheat_codes.d.ts.map +0 -1
  288. package/dest/api/ethereum/cheat_codes.js +0 -162
  289. package/dest/api/ethereum/index.d.ts +0 -7
  290. package/dest/api/ethereum/index.d.ts.map +0 -1
  291. package/dest/api/ethereum/index.js +0 -6
  292. package/dest/api/ethereum/l1_contracts.d.ts +0 -3
  293. package/dest/api/ethereum/l1_contracts.d.ts.map +0 -1
  294. package/dest/api/ethereum/l1_contracts.js +0 -13
  295. package/dest/api/ethereum/portal_manager.d.ts +0 -136
  296. package/dest/api/ethereum/portal_manager.d.ts.map +0 -1
  297. package/dest/api/interfaces/pxe.d.ts +0 -2
  298. package/dest/api/interfaces/pxe.d.ts.map +0 -1
  299. package/dest/api/interfaces/pxe.js +0 -1
  300. package/dest/api/log_id.d.ts +0 -2
  301. package/dest/api/log_id.d.ts.map +0 -1
  302. package/dest/api/log_id.js +0 -1
  303. package/dest/api/tx_hash.d.ts +0 -2
  304. package/dest/api/tx_hash.d.ts.map +0 -1
  305. package/dest/api/tx_hash.js +0 -1
  306. package/dest/contract/deploy_proven_tx.d.ts +0 -21
  307. package/dest/contract/deploy_proven_tx.d.ts.map +0 -1
  308. package/dest/contract/deploy_proven_tx.js +0 -19
  309. package/dest/contract/index.d.ts +0 -45
  310. package/dest/contract/index.d.ts.map +0 -1
  311. package/dest/contract/proven_tx.d.ts +0 -17
  312. package/dest/contract/proven_tx.d.ts.map +0 -1
  313. package/dest/contract/proven_tx.js +0 -22
  314. package/dest/deployment/deploy_instance.d.ts +0 -10
  315. package/dest/deployment/deploy_instance.d.ts.map +0 -1
  316. package/dest/deployment/deploy_instance.js +0 -14
  317. package/dest/deployment/index.d.ts +0 -2
  318. package/dest/deployment/index.d.ts.map +0 -1
  319. package/dest/deployment/index.js +0 -1
  320. package/dest/deployment/register_class.d.ts +0 -6
  321. package/dest/deployment/register_class.d.ts.map +0 -1
  322. package/dest/deployment/register_class.js +0 -22
  323. package/dest/entrypoint/default_entrypoint.d.ts +0 -12
  324. package/dest/entrypoint/default_entrypoint.d.ts.map +0 -1
  325. package/dest/entrypoint/default_entrypoint.js +0 -28
  326. package/dest/entrypoint/default_multi_call_entrypoint.d.ts +0 -15
  327. package/dest/entrypoint/default_multi_call_entrypoint.d.ts.map +0 -1
  328. package/dest/entrypoint/default_multi_call_entrypoint.js +0 -130
  329. package/dest/entrypoint/entrypoint.d.ts +0 -35
  330. package/dest/entrypoint/entrypoint.d.ts.map +0 -1
  331. package/dest/entrypoint/entrypoint.js +0 -4
  332. package/dest/entrypoint/payload.d.ts +0 -128
  333. package/dest/entrypoint/payload.d.ts.map +0 -1
  334. package/dest/entrypoint/payload.js +0 -143
  335. package/dest/fee/fee_juice_payment_method.d.ts +0 -14
  336. package/dest/fee/fee_juice_payment_method.d.ts.map +0 -1
  337. package/dest/fee/fee_juice_payment_method.js +0 -20
  338. package/dest/index.d.ts +0 -66
  339. package/dest/index.d.ts.map +0 -1
  340. package/dest/index.js +0 -69
  341. package/dest/rpc_clients/index.d.ts +0 -3
  342. package/dest/rpc_clients/index.d.ts.map +0 -1
  343. package/dest/rpc_clients/index.js +0 -2
  344. package/dest/rpc_clients/node/index.d.ts +0 -12
  345. package/dest/rpc_clients/node/index.d.ts.map +0 -1
  346. package/dest/rpc_clients/node/index.js +0 -78
  347. package/dest/rpc_clients/pxe_client.d.ts +0 -10
  348. package/dest/rpc_clients/pxe_client.d.ts.map +0 -1
  349. package/dest/rpc_clients/pxe_client.js +0 -23
  350. package/dest/utils/aztec_cheatcodes.d.ts +0 -59
  351. package/dest/utils/aztec_cheatcodes.d.ts.map +0 -1
  352. package/dest/utils/aztec_cheatcodes.js +0 -62
  353. package/dest/utils/index.d.ts +0 -8
  354. package/dest/utils/index.d.ts.map +0 -1
  355. package/dest/utils/index.js +0 -6
  356. package/dest/utils/pxe.d.ts +0 -4
  357. package/dest/utils/pxe.d.ts.map +0 -1
  358. package/dest/utils/pxe.js +0 -14
  359. package/dest/wallet/account_wallet.d.ts +0 -76
  360. package/dest/wallet/account_wallet.d.ts.map +0 -1
  361. package/dest/wallet/account_wallet.js +0 -231
  362. package/dest/wallet/account_wallet_with_private_key.d.ts +0 -26
  363. package/dest/wallet/account_wallet_with_private_key.d.ts.map +0 -1
  364. package/dest/wallet/base_wallet.d.ts +0 -73
  365. package/dest/wallet/base_wallet.d.ts.map +0 -1
  366. package/dest/wallet/base_wallet.js +0 -123
  367. package/dest/wallet/signerless_wallet.d.ts +0 -25
  368. package/dest/wallet/signerless_wallet.d.ts.map +0 -1
  369. package/dest/wallet/signerless_wallet.js +0 -36
  370. package/src/account/wallet.ts +0 -13
  371. package/src/account_manager/deploy_account_method.ts +0 -86
  372. package/src/account_manager/deploy_account_sent_tx.ts +0 -42
  373. package/src/account_manager/index.ts +0 -229
  374. package/src/api/cheat_codes.ts +0 -35
  375. package/src/api/entrypoint.ts +0 -1
  376. package/src/api/ethereum/anvil_test_watcher.ts +0 -158
  377. package/src/api/ethereum/chain_monitor.ts +0 -88
  378. package/src/api/ethereum/cheat_codes.ts +0 -184
  379. package/src/api/ethereum/index.ts +0 -19
  380. package/src/api/ethereum/l1_contracts.ts +0 -21
  381. package/src/api/interfaces/pxe.ts +0 -1
  382. package/src/api/log_id.ts +0 -1
  383. package/src/api/tx_hash.ts +0 -1
  384. package/src/contract/deploy_proven_tx.ts +0 -34
  385. package/src/contract/proven_tx.ts +0 -42
  386. package/src/deployment/deploy_instance.ts +0 -31
  387. package/src/deployment/index.ts +0 -1
  388. package/src/deployment/register_class.ts +0 -44
  389. package/src/entrypoint/default_entrypoint.ts +0 -39
  390. package/src/entrypoint/default_multi_call_entrypoint.ts +0 -93
  391. package/src/entrypoint/entrypoint.ts +0 -39
  392. package/src/entrypoint/payload.ts +0 -238
  393. package/src/fee/fee_juice_payment_method.ts +0 -26
  394. package/src/index.ts +0 -106
  395. package/src/rpc_clients/index.ts +0 -2
  396. package/src/rpc_clients/node/index.ts +0 -77
  397. package/src/rpc_clients/pxe_client.ts +0 -25
  398. package/src/utils/aztec_cheatcodes.ts +0 -77
  399. package/src/utils/index.ts +0 -21
  400. package/src/utils/pxe.ts +0 -17
  401. package/src/wallet/account_wallet.ts +0 -242
  402. package/src/wallet/base_wallet.ts +0 -198
  403. package/src/wallet/signerless_wallet.ts +0 -52
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,YAAY,EACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,KAAK,qBAAqB,EAE1B,KAAK,2BAA2B,EAEhC,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAoB,KAAK,YAAY,EAAE,KAAK,MAAM,EAAqB,MAAM,uBAAuB,CAAC;AAC5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;;;;;;EAIE,CAAC;AAEtC,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIE,CAAC;AAE3C,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAIxC,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,MAAM,CAgD7C,CAAC"}
@@ -0,0 +1,186 @@
1
+ import { AbiTypeSchema, ContractArtifactSchema, FunctionType } from '@aztec/stdlib/abi';
2
+ import { AuthWitness } from '@aztec/stdlib/auth-witness';
3
+ import { ContractClassWithIdSchema, ContractInstanceWithAddressSchema } from '@aztec/stdlib/contract';
4
+ import { Gas } from '@aztec/stdlib/gas';
5
+ import { AbiDecodedSchema, optional, schemas } from '@aztec/stdlib/schemas';
6
+ import { Capsule, HashedValues, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult } from '@aztec/stdlib/tx';
7
+ import { z } from 'zod';
8
+ export const FunctionCallSchema = z.object({
9
+ name: z.string(),
10
+ to: schemas.AztecAddress,
11
+ selector: schemas.FunctionSelector,
12
+ type: z.nativeEnum(FunctionType),
13
+ isStatic: z.boolean(),
14
+ hideMsgSender: z.boolean(),
15
+ args: z.array(schemas.Fr),
16
+ returnTypes: z.array(AbiTypeSchema)
17
+ });
18
+ export const ExecutionPayloadSchema = z.object({
19
+ calls: z.array(FunctionCallSchema),
20
+ authWitnesses: z.array(AuthWitness.schema),
21
+ capsules: z.array(Capsule.schema),
22
+ extraHashedArgs: z.array(HashedValues.schema),
23
+ feePayer: optional(schemas.AztecAddress)
24
+ });
25
+ export const GasSettingsOptionSchema = z.object({
26
+ gasSettings: optional(z.object({
27
+ gasLimits: optional(Gas.schema),
28
+ teardownGasLimits: optional(Gas.schema),
29
+ maxFeePerGas: optional(z.object({
30
+ feePerDaGas: schemas.BigInt,
31
+ feePerL2Gas: schemas.BigInt
32
+ })),
33
+ maxPriorityFeePerGas: optional(z.object({
34
+ feePerDaGas: schemas.BigInt,
35
+ feePerL2Gas: schemas.BigInt
36
+ }))
37
+ }))
38
+ });
39
+ export const WalletSimulationFeeOptionSchema = GasSettingsOptionSchema.extend({
40
+ estimatedGasPadding: optional(z.number()),
41
+ estimateGas: optional(z.boolean())
42
+ });
43
+ export const SendOptionsSchema = z.object({
44
+ from: schemas.AztecAddress,
45
+ authWitnesses: optional(z.array(AuthWitness.schema)),
46
+ capsules: optional(z.array(Capsule.schema)),
47
+ fee: optional(GasSettingsOptionSchema)
48
+ });
49
+ export const SimulateOptionsSchema = z.object({
50
+ from: schemas.AztecAddress,
51
+ authWitnesses: optional(z.array(AuthWitness.schema)),
52
+ capsules: optional(z.array(Capsule.schema)),
53
+ fee: optional(WalletSimulationFeeOptionSchema),
54
+ skipTxValidation: optional(z.boolean()),
55
+ skipFeeEnforcement: optional(z.boolean()),
56
+ includeMetadata: optional(z.boolean())
57
+ });
58
+ export const ProfileOptionsSchema = SimulateOptionsSchema.extend({
59
+ profileMode: z.enum([
60
+ 'gates',
61
+ 'execution-steps',
62
+ 'full'
63
+ ]),
64
+ skipProofGeneration: optional(z.boolean())
65
+ });
66
+ export const MessageHashOrIntentSchema = z.union([
67
+ schemas.Fr,
68
+ z.object({
69
+ consumer: schemas.AztecAddress,
70
+ innerHash: schemas.Fr
71
+ }),
72
+ z.object({
73
+ caller: schemas.AztecAddress,
74
+ call: FunctionCallSchema
75
+ })
76
+ ]);
77
+ export const BatchedMethodSchema = z.union([
78
+ z.object({
79
+ name: z.literal('registerSender'),
80
+ args: z.tuple([
81
+ schemas.AztecAddress,
82
+ optional(z.string())
83
+ ])
84
+ }),
85
+ z.object({
86
+ name: z.literal('registerContract'),
87
+ args: z.tuple([
88
+ ContractInstanceWithAddressSchema,
89
+ optional(ContractArtifactSchema),
90
+ optional(schemas.Fr)
91
+ ])
92
+ }),
93
+ z.object({
94
+ name: z.literal('sendTx'),
95
+ args: z.tuple([
96
+ ExecutionPayloadSchema,
97
+ SendOptionsSchema
98
+ ])
99
+ }),
100
+ z.object({
101
+ name: z.literal('simulateUtility'),
102
+ args: z.tuple([
103
+ FunctionCallSchema,
104
+ optional(z.array(AuthWitness.schema))
105
+ ])
106
+ }),
107
+ z.object({
108
+ name: z.literal('simulateTx'),
109
+ args: z.tuple([
110
+ ExecutionPayloadSchema,
111
+ SimulateOptionsSchema
112
+ ])
113
+ })
114
+ ]);
115
+ export const ContractMetadataSchema = z.object({
116
+ contractInstance: z.union([
117
+ ContractInstanceWithAddressSchema,
118
+ z.undefined()
119
+ ]),
120
+ isContractInitialized: z.boolean(),
121
+ isContractPublished: z.boolean()
122
+ });
123
+ export const ContractClassMetadataSchema = z.object({
124
+ contractClass: z.union([
125
+ ContractClassWithIdSchema,
126
+ z.undefined()
127
+ ]),
128
+ isContractClassPubliclyRegistered: z.boolean(),
129
+ artifact: z.union([
130
+ ContractArtifactSchema,
131
+ z.undefined()
132
+ ])
133
+ });
134
+ export const EventMetadataDefinitionSchema = z.object({
135
+ eventSelector: schemas.EventSelector,
136
+ abiType: AbiTypeSchema,
137
+ fieldNames: z.array(z.string())
138
+ });
139
+ export const WalletSchema = {
140
+ getChainInfo: z.function().args().returns(z.object({
141
+ chainId: schemas.Fr,
142
+ version: schemas.Fr
143
+ })),
144
+ getContractClassMetadata: z.function().args(schemas.Fr, optional(z.boolean())).returns(ContractClassMetadataSchema),
145
+ getContractMetadata: z.function().args(schemas.AztecAddress).returns(ContractMetadataSchema),
146
+ getTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema),
147
+ getPrivateEvents: z.function().args(schemas.AztecAddress, EventMetadataDefinitionSchema, z.number(), z.number(), z.array(schemas.AztecAddress)).returns(z.array(AbiDecodedSchema)),
148
+ registerSender: z.function().args(schemas.AztecAddress, optional(z.string())).returns(schemas.AztecAddress),
149
+ getAddressBook: z.function().args().returns(z.array(z.object({
150
+ alias: z.string(),
151
+ item: schemas.AztecAddress
152
+ }))),
153
+ getAccounts: z.function().args().returns(z.array(z.object({
154
+ alias: z.string(),
155
+ item: schemas.AztecAddress
156
+ }))),
157
+ registerContract: z.function().args(ContractInstanceWithAddressSchema, optional(ContractArtifactSchema), optional(schemas.Fr)).returns(ContractInstanceWithAddressSchema),
158
+ simulateTx: z.function().args(ExecutionPayloadSchema, SimulateOptionsSchema).returns(TxSimulationResult.schema),
159
+ simulateUtility: z.function().args(FunctionCallSchema, optional(z.array(AuthWitness.schema))).returns(UtilitySimulationResult.schema),
160
+ profileTx: z.function().args(ExecutionPayloadSchema, ProfileOptionsSchema).returns(TxProfileResult.schema),
161
+ sendTx: z.function().args(ExecutionPayloadSchema, SendOptionsSchema).returns(TxHash.schema),
162
+ createAuthWit: z.function().args(schemas.AztecAddress, MessageHashOrIntentSchema).returns(AuthWitness.schema),
163
+ // @ts-expect-error - ApiSchemaFor cannot properly type generic methods with readonly arrays
164
+ batch: z.function().args(z.array(BatchedMethodSchema)).returns(z.array(z.discriminatedUnion('name', [
165
+ z.object({
166
+ name: z.literal('registerSender'),
167
+ result: schemas.AztecAddress
168
+ }),
169
+ z.object({
170
+ name: z.literal('registerContract'),
171
+ result: ContractInstanceWithAddressSchema
172
+ }),
173
+ z.object({
174
+ name: z.literal('sendTx'),
175
+ result: TxHash.schema
176
+ }),
177
+ z.object({
178
+ name: z.literal('simulateUtility'),
179
+ result: UtilitySimulationResult.schema
180
+ }),
181
+ z.object({
182
+ name: z.literal('simulateTx'),
183
+ result: TxSimulationResult.schema
184
+ })
185
+ ])))
186
+ };
package/package.json CHANGED
@@ -1,28 +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": "0.0.0-test.1",
4
+ "version": "0.0.1-commit.5476d83",
5
5
  "type": "module",
6
6
  "exports": {
7
- ".": "./dest/index.js",
8
- "./interfaces/pxe": "./dest/api/interfaces/pxe.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",
13
- "./contracts": "./dest/contract/index.js",
10
+ "./authorization": "./dest/api/authorization.js",
11
+ "./block": "./dest/api/block.js",
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
- "./ethereum": "./dest/api/ethereum/index.js",
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/rpc_clients/index.js",
23
- "./tx_hash": "./dest/api/tx_hash.js",
24
- "./wallet": "./dest/api/wallet.js",
25
- "./utils": "./dest/utils/index.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",
28
+ "./utils": "./dest/api/utils.js",
29
+ "./wallet": "./dest/api/wallet.js"
26
30
  },
27
31
  "typedocOptions": {
28
32
  "entryPoints": [
@@ -32,12 +36,10 @@
32
36
  "tsconfig": "./tsconfig.json"
33
37
  },
34
38
  "scripts": {
35
- "build": "yarn clean && tsc -b",
36
- "build:dev": "tsc -b --watch",
37
- "build:ts": "tsc -b",
39
+ "build": "yarn clean && tsgo -b",
40
+ "build:dev": "tsgo -b --watch",
41
+ "build:ts": "tsgo -b",
38
42
  "clean": "rm -rf ./dest .tsbuildinfo ./src/account_contract/artifacts",
39
- "formatting": "run -T prettier --check ./src && run -T eslint ./src",
40
- "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src",
41
43
  "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
42
44
  },
43
45
  "inherits": [
@@ -75,33 +77,40 @@
75
77
  "testTimeout": 120000,
76
78
  "setupFiles": [
77
79
  "../../foundation/src/jest/setup.mjs"
80
+ ],
81
+ "testEnvironment": "../../foundation/src/jest/env.mjs",
82
+ "setupFilesAfterEnv": [
83
+ "../../foundation/src/jest/setupAfterEnv.mjs"
78
84
  ]
79
85
  },
80
86
  "dependencies": {
81
- "@aztec/constants": "0.0.0-test.1",
82
- "@aztec/ethereum": "0.0.0-test.1",
83
- "@aztec/foundation": "0.0.0-test.1",
84
- "@aztec/l1-artifacts": "0.0.0-test.1",
85
- "@aztec/protocol-contracts": "0.0.0-test.1",
86
- "@aztec/stdlib": "0.0.0-test.1",
87
- "axios": "^1.7.2",
87
+ "@aztec/constants": "0.0.1-commit.5476d83",
88
+ "@aztec/entrypoints": "0.0.1-commit.5476d83",
89
+ "@aztec/ethereum": "0.0.1-commit.5476d83",
90
+ "@aztec/foundation": "0.0.1-commit.5476d83",
91
+ "@aztec/l1-artifacts": "0.0.1-commit.5476d83",
92
+ "@aztec/protocol-contracts": "0.0.1-commit.5476d83",
93
+ "@aztec/stdlib": "0.0.1-commit.5476d83",
94
+ "axios": "^1.12.0",
88
95
  "tslib": "^2.4.0",
89
- "viem": "2.22.8"
96
+ "viem": "npm:@aztec/viem@2.38.2",
97
+ "zod": "^3.23.8"
90
98
  },
91
99
  "devDependencies": {
92
- "@jest/globals": "^29.5.0",
93
- "@types/jest": "^29.5.0",
94
- "@types/node": "^18.7.23",
100
+ "@jest/globals": "^30.0.0",
101
+ "@types/jest": "^30.0.0",
102
+ "@types/node": "^22.15.17",
103
+ "@typescript/native-preview": "7.0.0-dev.20251126.1",
95
104
  "buffer": "^6.0.3",
96
- "crypto-browserify": "^3.12.0",
97
- "jest": "^29.5.0",
98
- "jest-mock-extended": "^3.0.3",
105
+ "crypto-browserify": "^3.12.1",
106
+ "jest": "^30.0.0",
107
+ "jest-mock-extended": "^4.0.0",
99
108
  "process": "^0.11.10",
100
109
  "resolve-typescript-plugin": "^2.0.1",
101
110
  "stream-browserify": "^3.0.0",
102
- "ts-loader": "^9.4.4",
111
+ "ts-loader": "^9.5.4",
103
112
  "ts-node": "^10.9.1",
104
- "typescript": "^5.0.4",
113
+ "typescript": "^5.3.3",
105
114
  "util": "^0.12.5"
106
115
  },
107
116
  "files": [
@@ -111,6 +120,6 @@
111
120
  ],
112
121
  "types": "./dest/index.d.ts",
113
122
  "engines": {
114
- "node": ">=18"
123
+ "node": ">=20.10"
115
124
  }
116
125
  }
@@ -0,0 +1,96 @@
1
+ import type { DefaultAccountEntrypointOptions } from '@aztec/entrypoints/account';
2
+ import { Fr } from '@aztec/foundation/fields';
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,12 +1,12 @@
1
+ import type { AuthWitnessProvider, ChainInfo } from '@aztec/entrypoints/interfaces';
1
2
  import { Fr } from '@aztec/foundation/fields';
2
3
  import type { ContractArtifact } from '@aztec/stdlib/abi';
3
- import type { CompleteAddress, NodeInfo } from '@aztec/stdlib/contract';
4
- import { getContractInstanceFromDeployParams } from '@aztec/stdlib/contract';
4
+ import type { CompleteAddress } from '@aztec/stdlib/contract';
5
+ import { getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract';
5
6
  import { deriveKeys } from '@aztec/stdlib/keys';
6
7
 
7
- import type { AccountInterface, AuthWitnessProvider } from './interface.js';
8
+ import type { AccountInterface } from './interface.js';
8
9
 
9
- // docs:start:account-contract-interface
10
10
  /**
11
11
  * An account contract instance. Knows its artifact, deployment arguments, how to create
12
12
  * transaction execution requests out of function calls, and how to authorize actions.
@@ -18,19 +18,27 @@ export interface AccountContract {
18
18
  getContractArtifact(): Promise<ContractArtifact>;
19
19
 
20
20
  /**
21
- * Returns the deployment arguments for this instance, or undefined if this contract does not require deployment.
21
+ * Returns the initializer function name and arguments for this instance, or undefined if this contract does not require initialization.
22
22
  */
23
- getDeploymentArgs(): Promise<any[] | undefined>;
23
+ getInitializationFunctionAndArgs(): Promise<
24
+ | {
25
+ /** The name of the function used to initialize the contract */
26
+ constructorName: string;
27
+ /** The args to the function used to initialize the contract */
28
+ constructorArgs: any[];
29
+ }
30
+ | undefined
31
+ >;
24
32
 
25
33
  /**
26
- * Returns the account interface for this account contract given a deployment at the provided address.
34
+ * Returns the account interface for this account contract given an instance at the provided address.
27
35
  * The account interface is responsible for assembling tx requests given requested function calls, and
28
36
  * for creating signed auth witnesses given action identifiers (message hashes).
29
- * @param address - Address where this account contract is deployed.
30
- * @param nodeInfo - Info on the chain where it is deployed.
37
+ * @param address - Address of this account contract.
38
+ * @param chainInfo - Chain id and version of the rollup where the account contract is initialized / published.
31
39
  * @returns An account interface instance for creating tx requests and authorizing actions.
32
40
  */
33
- getInterface(address: CompleteAddress, nodeInfo: NodeInfo): AccountInterface;
41
+ getInterface(address: CompleteAddress, chainInfo: ChainInfo): AccountInterface;
34
42
 
35
43
  /**
36
44
  * Returns the auth witness provider for the given address.
@@ -38,16 +46,19 @@ export interface AccountContract {
38
46
  */
39
47
  getAuthWitnessProvider(address: CompleteAddress): AuthWitnessProvider;
40
48
  }
41
- // docs:end:account-contract-interface
42
49
 
43
50
  /**
44
51
  * Compute the address of an account contract from secret and salt.
45
52
  */
46
53
  export async function getAccountContractAddress(accountContract: AccountContract, secret: Fr, salt: Fr) {
47
54
  const { publicKeys } = await deriveKeys(secret);
48
- const constructorArgs = await accountContract.getDeploymentArgs();
55
+ const { constructorName, constructorArgs } = (await accountContract.getInitializationFunctionAndArgs()) ?? {
56
+ constructorName: undefined,
57
+ constructorArgs: undefined,
58
+ };
49
59
  const artifact = await accountContract.getContractArtifact();
50
- const instance = await getContractInstanceFromDeployParams(artifact, {
60
+ const instance = await getContractInstanceFromInstantiationParams(artifact, {
61
+ constructorArtifact: constructorName,
51
62
  constructorArgs,
52
63
  salt,
53
64
  publicKeys,
@@ -1,25 +1,23 @@
1
1
  import type { Fr } from '@aztec/foundation/fields';
2
- import type { PXE } from '@aztec/stdlib/interfaces/client';
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,16 +1,12 @@
1
1
  /**
2
- * The `account` module provides utilities for managing accounts. The {@link AccountManager} class
3
- * allows to deploy and register a fresh account, or to obtain a `Wallet` instance out of an account
4
- * already deployed. 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
6
  import type { Fr } from '@aztec/foundation/fields';
10
7
 
11
- export { type AccountContract, getAccountContractAddress } from './contract.js';
12
- export { type AccountInterface, type AuthWitnessProvider } from './interface.js';
13
- export * from './wallet.js';
8
+ export { type AccountContract, getAccountContractAddress } from './account_contract.js';
9
+ export { type AccountInterface } from './interface.js';
14
10
 
15
11
  /** A contract deployment salt. */
16
12
  export type Salt = Fr | number | bigint;
@@ -1,20 +1,9 @@
1
+ import type { AuthWitnessProvider, EntrypointInterface } from '@aztec/entrypoints/interfaces';
1
2
  import type { Fr } from '@aztec/foundation/fields';
2
- import type { AuthWitness } from '@aztec/stdlib/auth-witness';
3
3
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import type { CompleteAddress } from '@aztec/stdlib/contract';
5
5
 
6
- import type { EntrypointInterface } from '../entrypoint/entrypoint.js';
7
-
8
6
  // docs:start:account-interface
9
- /** Creates authorization witnesses. */
10
- export interface AuthWitnessProvider {
11
- /**
12
- * Computes an authentication witness from either a message hash
13
- * @param messageHash - The message hash to approve
14
- * @returns The authentication witness
15
- */
16
- createAuthWit(messageHash: Fr | Buffer): Promise<AuthWitness>;
17
- }
18
7
 
19
8
  /**
20
9
  * Handler for interfacing with an account. Knows how to create transaction execution
@@ -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/fields';
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
@@ -1,10 +1,36 @@
1
1
  export {
2
2
  type ContractArtifact,
3
3
  type FunctionArtifact,
4
+ type FunctionAbi,
4
5
  EventSelector,
6
+ FunctionType,
5
7
  FunctionSelector,
8
+ FunctionCall,
9
+ NoteSelector,
10
+ type ABIParameter,
11
+ decodeFromAbi,
12
+ encodeArguments,
13
+ type AbiType,
14
+ isAddressStruct,
15
+ isAztecAddressStruct,
16
+ isEthAddressStruct,
17
+ isWrappedFieldStruct,
18
+ isFunctionSelectorStruct,
6
19
  loadContractArtifact,
20
+ loadContractArtifactForPublic,
21
+ getAllFunctionAbis,
7
22
  contractArtifactToBuffer,
8
23
  contractArtifactFromBuffer,
9
24
  } from '@aztec/stdlib/abi';
10
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';