@aztec/stdlib 0.0.1-commit.993d240 → 0.0.1-commit.9a89641

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 (587) hide show
  1. package/dest/abi/abi.d.ts +32 -7
  2. package/dest/abi/abi.d.ts.map +1 -1
  3. package/dest/abi/abi.js +11 -2
  4. package/dest/abi/buffer.d.ts +6 -2
  5. package/dest/abi/buffer.d.ts.map +1 -1
  6. package/dest/abi/buffer.js +13 -1
  7. package/dest/abi/contract_artifact.d.ts +1 -1
  8. package/dest/abi/contract_artifact.d.ts.map +1 -1
  9. package/dest/abi/contract_artifact.js +35 -19
  10. package/dest/abi/decoder.d.ts +12 -5
  11. package/dest/abi/decoder.d.ts.map +1 -1
  12. package/dest/abi/decoder.js +18 -21
  13. package/dest/abi/function_call.d.ts +17 -8
  14. package/dest/abi/function_call.d.ts.map +1 -1
  15. package/dest/abi/function_call.js +28 -9
  16. package/dest/avm/avm.d.ts +212 -211
  17. package/dest/avm/avm.d.ts.map +1 -1
  18. package/dest/avm/avm.js +4 -2
  19. package/dest/avm/index.d.ts +1 -6
  20. package/dest/avm/index.d.ts.map +1 -1
  21. package/dest/avm/index.js +0 -5
  22. package/dest/aztec-address/index.d.ts +35 -5
  23. package/dest/aztec-address/index.d.ts.map +1 -1
  24. package/dest/aztec-address/index.js +32 -8
  25. package/dest/block/attestation_info.d.ts +1 -1
  26. package/dest/block/attestation_info.d.ts.map +1 -1
  27. package/dest/block/attestation_info.js +7 -4
  28. package/dest/block/l2_block_source.d.ts +57 -28
  29. package/dest/block/l2_block_source.d.ts.map +1 -1
  30. package/dest/block/l2_block_source.js +20 -2
  31. package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts +39 -0
  32. package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts.map +1 -0
  33. package/dest/block/l2_block_stream/event_driven_l2_block_stream.js +165 -0
  34. package/dest/block/l2_block_stream/index.d.ts +2 -1
  35. package/dest/block/l2_block_stream/index.d.ts.map +1 -1
  36. package/dest/block/l2_block_stream/index.js +1 -0
  37. package/dest/block/l2_block_stream/interfaces.d.ts +83 -11
  38. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  39. package/dest/block/l2_block_stream/interfaces.js +25 -1
  40. package/dest/block/l2_block_stream/l2_block_stream.d.ts +24 -15
  41. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  42. package/dest/block/l2_block_stream/l2_block_stream.js +175 -151
  43. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +6 -12
  44. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  45. package/dest/block/l2_block_stream/l2_tips_memory_store.js +8 -32
  46. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +17 -18
  47. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
  48. package/dest/block/l2_block_stream/l2_tips_store_base.js +70 -58
  49. package/dest/block/proposal/attestations_and_signers.d.ts +19 -1
  50. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
  51. package/dest/block/proposal/attestations_and_signers.js +47 -7
  52. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  53. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  54. package/dest/block/test/l2_tips_store_test_suite.js +301 -37
  55. package/dest/block/validate_block_result.d.ts +16 -1
  56. package/dest/block/validate_block_result.d.ts.map +1 -1
  57. package/dest/block/validate_block_result.js +18 -3
  58. package/dest/checkpoint/checkpoint.js +2 -2
  59. package/dest/checkpoint/index.d.ts +2 -1
  60. package/dest/checkpoint/index.d.ts.map +1 -1
  61. package/dest/checkpoint/index.js +1 -0
  62. package/dest/checkpoint/simulation_overrides.d.ts +61 -0
  63. package/dest/checkpoint/simulation_overrides.d.ts.map +1 -0
  64. package/dest/checkpoint/simulation_overrides.js +98 -0
  65. package/dest/checkpoint/validate.d.ts +11 -3
  66. package/dest/checkpoint/validate.d.ts.map +1 -1
  67. package/dest/checkpoint/validate.js +9 -6
  68. package/dest/config/index.d.ts +2 -2
  69. package/dest/config/index.d.ts.map +1 -1
  70. package/dest/config/index.js +1 -1
  71. package/dest/config/network-consensus-config.d.ts +72 -0
  72. package/dest/config/network-consensus-config.d.ts.map +1 -0
  73. package/dest/config/network-consensus-config.js +223 -0
  74. package/dest/config/node-rpc-config.d.ts +1 -1
  75. package/dest/config/node-rpc-config.d.ts.map +1 -1
  76. package/dest/config/node-rpc-config.js +1 -1
  77. package/dest/config/sequencer-config.d.ts +4 -2
  78. package/dest/config/sequencer-config.d.ts.map +1 -1
  79. package/dest/config/sequencer-config.js +22 -3
  80. package/dest/contract/artifact_hash.d.ts +2 -2
  81. package/dest/contract/artifact_hash.d.ts.map +1 -1
  82. package/dest/contract/artifact_hash.js +10 -2
  83. package/dest/contract/contract_address.d.ts +5 -4
  84. package/dest/contract/contract_address.d.ts.map +1 -1
  85. package/dest/contract/contract_class.d.ts +1 -1
  86. package/dest/contract/contract_class.d.ts.map +1 -1
  87. package/dest/contract/contract_class.js +3 -2
  88. package/dest/contract/contract_instance.d.ts +16 -2
  89. package/dest/contract/contract_instance.d.ts.map +1 -1
  90. package/dest/contract/contract_instance.js +45 -0
  91. package/dest/contract/index.d.ts +1 -2
  92. package/dest/contract/index.d.ts.map +1 -1
  93. package/dest/contract/index.js +0 -1
  94. package/dest/contract/interfaces/contract_data_source.d.ts +3 -5
  95. package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
  96. package/dest/contract/interfaces/contract_instance.d.ts +71 -10
  97. package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
  98. package/dest/contract/interfaces/contract_instance.js +7 -2
  99. package/dest/contract/interfaces/node-info.d.ts +11 -1
  100. package/dest/contract/interfaces/node-info.d.ts.map +1 -1
  101. package/dest/contract/interfaces/node-info.js +7 -1
  102. package/dest/contract/partial_address.d.ts +9 -3
  103. package/dest/contract/partial_address.d.ts.map +1 -1
  104. package/dest/contract/partial_address.js +8 -2
  105. package/dest/database-version/version_manager.d.ts +18 -4
  106. package/dest/database-version/version_manager.d.ts.map +1 -1
  107. package/dest/database-version/version_manager.js +76 -6
  108. package/dest/deserialization/index.d.ts +35 -3
  109. package/dest/deserialization/index.d.ts.map +1 -1
  110. package/dest/deserialization/index.js +32 -1
  111. package/dest/file-store/factory.d.ts +1 -1
  112. package/dest/file-store/factory.d.ts.map +1 -1
  113. package/dest/file-store/factory.js +7 -0
  114. package/dest/file-store/index.d.ts +2 -1
  115. package/dest/file-store/index.d.ts.map +1 -1
  116. package/dest/file-store/index.js +1 -0
  117. package/dest/file-store/memory.d.ts +24 -0
  118. package/dest/file-store/memory.d.ts.map +1 -0
  119. package/dest/file-store/memory.js +80 -0
  120. package/dest/gas/gas_settings.d.ts +7 -13
  121. package/dest/gas/gas_settings.d.ts.map +1 -1
  122. package/dest/gas/gas_settings.js +9 -16
  123. package/dest/gas/index.d.ts +2 -1
  124. package/dest/gas/index.d.ts.map +1 -1
  125. package/dest/gas/index.js +1 -0
  126. package/dest/gas/tx_gas_limits.d.ts +72 -0
  127. package/dest/gas/tx_gas_limits.d.ts.map +1 -0
  128. package/dest/gas/tx_gas_limits.js +85 -0
  129. package/dest/ha-signing/config.d.ts +19 -5
  130. package/dest/ha-signing/config.d.ts.map +1 -1
  131. package/dest/ha-signing/config.js +9 -3
  132. package/dest/ha-signing/local_config.d.ts +10 -2
  133. package/dest/ha-signing/local_config.d.ts.map +1 -1
  134. package/dest/ha-signing/local_config.js +8 -2
  135. package/dest/hash/hash.d.ts +1 -2
  136. package/dest/hash/hash.d.ts.map +1 -1
  137. package/dest/hash/hash.js +0 -7
  138. package/dest/interfaces/api_limit.d.ts +6 -1
  139. package/dest/interfaces/api_limit.d.ts.map +1 -1
  140. package/dest/interfaces/api_limit.js +3 -0
  141. package/dest/interfaces/archiver.d.ts +12 -7
  142. package/dest/interfaces/archiver.d.ts.map +1 -1
  143. package/dest/interfaces/archiver.js +13 -6
  144. package/dest/interfaces/aztec-node-admin.d.ts +25 -17
  145. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  146. package/dest/interfaces/aztec-node-admin.js +1 -1
  147. package/dest/interfaces/aztec-node-debug.d.ts +40 -2
  148. package/dest/interfaces/aztec-node-debug.d.ts.map +1 -1
  149. package/dest/interfaces/aztec-node-debug.js +29 -1
  150. package/dest/interfaces/aztec-node.d.ts +100 -33
  151. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  152. package/dest/interfaces/aztec-node.js +72 -23
  153. package/dest/interfaces/block-builder.d.ts +9 -2
  154. package/dest/interfaces/block-builder.d.ts.map +1 -1
  155. package/dest/interfaces/block_response.d.ts +5 -5
  156. package/dest/interfaces/block_response.d.ts.map +1 -1
  157. package/dest/interfaces/chain_tips.d.ts +8 -47
  158. package/dest/interfaces/chain_tips.d.ts.map +1 -1
  159. package/dest/interfaces/chain_tips.js +1 -6
  160. package/dest/interfaces/checkpoint_parameter.d.ts +3 -3
  161. package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -1
  162. package/dest/interfaces/checkpoint_parameter.js +3 -3
  163. package/dest/interfaces/checkpoint_response.d.ts +5 -5
  164. package/dest/interfaces/checkpoint_response.d.ts.map +1 -1
  165. package/dest/interfaces/client.d.ts +2 -1
  166. package/dest/interfaces/client.d.ts.map +1 -1
  167. package/dest/interfaces/configs.d.ts +33 -6
  168. package/dest/interfaces/configs.d.ts.map +1 -1
  169. package/dest/interfaces/configs.js +6 -1
  170. package/dest/interfaces/get_tx_by_hash_options.d.ts +9 -0
  171. package/dest/interfaces/get_tx_by_hash_options.d.ts.map +1 -0
  172. package/dest/interfaces/get_tx_by_hash_options.js +4 -0
  173. package/dest/interfaces/merkle_tree_operations.d.ts +8 -3
  174. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  175. package/dest/interfaces/p2p.d.ts +38 -9
  176. package/dest/interfaces/p2p.d.ts.map +1 -1
  177. package/dest/interfaces/p2p.js +14 -2
  178. package/dest/interfaces/private_kernel_prover.d.ts +71 -12
  179. package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
  180. package/dest/interfaces/prover-client.d.ts +2 -3
  181. package/dest/interfaces/prover-client.d.ts.map +1 -1
  182. package/dest/interfaces/prover-node.d.ts +12 -8
  183. package/dest/interfaces/prover-node.d.ts.map +1 -1
  184. package/dest/interfaces/prover-node.js +24 -17
  185. package/dest/interfaces/proving-job.d.ts +17 -4
  186. package/dest/interfaces/proving-job.d.ts.map +1 -1
  187. package/dest/interfaces/proving-job.js +13 -4
  188. package/dest/interfaces/server.d.ts +1 -3
  189. package/dest/interfaces/server.d.ts.map +1 -1
  190. package/dest/interfaces/server.js +0 -2
  191. package/dest/interfaces/server_circuit_prover.d.ts +3 -3
  192. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  193. package/dest/interfaces/tx_provider.d.ts +5 -1
  194. package/dest/interfaces/tx_provider.d.ts.map +1 -1
  195. package/dest/interfaces/validator.d.ts +15 -4
  196. package/dest/interfaces/validator.d.ts.map +1 -1
  197. package/dest/interfaces/validator.js +3 -1
  198. package/dest/interfaces/world_state.d.ts +14 -1
  199. package/dest/interfaces/world_state.d.ts.map +1 -1
  200. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts +8 -2
  201. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts.map +1 -1
  202. package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +12 -74
  203. package/dest/kernel/hints/index.d.ts +1 -2
  204. package/dest/kernel/hints/index.d.ts.map +1 -1
  205. package/dest/kernel/hints/index.js +0 -1
  206. package/dest/kernel/hints/read_request.js +1 -1
  207. package/dest/kernel/index.d.ts +6 -2
  208. package/dest/kernel/index.d.ts.map +1 -1
  209. package/dest/kernel/index.js +5 -1
  210. package/dest/kernel/log_hash.d.ts +1 -1
  211. package/dest/kernel/log_hash.d.ts.map +1 -1
  212. package/dest/kernel/log_hash.js +2 -2
  213. package/dest/kernel/note_hash.js +1 -1
  214. package/dest/kernel/nullifier.js +1 -1
  215. package/dest/kernel/private_circuit_public_inputs.d.ts +13 -3
  216. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  217. package/dest/kernel/private_circuit_public_inputs.js +14 -7
  218. package/dest/kernel/private_context_inputs.d.ts +4 -3
  219. package/dest/kernel/private_context_inputs.d.ts.map +1 -1
  220. package/dest/kernel/private_context_inputs.js +7 -3
  221. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +7 -9
  222. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  223. package/dest/kernel/private_kernel_circuit_public_inputs.js +10 -7
  224. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts +2 -3
  225. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts.map +1 -1
  226. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.js +3 -5
  227. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts +2 -3
  228. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts.map +1 -1
  229. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.js +3 -5
  230. package/dest/kernel/private_kernel_init_4_circuit_private_inputs.d.ts +24 -0
  231. package/dest/kernel/private_kernel_init_4_circuit_private_inputs.d.ts.map +1 -0
  232. package/dest/kernel/private_kernel_init_4_circuit_private_inputs.js +37 -0
  233. package/dest/kernel/private_kernel_init_5_circuit_private_inputs.d.ts +25 -0
  234. package/dest/kernel/private_kernel_init_5_circuit_private_inputs.d.ts.map +1 -0
  235. package/dest/kernel/private_kernel_init_5_circuit_private_inputs.js +39 -0
  236. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +1 -9
  237. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  238. package/dest/kernel/private_kernel_init_circuit_private_inputs.js +2 -6
  239. package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.d.ts +18 -0
  240. package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.d.ts.map +1 -0
  241. package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.js +27 -0
  242. package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.d.ts +19 -0
  243. package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.d.ts.map +1 -0
  244. package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.js +29 -0
  245. package/dest/kernel/private_kernel_prover_output.d.ts +4 -1
  246. package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
  247. package/dest/kernel/private_kernel_prover_output.js +4 -1
  248. package/dest/kernel/private_kernel_reset_dimensions.d.ts +7 -8
  249. package/dest/kernel/private_kernel_reset_dimensions.d.ts.map +1 -1
  250. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts +29 -0
  251. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts.map +1 -0
  252. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.js +36 -0
  253. package/dest/kernel/private_kernel_simulated_output.d.ts +1 -7
  254. package/dest/kernel/private_kernel_simulated_output.d.ts.map +1 -1
  255. package/dest/kernel/private_kernel_simulated_output.js +2 -1
  256. package/dest/kernel/private_log_data.d.ts +1 -1
  257. package/dest/kernel/private_log_data.d.ts.map +1 -1
  258. package/dest/kernel/private_log_data.js +1 -1
  259. package/dest/kernel/utils/index.d.ts +1 -2
  260. package/dest/kernel/utils/index.d.ts.map +1 -1
  261. package/dest/kernel/utils/index.js +0 -1
  262. package/dest/keys/derivation.d.ts +41 -6
  263. package/dest/keys/derivation.d.ts.map +1 -1
  264. package/dest/keys/derivation.js +49 -26
  265. package/dest/logs/app_tagging_secret.d.ts +30 -7
  266. package/dest/logs/app_tagging_secret.d.ts.map +1 -1
  267. package/dest/logs/app_tagging_secret.js +46 -39
  268. package/dest/logs/app_tagging_secret_kind.d.ts +2 -1
  269. package/dest/logs/app_tagging_secret_kind.d.ts.map +1 -1
  270. package/dest/logs/app_tagging_secret_kind.js +13 -0
  271. package/dest/logs/contract_class_log.d.ts +1 -2
  272. package/dest/logs/contract_class_log.d.ts.map +1 -1
  273. package/dest/logs/contract_class_log.js +0 -4
  274. package/dest/logs/log_result.d.ts +3 -3
  275. package/dest/logs/log_result.d.ts.map +1 -1
  276. package/dest/logs/logs_query.d.ts +2 -2
  277. package/dest/logs/message_context.d.ts +4 -13
  278. package/dest/logs/message_context.d.ts.map +1 -1
  279. package/dest/logs/message_context.js +1 -62
  280. package/dest/logs/pending_tagged_log.d.ts +6 -8
  281. package/dest/logs/pending_tagged_log.d.ts.map +1 -1
  282. package/dest/logs/pending_tagged_log.js +1 -31
  283. package/dest/logs/shared_secret_derivation.d.ts +29 -6
  284. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  285. package/dest/logs/shared_secret_derivation.js +44 -11
  286. package/dest/messaging/l1_to_l2_message.d.ts +23 -2
  287. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  288. package/dest/messaging/l1_to_l2_message.js +36 -11
  289. package/dest/messaging/l2_to_l1_membership.d.ts +11 -4
  290. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  291. package/dest/messaging/l2_to_l1_membership.js +22 -7
  292. package/dest/noir/index.d.ts +3 -3
  293. package/dest/noir/index.d.ts.map +1 -1
  294. package/dest/p2p/attestation_utils.d.ts +1 -1
  295. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  296. package/dest/p2p/attestation_utils.js +8 -1
  297. package/dest/p2p/checkpoint_attestation.d.ts +10 -1
  298. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
  299. package/dest/p2p/checkpoint_attestation.js +10 -0
  300. package/dest/p2p/checkpoint_proposal.d.ts +2 -1
  301. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
  302. package/dest/p2p/consensus_payload.d.ts +2 -1
  303. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  304. package/dest/p2p/index.d.ts +1 -2
  305. package/dest/p2p/index.d.ts.map +1 -1
  306. package/dest/p2p/index.js +0 -1
  307. package/dest/p2p/signature_utils.d.ts +10 -1
  308. package/dest/p2p/signature_utils.d.ts.map +1 -1
  309. package/dest/p2p/signature_utils.js +9 -1
  310. package/dest/rollup/avm_proof_data.d.ts +3 -3
  311. package/dest/rollup/avm_proof_data.d.ts.map +1 -1
  312. package/dest/rollup/checkpoint_header.d.ts +8 -3
  313. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  314. package/dest/rollup/checkpoint_header.js +20 -10
  315. package/dest/stats/stats.d.ts +2 -2
  316. package/dest/stats/stats.d.ts.map +1 -1
  317. package/dest/tests/factories.d.ts +1 -27
  318. package/dest/tests/factories.d.ts.map +1 -1
  319. package/dest/tests/factories.js +10 -45
  320. package/dest/tests/mocks.d.ts +1 -1
  321. package/dest/tests/mocks.d.ts.map +1 -1
  322. package/dest/tests/mocks.js +3 -2
  323. package/dest/timetable/budgets.d.ts +57 -0
  324. package/dest/timetable/budgets.d.ts.map +1 -0
  325. package/dest/timetable/budgets.js +56 -0
  326. package/dest/timetable/build_proposer_timetable.d.ts +21 -0
  327. package/dest/timetable/build_proposer_timetable.d.ts.map +1 -0
  328. package/dest/timetable/build_proposer_timetable.js +17 -0
  329. package/dest/timetable/consensus_timetable.d.ts +70 -0
  330. package/dest/timetable/consensus_timetable.d.ts.map +1 -0
  331. package/dest/timetable/consensus_timetable.js +89 -0
  332. package/dest/timetable/index.d.ts +5 -87
  333. package/dest/timetable/index.d.ts.map +1 -1
  334. package/dest/timetable/index.js +4 -243
  335. package/dest/timetable/proposer_timetable.d.ts +106 -0
  336. package/dest/timetable/proposer_timetable.d.ts.map +1 -0
  337. package/dest/timetable/proposer_timetable.js +132 -0
  338. package/dest/trees/nullifier_membership_witness.d.ts +5 -8
  339. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  340. package/dest/trees/nullifier_membership_witness.js +0 -9
  341. package/dest/trees/public_data_witness.d.ts +7 -17
  342. package/dest/trees/public_data_witness.d.ts.map +1 -1
  343. package/dest/trees/public_data_witness.js +0 -27
  344. package/dest/tx/execution_payload.d.ts +1 -1
  345. package/dest/tx/execution_payload.d.ts.map +1 -1
  346. package/dest/tx/execution_payload.js +1 -1
  347. package/dest/tx/fee_provider.d.ts +2 -2
  348. package/dest/tx/fee_provider.d.ts.map +1 -1
  349. package/dest/tx/global_variable_builder.d.ts +2 -12
  350. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  351. package/dest/tx/global_variables.js +2 -2
  352. package/dest/tx/hashed_values.d.ts +7 -1
  353. package/dest/tx/hashed_values.d.ts.map +1 -1
  354. package/dest/tx/hashed_values.js +9 -1
  355. package/dest/tx/index.d.ts +1 -2
  356. package/dest/tx/index.d.ts.map +1 -1
  357. package/dest/tx/index.js +0 -1
  358. package/dest/tx/indexed_tx_effect.d.ts +5 -2
  359. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  360. package/dest/tx/indexed_tx_effect.js +8 -4
  361. package/dest/tx/offchain_effect.js +1 -1
  362. package/dest/tx/private_tx_constant_data.d.ts +18 -2
  363. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  364. package/dest/tx/private_tx_constant_data.js +13 -4
  365. package/dest/tx/profiling.d.ts +1 -1
  366. package/dest/tx/profiling.d.ts.map +1 -1
  367. package/dest/tx/profiling.js +2 -0
  368. package/dest/tx/simulated_tx.d.ts +10 -6
  369. package/dest/tx/simulated_tx.d.ts.map +1 -1
  370. package/dest/tx/simulated_tx.js +7 -2
  371. package/dest/tx/tx.d.ts +23 -1
  372. package/dest/tx/tx.d.ts.map +1 -1
  373. package/dest/tx/tx.js +32 -3
  374. package/dest/tx/tx_receipt.d.ts +143 -60
  375. package/dest/tx/tx_receipt.d.ts.map +1 -1
  376. package/dest/tx/tx_receipt.js +141 -45
  377. package/dest/tx/validator/error_texts.d.ts +2 -2
  378. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  379. package/dest/tx/validator/error_texts.js +1 -1
  380. package/dest/validators/errors.d.ts +16 -1
  381. package/dest/validators/errors.d.ts.map +1 -1
  382. package/dest/validators/errors.js +12 -0
  383. package/dest/world-state/genesis_data.d.ts +9 -1
  384. package/dest/world-state/genesis_data.d.ts.map +1 -1
  385. package/dest/world-state/genesis_data.js +1 -0
  386. package/dest/world-state/world_state_revision.d.ts +1 -18
  387. package/dest/world-state/world_state_revision.d.ts.map +1 -1
  388. package/dest/world-state/world_state_revision.js +0 -20
  389. package/package.json +8 -8
  390. package/src/abi/abi.ts +32 -4
  391. package/src/abi/buffer.ts +13 -1
  392. package/src/abi/contract_artifact.ts +40 -16
  393. package/src/abi/decoder.ts +20 -24
  394. package/src/abi/function_call.ts +19 -7
  395. package/src/avm/avm.ts +5 -2
  396. package/src/avm/index.ts +0 -5
  397. package/src/aztec-address/index.ts +36 -6
  398. package/src/block/attestation_info.ts +7 -2
  399. package/src/block/l2_block_source.ts +95 -19
  400. package/src/block/l2_block_stream/event_driven_l2_block_stream.ts +207 -0
  401. package/src/block/l2_block_stream/index.ts +1 -0
  402. package/src/block/l2_block_stream/interfaces.ts +98 -10
  403. package/src/block/l2_block_stream/l2_block_stream.ts +255 -177
  404. package/src/block/l2_block_stream/l2_tips_memory_store.ts +12 -41
  405. package/src/block/l2_block_stream/l2_tips_store_base.ts +84 -93
  406. package/src/block/proposal/attestations_and_signers.ts +53 -7
  407. package/src/block/test/l2_tips_store_test_suite.ts +275 -28
  408. package/src/block/validate_block_result.ts +48 -2
  409. package/src/checkpoint/checkpoint.ts +2 -2
  410. package/src/checkpoint/index.ts +1 -0
  411. package/src/checkpoint/simulation_overrides.ts +171 -0
  412. package/src/checkpoint/validate.ts +16 -6
  413. package/src/config/index.ts +1 -1
  414. package/src/config/network-consensus-config.ts +291 -0
  415. package/src/config/node-rpc-config.ts +2 -1
  416. package/src/config/sequencer-config.ts +36 -5
  417. package/src/contract/artifact_hash.ts +15 -3
  418. package/src/contract/contract_address.ts +4 -3
  419. package/src/contract/contract_class.ts +3 -2
  420. package/src/contract/contract_instance.ts +62 -1
  421. package/src/contract/index.ts +0 -1
  422. package/src/contract/interfaces/contract_data_source.ts +2 -4
  423. package/src/contract/interfaces/contract_instance.ts +26 -8
  424. package/src/contract/interfaces/node-info.ts +11 -0
  425. package/src/contract/partial_address.ts +8 -2
  426. package/src/database-version/version_manager.ts +96 -6
  427. package/src/deserialization/index.ts +35 -2
  428. package/src/file-store/factory.ts +7 -0
  429. package/src/file-store/index.ts +1 -0
  430. package/src/file-store/memory.ts +94 -0
  431. package/src/gas/README.md +199 -35
  432. package/src/gas/gas_settings.ts +11 -21
  433. package/src/gas/index.ts +1 -0
  434. package/src/gas/tx_gas_limits.ts +123 -0
  435. package/src/ha-signing/config.ts +23 -5
  436. package/src/ha-signing/local_config.ts +20 -1
  437. package/src/hash/hash.ts +0 -8
  438. package/src/interfaces/api_limit.ts +5 -0
  439. package/src/interfaces/archiver.ts +22 -9
  440. package/src/interfaces/aztec-node-admin.ts +1 -1
  441. package/src/interfaces/aztec-node-debug.ts +54 -2
  442. package/src/interfaces/aztec-node.ts +175 -49
  443. package/src/interfaces/block-builder.ts +8 -1
  444. package/src/interfaces/block_response.ts +4 -4
  445. package/src/interfaces/chain_tips.ts +8 -16
  446. package/src/interfaces/checkpoint_parameter.ts +3 -3
  447. package/src/interfaces/checkpoint_response.ts +4 -4
  448. package/src/interfaces/client.ts +1 -0
  449. package/src/interfaces/configs.ts +33 -6
  450. package/src/interfaces/get_tx_by_hash_options.ts +14 -0
  451. package/src/interfaces/merkle_tree_operations.ts +8 -2
  452. package/src/interfaces/p2p.ts +29 -9
  453. package/src/interfaces/private_kernel_prover.ts +104 -13
  454. package/src/interfaces/prover-client.ts +1 -3
  455. package/src/interfaces/prover-node.ts +32 -17
  456. package/src/interfaces/proving-job.ts +15 -3
  457. package/src/interfaces/server.ts +0 -2
  458. package/src/interfaces/server_circuit_prover.ts +2 -2
  459. package/src/interfaces/tx_provider.ts +4 -0
  460. package/src/interfaces/validator.ts +11 -0
  461. package/src/interfaces/world_state.ts +14 -0
  462. package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +22 -112
  463. package/src/kernel/hints/index.ts +0 -1
  464. package/src/kernel/hints/read_request.ts +1 -1
  465. package/src/kernel/index.ts +5 -1
  466. package/src/kernel/log_hash.ts +5 -2
  467. package/src/kernel/note_hash.ts +1 -1
  468. package/src/kernel/nullifier.ts +1 -1
  469. package/src/kernel/private_circuit_public_inputs.ts +12 -1
  470. package/src/kernel/private_context_inputs.ts +10 -3
  471. package/src/kernel/private_kernel_circuit_public_inputs.ts +9 -7
  472. package/src/kernel/private_kernel_init_2_circuit_private_inputs.ts +0 -3
  473. package/src/kernel/private_kernel_init_3_circuit_private_inputs.ts +0 -3
  474. package/src/kernel/private_kernel_init_4_circuit_private_inputs.ts +52 -0
  475. package/src/kernel/private_kernel_init_5_circuit_private_inputs.ts +55 -0
  476. package/src/kernel/private_kernel_init_circuit_private_inputs.ts +0 -6
  477. package/src/kernel/private_kernel_inner_4_circuit_private_inputs.ts +39 -0
  478. package/src/kernel/private_kernel_inner_5_circuit_private_inputs.ts +42 -0
  479. package/src/kernel/private_kernel_prover_output.ts +4 -0
  480. package/src/kernel/private_kernel_reset_dimensions.ts +16 -6
  481. package/src/kernel/private_kernel_reset_tail_circuit_private_inputs.ts +69 -0
  482. package/src/kernel/private_kernel_simulated_output.ts +0 -7
  483. package/src/kernel/private_log_data.ts +4 -1
  484. package/src/kernel/utils/index.ts +0 -1
  485. package/src/keys/derivation.ts +69 -24
  486. package/src/logs/app_tagging_secret.ts +62 -39
  487. package/src/logs/app_tagging_secret_kind.ts +15 -0
  488. package/src/logs/contract_class_log.ts +0 -9
  489. package/src/logs/log_result.ts +2 -2
  490. package/src/logs/logs_query.ts +2 -2
  491. package/src/logs/message_context.ts +6 -60
  492. package/src/logs/pending_tagged_log.ts +6 -33
  493. package/src/logs/shared_secret_derivation.ts +47 -14
  494. package/src/messaging/l1_to_l2_message.ts +51 -13
  495. package/src/messaging/l2_to_l1_membership.ts +28 -11
  496. package/src/noir/index.ts +2 -1
  497. package/src/p2p/attestation_utils.ts +8 -1
  498. package/src/p2p/checkpoint_attestation.ts +12 -0
  499. package/src/p2p/index.ts +0 -1
  500. package/src/p2p/signature_utils.ts +9 -0
  501. package/src/rollup/avm_proof_data.ts +2 -2
  502. package/src/rollup/checkpoint_header.ts +16 -2
  503. package/src/stats/stats.ts +6 -2
  504. package/src/tests/factories.ts +13 -51
  505. package/src/tests/mocks.ts +7 -2
  506. package/src/timetable/README.md +609 -0
  507. package/src/timetable/budgets.ts +87 -0
  508. package/src/timetable/build_proposer_timetable.ts +42 -0
  509. package/src/timetable/consensus_timetable.ts +126 -0
  510. package/src/timetable/index.ts +4 -361
  511. package/src/timetable/proposer_timetable.ts +190 -0
  512. package/src/timetable/timetable-example.svg +108 -0
  513. package/src/trees/nullifier_membership_witness.ts +0 -11
  514. package/src/trees/public_data_witness.ts +0 -31
  515. package/src/tx/execution_payload.ts +2 -1
  516. package/src/tx/fee_provider.ts +1 -1
  517. package/src/tx/global_variable_builder.ts +1 -17
  518. package/src/tx/global_variables.ts +2 -2
  519. package/src/tx/hashed_values.ts +11 -6
  520. package/src/tx/index.ts +0 -1
  521. package/src/tx/indexed_tx_effect.ts +17 -4
  522. package/src/tx/offchain_effect.ts +1 -1
  523. package/src/tx/private_tx_constant_data.ts +25 -2
  524. package/src/tx/profiling.ts +2 -0
  525. package/src/tx/simulated_tx.ts +13 -2
  526. package/src/tx/tx.ts +46 -3
  527. package/src/tx/tx_receipt.ts +263 -71
  528. package/src/tx/validator/error_texts.ts +2 -1
  529. package/src/validators/errors.ts +17 -0
  530. package/src/world-state/genesis_data.ts +10 -0
  531. package/src/world-state/world_state_revision.ts +0 -33
  532. package/dest/avm/contract_storage_read.d.ts +0 -58
  533. package/dest/avm/contract_storage_read.d.ts.map +0 -1
  534. package/dest/avm/contract_storage_read.js +0 -65
  535. package/dest/avm/contract_storage_update_request.d.ts +0 -65
  536. package/dest/avm/contract_storage_update_request.d.ts.map +0 -1
  537. package/dest/avm/contract_storage_update_request.js +0 -80
  538. package/dest/avm/public_call_stack_item_compressed.d.ts +0 -43
  539. package/dest/avm/public_call_stack_item_compressed.d.ts.map +0 -1
  540. package/dest/avm/public_call_stack_item_compressed.js +0 -70
  541. package/dest/avm/public_data_update_request.d.ts +0 -62
  542. package/dest/avm/public_data_update_request.d.ts.map +0 -1
  543. package/dest/avm/public_data_update_request.js +0 -67
  544. package/dest/avm/public_inner_call_request.d.ts +0 -50
  545. package/dest/avm/public_inner_call_request.d.ts.map +0 -1
  546. package/dest/avm/public_inner_call_request.js +0 -74
  547. package/dest/config/pipelining-config.d.ts +0 -15
  548. package/dest/config/pipelining-config.d.ts.map +0 -1
  549. package/dest/config/pipelining-config.js +0 -18
  550. package/dest/contract/deployment_info.d.ts +0 -24
  551. package/dest/contract/deployment_info.d.ts.map +0 -1
  552. package/dest/contract/deployment_info.js +0 -3
  553. package/dest/interfaces/epoch-prover.d.ts +0 -57
  554. package/dest/interfaces/epoch-prover.d.ts.map +0 -1
  555. package/dest/interfaces/epoch-prover.js +0 -1
  556. package/dest/interfaces/prover-coordination.d.ts +0 -15
  557. package/dest/interfaces/prover-coordination.d.ts.map +0 -1
  558. package/dest/interfaces/prover-coordination.js +0 -1
  559. package/dest/kernel/hints/tree_leaf_read_request.d.ts +0 -14
  560. package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +0 -1
  561. package/dest/kernel/hints/tree_leaf_read_request.js +0 -33
  562. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +0 -47
  563. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +0 -1
  564. package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +0 -38
  565. package/dest/kernel/utils/optional_number.d.ts +0 -31
  566. package/dest/kernel/utils/optional_number.d.ts.map +0 -1
  567. package/dest/kernel/utils/optional_number.js +0 -42
  568. package/dest/p2p/interface.d.ts +0 -5
  569. package/dest/p2p/interface.d.ts.map +0 -1
  570. package/dest/p2p/interface.js +0 -1
  571. package/dest/tx/validator/empty_validator.d.ts +0 -5
  572. package/dest/tx/validator/empty_validator.d.ts.map +0 -1
  573. package/dest/tx/validator/empty_validator.js +0 -7
  574. package/src/avm/contract_storage_read.ts +0 -77
  575. package/src/avm/contract_storage_update_request.ts +0 -93
  576. package/src/avm/public_call_stack_item_compressed.ts +0 -113
  577. package/src/avm/public_data_update_request.ts +0 -106
  578. package/src/avm/public_inner_call_request.ts +0 -85
  579. package/src/config/pipelining-config.ts +0 -31
  580. package/src/contract/deployment_info.ts +0 -25
  581. package/src/interfaces/epoch-prover.ts +0 -72
  582. package/src/interfaces/prover-coordination.ts +0 -17
  583. package/src/kernel/hints/tree_leaf_read_request.ts +0 -35
  584. package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +0 -58
  585. package/src/kernel/utils/optional_number.ts +0 -50
  586. package/src/p2p/interface.ts +0 -4
  587. package/src/tx/validator/empty_validator.ts +0 -7
