@aztec/stdlib 0.0.1-commit.54489865 → 0.0.1-commit.5914bae

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 (574) hide show
  1. package/dest/abi/abi.d.ts +57 -85
  2. package/dest/abi/abi.d.ts.map +1 -1
  3. package/dest/abi/abi.js +55 -6
  4. package/dest/abi/buffer.d.ts +14 -4
  5. package/dest/abi/buffer.d.ts.map +1 -1
  6. package/dest/abi/buffer.js +25 -4
  7. package/dest/abi/decoder.d.ts +6 -45
  8. package/dest/abi/decoder.d.ts.map +1 -1
  9. package/dest/abi/decoder.js +17 -70
  10. package/dest/abi/encoder.d.ts +1 -1
  11. package/dest/abi/encoder.d.ts.map +1 -1
  12. package/dest/abi/encoder.js +37 -6
  13. package/dest/abi/event_metadata_definition.d.ts +3 -1
  14. package/dest/abi/event_metadata_definition.d.ts.map +1 -1
  15. package/dest/abi/event_metadata_definition.js +1 -1
  16. package/dest/abi/function_call.d.ts +39 -9
  17. package/dest/abi/function_call.d.ts.map +1 -1
  18. package/dest/abi/function_call.js +20 -3
  19. package/dest/abi/function_selector.js +1 -1
  20. package/dest/abi/function_signature_decoder.d.ts +43 -0
  21. package/dest/abi/function_signature_decoder.d.ts.map +1 -0
  22. package/dest/abi/function_signature_decoder.js +66 -0
  23. package/dest/abi/index.d.ts +2 -1
  24. package/dest/abi/index.d.ts.map +1 -1
  25. package/dest/abi/index.js +1 -0
  26. package/dest/abi/selector.d.ts +2 -2
  27. package/dest/abi/selector.d.ts.map +1 -1
  28. package/dest/abi/selector.js +1 -1
  29. package/dest/abi/utils.d.ts +14 -1
  30. package/dest/abi/utils.d.ts.map +1 -1
  31. package/dest/abi/utils.js +15 -0
  32. package/dest/auth_witness/auth_witness.js +3 -3
  33. package/dest/avm/avm.d.ts +300 -300
  34. package/dest/avm/avm_accumulated_data.js +2 -2
  35. package/dest/avm/avm_circuit_public_inputs.js +2 -2
  36. package/dest/avm/avm_proving_request.d.ts +166 -166
  37. package/dest/avm/revert_code.d.ts +9 -4
  38. package/dest/avm/revert_code.d.ts.map +1 -1
  39. package/dest/avm/revert_code.js +16 -21
  40. package/dest/block/block_data.d.ts +52 -0
  41. package/dest/block/block_data.d.ts.map +1 -0
  42. package/dest/block/block_data.js +12 -0
  43. package/dest/block/in_block.js +1 -1
  44. package/dest/block/index.d.ts +2 -1
  45. package/dest/block/index.d.ts.map +1 -1
  46. package/dest/block/index.js +1 -0
  47. package/dest/block/l2_block.d.ts +9 -1
  48. package/dest/block/l2_block.d.ts.map +1 -1
  49. package/dest/block/l2_block.js +12 -2
  50. package/dest/block/l2_block_source.d.ts +35 -8
  51. package/dest/block/l2_block_source.d.ts.map +1 -1
  52. package/dest/block/l2_block_stream/interfaces.d.ts +6 -3
  53. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  54. package/dest/block/l2_block_stream/l2_block_stream.d.ts +1 -1
  55. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  56. package/dest/block/l2_block_stream/l2_block_stream.js +10 -0
  57. package/dest/checkpoint/checkpoint.d.ts +22 -7
  58. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  59. package/dest/checkpoint/checkpoint.js +32 -16
  60. package/dest/checkpoint/checkpoint_data.d.ts +120 -0
  61. package/dest/checkpoint/checkpoint_data.d.ts.map +1 -0
  62. package/dest/checkpoint/checkpoint_data.js +26 -0
  63. package/dest/checkpoint/index.d.ts +3 -1
  64. package/dest/checkpoint/index.d.ts.map +1 -1
  65. package/dest/checkpoint/index.js +2 -0
  66. package/dest/checkpoint/published_checkpoint.d.ts +17 -2
  67. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  68. package/dest/checkpoint/published_checkpoint.js +1 -2
  69. package/dest/checkpoint/validate.d.ts +36 -0
  70. package/dest/checkpoint/validate.d.ts.map +1 -0
  71. package/dest/checkpoint/validate.js +120 -0
  72. package/dest/config/index.d.ts +2 -1
  73. package/dest/config/index.d.ts.map +1 -1
  74. package/dest/config/index.js +1 -0
  75. package/dest/config/sequencer-config.d.ts +10 -0
  76. package/dest/config/sequencer-config.d.ts.map +1 -0
  77. package/dest/config/sequencer-config.js +23 -0
  78. package/dest/contract/contract_address.js +4 -4
  79. package/dest/contract/contract_class.d.ts +2 -3
  80. package/dest/contract/contract_class.d.ts.map +1 -1
  81. package/dest/contract/contract_class_id.d.ts +1 -1
  82. package/dest/contract/contract_class_id.d.ts.map +1 -1
  83. package/dest/contract/contract_class_id.js +5 -4
  84. package/dest/contract/interfaces/node-info.d.ts +3 -1
  85. package/dest/contract/interfaces/node-info.d.ts.map +1 -1
  86. package/dest/contract/interfaces/node-info.js +2 -1
  87. package/dest/contract/private_function.js +2 -2
  88. package/dest/database-version/database_version.d.ts +58 -0
  89. package/dest/database-version/database_version.d.ts.map +1 -0
  90. package/dest/database-version/database_version.js +69 -0
  91. package/dest/database-version/version_manager.d.ts +2 -50
  92. package/dest/database-version/version_manager.d.ts.map +1 -1
  93. package/dest/database-version/version_manager.js +1 -66
  94. package/dest/epoch-helpers/index.d.ts +13 -1
  95. package/dest/epoch-helpers/index.d.ts.map +1 -1
  96. package/dest/epoch-helpers/index.js +15 -2
  97. package/dest/file-store/local.d.ts +3 -3
  98. package/dest/file-store/local.d.ts.map +1 -1
  99. package/dest/file-store/local.js +13 -4
  100. package/dest/file-store/s3.d.ts +1 -1
  101. package/dest/file-store/s3.d.ts.map +1 -1
  102. package/dest/file-store/s3.js +11 -3
  103. package/dest/gas/gas_fees.d.ts +1 -1
  104. package/dest/gas/gas_fees.d.ts.map +1 -1
  105. package/dest/gas/gas_fees.js +4 -1
  106. package/dest/gas/gas_settings.d.ts +40 -3
  107. package/dest/gas/gas_settings.d.ts.map +1 -1
  108. package/dest/gas/gas_settings.js +50 -6
  109. package/dest/hash/hash.d.ts +20 -1
  110. package/dest/hash/hash.d.ts.map +1 -1
  111. package/dest/hash/hash.js +45 -10
  112. package/dest/hash/map_slot.js +2 -2
  113. package/dest/interfaces/allowed_element.d.ts +26 -20
  114. package/dest/interfaces/allowed_element.d.ts.map +1 -1
  115. package/dest/interfaces/allowed_element.js +8 -8
  116. package/dest/interfaces/archiver.d.ts +1 -1
  117. package/dest/interfaces/archiver.d.ts.map +1 -1
  118. package/dest/interfaces/archiver.js +8 -2
  119. package/dest/interfaces/aztec-node-admin.d.ts +109 -29
  120. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  121. package/dest/interfaces/aztec-node-admin.js +12 -4
  122. package/dest/interfaces/aztec-node-debug.d.ts +21 -0
  123. package/dest/interfaces/aztec-node-debug.d.ts.map +1 -0
  124. package/dest/interfaces/aztec-node-debug.js +18 -0
  125. package/dest/interfaces/aztec-node.d.ts +41 -56
  126. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  127. package/dest/interfaces/aztec-node.js +7 -8
  128. package/dest/interfaces/block-builder.d.ts +43 -11
  129. package/dest/interfaces/block-builder.d.ts.map +1 -1
  130. package/dest/interfaces/block-builder.js +16 -2
  131. package/dest/interfaces/client.d.ts +2 -1
  132. package/dest/interfaces/client.d.ts.map +1 -1
  133. package/dest/interfaces/client.js +1 -0
  134. package/dest/interfaces/configs.d.ts +77 -32
  135. package/dest/interfaces/configs.d.ts.map +1 -1
  136. package/dest/interfaces/configs.js +10 -3
  137. package/dest/interfaces/get_logs_response.d.ts +8 -1
  138. package/dest/interfaces/get_logs_response.d.ts.map +1 -1
  139. package/dest/interfaces/merkle_tree_operations.d.ts +10 -20
  140. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  141. package/dest/interfaces/p2p.d.ts +4 -9
  142. package/dest/interfaces/p2p.d.ts.map +1 -1
  143. package/dest/interfaces/prover-broker.d.ts +16 -1
  144. package/dest/interfaces/prover-broker.d.ts.map +1 -1
  145. package/dest/interfaces/prover-broker.js +4 -1
  146. package/dest/interfaces/prover-client.d.ts +11 -1
  147. package/dest/interfaces/prover-client.d.ts.map +1 -1
  148. package/dest/interfaces/prover-client.js +12 -1
  149. package/dest/interfaces/proving-job.d.ts +202 -202
  150. package/dest/interfaces/slasher.d.ts +9 -1
  151. package/dest/interfaces/slasher.d.ts.map +1 -1
  152. package/dest/interfaces/slasher.js +2 -0
  153. package/dest/interfaces/validator.d.ts +114 -26
  154. package/dest/interfaces/validator.d.ts.map +1 -1
  155. package/dest/interfaces/validator.js +9 -2
  156. package/dest/interfaces/world_state.d.ts +5 -4
  157. package/dest/interfaces/world_state.d.ts.map +1 -1
  158. package/dest/kernel/claimed_length_array.js +1 -1
  159. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +3 -3
  160. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
  161. package/dest/kernel/hints/build_note_hash_read_request_hints.js +13 -10
  162. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +3 -3
  163. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
  164. package/dest/kernel/hints/build_nullifier_read_request_hints.js +13 -10
  165. package/dest/kernel/hints/build_transient_data_hints.d.ts +5 -2
  166. package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
  167. package/dest/kernel/hints/build_transient_data_hints.js +9 -3
  168. package/dest/kernel/hints/index.d.ts +2 -2
  169. package/dest/kernel/hints/index.js +2 -2
  170. package/dest/kernel/hints/key_validation_request_and_separator.d.ts +24 -0
  171. package/dest/kernel/hints/key_validation_request_and_separator.d.ts.map +1 -0
  172. package/dest/kernel/hints/{key_validation_request_and_generator.js → key_validation_request_and_separator.js} +12 -15
  173. package/dest/kernel/hints/private_kernel_reset_hints.d.ts +1 -1
  174. package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
  175. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts → scoped_key_validation_request_and_separator.d.ts} +8 -8
  176. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts.map → scoped_key_validation_request_and_separator.d.ts.map} +1 -1
  177. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.js → scoped_key_validation_request_and_separator.js} +6 -6
  178. package/dest/kernel/padded_side_effects.js +1 -1
  179. package/dest/kernel/private_circuit_public_inputs.d.ts +9 -9
  180. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  181. package/dest/kernel/private_circuit_public_inputs.js +16 -16
  182. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +3 -3
  183. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  184. package/dest/kernel/private_kernel_circuit_public_inputs.js +4 -4
  185. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +3 -3
  186. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
  187. package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +4 -4
  188. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +4 -3
  189. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  190. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +11 -7
  191. package/dest/kernel/private_to_avm_accumulated_data.js +2 -2
  192. package/dest/kernel/private_to_public_accumulated_data.js +2 -2
  193. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +3 -3
  194. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  195. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -7
  196. package/dest/kernel/private_to_rollup_accumulated_data.js +1 -1
  197. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +3 -3
  198. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  199. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +7 -7
  200. package/dest/kernel/private_validation_requests.d.ts +3 -3
  201. package/dest/kernel/private_validation_requests.js +9 -9
  202. package/dest/keys/derivation.d.ts +3 -3
  203. package/dest/keys/derivation.js +15 -15
  204. package/dest/keys/key_types.d.ts +3 -3
  205. package/dest/keys/key_types.d.ts.map +1 -1
  206. package/dest/keys/public_keys.js +2 -2
  207. package/dest/keys/utils.d.ts +1 -1
  208. package/dest/keys/utils.d.ts.map +1 -1
  209. package/dest/keys/utils.js +8 -4
  210. package/dest/l1-contracts/slash_factory.d.ts +1 -1
  211. package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
  212. package/dest/l1-contracts/slash_factory.js +1 -0
  213. package/dest/logs/debug_log_store.d.ts +30 -0
  214. package/dest/logs/debug_log_store.d.ts.map +1 -0
  215. package/dest/logs/debug_log_store.js +30 -0
  216. package/dest/logs/extended_directional_app_tagging_secret.d.ts +47 -0
  217. package/dest/logs/extended_directional_app_tagging_secret.d.ts.map +1 -0
  218. package/dest/logs/{directional_app_tagging_secret.js → extended_directional_app_tagging_secret.js} +35 -20
  219. package/dest/logs/extended_public_log.d.ts +7 -1
  220. package/dest/logs/extended_public_log.d.ts.map +1 -1
  221. package/dest/logs/index.d.ts +4 -2
  222. package/dest/logs/index.d.ts.map +1 -1
  223. package/dest/logs/index.js +3 -1
  224. package/dest/logs/log_filter.d.ts +4 -1
  225. package/dest/logs/log_filter.d.ts.map +1 -1
  226. package/dest/logs/log_filter.js +2 -1
  227. package/dest/logs/log_id.d.ts +10 -7
  228. package/dest/logs/log_id.d.ts.map +1 -1
  229. package/dest/logs/log_id.js +15 -13
  230. package/dest/logs/message_context.d.ts +4 -7
  231. package/dest/logs/message_context.d.ts.map +1 -1
  232. package/dest/logs/message_context.js +23 -9
  233. package/dest/logs/pending_tagged_log.d.ts +2 -3
  234. package/dest/logs/pending_tagged_log.d.ts.map +1 -1
  235. package/dest/logs/pending_tagged_log.js +2 -2
  236. package/dest/logs/pre_tag.d.ts +16 -11
  237. package/dest/logs/pre_tag.d.ts.map +1 -1
  238. package/dest/logs/pre_tag.js +2 -2
  239. package/dest/logs/private_log.d.ts +2 -2
  240. package/dest/logs/private_log.d.ts.map +1 -1
  241. package/dest/logs/private_log.js +1 -1
  242. package/dest/logs/public_log.d.ts +4 -3
  243. package/dest/logs/public_log.d.ts.map +1 -1
  244. package/dest/logs/public_log.js +9 -2
  245. package/dest/logs/shared_secret_derivation.d.ts +11 -10
  246. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  247. package/dest/logs/shared_secret_derivation.js +15 -9
  248. package/dest/logs/siloed_tag.d.ts +8 -3
  249. package/dest/logs/siloed_tag.d.ts.map +1 -1
  250. package/dest/logs/siloed_tag.js +12 -7
  251. package/dest/logs/tag.js +1 -1
  252. package/dest/logs/tagging_index_range.d.ts +40 -0
  253. package/dest/logs/tagging_index_range.d.ts.map +1 -0
  254. package/dest/logs/tagging_index_range.js +8 -0
  255. package/dest/logs/tx_scoped_l2_log.d.ts +3 -1
  256. package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
  257. package/dest/logs/tx_scoped_l2_log.js +7 -0
  258. package/dest/messaging/l1_to_l2_message.d.ts +3 -2
  259. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  260. package/dest/messaging/l1_to_l2_message.js +11 -13
  261. package/dest/messaging/l2_to_l1_membership.d.ts +34 -8
  262. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  263. package/dest/messaging/l2_to_l1_membership.js +72 -29
  264. package/dest/noir/index.d.ts +3 -3
  265. package/dest/noir/index.d.ts.map +1 -1
  266. package/dest/note/index.d.ts +1 -2
  267. package/dest/note/index.d.ts.map +1 -1
  268. package/dest/note/index.js +0 -1
  269. package/dest/note/note_dao.d.ts +1 -1
  270. package/dest/note/note_dao.d.ts.map +1 -1
  271. package/dest/note/note_dao.js +1 -4
  272. package/dest/p2p/attestation_utils.d.ts +11 -1
  273. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  274. package/dest/p2p/attestation_utils.js +45 -0
  275. package/dest/p2p/block_proposal.d.ts +1 -1
  276. package/dest/p2p/block_proposal.d.ts.map +1 -1
  277. package/dest/p2p/block_proposal.js +1 -3
  278. package/dest/p2p/checkpoint_attestation.d.ts +2 -1
  279. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
  280. package/dest/p2p/checkpoint_attestation.js +1 -1
  281. package/dest/p2p/checkpoint_proposal.d.ts +17 -10
  282. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
  283. package/dest/p2p/checkpoint_proposal.js +40 -36
  284. package/dest/p2p/client_type.d.ts +2 -5
  285. package/dest/p2p/client_type.d.ts.map +1 -1
  286. package/dest/p2p/client_type.js +0 -7
  287. package/dest/p2p/consensus_payload.d.ts +12 -3
  288. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  289. package/dest/p2p/consensus_payload.js +22 -15
  290. package/dest/p2p/constants.d.ts +3 -1
  291. package/dest/p2p/constants.d.ts.map +1 -1
  292. package/dest/p2p/constants.js +1 -0
  293. package/dest/p2p/index.d.ts +1 -2
  294. package/dest/p2p/index.d.ts.map +1 -1
  295. package/dest/p2p/index.js +0 -1
  296. package/dest/p2p/peer_error.d.ts +3 -1
  297. package/dest/p2p/peer_error.d.ts.map +1 -1
  298. package/dest/p2p/peer_error.js +5 -0
  299. package/dest/p2p/topic_type.d.ts +3 -4
  300. package/dest/p2p/topic_type.d.ts.map +1 -1
  301. package/dest/p2p/topic_type.js +7 -24
  302. package/dest/parity/parity_base_private_inputs.js +1 -1
  303. package/dest/proofs/chonk_proof.d.ts +1 -1
  304. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  305. package/dest/proofs/chonk_proof.js +7 -1
  306. package/dest/rollup/base_rollup_hints.js +2 -2
  307. package/dest/rollup/block_root_rollup_private_inputs.js +5 -5
  308. package/dest/rollup/checkpoint_header.d.ts +2 -2
  309. package/dest/rollup/checkpoint_header.js +2 -2
  310. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +6 -6
  311. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  312. package/dest/rollup/checkpoint_rollup_public_inputs.js +2 -2
  313. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +2 -2
  314. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  315. package/dest/rollup/checkpoint_root_rollup_private_inputs.js +3 -3
  316. package/dest/rollup/root_rollup_public_inputs.d.ts +6 -6
  317. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  318. package/dest/rollup/root_rollup_public_inputs.js +3 -3
  319. package/dest/rollup/tree_snapshot_diff_hints.js +2 -2
  320. package/dest/slashing/empire.d.ts +1 -1
  321. package/dest/slashing/empire.d.ts.map +1 -1
  322. package/dest/slashing/empire.js +2 -0
  323. package/dest/slashing/helpers.d.ts +2 -2
  324. package/dest/slashing/helpers.d.ts.map +1 -1
  325. package/dest/slashing/helpers.js +6 -0
  326. package/dest/slashing/tally.d.ts +8 -2
  327. package/dest/slashing/tally.d.ts.map +1 -1
  328. package/dest/slashing/tally.js +35 -3
  329. package/dest/slashing/types.d.ts +7 -3
  330. package/dest/slashing/types.d.ts.map +1 -1
  331. package/dest/slashing/types.js +13 -1
  332. package/dest/stats/stats.d.ts +1 -3
  333. package/dest/stats/stats.d.ts.map +1 -1
  334. package/dest/tests/factories.d.ts +3 -1
  335. package/dest/tests/factories.d.ts.map +1 -1
  336. package/dest/tests/factories.js +22 -14
  337. package/dest/tests/mocks.d.ts +8 -3
  338. package/dest/tests/mocks.d.ts.map +1 -1
  339. package/dest/tests/mocks.js +33 -23
  340. package/dest/timetable/index.d.ts +37 -0
  341. package/dest/timetable/index.d.ts.map +1 -0
  342. package/dest/timetable/index.js +39 -0
  343. package/dest/trees/public_data_leaf.d.ts +2 -1
  344. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  345. package/dest/trees/public_data_leaf.js +7 -6
  346. package/dest/tx/block_header.d.ts +3 -1
  347. package/dest/tx/block_header.d.ts.map +1 -1
  348. package/dest/tx/block_header.js +6 -2
  349. package/dest/tx/capsule.d.ts +6 -2
  350. package/dest/tx/capsule.d.ts.map +1 -1
  351. package/dest/tx/capsule.js +9 -3
  352. package/dest/tx/global_variables.d.ts +4 -4
  353. package/dest/tx/global_variables.d.ts.map +1 -1
  354. package/dest/tx/private_execution_result.d.ts +6 -6
  355. package/dest/tx/private_execution_result.d.ts.map +1 -1
  356. package/dest/tx/private_execution_result.js +6 -6
  357. package/dest/tx/profiling.d.ts +17 -5
  358. package/dest/tx/profiling.d.ts.map +1 -1
  359. package/dest/tx/profiling.js +15 -5
  360. package/dest/tx/protocol_contracts.d.ts +1 -1
  361. package/dest/tx/protocol_contracts.d.ts.map +1 -1
  362. package/dest/tx/protocol_contracts.js +4 -4
  363. package/dest/tx/public_simulation_output.d.ts +4 -2
  364. package/dest/tx/public_simulation_output.d.ts.map +1 -1
  365. package/dest/tx/public_simulation_output.js +7 -3
  366. package/dest/tx/simulated_tx.d.ts +63 -77
  367. package/dest/tx/simulated_tx.d.ts.map +1 -1
  368. package/dest/tx/simulated_tx.js +7 -4
  369. package/dest/tx/tx.d.ts +6 -5
  370. package/dest/tx/tx.d.ts.map +1 -1
  371. package/dest/tx/tx.js +18 -6
  372. package/dest/tx/tx_receipt.d.ts +29 -6
  373. package/dest/tx/tx_receipt.d.ts.map +1 -1
  374. package/dest/tx/tx_receipt.js +23 -19
  375. package/dest/tx/tx_request.js +2 -2
  376. package/dest/tx/validator/empty_validator.d.ts +2 -2
  377. package/dest/tx/validator/empty_validator.d.ts.map +1 -1
  378. package/dest/tx/validator/error_texts.d.ts +10 -2
  379. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  380. package/dest/tx/validator/error_texts.js +11 -1
  381. package/dest/tx/validator/tx_validator.d.ts +2 -2
  382. package/dest/tx/validator/tx_validator.d.ts.map +1 -1
  383. package/dest/update-checker/index.d.ts +3 -2
  384. package/dest/update-checker/index.d.ts.map +1 -1
  385. package/dest/update-checker/index.js +2 -1
  386. package/dest/update-checker/package_version.d.ts +3 -0
  387. package/dest/update-checker/package_version.d.ts.map +1 -0
  388. package/dest/update-checker/package_version.js +24 -0
  389. package/dest/update-checker/version_checker.d.ts +25 -0
  390. package/dest/update-checker/version_checker.d.ts.map +1 -0
  391. package/dest/update-checker/version_checker.js +50 -0
  392. package/dest/validators/errors.d.ts +6 -1
  393. package/dest/validators/errors.d.ts.map +1 -1
  394. package/dest/validators/errors.js +7 -0
  395. package/dest/validators/schemas.d.ts +30 -30
  396. package/dest/validators/schemas.d.ts.map +1 -1
  397. package/dest/validators/schemas.js +4 -3
  398. package/dest/validators/types.d.ts +3 -3
  399. package/dest/validators/types.d.ts.map +1 -1
  400. package/dest/versioning/versioning.d.ts +4 -2
  401. package/dest/versioning/versioning.d.ts.map +1 -1
  402. package/dest/versioning/versioning.js +4 -1
  403. package/dest/vks/vk_data.js +1 -1
  404. package/package.json +25 -13
  405. package/src/abi/abi.ts +78 -2
  406. package/src/abi/buffer.ts +25 -4
  407. package/src/abi/decoder.ts +36 -82
  408. package/src/abi/encoder.ts +49 -6
  409. package/src/abi/event_metadata_definition.ts +2 -0
  410. package/src/abi/function_call.ts +25 -3
  411. package/src/abi/function_selector.ts +1 -1
  412. package/src/abi/function_signature_decoder.ts +77 -0
  413. package/src/abi/index.ts +1 -0
  414. package/src/abi/selector.ts +1 -1
  415. package/src/abi/utils.ts +25 -0
  416. package/src/auth_witness/auth_witness.ts +3 -3
  417. package/src/avm/avm_accumulated_data.ts +6 -6
  418. package/src/avm/avm_circuit_public_inputs.ts +4 -4
  419. package/src/avm/revert_code.ts +26 -25
  420. package/src/block/block_data.ts +26 -0
  421. package/src/block/in_block.ts +1 -1
  422. package/src/block/index.ts +1 -0
  423. package/src/block/l2_block.ts +13 -1
  424. package/src/block/l2_block_source.ts +38 -7
  425. package/src/block/l2_block_stream/interfaces.ts +6 -2
  426. package/src/block/l2_block_stream/l2_block_stream.ts +21 -0
  427. package/src/checkpoint/checkpoint.ts +43 -16
  428. package/src/checkpoint/checkpoint_data.ts +51 -0
  429. package/src/checkpoint/index.ts +2 -0
  430. package/src/checkpoint/published_checkpoint.ts +3 -1
  431. package/src/checkpoint/validate.ts +230 -0
  432. package/src/config/index.ts +1 -0
  433. package/src/config/sequencer-config.ts +34 -0
  434. package/src/contract/contract_address.ts +4 -4
  435. package/src/contract/contract_class.ts +3 -3
  436. package/src/contract/contract_class_id.ts +5 -4
  437. package/src/contract/interfaces/node-info.ts +3 -0
  438. package/src/contract/private_function.ts +2 -2
  439. package/src/database-version/database_version.ts +87 -0
  440. package/src/database-version/version_manager.ts +1 -77
  441. package/src/epoch-helpers/index.ts +25 -0
  442. package/src/file-store/local.ts +15 -5
  443. package/src/file-store/s3.ts +12 -3
  444. package/src/gas/README.md +123 -0
  445. package/src/gas/gas_fees.ts +7 -1
  446. package/src/gas/gas_settings.ts +65 -12
  447. package/src/hash/hash.ts +48 -10
  448. package/src/hash/map_slot.ts +2 -2
  449. package/src/interfaces/allowed_element.ts +29 -9
  450. package/src/interfaces/archiver.ts +8 -2
  451. package/src/interfaces/aztec-node-admin.ts +26 -2
  452. package/src/interfaces/aztec-node-debug.ts +40 -0
  453. package/src/interfaces/aztec-node.ts +60 -92
  454. package/src/interfaces/block-builder.ts +66 -11
  455. package/src/interfaces/client.ts +1 -0
  456. package/src/interfaces/configs.ts +36 -8
  457. package/src/interfaces/merkle_tree_operations.ts +9 -19
  458. package/src/interfaces/p2p.ts +3 -14
  459. package/src/interfaces/prover-broker.ts +22 -0
  460. package/src/interfaces/prover-client.ts +15 -0
  461. package/src/interfaces/slasher.ts +4 -0
  462. package/src/interfaces/validator.ts +29 -3
  463. package/src/interfaces/world_state.ts +4 -3
  464. package/src/kernel/claimed_length_array.ts +2 -2
  465. package/src/kernel/hints/build_note_hash_read_request_hints.ts +14 -18
  466. package/src/kernel/hints/build_nullifier_read_request_hints.ts +15 -18
  467. package/src/kernel/hints/build_transient_data_hints.ts +17 -2
  468. package/src/kernel/hints/index.ts +2 -2
  469. package/src/kernel/hints/{key_validation_request_and_generator.ts → key_validation_request_and_separator.ts} +12 -15
  470. package/src/kernel/hints/private_kernel_reset_hints.ts +5 -2
  471. package/src/kernel/hints/read_request_hints.ts +3 -3
  472. package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +10 -10
  473. package/src/kernel/padded_side_effects.ts +3 -3
  474. package/src/kernel/private_circuit_public_inputs.ts +14 -14
  475. package/src/kernel/private_kernel_circuit_public_inputs.ts +2 -2
  476. package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -2
  477. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +14 -5
  478. package/src/kernel/private_to_avm_accumulated_data.ts +4 -4
  479. package/src/kernel/private_to_public_accumulated_data.ts +10 -10
  480. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +5 -5
  481. package/src/kernel/private_to_rollup_accumulated_data.ts +5 -5
  482. package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +5 -5
  483. package/src/kernel/private_validation_requests.ts +8 -8
  484. package/src/keys/derivation.ts +15 -15
  485. package/src/keys/key_types.ts +6 -2
  486. package/src/keys/public_keys.ts +2 -2
  487. package/src/keys/utils.ts +8 -4
  488. package/src/l1-contracts/slash_factory.ts +1 -0
  489. package/src/logs/debug_log_store.ts +54 -0
  490. package/src/logs/{directional_app_tagging_secret.ts → extended_directional_app_tagging_secret.ts} +41 -22
  491. package/src/logs/index.ts +3 -1
  492. package/src/logs/log_filter.ts +5 -0
  493. package/src/logs/log_id.ts +15 -12
  494. package/src/logs/message_context.ts +17 -7
  495. package/src/logs/pending_tagged_log.ts +1 -3
  496. package/src/logs/pre_tag.ts +5 -5
  497. package/src/logs/private_log.ts +1 -1
  498. package/src/logs/public_log.ts +15 -3
  499. package/src/logs/shared_secret_derivation.ts +21 -10
  500. package/src/logs/siloed_tag.ts +15 -5
  501. package/src/logs/tag.ts +1 -1
  502. package/src/logs/tagging_index_range.ts +24 -0
  503. package/src/logs/tx_scoped_l2_log.ts +16 -0
  504. package/src/messaging/l1_to_l2_message.ts +12 -9
  505. package/src/messaging/l2_to_l1_membership.ts +101 -36
  506. package/src/noir/index.ts +2 -2
  507. package/src/note/index.ts +0 -1
  508. package/src/note/note_dao.ts +1 -4
  509. package/src/p2p/attestation_utils.ts +56 -0
  510. package/src/p2p/block_proposal.ts +0 -2
  511. package/src/p2p/checkpoint_attestation.ts +6 -1
  512. package/src/p2p/checkpoint_proposal.ts +66 -48
  513. package/src/p2p/client_type.ts +0 -6
  514. package/src/p2p/consensus_payload.ts +25 -12
  515. package/src/p2p/constants.ts +3 -0
  516. package/src/p2p/index.ts +0 -1
  517. package/src/p2p/peer_error.ts +7 -0
  518. package/src/p2p/topic_type.ts +8 -15
  519. package/src/parity/parity_base_private_inputs.ts +1 -1
  520. package/src/proofs/chonk_proof.ts +9 -1
  521. package/src/rollup/base_rollup_hints.ts +2 -2
  522. package/src/rollup/block_root_rollup_private_inputs.ts +8 -8
  523. package/src/rollup/checkpoint_header.ts +2 -2
  524. package/src/rollup/checkpoint_rollup_public_inputs.ts +5 -5
  525. package/src/rollup/checkpoint_root_rollup_private_inputs.ts +4 -4
  526. package/src/rollup/root_rollup_public_inputs.ts +7 -7
  527. package/src/rollup/tree_snapshot_diff_hints.ts +5 -5
  528. package/src/slashing/empire.ts +3 -1
  529. package/src/slashing/helpers.ts +8 -0
  530. package/src/slashing/tally.ts +41 -2
  531. package/src/slashing/types.ts +14 -0
  532. package/src/stats/stats.ts +0 -2
  533. package/src/tests/factories.ts +27 -18
  534. package/src/tests/mocks.ts +47 -21
  535. package/src/timetable/index.ts +66 -0
  536. package/src/trees/public_data_leaf.ts +11 -5
  537. package/src/tx/block_header.ts +8 -2
  538. package/src/tx/capsule.ts +10 -2
  539. package/src/tx/global_variables.ts +3 -3
  540. package/src/tx/private_execution_result.ts +5 -5
  541. package/src/tx/profiling.ts +14 -5
  542. package/src/tx/protocol_contracts.ts +4 -4
  543. package/src/tx/public_simulation_output.ts +4 -0
  544. package/src/tx/simulated_tx.ts +14 -3
  545. package/src/tx/tx.ts +20 -11
  546. package/src/tx/tx_receipt.ts +28 -16
  547. package/src/tx/tx_request.ts +2 -2
  548. package/src/tx/validator/empty_validator.ts +1 -1
  549. package/src/tx/validator/error_texts.ts +13 -1
  550. package/src/tx/validator/tx_validator.ts +1 -1
  551. package/src/update-checker/index.ts +2 -1
  552. package/src/update-checker/package_version.ts +30 -0
  553. package/src/update-checker/version_checker.ts +65 -0
  554. package/src/validators/errors.ts +9 -0
  555. package/src/validators/schemas.ts +8 -1
  556. package/src/validators/types.ts +5 -4
  557. package/src/versioning/versioning.ts +4 -1
  558. package/src/vks/vk_data.ts +1 -1
  559. package/dest/database-version/index.d.ts +0 -2
  560. package/dest/database-version/index.d.ts.map +0 -1
  561. package/dest/database-version/index.js +0 -1
  562. package/dest/kernel/hints/key_validation_request_and_generator.d.ts +0 -30
  563. package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +0 -1
  564. package/dest/logs/directional_app_tagging_secret.d.ts +0 -40
  565. package/dest/logs/directional_app_tagging_secret.d.ts.map +0 -1
  566. package/dest/note/notes_filter.d.ts +0 -27
  567. package/dest/note/notes_filter.d.ts.map +0 -1
  568. package/dest/note/notes_filter.js +0 -11
  569. package/dest/update-checker/update-checker.d.ts +0 -49
  570. package/dest/update-checker/update-checker.d.ts.map +0 -1
  571. package/dest/update-checker/update-checker.js +0 -130
  572. package/src/database-version/index.ts +0 -1
  573. package/src/note/notes_filter.ts +0 -38
  574. package/src/update-checker/update-checker.ts +0 -166
