@aztec/stdlib 0.0.1-commit.0c875d939 → 0.0.1-commit.0ec55a70b

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 (687) hide show
  1. package/dest/abi/abi.d.ts +138 -1
  2. package/dest/abi/abi.d.ts.map +1 -1
  3. package/dest/abi/abi.js +10 -2
  4. package/dest/abi/authorization_selector.d.ts +3 -6
  5. package/dest/abi/authorization_selector.d.ts.map +1 -1
  6. package/dest/abi/buffer.d.ts +14 -4
  7. package/dest/abi/buffer.d.ts.map +1 -1
  8. package/dest/abi/buffer.js +25 -4
  9. package/dest/abi/decoder.d.ts +6 -45
  10. package/dest/abi/decoder.d.ts.map +1 -1
  11. package/dest/abi/decoder.js +17 -70
  12. package/dest/abi/encoder.d.ts +1 -1
  13. package/dest/abi/encoder.d.ts.map +1 -1
  14. package/dest/abi/encoder.js +64 -7
  15. package/dest/abi/event_metadata_definition.d.ts +3 -1
  16. package/dest/abi/event_metadata_definition.d.ts.map +1 -1
  17. package/dest/abi/event_metadata_definition.js +1 -1
  18. package/dest/abi/event_selector.d.ts +3 -6
  19. package/dest/abi/event_selector.d.ts.map +1 -1
  20. package/dest/abi/function_selector.d.ts +3 -6
  21. package/dest/abi/function_selector.d.ts.map +1 -1
  22. package/dest/abi/function_selector.js +2 -4
  23. package/dest/abi/function_signature_decoder.d.ts +43 -0
  24. package/dest/abi/function_signature_decoder.d.ts.map +1 -0
  25. package/dest/abi/function_signature_decoder.js +66 -0
  26. package/dest/abi/index.d.ts +2 -1
  27. package/dest/abi/index.d.ts.map +1 -1
  28. package/dest/abi/index.js +1 -0
  29. package/dest/abi/note_selector.d.ts +3 -6
  30. package/dest/abi/note_selector.d.ts.map +1 -1
  31. package/dest/abi/note_selector.js +1 -3
  32. package/dest/abi/selector.d.ts +2 -2
  33. package/dest/abi/selector.d.ts.map +1 -1
  34. package/dest/abi/selector.js +1 -1
  35. package/dest/abi/utils.d.ts +14 -1
  36. package/dest/abi/utils.d.ts.map +1 -1
  37. package/dest/abi/utils.js +15 -0
  38. package/dest/auth_witness/auth_witness.js +3 -3
  39. package/dest/avm/avm_proving_request.d.ts +166 -166
  40. package/dest/avm/revert_code.d.ts +9 -4
  41. package/dest/avm/revert_code.d.ts.map +1 -1
  42. package/dest/avm/revert_code.js +16 -21
  43. package/dest/aztec-address/index.d.ts +3 -6
  44. package/dest/aztec-address/index.d.ts.map +1 -1
  45. package/dest/aztec-address/index.js +2 -4
  46. package/dest/block/attestation_info.d.ts +3 -2
  47. package/dest/block/attestation_info.d.ts.map +1 -1
  48. package/dest/block/attestation_info.js +7 -5
  49. package/dest/block/block_data.d.ts +341 -0
  50. package/dest/block/block_data.d.ts.map +1 -0
  51. package/dest/block/block_data.js +26 -0
  52. package/dest/block/block_hash.d.ts +11 -10
  53. package/dest/block/block_hash.d.ts.map +1 -1
  54. package/dest/block/block_hash.js +10 -9
  55. package/dest/block/block_parameter.d.ts +30 -3
  56. package/dest/block/block_parameter.d.ts.map +1 -1
  57. package/dest/block/block_parameter.js +36 -2
  58. package/dest/block/index.d.ts +2 -1
  59. package/dest/block/index.d.ts.map +1 -1
  60. package/dest/block/index.js +1 -0
  61. package/dest/block/l2_block.d.ts +9 -1
  62. package/dest/block/l2_block.d.ts.map +1 -1
  63. package/dest/block/l2_block.js +12 -2
  64. package/dest/block/l2_block_info.d.ts +6 -5
  65. package/dest/block/l2_block_info.d.ts.map +1 -1
  66. package/dest/block/l2_block_info.js +6 -5
  67. package/dest/block/l2_block_source.d.ts +149 -10
  68. package/dest/block/l2_block_source.d.ts.map +1 -1
  69. package/dest/block/l2_block_source.js +1 -0
  70. package/dest/block/l2_block_stream/interfaces.d.ts +6 -3
  71. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  72. package/dest/block/l2_block_stream/l2_block_stream.d.ts +1 -1
  73. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  74. package/dest/block/l2_block_stream/l2_block_stream.js +10 -0
  75. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +1 -1
  76. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
  77. package/dest/block/l2_block_stream/l2_tips_store_base.js +18 -5
  78. package/dest/block/proposal/attestations_and_signers.d.ts +13 -6
  79. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
  80. package/dest/block/proposal/attestations_and_signers.js +26 -18
  81. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  82. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  83. package/dest/block/test/l2_tips_store_test_suite.js +4 -3
  84. package/dest/checkpoint/checkpoint.d.ts +13 -1
  85. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  86. package/dest/checkpoint/checkpoint.js +23 -9
  87. package/dest/checkpoint/checkpoint_data.d.ts +192 -0
  88. package/dest/checkpoint/checkpoint_data.d.ts.map +1 -0
  89. package/dest/checkpoint/checkpoint_data.js +38 -0
  90. package/dest/checkpoint/index.d.ts +3 -1
  91. package/dest/checkpoint/index.d.ts.map +1 -1
  92. package/dest/checkpoint/index.js +2 -0
  93. package/dest/checkpoint/published_checkpoint.d.ts +11 -2
  94. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  95. package/dest/checkpoint/published_checkpoint.js +1 -2
  96. package/dest/checkpoint/validate.d.ts +36 -0
  97. package/dest/checkpoint/validate.d.ts.map +1 -0
  98. package/dest/checkpoint/validate.js +120 -0
  99. package/dest/config/chain-config.d.ts +2 -2
  100. package/dest/config/chain-config.d.ts.map +1 -1
  101. package/dest/config/chain-config.js +9 -3
  102. package/dest/config/index.d.ts +2 -1
  103. package/dest/config/index.d.ts.map +1 -1
  104. package/dest/config/index.js +1 -0
  105. package/dest/config/pipelining-config.d.ts +19 -0
  106. package/dest/config/pipelining-config.d.ts.map +1 -0
  107. package/dest/config/pipelining-config.js +18 -0
  108. package/dest/config/sequencer-config.d.ts +7 -3
  109. package/dest/config/sequencer-config.d.ts.map +1 -1
  110. package/dest/config/sequencer-config.js +27 -1
  111. package/dest/contract/contract_address.d.ts +3 -3
  112. package/dest/contract/contract_address.js +7 -7
  113. package/dest/contract/contract_class.d.ts +2 -3
  114. package/dest/contract/contract_class.d.ts.map +1 -1
  115. package/dest/contract/contract_class_id.d.ts +2 -2
  116. package/dest/contract/contract_class_id.js +5 -5
  117. package/dest/contract/index.d.ts +1 -3
  118. package/dest/contract/index.d.ts.map +1 -1
  119. package/dest/contract/index.js +0 -2
  120. package/dest/contract/interfaces/contract_class.d.ts +3 -156
  121. package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
  122. package/dest/contract/interfaces/contract_class.js +1 -28
  123. package/dest/contract/private_function.d.ts +1 -1
  124. package/dest/contract/private_function.d.ts.map +1 -1
  125. package/dest/contract/private_function.js +4 -6
  126. package/dest/epoch-helpers/index.d.ts +11 -1
  127. package/dest/epoch-helpers/index.d.ts.map +1 -1
  128. package/dest/epoch-helpers/index.js +16 -2
  129. package/dest/file-store/factory.d.ts +4 -3
  130. package/dest/file-store/factory.d.ts.map +1 -1
  131. package/dest/file-store/factory.js +2 -2
  132. package/dest/file-store/http.d.ts +9 -2
  133. package/dest/file-store/http.d.ts.map +1 -1
  134. package/dest/file-store/http.js +20 -9
  135. package/dest/file-store/index.d.ts +2 -1
  136. package/dest/file-store/index.d.ts.map +1 -1
  137. package/dest/file-store/local.d.ts +3 -3
  138. package/dest/file-store/local.d.ts.map +1 -1
  139. package/dest/file-store/local.js +13 -4
  140. package/dest/file-store/s3.d.ts +1 -1
  141. package/dest/file-store/s3.d.ts.map +1 -1
  142. package/dest/file-store/s3.js +11 -3
  143. package/dest/gas/fee_math.d.ts +49 -0
  144. package/dest/gas/fee_math.d.ts.map +1 -0
  145. package/dest/gas/fee_math.js +80 -0
  146. package/dest/gas/gas_fees.d.ts +5 -1
  147. package/dest/gas/gas_fees.d.ts.map +1 -1
  148. package/dest/gas/gas_fees.js +13 -1
  149. package/dest/gas/gas_settings.d.ts +40 -3
  150. package/dest/gas/gas_settings.d.ts.map +1 -1
  151. package/dest/gas/gas_settings.js +50 -6
  152. package/dest/gas/index.d.ts +2 -1
  153. package/dest/gas/index.d.ts.map +1 -1
  154. package/dest/gas/index.js +1 -0
  155. package/dest/ha-signing/config.d.ts +136 -0
  156. package/dest/ha-signing/config.d.ts.map +1 -0
  157. package/dest/ha-signing/config.js +98 -0
  158. package/dest/ha-signing/index.d.ts +4 -0
  159. package/dest/ha-signing/index.d.ts.map +1 -0
  160. package/dest/ha-signing/index.js +3 -0
  161. package/dest/ha-signing/local_config.d.ts +63 -0
  162. package/dest/ha-signing/local_config.d.ts.map +1 -0
  163. package/dest/ha-signing/local_config.js +24 -0
  164. package/dest/ha-signing/types.d.ts +90 -0
  165. package/dest/ha-signing/types.d.ts.map +1 -0
  166. package/dest/ha-signing/types.js +39 -0
  167. package/dest/hash/hash.d.ts +34 -1
  168. package/dest/hash/hash.d.ts.map +1 -1
  169. package/dest/hash/hash.js +72 -11
  170. package/dest/hash/map_slot.js +2 -2
  171. package/dest/interfaces/allowed_element.d.ts +26 -20
  172. package/dest/interfaces/allowed_element.d.ts.map +1 -1
  173. package/dest/interfaces/allowed_element.js +8 -8
  174. package/dest/interfaces/archiver.d.ts +11 -1
  175. package/dest/interfaces/archiver.d.ts.map +1 -1
  176. package/dest/interfaces/archiver.js +17 -3
  177. package/dest/interfaces/aztec-node-admin.d.ts +126 -47
  178. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  179. package/dest/interfaces/aztec-node-admin.js +14 -7
  180. package/dest/interfaces/aztec-node-debug.d.ts +21 -0
  181. package/dest/interfaces/aztec-node-debug.d.ts.map +1 -0
  182. package/dest/interfaces/aztec-node-debug.js +18 -0
  183. package/dest/interfaces/aztec-node.d.ts +59 -54
  184. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  185. package/dest/interfaces/aztec-node.js +23 -16
  186. package/dest/interfaces/block-builder.d.ts +38 -11
  187. package/dest/interfaces/block-builder.d.ts.map +1 -1
  188. package/dest/interfaces/block-builder.js +13 -6
  189. package/dest/interfaces/block_response.d.ts +156 -0
  190. package/dest/interfaces/block_response.d.ts.map +1 -0
  191. package/dest/interfaces/block_response.js +24 -0
  192. package/dest/interfaces/chain_tips.d.ts +304 -0
  193. package/dest/interfaces/chain_tips.d.ts.map +1 -0
  194. package/dest/interfaces/chain_tips.js +11 -0
  195. package/dest/interfaces/checkpoint_parameter.d.ts +27 -0
  196. package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -0
  197. package/dest/interfaces/checkpoint_parameter.js +20 -0
  198. package/dest/interfaces/checkpoint_response.d.ts +312 -0
  199. package/dest/interfaces/checkpoint_response.d.ts.map +1 -0
  200. package/dest/interfaces/checkpoint_response.js +26 -0
  201. package/dest/interfaces/client.d.ts +7 -1
  202. package/dest/interfaces/client.d.ts.map +1 -1
  203. package/dest/interfaces/client.js +6 -0
  204. package/dest/interfaces/configs.d.ts +87 -32
  205. package/dest/interfaces/configs.d.ts.map +1 -1
  206. package/dest/interfaces/configs.js +12 -3
  207. package/dest/interfaces/l1_publish_info.d.ts +43 -0
  208. package/dest/interfaces/l1_publish_info.d.ts.map +1 -0
  209. package/dest/interfaces/l1_publish_info.js +26 -0
  210. package/dest/interfaces/l2_logs_source.d.ts +5 -3
  211. package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
  212. package/dest/interfaces/merkle_tree_operations.d.ts +13 -22
  213. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  214. package/dest/interfaces/p2p.d.ts +3 -8
  215. package/dest/interfaces/p2p.d.ts.map +1 -1
  216. package/dest/interfaces/prover-client.d.ts +6 -1
  217. package/dest/interfaces/prover-client.d.ts.map +1 -1
  218. package/dest/interfaces/prover-client.js +7 -4
  219. package/dest/interfaces/proving-job.d.ts +34 -34
  220. package/dest/interfaces/server.d.ts +6 -1
  221. package/dest/interfaces/server.d.ts.map +1 -1
  222. package/dest/interfaces/server.js +5 -0
  223. package/dest/interfaces/slasher.d.ts +1 -10
  224. package/dest/interfaces/slasher.d.ts.map +1 -1
  225. package/dest/interfaces/slasher.js +0 -2
  226. package/dest/interfaces/validator.d.ts +127 -64
  227. package/dest/interfaces/validator.d.ts.map +1 -1
  228. package/dest/interfaces/validator.js +10 -5
  229. package/dest/interfaces/world_state.d.ts +5 -4
  230. package/dest/interfaces/world_state.d.ts.map +1 -1
  231. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +3 -3
  232. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
  233. package/dest/kernel/hints/build_note_hash_read_request_hints.js +13 -10
  234. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +3 -3
  235. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
  236. package/dest/kernel/hints/build_nullifier_read_request_hints.js +13 -10
  237. package/dest/kernel/hints/build_transient_data_hints.d.ts +5 -2
  238. package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
  239. package/dest/kernel/hints/build_transient_data_hints.js +9 -3
  240. package/dest/kernel/hints/index.d.ts +2 -2
  241. package/dest/kernel/hints/index.js +2 -2
  242. package/dest/kernel/hints/key_validation_request_and_separator.d.ts +24 -0
  243. package/dest/kernel/hints/key_validation_request_and_separator.d.ts.map +1 -0
  244. package/dest/kernel/hints/{key_validation_request_and_generator.js → key_validation_request_and_separator.js} +12 -15
  245. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts → scoped_key_validation_request_and_separator.d.ts} +8 -8
  246. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts.map → scoped_key_validation_request_and_separator.d.ts.map} +1 -1
  247. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.js → scoped_key_validation_request_and_separator.js} +6 -6
  248. package/dest/kernel/private_circuit_public_inputs.d.ts +9 -9
  249. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  250. package/dest/kernel/private_circuit_public_inputs.js +16 -16
  251. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +3 -3
  252. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  253. package/dest/kernel/private_kernel_circuit_public_inputs.js +4 -4
  254. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +3 -3
  255. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
  256. package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +4 -4
  257. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +4 -3
  258. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  259. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +11 -7
  260. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +3 -3
  261. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  262. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -7
  263. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +3 -3
  264. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  265. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +7 -7
  266. package/dest/kernel/private_validation_requests.d.ts +3 -3
  267. package/dest/kernel/private_validation_requests.js +9 -9
  268. package/dest/keys/derivation.js +8 -8
  269. package/dest/keys/key_types.d.ts +3 -3
  270. package/dest/keys/key_types.d.ts.map +1 -1
  271. package/dest/keys/public_keys.js +2 -2
  272. package/dest/keys/utils.js +5 -5
  273. package/dest/kv-store/config.d.ts +17 -0
  274. package/dest/kv-store/config.d.ts.map +1 -0
  275. package/dest/kv-store/config.js +26 -0
  276. package/dest/kv-store/index.d.ts +2 -0
  277. package/dest/kv-store/index.d.ts.map +1 -0
  278. package/dest/kv-store/index.js +1 -0
  279. package/dest/l1-contracts/index.d.ts +2 -2
  280. package/dest/l1-contracts/index.d.ts.map +1 -1
  281. package/dest/l1-contracts/index.js +1 -1
  282. package/dest/logs/debug_log_store.d.ts +30 -0
  283. package/dest/logs/debug_log_store.d.ts.map +1 -0
  284. package/dest/logs/debug_log_store.js +30 -0
  285. package/dest/logs/extended_directional_app_tagging_secret.d.ts +47 -0
  286. package/dest/logs/extended_directional_app_tagging_secret.d.ts.map +1 -0
  287. package/dest/logs/{directional_app_tagging_secret.js → extended_directional_app_tagging_secret.js} +35 -20
  288. package/dest/logs/index.d.ts +4 -2
  289. package/dest/logs/index.d.ts.map +1 -1
  290. package/dest/logs/index.js +3 -1
  291. package/dest/logs/log_filter.d.ts +4 -1
  292. package/dest/logs/log_filter.d.ts.map +1 -1
  293. package/dest/logs/log_filter.js +2 -1
  294. package/dest/logs/log_id.d.ts +1 -1
  295. package/dest/logs/log_id.d.ts.map +1 -1
  296. package/dest/logs/log_id.js +1 -2
  297. package/dest/logs/message_context.d.ts +4 -7
  298. package/dest/logs/message_context.d.ts.map +1 -1
  299. package/dest/logs/message_context.js +23 -9
  300. package/dest/logs/pending_tagged_log.d.ts +2 -3
  301. package/dest/logs/pending_tagged_log.d.ts.map +1 -1
  302. package/dest/logs/pending_tagged_log.js +2 -2
  303. package/dest/logs/pre_tag.d.ts +16 -11
  304. package/dest/logs/pre_tag.d.ts.map +1 -1
  305. package/dest/logs/pre_tag.js +2 -2
  306. package/dest/logs/private_log.d.ts +2 -2
  307. package/dest/logs/private_log.d.ts.map +1 -1
  308. package/dest/logs/public_log.d.ts +4 -3
  309. package/dest/logs/public_log.d.ts.map +1 -1
  310. package/dest/logs/public_log.js +2 -1
  311. package/dest/logs/shared_secret_derivation.d.ts +11 -10
  312. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  313. package/dest/logs/shared_secret_derivation.js +15 -9
  314. package/dest/logs/siloed_tag.d.ts +12 -9
  315. package/dest/logs/siloed_tag.d.ts.map +1 -1
  316. package/dest/logs/siloed_tag.js +15 -2
  317. package/dest/logs/tag.d.ts +5 -6
  318. package/dest/logs/tag.d.ts.map +1 -1
  319. package/dest/logs/tag.js +5 -1
  320. package/dest/logs/tagging_index_range.d.ts +40 -0
  321. package/dest/logs/tagging_index_range.d.ts.map +1 -0
  322. package/dest/logs/tagging_index_range.js +8 -0
  323. package/dest/logs/tx_scoped_l2_log.d.ts +3 -1
  324. package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
  325. package/dest/logs/tx_scoped_l2_log.js +7 -0
  326. package/dest/messaging/l1_to_l2_message.d.ts +3 -2
  327. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  328. package/dest/messaging/l1_to_l2_message.js +11 -13
  329. package/dest/messaging/l1_to_l2_message_source.d.ts +4 -2
  330. package/dest/messaging/l1_to_l2_message_source.d.ts.map +1 -1
  331. package/dest/messaging/l2_to_l1_membership.d.ts +32 -6
  332. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  333. package/dest/messaging/l2_to_l1_membership.js +69 -26
  334. package/dest/noir/index.d.ts +3 -3
  335. package/dest/noir/index.d.ts.map +1 -1
  336. package/dest/note/note_dao.d.ts +1 -1
  337. package/dest/note/note_dao.d.ts.map +1 -1
  338. package/dest/note/note_dao.js +1 -4
  339. package/dest/p2p/attestation_utils.d.ts +11 -1
  340. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  341. package/dest/p2p/attestation_utils.js +45 -0
  342. package/dest/p2p/block_proposal.d.ts +23 -15
  343. package/dest/p2p/block_proposal.d.ts.map +1 -1
  344. package/dest/p2p/block_proposal.js +46 -43
  345. package/dest/p2p/checkpoint_attestation.d.ts +10 -8
  346. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
  347. package/dest/p2p/checkpoint_attestation.js +17 -24
  348. package/dest/p2p/checkpoint_proposal.d.ts +21 -20
  349. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
  350. package/dest/p2p/checkpoint_proposal.js +35 -62
  351. package/dest/p2p/client_type.d.ts +2 -5
  352. package/dest/p2p/client_type.d.ts.map +1 -1
  353. package/dest/p2p/client_type.js +0 -7
  354. package/dest/p2p/consensus_payload.d.ts +18 -7
  355. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  356. package/dest/p2p/consensus_payload.js +31 -19
  357. package/dest/p2p/gossipable.d.ts +4 -4
  358. package/dest/p2p/gossipable.d.ts.map +1 -1
  359. package/dest/p2p/index.d.ts +1 -2
  360. package/dest/p2p/index.d.ts.map +1 -1
  361. package/dest/p2p/index.js +0 -1
  362. package/dest/p2p/peer_error.d.ts +3 -1
  363. package/dest/p2p/peer_error.d.ts.map +1 -1
  364. package/dest/p2p/peer_error.js +5 -0
  365. package/dest/p2p/signature_utils.d.ts +28 -19
  366. package/dest/p2p/signature_utils.d.ts.map +1 -1
  367. package/dest/p2p/signature_utils.js +118 -21
  368. package/dest/p2p/signed_txs.d.ts +15 -13
  369. package/dest/p2p/signed_txs.d.ts.map +1 -1
  370. package/dest/p2p/signed_txs.js +26 -24
  371. package/dest/p2p/topic_type.d.ts +3 -4
  372. package/dest/p2p/topic_type.d.ts.map +1 -1
  373. package/dest/p2p/topic_type.js +7 -24
  374. package/dest/parity/parity_base_private_inputs.d.ts +7 -3
  375. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
  376. package/dest/parity/parity_base_private_inputs.js +7 -5
  377. package/dest/parity/parity_public_inputs.d.ts +7 -3
  378. package/dest/parity/parity_public_inputs.d.ts.map +1 -1
  379. package/dest/parity/parity_public_inputs.js +6 -3
  380. package/dest/proofs/chonk_proof.d.ts +46 -2
  381. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  382. package/dest/proofs/chonk_proof.js +85 -10
  383. package/dest/rollup/block_headers_hash.d.ts +1 -1
  384. package/dest/rollup/block_headers_hash.d.ts.map +1 -1
  385. package/dest/rollup/block_headers_hash.js +8 -2
  386. package/dest/rollup/checkpoint_header.d.ts +2 -2
  387. package/dest/rollup/checkpoint_header.js +2 -2
  388. package/dest/slashing/index.d.ts +2 -3
  389. package/dest/slashing/index.d.ts.map +1 -1
  390. package/dest/slashing/index.js +1 -2
  391. package/dest/slashing/serialization.d.ts +2 -6
  392. package/dest/slashing/serialization.d.ts.map +1 -1
  393. package/dest/slashing/serialization.js +0 -60
  394. package/dest/slashing/types.d.ts +4 -90
  395. package/dest/slashing/types.d.ts.map +1 -1
  396. package/dest/slashing/types.js +0 -14
  397. package/dest/slashing/{tally.d.ts → votes.d.ts} +7 -2
  398. package/dest/slashing/votes.d.ts.map +1 -0
  399. package/dest/slashing/{tally.js → votes.js} +30 -2
  400. package/dest/tests/factories.d.ts +5 -10
  401. package/dest/tests/factories.d.ts.map +1 -1
  402. package/dest/tests/factories.js +35 -54
  403. package/dest/tests/mocks.d.ts +11 -3
  404. package/dest/tests/mocks.d.ts.map +1 -1
  405. package/dest/tests/mocks.js +59 -45
  406. package/dest/timetable/index.d.ts +51 -1
  407. package/dest/timetable/index.d.ts.map +1 -1
  408. package/dest/timetable/index.js +218 -14
  409. package/dest/trees/nullifier_leaf.d.ts +2 -1
  410. package/dest/trees/nullifier_leaf.d.ts.map +1 -1
  411. package/dest/trees/nullifier_leaf.js +3 -0
  412. package/dest/tx/block_header.d.ts +4 -2
  413. package/dest/tx/block_header.d.ts.map +1 -1
  414. package/dest/tx/block_header.js +7 -3
  415. package/dest/tx/capsule.d.ts +6 -2
  416. package/dest/tx/capsule.d.ts.map +1 -1
  417. package/dest/tx/capsule.js +9 -3
  418. package/dest/tx/fee_provider.d.ts +10 -0
  419. package/dest/tx/fee_provider.d.ts.map +1 -0
  420. package/dest/tx/fee_provider.js +1 -0
  421. package/dest/tx/global_variable_builder.d.ts +3 -4
  422. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  423. package/dest/tx/global_variables.d.ts +4 -4
  424. package/dest/tx/global_variables.d.ts.map +1 -1
  425. package/dest/tx/index.d.ts +2 -1
  426. package/dest/tx/index.d.ts.map +1 -1
  427. package/dest/tx/index.js +1 -0
  428. package/dest/tx/indexed_tx_effect.d.ts +1 -1
  429. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  430. package/dest/tx/indexed_tx_effect.js +1 -2
  431. package/dest/tx/private_execution_result.d.ts +6 -6
  432. package/dest/tx/private_execution_result.d.ts.map +1 -1
  433. package/dest/tx/private_execution_result.js +6 -6
  434. package/dest/tx/profiling.d.ts +17 -5
  435. package/dest/tx/profiling.d.ts.map +1 -1
  436. package/dest/tx/profiling.js +19 -9
  437. package/dest/tx/protocol_contracts.d.ts +1 -1
  438. package/dest/tx/protocol_contracts.d.ts.map +1 -1
  439. package/dest/tx/protocol_contracts.js +2 -2
  440. package/dest/tx/public_simulation_output.d.ts +4 -2
  441. package/dest/tx/public_simulation_output.d.ts.map +1 -1
  442. package/dest/tx/public_simulation_output.js +7 -3
  443. package/dest/tx/simulated_tx.d.ts +116 -5
  444. package/dest/tx/simulated_tx.d.ts.map +1 -1
  445. package/dest/tx/simulated_tx.js +7 -4
  446. package/dest/tx/tx.d.ts +8 -7
  447. package/dest/tx/tx.d.ts.map +1 -1
  448. package/dest/tx/tx.js +18 -6
  449. package/dest/tx/tx_receipt.d.ts +29 -6
  450. package/dest/tx/tx_receipt.d.ts.map +1 -1
  451. package/dest/tx/tx_receipt.js +23 -19
  452. package/dest/tx/tx_request.js +2 -2
  453. package/dest/tx/validator/error_texts.d.ts +10 -2
  454. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  455. package/dest/tx/validator/error_texts.js +11 -1
  456. package/dest/types/shared.d.ts +1 -10
  457. package/dest/types/shared.d.ts.map +1 -1
  458. package/dest/types/shared.js +0 -9
  459. package/dest/update-checker/index.d.ts +3 -2
  460. package/dest/update-checker/index.d.ts.map +1 -1
  461. package/dest/update-checker/index.js +2 -1
  462. package/dest/update-checker/package_version.d.ts +3 -0
  463. package/dest/update-checker/package_version.d.ts.map +1 -0
  464. package/dest/update-checker/package_version.js +24 -0
  465. package/dest/update-checker/version_checker.d.ts +25 -0
  466. package/dest/update-checker/version_checker.d.ts.map +1 -0
  467. package/dest/update-checker/version_checker.js +50 -0
  468. package/dest/validators/errors.d.ts +6 -1
  469. package/dest/validators/errors.d.ts.map +1 -1
  470. package/dest/validators/errors.js +7 -0
  471. package/dest/versioning/versioning.d.ts +4 -2
  472. package/dest/versioning/versioning.d.ts.map +1 -1
  473. package/dest/versioning/versioning.js +4 -1
  474. package/dest/vks/verification_key.d.ts +2 -137
  475. package/dest/vks/verification_key.d.ts.map +1 -1
  476. package/dest/vks/verification_key.js +5 -126
  477. package/dest/world-state/genesis_data.d.ts +11 -0
  478. package/dest/world-state/genesis_data.d.ts.map +1 -0
  479. package/dest/world-state/genesis_data.js +4 -0
  480. package/dest/world-state/index.d.ts +2 -1
  481. package/dest/world-state/index.d.ts.map +1 -1
  482. package/dest/world-state/index.js +1 -0
  483. package/dest/world-state/world_state_revision.d.ts +8 -1
  484. package/dest/world-state/world_state_revision.d.ts.map +1 -1
  485. package/dest/world-state/world_state_revision.js +7 -1
  486. package/package.json +12 -11
  487. package/src/abi/abi.ts +25 -2
  488. package/src/abi/authorization_selector.ts +2 -8
  489. package/src/abi/buffer.ts +25 -4
  490. package/src/abi/decoder.ts +36 -82
  491. package/src/abi/encoder.ts +85 -6
  492. package/src/abi/event_metadata_definition.ts +2 -0
  493. package/src/abi/event_selector.ts +2 -8
  494. package/src/abi/function_selector.ts +4 -13
  495. package/src/abi/function_signature_decoder.ts +77 -0
  496. package/src/abi/index.ts +1 -0
  497. package/src/abi/note_selector.ts +3 -12
  498. package/src/abi/selector.ts +1 -1
  499. package/src/abi/utils.ts +25 -0
  500. package/src/auth_witness/auth_witness.ts +3 -3
  501. package/src/avm/revert_code.ts +26 -25
  502. package/src/aztec-address/index.ts +4 -10
  503. package/src/block/attestation_info.ts +11 -11
  504. package/src/block/block_data.ts +42 -0
  505. package/src/block/block_hash.ts +21 -14
  506. package/src/block/block_parameter.ts +35 -2
  507. package/src/block/index.ts +1 -0
  508. package/src/block/l2_block.ts +13 -1
  509. package/src/block/l2_block_info.ts +8 -6
  510. package/src/block/l2_block_source.ts +88 -9
  511. package/src/block/l2_block_stream/interfaces.ts +6 -2
  512. package/src/block/l2_block_stream/l2_block_stream.ts +21 -0
  513. package/src/block/l2_block_stream/l2_tips_store_base.ts +25 -13
  514. package/src/block/proposal/attestations_and_signers.ts +32 -17
  515. package/src/block/test/l2_tips_store_test_suite.ts +9 -2
  516. package/src/checkpoint/checkpoint.ts +28 -7
  517. package/src/checkpoint/checkpoint_data.ts +91 -0
  518. package/src/checkpoint/index.ts +2 -0
  519. package/src/checkpoint/published_checkpoint.ts +3 -1
  520. package/src/checkpoint/validate.ts +230 -0
  521. package/src/config/chain-config.ts +9 -4
  522. package/src/config/index.ts +1 -0
  523. package/src/config/pipelining-config.ts +31 -0
  524. package/src/config/sequencer-config.ts +49 -3
  525. package/src/contract/contract_address.ts +7 -7
  526. package/src/contract/contract_class.ts +3 -3
  527. package/src/contract/contract_class_id.ts +5 -5
  528. package/src/contract/index.ts +0 -2
  529. package/src/contract/interfaces/contract_class.ts +2 -82
  530. package/src/contract/private_function.ts +5 -3
  531. package/src/epoch-helpers/index.ts +27 -0
  532. package/src/file-store/factory.ts +13 -4
  533. package/src/file-store/http.ts +29 -10
  534. package/src/file-store/index.ts +1 -0
  535. package/src/file-store/local.ts +15 -5
  536. package/src/file-store/s3.ts +12 -3
  537. package/src/gas/README.md +154 -0
  538. package/src/gas/fee_math.ts +120 -0
  539. package/src/gas/gas_fees.ts +20 -1
  540. package/src/gas/gas_settings.ts +65 -12
  541. package/src/gas/index.ts +1 -0
  542. package/src/ha-signing/config.ts +159 -0
  543. package/src/ha-signing/index.ts +29 -0
  544. package/src/ha-signing/local_config.ts +46 -0
  545. package/src/ha-signing/types.ts +126 -0
  546. package/src/hash/hash.ts +72 -11
  547. package/src/hash/map_slot.ts +2 -2
  548. package/src/interfaces/allowed_element.ts +29 -9
  549. package/src/interfaces/archiver.ts +28 -2
  550. package/src/interfaces/aztec-node-admin.ts +31 -8
  551. package/src/interfaces/aztec-node-debug.ts +40 -0
  552. package/src/interfaces/aztec-node.ts +129 -85
  553. package/src/interfaces/block-builder.ts +60 -14
  554. package/src/interfaces/block_response.ts +79 -0
  555. package/src/interfaces/chain_tips.ts +24 -0
  556. package/src/interfaces/checkpoint_parameter.ts +22 -0
  557. package/src/interfaces/checkpoint_response.ts +84 -0
  558. package/src/interfaces/client.ts +6 -0
  559. package/src/interfaces/configs.ts +43 -8
  560. package/src/interfaces/l1_publish_info.ts +40 -0
  561. package/src/interfaces/l2_logs_source.ts +4 -1
  562. package/src/interfaces/merkle_tree_operations.ts +12 -21
  563. package/src/interfaces/p2p.ts +2 -13
  564. package/src/interfaces/prover-client.ts +10 -5
  565. package/src/interfaces/server.ts +5 -0
  566. package/src/interfaces/slasher.ts +0 -6
  567. package/src/interfaces/validator.ts +68 -37
  568. package/src/interfaces/world_state.ts +4 -3
  569. package/src/kernel/hints/build_note_hash_read_request_hints.ts +14 -18
  570. package/src/kernel/hints/build_nullifier_read_request_hints.ts +15 -18
  571. package/src/kernel/hints/build_transient_data_hints.ts +17 -2
  572. package/src/kernel/hints/index.ts +2 -2
  573. package/src/kernel/hints/{key_validation_request_and_generator.ts → key_validation_request_and_separator.ts} +12 -15
  574. package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +10 -10
  575. package/src/kernel/private_circuit_public_inputs.ts +14 -14
  576. package/src/kernel/private_kernel_circuit_public_inputs.ts +2 -2
  577. package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -2
  578. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +14 -5
  579. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +5 -5
  580. package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +5 -5
  581. package/src/kernel/private_validation_requests.ts +8 -8
  582. package/src/keys/derivation.ts +8 -8
  583. package/src/keys/key_types.ts +6 -2
  584. package/src/keys/public_keys.ts +2 -2
  585. package/src/keys/utils.ts +5 -5
  586. package/src/kv-store/config.ts +36 -0
  587. package/src/kv-store/index.ts +1 -0
  588. package/src/l1-contracts/index.ts +1 -1
  589. package/src/logs/debug_log_store.ts +54 -0
  590. package/src/logs/{directional_app_tagging_secret.ts → extended_directional_app_tagging_secret.ts} +41 -22
  591. package/src/logs/index.ts +3 -1
  592. package/src/logs/log_filter.ts +5 -0
  593. package/src/logs/log_id.ts +1 -2
  594. package/src/logs/message_context.ts +17 -7
  595. package/src/logs/pending_tagged_log.ts +1 -3
  596. package/src/logs/pre_tag.ts +5 -5
  597. package/src/logs/public_log.ts +4 -2
  598. package/src/logs/shared_secret_derivation.ts +21 -10
  599. package/src/logs/siloed_tag.ts +22 -12
  600. package/src/logs/tag.ts +9 -9
  601. package/src/logs/tagging_index_range.ts +24 -0
  602. package/src/logs/tx_scoped_l2_log.ts +16 -0
  603. package/src/messaging/l1_to_l2_message.ts +12 -9
  604. package/src/messaging/l1_to_l2_message_source.ts +3 -1
  605. package/src/messaging/l2_to_l1_membership.ts +98 -33
  606. package/src/noir/index.ts +2 -2
  607. package/src/note/note_dao.ts +1 -4
  608. package/src/p2p/attestation_utils.ts +56 -0
  609. package/src/p2p/block_proposal.ts +97 -39
  610. package/src/p2p/checkpoint_attestation.ts +20 -29
  611. package/src/p2p/checkpoint_proposal.ts +87 -84
  612. package/src/p2p/client_type.ts +0 -6
  613. package/src/p2p/consensus_payload.ts +50 -28
  614. package/src/p2p/gossipable.ts +4 -4
  615. package/src/p2p/index.ts +0 -1
  616. package/src/p2p/peer_error.ts +7 -0
  617. package/src/p2p/signature_utils.ts +110 -25
  618. package/src/p2p/signed_txs.ts +46 -28
  619. package/src/p2p/topic_type.ts +8 -15
  620. package/src/parity/parity_base_private_inputs.ts +10 -4
  621. package/src/parity/parity_public_inputs.ts +9 -2
  622. package/src/proofs/chonk_proof.ts +91 -5
  623. package/src/rollup/block_headers_hash.ts +11 -2
  624. package/src/rollup/checkpoint_header.ts +2 -2
  625. package/src/slashing/index.ts +1 -2
  626. package/src/slashing/serialization.ts +1 -81
  627. package/src/slashing/types.ts +3 -35
  628. package/src/slashing/{tally.ts → votes.ts} +34 -1
  629. package/src/tests/factories.ts +37 -63
  630. package/src/tests/mocks.ts +90 -51
  631. package/src/timetable/index.ts +308 -13
  632. package/src/trees/nullifier_leaf.ts +4 -0
  633. package/src/tx/block_header.ts +10 -4
  634. package/src/tx/capsule.ts +10 -2
  635. package/src/tx/fee_provider.ts +10 -0
  636. package/src/tx/global_variable_builder.ts +2 -3
  637. package/src/tx/global_variables.ts +3 -3
  638. package/src/tx/index.ts +1 -0
  639. package/src/tx/indexed_tx_effect.ts +1 -2
  640. package/src/tx/private_execution_result.ts +5 -5
  641. package/src/tx/profiling.ts +18 -9
  642. package/src/tx/protocol_contracts.ts +2 -2
  643. package/src/tx/public_simulation_output.ts +4 -0
  644. package/src/tx/simulated_tx.ts +14 -3
  645. package/src/tx/tx.ts +22 -13
  646. package/src/tx/tx_receipt.ts +28 -16
  647. package/src/tx/tx_request.ts +2 -2
  648. package/src/tx/validator/error_texts.ts +13 -1
  649. package/src/types/shared.ts +0 -10
  650. package/src/update-checker/index.ts +2 -1
  651. package/src/update-checker/package_version.ts +30 -0
  652. package/src/update-checker/version_checker.ts +65 -0
  653. package/src/validators/errors.ts +9 -0
  654. package/src/versioning/versioning.ts +4 -1
  655. package/src/vks/verification_key.ts +5 -184
  656. package/src/world-state/genesis_data.ts +15 -0
  657. package/src/world-state/index.ts +1 -0
  658. package/src/world-state/world_state_revision.ts +9 -1
  659. package/dest/abi/mocked_keys.d.ts +0 -2
  660. package/dest/abi/mocked_keys.d.ts.map +0 -1
  661. package/dest/abi/mocked_keys.js +0 -1
  662. package/dest/contract/private_function_membership_proof.d.ts +0 -32
  663. package/dest/contract/private_function_membership_proof.d.ts.map +0 -1
  664. package/dest/contract/private_function_membership_proof.js +0 -124
  665. package/dest/contract/utility_function_membership_proof.d.ts +0 -27
  666. package/dest/contract/utility_function_membership_proof.d.ts.map +0 -1
  667. package/dest/contract/utility_function_membership_proof.js +0 -87
  668. package/dest/kernel/hints/key_validation_request_and_generator.d.ts +0 -30
  669. package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +0 -1
  670. package/dest/l1-contracts/slash_factory.d.ts +0 -45
  671. package/dest/l1-contracts/slash_factory.d.ts.map +0 -1
  672. package/dest/l1-contracts/slash_factory.js +0 -158
  673. package/dest/logs/directional_app_tagging_secret.d.ts +0 -40
  674. package/dest/logs/directional_app_tagging_secret.d.ts.map +0 -1
  675. package/dest/slashing/empire.d.ts +0 -31
  676. package/dest/slashing/empire.d.ts.map +0 -1
  677. package/dest/slashing/empire.js +0 -87
  678. package/dest/slashing/tally.d.ts.map +0 -1
  679. package/dest/update-checker/update-checker.d.ts +0 -49
  680. package/dest/update-checker/update-checker.d.ts.map +0 -1
  681. package/dest/update-checker/update-checker.js +0 -130
  682. package/src/abi/mocked_keys.ts +0 -2
  683. package/src/contract/private_function_membership_proof.ts +0 -167
  684. package/src/contract/utility_function_membership_proof.ts +0 -118
  685. package/src/l1-contracts/slash_factory.ts +0 -180
  686. package/src/slashing/empire.ts +0 -104
  687. package/src/update-checker/update-checker.ts +0 -166
