@aztec/stdlib 3.0.0-nightly.20251208 → 3.0.0-nightly.20251210

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 (734) hide show
  1. package/dest/abi/abi.d.ts +2 -2
  2. package/dest/abi/abi.d.ts.map +1 -1
  3. package/dest/abi/authorization_selector.d.ts +2 -2
  4. package/dest/abi/authorization_selector.d.ts.map +1 -1
  5. package/dest/abi/authorization_selector.js +2 -1
  6. package/dest/abi/buffer.d.ts +2 -2
  7. package/dest/abi/buffer.d.ts.map +1 -1
  8. package/dest/abi/buffer.js +1 -1
  9. package/dest/abi/decoder.d.ts +2 -2
  10. package/dest/abi/decoder.d.ts.map +1 -1
  11. package/dest/abi/encoder.d.ts +2 -2
  12. package/dest/abi/encoder.d.ts.map +1 -1
  13. package/dest/abi/encoder.js +1 -1
  14. package/dest/abi/event_selector.d.ts +2 -2
  15. package/dest/abi/event_selector.d.ts.map +1 -1
  16. package/dest/abi/event_selector.js +2 -1
  17. package/dest/abi/function_call.d.ts +2 -2
  18. package/dest/abi/function_call.d.ts.map +1 -1
  19. package/dest/abi/function_selector.d.ts +2 -2
  20. package/dest/abi/function_selector.d.ts.map +1 -1
  21. package/dest/abi/function_selector.js +2 -1
  22. package/dest/abi/note_selector.d.ts +2 -2
  23. package/dest/abi/note_selector.d.ts.map +1 -1
  24. package/dest/abi/note_selector.js +2 -2
  25. package/dest/abi/selector.d.ts +2 -2
  26. package/dest/abi/selector.d.ts.map +1 -1
  27. package/dest/abi/selector.js +1 -1
  28. package/dest/auth_witness/auth_witness.d.ts +2 -2
  29. package/dest/auth_witness/auth_witness.d.ts.map +1 -1
  30. package/dest/auth_witness/auth_witness.js +2 -2
  31. package/dest/avm/avm.d.ts +359 -331
  32. package/dest/avm/avm.d.ts.map +1 -1
  33. package/dest/avm/avm.js +54 -8
  34. package/dest/avm/avm_accumulated_data.d.ts +2 -2
  35. package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
  36. package/dest/avm/avm_accumulated_data.js +1 -1
  37. package/dest/avm/avm_circuit_public_inputs.d.ts +2 -2
  38. package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
  39. package/dest/avm/avm_circuit_public_inputs.js +1 -1
  40. package/dest/avm/avm_proving_request.d.ts +254 -254
  41. package/dest/avm/contract_storage_read.d.ts +2 -2
  42. package/dest/avm/contract_storage_read.d.ts.map +1 -1
  43. package/dest/avm/contract_storage_read.js +1 -1
  44. package/dest/avm/contract_storage_update_request.d.ts +2 -2
  45. package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
  46. package/dest/avm/contract_storage_update_request.js +1 -1
  47. package/dest/avm/message_pack.d.ts +1 -1
  48. package/dest/avm/message_pack.d.ts.map +1 -1
  49. package/dest/avm/message_pack.js +2 -1
  50. package/dest/avm/public_call_stack_item_compressed.d.ts +2 -2
  51. package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
  52. package/dest/avm/public_call_stack_item_compressed.js +1 -1
  53. package/dest/avm/public_data_read.d.ts +2 -2
  54. package/dest/avm/public_data_read.d.ts.map +1 -1
  55. package/dest/avm/public_data_read.js +1 -1
  56. package/dest/avm/public_data_update_request.d.ts +2 -2
  57. package/dest/avm/public_data_update_request.d.ts.map +1 -1
  58. package/dest/avm/public_data_update_request.js +1 -1
  59. package/dest/avm/public_data_write.d.ts +2 -2
  60. package/dest/avm/public_data_write.d.ts.map +1 -1
  61. package/dest/avm/public_data_write.js +1 -1
  62. package/dest/avm/public_inner_call_request.d.ts +2 -2
  63. package/dest/avm/public_inner_call_request.d.ts.map +1 -1
  64. package/dest/avm/revert_code.d.ts +2 -2
  65. package/dest/avm/revert_code.d.ts.map +1 -1
  66. package/dest/avm/revert_code.js +1 -1
  67. package/dest/aztec-address/index.d.ts +3 -2
  68. package/dest/aztec-address/index.d.ts.map +1 -1
  69. package/dest/aztec-address/index.js +2 -1
  70. package/dest/block/attestation_info.js +1 -1
  71. package/dest/block/block_hash.d.ts +2 -2
  72. package/dest/block/block_hash.d.ts.map +1 -1
  73. package/dest/block/block_hash.js +1 -1
  74. package/dest/block/in_block.d.ts +23 -7
  75. package/dest/block/in_block.d.ts.map +1 -1
  76. package/dest/block/in_block.js +14 -5
  77. package/dest/block/l2_block.d.ts +4 -4
  78. package/dest/block/l2_block.d.ts.map +1 -1
  79. package/dest/block/l2_block.js +7 -5
  80. package/dest/block/l2_block_code_to_purge.d.ts +2 -2
  81. package/dest/block/l2_block_code_to_purge.d.ts.map +1 -1
  82. package/dest/block/l2_block_code_to_purge.js +1 -1
  83. package/dest/block/l2_block_header.d.ts +2 -2
  84. package/dest/block/l2_block_header.d.ts.map +1 -1
  85. package/dest/block/l2_block_header.js +1 -1
  86. package/dest/block/l2_block_info.d.ts +2 -2
  87. package/dest/block/l2_block_info.d.ts.map +1 -1
  88. package/dest/block/l2_block_info.js +1 -1
  89. package/dest/block/l2_block_new.d.ts +25 -7
  90. package/dest/block/l2_block_new.d.ts.map +1 -1
  91. package/dest/block/l2_block_new.js +22 -12
  92. package/dest/block/l2_block_source.d.ts +2 -2
  93. package/dest/block/l2_block_source.d.ts.map +1 -1
  94. package/dest/block/published_l2_block.d.ts +2 -2
  95. package/dest/block/test/l2_tips_store_test_suite.js +1 -1
  96. package/dest/checkpoint/checkpoint.d.ts +16 -2
  97. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  98. package/dest/checkpoint/checkpoint.js +1 -1
  99. package/dest/checkpoint/published_checkpoint.d.ts +19 -1
  100. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  101. package/dest/checkpoint/published_checkpoint.js +1 -1
  102. package/dest/contract/artifact_hash.d.ts +2 -2
  103. package/dest/contract/artifact_hash.d.ts.map +1 -1
  104. package/dest/contract/artifact_hash.js +2 -2
  105. package/dest/contract/complete_address.d.ts +2 -2
  106. package/dest/contract/complete_address.d.ts.map +1 -1
  107. package/dest/contract/complete_address.js +1 -1
  108. package/dest/contract/contract_address.d.ts +2 -2
  109. package/dest/contract/contract_address.d.ts.map +1 -1
  110. package/dest/contract/contract_address.js +2 -2
  111. package/dest/contract/contract_class.d.ts +2 -2
  112. package/dest/contract/contract_class.d.ts.map +1 -1
  113. package/dest/contract/contract_class.js +1 -1
  114. package/dest/contract/contract_class_id.d.ts +2 -2
  115. package/dest/contract/contract_class_id.d.ts.map +1 -1
  116. package/dest/contract/contract_class_id.js +2 -2
  117. package/dest/contract/contract_deployment_data.d.ts +4 -4
  118. package/dest/contract/contract_instance.d.ts +2 -2
  119. package/dest/contract/contract_instance.d.ts.map +1 -1
  120. package/dest/contract/contract_instance.js +1 -1
  121. package/dest/contract/contract_instance_update.d.ts +2 -2
  122. package/dest/contract/contract_instance_update.d.ts.map +1 -1
  123. package/dest/contract/contract_instance_update.js +1 -1
  124. package/dest/contract/deployment_info.d.ts +2 -2
  125. package/dest/contract/deployment_info.d.ts.map +1 -1
  126. package/dest/contract/interfaces/contract_class.d.ts +2 -2
  127. package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
  128. package/dest/contract/interfaces/contract_data_source.d.ts +2 -2
  129. package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
  130. package/dest/contract/interfaces/contract_instance.d.ts +18 -18
  131. package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
  132. package/dest/contract/interfaces/contract_instance_update.d.ts +2 -2
  133. package/dest/contract/interfaces/contract_instance_update.d.ts.map +1 -1
  134. package/dest/contract/partial_address.d.ts +2 -2
  135. package/dest/contract/partial_address.d.ts.map +1 -1
  136. package/dest/contract/private_function.d.ts +2 -2
  137. package/dest/contract/private_function.d.ts.map +1 -1
  138. package/dest/contract/private_function.js +3 -2
  139. package/dest/contract/private_function_membership_proof.js +2 -2
  140. package/dest/contract/utility_function_membership_proof.js +1 -1
  141. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +2 -2
  142. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
  143. package/dest/delayed_public_mutable/delayed_public_mutable_values.js +2 -2
  144. package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts +2 -2
  145. package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts.map +1 -1
  146. package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.js +1 -1
  147. package/dest/delayed_public_mutable/scheduled_value_change.d.ts +2 -2
  148. package/dest/delayed_public_mutable/scheduled_value_change.d.ts.map +1 -1
  149. package/dest/delayed_public_mutable/scheduled_value_change.js +1 -1
  150. package/dest/errors/simulation_error.d.ts +2 -2
  151. package/dest/errors/simulation_error.d.ts.map +1 -1
  152. package/dest/fees/transaction_fee.d.ts +2 -2
  153. package/dest/fees/transaction_fee.d.ts.map +1 -1
  154. package/dest/gas/gas.d.ts +2 -2
  155. package/dest/gas/gas.d.ts.map +1 -1
  156. package/dest/gas/gas.js +1 -1
  157. package/dest/gas/gas_fees.d.ts +2 -2
  158. package/dest/gas/gas_fees.d.ts.map +1 -1
  159. package/dest/gas/gas_settings.d.ts +2 -2
  160. package/dest/gas/gas_settings.d.ts.map +1 -1
  161. package/dest/gas/gas_settings.js +1 -1
  162. package/dest/hash/hash.d.ts +2 -2
  163. package/dest/hash/hash.d.ts.map +1 -1
  164. package/dest/hash/hash.js +3 -2
  165. package/dest/hash/map_slot.d.ts +2 -2
  166. package/dest/hash/map_slot.d.ts.map +1 -1
  167. package/dest/hash/map_slot.js +1 -1
  168. package/dest/interfaces/allowed_element.d.ts +2 -2
  169. package/dest/interfaces/allowed_element.d.ts.map +1 -1
  170. package/dest/interfaces/archiver.d.ts +1 -1
  171. package/dest/interfaces/archiver.d.ts.map +1 -1
  172. package/dest/interfaces/archiver.js +1 -2
  173. package/dest/interfaces/aztec-node-admin.d.ts +6 -6
  174. package/dest/interfaces/aztec-node.d.ts +2 -2
  175. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  176. package/dest/interfaces/aztec-node.js +2 -2
  177. package/dest/interfaces/block-builder.d.ts +2 -2
  178. package/dest/interfaces/block-builder.d.ts.map +1 -1
  179. package/dest/interfaces/configs.d.ts +6 -6
  180. package/dest/interfaces/epoch-prover.d.ts +2 -2
  181. package/dest/interfaces/epoch-prover.d.ts.map +1 -1
  182. package/dest/interfaces/l2_logs_source.d.ts +2 -2
  183. package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
  184. package/dest/interfaces/merkle_tree_operations.d.ts +2 -2
  185. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  186. package/dest/interfaces/proving-job.d.ts +166 -166
  187. package/dest/interfaces/public_state_source.d.ts +2 -2
  188. package/dest/interfaces/public_state_source.d.ts.map +1 -1
  189. package/dest/interfaces/validator.d.ts +2 -2
  190. package/dest/interfaces/validator.d.ts.map +1 -1
  191. package/dest/kernel/claimed_length_array.d.ts +2 -2
  192. package/dest/kernel/claimed_length_array.d.ts.map +1 -1
  193. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +2 -2
  194. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
  195. package/dest/kernel/hints/key_validation_hint.d.ts +2 -2
  196. package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
  197. package/dest/kernel/hints/key_validation_hint.js +1 -1
  198. package/dest/kernel/hints/key_validation_request.d.ts +4 -3
  199. package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
  200. package/dest/kernel/hints/key_validation_request.js +2 -1
  201. package/dest/kernel/hints/key_validation_request_and_generator.d.ts +2 -2
  202. package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +1 -1
  203. package/dest/kernel/hints/key_validation_request_and_generator.js +1 -1
  204. package/dest/kernel/hints/note_hash_read_request_hints.d.ts +2 -2
  205. package/dest/kernel/hints/note_hash_read_request_hints.d.ts.map +1 -1
  206. package/dest/kernel/hints/note_hash_read_request_hints.js +1 -1
  207. package/dest/kernel/hints/read_request.d.ts +2 -2
  208. package/dest/kernel/hints/read_request.d.ts.map +1 -1
  209. package/dest/kernel/hints/read_request.js +1 -1
  210. package/dest/kernel/hints/scoped_key_validation_request_and_generator.d.ts +2 -2
  211. package/dest/kernel/hints/scoped_key_validation_request_and_generator.d.ts.map +1 -1
  212. package/dest/kernel/hints/scoped_value_cache.d.ts +2 -2
  213. package/dest/kernel/hints/scoped_value_cache.d.ts.map +1 -1
  214. package/dest/kernel/hints/transient_data_squashing_hint.d.ts +2 -2
  215. package/dest/kernel/hints/transient_data_squashing_hint.d.ts.map +1 -1
  216. package/dest/kernel/hints/transient_data_squashing_hint.js +1 -1
  217. package/dest/kernel/hints/tree_leaf_read_request.d.ts +2 -2
  218. package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +1 -1
  219. package/dest/kernel/hints/tree_leaf_read_request.js +1 -1
  220. package/dest/kernel/log_hash.d.ts +2 -2
  221. package/dest/kernel/log_hash.d.ts.map +1 -1
  222. package/dest/kernel/log_hash.js +1 -1
  223. package/dest/kernel/note_hash.d.ts +2 -2
  224. package/dest/kernel/note_hash.d.ts.map +1 -1
  225. package/dest/kernel/note_hash.js +1 -1
  226. package/dest/kernel/nullifier.d.ts +2 -2
  227. package/dest/kernel/nullifier.d.ts.map +1 -1
  228. package/dest/kernel/nullifier.js +1 -1
  229. package/dest/kernel/padded_side_effects.d.ts +2 -2
  230. package/dest/kernel/padded_side_effects.d.ts.map +1 -1
  231. package/dest/kernel/padded_side_effects.js +1 -1
  232. package/dest/kernel/private_call_data.d.ts +2 -2
  233. package/dest/kernel/private_call_data.d.ts.map +1 -1
  234. package/dest/kernel/private_call_data.js +1 -1
  235. package/dest/kernel/private_call_request.d.ts +2 -2
  236. package/dest/kernel/private_call_request.d.ts.map +1 -1
  237. package/dest/kernel/private_call_request.js +1 -1
  238. package/dest/kernel/private_circuit_public_inputs.d.ts +2 -2
  239. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  240. package/dest/kernel/private_circuit_public_inputs.js +1 -1
  241. package/dest/kernel/private_context_inputs.d.ts +2 -2
  242. package/dest/kernel/private_context_inputs.d.ts.map +1 -1
  243. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +2 -2
  244. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  245. package/dest/kernel/private_kernel_circuit_public_inputs.js +1 -1
  246. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +2 -2
  247. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  248. package/dest/kernel/private_kernel_init_circuit_private_inputs.js +1 -1
  249. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +2 -2
  250. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  251. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +1 -1
  252. package/dest/kernel/private_log_data.d.ts +2 -2
  253. package/dest/kernel/private_log_data.d.ts.map +1 -1
  254. package/dest/kernel/private_to_avm_accumulated_data.d.ts +2 -2
  255. package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
  256. package/dest/kernel/private_to_avm_accumulated_data.js +1 -1
  257. package/dest/kernel/private_to_public_accumulated_data.d.ts +2 -2
  258. package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
  259. package/dest/kernel/private_to_public_accumulated_data.js +1 -1
  260. package/dest/kernel/private_to_public_accumulated_data_builder.d.ts +2 -2
  261. package/dest/kernel/private_to_public_accumulated_data_builder.d.ts.map +1 -1
  262. package/dest/kernel/private_to_public_accumulated_data_builder.js +1 -1
  263. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +2 -2
  264. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  265. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +1 -1
  266. package/dest/kernel/private_to_rollup_accumulated_data.d.ts +2 -2
  267. package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
  268. package/dest/kernel/private_to_rollup_accumulated_data.js +1 -1
  269. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +2 -2
  270. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  271. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +1 -1
  272. package/dest/kernel/public_call_request.d.ts +2 -2
  273. package/dest/kernel/public_call_request.d.ts.map +1 -1
  274. package/dest/kernel/public_call_request.js +1 -1
  275. package/dest/kernel/utils/optional_number.d.ts +2 -2
  276. package/dest/kernel/utils/optional_number.d.ts.map +1 -1
  277. package/dest/keys/derivation.d.ts +4 -3
  278. package/dest/keys/derivation.d.ts.map +1 -1
  279. package/dest/keys/derivation.js +5 -2
  280. package/dest/keys/public_key.d.ts +2 -2
  281. package/dest/keys/public_key.d.ts.map +1 -1
  282. package/dest/keys/public_keys.d.ts +3 -2
  283. package/dest/keys/public_keys.d.ts.map +1 -1
  284. package/dest/keys/public_keys.js +3 -2
  285. package/dest/logs/contract_class_log.d.ts +2 -2
  286. package/dest/logs/contract_class_log.d.ts.map +1 -1
  287. package/dest/logs/contract_class_log.js +2 -2
  288. package/dest/logs/debug_log.d.ts +2 -2
  289. package/dest/logs/debug_log.d.ts.map +1 -1
  290. package/dest/logs/debug_log.js +1 -1
  291. package/dest/logs/directional_app_tagging_secret.d.ts +2 -2
  292. package/dest/logs/directional_app_tagging_secret.d.ts.map +1 -1
  293. package/dest/logs/directional_app_tagging_secret.js +3 -2
  294. package/dest/logs/log_with_tx_data.d.ts +2 -2
  295. package/dest/logs/log_with_tx_data.d.ts.map +1 -1
  296. package/dest/logs/log_with_tx_data.js +1 -1
  297. package/dest/logs/message_context.d.ts +2 -2
  298. package/dest/logs/message_context.d.ts.map +1 -1
  299. package/dest/logs/message_context.js +1 -1
  300. package/dest/logs/pending_tagged_log.d.ts +2 -2
  301. package/dest/logs/pending_tagged_log.d.ts.map +1 -1
  302. package/dest/logs/pending_tagged_log.js +1 -1
  303. package/dest/logs/private_log.d.ts +2 -2
  304. package/dest/logs/private_log.d.ts.map +1 -1
  305. package/dest/logs/private_log.js +1 -1
  306. package/dest/logs/public_log.d.ts +3 -2
  307. package/dest/logs/public_log.d.ts.map +1 -1
  308. package/dest/logs/public_log.js +4 -1
  309. package/dest/logs/shared_secret_derivation.d.ts +2 -2
  310. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  311. package/dest/logs/shared_secret_derivation.js +1 -1
  312. package/dest/logs/tx_scoped_l2_log.d.ts +2 -2
  313. package/dest/messaging/in_hash.d.ts +2 -2
  314. package/dest/messaging/in_hash.d.ts.map +1 -1
  315. package/dest/messaging/in_hash.js +1 -1
  316. package/dest/messaging/inbox_leaf.d.ts +8 -7
  317. package/dest/messaging/inbox_leaf.d.ts.map +1 -1
  318. package/dest/messaging/inbox_leaf.js +10 -9
  319. package/dest/messaging/l1_actor.d.ts +2 -2
  320. package/dest/messaging/l1_actor.d.ts.map +1 -1
  321. package/dest/messaging/l1_actor.js +2 -2
  322. package/dest/messaging/l1_to_l2_message.d.ts +2 -2
  323. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  324. package/dest/messaging/l1_to_l2_message.js +2 -2
  325. package/dest/messaging/l1_to_l2_message_source.d.ts +4 -15
  326. package/dest/messaging/l1_to_l2_message_source.d.ts.map +1 -1
  327. package/dest/messaging/l2_actor.d.ts +2 -2
  328. package/dest/messaging/l2_actor.d.ts.map +1 -1
  329. package/dest/messaging/l2_actor.js +2 -2
  330. package/dest/messaging/l2_to_l1_membership.d.ts +2 -2
  331. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  332. package/dest/messaging/l2_to_l1_membership.js +1 -1
  333. package/dest/messaging/l2_to_l1_message.d.ts +3 -2
  334. package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
  335. package/dest/messaging/l2_to_l1_message.js +4 -1
  336. package/dest/messaging/out_hash.d.ts +2 -2
  337. package/dest/messaging/out_hash.d.ts.map +1 -1
  338. package/dest/messaging/out_hash.js +1 -1
  339. package/dest/note/note.d.ts +2 -2
  340. package/dest/note/note.d.ts.map +1 -1
  341. package/dest/note/note.js +2 -2
  342. package/dest/note/note_dao.d.ts +2 -2
  343. package/dest/note/note_dao.d.ts.map +1 -1
  344. package/dest/note/note_dao.js +2 -1
  345. package/dest/note/notes_filter.d.ts +2 -2
  346. package/dest/note/notes_filter.d.ts.map +1 -1
  347. package/dest/p2p/block_attestation.d.ts +2 -2
  348. package/dest/p2p/block_attestation.d.ts.map +1 -1
  349. package/dest/p2p/block_attestation.js +2 -1
  350. package/dest/p2p/block_proposal.d.ts +2 -2
  351. package/dest/p2p/block_proposal.d.ts.map +1 -1
  352. package/dest/p2p/block_proposal.js +2 -1
  353. package/dest/p2p/consensus_payload.d.ts +2 -2
  354. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  355. package/dest/p2p/consensus_payload.js +1 -1
  356. package/dest/p2p/signature_utils.d.ts +1 -1
  357. package/dest/p2p/signature_utils.d.ts.map +1 -1
  358. package/dest/p2p/signature_utils.js +2 -1
  359. package/dest/parity/parity_base_private_inputs.d.ts +2 -2
  360. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
  361. package/dest/parity/parity_base_private_inputs.js +1 -1
  362. package/dest/parity/parity_public_inputs.d.ts +2 -2
  363. package/dest/parity/parity_public_inputs.d.ts.map +1 -1
  364. package/dest/parity/parity_public_inputs.js +1 -1
  365. package/dest/proofs/chonk_proof.d.ts +2 -2
  366. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  367. package/dest/proofs/chonk_proof.js +2 -2
  368. package/dest/proofs/proof.d.ts +2 -2
  369. package/dest/proofs/proof.d.ts.map +1 -1
  370. package/dest/proofs/proof.js +1 -1
  371. package/dest/proofs/recursive_proof.d.ts +2 -2
  372. package/dest/proofs/recursive_proof.d.ts.map +1 -1
  373. package/dest/proofs/recursive_proof.js +1 -1
  374. package/dest/rollup/avm_proof_data.d.ts +2 -2
  375. package/dest/rollup/avm_proof_data.d.ts.map +1 -1
  376. package/dest/rollup/avm_proof_data.js +1 -1
  377. package/dest/rollup/base_rollup_hints.d.ts +2 -2
  378. package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
  379. package/dest/rollup/base_rollup_hints.js +1 -1
  380. package/dest/rollup/block_constant_data.d.ts +2 -2
  381. package/dest/rollup/block_constant_data.d.ts.map +1 -1
  382. package/dest/rollup/block_constant_data.js +1 -1
  383. package/dest/rollup/block_headers_hash.d.ts +2 -2
  384. package/dest/rollup/block_headers_hash.d.ts.map +1 -1
  385. package/dest/rollup/block_headers_hash.js +1 -1
  386. package/dest/rollup/block_rollup_public_inputs.d.ts +2 -2
  387. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
  388. package/dest/rollup/block_rollup_public_inputs.js +1 -1
  389. package/dest/rollup/block_root_rollup_private_inputs.d.ts +2 -2
  390. package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
  391. package/dest/rollup/block_root_rollup_private_inputs.js +1 -1
  392. package/dest/rollup/checkpoint_constant_data.d.ts +2 -2
  393. package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
  394. package/dest/rollup/checkpoint_constant_data.js +1 -1
  395. package/dest/rollup/checkpoint_header.d.ts +2 -2
  396. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  397. package/dest/rollup/checkpoint_header.js +2 -2
  398. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +2 -2
  399. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  400. package/dest/rollup/checkpoint_rollup_public_inputs.js +1 -1
  401. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +3 -2
  402. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  403. package/dest/rollup/checkpoint_root_rollup_private_inputs.js +2 -1
  404. package/dest/rollup/epoch_constant_data.d.ts +2 -2
  405. package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
  406. package/dest/rollup/epoch_constant_data.js +1 -1
  407. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +2 -2
  408. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -1
  409. package/dest/rollup/public_chonk_verifier_private_inputs.js +1 -1
  410. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts +2 -2
  411. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -1
  412. package/dest/rollup/public_chonk_verifier_public_inputs.js +1 -1
  413. package/dest/rollup/root_rollup_public_inputs.d.ts +2 -2
  414. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  415. package/dest/rollup/root_rollup_public_inputs.js +1 -1
  416. package/dest/rollup/tree_snapshot_diff_hints.d.ts +2 -2
  417. package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
  418. package/dest/rollup/tree_snapshot_diff_hints.js +1 -1
  419. package/dest/rollup/tx_rollup_public_inputs.d.ts +2 -2
  420. package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
  421. package/dest/rollup/tx_rollup_public_inputs.js +1 -1
  422. package/dest/schemas/schemas.d.ts +3 -2
  423. package/dest/schemas/schemas.d.ts.map +1 -1
  424. package/dest/tests/factories.d.ts +4 -3
  425. package/dest/tests/factories.d.ts.map +1 -1
  426. package/dest/tests/factories.js +6 -2
  427. package/dest/tests/mocks.d.ts +17 -5
  428. package/dest/tests/mocks.d.ts.map +1 -1
  429. package/dest/tests/mocks.js +51 -6
  430. package/dest/trees/append_only_tree_snapshot.d.ts +2 -2
  431. package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
  432. package/dest/trees/append_only_tree_snapshot.js +1 -1
  433. package/dest/trees/database_public_state_source.d.ts +2 -2
  434. package/dest/trees/database_public_state_source.d.ts.map +1 -1
  435. package/dest/trees/database_public_state_source.js +1 -1
  436. package/dest/trees/nullifier_leaf.d.ts +2 -2
  437. package/dest/trees/nullifier_leaf.d.ts.map +1 -1
  438. package/dest/trees/nullifier_leaf.js +1 -1
  439. package/dest/trees/nullifier_membership_witness.d.ts +2 -2
  440. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  441. package/dest/trees/nullifier_membership_witness.js +1 -1
  442. package/dest/trees/public_data_leaf.d.ts +2 -2
  443. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  444. package/dest/trees/public_data_leaf.js +1 -1
  445. package/dest/trees/public_data_witness.d.ts +2 -2
  446. package/dest/trees/public_data_witness.d.ts.map +1 -1
  447. package/dest/trees/public_data_witness.js +1 -1
  448. package/dest/tx/block_header.d.ts +2 -2
  449. package/dest/tx/block_header.d.ts.map +1 -1
  450. package/dest/tx/block_header.js +3 -2
  451. package/dest/tx/call_context.d.ts +2 -2
  452. package/dest/tx/call_context.d.ts.map +1 -1
  453. package/dest/tx/capsule.d.ts +2 -2
  454. package/dest/tx/capsule.d.ts.map +1 -1
  455. package/dest/tx/capsule.js +1 -1
  456. package/dest/tx/content_commitment.d.ts +2 -2
  457. package/dest/tx/content_commitment.d.ts.map +1 -1
  458. package/dest/tx/content_commitment.js +1 -1
  459. package/dest/tx/function_data.d.ts +2 -2
  460. package/dest/tx/function_data.d.ts.map +1 -1
  461. package/dest/tx/function_data.js +1 -1
  462. package/dest/tx/global_variables.d.ts +2 -2
  463. package/dest/tx/global_variables.d.ts.map +1 -1
  464. package/dest/tx/global_variables.js +2 -2
  465. package/dest/tx/hashed_values.d.ts +2 -2
  466. package/dest/tx/hashed_values.d.ts.map +1 -1
  467. package/dest/tx/hashed_values.js +1 -1
  468. package/dest/tx/in_tx.d.ts +26 -0
  469. package/dest/tx/in_tx.d.ts.map +1 -0
  470. package/dest/tx/in_tx.js +14 -0
  471. package/dest/tx/index.d.ts +2 -1
  472. package/dest/tx/index.d.ts.map +1 -1
  473. package/dest/tx/index.js +1 -0
  474. package/dest/tx/indexed_tx_effect.d.ts +5 -4
  475. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  476. package/dest/tx/indexed_tx_effect.js +3 -3
  477. package/dest/tx/offchain_effect.d.ts +2 -2
  478. package/dest/tx/offchain_effect.d.ts.map +1 -1
  479. package/dest/tx/offchain_effect.js +1 -1
  480. package/dest/tx/partial_state_reference.d.ts +2 -2
  481. package/dest/tx/partial_state_reference.d.ts.map +1 -1
  482. package/dest/tx/private_execution_result.d.ts +2 -2
  483. package/dest/tx/private_execution_result.d.ts.map +1 -1
  484. package/dest/tx/private_execution_result.js +2 -2
  485. package/dest/tx/private_tx_constant_data.d.ts +2 -2
  486. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  487. package/dest/tx/private_tx_constant_data.js +1 -1
  488. package/dest/tx/processed_tx.d.ts +4 -3
  489. package/dest/tx/processed_tx.d.ts.map +1 -1
  490. package/dest/tx/processed_tx.js +4 -6
  491. package/dest/tx/profiling.d.ts +2 -2
  492. package/dest/tx/profiling.d.ts.map +1 -1
  493. package/dest/tx/profiling.js +1 -1
  494. package/dest/tx/protocol_contracts.d.ts +2 -2
  495. package/dest/tx/protocol_contracts.d.ts.map +1 -1
  496. package/dest/tx/protocol_contracts.js +1 -1
  497. package/dest/tx/public_call_request_with_calldata.d.ts +2 -2
  498. package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
  499. package/dest/tx/public_call_request_with_calldata.js +1 -1
  500. package/dest/tx/public_simulation_output.d.ts +2 -2
  501. package/dest/tx/public_simulation_output.d.ts.map +1 -1
  502. package/dest/tx/public_simulation_output.js +1 -1
  503. package/dest/tx/state_reference.d.ts +2 -2
  504. package/dest/tx/state_reference.d.ts.map +1 -1
  505. package/dest/tx/tree_snapshots.d.ts +2 -2
  506. package/dest/tx/tree_snapshots.d.ts.map +1 -1
  507. package/dest/tx/tx.d.ts +2 -2
  508. package/dest/tx/tx.d.ts.map +1 -1
  509. package/dest/tx/tx.js +1 -1
  510. package/dest/tx/tx_constant_data.d.ts +2 -2
  511. package/dest/tx/tx_constant_data.d.ts.map +1 -1
  512. package/dest/tx/tx_constant_data.js +1 -1
  513. package/dest/tx/tx_context.d.ts +2 -2
  514. package/dest/tx/tx_context.d.ts.map +1 -1
  515. package/dest/tx/tx_context.js +1 -1
  516. package/dest/tx/tx_effect.d.ts +2 -2
  517. package/dest/tx/tx_effect.d.ts.map +1 -1
  518. package/dest/tx/tx_effect.js +2 -2
  519. package/dest/tx/tx_execution_request.d.ts +2 -2
  520. package/dest/tx/tx_execution_request.d.ts.map +1 -1
  521. package/dest/tx/tx_execution_request.js +1 -1
  522. package/dest/tx/tx_hash.d.ts +2 -2
  523. package/dest/tx/tx_hash.d.ts.map +1 -1
  524. package/dest/tx/tx_hash.js +1 -1
  525. package/dest/tx/tx_request.d.ts +2 -2
  526. package/dest/tx/tx_request.d.ts.map +1 -1
  527. package/dest/tx/tx_request.js +2 -2
  528. package/dest/validators/errors.d.ts +2 -2
  529. package/dest/validators/errors.d.ts.map +1 -1
  530. package/dest/versioning/versioning.d.ts +2 -2
  531. package/dest/versioning/versioning.d.ts.map +1 -1
  532. package/dest/vks/verification_key.d.ts +2 -2
  533. package/dest/vks/verification_key.d.ts.map +1 -1
  534. package/dest/vks/verification_key.js +1 -1
  535. package/dest/vks/vk_data.d.ts +2 -2
  536. package/dest/vks/vk_data.d.ts.map +1 -1
  537. package/dest/vks/vk_data.js +1 -1
  538. package/dest/zkpassport/index.d.ts +2 -2
  539. package/dest/zkpassport/index.d.ts.map +1 -1
  540. package/dest/zkpassport/index.js +2 -2
  541. package/package.json +8 -8
  542. package/src/abi/abi.ts +1 -1
  543. package/src/abi/authorization_selector.ts +3 -2
  544. package/src/abi/buffer.ts +1 -1
  545. package/src/abi/decoder.ts +1 -1
  546. package/src/abi/encoder.ts +1 -1
  547. package/src/abi/event_selector.ts +3 -2
  548. package/src/abi/function_call.ts +1 -1
  549. package/src/abi/function_selector.ts +3 -2
  550. package/src/abi/note_selector.ts +2 -2
  551. package/src/abi/selector.ts +1 -1
  552. package/src/auth_witness/auth_witness.ts +2 -2
  553. package/src/avm/avm.ts +89 -6
  554. package/src/avm/avm_accumulated_data.ts +1 -1
  555. package/src/avm/avm_circuit_public_inputs.ts +1 -1
  556. package/src/avm/contract_storage_read.ts +1 -1
  557. package/src/avm/contract_storage_update_request.ts +1 -1
  558. package/src/avm/message_pack.ts +2 -1
  559. package/src/avm/public_call_stack_item_compressed.ts +1 -1
  560. package/src/avm/public_data_read.ts +1 -1
  561. package/src/avm/public_data_update_request.ts +1 -1
  562. package/src/avm/public_data_write.ts +1 -1
  563. package/src/avm/public_inner_call_request.ts +1 -1
  564. package/src/avm/revert_code.ts +1 -1
  565. package/src/aztec-address/index.ts +2 -1
  566. package/src/block/attestation_info.ts +1 -1
  567. package/src/block/block_hash.ts +1 -1
  568. package/src/block/in_block.ts +14 -5
  569. package/src/block/l2_block.ts +14 -6
  570. package/src/block/l2_block_code_to_purge.ts +1 -1
  571. package/src/block/l2_block_header.ts +1 -1
  572. package/src/block/l2_block_info.ts +1 -1
  573. package/src/block/l2_block_new.ts +26 -10
  574. package/src/block/l2_block_source.ts +1 -1
  575. package/src/block/test/l2_tips_store_test_suite.ts +1 -1
  576. package/src/checkpoint/checkpoint.ts +2 -2
  577. package/src/checkpoint/published_checkpoint.ts +1 -1
  578. package/src/contract/artifact_hash.ts +2 -2
  579. package/src/contract/complete_address.ts +1 -1
  580. package/src/contract/contract_address.ts +2 -2
  581. package/src/contract/contract_class.ts +2 -2
  582. package/src/contract/contract_class_id.ts +2 -2
  583. package/src/contract/contract_instance.ts +1 -1
  584. package/src/contract/contract_instance_update.ts +1 -1
  585. package/src/contract/deployment_info.ts +1 -1
  586. package/src/contract/interfaces/contract_class.ts +1 -1
  587. package/src/contract/interfaces/contract_data_source.ts +1 -1
  588. package/src/contract/interfaces/contract_instance.ts +1 -1
  589. package/src/contract/interfaces/contract_instance_update.ts +1 -1
  590. package/src/contract/partial_address.ts +1 -1
  591. package/src/contract/private_function.ts +3 -2
  592. package/src/contract/private_function_membership_proof.ts +2 -2
  593. package/src/contract/utility_function_membership_proof.ts +1 -1
  594. package/src/delayed_public_mutable/delayed_public_mutable_values.ts +2 -2
  595. package/src/delayed_public_mutable/delayed_public_mutable_values_with_hash.ts +1 -1
  596. package/src/delayed_public_mutable/scheduled_value_change.ts +1 -1
  597. package/src/errors/simulation_error.ts +1 -1
  598. package/src/fees/transaction_fee.ts +1 -1
  599. package/src/gas/gas.ts +1 -1
  600. package/src/gas/gas_fees.ts +1 -1
  601. package/src/gas/gas_settings.ts +1 -1
  602. package/src/hash/hash.ts +3 -2
  603. package/src/hash/map_slot.ts +2 -2
  604. package/src/interfaces/allowed_element.ts +1 -1
  605. package/src/interfaces/archiver.ts +1 -2
  606. package/src/interfaces/aztec-node.ts +3 -3
  607. package/src/interfaces/block-builder.ts +1 -1
  608. package/src/interfaces/epoch-prover.ts +1 -1
  609. package/src/interfaces/l2_logs_source.ts +1 -1
  610. package/src/interfaces/merkle_tree_operations.ts +1 -1
  611. package/src/interfaces/public_state_source.ts +1 -1
  612. package/src/interfaces/validator.ts +1 -1
  613. package/src/kernel/claimed_length_array.ts +1 -1
  614. package/src/kernel/hints/build_nullifier_read_request_hints.ts +1 -1
  615. package/src/kernel/hints/key_validation_hint.ts +1 -1
  616. package/src/kernel/hints/key_validation_request.ts +2 -1
  617. package/src/kernel/hints/key_validation_request_and_generator.ts +1 -1
  618. package/src/kernel/hints/note_hash_read_request_hints.ts +1 -1
  619. package/src/kernel/hints/read_request.ts +1 -1
  620. package/src/kernel/hints/scoped_key_validation_request_and_generator.ts +1 -1
  621. package/src/kernel/hints/scoped_value_cache.ts +1 -1
  622. package/src/kernel/hints/transient_data_squashing_hint.ts +1 -1
  623. package/src/kernel/hints/tree_leaf_read_request.ts +1 -1
  624. package/src/kernel/log_hash.ts +1 -1
  625. package/src/kernel/note_hash.ts +1 -1
  626. package/src/kernel/nullifier.ts +1 -1
  627. package/src/kernel/padded_side_effects.ts +1 -1
  628. package/src/kernel/private_call_data.ts +1 -1
  629. package/src/kernel/private_call_request.ts +1 -1
  630. package/src/kernel/private_circuit_public_inputs.ts +1 -1
  631. package/src/kernel/private_context_inputs.ts +1 -1
  632. package/src/kernel/private_kernel_circuit_public_inputs.ts +1 -1
  633. package/src/kernel/private_kernel_init_circuit_private_inputs.ts +1 -1
  634. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +1 -1
  635. package/src/kernel/private_log_data.ts +1 -1
  636. package/src/kernel/private_to_avm_accumulated_data.ts +1 -1
  637. package/src/kernel/private_to_public_accumulated_data.ts +1 -1
  638. package/src/kernel/private_to_public_accumulated_data_builder.ts +1 -1
  639. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +2 -2
  640. package/src/kernel/private_to_rollup_accumulated_data.ts +1 -1
  641. package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +2 -2
  642. package/src/kernel/public_call_request.ts +1 -1
  643. package/src/kernel/utils/optional_number.ts +1 -1
  644. package/src/keys/derivation.ts +5 -2
  645. package/src/keys/public_key.ts +1 -1
  646. package/src/keys/public_keys.ts +3 -2
  647. package/src/logs/contract_class_log.ts +2 -2
  648. package/src/logs/debug_log.ts +1 -1
  649. package/src/logs/directional_app_tagging_secret.ts +4 -2
  650. package/src/logs/log_with_tx_data.ts +1 -1
  651. package/src/logs/message_context.ts +1 -1
  652. package/src/logs/pending_tagged_log.ts +1 -1
  653. package/src/logs/private_log.ts +1 -1
  654. package/src/logs/public_log.ts +8 -1
  655. package/src/logs/shared_secret_derivation.ts +2 -2
  656. package/src/messaging/in_hash.ts +1 -1
  657. package/src/messaging/inbox_leaf.ts +11 -10
  658. package/src/messaging/l1_actor.ts +2 -2
  659. package/src/messaging/l1_to_l2_message.ts +2 -2
  660. package/src/messaging/l1_to_l2_message_source.ts +3 -16
  661. package/src/messaging/l2_actor.ts +2 -2
  662. package/src/messaging/l2_to_l1_membership.ts +1 -1
  663. package/src/messaging/l2_to_l1_message.ts +5 -1
  664. package/src/messaging/out_hash.ts +1 -1
  665. package/src/note/note.ts +2 -2
  666. package/src/note/note_dao.ts +2 -1
  667. package/src/note/notes_filter.ts +1 -1
  668. package/src/p2p/block_attestation.ts +3 -2
  669. package/src/p2p/block_proposal.ts +3 -2
  670. package/src/p2p/consensus_payload.ts +1 -1
  671. package/src/p2p/signature_utils.ts +2 -1
  672. package/src/parity/parity_base_private_inputs.ts +1 -1
  673. package/src/parity/parity_public_inputs.ts +1 -1
  674. package/src/proofs/chonk_proof.ts +2 -2
  675. package/src/proofs/proof.ts +1 -1
  676. package/src/proofs/recursive_proof.ts +1 -1
  677. package/src/rollup/avm_proof_data.ts +1 -1
  678. package/src/rollup/base_rollup_hints.ts +1 -1
  679. package/src/rollup/block_constant_data.ts +1 -1
  680. package/src/rollup/block_headers_hash.ts +1 -1
  681. package/src/rollup/block_rollup_public_inputs.ts +1 -1
  682. package/src/rollup/block_root_rollup_private_inputs.ts +1 -1
  683. package/src/rollup/checkpoint_constant_data.ts +1 -1
  684. package/src/rollup/checkpoint_header.ts +2 -2
  685. package/src/rollup/checkpoint_rollup_public_inputs.ts +1 -1
  686. package/src/rollup/checkpoint_root_rollup_private_inputs.ts +2 -1
  687. package/src/rollup/epoch_constant_data.ts +1 -1
  688. package/src/rollup/public_chonk_verifier_private_inputs.ts +1 -1
  689. package/src/rollup/public_chonk_verifier_public_inputs.ts +1 -1
  690. package/src/rollup/root_rollup_public_inputs.ts +1 -1
  691. package/src/rollup/tree_snapshot_diff_hints.ts +1 -1
  692. package/src/rollup/tx_rollup_public_inputs.ts +1 -1
  693. package/src/schemas/schemas.ts +2 -1
  694. package/src/tests/factories.ts +6 -2
  695. package/src/tests/mocks.ts +68 -5
  696. package/src/trees/append_only_tree_snapshot.ts +1 -1
  697. package/src/trees/database_public_state_source.ts +1 -1
  698. package/src/trees/nullifier_leaf.ts +1 -1
  699. package/src/trees/nullifier_membership_witness.ts +1 -1
  700. package/src/trees/public_data_leaf.ts +1 -1
  701. package/src/trees/public_data_witness.ts +1 -1
  702. package/src/tx/block_header.ts +3 -2
  703. package/src/tx/call_context.ts +1 -1
  704. package/src/tx/capsule.ts +1 -1
  705. package/src/tx/content_commitment.ts +1 -1
  706. package/src/tx/function_data.ts +1 -1
  707. package/src/tx/global_variables.ts +2 -2
  708. package/src/tx/hashed_values.ts +1 -1
  709. package/src/tx/in_tx.ts +24 -0
  710. package/src/tx/index.ts +1 -0
  711. package/src/tx/indexed_tx_effect.ts +3 -3
  712. package/src/tx/offchain_effect.ts +1 -1
  713. package/src/tx/partial_state_reference.ts +1 -1
  714. package/src/tx/private_execution_result.ts +2 -2
  715. package/src/tx/private_tx_constant_data.ts +1 -1
  716. package/src/tx/processed_tx.ts +11 -14
  717. package/src/tx/profiling.ts +1 -1
  718. package/src/tx/protocol_contracts.ts +2 -2
  719. package/src/tx/public_call_request_with_calldata.ts +1 -1
  720. package/src/tx/public_simulation_output.ts +1 -1
  721. package/src/tx/state_reference.ts +1 -1
  722. package/src/tx/tree_snapshots.ts +1 -1
  723. package/src/tx/tx.ts +1 -1
  724. package/src/tx/tx_constant_data.ts +1 -1
  725. package/src/tx/tx_context.ts +1 -1
  726. package/src/tx/tx_effect.ts +2 -2
  727. package/src/tx/tx_execution_request.ts +1 -1
  728. package/src/tx/tx_hash.ts +1 -1
  729. package/src/tx/tx_request.ts +2 -2
  730. package/src/validators/errors.ts +1 -1
  731. package/src/versioning/versioning.ts +1 -1
  732. package/src/vks/verification_key.ts +1 -1
  733. package/src/vks/vk_data.ts +1 -1
  734. package/src/zkpassport/index.ts +2 -2