package/src/hash/hash.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { GeneratorIndex, NULL_MSG_SENDER_CONTRACT_ADDRESS } from '@aztec/constants';
1
+ import { DomainSeparator, NULL_MSG_SENDER_CONTRACT_ADDRESS } from '@aztec/constants';
2
2
  import { poseidon2Hash, poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
3
3
  import { sha256ToField } from '@aztec/foundation/crypto/sha256';
4
4
  import { Fr } from '@aztec/foundation/curves/bn254';
@@ -23,7 +23,7 @@ export async function hashVK(keyAsFields: Fr[]): Promise<Fr> {
23
23
  * @returns A note hash nonce.
24
24
  */
25
25
  export function computeNoteHashNonce(nullifierZero: Fr, noteHashIndex: number): Promise<Fr> {
26
- return poseidon2HashWithSeparator([nullifierZero, noteHashIndex], GeneratorIndex.NOTE_HASH_NONCE);
26
+ return poseidon2HashWithSeparator([nullifierZero, noteHashIndex], DomainSeparator.NOTE_HASH_NONCE);
27
27
  }
28
28
 
29
29
  /**
@@ -34,7 +34,7 @@ export function computeNoteHashNonce(nullifierZero: Fr, noteHashIndex: number):
34
34
  * @returns A siloed note hash.
35
35
  */
36
36
  export function siloNoteHash(contract: AztecAddress, noteHash: Fr): Promise<Fr> {
37
- return poseidon2HashWithSeparator([contract, noteHash], GeneratorIndex.SILOED_NOTE_HASH);
37
+ return poseidon2HashWithSeparator([contract, noteHash], DomainSeparator.SILOED_NOTE_HASH);
38
38
  }
39
39
 
40
40
  /**
@@ -44,7 +44,7 @@ export function siloNoteHash(contract: AztecAddress, noteHash: Fr): Promise<Fr>
44
44
  * @returns A unique note hash.
45
45
  */
46
46
  export function computeUniqueNoteHash(noteNonce: Fr, siloedNoteHash: Fr): Promise<Fr> {
47
- return poseidon2HashWithSeparator([noteNonce, siloedNoteHash], GeneratorIndex.UNIQUE_NOTE_HASH);
47
+ return poseidon2HashWithSeparator([noteNonce, siloedNoteHash], DomainSeparator.UNIQUE_NOTE_HASH);
48
48
  }
49
49
 
50
50
  /**
@@ -55,7 +55,36 @@ export function computeUniqueNoteHash(noteNonce: Fr, siloedNoteHash: Fr): Promis
55
55
  * @returns A siloed nullifier.
56
56
  */
57
57
  export function siloNullifier(contract: AztecAddress, innerNullifier: Fr): Promise<Fr> {
58
- return poseidon2HashWithSeparator([contract, innerNullifier], GeneratorIndex.SILOED_NULLIFIER);
58
+ return poseidon2HashWithSeparator([contract, innerNullifier], DomainSeparator.SILOED_NULLIFIER);
59
+ }
60
+
61
+ /**
62
+ * Computes the siloed private initialization nullifier for a contract, given its address and initialization hash.
63
+ * @param contract - The contract address.
64
+ * @param initializationHash - The contract's initialization hash.
65
+ * @returns The siloed private initialization nullifier.
66
+ */
67
+ export async function computeSiloedPrivateInitializationNullifier(
68
+ contract: AztecAddress,
69
+ initializationHash: Fr,
70
+ ): Promise<Fr> {
71
+ const innerNullifier = await poseidon2HashWithSeparator(
72
+ [contract, initializationHash],
73
+ DomainSeparator.PRIVATE_INITIALIZATION_NULLIFIER,
74
+ );
75
+ return siloNullifier(contract, innerNullifier);
76
+ }
77
+
78
+ /**
79
+ * Computes the siloed public initialization nullifier for a contract. Not all contracts emit this nullifier: it is only
80
+ * emitted when the contract has public functions that perform initialization checks (i.e. external public functions that
81
+ * are not `#[noinitcheck]` or `#[only_self]`).
82
+ * @param contract - The contract address.
83
+ * @returns The siloed public initialization nullifier.
84
+ */
85
+ export async function computeSiloedPublicInitializationNullifier(contract: AztecAddress): Promise<Fr> {
86
+ const innerNullifier = await poseidon2HashWithSeparator([contract], DomainSeparator.PUBLIC_INITIALIZATION_NULLIFIER);
87
+ return siloNullifier(contract, innerNullifier);
59
88
  }
60
89
 
61
90
  /**
@@ -69,6 +98,15 @@ export function computeProtocolNullifier(txRequestHash: Fr): Promise<Fr> {
69
98
  return siloNullifier(AztecAddress.fromBigInt(NULL_MSG_SENDER_CONTRACT_ADDRESS), txRequestHash);
70
99
  }
71
100
 
101
+ /** Domain-separates a raw log tag with the given domain separator. */
102
+ export function computeLogTag(rawTag: number | bigint | boolean | Fr | Buffer, domSep: DomainSeparator): Promise<Fr> {
103
+ return poseidon2HashWithSeparator([new Fr(rawTag)], domSep);
104
+ }
105
+
106
+ export function computeSiloedPrivateLogFirstField(contract: AztecAddress, field: Fr): Promise<Fr> {
107
+ return poseidon2HashWithSeparator([contract, field], DomainSeparator.PRIVATE_LOG_FIRST_FIELD);
108
+ }
109
+
72
110
  /**
73
111
  * Computes a public data tree value ready for insertion.
74
112
  * @param value - Raw public data tree value to hash into a tree-insertion-ready value.
@@ -87,7 +125,7 @@ export function computePublicDataTreeValue(value: Fr): Fr {
87
125
 
88
126
  */
89
127
  export function computePublicDataTreeLeafSlot(contractAddress: AztecAddress, storageSlot: Fr): Promise<Fr> {
90
- return poseidon2HashWithSeparator([contractAddress, storageSlot], GeneratorIndex.PUBLIC_LEAF_SLOT);
128
+ return poseidon2HashWithSeparator([contractAddress, storageSlot], DomainSeparator.PUBLIC_LEAF_SLOT);
91
129
  }
92
130
 
93
131
  /**
@@ -101,7 +139,7 @@ export function computeVarArgsHash(args: Fr[]): Promise<Fr> {
101
139
  return Promise.resolve(Fr.ZERO);
102
140
  }
103
141
 
104
- return poseidon2HashWithSeparator(args, GeneratorIndex.FUNCTION_ARGS);
142
+ return poseidon2HashWithSeparator(args, DomainSeparator.FUNCTION_ARGS);
105
143
  }
106
144
 
107
145
  /**
@@ -110,7 +148,7 @@ export function computeVarArgsHash(args: Fr[]): Promise<Fr> {
110
148
  * @returns Hash of the calldata.
111
149
  */
112
150
  export function computeCalldataHash(calldata: Fr[]): Promise<Fr> {
113
- return poseidon2HashWithSeparator(calldata, GeneratorIndex.PUBLIC_CALLDATA);
151
+ return poseidon2HashWithSeparator(calldata, DomainSeparator.PUBLIC_CALLDATA);
114
152
  }
115
153
 
116
154
  /**
@@ -120,13 +158,13 @@ export function computeCalldataHash(calldata: Fr[]): Promise<Fr> {
120
158
  * @returns The hash
121
159
  */
122
160
  export function computeSecretHash(secret: Fr): Promise<Fr> {
123
- return poseidon2HashWithSeparator([secret], GeneratorIndex.SECRET_HASH);
161
+ return poseidon2HashWithSeparator([secret], DomainSeparator.SECRET_HASH);
124
162
  }
125
163
 
126
164
  export async function computeL1ToL2MessageNullifier(contract: AztecAddress, messageHash: Fr, secret: Fr) {
127
165
  const innerMessageNullifier = await poseidon2HashWithSeparator(
128
166
  [messageHash, secret],
129
- GeneratorIndex.MESSAGE_NULLIFIER,
167
+ DomainSeparator.MESSAGE_NULLIFIER,
130
168
  );
131
169
  return siloNullifier(contract, innerMessageNullifier);
132
170
  }
@@ -1,4 +1,4 @@
1
- import { GeneratorIndex } from '@aztec/constants';
1
+ import { DomainSeparator } from '@aztec/constants';
2
2
  import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
3
3
  import type { Fr } from '@aztec/foundation/curves/bn254';
4
4
 
@@ -15,5 +15,5 @@ export function deriveStorageSlotInMap(
15
15
  toField: () => Fr;
16
16
  },
17
17
  ): Promise<Fr> {
18
- return poseidon2HashWithSeparator([mapSlot, key.toField()], GeneratorIndex.PUBLIC_STORAGE_MAP_SLOT);
18
+ return poseidon2HashWithSeparator([mapSlot, key.toField()], DomainSeparator.PUBLIC_STORAGE_MAP_SLOT);
19
19
  }
@@ -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 } 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 } from '../checkpoint/checkpoint_data.js';
13
15
  import { PublishedCheckpoint } from '../checkpoint/published_checkpoint.js';