@@ -6,18 +6,38 @@ import type { FunctionSelector } from '../abi/function_selector.js';
6
6
  import type { AztecAddress } from '../aztec-address/index.js';
7
7
  import { schemas, zodFor } from '../schemas/index.js';
8
8
 
9
- type AllowedInstance = { address: AztecAddress };
10
- type AllowedInstanceFunction = { address: AztecAddress; selector: FunctionSelector };
11
- type AllowedClass = { classId: Fr };
12
- type AllowedClassFunction = { classId: Fr; selector: FunctionSelector };
9
+ type AllowedInstanceFunction = {
10
+ address: AztecAddress;
11
+ selector: FunctionSelector;
12
+ onlySelf?: boolean;
13
+ rejectNullMsgSender?: boolean;
14
+ calldataLength?: number;
15
+ };
16
+ type AllowedClassFunction = {
17
+ classId: Fr;
18
+ selector: FunctionSelector;
19
+ onlySelf?: boolean;
20
+ rejectNullMsgSender?: boolean;
21
+ calldataLength?: number;
22
+ };
13
23
 
14
- export type AllowedElement = AllowedInstance | AllowedInstanceFunction | AllowedClass | AllowedClassFunction;
24
+ export type AllowedElement = AllowedInstanceFunction | AllowedClassFunction;
15
25
 