@@ -1,6 +1,6 @@
1
1
  import { toBigIntBE } from '@aztec/foundation/bigint-buffer';
2
- import { randomInt } from '@aztec/foundation/crypto';
3
- import { Fr } from '@aztec/foundation/fields';
2
+ import { randomInt } from '@aztec/foundation/crypto/random';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import { hexSchemaFor } from '@aztec/foundation/schemas';
5
5
  import { BufferReader, TypeRegistry } from '@aztec/foundation/serialize';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { toBufferBE } from '@aztec/foundation/bigint-buffer';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { bufferToHex } from '@aztec/foundation/string';
4
4
 
5
5
  import { inspect } from 'util';
@@ -1,6 +1,6 @@
1
1
  import { GeneratorIndex } from '@aztec/constants';
2
- import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto';
3
- import { Fr } from '@aztec/foundation/fields';
2
+ import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
5
5
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
6
6
 
package/src/avm/avm.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_MAX_DEBUG_LOG_MEMORY_READS } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { jsonParseWithSchema, jsonStringify } from '@aztec/foundation/json-rpc';
4
4
 
5
5
  import { z } from 'zod';
@@ -15,6 +15,7 @@ import { GasSettings } from '../gas/gas_settings.js';
15
15
  import { GasUsed } from '../gas/gas_used.js';