14
16
  import {
15
17
  ContractClassPublicSchema,
@@ -84,6 +86,7 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
84
86
  getBlockNumber: z.function().args().returns(BlockNumberSchema),
85
87
  getProvenBlockNumber: z.function().args().returns(BlockNumberSchema),
86
88
  getCheckpointedL2BlockNumber: z.function().args().returns(BlockNumberSchema),
89
+ getCheckpointNumber: z.function().args().returns(CheckpointNumberSchema),
87
90
  getFinalizedL2BlockNumber: z.function().args().returns(BlockNumberSchema),
88
91
  getBlock: z.function().args(BlockNumberSchema).returns(L2Block.schema.optional()),
89
92
  getBlockHeader: z
@@ -104,14 +107,17 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
104
107
  getCheckpointedBlockByArchive: z.function().args(schemas.Fr).returns(CheckpointedL2Block.schema.optional()),
105
108
  getBlockHeaderByHash: z.function().args(BlockHash.schema).returns(BlockHeader.schema.optional()),
106
109
  getBlockHeaderByArchive: z.function().args(schemas.Fr).returns(BlockHeader.schema.optional()),
110
+ getBlockData: z.function().args(BlockNumberSchema).returns(BlockDataSchema.optional()),
111
+ getBlockDataByArchive: z.function().args(schemas.Fr).returns(BlockDataSchema.optional()),
107
112
  getL2Block: z.function().args(BlockNumberSchema).returns(L2Block.schema.optional()),
108
113
  getL2BlockByHash: z.function().args(BlockHash.schema).returns(L2Block.schema.optional()),
109
114
  getL2BlockByArchive: z.function().args(schemas.Fr).returns(L2Block.schema.optional()),
110
115
  getTxEffect: z.function().args(TxHash.schema).returns(indexedTxSchema().optional()),
111
116
  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()),