16
26
  export const AllowedElementSchema = zodFor<AllowedElement>()(
17
27
  z.union([
18
- z.object({ address: schemas.AztecAddress, selector: schemas.FunctionSelector }),
19
- z.object({ address: schemas.AztecAddress }),
20
- z.object({ classId: schemas.Fr, selector: schemas.FunctionSelector }),
21
- z.object({ classId: schemas.Fr }),
28
+ z.object({
29
+ address: schemas.AztecAddress,
30
+ selector: schemas.FunctionSelector,
31
+ onlySelf: z.boolean().optional(),
32
+ rejectNullMsgSender: z.boolean().optional(),
33
+ calldataLength: z.number().optional(),
34
+ }),
35
+ z.object({
36
+ classId: schemas.Fr,
37
+ selector: schemas.FunctionSelector,
38
+ onlySelf: z.boolean().optional(),
39
+ rejectNullMsgSender: z.boolean().optional(),
40
+ calldataLength: z.number().optional(),
41
+ }),
22
42
  ]),
23
43
  );
@@ -4,12 +4,14 @@ import type { ApiSchemaFor } from '@aztec/foundation/schemas';
4
4
 
5
5
  import { z } from 'zod';
6
6
 
7
+ import { BlockDataSchema, BlockDataWithCheckpointContextSchema } from '../block/block_data.js';
7
8
  import { BlockHash } from '../block/block_hash.js';