@@ -26,10 +26,10 @@ import { L1RollupConstantsSchema } from '../epoch-helpers/index.js';
26
26
  import { LogResultSchema } from '../logs/log_result.js';
27
27
  import { PrivateLogsQuerySchema, PublicLogsQuerySchema } from '../logs/logs_query.js';
28
28
  import type { L1ToL2MessageSource } from '../messaging/l1_to_l2_message_source.js';
29
+ import { L2ToL1MembershipWitnessSchema } from '../messaging/l2_to_l1_membership.js';
29
30
  import { optional, schemas } from '../schemas/schemas.js';
30
31
  import { indexedTxSchema } from '../tx/indexed_tx_effect.js';
31
32
  import { TxHash } from '../tx/tx_hash.js';
32
- import { TxReceipt } from '../tx/tx_receipt.js';
33
33
  import type { L2LogsSource } from './l2_logs_source.js';
34
34
 
35
35
  /**
@@ -63,13 +63,18 @@ export type ArchiverSpecificConfig = {
63
63
  /** Skip promoting proposed checkpoints during L1 sync (for testing purposes only) */
64
64
  skipPromoteProposedCheckpointDuringL1Sync?: boolean;
65
65
 
66
+ /** Local tolerance in seconds before pruning an orphan block when no checkpoint proposal was received. */
67
+ orphanPruneNoProposalTolerance?: number;
68
+
69
+ /** Skip pruning orphan proposed blocks that have no matching proposed checkpoint. */
70
+ skipOrphanProposedBlockPruning?: boolean;
71
+
66
72
  /**
67
- * Grace period in seconds, measured from the end of a proposed block's build slot, after which a
68
- * proposed block whose enclosing checkpoint was never proposed is pruned as an orphan. Defaults
69
- * from `blockDurationMs / 1000` at the node wiring layer, falling back to the timetable minimum
70
- * execution time.
73
+ * Preload the standard contracts (AuthRegistry, PublicChecks, HandshakeRegistry) into the contract store at block 0.
74
+ * For test environments only: it must only be set when genesis also seeds the matching registration/deployment
75
+ * nullifiers, otherwise a later on-chain publish of a preloaded class would collide with the block-0 preload.
71
76
  */