117
+ getSyncedL2SlotNumber: z.function().args().returns(schemas.SlotNumber.optional()),
118
+ getSyncedL2EpochNumber: z.function().args().returns(EpochNumberSchema.optional()),
114
119
  getCheckpointsForEpoch: z.function().args(EpochNumberSchema).returns(z.array(Checkpoint.schema)),
120
+ getCheckpointsDataForEpoch: z.function().args(EpochNumberSchema).returns(z.array(CheckpointDataSchema)),
115
121
  getCheckpointedBlocksForEpoch: z.function().args(EpochNumberSchema).returns(z.array(CheckpointedL2Block.schema)),
116
122
  getBlocksForSlot: z.function().args(schemas.SlotNumber).returns(z.array(L2Block.schema)),
117
123
  getCheckpointedBlockHeadersForEpoch: z.function().args(EpochNumberSchema).returns(z.array(BlockHeader.schema)),
@@ -50,9 +50,30 @@ export interface AztecNodeAdmin {
50
50
 
51
51
  /** Returns all offenses applicable for the given round. */
52
52
  getSlashOffenses(round: bigint | 'all' | 'current'): Promise<Offense[]>;
53
+
54
+ /**
55
+ * Reloads keystore configuration from disk.
56
+ *
57
+ * What is updated:
58
+ * - Validator attester keys
59
+ * - Coinbase address per validator
60
+ * - Fee recipient address per validator
61
+ *
62
+ * What is NOT updated (requires node restart):
63
+ * - L1 publisher signers (the funded accounts that send L1 transactions)
64
+ * - Prover keys
65
+ * - HA signer PostgreSQL connections
66
+ *
67
+ * Notes:
68
+ * - New validators must use a publisher key that was already configured at node
69
+ * startup (or omit the publisher field to fall back to the attester key).
70
+ * A validator with an unknown publisher key will cause the reload to be rejected.
71
+ */
72
+ reloadKeystore(): Promise<void>;
53
73
  }