8
9
  import { CheckpointedL2Block } from '../block/checkpointed_l2_block.js';
9
10
  import { L2Block } from '../block/l2_block.js';
10
11
  import { type L2BlockSource, L2TipsSchema } from '../block/l2_block_source.js';
11
12
  import { ValidateCheckpointResultSchema } from '../block/validate_block_result.js';
12
13
  import { Checkpoint } from '../checkpoint/checkpoint.js';
14
+ import { CheckpointDataSchema, ProposedCheckpointDataSchema } from '../checkpoint/checkpoint_data.js';
13
15
  import { PublishedCheckpoint } from '../checkpoint/published_checkpoint.js';
14
16
  import {
15
17
  ContractClassPublicSchema,
@@ -58,8 +60,14 @@ export type ArchiverSpecificConfig = {
58
60
  /** Whether to allow starting the archiver without debug/trace method support on Ethereum hosts */
59
61
  ethereumAllowNoDebugHosts?: boolean;
60
62
 
63
+ /** Skip the startup check that probes the L1 RPC for historical logs on the Rollup contract. */
64
+ archiverSkipHistoricalLogsCheck?: boolean;
65
+
61
66
  /** Skip validating checkpoint attestations (for testing purposes only) */
62
67
  skipValidateCheckpointAttestations?: boolean;
68
+
69
+ /** Skip promoting proposed checkpoints during L1 sync (for testing purposes only) */
70
+ skipPromoteProposedCheckpointDuringL1Sync?: boolean;
63
71
  };
64
72
 
65
73
  export const ArchiverSpecificConfigSchema = z.object({
@@ -70,7 +78,9 @@ export const ArchiverSpecificConfigSchema = z.object({
70
78
  archiverStoreMapSizeKb: schemas.Integer.optional(),
71
79
  maxAllowedEthClientDriftSeconds: schemas.Integer.optional(),
72
80
  ethereumAllowNoDebugHosts: z.boolean().optional(),
81
+ archiverSkipHistoricalLogsCheck: z.boolean().optional(),
73
82
  skipValidateCheckpointAttestations: z.boolean().optional(),
83
+ skipPromoteProposedCheckpointDuringL1Sync: z.boolean().optional(),
74
84
  });
75
85
 
76
86
  export type ArchiverApi = Omit<
@@ -84,6 +94,7 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
84
94
  getBlockNumber: z.function().args().returns(BlockNumberSchema),
85
95
  getProvenBlockNumber: z.function().args().returns(BlockNumberSchema),
86
96
  getCheckpointedL2BlockNumber: z.function().args().returns(BlockNumberSchema),
97
+ getCheckpointNumber: z.function().args().returns(CheckpointNumberSchema),
87
98
  getFinalizedL2BlockNumber: z.function().args().returns(BlockNumberSchema),
88
99
  getBlock: z.function().args(BlockNumberSchema).returns(L2Block.schema.optional()),
89
100
  getBlockHeader: z
@@ -104,14 +115,27 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
104
115
  getCheckpointedBlockByArchive: z.function().args(schemas.Fr).returns(CheckpointedL2Block.schema.optional()),
105
116
  getBlockHeaderByHash: z.function().args(BlockHash.schema).returns(BlockHeader.schema.optional()),
106
117
  getBlockHeaderByArchive: z.function().args(schemas.Fr).returns(BlockHeader.schema.optional()),
118
+ getBlockData: z.function().args(BlockNumberSchema).returns(BlockDataSchema.optional()),
119
+ getBlockDataByArchive: z.function().args(schemas.Fr).returns(BlockDataSchema.optional()),
120
+ getBlockDataWithCheckpointContext: z
121
+ .function()
122
+ .args(BlockNumberSchema)
123
+ .returns(BlockDataWithCheckpointContextSchema.optional()),
124
+ getCheckpointData: z.function().args(CheckpointNumberSchema).returns(CheckpointDataSchema.optional()),
125
+ getCheckpointDataRange: z
126
+ .function()
127
+ .args(CheckpointNumberSchema, schemas.Integer)
128
+ .returns(z.array(CheckpointDataSchema)),
129
+ getCheckpointNumberBySlot: z.function().args(schemas.SlotNumber).returns(CheckpointNumberSchema.optional()),
107
130
  getL2Block: z.function().args(BlockNumberSchema).returns(L2Block.schema.optional()),
108
131
  getL2BlockByHash: z.function().args(BlockHash.schema).returns(L2Block.schema.optional()),
109
132
  getL2BlockByArchive: z.function().args(schemas.Fr).returns(L2Block.schema.optional()),
110
133
  getTxEffect: z.function().args(TxHash.schema).returns(indexedTxSchema().optional()),
111
134
  getSettledTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema.optional()),
112
- getL2SlotNumber: z.function().args().returns(schemas.SlotNumber.optional()),
113
- getL2EpochNumber: z.function().args().returns(EpochNumberSchema.optional()),
135
+ getSyncedL2SlotNumber: z.function().args().returns(schemas.SlotNumber.optional()),
136
+ getSyncedL2EpochNumber: z.function().args().returns(EpochNumberSchema.optional()),
114
137
  getCheckpointsForEpoch: z.function().args(EpochNumberSchema).returns(z.array(Checkpoint.schema)),
138
+ getCheckpointsDataForEpoch: z.function().args(EpochNumberSchema).returns(z.array(CheckpointDataSchema)),
115
139
  getCheckpointedBlocksForEpoch: z.function().args(EpochNumberSchema).returns(z.array(CheckpointedL2Block.schema)),
116
140
  getBlocksForSlot: z.function().args(schemas.SlotNumber).returns(z.array(L2Block.schema)),
117
141
  getCheckpointedBlockHeadersForEpoch: z.function().args(EpochNumberSchema).returns(z.array(BlockHeader.schema)),
@@ -144,6 +168,8 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
144
168
  .args()
145
169
  .returns(z.object({ genesisArchiveRoot: schemas.Fr })),
146
170
  getL1Timestamp: z.function().args().returns(schemas.BigInt.optional()),
171
+ getLastCheckpoint: z.function().args().returns(ProposedCheckpointDataSchema.optional()),
172
+ getLastProposedCheckpoint: z.function().args().returns(ProposedCheckpointDataSchema.optional()),
147
173
  syncImmediate: z.function().args().returns(z.void()),
148
174
  isPendingChainInvalid: z.function().args().returns(z.boolean()),
149
175
  getPendingChainValidationStatus: z.function().args().returns(ValidateCheckpointResultSchema),
@@ -3,7 +3,8 @@ import { createSafeJsonRpcClient, defaultFetch } from '@aztec/foundation/json-rp
3
3
  import { z } from 'zod';
4
4
 
5
5
  import type { ApiSchemaFor } from '../schemas/schemas.js';
6
- import { type Offense, OffenseSchema, type SlashPayloadRound, SlashPayloadRoundSchema } from '../slashing/index.js';
6
+ import { optional } from '../schemas/schemas.js';
7
+ import { type Offense, OffenseSchema } from '../slashing/index.js';
7
8
  import { type ComponentsVersions, getVersioningResponseHandler } from '../versioning/index.js';
8
9
  import { type ArchiverSpecificConfig, ArchiverSpecificConfigSchema } from './archiver.js';
9
10
  import { type SequencerConfig, SequencerConfigSchema } from './configs.js';
@@ -36,8 +37,9 @@ export interface AztecNodeAdmin {
36
37
  * Pauses syncing and rolls back the database to the target L2 block number.
37
38
  * @param targetBlockNumber - The block number to roll back to.
38
39
  * @param force - If true, clears the world state db and p2p dbs if rolling back to behind the finalized block.
40
+ * @param resumeSync - If true (default), resumes archiver and world state sync after rollback.
39
41
  */
40
- rollbackTo(targetBlockNumber: number, force?: boolean): Promise<void>;
42
+ rollbackTo(targetBlockNumber: number, force?: boolean, resumeSync?: boolean): Promise<void>;
41
43
 
42
44
  /** Pauses archiver and world state syncing. */
43
45
  pauseSync(): Promise<void>;
@@ -45,11 +47,28 @@ export interface AztecNodeAdmin {
45
47
  /** Resumes archiver and world state syncing. */
46
48
  resumeSync(): Promise<void>;
47
49
 
48
- /** Returns all monitored payloads by the slasher for the current round. */
49
- getSlashPayloads(): Promise<SlashPayloadRound[]>;
50
-
51
50
  /** Returns all offenses applicable for the given round. */
52
51
  getSlashOffenses(round: bigint | 'all' | 'current'): Promise<Offense[]>;
52
+
53
+ /**
54
+ * Reloads keystore configuration from disk.
55
+ *
56
+ * What is updated:
57
+ * - Validator attester keys
58
+ * - Coinbase address per validator
59
+ * - Fee recipient address per validator
60
+ *
61
+ * What is NOT updated (requires node restart):
62
+ * - L1 publisher signers (the funded accounts that send L1 transactions)
63
+ * - Prover keys
64
+ * - HA signer PostgreSQL connections
65
+ *
66
+ * Notes:
67
+ * - New validators must use a publisher key that was already configured at node
68
+ * startup (or omit the publisher field to fall back to the attester key).
69
+ * A validator with an unknown publisher key will cause the reload to be rejected.
70
+ */
71
+ reloadKeystore(): Promise<void>;
53
72
  }
54
73
 
55
74
  // L1 contracts are not mutable via admin updates.
@@ -62,6 +81,8 @@ export type AztecNodeAdminConfig = Omit<ValidatorClientFullConfig, 'l1Contracts'
62
81
  'archiverPollingIntervalMS' | 'archiverBatchSize' | 'skipValidateCheckpointAttestations'
63
82
  > & {
64
83
  maxPendingTxCount: number;
84
+ // Keep in sync with P2PConfig.skipIncomingProposals (circular dep prevents Pick<P2PConfig, ...> here)
85
+ skipIncomingProposals?: boolean;
65
86
  };
66
87
 
67
88
  export const AztecNodeAdminConfigSchema = SequencerConfigSchema.merge(ProverConfigSchema)
@@ -74,30 +95,32 @@ export const AztecNodeAdminConfigSchema = SequencerConfigSchema.merge(ProverConf
74
95
  skipValidateCheckpointAttestations: true,
75
96
  }),
76
97
  )
77
- .merge(z.object({ maxPendingTxCount: z.number() }));
98
+ .merge(z.object({ maxPendingTxCount: z.number(), skipIncomingProposals: z.boolean().optional() }));
78
99
 
79
100
  export const AztecNodeAdminApiSchema: ApiSchemaFor<AztecNodeAdmin> = {
80
101
  getConfig: z.function().returns(AztecNodeAdminConfigSchema),
81
102
  setConfig: z.function().args(AztecNodeAdminConfigSchema.partial()).returns(z.void()),
82
103
  startSnapshotUpload: z.function().args(z.string()).returns(z.void()),
83
- rollbackTo: z.function().args(z.number()).returns(z.void()),
104
+ rollbackTo: z.function().args(z.number(), optional(z.boolean()), optional(z.boolean())).returns(z.void()),
84
105
  pauseSync: z.function().returns(z.void()),
85
106
  resumeSync: z.function().returns(z.void()),
86
- getSlashPayloads: z.function().returns(z.array(SlashPayloadRoundSchema)),
87
107
  getSlashOffenses: z
88
108
  .function()
89
109
  .args(z.union([z.bigint(), z.literal('all'), z.literal('current')]))
90
110
  .returns(z.array(OffenseSchema)),
111
+ reloadKeystore: z.function().returns(z.void()),
91
112
  };
92
113
 
93
114
  export function createAztecNodeAdminClient(
94
115
  url: string,
95
116
  versions: Partial<ComponentsVersions> = {},
96
117
  fetch = defaultFetch,
118
+ apiKey?: string,
97
119
  ): AztecNodeAdmin {
98
120
  return createSafeJsonRpcClient<AztecNodeAdmin>(url, AztecNodeAdminApiSchema, {
99
121
  namespaceMethods: 'nodeAdmin',
100
122
  fetch,
101
123
  onResponse: getVersioningResponseHandler(versions),
124
+ ...(apiKey ? { extraHeaders: { 'x-api-key': apiKey } } : {}),
102
125
  });
103
126
  }
@@ -0,0 +1,40 @@
1
+ import { createSafeJsonRpcClient, defaultFetch } from '@aztec/foundation/json-rpc/client';
2
+
3
+ import { z } from 'zod';
4
+
5
+ import type { ApiSchemaFor } from '../schemas/schemas.js';
6
+ import { type ComponentsVersions, getVersioningResponseHandler } from '../versioning/index.js';
7
+
8
+ /**
9
+ * Debug interface for Aztec node available in sandbox/local-network mode.
10
+ */
11
+ export interface AztecNodeDebug {
12
+ /**
13
+ * Triggers the sequencer to produce an L2 block and waits for it to appear.
14
+ *
15
+ * **Precondition**: The current L2 slot must not already contain a block. Callers must ensure L1 time has been
16
+ * advanced to a slot with no existing block before calling this method (e.g. via `EthCheatCodes.warp()`).
17
+ * If the slot is already taken, the sequencer will fail to propose and this call will time out.
18
+ *
19
+ * @throws If no sequencer is running.
20
+ */
21
+ mineBlock(): Promise<void>;
22
+ }
23
+
24
+ export const AztecNodeDebugApiSchema: ApiSchemaFor<AztecNodeDebug> = {
25
+ mineBlock: z.function().returns(z.void()),
26
+ };
27
+
28
+ export function createAztecNodeDebugClient(
29
+ url: string,
30
+ versions: Partial<ComponentsVersions> = {},
31
+ fetch = defaultFetch,
32
+ apiKey?: string,
33
+ ): AztecNodeDebug {
34
+ return createSafeJsonRpcClient<AztecNodeDebug>(url, AztecNodeDebugApiSchema, {
35
+ namespaceMethods: 'nodeDebug',
36
+ fetch,
37
+ onResponse: getVersioningResponseHandler(versions),
38
+ ...(apiKey ? { extraHeaders: { 'x-api-key': apiKey } } : {}),
39
+ });
40
+ }
@@ -1,11 +1,13 @@
1
1
  import { ARCHIVE_HEIGHT, L1_TO_L2_MSG_TREE_HEIGHT, NOTE_HASH_TREE_HEIGHT } from '@aztec/constants';
2
2
  import { type L1ContractAddresses, L1ContractAddressesSchema } from '@aztec/ethereum/l1-contract-addresses';
3
3
  import {
4
- BlockNumber,
4
+ type BlockNumber,
5
5
  BlockNumberPositiveSchema,
6
6
  BlockNumberSchema,
7
+ type CheckpointNumber,
7
8
  CheckpointNumberPositiveSchema,
8
- EpochNumber,
9
+ CheckpointNumberSchema,
10
+ type EpochNumber,
9
11
  EpochNumberSchema,
10
12
  type SlotNumber,
11
13
  } from '@aztec/foundation/branded-types';
@@ -21,9 +23,8 @@ import { BlockHash } from '../block/block_hash.js';
21
23
  import { type BlockParameter, BlockParameterSchema } from '../block/block_parameter.js';
22
24
  import { CheckpointedL2Block } from '../block/checkpointed_l2_block.js';
23
25
  import { type DataInBlock, dataInBlockSchemaFor } from '../block/in_block.js';
24
- import { L2Block } from '../block/l2_block.js';
25
- import { type L2BlockSource, type L2Tips, L2TipsSchema } from '../block/l2_block_source.js';
26
- import { PublishedCheckpoint } from '../checkpoint/published_checkpoint.js';
26
+ import { type L2Tips, L2TipsSchema } from '../block/l2_block_source.js';
27
+ import { type CheckpointData, CheckpointDataSchema } from '../checkpoint/checkpoint_data.js';
27
28
  import {
28
29
  type ContractClassPublic,
29
30
  ContractClassPublicSchema,
@@ -34,6 +35,7 @@ import {
34
35
  type ProtocolContractAddresses,
35
36
  ProtocolContractAddressesSchema,
36
37
  } from '../contract/index.js';
38
+ import { ManaUsageEstimate } from '../gas/fee_math.js';
37
39
  import { GasFees } from '../gas/gas_fees.js';
38
40
  import { SiloedTag, Tag, TxScopedL2Log } from '../logs/index.js';
39
41
  import { type LogFilter, LogFilterSchema } from '../logs/log_filter.js';
@@ -57,6 +59,20 @@ import type { SingleValidatorStats, ValidatorsStats } from '../validators/types.
57
59
  import { type ComponentsVersions, getVersioningResponseHandler } from '../versioning/index.js';
58
60
  import { type AllowedElement, AllowedElementSchema } from './allowed_element.js';
59
61
  import { MAX_RPC_BLOCKS_LEN, MAX_RPC_CHECKPOINTS_LEN, MAX_RPC_LEN, MAX_RPC_TXS_LEN } from './api_limit.js';
62
+ import {
63
+ type BlockIncludeOptions,
64
+ BlockIncludeOptionsSchema,
65
+ type BlockResponse,
66
+ BlockResponseSchema,
67
+ } from './block_response.js';
68
+ import { type ChainTip, ChainTipSchema, type ChainTips, ChainTipsSchema } from './chain_tips.js';
69
+ import { type CheckpointParameter, CheckpointParameterSchema } from './checkpoint_parameter.js';
70
+ import {
71
+ type CheckpointIncludeOptions,
72
+ CheckpointIncludeOptionsSchema,
73
+ type CheckpointResponse,
74
+ CheckpointResponseSchema,
75
+ } from './checkpoint_response.js';
60
76
  import {
61
77
  type GetContractClassLogsResponse,
62
78
  GetContractClassLogsResponseSchema,
@@ -69,16 +85,7 @@ import { type WorldStateSyncStatus, WorldStateSyncStatusSchema } from './world_s
69
85
  * The aztec node.
70
86
  * We will probably implement the additional interfaces by means other than Aztec Node as it's currently a privacy leak
71
87
  */
72
- export interface AztecNode
73
- extends Pick<
74
- L2BlockSource,
75
- 'getBlocks' | 'getCheckpoints' | 'getBlockHeader' | 'getL2Tips' | 'getCheckpointedBlocks'
76
- > {
77
- /**
78
- * Returns the tips of the L2 chain.
79
- */
80
- getL2Tips(): Promise<L2Tips>;
81
-
88
+ export interface AztecNode {
82
89
  /**
83
90
  * Returns the sync status of the node's world state
84
91
  */
@@ -114,6 +121,7 @@ export interface AztecNode
114
121
  * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
115
122
  * @param nullifier - Nullifier we try to find the low nullifier witness for.
116
123
  * @returns The low nullifier membership witness (if found).
124
+ * @throws If the nullifier already exists in the tree, since non-inclusion cannot be proven.
117
125
  * @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
118
126
  * list structure" of leaves and proving that a lower nullifier is pointing to a bigger next value than the nullifier
119
127
  * we are trying to prove non-inclusion for.
@@ -172,14 +180,14 @@ export interface AztecNode
172
180
  l1ToL2Message: Fr,
173
181
  ): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>] | undefined>;
174
182
 
175
- /** Returns the L2 block number in which this L1 to L2 message becomes available, or undefined if not found. */
176
- getL1ToL2MessageBlock(l1ToL2Message: Fr): Promise<BlockNumber | undefined>;
183
+ /** Returns the L2 checkpoint number in which this L1 to L2 message becomes available, or undefined if not found. */
184
+ getL1ToL2MessageCheckpoint(l1ToL2Message: Fr): Promise<CheckpointNumber | undefined>;
177
185
 
178
186
  /**
179
187
  * Returns whether an L1 to L2 message is synced by archiver.
180
188
  * @param l1ToL2Message - The L1 to L2 message to check.
181
189
  * @returns Whether the message is synced.
182
- * @deprecated Use `getL1ToL2MessageBlock` instead. This method may return true even if the message is not ready to use.
190
+ * @deprecated Use `getL1ToL2MessageCheckpoint` instead. This method may return true even if the message is not ready to use.
183
191
  */
184
192
  isL1ToL2MessageSynced(l1ToL2Message: Fr): Promise<boolean>;
185
193
 
@@ -192,43 +200,76 @@ export interface AztecNode
192
200
  getL2ToL1Messages(epoch: EpochNumber): Promise<Fr[][][][]>;
193
201
 
194
202
  /**
195
- * Get a block specified by its block number or 'latest'.
196
- * @param blockParameter - The block parameter (block number, block hash, or 'latest').
197
- * @returns The requested block.
203
+ * Returns the block number at a given chain tip, or the latest proposed block number when
204
+ * `tip` is omitted.
198
205
  */
199
- getBlock(blockParameter: BlockParameter): Promise<L2Block | undefined>;
206
+ getBlockNumber(tip?: ChainTip): Promise<BlockNumber>;
200
207
 
201
208
  /**
202
- * Get a block specified by its hash.
203
- * @param blockHash - The block hash being requested.
204
- * @returns The requested block.
209
+ * Returns the checkpoint number at a given chain tip, or the latest checkpoint number when
210
+ * `tip` is omitted.
211
+ *
212
+ * @remarks **Semantic foot-gun**: block-side `'proposed'` means "latest proposed block" (chain
213
+ * head), but checkpoint-side `'proposed'` means "latest confirmed checkpoint" — pre-L1-confirm
214
+ * checkpoints are not exposed over RPC. `'checkpointed'` on the checkpoint side is equivalent.
205
215
  */
206
- getBlockByHash(blockHash: BlockHash): Promise<L2Block | undefined>;
216
+ getCheckpointNumber(tip?: ChainTip): Promise<CheckpointNumber>;
217
+
218
+ /** Returns the tips of the L2 chain. */
219
+ getChainTips(): Promise<ChainTips>;
220
+
221
+ // TODO(spl/new-rpc-api): the following methods are kept on the interface as a stop-gap because
222
+ // `L2BlockStream` (used by PXE's block synchronizer) and `computeL2ToL1MembershipWitness` (used
223
+ // by end-to-end tests) still consume the internal archiver shapes. Remove them when those
224
+ // consumers are rewired to the unified `BlockResponse` / `CheckpointResponse` API.
225
+ /** @deprecated Scheduled for removal; use `getChainTips` for public callers. */
226
+ getL2Tips(): Promise<L2Tips>;
227
+ /** @deprecated Scheduled for removal; use `getBlock(param).then(r => r?.header)`. */
228
+ getBlockHeader(number: BlockNumber | 'latest'): Promise<BlockHeader | undefined>;
229
+ /** @deprecated Scheduled for removal; use `getBlocks(from, limit, { includeL1PublishInfo: true, includeAttestations: true })`. */
230
+ getCheckpointedBlocks(from: BlockNumber, limit: number): Promise<CheckpointedL2Block[]>;
231
+ /** @deprecated Scheduled for removal; use `getCheckpoints(from, limit)` over an explicit checkpoint range. */
232
+ getCheckpointsDataForEpoch(epoch: EpochNumber): Promise<CheckpointData[]>;
207
233
 
208
234
  /**
209
- * Get a block specified by its archive root.
210
- * @param archive - The archive root being requested.
211
- * @returns The requested block.
235
+ * Unified block fetch. Returns the block identified by `param`, with optional fields controlled
236
+ * by `options`.
237
+ * @param param - A block number, block hash, archive root, chain-tip name, or object variant.
238
+ * @param options - Narrowing options: `includeTransactions`, `includeL1PublishInfo`, `includeAttestations`.
212
239
  */
213
- getBlockByArchive(archive: Fr): Promise<L2Block | undefined>;
240
+ getBlock<Opts extends BlockIncludeOptions = {}>(
241
+ param: BlockParameter,
242
+ options?: Opts,
243
+ ): Promise<BlockResponse<Opts> | undefined>;
214
244
 
215
245
  /**
216
- * Method to fetch the latest block number synchronized by the node.
217
- * @returns The block number.
246
+ * Returns up to `limit` blocks starting from `from`, projected to the {@link BlockResponse}
247
+ * shape determined by `options`.
218
248
  */
219
- getBlockNumber(): Promise<BlockNumber>;
249
+ getBlocks<Opts extends BlockIncludeOptions = {}>(
250
+ from: BlockNumber,
251
+ limit: number,
252
+ options?: Opts,
253
+ ): Promise<BlockResponse<Opts>[]>;
220
254
 
221
255
  /**
222
- * Fetches the latest proven block number.
223
- * @returns The block number.
256
+ * Unified checkpoint fetch. Returns the checkpoint identified by `param`, with optional fields
257
+ * controlled by `options`.
224
258
  */
225
- getProvenBlockNumber(): Promise<BlockNumber>;
259
+ getCheckpoint<Opts extends CheckpointIncludeOptions = {}>(
260
+ param: CheckpointParameter,
261
+ options?: Opts,
262
+ ): Promise<CheckpointResponse<Opts> | undefined>;
226
263
 
227
264
  /**
228
- * Fetches the latest checkpointed block number.
229
- * @returns The block number.
265
+ * Returns up to `limit` checkpoints starting from `from`, projected to the
266
+ * {@link CheckpointResponse} shape determined by `options`.
230
267
  */
231
- getCheckpointedBlockNumber(): Promise<BlockNumber>;
268
+ getCheckpoints<Opts extends CheckpointIncludeOptions = {}>(
269
+ from: CheckpointNumber,
270
+ limit: number,
271
+ options?: Opts,
272
+ ): Promise<CheckpointResponse<Opts>[]>;
232
273
 
233
274
  /**
234
275
  * Method to determine if the node is ready to accept transactions.
@@ -243,20 +284,21 @@ export interface AztecNode
243
284
  */
244
285
  getNodeInfo(): Promise<NodeInfo>;
245
286
 
246
- /**
247
- * Method to request blocks. Will attempt to return all requested blocks but will return only those available.
248
- * @param from - The start of the range of blocks to return.
249
- * @param limit - The maximum number of blocks to return.
250
- * @returns The blocks requested.
251
- */
252
- getBlocks(from: BlockNumber, limit: number): Promise<L2Block[]>;
253
-
254
287
  /**
255
288
  * Method to fetch the current min fees.
256
289
  * @returns The current min fees.
257
290
  */
258
291
  getCurrentMinFees(): Promise<GasFees>;
259
292
 
293
+ /**
294
+ * Returns predicted min fees for the current slot and next N slots.
295
+ * Each entry accounts for the L1 gas oracle transition and congestion growth based on the
296
+ * given mana usage estimate. Defaults to target usage (steady state).
297
+ * @param manaUsage - Expected mana usage per checkpoint (none, target, or limit).
298
+ * @returns An array of GasFees, one per slot in the prediction window.
299
+ */
300
+ getPredictedMinFees(manaUsage?: ManaUsageEstimate): Promise<GasFees[]>;
301
+
260
302
  /**
261
303
  * Method to fetch the current max priority fee of txs in the mempool.
262
304
  * @returns The current max priority fees.
@@ -409,20 +451,6 @@ export interface AztecNode
409
451
  */
410
452
  getPublicStorageAt(referenceBlock: BlockParameter, contract: AztecAddress, slot: Fr): Promise<Fr>;
411
453
 
412
- /**
413
- * Returns the block header for a given block number, block hash, or 'latest'.
414
- * @param block - The block parameter (block number, block hash, or 'latest'). Defaults to 'latest'.
415
- * @returns The requested block header.
416
- */
417
- getBlockHeader(block?: BlockParameter): Promise<BlockHeader | undefined>;
418
-
419
- /**
420
- * Get a block header specified by its archive root.
421
- * @param archive - The archive root being requested.
422
- * @returns The requested block header.
423
- */
424
- getBlockHeaderByArchive(archive: Fr): Promise<BlockHeader | undefined>;
425
-
426
454
  /** Returns stats for validators if enabled. */
427
455
  getValidatorsStats(): Promise<ValidatorsStats>;
428
456
 
@@ -443,7 +471,7 @@ export interface AztecNode
443
471
  /**
444
472
  * Returns true if the transaction is valid for inclusion at the current state. Valid transactions can be
445
473
  * made invalid by *other* transactions if e.g. they emit the same nullifiers, or come become invalid
446
- * due to e.g. the include_by_timestamp property.
474
+ * due to e.g. the expiration_timestamp property.
447
475
  * @param tx - The transaction to validate for correctness.
448
476
  * @param isSimulation - True if the transaction is a simulated one without generated proofs. (Optional)
449
477
  * @param skipFeeEnforcement - True if the validation of the fee should be skipped. Useful when the simulation is for estimating fee (Optional)
@@ -478,8 +506,6 @@ const MAX_SIGNATURES_PER_REGISTER_CALL = 100;
478
506
  const MAX_SIGNATURE_LEN = 10000;
479
507
 
480
508
  export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
481
- getL2Tips: z.function().args().returns(L2TipsSchema),
482
-
483
509
  getWorldStateSyncStatus: z.function().args().returns(WorldStateSyncStatusSchema),
484
510
 
485
511
  findLeavesIndexes: z
@@ -517,7 +543,7 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
517
543
  .args(BlockParameterSchema, schemas.Fr)
518
544
  .returns(z.tuple([schemas.BigInt, SiblingPath.schemaFor(L1_TO_L2_MSG_TREE_HEIGHT)]).optional()),
519
545
 
520
- getL1ToL2MessageBlock: z.function().args(schemas.Fr).returns(BlockNumberSchema.optional()),
546
+ getL1ToL2MessageCheckpoint: z.function().args(schemas.Fr).returns(CheckpointNumberSchema.optional()),
521
547
 
522
548
  isL1ToL2MessageSynced: z.function().args(schemas.Fr).returns(z.boolean()),
523
549
 
@@ -526,39 +552,61 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
526
552
  .args(EpochNumberSchema)
527
553
  .returns(z.array(z.array(z.array(z.array(schemas.Fr))))),
528
554
 
529
- getBlock: z.function().args(BlockParameterSchema).returns(L2Block.schema.optional()),
555
+ getBlockNumber: z.function().args(optional(ChainTipSchema)).returns(BlockNumberSchema),
530
556
 
531
- getBlockByHash: z.function().args(BlockHash.schema).returns(L2Block.schema.optional()),
557
+ getCheckpointNumber: z.function().args(optional(ChainTipSchema)).returns(CheckpointNumberSchema),
532
558
 
533
- getBlockByArchive: z.function().args(schemas.Fr).returns(L2Block.schema.optional()),
559
+ getChainTips: z.function().args().returns(ChainTipsSchema),
534
560
 
535
- getBlockNumber: z.function().returns(BlockNumberSchema),
561
+ getL2Tips: z.function().args().returns(L2TipsSchema),
536
562
 
537
- getProvenBlockNumber: z.function().returns(BlockNumberSchema),
563
+ getBlockHeader: z
564
+ .function()
565
+ .args(z.union([BlockNumberSchema, z.literal('latest')]))
566
+ .returns(BlockHeader.schema.optional()),
538
567
 
539
- getCheckpointedBlockNumber: z.function().returns(BlockNumberSchema),
568
+ getCheckpointedBlocks: z
569
+ .function()
570
+ .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
571
+ .returns(z.array(CheckpointedL2Block.schema)),
540
572
 
541
- isReady: z.function().returns(z.boolean()),
573
+ getCheckpointsDataForEpoch: z.function().args(EpochNumberSchema).returns(z.array(CheckpointDataSchema)),
542
574
 
543
- getNodeInfo: z.function().returns(NodeInfoSchema),
575
+ getBlock: z
576
+ .function()
577
+ .args(BlockParameterSchema, optional(BlockIncludeOptionsSchema))
578
+ .returns(BlockResponseSchema.optional()),
544
579
 
545
580
  getBlocks: z
546
581
  .function()
547
- .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
548
- .returns(z.array(L2Block.schema)),
582
+ .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN), optional(BlockIncludeOptionsSchema))
583
+ .returns(z.array(BlockResponseSchema)),
549
584
 
550
- getCheckpoints: z
585
+ getCheckpoint: z
551
586
  .function()
552
- .args(CheckpointNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_CHECKPOINTS_LEN))
553
- .returns(z.array(PublishedCheckpoint.schema)),
587
+ .args(CheckpointParameterSchema, optional(CheckpointIncludeOptionsSchema))
588
+ .returns(CheckpointResponseSchema.optional()),
554
589
 
555
- getCheckpointedBlocks: z
590
+ getCheckpoints: z
556
591
  .function()
557
- .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
558
- .returns(z.array(CheckpointedL2Block.schema)),
592
+ .args(
593
+ CheckpointNumberPositiveSchema,
594
+ z.number().gt(0).lte(MAX_RPC_CHECKPOINTS_LEN),
595
+ optional(CheckpointIncludeOptionsSchema),
596
+ )
597
+ .returns(z.array(CheckpointResponseSchema)),
598
+
599
+ isReady: z.function().returns(z.boolean()),
600
+
601
+ getNodeInfo: z.function().returns(NodeInfoSchema),
559
602
 
560
603
  getCurrentMinFees: z.function().returns(GasFees.schema),
561
604
 
605
+ getPredictedMinFees: z
606
+ .function()
607
+ .args(optional(z.nativeEnum(ManaUsageEstimate)))
608
+ .returns(z.array(GasFees.schema)),
609
+
562
610
  getMaxPriorityFees: z.function().returns(GasFees.schema),
563
611
 
564
612
  getNodeVersion: z.function().returns(z.string()),
@@ -614,10 +662,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
614
662
 
615
663
  getPublicStorageAt: z.function().args(BlockParameterSchema, schemas.AztecAddress, schemas.Fr).returns(schemas.Fr),
616
664
 
617
- getBlockHeader: z.function().args(optional(BlockParameterSchema)).returns(BlockHeader.schema.optional()),
618
-
619
- getBlockHeaderByArchive: z.function().args(schemas.Fr).returns(BlockHeader.schema.optional()),
620
-
621
665
  getValidatorsStats: z.function().returns(ValidatorsStatsSchema),
622
666
 
623
667
  getValidatorStats: z