72
- orphanProposedBlockPruneGraceSeconds?: number;
77
+ testPreloadStandardContracts?: boolean;
73
78
  };
74
79
 
75
80
  export const ArchiverSpecificConfigSchema = z.object({
@@ -82,7 +87,9 @@ export const ArchiverSpecificConfigSchema = z.object({
82
87
  archiverSkipHistoricalLogsCheck: z.boolean().optional(),
83
88
  skipValidateCheckpointAttestations: z.boolean().optional(),
84
89
  skipPromoteProposedCheckpointDuringL1Sync: z.boolean().optional(),
85
- orphanProposedBlockPruneGraceSeconds: schemas.Integer.optional(),
90
+ orphanPruneNoProposalTolerance: schemas.Integer.optional(),
91
+ skipOrphanProposedBlockPruning: z.boolean().optional(),
92
+ testPreloadStandardContracts: z.boolean().optional(),
86
93
  });
87
94
 
88
95
  export type ArchiverApi = Omit<
@@ -100,7 +107,13 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
100
107
  getCheckpointData: z.function({ input: z.tuple([CheckpointQuerySchema]), output: CheckpointDataSchema.optional() }),
101
108
  getCheckpointsData: z.function({ input: z.tuple([CheckpointsQuerySchema]), output: z.array(CheckpointDataSchema) }),
102
109
  getTxEffect: z.function({ input: z.tuple([TxHash.schema]), output: indexedTxSchema().optional() }),
103
- getSettledTxReceipt: z.function({ input: z.tuple([TxHash.schema]), output: TxReceipt.schema.optional() }),
110
+ // Reads Outbox roots lazily, pinned to the node's synced L1 block. Caveat: cached roots that are
111
+ // sealed and L1-finalized are not re-validated, so a reorg deeper than L1 finality could leave the
112
+ // node serving a witness against a no-longer-canonical root.
113
+ getL2ToL1MembershipWitness: z.function({
114
+ input: z.tuple([TxHash.schema, schemas.Fr, optional(schemas.Integer)]),
115
+ output: L2ToL1MembershipWitnessSchema.optional(),
116
+ }),
104
117
  getSyncedL2SlotNumber: z.function({ input: z.tuple([]), output: schemas.SlotNumber.optional() }),
105
118
  getSyncedL2EpochNumber: z.function({ input: z.tuple([]), output: EpochNumberSchema.optional() }),
106
119
  getBlocksForSlot: z.function({ input: z.tuple([schemas.SlotNumber]), output: z.array(L2Block.schema) }),
@@ -117,7 +130,7 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
117
130
  getContractClass: z.function({ input: z.tuple([schemas.Fr]), output: ContractClassPublicSchema.optional() }),
118
131
  getBytecodeCommitment: z.function({ input: z.tuple([schemas.Fr]), output: schemas.Fr }),
119
132
  getContract: z.function({
120
- input: z.tuple([schemas.AztecAddress, optional(schemas.BigInt)]),
133
+ input: z.tuple([schemas.AztecAddress, schemas.BigInt]),
121
134
  output: ContractInstanceWithAddressSchema.optional(),
122
135
  }),
123
136
  getContractClassIds: z.function({ input: z.tuple([]), output: z.array(schemas.Fr) }),
@@ -133,7 +133,7 @@ export function createAztecNodeAdminClient(
133
133
  apiKey?: string,
134
134
  ): AztecNodeAdmin {
135
135
  return createSafeJsonRpcClient<AztecNodeAdmin>(url, AztecNodeAdminApiSchema, {
136
- namespaceMethods: 'nodeAdmin',
136
+ namespaceMethods: 'aztecAdmin',
137
137
  fetch,
138
138
  onResponse: getVersioningResponseHandler(versions),
139
139
  ...(apiKey ? { extraHeaders: { 'x-api-key': apiKey } } : {}),
@@ -1,10 +1,14 @@
1
+ import { type CheckpointNumber, CheckpointNumberSchema } from '@aztec/foundation/branded-types';
1
2
  import { createSafeJsonRpcClient, defaultFetch } from '@aztec/foundation/json-rpc/client';
2
3
 
3
4
  import { z } from 'zod';
4
5
 
5
- import type { ApiSchemaFor } from '../schemas/schemas.js';
6
+ import { type ApiSchemaFor, optional } from '../schemas/schemas.js';
6
7
  import { type ComponentsVersions, getVersioningResponseHandler } from '../versioning/index.js';
7
8
 
9
+ const MAX_SIGNATURES_PER_REGISTER_CALL = 100;
10
+ const MAX_SIGNATURE_LEN = 10000;
11
+
8
12
  /**
9
13
  * Debug interface for Aztec node available in sandbox/local-network mode.
10
14
  */
@@ -19,10 +23,58 @@ export interface AztecNodeDebug {
19
23
  * @throws If no sequencer is running.
20
24
  */
21
25
  mineBlock(): Promise<void>;
26
+
27
+ /**
28
+ * Synthetically proves the L2 chain up to the given checkpoint (default: the latest checkpointed
29
+ * checkpoint), writing epoch out hashes into the L1 Outbox so L2-to-L1 messages become consumable
30
+ * and advancing the rollup's proven tip. There is no real proof — this is the local-network
31
+ * equivalent of an epoch proof landing on L1. The target is clamped to the latest checkpointed
32
+ * checkpoint and the call no-ops when it is already proven.
33
+ *
34
+ * @param upToCheckpoint - Checkpoint to prove up to; defaults to the latest checkpointed checkpoint.
35
+ * @returns The proven checkpoint number after the call.
36
+ * @throws If no automine sequencer is running (only the automine sequencer supports synthetic proving).
37
+ */
38
+ prove(upToCheckpoint?: CheckpointNumber): Promise<CheckpointNumber>;
39
+
40
+ /**
41
+ * Warps L1 time forward to at least `targetTimestamp` and builds an empty L2 checkpoint at the next slot boundary,
42
+ * advancing the L2 timestamp to at least the target. The warp is serialized with block building, so it never
43
+ * interleaves with an in-flight build. A no-op when `targetTimestamp` is already at or behind the current L1 time.
44
+ *
45
+ * @param targetTimestamp - Target L1 timestamp, in seconds.
46
+ * @throws If no automine sequencer is running (only the automine sequencer supports time warps).
47
+ */
48
+ warpL2TimeAtLeastTo(targetTimestamp: number): Promise<void>;
49
+
50
+ /**
51
+ * Warps L1 time forward by at least `duration` seconds from the current L1 time and builds an empty L2 checkpoint
52
+ * at the next slot boundary. The warp is serialized with block building, so it never interleaves with an in-flight
53
+ * build.
54
+ *
55
+ * @param duration - Number of seconds to advance; must be positive.
56
+ * @throws If no automine sequencer is running, or if `duration` is not positive.
57
+ */
58
+ warpL2TimeAtLeastBy(duration: number): Promise<void>;
59
+
60
+ /**
61
+ * Registers public function signatures so the node can resolve selectors to names in public-execution stack
62
+ * traces. The mapping lives only in unpersisted node memory, is not gossiped, and is exposed here (rather than on
63
+ * the main node API) because it is a debug-only, unauthenticated write that should not be reachable on prod nodes.
64
+ * @param functionSignatures - Decoded `name(paramTypes)` signatures to register by selector.
65
+ */
66
+ registerContractFunctionSignatures(functionSignatures: string[]): Promise<void>;
22
67
  }
23
68
 
24
69
  export const AztecNodeDebugApiSchema: ApiSchemaFor<AztecNodeDebug> = {
25
70
  mineBlock: z.function({ input: z.tuple([]), output: z.void() }),
71
+ prove: z.function({ input: z.tuple([optional(CheckpointNumberSchema)]), output: CheckpointNumberSchema }),
72
+ warpL2TimeAtLeastTo: z.function({ input: z.tuple([z.number()]), output: z.void() }),
73
+ warpL2TimeAtLeastBy: z.function({ input: z.tuple([z.number()]), output: z.void() }),
74
+ registerContractFunctionSignatures: z.function({
75
+ input: z.tuple([z.array(z.string().max(MAX_SIGNATURE_LEN)).max(MAX_SIGNATURES_PER_REGISTER_CALL)]),
76
+ output: z.void(),
77
+ }),
26
78
  };
27
79
 
28
80
  export function createAztecNodeDebugClient(
@@ -32,7 +84,7 @@ export function createAztecNodeDebugClient(
32
84
  apiKey?: string,
33
85
  ): AztecNodeDebug {
34
86
  return createSafeJsonRpcClient<AztecNodeDebug>(url, AztecNodeDebugApiSchema, {
35
- namespaceMethods: 'nodeDebug',
87
+ namespaceMethods: 'aztecDebug',
36
88
  fetch,
37
89
  onResponse: getVersioningResponseHandler(versions),
38
90
  ...(apiKey ? { extraHeaders: { 'x-api-key': apiKey } } : {}),
@@ -7,9 +7,11 @@ import {
7
7
  type CheckpointNumber,
8
8
  CheckpointNumberPositiveSchema,
9
9
  CheckpointNumberSchema,
10
+ type CheckpointProposalHash,
10
11
  type EpochNumber,
11
12
  EpochNumberSchema,
12
13
  type SlotNumber,
14
+ SlotNumberSchema,
13
15
  } from '@aztec/foundation/branded-types';
14
16
  import type { Fr } from '@aztec/foundation/curves/bn254';
15
17
  import type { EthAddress } from '@aztec/foundation/eth-address';
@@ -21,9 +23,15 @@ import { z } from 'zod';
21
23
  import type { AztecAddress } from '../aztec-address/index.js';
22
24
  import { type BlockData, BlockDataSchema } from '../block/block_data.js';
23
25
  import { BlockHash } from '../block/block_hash.js';
24
- import { type BlockParameter, BlockParameterSchema } from '../block/block_parameter.js';
26
+ import { type BlockParameter, BlockParameterSchema, BlockTagWithoutLatestSchema } from '../block/block_parameter.js';
25
27
  import { type DataInBlock, dataInBlockSchemaFor } from '../block/in_block.js';
26
- import { type CheckpointsQuery, CheckpointsQuerySchema } from '../block/l2_block_source.js';
28
+ import {
29
+ type CheckpointsQuery,
30
+ CheckpointsQuerySchema,
31
+ type L2BlockTag,
32
+ type L2Tips,
33
+ L2TipsSchema,
34
+ } from '../block/l2_block_source.js';
27
35
  import { type CheckpointData, CheckpointDataSchema } from '../checkpoint/checkpoint_data.js';
28
36
  import {
29
37
  type ContractClassPublic,
@@ -35,6 +43,7 @@ import {
35
43
  type ProtocolContractAddresses,
36
44
  ProtocolContractAddressesSchema,
37
45
  } from '../contract/index.js';
46
+ import { type L1RollupConstants, L1RollupConstantsSchema } from '../epoch-helpers/index.js';
38
47
  import { ManaUsageEstimate } from '../gas/fee_math.js';
39
48
  import { GasFees } from '../gas/gas_fees.js';
40
49
  import { type LogResult, LogResultSchema } from '../logs/log_result.js';
@@ -44,17 +53,22 @@ import {
44
53
  type PublicLogsQuery,
45
54
  PublicLogsQuerySchema,
46
55
  } from '../logs/logs_query.js';
56
+ import { type L2ToL1MembershipWitness, L2ToL1MembershipWitnessSchema } from '../messaging/l2_to_l1_membership.js';
57
+ import { CheckpointAttestation } from '../p2p/checkpoint_attestation.js';
47
58
  import { type ApiSchemaFor, optional, schemas } from '../schemas/schemas.js';
48
59
  import { MerkleTreeId } from '../trees/merkle_tree_id.js';
49
60
  import { NullifierMembershipWitness } from '../trees/nullifier_membership_witness.js';
50
61
  import { PublicDataWitness } from '../trees/public_data_witness.js';
51
62
  import {
63
+ type GetTxReceiptOptions,
64
+ GetTxReceiptOptionsSchema,
52
65
  type IndexedTxEffect,
53
66
  PublicSimulationOutput,
54
67
  SimulationOverrides,
55
68
  Tx,
56
69
  TxHash,
57
- TxReceipt,
70
+ type TxReceipt,
71
+ TxReceiptSchema,
58
72
  type TxValidationResult,
59
73
  TxValidationResultSchema,
60
74
  indexedTxSchema,
@@ -72,7 +86,7 @@ import {
72
86
  type BlocksIncludeOptions,
73
87
  BlocksIncludeOptionsSchema,
74
88
  } from './block_response.js';
75
- import { type ChainTip, ChainTipSchema, type ChainTips, ChainTipsSchema } from './chain_tips.js';
89
+ import { type CheckpointTag, CheckpointTagSchema } from './chain_tips.js';
76
90
  import { type CheckpointParameter, CheckpointParameterSchema } from './checkpoint_parameter.js';
77
91
  import {
78
92
  type CheckpointIncludeOptions,
@@ -80,8 +94,13 @@ import {
80
94
  type CheckpointResponse,
81
95
  CheckpointResponseSchema,
82
96
  } from './checkpoint_response.js';
97
+ import { type GetTxByHashOptions, GetTxByHashOptionsSchema } from './get_tx_by_hash_options.js';
98
+ import { type PeerInfo, PeerInfoSchema, type ProposalsForSlot, ProposalsForSlotSchema } from './p2p.js';
83
99
  import { type WorldStateSyncStatus, WorldStateSyncStatusSchema } from './world_state.js';
84
100
 
101
+ export type { GetTxByHashOptions } from './get_tx_by_hash_options.js';
102
+ export { GetTxByHashOptionsSchema } from './get_tx_by_hash_options.js';
103
+
85
104
  /**
86
105
  * The aztec node.
87
106
  * We will probably implement the additional interfaces by means other than Aztec Node as it's currently a privacy leak
@@ -186,6 +205,9 @@ export interface AztecNode {
186
205
 
187
206
  /**
188
207
  * Returns all the L2 to L1 messages in an epoch.
208
+ *
209
+ * @deprecated Use {@link getL2ToL1MembershipWitness} to get an L2-to-L1 message witness directly.
210
+ *
189
211
  * @param epoch - The epoch at which to get the data.
190
212
  * @returns A nested array of the L2 to L1 messages in each tx of each block in each checkpoint in the epoch (empty
191
213
  * array if the epoch is not found).
@@ -193,23 +215,59 @@ export interface AztecNode {
193
215
  getL2ToL1Messages(epoch: EpochNumber): Promise<Fr[][][][]>;
194
216
 
195
217
  /**
196
- * Returns the block number at a given chain tip, or the latest proposed block number when
197
- * `tip` is omitted.
218
+ * Returns the L2-to-L1 membership witness for `message` emitted by tx `txHash`. The node selects
219
+ * the smallest partial-proof root on the Outbox that covers the tx's checkpoint and builds the
220
+ * witness against it.
221
+ *
222
+ * The node reads the Outbox roots lazily, pinned to its synced L1 block, so the witness reflects
223
+ * the node's synced view. Returns `undefined` if the tx isn't yet in a block/epoch or no covering
224
+ * root has landed on L1 as of the synced block.
225
+ *
226
+ * Caveat: cached roots that are sealed and L1-finalized are not re-validated. A reorg deeper than
227
+ * L1 finality could leave the node serving a witness against a no-longer-canonical root.
228
+ *
229
+ * @param txHash - The tx whose L2-to-L1 message we want a witness for.
230
+ * @param message - The message hash to prove inclusion of.
231
+ * @param messageIndexInTx - Optional index of the message within the tx's L2-to-L1 messages; pass
232
+ * this when the same message hash appears multiple times in the tx.
198
233
  */
199
- getBlockNumber(tip?: ChainTip): Promise<BlockNumber>;
234
+ getL2ToL1MembershipWitness(
235
+ txHash: TxHash,
236
+ message: Fr,
237
+ messageIndexInTx?: number,
238
+ ): Promise<L2ToL1MembershipWitness | undefined>;
200
239
 
201
240
  /**
202
- * Returns the checkpoint number at a given chain tip, or the latest checkpoint number when
241
+ * Returns the block number at a given block tag, or the latest proposed block number when
203
242
  * `tip` is omitted.
204
- *
205
- * @remarks **Semantic foot-gun**: block-side `'proposed'` means "latest proposed block" (chain
206
- * head), but checkpoint-side `'proposed'` means "latest confirmed checkpoint" — pre-L1-confirm
207
- * checkpoints are not exposed over RPC. `'checkpointed'` on the checkpoint side is equivalent.
208
243
  */
209
- getCheckpointNumber(tip?: ChainTip): Promise<CheckpointNumber>;
244
+ getBlockNumber(tip?: L2BlockTag): Promise<BlockNumber>;
245
+
246
+ /**
247
+ * Returns the checkpoint number at a given checkpoint tag, or the latest checkpointed number when
248
+ * `tip` is omitted. The proposed-but-unconfirmed checkpoint frontier is archiver-internal and not
249
+ * exposed over RPC, so `'proposed'` is not a valid checkpoint tag (see {@link CheckpointTag}).
250
+ */
251
+ getCheckpointNumber(tip?: CheckpointTag): Promise<CheckpointNumber>;
210
252
 
211
253
  /** Returns the tips of the L2 chain. */
212
- getChainTips(): Promise<ChainTips>;
254
+ getChainTips(): Promise<L2Tips>;
255
+
256
+ /** Returns the rollup constants for the current chain. */
257
+ getL1Constants(): Promise<L1RollupConstants>;
258
+
259
+ /**
260
+ * Returns the last L2 slot number for which the node has all L1 data needed to build the next checkpoint.
261
+ */
262
+ getSyncedL2SlotNumber(): Promise<SlotNumber | undefined>;
263
+
264
+ /**
265
+ * Returns the last L2 epoch number that has been fully synchronized from L1.
266
+ */
267
+ getSyncedL2EpochNumber(): Promise<EpochNumber | undefined>;
268
+
269
+ /** Returns the latest L1 timestamp according to the archiver's synced L1 view. */
270
+ getSyncedL1Timestamp(): Promise<bigint | undefined>;
213
271
 
214
272
  /**
215
273
  * Gets lightweight checkpoint metadata for a contiguous range or for an entire epoch.
@@ -288,7 +346,7 @@ export interface AztecNode {
288
346
  * Each entry accounts for the L1 gas oracle transition and congestion growth based on the
289
347
  * given mana usage estimate. Defaults to target usage (steady state).
290
348
  * @param manaUsage - Expected mana usage per checkpoint (none, target, or limit).
291
- * @returns An array of GasFees, one per slot in the prediction window.
349
+ * @returns An array of GasFees with current min fees first, followed by one entry per predicted slot.
292
350
  */
293
351
  getPredictedMinFees(manaUsage?: ManaUsageEstimate): Promise<GasFees[]>;
294
352
 
@@ -327,12 +385,6 @@ export interface AztecNode {
327
385
  */
328
386
  getProtocolContractAddresses(): Promise<ProtocolContractAddresses>;
329
387
 
330
- /**
331
- * Registers contract function signatures for debugging purposes.
332
- * @param functionSignatures - An array of function signatures to register by selector.
333
- */
334
- registerContractFunctionSignatures(functionSignatures: string[]): Promise<void>;
335
-
336
388
  /**
337
389
  * Gets private logs matching the given tags. Returns one inner array per element of `query.tags`, in
338
390
  * input order. An empty inner array means no logs matched that tag. Set `query.includeEffects` to also
@@ -362,27 +414,37 @@ export interface AztecNode {
362
414
  sendTx(tx: Tx): Promise<void>;
363
415
 
364
416
  /**
365
- * Fetches a transaction receipt for a given transaction hash. Returns a mined receipt if it was added
366
- * to the chain, a pending receipt if it's still in the mempool of the connected Aztec node, or a dropped
367
- * receipt if not found in the connected Aztec node.
417
+ * Fetches a transaction receipt for a given transaction hash. Always resolves to one of the lifecycle variants of
418
+ * the {@link TxReceipt} union: a {@link MinedTxReceipt} if the tx was included in a block, a {@link PendingTxReceipt}
419
+ * if it's still in the mempool of the connected Aztec node, or a {@link DroppedTxReceipt} if not found.
368
420
  *
369
421
  * @param txHash - The transaction hash.
422
+ * @param options - Optional flags controlling which extra data is attached: `includeTxEffect` attaches the full
423
+ * {@link TxEffect} to a mined receipt, `includePendingTx` attaches the pending {@link Tx} to a pending receipt, and
424
+ * `includeProof` keeps the proof on that attached pending tx (only meaningful with `includePendingTx`).
370
425
  * @returns A receipt of the transaction.
371
426
  */
372
- getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
427
+ getTxReceipt<TGetTxReceiptOptions extends GetTxReceiptOptions = {}>(
428
+ txHash: TxHash,
429
+ options?: TGetTxReceiptOptions,
430
+ ): Promise<TxReceipt<TGetTxReceiptOptions>>;
373
431
 
374
432
  /**
375
433
  * Gets a tx effect.
376
434
  * @param txHash - The hash of the tx corresponding to the tx effect.
377
435
  * @returns The requested tx effect with block info (or undefined if not found).
436
+ * @deprecated Use `getTxReceipt(txHash, { includeTxEffect: true })` and read the `.txEffect` field instead.
378
437
  */
379
438
  getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
380
439
 
381
440
  /**
382
- * Method to retrieve pending txs.
441
+ * Method to retrieve pending txs. The txs' proofs are stripped unless `includeProof` is set.
442
+ * @param limit - The number of items to return.
443
+ * @param after - The last known pending tx. Used for pagination.
444
+ * @param options - Options for the returned txs (eg whether to include their proofs).
383
445
  * @returns The pending txs.
384
446
  */
385
- getPendingTxs(limit?: number, after?: TxHash): Promise<Tx[]>;
447
+ getPendingTxs(limit?: number, after?: TxHash, options?: GetTxByHashOptions): Promise<Tx[]>;
386
448
 
387
449
  /**
388
450
  * Retrieves the number of pending txs
@@ -391,18 +453,20 @@ export interface AztecNode {
391
453
  getPendingTxCount(): Promise<number>;
392
454
 
393
455
  /**
394
- * Method to retrieve a single pending tx.
456
+ * Method to retrieve a single pending tx. The tx's proof is stripped unless `includeProof` is set.
395
457
  * @param txHash - The transaction hash to return.
458
+ * @param options - Options for the returned tx (eg whether to include its proof).
396
459
  * @returns The pending tx if it exists.
397
460
  */
398
- getTxByHash(txHash: TxHash): Promise<Tx | undefined>;
461
+ getTxByHash(txHash: TxHash, options?: GetTxByHashOptions): Promise<Tx | undefined>;
399
462
 
400
463
  /**
401
- * Method to retrieve multiple pending txs.
464
+ * Method to retrieve multiple pending txs. The txs' proofs are stripped unless `includeProof` is set.
402
465
  * @param txHash - The transaction hashes to return.
466
+ * @param options - Options for the returned txs (eg whether to include their proofs).
403
467
  * @returns The pending txs if exist.
404
468
  */
405
- getTxsByHash(txHashes: TxHash[]): Promise<Tx[]>;
469
+ getTxsByHash(txHashes: TxHash[], options?: GetTxByHashOptions): Promise<Tx[]>;
406
470
 
407
471
  /**
408
472
  * Gets the storage value at the given contract storage slot.
@@ -458,10 +522,18 @@ export interface AztecNode {
458
522
  getContractClass(id: Fr): Promise<ContractClassPublic | undefined>;
459
523
 
460
524
  /**
461
- * Returns a publicly deployed contract instance given its address.
525
+ * Returns a publicly deployed contract instance given its address. Its current class id is resolved as of the given
526
+ * reference block.
527
+ *
528
+ * Returns `undefined` if the instance has not been published (i.e. `publish_for_public_execution` was never called
529
+ * on the `ContractInstanceRegistry`). A contract whose class has been updated will never return `undefined`:
530
+ * scheduling an update requires the contract's deployment nullifier, which is only emitted by publishing, so any
531
+ * updatable contract has necessarily been published.
462
532
  * @param address - Address of the deployed contract.
533
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
534
+ * Defaults to 'latest'.
463
535
  */
464
- getContract(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined>;
536
+ getContract(address: AztecAddress, referenceBlock?: BlockParameter): Promise<ContractInstanceWithAddress | undefined>;
465
537
 
466
538
  /**
467
539
  * Returns the ENR of this node for peer discovery, if available.
@@ -473,10 +545,31 @@ export interface AztecNode {
473
545
  * @returns The list of allowed elements.
474
546
  */
475
547
  getAllowedPublicSetup(): Promise<AllowedElement[]>;
476
- }
477
548
 
478
- const MAX_SIGNATURES_PER_REGISTER_CALL = 100;
479
- const MAX_SIGNATURE_LEN = 10000;
549
+ /**
550
+ * Returns info for all connected, dialing, and cached peers. Only available when P2P is enabled.
551
+ * @param includePending - If true, also include peers in the pending state.
552
+ */
553
+ getPeers(includePending?: boolean): Promise<PeerInfo[]>;
554
+
555
+ /**
556
+ * Queries the attestation pool for checkpoint attestations for the given slot.
557
+ * @param slot - The slot to query.
558
+ * @param proposalPayloadHash - Hex-encoded keccak256 of the target proposal's signed payload hash.
559
+ * When provided, only attestations whose payload hash matches are returned.
560
+ * When omitted, all attestations for the slot are returned.
561
+ */
562
+ getCheckpointAttestationsForSlot(
563
+ slot: SlotNumber,
564
+ proposalPayloadHash?: CheckpointProposalHash,
565
+ ): Promise<CheckpointAttestation[]>;
566
+
567
+ /**
568
+ * Returns block and checkpoint proposals retained in the attestation pool for the given slot.
569
+ * Only available when P2P is enabled.
570
+ */
571
+ getProposalsForSlot(slot: SlotNumber): Promise<ProposalsForSlot>;
572
+ }
480
573
 
481
574
  export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
482
575
  getWorldStateSyncStatus: z.function({ input: z.tuple([]), output: WorldStateSyncStatusSchema }),
@@ -523,11 +616,27 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
523
616
  output: z.array(z.array(z.array(z.array(schemas.Fr)))),
524
617
  }),
525
618
 
526
- getBlockNumber: z.function({ input: z.tuple([optional(ChainTipSchema)]), output: BlockNumberSchema }),
619
+ // Reads Outbox roots lazily, pinned to the node's synced L1 block. Caveat: cached roots that are
620
+ // sealed and L1-finalized are not re-validated, so a reorg deeper than L1 finality could leave the
621
+ // node serving a witness against a no-longer-canonical root.
622
+ getL2ToL1MembershipWitness: z.function({
623
+ input: z.tuple([TxHash.schema, schemas.Fr, optional(schemas.Integer)]),
624
+ output: L2ToL1MembershipWitnessSchema.optional(),
625
+ }),
626
+
627
+ getBlockNumber: z.function({ input: z.tuple([optional(BlockTagWithoutLatestSchema)]), output: BlockNumberSchema }),
628
+
629
+ getCheckpointNumber: z.function({ input: z.tuple([optional(CheckpointTagSchema)]), output: CheckpointNumberSchema }),
630
+
631
+ getChainTips: z.function({ input: z.tuple([]), output: L2TipsSchema }),
527
632
 
528
- getCheckpointNumber: z.function({ input: z.tuple([optional(ChainTipSchema)]), output: CheckpointNumberSchema }),
633
+ getL1Constants: z.function({ input: z.tuple([]), output: L1RollupConstantsSchema }),
529
634
 
530
- getChainTips: z.function({ input: z.tuple([]), output: ChainTipsSchema }),
635
+ getSyncedL2SlotNumber: z.function({ input: z.tuple([]), output: SlotNumberSchema.optional() }),
636
+
637
+ getSyncedL2EpochNumber: z.function({ input: z.tuple([]), output: EpochNumberSchema.optional() }),
638
+
639
+ getSyncedL1Timestamp: z.function({ input: z.tuple([]), output: schemas.BigInt.optional() }),
531
640
 
532
641
  getCheckpointsData: z.function({ input: z.tuple([CheckpointsQuerySchema]), output: z.array(CheckpointDataSchema) }),
533
642
 
@@ -584,11 +693,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
584
693
 
585
694
  getProtocolContractAddresses: z.function({ input: z.tuple([]), output: ProtocolContractAddressesSchema }),
586
695
 
587
- registerContractFunctionSignatures: z.function({
588
- input: z.tuple([z.array(z.string().max(MAX_SIGNATURE_LEN)).max(MAX_SIGNATURES_PER_REGISTER_CALL)]),
589
- output: z.void(),
590
- }),
591
-
592
696
  getPrivateLogsByTags: z.function({
593
697
  input: z.tuple([PrivateLogsQuerySchema]),
594
698
  output: z.array(z.array(LogResultSchema)),
@@ -601,7 +705,10 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
601
705
 
602
706
  sendTx: z.function({ input: z.tuple([Tx.schema]), output: z.void() }),
603
707
 
604
- getTxReceipt: z.function({ input: z.tuple([TxHash.schema]), output: TxReceipt.schema }),
708
+ getTxReceipt: z.function({
709
+ input: z.tuple([TxHash.schema, optional(GetTxReceiptOptionsSchema)]),
710
+ output: TxReceiptSchema,
711
+ }),
605
712
 
606
713
  getTxEffect: z.function({ input: z.tuple([TxHash.schema]), output: indexedTxSchema().optional() }),
607
714
 
@@ -609,16 +716,20 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
609
716
  input: z.tuple([
610
717
  optional(z.number().gte(1).lte(MAX_RPC_TXS_LEN).default(MAX_RPC_TXS_LEN)),
611
718
  optional(TxHash.schema),
719
+ optional(GetTxByHashOptionsSchema),
612
720
  ]),
613
721
  output: z.array(Tx.schema),
614
722
  }),
615
723
 
616
724
  getPendingTxCount: z.function({ input: z.tuple([]), output: z.number() }),
617
725
 
618
- getTxByHash: z.function({ input: z.tuple([TxHash.schema]), output: Tx.schema.optional() }),
726
+ getTxByHash: z.function({
727
+ input: z.tuple([TxHash.schema, optional(GetTxByHashOptionsSchema)]),
728
+ output: Tx.schema.optional(),
729
+ }),
619
730
 
620
731
  getTxsByHash: z.function({
621
- input: z.tuple([z.array(TxHash.schema).max(MAX_RPC_TXS_LEN)]),
732
+ input: z.tuple([z.array(TxHash.schema).max(MAX_RPC_TXS_LEN), optional(GetTxByHashOptionsSchema)]),
622
733
  output: z.array(Tx.schema),
623
734
  }),
624
735
 
@@ -655,13 +766,28 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
655
766
  getContractClass: z.function({ input: z.tuple([schemas.Fr]), output: ContractClassPublicSchema.optional() }),
656
767
 
657
768
  getContract: z.function({
658
- input: z.tuple([schemas.AztecAddress]),
769
+ input: z.tuple([schemas.AztecAddress, optional(BlockParameterSchema)]),
659
770
  output: ContractInstanceWithAddressSchema.optional(),
660
771
  }),
661
772
 
662
773
  getEncodedEnr: z.function({ input: z.tuple([]), output: z.string().optional() }),
663
774
 
664
775
  getAllowedPublicSetup: z.function({ input: z.tuple([]), output: z.array(AllowedElementSchema) }),
776
+
777
+ getPeers: z.function({ input: z.tuple([optional(z.boolean())]), output: z.array(PeerInfoSchema) }),
778
+
779
+ getCheckpointAttestationsForSlot: z.function({
780
+ input: z.tuple([
781
+ schemas.SlotNumber,
782
+ optional(z.string().regex(/^0x[0-9a-fA-F]+$/) as unknown as z.ZodType<CheckpointProposalHash>),
783
+ ]),
784
+ output: z.array(CheckpointAttestation.schema),
785
+ }),
786
+
787
+ getProposalsForSlot: z.function({
788
+ input: z.tuple([schemas.SlotNumber]),
789
+ output: ProposalsForSlotSchema,
790
+ }),
665
791
  };
666
792
 
667
793
  export function createAztecNodeClient(
@@ -671,7 +797,7 @@ export function createAztecNodeClient(
671
797
  batchWindowMS = 0,
672
798
  ): AztecNode {
673
799
  return createSafeJsonRpcClient<AztecNode>(url, AztecNodeApiSchema, {
674
- namespaceMethods: 'node',
800
+ namespaceMethods: 'aztec',
675
801
  fetch,
676
802
  batchWindowMS,
677
803
  onResponse: getVersioningResponseHandler(versions),
@@ -2,6 +2,7 @@ import type { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-ty
2
2
  import type { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import type { LoggerBindings } from '@aztec/foundation/log';
4
4
 
5
+ import type { BlockHash } from '../block/block_hash.js';
5
6
  import type { L2Block } from '../block/l2_block.js';
6
7
  import type { ChainConfig, SequencerConfig } from '../config/chain-config.js';
7
8
  import type { L1RollupConstants } from '../epoch-helpers/index.js';
@@ -64,6 +65,8 @@ type ProposerBlockBuilderOptions = BlockBuilderOptionsBase & {
64
65
  maxBlocksPerCheckpoint: number;
65
66
  /** Per-block gas budget multiplier. Budget = (remaining / remainingBlocks) * multiplier. */
66
67
  perBlockAllocationMultiplier: number;
68
+ /** Per-block budget multiplier for DA gas and blob fields. Falls back to perBlockAllocationMultiplier when unset. */
69
+ perBlockDAAllocationMultiplier?: number;
67
70
  };
68
71
 
69
72
  /** Validator mode: no redistribution params needed. */
@@ -141,7 +144,11 @@ export interface ICheckpointBlockBuilder {
141
144
 
142
145
  /** Interface for creating checkpoint builders. */
143
146
  export interface ICheckpointsBuilder {
144
- getFork(blockNumber: BlockNumber): Promise<MerkleTreeWriteOperations>;
147
+ /**
148
+ * Syncs world state to `blockNumber` and returns a fork of it at that block. When `blockHash` is
149
+ * provided it is verified against the synced block, triggering a resync on mismatch (reorg detection).
150
+ */
151
+ getFork(blockNumber: BlockNumber, blockHash?: BlockHash): Promise<MerkleTreeWriteOperations>;
145
152
 
146
153
  startCheckpoint(
147
154
  checkpointNumber: CheckpointNumber,
@@ -4,7 +4,7 @@ import {
4
4
  IndexWithinCheckpointSchema,
5
5
  } from '@aztec/foundation/branded-types';
6
6
  import type { BlockNumber, CheckpointNumber, IndexWithinCheckpoint } from '@aztec/foundation/branded-types';
7
- import type { IfFlag, Prettify } from '@aztec/foundation/types';
7
+ import type { PickIfFlag, Prettify } from '@aztec/foundation/types';
8
8
 
9
9
  import { z } from 'zod';
10
10
 
@@ -73,9 +73,9 @@ export type BlockResponseBase = {
73
73
  */
74
74
  export type BlockResponse<Opts extends BlockIncludeOptions = BlockIncludeOptions> = Prettify<
75
75
  BlockResponseBase &
76
- IfFlag<BlockIncludeOptions, Opts, 'includeTransactions', { body: Body }> &
77
- IfFlag<BlockIncludeOptions, Opts, 'includeL1PublishInfo', { l1: L1PublishInfo }> &
78
- IfFlag<BlockIncludeOptions, Opts, 'includeAttestations', { attestations: CommitteeAttestation[] }>
76
+ PickIfFlag<BlockIncludeOptions, Opts, 'includeTransactions', { body: Body }> &
77
+ PickIfFlag<BlockIncludeOptions, Opts, 'includeL1PublishInfo', { l1: L1PublishInfo }> &
78
+ PickIfFlag<BlockIncludeOptions, Opts, 'includeAttestations', { attestations: CommitteeAttestation[] }>
79
79
  >;
80
80
 
81
81
  /** Zod schema for the widest {@link BlockResponse} shape (all include-gated fields optional). */