54
74
 
55
- export type AztecNodeAdminConfig = ValidatorClientFullConfig &
75
+ // L1 contracts are not mutable via admin updates.
76
+ export type AztecNodeAdminConfig = Omit<ValidatorClientFullConfig, 'l1Contracts'> &
56
77
  SequencerConfig &
57
78
  ProverConfig &
58
79
  SlasherConfig &
@@ -65,7 +86,7 @@ export type AztecNodeAdminConfig = ValidatorClientFullConfig &
65
86
 
66
87
  export const AztecNodeAdminConfigSchema = SequencerConfigSchema.merge(ProverConfigSchema)
67
88
  .merge(SlasherConfigSchema)
68
- .merge(ValidatorClientFullConfigSchema)
89
+ .merge(ValidatorClientFullConfigSchema.omit({ l1Contracts: true }))
69
90
  .merge(
70
91
  ArchiverSpecificConfigSchema.pick({
71
92
  archiverPollingIntervalMS: true,
@@ -87,16 +108,19 @@ export const AztecNodeAdminApiSchema: ApiSchemaFor<AztecNodeAdmin> = {
87
108
  .function()
88
109
  .args(z.union([z.bigint(), z.literal('all'), z.literal('current')]))
89
110
  .returns(z.array(OffenseSchema)),
111
+ reloadKeystore: z.function().returns(z.void()),
90
112
  };
91
113
 
92
114
  export function createAztecNodeAdminClient(
93
115
  url: string,
94
116
  versions: Partial<ComponentsVersions> = {},
95
117
  fetch = defaultFetch,
118
+ apiKey?: string,
96
119
  ): AztecNodeAdmin {
97
120
  return createSafeJsonRpcClient<AztecNodeAdmin>(url, AztecNodeAdminApiSchema, {
98
121
  namespaceMethods: 'nodeAdmin',
99
122
  fetch,
100
123
  onResponse: getVersioningResponseHandler(versions),
124
+ ...(apiKey ? { extraHeaders: { 'x-api-key': apiKey } } : {}),
101
125
  });
102
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,16 +1,12 @@
1
- import {
2
- ARCHIVE_HEIGHT,
3
- L1_TO_L2_MSG_TREE_HEIGHT,
4
- NOTE_HASH_TREE_HEIGHT,
5
- NULLIFIER_TREE_HEIGHT,
6
- PUBLIC_DATA_TREE_HEIGHT,
7
- } from '@aztec/constants';
1
+ import { ARCHIVE_HEIGHT, L1_TO_L2_MSG_TREE_HEIGHT, NOTE_HASH_TREE_HEIGHT } from '@aztec/constants';
8
2
  import { type L1ContractAddresses, L1ContractAddressesSchema } from '@aztec/ethereum/l1-contract-addresses';
9
3
  import {
10
4
  BlockNumber,
11
5
  BlockNumberPositiveSchema,
12
6
  BlockNumberSchema,
7
+ CheckpointNumber,
13
8
  CheckpointNumberPositiveSchema,
9
+ CheckpointNumberSchema,
14
10
  EpochNumber,
15
11
  EpochNumberSchema,
16
12
  type SlotNumber,
@@ -29,6 +25,7 @@ import { CheckpointedL2Block } from '../block/checkpointed_l2_block.js';
29
25
  import { type DataInBlock, dataInBlockSchemaFor } from '../block/in_block.js';
30
26
  import { L2Block } from '../block/l2_block.js';
31
27
  import { type L2BlockSource, type L2Tips, L2TipsSchema } from '../block/l2_block_source.js';
28
+ import { CheckpointDataSchema } from '../checkpoint/checkpoint_data.js';
32
29
  import { PublishedCheckpoint } from '../checkpoint/published_checkpoint.js';
33
30
  import {
34
31
  type ContractClassPublic,
@@ -78,7 +75,12 @@ import { type WorldStateSyncStatus, WorldStateSyncStatusSchema } from './world_s
78
75
  export interface AztecNode
79
76
  extends Pick<
80
77
  L2BlockSource,
81
- 'getBlocks' | 'getCheckpoints' | 'getBlockHeader' | 'getL2Tips' | 'getCheckpointedBlocks'
78
+ | 'getBlocks'
79
+ | 'getCheckpoints'
80
+ | 'getBlockHeader'
81
+ | 'getL2Tips'
82
+ | 'getCheckpointedBlocks'
83
+ | 'getCheckpointsDataForEpoch'
82
84
  > {
83
85
  /**
84
86
  * Returns the tips of the L2 chain.
@@ -93,124 +95,100 @@ export interface AztecNode
93
95
  /**
94
96
  * Find the indexes of the given leaves in the given tree along with a block metadata pointing to the block in which
95
97
  * the leaves were inserted.
96
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
98
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
97
99
  * @param treeId - The tree to search in.
98
100
  * @param leafValues - The values to search for.
99
101
  * @returns The indices of leaves and the block metadata of a block in which the leaves were inserted.
100
102
  */
101
103
  findLeavesIndexes(
102
- block: BlockParameter,
104
+ referenceBlock: BlockParameter,
103
105
  treeId: MerkleTreeId,
104
106
  leafValues: Fr[],
105
107
  ): Promise<(DataInBlock<bigint> | undefined)[]>;
106
108
 
107
- /**
108
- * Returns a sibling path for the given index in the nullifier tree.
109
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
110
- * @param leafIndex - The index of the leaf for which the sibling path is required.
111
- * @returns The sibling path for the leaf index.
112
- */
113
- getNullifierSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof NULLIFIER_TREE_HEIGHT>>;
114
-
115
- /**
116
- * Returns a sibling path for the given index in the note hash tree.
117
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
118
- * @param leafIndex - The index of the leaf for which the sibling path is required.
119
- * @returns The sibling path for the leaf index.
120
- */
121
- getNoteHashSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof NOTE_HASH_TREE_HEIGHT>>;
122
-
123
- /**
124
- * Returns a sibling path for a leaf in the committed historic blocks tree.
125
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
126
- * @param leafIndex - Index of the leaf in the tree.
127
- * @returns The sibling path.
128
- */
129
- getArchiveSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof ARCHIVE_HEIGHT>>;
130
-
131
- /**
132
- * Returns a sibling path for a leaf in the committed public data tree.
133
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
134
- * @param leafIndex - Index of the leaf in the tree.
135
- * @returns The sibling path.
136
- */
137
- getPublicDataSiblingPath(
138
- block: BlockParameter,
139
- leafIndex: bigint,
140
- ): Promise<SiblingPath<typeof PUBLIC_DATA_TREE_HEIGHT>>;
141
-
142
109
  /**
143
110
  * Returns a nullifier membership witness for a given nullifier at a given block.
144
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
111
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
145
112
  * @param nullifier - Nullifier we try to find witness for.
146
113
  * @returns The nullifier membership witness (if found).
147
114
  */
148
- getNullifierMembershipWitness(block: BlockParameter, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
115
+ getNullifierMembershipWitness(
116
+ referenceBlock: BlockParameter,
117
+ nullifier: Fr,
118
+ ): Promise<NullifierMembershipWitness | undefined>;
149
119
 
150
120
  /**
151
121
  * Returns a low nullifier membership witness for a given nullifier at a given block.
152
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
122
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
153
123
  * @param nullifier - Nullifier we try to find the low nullifier witness for.
154
124
  * @returns The low nullifier membership witness (if found).
125
+ * @throws If the nullifier already exists in the tree, since non-inclusion cannot be proven.
155
126
  * @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
156
127
  * list structure" of leaves and proving that a lower nullifier is pointing to a bigger next value than the nullifier
157
128
  * we are trying to prove non-inclusion for.
158
129
  */
159
130
  getLowNullifierMembershipWitness(
160
- block: BlockParameter,
131
+ referenceBlock: BlockParameter,
161
132
  nullifier: Fr,
162
133
  ): Promise<NullifierMembershipWitness | undefined>;
163
134
 
164
135
  /**
165
136
  * Returns a public data tree witness for a given leaf slot at a given block.
166
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
137
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
167
138
  * @param leafSlot - The leaf slot we try to find the witness for.
168
139
  * @returns The public data witness (if found).
169
140
  * @remarks The witness can be used to compute the current value of the public data tree leaf. If the low leaf preimage corresponds to an
170
141
  * "in range" slot, means that the slot doesn't exist and the value is 0. If the low leaf preimage corresponds to the exact slot, the current value
171
142
  * is contained in the leaf preimage.
172
143
  */
173
- getPublicDataWitness(block: BlockParameter, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
144
+ getPublicDataWitness(referenceBlock: BlockParameter, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
174
145
 
175
146
  /**
176
- * Returns a membership witness for a given archive leaf at a given block.
177
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
178
- * @param archive - The archive leaf we try to find the witness for.
147
+ * Returns a membership witness for a given block hash in the archive tree.
148
+ *
149
+ * Block hashes are the leaves of the archive tree. Each time a new block is added to the chain,
150
+ * its block hash is appended as a new leaf to the archive tree. This method finds the membership
151
+ * witness (leaf index and sibling path) for a given block hash, which can be used to prove that
152
+ * a specific block exists in the chain's history.
153
+ *
154
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data
155
+ * (which contains the root of the archive tree in which we are searching for the block hash).
156
+ * @param blockHash - The block hash to find in the archive tree.
179
157
  */
180
- getArchiveMembershipWitness(
181
- block: BlockParameter,
182
- archive: Fr,
158
+ getBlockHashMembershipWitness(
159
+ referenceBlock: BlockParameter,
160
+ blockHash: BlockHash,
183
161
  ): Promise<MembershipWitness<typeof ARCHIVE_HEIGHT> | undefined>;
184
162
 
185
163
  /**
186
164
  * Returns a membership witness for a given note hash at a given block.
187
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
165
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
188
166
  * @param noteHash - The note hash we try to find the witness for.
189
167
  */
190
168
  getNoteHashMembershipWitness(
191
- block: BlockParameter,
169
+ referenceBlock: BlockParameter,
192
170
  noteHash: Fr,
193
171
  ): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT> | undefined>;
194
172
 
195
173
  /**
196
174
  * Returns the index and a sibling path for a leaf in the committed l1 to l2 data tree.
197
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
175
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
198
176
  * @param l1ToL2Message - The l1ToL2Message to get the index / sibling path for.
199
177
  * @returns A tuple of the index and the sibling path of the L1ToL2Message (undefined if not found).
200
178
  */
201
179
  getL1ToL2MessageMembershipWitness(
202
- block: BlockParameter,
180
+ referenceBlock: BlockParameter,
203
181
  l1ToL2Message: Fr,
204
182
  ): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>] | undefined>;
205
183
 
206
- /** Returns the L2 block number in which this L1 to L2 message becomes available, or undefined if not found. */
207
- getL1ToL2MessageBlock(l1ToL2Message: Fr): Promise<BlockNumber | undefined>;
184
+ /** Returns the L2 checkpoint number in which this L1 to L2 message becomes available, or undefined if not found. */
185
+ getL1ToL2MessageCheckpoint(l1ToL2Message: Fr): Promise<CheckpointNumber | undefined>;
208
186
 
209
187
  /**
210
188
  * Returns whether an L1 to L2 message is synced by archiver.
211
189
  * @param l1ToL2Message - The L1 to L2 message to check.
212
190
  * @returns Whether the message is synced.
213
- * @deprecated Use `getL1ToL2MessageBlock` instead. This method may return true even if the message is not ready to use.
191
+ * @deprecated Use `getL1ToL2MessageCheckpoint` instead. This method may return true even if the message is not ready to use.
214
192
  */
215
193
  isL1ToL2MessageSynced(l1ToL2Message: Fr): Promise<boolean>;
216
194
 
@@ -224,10 +202,10 @@ export interface AztecNode
224
202
 
225
203
  /**
226
204
  * Get a block specified by its block number or 'latest'.
227
- * @param number - The block number or 'latest'.
205
+ * @param blockParameter - The block parameter (block number, block hash, or 'latest').
228
206
  * @returns The requested block.
229
207
  */
230
- getBlock(number: BlockParameter): Promise<L2Block | undefined>;
208
+ getBlock(blockParameter: BlockParameter): Promise<L2Block | undefined>;
231
209
 
232
210
  /**
233
211
  * Get a block specified by its hash.
@@ -261,6 +239,12 @@ export interface AztecNode
261
239
  */
262
240
  getCheckpointedBlockNumber(): Promise<BlockNumber>;
263
241
 
242
+ /**
243
+ * Method to fetch the latest checkpoint number synchronized by the node.
244
+ * @returns The checkpoint number.
245
+ */
246
+ getCheckpointNumber(): Promise<CheckpointNumber>;
247
+
264
248
  /**
265
249
  * Method to determine if the node is ready to accept transactions.
266
250
  * @returns - Flag indicating the readiness for tx submission.
@@ -433,12 +417,12 @@ export interface AztecNode
433
417
  * @remarks The storage slot here refers to the slot as it is defined in Noir not the index in the merkle tree.
434
418
  * Aztec's version of `eth_getStorageAt`.
435
419
  *
436
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
420
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
437
421
  * @param contract - Address of the contract to query.
438
422
  * @param slot - Slot to query.
439
423
  * @returns Storage value at the given contract slot.
440
424
  */
441
- getPublicStorageAt(block: BlockParameter, contract: AztecAddress, slot: Fr): Promise<Fr>;
425
+ getPublicStorageAt(referenceBlock: BlockParameter, contract: AztecAddress, slot: Fr): Promise<Fr>;
442
426
 
443
427
  /**
444
428
  * Returns the block header for a given block number, block hash, or 'latest'.
@@ -474,7 +458,7 @@ export interface AztecNode
474
458
  /**
475
459
  * Returns true if the transaction is valid for inclusion at the current state. Valid transactions can be
476
460
  * made invalid by *other* transactions if e.g. they emit the same nullifiers, or come become invalid
477
- * due to e.g. the include_by_timestamp property.
461
+ * due to e.g. the expiration_timestamp property.
478
462
  * @param tx - The transaction to validate for correctness.
479
463
  * @param isSimulation - True if the transaction is a simulated one without generated proofs. (Optional)
480
464
  * @param skipFeeEnforcement - True if the validation of the fee should be skipped. Useful when the simulation is for estimating fee (Optional)
@@ -518,26 +502,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
518
502
  .args(BlockParameterSchema, z.nativeEnum(MerkleTreeId), z.array(schemas.Fr).max(MAX_RPC_LEN))
519
503
  .returns(z.array(optional(dataInBlockSchemaFor(schemas.BigInt)))),
520
504
 
521
- getNullifierSiblingPath: z
522
- .function()
523
- .args(BlockParameterSchema, schemas.BigInt)
524
- .returns(SiblingPath.schemaFor(NULLIFIER_TREE_HEIGHT)),
525
-
526
- getNoteHashSiblingPath: z
527
- .function()
528
- .args(BlockParameterSchema, schemas.BigInt)
529
- .returns(SiblingPath.schemaFor(NOTE_HASH_TREE_HEIGHT)),
530
-
531
- getArchiveSiblingPath: z
532
- .function()
533
- .args(BlockParameterSchema, schemas.BigInt)
534
- .returns(SiblingPath.schemaFor(ARCHIVE_HEIGHT)),
535
-
536
- getPublicDataSiblingPath: z
537
- .function()
538
- .args(BlockParameterSchema, schemas.BigInt)
539
- .returns(SiblingPath.schemaFor(PUBLIC_DATA_TREE_HEIGHT)),
540
-
541
505
  getNullifierMembershipWitness: z
542
506
  .function()
543
507
  .args(BlockParameterSchema, schemas.Fr)
@@ -553,9 +517,9 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
553
517
  .args(BlockParameterSchema, schemas.Fr)
554
518
  .returns(PublicDataWitness.schema.optional()),
555
519
 
556
- getArchiveMembershipWitness: z
520
+ getBlockHashMembershipWitness: z
557
521
  .function()
558
- .args(BlockParameterSchema, schemas.Fr)
522
+ .args(BlockParameterSchema, BlockHash.schema)
559
523
  .returns(MembershipWitness.schemaFor(ARCHIVE_HEIGHT).optional()),
560
524
 
561
525
  getNoteHashMembershipWitness: z
@@ -568,7 +532,7 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
568
532
  .args(BlockParameterSchema, schemas.Fr)
569
533
  .returns(z.tuple([schemas.BigInt, SiblingPath.schemaFor(L1_TO_L2_MSG_TREE_HEIGHT)]).optional()),
570
534
 
571
- getL1ToL2MessageBlock: z.function().args(schemas.Fr).returns(BlockNumberSchema.optional()),
535
+ getL1ToL2MessageCheckpoint: z.function().args(schemas.Fr).returns(CheckpointNumberSchema.optional()),
572
536
 
573
537
  isL1ToL2MessageSynced: z.function().args(schemas.Fr).returns(z.boolean()),
574
538
 
@@ -585,6 +549,8 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
585
549
 
586
550
  getBlockNumber: z.function().returns(BlockNumberSchema),
587
551
 
552
+ getCheckpointNumber: z.function().returns(CheckpointNumberSchema),
553
+
588
554
  getProvenBlockNumber: z.function().returns(BlockNumberSchema),
589
555
 
590
556
  getCheckpointedBlockNumber: z.function().returns(BlockNumberSchema),
@@ -608,6 +574,8 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
608
574
  .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
609
575
  .returns(z.array(CheckpointedL2Block.schema)),
610
576
 
577
+ getCheckpointsDataForEpoch: z.function().args(EpochNumberSchema).returns(z.array(CheckpointDataSchema)),
578
+
611
579
  getCurrentMinFees: z.function().returns(GasFees.schema),
612
580
 
613
581
  getMaxPriorityFees: z.function().returns(GasFees.schema),