16
16
  import { PublicKeys } from '../keys/public_keys.js';
17
17
  import { DebugLog } from '../logs/debug_log.js';
18
+ import { PublicLog } from '../logs/public_log.js';
18
19
  import { ScopedL2ToL1Message } from '../messaging/l2_to_l1_message.js';
19
20
  import { NullishToUndefined, type ZodFor, schemas } from '../schemas/schemas.js';
20
21
  import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
@@ -33,6 +34,7 @@ import { TxExecutionPhase } from '../tx/processed_tx.js';
33
34
  import { WorldStateRevision } from '../world-state/world_state_revision.js';
34
35
  import { AvmCircuitPublicInputs } from './avm_circuit_public_inputs.js';
35
36
  import { serializeWithMessagePack } from './message_pack.js';
37
+ import { PublicDataWrite } from './public_data_write.js';
36
38
  import { RevertCode } from './revert_code.js';
37
39
 
38
40
  ////////////////////////////////////////////////////////////////////////////
@@ -1174,11 +1176,78 @@ export class CallStackMetadata {
1174
1176
  }
1175
1177
  }
1176
1178
 
1179
+ export class PublicTxEffect {
1180
+ constructor(
1181
+ public transactionFee: Fr,
1182
+ public noteHashes: Fr[],
1183
+ public nullifiers: Fr[],
1184
+ public l2ToL1Msgs: ScopedL2ToL1Message[],
1185
+ public publicLogs: PublicLog[],
1186
+ public publicDataWrites: PublicDataWrite[],
1187
+ ) {}
1188
+
1189
+ static empty() {
1190
+ return new PublicTxEffect(Fr.ZERO, [], [], [], [], []);
1191
+ }
1192
+
1193
+ static get schema(): ZodFor<PublicTxEffect> {
1194
+ return z
1195
+ .object({
1196
+ transactionFee: Fr.schema,
1197
+ noteHashes: Fr.schema.array(),
1198
+ nullifiers: Fr.schema.array(),
1199
+ l2ToL1Msgs: ScopedL2ToL1Message.schema.array(),
1200
+ publicLogs: PublicLog.schema.array(),
1201
+ publicDataWrites: PublicDataWrite.schema.array(),
1202
+ })
1203
+ .transform(PublicTxEffect.from);
1204
+ }
1205
+
1206
+ static from(obj: any): PublicTxEffect {
1207
+ return new PublicTxEffect(
1208
+ obj.transactionFee,
1209
+ obj.noteHashes,
1210
+ obj.nullifiers,
1211
+ obj.l2ToL1Msgs,
1212
+ obj.publicLogs,
1213
+ obj.publicDataWrites,
1214
+ );
1215
+ }
1216
+
1217
+ static fromPlainObject(obj: any): PublicTxEffect {
1218
+ return new PublicTxEffect(
1219
+ Fr.fromPlainObject(obj.transactionFee),
1220
+ obj.noteHashes.map((h: any) => Fr.fromPlainObject(h)),
1221
+ obj.nullifiers.map((n: any) => Fr.fromPlainObject(n)),
1222
+ obj.l2ToL1Msgs.map((m: any) => ScopedL2ToL1Message.fromPlainObject(m)),
1223
+ obj.publicLogs.map((l: any) => PublicLog.fromPlainObject(l)),
1224
+ obj.publicDataWrites.map((w: any) => PublicDataWrite.fromPlainObject(w)),
1225
+ );
1226
+ }
1227
+
1228
+ equals(other: PublicTxEffect): boolean {
1229
+ return (
1230
+ this.transactionFee.equals(other.transactionFee) &&
1231
+ this.noteHashes.length === other.noteHashes.length &&
1232
+ this.noteHashes.every((h, i) => h.equals(other.noteHashes[i])) &&
1233
+ this.nullifiers.length === other.nullifiers.length &&
1234
+ this.nullifiers.every((h, i) => h.equals(other.nullifiers[i])) &&
1235
+ this.l2ToL1Msgs.length === other.l2ToL1Msgs.length &&
1236
+ this.l2ToL1Msgs.every((m, i) => m.equals(other.l2ToL1Msgs[i])) &&
1237
+ this.publicLogs.length === other.publicLogs.length &&
1238
+ this.publicLogs.every((l, i) => l.equals(other.publicLogs[i])) &&
1239
+ this.publicDataWrites.length === other.publicDataWrites.length &&
1240
+ this.publicDataWrites.every((w, i) => w.equals(other.publicDataWrites[i]))
1241
+ );
1242
+ }
1243
+ }
1244
+
1177
1245
  export class PublicTxResult {
1178
1246
  constructor(
1179
1247
  // Simulation result.
1180
1248
  public gasUsed: GasUsed,
1181
1249
  public revertCode: RevertCode,
1250
+ public publicTxEffect: PublicTxEffect,
1182
1251
  // These are only guaranteed to be present if the simulator is configured to collect them.
1183
1252
  // TODO(fcarreiro): Remove NestedProcessReturnValues[] once we migrate to the C++ simulator.
1184
1253
  public callStackMetadata:
@@ -1187,7 +1256,7 @@ export class PublicTxResult {
1187
1256
  public logs: DebugLog[] | undefined,
1188
1257
  // For the proving request.
1189
1258
  public hints: AvmExecutionHints | undefined,
1190
- public publicInputs: AvmCircuitPublicInputs,
1259
+ public publicInputs: AvmCircuitPublicInputs | undefined,
1191
1260
  ) {}
1192
1261
 
1193
1262
  static empty() {
@@ -1199,6 +1268,7 @@ export class PublicTxResult {
1199
1268
  billedGas: Gas.empty(),
1200
1269
  },
1201
1270
  RevertCode.OK,
1271
+ PublicTxEffect.empty(),
1202
1272
  /*callStackMetadata=*/ [] as CallStackMetadata[],
1203
1273
  /*logs=*/ [],
1204
1274
  /*hints=*/ AvmExecutionHints.empty(),
@@ -1212,15 +1282,24 @@ export class PublicTxResult {
1212
1282
  gasUsed: schemas.GasUsed,
1213
1283
  revertCode: RevertCode.schema,
1214
1284
  revertReason: NullishToUndefined(SimulationError.schema),
1285
+ publicTxEffect: PublicTxEffect.schema,
1215
1286
  callStackMetadata: z.union([CallStackMetadata.schema.array(), NestedProcessReturnValues.schema.array()]),
1216
1287
  logs: NullishToUndefined(DebugLog.schema.array()),
1217
1288
  // For the proving request.
1218
- publicInputs: AvmCircuitPublicInputs.schema,
1289
+ publicInputs: NullishToUndefined(AvmCircuitPublicInputs.schema),
1219
1290
  hints: NullishToUndefined(AvmExecutionHints.schema),
1220
1291
  })
1221
1292
  .transform(
1222
- ({ gasUsed, revertCode, callStackMetadata, logs, hints, publicInputs }) =>
1223
- new PublicTxResult(gasUsed, revertCode as RevertCode, callStackMetadata, logs, hints, publicInputs),
1293
+ ({ gasUsed, revertCode, publicTxEffect, callStackMetadata, logs, hints, publicInputs }) =>
1294
+ new PublicTxResult(
1295
+ gasUsed,
1296
+ revertCode as RevertCode,
1297
+ publicTxEffect,
1298
+ callStackMetadata,
1299
+ logs,
1300
+ hints,
1301
+ publicInputs,
1302
+ ),
1224
1303
  );
1225
1304
  }
1226
1305
 
@@ -1235,10 +1314,11 @@ export class PublicTxResult {
1235
1314
  return new PublicTxResult(
1236
1315
  GasUsed.fromPlainObject(obj.gasUsed),
1237
1316
  RevertCode.fromPlainObject(obj.revertCode),
1317
+ PublicTxEffect.fromPlainObject(obj.publicTxEffect),
1238
1318
  obj.callStackMetadata.map(CallStackMetadata.fromPlainObject), // Always CallStackMetadata[] from MessagePack.
1239
1319
  obj.logs?.map(DebugLog.fromPlainObject),
1240
1320
  obj.hints ? AvmExecutionHints.fromPlainObject(obj.hints) : undefined,
1241
- AvmCircuitPublicInputs.fromPlainObject(obj.publicInputs),
1321
+ obj.publicInputs ? AvmCircuitPublicInputs.fromPlainObject(obj.publicInputs) : undefined,
1242
1322
  );
1243
1323
  }
1244
1324
 
@@ -1336,6 +1416,7 @@ export class PublicSimulatorConfig {
1336
1416
  public readonly skipFeeEnforcement: boolean,
1337
1417
  public readonly collectCallMetadata: boolean, // appLogicReturnValues.
1338
1418
  public readonly collectHints: boolean, // hints.
1419
+ public readonly collectPublicInputs: boolean, // public inputs.
1339
1420
  public readonly collectDebugLogs: boolean, // logs.
1340
1421
  public readonly collectStatistics: boolean, // timings etc.
1341
1422
  public readonly collectionLimits: CollectionLimitsConfig,
@@ -1347,6 +1428,7 @@ export class PublicSimulatorConfig {
1347
1428
  obj.skipFeeEnforcement ?? false,
1348
1429
  obj.collectCallMetadata ?? false,
1349
1430
  obj.collectHints ?? false,
1431
+ obj.collectPublicInputs ?? false,
1350
1432
  obj.collectDebugLogs ?? false,
1351
1433
  obj.collectStatistics ?? false,
1352
1434
  obj.collectionLimits ?? CollectionLimitsConfig.empty(),
@@ -1364,6 +1446,7 @@ export class PublicSimulatorConfig {
1364
1446
  skipFeeEnforcement: z.boolean(),
1365
1447
  collectCallMetadata: z.boolean(),
1366
1448
  collectHints: z.boolean(),
1449
+ collectPublicInputs: z.boolean(),
1367
1450
  collectDebugLogs: z.boolean(),
1368
1451
  collectStatistics: z.boolean(),
1369
1452
  collectionLimits: CollectionLimitsConfig.schema,
@@ -7,7 +7,7 @@ import {
7
7
  } from '@aztec/constants';
8
8
  import { type FieldsOf, makeTuple } from '@aztec/foundation/array';
9
9
  import { arraySerializedSizeOfNonEmpty } from '@aztec/foundation/collection';
10
- import { Fr } from '@aztec/foundation/fields';
10
+ import { Fr } from '@aztec/foundation/curves/bn254';
11
11
  import { schemas } from '@aztec/foundation/schemas';
12
12
  import {
13
13
  BufferReader,
@@ -1,6 +1,6 @@
1
1
  import { MAX_ENQUEUED_CALLS_PER_TX } from '@aztec/constants';
2
2
  import { makeTuple } from '@aztec/foundation/array';
3
- import { Fr } from '@aztec/foundation/fields';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import { schemas } from '@aztec/foundation/schemas';
5
5
  import { BufferReader, FieldReader, type Tuple, assertLength, serializeToBuffer } from '@aztec/foundation/serialize';
6
6
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
@@ -1,5 +1,5 @@
1
1
  import { CONTRACT_STORAGE_READ_LENGTH } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
4
 
5
5
  import type { AztecAddress } from '../aztec-address/index.js';
@@ -1,5 +1,5 @@
1
1
  import { CONTRACT_STORAGE_UPDATE_REQUEST_LENGTH } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
4
  import type { FieldsOf } from '@aztec/foundation/types';
5
5
 
@@ -1,5 +1,6 @@
1
+ import { Fq, Fr } from '@aztec/foundation/curves/bn254';
2
+ import { Point } from '@aztec/foundation/curves/grumpkin';
1
3
  import { EthAddress } from '@aztec/foundation/eth-address';
2
- import { Fq, Fr, Point } from '@aztec/foundation/fields';
3
4
 
4
5
  import { strict as assert } from 'assert';
5
6
  import { Decoder, Encoder, addExtension } from 'msgpackr';
@@ -1,5 +1,5 @@
1
1
  import { PUBLIC_CALL_STACK_ITEM_COMPRESSED_LENGTH } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
4
4
  import type { FieldsOf } from '@aztec/foundation/types';
5
5
 
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
3
 
4
4
  import { inspect } from 'util';
@@ -1,5 +1,5 @@
1
1
  import { PUBLIC_DATA_WRITE_LENGTH } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { schemas } from '@aztec/foundation/schemas';
4
4
  import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
5
5
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
@@ -1,4 +1,4 @@
1
- import type { Fr } from '@aztec/foundation/fields';
1
+ import type { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
3
3
  import type { FieldsOf } from '@aztec/foundation/types';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import type { ZodFor } from '@aztec/foundation/schemas';
3
3
  import { BufferReader, FieldReader } from '@aztec/foundation/serialize';
4
4
 
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
2
- import { Fr, Point, fromBuffer } from '@aztec/foundation/fields';
2
+ import { Fr, fromBuffer } from '@aztec/foundation/curves/bn254';
3
+ import { Point } from '@aztec/foundation/curves/grumpkin';
3
4
  import { type ZodFor, bufferSchemaFor, hexSchemaFor } from '@aztec/foundation/schemas';
4
5
  import { type BufferReader, FieldReader, TypeRegistry } from '@aztec/foundation/serialize';
5
6
  import { hexToBuffer } from '@aztec/foundation/string';
@@ -1,4 +1,4 @@
1
- import { recoverAddress } from '@aztec/foundation/crypto';
1
+ import { recoverAddress } from '@aztec/foundation/crypto/secp256k1-signer';
2
2
  import type { EthAddress } from '@aztec/foundation/eth-address';
3
3
 
4
4
  import { ConsensusPayload } from '../p2p/consensus_payload.js';
@@ -1,5 +1,5 @@
1
1
  import { Buffer32 } from '@aztec/foundation/buffer';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { BufferReader } from '@aztec/foundation/serialize';
4
4
 
5
5
  import { schemas } from '../schemas/schemas.js';
@@ -15,15 +15,21 @@ export type DataInBlock<T> = {
15
15
  data: T;
16
16
  } & InBlock;
17
17
 
18
- export function randomInBlock<T>(data: T): DataInBlock<T> {
18
+ export function randomInBlock(): InBlock {
19
19
  return {
20
- data,
21
20
  l2BlockNumber: BlockNumber(Math.floor(Math.random() * 1000)),
22
21
  l2BlockHash: L2BlockHash.random(),
23
22
  };
24
23
  }
25
24
 
26
- export async function wrapInBlock<T>(data: T, block: L2Block): Promise<DataInBlock<T>> {
25
+ export function randomDataInBlock<T>(data: T): DataInBlock<T> {
26
+ return {
27
+ ...randomInBlock(),
28
+ data,
29
+ };
30
+ }
31
+
32
+ export async function wrapDataInBlock<T>(data: T, block: L2Block): Promise<DataInBlock<T>> {
27
33
  return {
28
34
  data,
29
35
  l2BlockNumber: block.number,
@@ -31,10 +37,13 @@ export async function wrapInBlock<T>(data: T, block: L2Block): Promise<DataInBlo
31
37
  };
32
38
  }
33
39
 
34
- export function inBlockSchemaFor<T extends ZodTypeAny>(schema: T) {
40
+ export function inBlockSchema() {
35
41
  return z.object({
36
- data: schema,
37
42
  l2BlockNumber: BlockNumberSchema,
38
43
  l2BlockHash: L2BlockHash.schema,
39
44
  });
40
45
  }
46
+
47
+ export function dataInBlockSchemaFor<T extends ZodTypeAny>(schema: T) {
48
+ return inBlockSchema().extend({ data: schema });
49
+ }
@@ -1,6 +1,6 @@
1
1
  import { type BlockBlobData, encodeBlockBlobData, encodeCheckpointBlobDataFromBlocks } from '@aztec/blob-lib/encoding';
2
2
  import { BlockNumber, CheckpointNumber, SlotNumber } from '@aztec/foundation/branded-types';
3
- import { Fr } from '@aztec/foundation/fields';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
5
5
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
6
6
 
@@ -152,7 +152,13 @@ export class L2Block {
152
152
  }
153
153
 
154
154
  public toL2Block() {
155
- return new L2BlockNew(this.archive, this.getBlockHeader(), this.body);
155
+ return new L2BlockNew(
156
+ this.archive,
157
+ this.getBlockHeader(),
158
+ this.body,
159
+ CheckpointNumber.fromBlockNumber(this.number),
160
+ 0, // indexWithinCheckpoint
161
+ );
156
162
  }
157
163
 
158
164
  public toCheckpoint() {
@@ -186,16 +192,18 @@ export class L2Block {
186
192
  * TODO(#17027): Remove this method from L2Block and create a dedicated Checkpoint class.
187
193
  */
188
194
  public getCheckpointBlobFields() {
189
- const blockBlobData = this.toBlockBlobData(true);
195
+ const blockBlobData = this.toBlockBlobData();
190
196
  return encodeCheckpointBlobDataFromBlocks([blockBlobData]);
191
197
  }
192
198
 
193
- public toBlobFields(isFirstBlock: boolean): Fr[] {
194
- const blockBlobData = this.toBlockBlobData(isFirstBlock);
199
+ public toBlobFields(): Fr[] {
200
+ const blockBlobData = this.toBlockBlobData();
195
201
  return encodeBlockBlobData(blockBlobData);
196
202
  }
197
203
 
198
- public toBlockBlobData(isFirstBlock: boolean): BlockBlobData {
204
+ public toBlockBlobData(): BlockBlobData {
205
+ // There's only one L2Block per checkpoint, so it's always the first block in the checkpoint.
206
+ const isFirstBlock = true;
199
207
  return {
200
208
  blockEndMarker: {
201
209
  numTxs: this.body.txEffects.length,
@@ -1,7 +1,7 @@
1
1
  import { BlockNumber, SlotNumber } from '@aztec/foundation/branded-types';
2
2
  import { compact } from '@aztec/foundation/collection';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
4
  import { EthAddress } from '@aztec/foundation/eth-address';
4
- import { Fr } from '@aztec/foundation/fields';
5
5
  import type { FieldsOf } from '@aztec/foundation/types';
6
6
 
7
7
  import { AztecAddress } from '../aztec-address/index.js';
@@ -1,5 +1,5 @@
1
1
  import { SlotNumber } from '@aztec/foundation/branded-types';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { type ZodFor, schemas } from '@aztec/foundation/schemas';
4
4
  import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
5
5
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
@@ -1,5 +1,5 @@
1
1
  import { BlockNumber, BlockNumberSchema, SlotNumber, SlotNumberSchema } from '@aztec/foundation/branded-types';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { schemas } from '@aztec/foundation/schemas';
4
4
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { type BlockBlobData, encodeBlockBlobData } from '@aztec/blob-lib/encoding';
2
- import { BlockNumber } from '@aztec/foundation/branded-types';
3
- import { Fr } from '@aztec/foundation/fields';
2
+ import { BlockNumber, CheckpointNumber, CheckpointNumberSchema } from '@aztec/foundation/branded-types';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
5
5
 
6
6
  import { z } from 'zod';
@@ -22,6 +22,10 @@ export class L2BlockNew {
22
22
  public header: BlockHeader,
23
23
  /** L2 block body. */
24
24
  public body: Body,
25
+ /** Number of the checkpoint that the block belongs to. */
26
+ public checkpointNumber: CheckpointNumber,
27
+ /** Index of the block within the checkpoint. */
28
+ public indexWithinCheckpoint: number,
25
29
  private blockHash: Fr | undefined = undefined,
26
30
  ) {}
27
31
 
@@ -39,8 +43,13 @@ export class L2BlockNew {
39
43
  archive: AppendOnlyTreeSnapshot.schema,
40
44
  header: BlockHeader.schema,
41
45
  body: Body.schema,
46
+ checkpointNumber: CheckpointNumberSchema,
47
+ indexWithinCheckpoint: z.number(),
42
48
  })
43
- .transform(({ archive, header, body }) => new L2BlockNew(archive, header, body));
49
+ .transform(
50
+ ({ archive, header, body, checkpointNumber, indexWithinCheckpoint }) =>
51
+ new L2BlockNew(archive, header, body, checkpointNumber, indexWithinCheckpoint),
52
+ );
44
53
  }
45
54
 
46
55
  /**
@@ -52,8 +61,10 @@ export class L2BlockNew {
52
61
  const header = reader.readObject(BlockHeader);
53
62
  const archive = reader.readObject(AppendOnlyTreeSnapshot);
54
63
  const body = reader.readObject(Body);
64
+ const checkpointNumber = CheckpointNumber(reader.readNumber());
65
+ const indexWithinCheckpoint = reader.readNumber();
55
66
 
56
- return new L2BlockNew(archive, header, body);
67
+ return new L2BlockNew(archive, header, body, checkpointNumber, indexWithinCheckpoint);
57
68
  }
58
69
 
59
70
  /**
@@ -61,7 +72,7 @@ export class L2BlockNew {
61
72
  * @returns A serialized L2 block as a Buffer.
62
73
  */
63
74
  toBuffer() {
64
- return serializeToBuffer(this.header, this.archive, this.body);
75
+ return serializeToBuffer(this.header, this.archive, this.body, this.checkpointNumber, this.indexWithinCheckpoint);
65
76
  }
66
77
 
67
78
  /**
@@ -75,12 +86,13 @@ export class L2BlockNew {
75
86
  return this.blockHash;
76
87
  }
77
88
 
78
- public toBlobFields(isFirstBlock: boolean): Fr[] {
79
- const blockBlobData = this.toBlockBlobData(isFirstBlock);
89
+ public toBlobFields(): Fr[] {
90
+ const blockBlobData = this.toBlockBlobData();
80
91
  return encodeBlockBlobData(blockBlobData);
81
92
  }
82
93
 
83
- public toBlockBlobData(isFirstBlock: boolean): BlockBlobData {
94
+ public toBlockBlobData(): BlockBlobData {
95
+ const isFirstBlock = this.indexWithinCheckpoint === 0;
84
96
  return {
85
97
  blockEndMarker: {
86
98
  numTxs: this.body.txEffects.length,
@@ -104,7 +116,7 @@ export class L2BlockNew {
104
116
  }
105
117
 
106
118
  static empty() {
107
- return new L2BlockNew(AppendOnlyTreeSnapshot.empty(), BlockHeader.empty(), Body.empty());
119
+ return new L2BlockNew(AppendOnlyTreeSnapshot.empty(), BlockHeader.empty(), Body.empty(), CheckpointNumber(0), 0);
108
120
  }
109
121
 
110
122
  /**
@@ -119,11 +131,15 @@ export class L2BlockNew {
119
131
  static async random(
120
132
  blockNumber: BlockNumber,
121
133
  {
134
+ checkpointNumber = CheckpointNumber(Number(blockNumber)),
135
+ indexWithinCheckpoint = 0,
122
136
  txsPerBlock = 1,
123
137
  txOptions = {},
124
138
  makeTxOptions,
125
139
  ...blockHeaderOverrides
126
140
  }: {
141
+ checkpointNumber?: CheckpointNumber;
142
+ indexWithinCheckpoint?: number;
127
143
  txsPerBlock?: number;
128
144
  txOptions?: Partial<Parameters<typeof Body.random>[0]>;
129
145
  makeTxOptions?: (txIndex: number) => Partial<Parameters<typeof Body.random>[0]>;
@@ -132,7 +148,7 @@ export class L2BlockNew {
132
148
  const archive = new AppendOnlyTreeSnapshot(Fr.random(), blockNumber + 1);
133
149
  const header = BlockHeader.random({ blockNumber, ...blockHeaderOverrides });
134
150
  const body = await Body.random({ txsPerBlock, makeTxOptions, ...txOptions });
135
- return new L2BlockNew(archive, header, body);
151
+ return new L2BlockNew(archive, header, body, checkpointNumber, indexWithinCheckpoint);
136
152
  }
137
153
 
138
154
  /**
@@ -5,8 +5,8 @@ import {
5
5
  type EpochNumber,
6
6
  type SlotNumber,
7
7
  } from '@aztec/foundation/branded-types';
8
+ import type { Fr } from '@aztec/foundation/curves/bn254';
8
9
  import type { EthAddress } from '@aztec/foundation/eth-address';
9
- import type { Fr } from '@aztec/foundation/fields';
10
10
  import type { TypedEventEmitter } from '@aztec/foundation/types';
11
11
 
12
12
  import { z } from 'zod';
@@ -1,7 +1,7 @@
1
1
  import { GENESIS_BLOCK_HEADER_HASH } from '@aztec/constants';
2
2
  import { BlockNumber } from '@aztec/foundation/branded-types';
3
3
  import { times } from '@aztec/foundation/collection';
4
- import { Fr } from '@aztec/foundation/fields';
4
+ import { Fr } from '@aztec/foundation/curves/bn254';
5
5
  import { type L2Block, type L2BlockId, PublishedL2Block } from '@aztec/stdlib/block';
6
6
 
7
7
  import { jestExpect as expect } from '@jest/expect';
@@ -1,6 +1,6 @@
1
1
  import { encodeCheckpointBlobDataFromBlocks } from '@aztec/blob-lib/encoding';
2
2
  import { BlockNumber, CheckpointNumber, CheckpointNumberSchema } from '@aztec/foundation/branded-types';
3
- import { Fr } from '@aztec/foundation/fields';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
5
5
  import type { FieldsOf } from '@aztec/foundation/types';
6
6
 
@@ -56,7 +56,7 @@ export class Checkpoint {
56
56
  }
57
57
 
58
58
  public toBlobFields(): Fr[] {
59
- const blocks = this.blocks.map((block, i) => block.toBlockBlobData(i === 0));
59
+ const blocks = this.blocks.map(block => block.toBlockBlobData());
60
60
  return encodeCheckpointBlobDataFromBlocks(blocks);
61
61
  }
62
62
 
@@ -1,6 +1,6 @@
1
1
  // Ignoring import issue to fix portable inferred type issue in zod schema
2
2
  import { Buffer32 } from '@aztec/foundation/buffer';
3
- import { randomBigInt } from '@aztec/foundation/crypto';
3
+ import { randomBigInt } from '@aztec/foundation/crypto/random';
4
4
  import { schemas } from '@aztec/foundation/schemas';
5
5
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
6
6
  import type { FieldsOf } from '@aztec/foundation/types';
@@ -1,5 +1,5 @@
1
- import { sha256 } from '@aztec/foundation/crypto';
2
- import { Fr, reduceFn } from '@aztec/foundation/fields';
1
+ import { sha256 } from '@aztec/foundation/crypto/sha256';
2
+ import { Fr, reduceFn } from '@aztec/foundation/curves/bn254';
3
3
  import { createLogger } from '@aztec/foundation/log';
4
4
  import { numToUInt8 } from '@aztec/foundation/serialize';
5
5
  import { MerkleTree, MerkleTreeCalculator } from '@aztec/foundation/trees';
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { hexSchemaFor } from '@aztec/foundation/schemas';
3
3
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
4
  import { bufferToHex } from '@aztec/foundation/string';
@@ -1,6 +1,6 @@
1
1
  import { GeneratorIndex } from '@aztec/constants';
2
- import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto';
3
- import { Fr } from '@aztec/foundation/fields';
2
+ import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
 
5
5
  import { type FunctionAbi, FunctionSelector, encodeArguments } from '../abi/index.js';
6
6
  import type { AztecAddress } from '../aztec-address/index.js';
@@ -1,5 +1,5 @@
1
- import { vkAsFieldsMegaHonk } from '@aztec/foundation/crypto';
2
- import { Fr } from '@aztec/foundation/fields';
1
+ import { vkAsFieldsMegaHonk } from '@aztec/foundation/crypto/keys';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
 
4
4
  import { type ContractArtifact, type FunctionArtifact, FunctionSelector, FunctionType } from '../abi/index.js';
5
5
  import { hashVK } from '../hash/hash.js';
@@ -1,6 +1,6 @@
1
1
  import { GeneratorIndex, MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS } from '@aztec/constants';
2
- import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto';
3
- import { Fr } from '@aztec/foundation/fields';
2
+ import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
 
5
5
  import { strict as assert } from 'assert';
6
6
 
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { BufferReader, numToUInt8, serializeToBuffer } from '@aztec/foundation/serialize';
3
3
  import type { FieldsOf } from '@aztec/foundation/types';
4
4