@aztec/stdlib 0.0.1-commit.d3ec352c → 0.0.1-commit.fcb71a6

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 (863) hide show
  1. package/dest/abi/abi.d.ts +603 -5
  2. package/dest/abi/abi.d.ts.map +1 -1
  3. package/dest/abi/abi.js +7 -7
  4. package/dest/abi/authorization_selector.d.ts +2 -2
  5. package/dest/abi/authorization_selector.d.ts.map +1 -1
  6. package/dest/abi/authorization_selector.js +2 -1
  7. package/dest/abi/buffer.d.ts +2 -2
  8. package/dest/abi/buffer.d.ts.map +1 -1
  9. package/dest/abi/buffer.js +1 -1
  10. package/dest/abi/decoder.d.ts +2 -2
  11. package/dest/abi/decoder.d.ts.map +1 -1
  12. package/dest/abi/encoder.d.ts +2 -2
  13. package/dest/abi/encoder.d.ts.map +1 -1
  14. package/dest/abi/encoder.js +1 -1
  15. package/dest/abi/event_selector.d.ts +2 -2
  16. package/dest/abi/event_selector.d.ts.map +1 -1
  17. package/dest/abi/event_selector.js +2 -1
  18. package/dest/abi/function_call.d.ts +2 -2
  19. package/dest/abi/function_call.d.ts.map +1 -1
  20. package/dest/abi/function_selector.d.ts +3 -2
  21. package/dest/abi/function_selector.d.ts.map +1 -1
  22. package/dest/abi/function_selector.js +9 -1
  23. package/dest/abi/note_selector.d.ts +2 -2
  24. package/dest/abi/note_selector.d.ts.map +1 -1
  25. package/dest/abi/note_selector.js +2 -2
  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/auth_witness/auth_witness.d.ts +2 -2
  30. package/dest/auth_witness/auth_witness.d.ts.map +1 -1
  31. package/dest/auth_witness/auth_witness.js +2 -2
  32. package/dest/avm/avm.d.ts +380 -331
  33. package/dest/avm/avm.d.ts.map +1 -1
  34. package/dest/avm/avm.js +87 -25
  35. package/dest/avm/avm_accumulated_data.d.ts +2 -2
  36. package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
  37. package/dest/avm/avm_accumulated_data.js +1 -1
  38. package/dest/avm/avm_circuit_public_inputs.d.ts +2 -2
  39. package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
  40. package/dest/avm/avm_circuit_public_inputs.js +1 -1
  41. package/dest/avm/avm_proving_request.d.ts +254 -254
  42. package/dest/avm/contract_storage_read.d.ts +2 -2
  43. package/dest/avm/contract_storage_read.d.ts.map +1 -1
  44. package/dest/avm/contract_storage_read.js +1 -1
  45. package/dest/avm/contract_storage_update_request.d.ts +2 -2
  46. package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
  47. package/dest/avm/contract_storage_update_request.js +1 -1
  48. package/dest/avm/message_pack.d.ts +1 -1
  49. package/dest/avm/message_pack.d.ts.map +1 -1
  50. package/dest/avm/message_pack.js +2 -1
  51. package/dest/avm/public_call_stack_item_compressed.d.ts +2 -2
  52. package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
  53. package/dest/avm/public_call_stack_item_compressed.js +1 -1
  54. package/dest/avm/public_data_read.d.ts +2 -2
  55. package/dest/avm/public_data_read.d.ts.map +1 -1
  56. package/dest/avm/public_data_read.js +1 -1
  57. package/dest/avm/public_data_update_request.d.ts +2 -2
  58. package/dest/avm/public_data_update_request.d.ts.map +1 -1
  59. package/dest/avm/public_data_update_request.js +1 -1
  60. package/dest/avm/public_data_write.d.ts +2 -2
  61. package/dest/avm/public_data_write.d.ts.map +1 -1
  62. package/dest/avm/public_data_write.js +1 -1
  63. package/dest/avm/public_inner_call_request.d.ts +2 -2
  64. package/dest/avm/public_inner_call_request.d.ts.map +1 -1
  65. package/dest/avm/revert_code.d.ts +2 -2
  66. package/dest/avm/revert_code.d.ts.map +1 -1
  67. package/dest/avm/revert_code.js +1 -1
  68. package/dest/aztec-address/index.d.ts +3 -2
  69. package/dest/aztec-address/index.d.ts.map +1 -1
  70. package/dest/aztec-address/index.js +2 -1
  71. package/dest/block/attestation_info.js +1 -1
  72. package/dest/block/block_hash.d.ts +2 -2
  73. package/dest/block/block_hash.d.ts.map +1 -1
  74. package/dest/block/block_hash.js +1 -1
  75. package/dest/block/checkpointed_l2_block.d.ts +267 -0
  76. package/dest/block/checkpointed_l2_block.d.ts.map +1 -0
  77. package/dest/block/{published_l2_block.js → checkpointed_l2_block.js} +40 -4
  78. package/dest/block/in_block.d.ts +23 -7
  79. package/dest/block/in_block.d.ts.map +1 -1
  80. package/dest/block/in_block.js +14 -5
  81. package/dest/block/index.d.ts +2 -2
  82. package/dest/block/index.d.ts.map +1 -1
  83. package/dest/block/index.js +1 -1
  84. package/dest/block/l2_block.d.ts +4 -4
  85. package/dest/block/l2_block.d.ts.map +1 -1
  86. package/dest/block/l2_block.js +7 -5
  87. package/dest/block/l2_block_code_to_purge.d.ts +2 -2
  88. package/dest/block/l2_block_code_to_purge.d.ts.map +1 -1
  89. package/dest/block/l2_block_code_to_purge.js +1 -1
  90. package/dest/block/l2_block_header.d.ts +2 -2
  91. package/dest/block/l2_block_header.d.ts.map +1 -1
  92. package/dest/block/l2_block_header.js +1 -1
  93. package/dest/block/l2_block_info.d.ts +2 -2
  94. package/dest/block/l2_block_info.d.ts.map +1 -1
  95. package/dest/block/l2_block_info.js +1 -1
  96. package/dest/block/l2_block_new.d.ts +33 -8
  97. package/dest/block/l2_block_new.d.ts.map +1 -1
  98. package/dest/block/l2_block_new.js +34 -20
  99. package/dest/block/l2_block_source.d.ts +70 -46
  100. package/dest/block/l2_block_source.d.ts.map +1 -1
  101. package/dest/block/l2_block_stream/interfaces.d.ts +2 -2
  102. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  103. package/dest/block/l2_block_stream/l2_block_stream.d.ts +6 -1
  104. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  105. package/dest/block/l2_block_stream/l2_block_stream.js +9 -1
  106. package/dest/block/proposal/attestations_and_signers.d.ts +2 -2
  107. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
  108. package/dest/block/proposal/committee_attestation.d.ts +2 -2
  109. package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
  110. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  111. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  112. package/dest/block/test/l2_tips_store_test_suite.js +3 -6
  113. package/dest/checkpoint/checkpoint.d.ts +32 -3
  114. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  115. package/dest/checkpoint/checkpoint.js +43 -5
  116. package/dest/checkpoint/checkpoint_info.d.ts +9 -0
  117. package/dest/checkpoint/checkpoint_info.d.ts.map +1 -0
  118. package/dest/checkpoint/checkpoint_info.js +1 -0
  119. package/dest/checkpoint/published_checkpoint.d.ts +32 -8
  120. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  121. package/dest/checkpoint/published_checkpoint.js +12 -2
  122. package/dest/contract/artifact_hash.d.ts +2 -2
  123. package/dest/contract/artifact_hash.d.ts.map +1 -1
  124. package/dest/contract/artifact_hash.js +2 -2
  125. package/dest/contract/complete_address.d.ts +2 -2
  126. package/dest/contract/complete_address.d.ts.map +1 -1
  127. package/dest/contract/complete_address.js +1 -1
  128. package/dest/contract/contract_address.d.ts +2 -2
  129. package/dest/contract/contract_address.d.ts.map +1 -1
  130. package/dest/contract/contract_address.js +2 -2
  131. package/dest/contract/contract_class.d.ts +2 -2
  132. package/dest/contract/contract_class.d.ts.map +1 -1
  133. package/dest/contract/contract_class.js +1 -1
  134. package/dest/contract/contract_class_id.d.ts +2 -2
  135. package/dest/contract/contract_class_id.d.ts.map +1 -1
  136. package/dest/contract/contract_class_id.js +3 -3
  137. package/dest/contract/contract_deployment_data.d.ts +4 -4
  138. package/dest/contract/contract_instance.d.ts +2 -2
  139. package/dest/contract/contract_instance.d.ts.map +1 -1
  140. package/dest/contract/contract_instance.js +1 -1
  141. package/dest/contract/contract_instance_update.d.ts +2 -2
  142. package/dest/contract/contract_instance_update.d.ts.map +1 -1
  143. package/dest/contract/contract_instance_update.js +1 -1
  144. package/dest/contract/deployment_info.d.ts +2 -2
  145. package/dest/contract/deployment_info.d.ts.map +1 -1
  146. package/dest/contract/interfaces/contract_class.d.ts +19 -14
  147. package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
  148. package/dest/contract/interfaces/contract_class.js +35 -18
  149. package/dest/contract/interfaces/contract_data_source.d.ts +2 -2
  150. package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
  151. package/dest/contract/interfaces/contract_instance.d.ts +40 -31
  152. package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
  153. package/dest/contract/interfaces/contract_instance.js +30 -5
  154. package/dest/contract/interfaces/contract_instance_update.d.ts +7 -8
  155. package/dest/contract/interfaces/contract_instance_update.d.ts.map +1 -1
  156. package/dest/contract/interfaces/contract_instance_update.js +5 -5
  157. package/dest/contract/partial_address.d.ts +2 -2
  158. package/dest/contract/partial_address.d.ts.map +1 -1
  159. package/dest/contract/private_function.d.ts +2 -2
  160. package/dest/contract/private_function.d.ts.map +1 -1
  161. package/dest/contract/private_function.js +3 -2
  162. package/dest/contract/private_function_membership_proof.js +2 -2
  163. package/dest/contract/utility_function_membership_proof.js +1 -1
  164. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +2 -2
  165. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
  166. package/dest/delayed_public_mutable/delayed_public_mutable_values.js +2 -2
  167. package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts +2 -2
  168. package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts.map +1 -1
  169. package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.js +1 -1
  170. package/dest/delayed_public_mutable/scheduled_value_change.d.ts +2 -2
  171. package/dest/delayed_public_mutable/scheduled_value_change.d.ts.map +1 -1
  172. package/dest/delayed_public_mutable/scheduled_value_change.js +1 -1
  173. package/dest/epoch-helpers/index.d.ts +1 -1
  174. package/dest/epoch-helpers/index.d.ts.map +1 -1
  175. package/dest/epoch-helpers/index.js +3 -3
  176. package/dest/errors/simulation_error.d.ts +2 -2
  177. package/dest/errors/simulation_error.d.ts.map +1 -1
  178. package/dest/fees/transaction_fee.d.ts +2 -2
  179. package/dest/fees/transaction_fee.d.ts.map +1 -1
  180. package/dest/gas/gas.d.ts +2 -2
  181. package/dest/gas/gas.d.ts.map +1 -1
  182. package/dest/gas/gas.js +1 -1
  183. package/dest/gas/gas_fees.d.ts +2 -2
  184. package/dest/gas/gas_fees.d.ts.map +1 -1
  185. package/dest/gas/gas_settings.d.ts +2 -2
  186. package/dest/gas/gas_settings.d.ts.map +1 -1
  187. package/dest/gas/gas_settings.js +1 -1
  188. package/dest/hash/hash.d.ts +2 -10
  189. package/dest/hash/hash.d.ts.map +1 -1
  190. package/dest/hash/hash.js +3 -14
  191. package/dest/hash/map_slot.d.ts +2 -2
  192. package/dest/hash/map_slot.d.ts.map +1 -1
  193. package/dest/hash/map_slot.js +1 -1
  194. package/dest/interfaces/allowed_element.d.ts +8 -9
  195. package/dest/interfaces/allowed_element.d.ts.map +1 -1
  196. package/dest/interfaces/allowed_element.js +3 -3
  197. package/dest/interfaces/archiver.d.ts +7 -2
  198. package/dest/interfaces/archiver.d.ts.map +1 -1
  199. package/dest/interfaces/archiver.js +11 -8
  200. package/dest/interfaces/aztec-node-admin.d.ts +36 -17
  201. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  202. package/dest/interfaces/aztec-node-admin.js +1 -1
  203. package/dest/interfaces/aztec-node.d.ts +11 -19
  204. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  205. package/dest/interfaces/aztec-node.js +6 -8
  206. package/dest/interfaces/block-builder.d.ts +4 -3
  207. package/dest/interfaces/block-builder.d.ts.map +1 -1
  208. package/dest/interfaces/block-builder.js +9 -1
  209. package/dest/interfaces/configs.d.ts +51 -27
  210. package/dest/interfaces/configs.d.ts.map +1 -1
  211. package/dest/interfaces/configs.js +11 -6
  212. package/dest/interfaces/epoch-prover.d.ts +2 -2
  213. package/dest/interfaces/epoch-prover.d.ts.map +1 -1
  214. package/dest/interfaces/get_logs_response.d.ts +19 -4
  215. package/dest/interfaces/get_logs_response.d.ts.map +1 -1
  216. package/dest/interfaces/get_logs_response.js +5 -4
  217. package/dest/interfaces/l2_logs_source.d.ts +10 -14
  218. package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
  219. package/dest/interfaces/merkle_tree_operations.d.ts +3 -3
  220. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  221. package/dest/interfaces/prover-client.d.ts +5 -3
  222. package/dest/interfaces/prover-client.d.ts.map +1 -1
  223. package/dest/interfaces/prover-client.js +5 -4
  224. package/dest/interfaces/proving-job.d.ts +2 -2
  225. package/dest/interfaces/public_state_source.d.ts +2 -2
  226. package/dest/interfaces/public_state_source.d.ts.map +1 -1
  227. package/dest/interfaces/server_circuit_prover.d.ts +2 -2
  228. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  229. package/dest/interfaces/slasher.d.ts +1 -1
  230. package/dest/interfaces/slasher.d.ts.map +1 -1
  231. package/dest/interfaces/slasher.js +3 -3
  232. package/dest/interfaces/validator.d.ts +8 -9
  233. package/dest/interfaces/validator.d.ts.map +1 -1
  234. package/dest/interfaces/validator.js +5 -5
  235. package/dest/interfaces/world_state.d.ts +17 -8
  236. package/dest/interfaces/world_state.d.ts.map +1 -1
  237. package/dest/kernel/claimed_length_array.d.ts +2 -2
  238. package/dest/kernel/claimed_length_array.d.ts.map +1 -1
  239. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +2 -2
  240. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
  241. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts +1 -1
  242. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts.map +1 -1
  243. package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +1 -3
  244. package/dest/kernel/hints/key_validation_hint.d.ts +2 -2
  245. package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
  246. package/dest/kernel/hints/key_validation_hint.js +1 -1
  247. package/dest/kernel/hints/key_validation_request.d.ts +4 -3
  248. package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
  249. package/dest/kernel/hints/key_validation_request.js +2 -1
  250. package/dest/kernel/hints/key_validation_request_and_generator.d.ts +2 -2
  251. package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +1 -1
  252. package/dest/kernel/hints/key_validation_request_and_generator.js +1 -1
  253. package/dest/kernel/hints/note_hash_read_request_hints.d.ts +2 -2
  254. package/dest/kernel/hints/note_hash_read_request_hints.d.ts.map +1 -1
  255. package/dest/kernel/hints/note_hash_read_request_hints.js +1 -1
  256. package/dest/kernel/hints/read_request.d.ts +2 -2
  257. package/dest/kernel/hints/read_request.d.ts.map +1 -1
  258. package/dest/kernel/hints/read_request.js +1 -1
  259. package/dest/kernel/hints/scoped_key_validation_request_and_generator.d.ts +2 -2
  260. package/dest/kernel/hints/scoped_key_validation_request_and_generator.d.ts.map +1 -1
  261. package/dest/kernel/hints/scoped_value_cache.d.ts +2 -2
  262. package/dest/kernel/hints/scoped_value_cache.d.ts.map +1 -1
  263. package/dest/kernel/hints/transient_data_squashing_hint.d.ts +2 -2
  264. package/dest/kernel/hints/transient_data_squashing_hint.d.ts.map +1 -1
  265. package/dest/kernel/hints/transient_data_squashing_hint.js +1 -1
  266. package/dest/kernel/hints/tree_leaf_read_request.d.ts +2 -2
  267. package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +1 -1
  268. package/dest/kernel/hints/tree_leaf_read_request.js +1 -1
  269. package/dest/kernel/log_hash.d.ts +2 -2
  270. package/dest/kernel/log_hash.d.ts.map +1 -1
  271. package/dest/kernel/log_hash.js +1 -1
  272. package/dest/kernel/note_hash.d.ts +2 -2
  273. package/dest/kernel/note_hash.d.ts.map +1 -1
  274. package/dest/kernel/note_hash.js +1 -1
  275. package/dest/kernel/nullifier.d.ts +2 -2
  276. package/dest/kernel/nullifier.d.ts.map +1 -1
  277. package/dest/kernel/nullifier.js +1 -1
  278. package/dest/kernel/padded_side_effects.d.ts +2 -2
  279. package/dest/kernel/padded_side_effects.d.ts.map +1 -1
  280. package/dest/kernel/padded_side_effects.js +1 -1
  281. package/dest/kernel/private_call_data.d.ts +2 -2
  282. package/dest/kernel/private_call_data.d.ts.map +1 -1
  283. package/dest/kernel/private_call_data.js +1 -1
  284. package/dest/kernel/private_call_request.d.ts +2 -2
  285. package/dest/kernel/private_call_request.d.ts.map +1 -1
  286. package/dest/kernel/private_call_request.js +1 -1
  287. package/dest/kernel/private_circuit_public_inputs.d.ts +48 -48
  288. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  289. package/dest/kernel/private_circuit_public_inputs.js +60 -60
  290. package/dest/kernel/private_context_inputs.d.ts +2 -2
  291. package/dest/kernel/private_context_inputs.d.ts.map +1 -1
  292. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +2 -2
  293. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  294. package/dest/kernel/private_kernel_circuit_public_inputs.js +1 -1
  295. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +2 -2
  296. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  297. package/dest/kernel/private_kernel_init_circuit_private_inputs.js +1 -1
  298. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +2 -2
  299. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  300. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +1 -1
  301. package/dest/kernel/private_log_data.d.ts +2 -2
  302. package/dest/kernel/private_log_data.d.ts.map +1 -1
  303. package/dest/kernel/private_to_avm_accumulated_data.d.ts +2 -2
  304. package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
  305. package/dest/kernel/private_to_avm_accumulated_data.js +1 -1
  306. package/dest/kernel/private_to_public_accumulated_data.d.ts +2 -2
  307. package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
  308. package/dest/kernel/private_to_public_accumulated_data.js +1 -1
  309. package/dest/kernel/private_to_public_accumulated_data_builder.d.ts +2 -2
  310. package/dest/kernel/private_to_public_accumulated_data_builder.d.ts.map +1 -1
  311. package/dest/kernel/private_to_public_accumulated_data_builder.js +1 -1
  312. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +2 -2
  313. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  314. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +1 -1
  315. package/dest/kernel/private_to_rollup_accumulated_data.d.ts +2 -2
  316. package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
  317. package/dest/kernel/private_to_rollup_accumulated_data.js +1 -1
  318. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +2 -2
  319. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  320. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +1 -1
  321. package/dest/kernel/public_call_request.d.ts +2 -2
  322. package/dest/kernel/public_call_request.d.ts.map +1 -1
  323. package/dest/kernel/public_call_request.js +1 -1
  324. package/dest/kernel/utils/optional_number.d.ts +2 -2
  325. package/dest/kernel/utils/optional_number.d.ts.map +1 -1
  326. package/dest/keys/derivation.d.ts +4 -3
  327. package/dest/keys/derivation.d.ts.map +1 -1
  328. package/dest/keys/derivation.js +5 -2
  329. package/dest/keys/public_key.d.ts +2 -2
  330. package/dest/keys/public_key.d.ts.map +1 -1
  331. package/dest/keys/public_keys.d.ts +3 -2
  332. package/dest/keys/public_keys.d.ts.map +1 -1
  333. package/dest/keys/public_keys.js +3 -2
  334. package/dest/l1-contracts/slash_factory.d.ts +3 -2
  335. package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
  336. package/dest/l1-contracts/slash_factory.js +1 -1
  337. package/dest/logs/contract_class_log.d.ts +2 -2
  338. package/dest/logs/contract_class_log.d.ts.map +1 -1
  339. package/dest/logs/contract_class_log.js +2 -2
  340. package/dest/logs/debug_log.d.ts +2 -2
  341. package/dest/logs/debug_log.d.ts.map +1 -1
  342. package/dest/logs/debug_log.js +1 -1
  343. package/dest/logs/directional_app_tagging_secret.d.ts +2 -2
  344. package/dest/logs/directional_app_tagging_secret.d.ts.map +1 -1
  345. package/dest/logs/directional_app_tagging_secret.js +3 -2
  346. package/dest/logs/extended_public_log.d.ts +7 -1
  347. package/dest/logs/extended_public_log.d.ts.map +1 -1
  348. package/dest/logs/index.d.ts +3 -2
  349. package/dest/logs/index.d.ts.map +1 -1
  350. package/dest/logs/index.js +2 -1
  351. package/dest/logs/log_id.d.ts +9 -1
  352. package/dest/logs/log_id.d.ts.map +1 -1
  353. package/dest/logs/log_id.js +15 -8
  354. package/dest/logs/message_context.d.ts +2 -2
  355. package/dest/logs/message_context.d.ts.map +1 -1
  356. package/dest/logs/message_context.js +1 -1
  357. package/dest/logs/pending_tagged_log.d.ts +2 -2
  358. package/dest/logs/pending_tagged_log.d.ts.map +1 -1
  359. package/dest/logs/pending_tagged_log.js +1 -1
  360. package/dest/logs/private_log.d.ts +2 -2
  361. package/dest/logs/private_log.d.ts.map +1 -1
  362. package/dest/logs/private_log.js +3 -2
  363. package/dest/logs/public_log.d.ts +3 -2
  364. package/dest/logs/public_log.d.ts.map +1 -1
  365. package/dest/logs/public_log.js +4 -1
  366. package/dest/logs/shared_secret_derivation.d.ts +2 -2
  367. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  368. package/dest/logs/shared_secret_derivation.js +1 -1
  369. package/dest/logs/siloed_tag.d.ts +23 -0
  370. package/dest/logs/siloed_tag.d.ts.map +1 -0
  371. package/dest/logs/siloed_tag.js +30 -0
  372. package/dest/logs/tag.d.ts +21 -0
  373. package/dest/logs/tag.d.ts.map +1 -0
  374. package/dest/logs/tag.js +30 -0
  375. package/dest/logs/tx_scoped_l2_log.d.ts +24 -33
  376. package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
  377. package/dest/logs/tx_scoped_l2_log.js +37 -43
  378. package/dest/messaging/in_hash.d.ts +2 -2
  379. package/dest/messaging/in_hash.d.ts.map +1 -1
  380. package/dest/messaging/in_hash.js +1 -1
  381. package/dest/messaging/inbox_leaf.d.ts +8 -7
  382. package/dest/messaging/inbox_leaf.d.ts.map +1 -1
  383. package/dest/messaging/inbox_leaf.js +10 -9
  384. package/dest/messaging/l1_actor.d.ts +2 -2
  385. package/dest/messaging/l1_actor.d.ts.map +1 -1
  386. package/dest/messaging/l1_actor.js +2 -2
  387. package/dest/messaging/l1_to_l2_message.d.ts +2 -2
  388. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  389. package/dest/messaging/l1_to_l2_message.js +2 -2
  390. package/dest/messaging/l1_to_l2_message_source.d.ts +4 -15
  391. package/dest/messaging/l1_to_l2_message_source.d.ts.map +1 -1
  392. package/dest/messaging/l2_actor.d.ts +2 -2
  393. package/dest/messaging/l2_actor.d.ts.map +1 -1
  394. package/dest/messaging/l2_actor.js +2 -2
  395. package/dest/messaging/l2_to_l1_membership.d.ts +2 -2
  396. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  397. package/dest/messaging/l2_to_l1_membership.js +1 -1
  398. package/dest/messaging/l2_to_l1_message.d.ts +3 -2
  399. package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
  400. package/dest/messaging/l2_to_l1_message.js +4 -1
  401. package/dest/messaging/out_hash.d.ts +2 -2
  402. package/dest/messaging/out_hash.d.ts.map +1 -1
  403. package/dest/messaging/out_hash.js +1 -1
  404. package/dest/note/note.d.ts +2 -2
  405. package/dest/note/note.d.ts.map +1 -1
  406. package/dest/note/note.js +5 -2
  407. package/dest/note/note_dao.d.ts +6 -2
  408. package/dest/note/note_dao.d.ts.map +1 -1
  409. package/dest/note/note_dao.js +7 -1
  410. package/dest/note/notes_filter.d.ts +2 -2
  411. package/dest/note/notes_filter.d.ts.map +1 -1
  412. package/dest/p2p/block_attestation.d.ts +2 -2
  413. package/dest/p2p/block_attestation.d.ts.map +1 -1
  414. package/dest/p2p/block_attestation.js +2 -1
  415. package/dest/p2p/block_proposal.d.ts +2 -2
  416. package/dest/p2p/block_proposal.d.ts.map +1 -1
  417. package/dest/p2p/block_proposal.js +2 -1
  418. package/dest/p2p/consensus_payload.d.ts +2 -2
  419. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  420. package/dest/p2p/consensus_payload.js +1 -1
  421. package/dest/p2p/signature_utils.d.ts +1 -1
  422. package/dest/p2p/signature_utils.d.ts.map +1 -1
  423. package/dest/p2p/signature_utils.js +2 -1
  424. package/dest/parity/parity_base_private_inputs.d.ts +2 -2
  425. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
  426. package/dest/parity/parity_base_private_inputs.js +1 -1
  427. package/dest/parity/parity_public_inputs.d.ts +2 -2
  428. package/dest/parity/parity_public_inputs.d.ts.map +1 -1
  429. package/dest/parity/parity_public_inputs.js +1 -1
  430. package/dest/proofs/chonk_proof.d.ts +2 -2
  431. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  432. package/dest/proofs/chonk_proof.js +2 -2
  433. package/dest/proofs/proof.d.ts +2 -2
  434. package/dest/proofs/proof.d.ts.map +1 -1
  435. package/dest/proofs/proof.js +1 -1
  436. package/dest/proofs/proof_data.d.ts +13 -1
  437. package/dest/proofs/proof_data.d.ts.map +1 -1
  438. package/dest/proofs/proof_data.js +17 -0
  439. package/dest/proofs/recursive_proof.d.ts +2 -2
  440. package/dest/proofs/recursive_proof.d.ts.map +1 -1
  441. package/dest/proofs/recursive_proof.js +1 -1
  442. package/dest/rollup/avm_proof_data.d.ts +3 -5
  443. package/dest/rollup/avm_proof_data.d.ts.map +1 -1
  444. package/dest/rollup/avm_proof_data.js +1 -9
  445. package/dest/rollup/base_rollup_hints.d.ts +2 -2
  446. package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
  447. package/dest/rollup/base_rollup_hints.js +1 -1
  448. package/dest/rollup/block_constant_data.d.ts +2 -2
  449. package/dest/rollup/block_constant_data.d.ts.map +1 -1
  450. package/dest/rollup/block_constant_data.js +1 -1
  451. package/dest/rollup/block_headers_hash.d.ts +2 -2
  452. package/dest/rollup/block_headers_hash.d.ts.map +1 -1
  453. package/dest/rollup/block_headers_hash.js +1 -1
  454. package/dest/rollup/block_rollup_public_inputs.d.ts +2 -2
  455. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
  456. package/dest/rollup/block_rollup_public_inputs.js +1 -1
  457. package/dest/rollup/block_root_rollup_private_inputs.d.ts +2 -2
  458. package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
  459. package/dest/rollup/block_root_rollup_private_inputs.js +1 -1
  460. package/dest/rollup/checkpoint_constant_data.d.ts +3 -2
  461. package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
  462. package/dest/rollup/checkpoint_constant_data.js +2 -1
  463. package/dest/rollup/checkpoint_header.d.ts +7 -3
  464. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  465. package/dest/rollup/checkpoint_header.js +6 -3
  466. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +2 -2
  467. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  468. package/dest/rollup/checkpoint_rollup_public_inputs.js +1 -1
  469. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +3 -2
  470. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  471. package/dest/rollup/checkpoint_root_rollup_private_inputs.js +2 -1
  472. package/dest/rollup/epoch_constant_data.d.ts +2 -2
  473. package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
  474. package/dest/rollup/epoch_constant_data.js +1 -1
  475. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +2 -2
  476. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -1
  477. package/dest/rollup/public_chonk_verifier_private_inputs.js +1 -1
  478. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts +2 -2
  479. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -1
  480. package/dest/rollup/public_chonk_verifier_public_inputs.js +1 -1
  481. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +1 -1
  482. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
  483. package/dest/rollup/public_tx_base_rollup_private_inputs.js +2 -2
  484. package/dest/rollup/root_rollup_public_inputs.d.ts +2 -2
  485. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  486. package/dest/rollup/root_rollup_public_inputs.js +1 -1
  487. package/dest/rollup/tree_snapshot_diff_hints.d.ts +2 -2
  488. package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
  489. package/dest/rollup/tree_snapshot_diff_hints.js +1 -1
  490. package/dest/rollup/tx_rollup_public_inputs.d.ts +2 -2
  491. package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
  492. package/dest/rollup/tx_rollup_public_inputs.js +1 -1
  493. package/dest/schemas/schemas.d.ts +6 -3
  494. package/dest/schemas/schemas.d.ts.map +1 -1
  495. package/dest/schemas/schemas.js +2 -1
  496. package/dest/slashing/types.d.ts +4 -5
  497. package/dest/slashing/types.d.ts.map +1 -1
  498. package/dest/slashing/types.js +5 -5
  499. package/dest/snapshots/types.d.ts +1 -1
  500. package/dest/snapshots/types.d.ts.map +1 -1
  501. package/dest/snapshots/types.js +5 -5
  502. package/dest/stats/stats.d.ts +10 -6
  503. package/dest/stats/stats.d.ts.map +1 -1
  504. package/dest/tests/factories.d.ts +27 -3
  505. package/dest/tests/factories.d.ts.map +1 -1
  506. package/dest/tests/factories.js +38 -6
  507. package/dest/tests/mocks.d.ts +19 -6
  508. package/dest/tests/mocks.d.ts.map +1 -1
  509. package/dest/tests/mocks.js +65 -7
  510. package/dest/trees/append_only_tree_snapshot.d.ts +2 -2
  511. package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
  512. package/dest/trees/append_only_tree_snapshot.js +1 -1
  513. package/dest/trees/database_public_state_source.d.ts +2 -2
  514. package/dest/trees/database_public_state_source.d.ts.map +1 -1
  515. package/dest/trees/database_public_state_source.js +1 -1
  516. package/dest/trees/nullifier_leaf.d.ts +2 -2
  517. package/dest/trees/nullifier_leaf.d.ts.map +1 -1
  518. package/dest/trees/nullifier_leaf.js +1 -1
  519. package/dest/trees/nullifier_membership_witness.d.ts +2 -2
  520. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  521. package/dest/trees/nullifier_membership_witness.js +1 -1
  522. package/dest/trees/public_data_leaf.d.ts +2 -2
  523. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  524. package/dest/trees/public_data_leaf.js +1 -1
  525. package/dest/trees/public_data_witness.d.ts +2 -2
  526. package/dest/trees/public_data_witness.d.ts.map +1 -1
  527. package/dest/trees/public_data_witness.js +1 -1
  528. package/dest/tx/block_header.d.ts +9 -8
  529. package/dest/tx/block_header.d.ts.map +1 -1
  530. package/dest/tx/block_header.js +8 -3
  531. package/dest/tx/call_context.d.ts +2 -2
  532. package/dest/tx/call_context.d.ts.map +1 -1
  533. package/dest/tx/capsule.d.ts +2 -2
  534. package/dest/tx/capsule.d.ts.map +1 -1
  535. package/dest/tx/capsule.js +1 -1
  536. package/dest/tx/content_commitment.d.ts +3 -3
  537. package/dest/tx/content_commitment.d.ts.map +1 -1
  538. package/dest/tx/content_commitment.js +1 -1
  539. package/dest/tx/function_data.d.ts +2 -2
  540. package/dest/tx/function_data.d.ts.map +1 -1
  541. package/dest/tx/function_data.js +1 -1
  542. package/dest/tx/global_variable_builder.d.ts +4 -2
  543. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  544. package/dest/tx/global_variables.d.ts +7 -2
  545. package/dest/tx/global_variables.d.ts.map +1 -1
  546. package/dest/tx/global_variables.js +2 -2
  547. package/dest/tx/hashed_values.d.ts +2 -2
  548. package/dest/tx/hashed_values.d.ts.map +1 -1
  549. package/dest/tx/hashed_values.js +1 -1
  550. package/dest/tx/in_tx.d.ts +26 -0
  551. package/dest/tx/in_tx.d.ts.map +1 -0
  552. package/dest/tx/in_tx.js +14 -0
  553. package/dest/tx/index.d.ts +2 -1
  554. package/dest/tx/index.d.ts.map +1 -1
  555. package/dest/tx/index.js +1 -0
  556. package/dest/tx/indexed_tx_effect.d.ts +5 -4
  557. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  558. package/dest/tx/indexed_tx_effect.js +3 -3
  559. package/dest/tx/offchain_effect.d.ts +2 -2
  560. package/dest/tx/offchain_effect.d.ts.map +1 -1
  561. package/dest/tx/offchain_effect.js +1 -1
  562. package/dest/tx/partial_state_reference.d.ts +2 -2
  563. package/dest/tx/partial_state_reference.d.ts.map +1 -1
  564. package/dest/tx/private_execution_result.d.ts +3 -3
  565. package/dest/tx/private_execution_result.d.ts.map +1 -1
  566. package/dest/tx/private_execution_result.js +3 -3
  567. package/dest/tx/private_tx_constant_data.d.ts +2 -2
  568. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  569. package/dest/tx/private_tx_constant_data.js +1 -1
  570. package/dest/tx/processed_tx.d.ts +4 -3
  571. package/dest/tx/processed_tx.d.ts.map +1 -1
  572. package/dest/tx/processed_tx.js +4 -6
  573. package/dest/tx/profiling.d.ts +2 -2
  574. package/dest/tx/profiling.d.ts.map +1 -1
  575. package/dest/tx/profiling.js +1 -1
  576. package/dest/tx/protocol_contracts.d.ts +2 -2
  577. package/dest/tx/protocol_contracts.d.ts.map +1 -1
  578. package/dest/tx/protocol_contracts.js +1 -1
  579. package/dest/tx/public_call_request_with_calldata.d.ts +2 -2
  580. package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
  581. package/dest/tx/public_call_request_with_calldata.js +1 -1
  582. package/dest/tx/public_simulation_output.d.ts +2 -2
  583. package/dest/tx/public_simulation_output.d.ts.map +1 -1
  584. package/dest/tx/public_simulation_output.js +1 -1
  585. package/dest/tx/simulated_tx.d.ts +1031 -7
  586. package/dest/tx/simulated_tx.d.ts.map +1 -1
  587. package/dest/tx/state_reference.d.ts +2 -2
  588. package/dest/tx/state_reference.d.ts.map +1 -1
  589. package/dest/tx/tree_snapshots.d.ts +2 -2
  590. package/dest/tx/tree_snapshots.d.ts.map +1 -1
  591. package/dest/tx/tx.d.ts +11 -4
  592. package/dest/tx/tx.d.ts.map +1 -1
  593. package/dest/tx/tx.js +10 -3
  594. package/dest/tx/tx_constant_data.d.ts +2 -2
  595. package/dest/tx/tx_constant_data.d.ts.map +1 -1
  596. package/dest/tx/tx_constant_data.js +1 -1
  597. package/dest/tx/tx_context.d.ts +2 -2
  598. package/dest/tx/tx_context.d.ts.map +1 -1
  599. package/dest/tx/tx_context.js +1 -1
  600. package/dest/tx/tx_effect.d.ts +2 -2
  601. package/dest/tx/tx_effect.d.ts.map +1 -1
  602. package/dest/tx/tx_effect.js +5 -3
  603. package/dest/tx/tx_execution_request.d.ts +2 -2
  604. package/dest/tx/tx_execution_request.d.ts.map +1 -1
  605. package/dest/tx/tx_execution_request.js +1 -1
  606. package/dest/tx/tx_hash.d.ts +2 -2
  607. package/dest/tx/tx_hash.d.ts.map +1 -1
  608. package/dest/tx/tx_hash.js +1 -1
  609. package/dest/tx/tx_request.d.ts +2 -2
  610. package/dest/tx/tx_request.d.ts.map +1 -1
  611. package/dest/tx/tx_request.js +2 -2
  612. package/dest/tx/validator/tx_validator.d.ts +1 -4
  613. package/dest/tx/validator/tx_validator.d.ts.map +1 -1
  614. package/dest/tx/validator/tx_validator.js +4 -4
  615. package/dest/update-checker/update-checker.d.ts +2 -2
  616. package/dest/update-checker/update-checker.d.ts.map +1 -1
  617. package/dest/update-checker/update-checker.js +1 -1
  618. package/dest/validators/errors.d.ts +2 -2
  619. package/dest/validators/errors.d.ts.map +1 -1
  620. package/dest/validators/schemas.d.ts +1 -1
  621. package/dest/validators/schemas.d.ts.map +1 -1
  622. package/dest/validators/schemas.js +13 -13
  623. package/dest/versioning/versioning.d.ts +2 -2
  624. package/dest/versioning/versioning.d.ts.map +1 -1
  625. package/dest/vks/verification_key.d.ts +2 -2
  626. package/dest/vks/verification_key.d.ts.map +1 -1
  627. package/dest/vks/verification_key.js +1 -1
  628. package/dest/vks/vk_data.d.ts +2 -2
  629. package/dest/vks/vk_data.d.ts.map +1 -1
  630. package/dest/vks/vk_data.js +1 -1
  631. package/dest/zkpassport/index.d.ts +2 -2
  632. package/dest/zkpassport/index.d.ts.map +1 -1
  633. package/dest/zkpassport/index.js +2 -2
  634. package/package.json +13 -8
  635. package/src/abi/abi.ts +40 -34
  636. package/src/abi/authorization_selector.ts +3 -2
  637. package/src/abi/buffer.ts +1 -1
  638. package/src/abi/decoder.ts +1 -1
  639. package/src/abi/encoder.ts +1 -1
  640. package/src/abi/event_selector.ts +3 -2
  641. package/src/abi/function_call.ts +1 -1
  642. package/src/abi/function_selector.ts +11 -2
  643. package/src/abi/note_selector.ts +2 -2
  644. package/src/abi/selector.ts +1 -1
  645. package/src/auth_witness/auth_witness.ts +2 -2
  646. package/src/avm/avm.ts +116 -13
  647. package/src/avm/avm_accumulated_data.ts +1 -1
  648. package/src/avm/avm_circuit_public_inputs.ts +1 -1
  649. package/src/avm/contract_storage_read.ts +1 -1
  650. package/src/avm/contract_storage_update_request.ts +1 -1
  651. package/src/avm/message_pack.ts +2 -1
  652. package/src/avm/public_call_stack_item_compressed.ts +1 -1
  653. package/src/avm/public_data_read.ts +1 -1
  654. package/src/avm/public_data_update_request.ts +1 -1
  655. package/src/avm/public_data_write.ts +1 -1
  656. package/src/avm/public_inner_call_request.ts +1 -1
  657. package/src/avm/revert_code.ts +1 -1
  658. package/src/aztec-address/index.ts +2 -1
  659. package/src/block/attestation_info.ts +1 -1
  660. package/src/block/block_hash.ts +1 -1
  661. package/src/block/{published_l2_block.ts → checkpointed_l2_block.ts} +58 -3
  662. package/src/block/in_block.ts +14 -5
  663. package/src/block/index.ts +1 -1
  664. package/src/block/l2_block.ts +14 -6
  665. package/src/block/l2_block_code_to_purge.ts +1 -1
  666. package/src/block/l2_block_header.ts +1 -1
  667. package/src/block/l2_block_info.ts +1 -1
  668. package/src/block/l2_block_new.ts +48 -17
  669. package/src/block/l2_block_source.ts +79 -51
  670. package/src/block/l2_block_stream/interfaces.ts +1 -1
  671. package/src/block/l2_block_stream/l2_block_stream.ts +9 -0
  672. package/src/block/proposal/attestations_and_signers.ts +1 -1
  673. package/src/block/proposal/committee_attestation.ts +1 -1
  674. package/src/block/test/l2_tips_store_test_suite.ts +3 -2
  675. package/src/checkpoint/checkpoint.ts +53 -6
  676. package/src/checkpoint/checkpoint_info.ts +9 -0
  677. package/src/checkpoint/published_checkpoint.ts +20 -6
  678. package/src/contract/artifact_hash.ts +2 -2
  679. package/src/contract/complete_address.ts +1 -1
  680. package/src/contract/contract_address.ts +2 -2
  681. package/src/contract/contract_class.ts +2 -2
  682. package/src/contract/contract_class_id.ts +3 -3
  683. package/src/contract/contract_instance.ts +1 -1
  684. package/src/contract/contract_instance_update.ts +1 -1
  685. package/src/contract/deployment_info.ts +1 -1
  686. package/src/contract/interfaces/contract_class.ts +78 -47
  687. package/src/contract/interfaces/contract_data_source.ts +1 -1
  688. package/src/contract/interfaces/contract_instance.ts +48 -16
  689. package/src/contract/interfaces/contract_instance_update.ts +12 -10
  690. package/src/contract/partial_address.ts +1 -1
  691. package/src/contract/private_function.ts +3 -2
  692. package/src/contract/private_function_membership_proof.ts +2 -2
  693. package/src/contract/utility_function_membership_proof.ts +1 -1
  694. package/src/delayed_public_mutable/delayed_public_mutable_values.ts +2 -2
  695. package/src/delayed_public_mutable/delayed_public_mutable_values_with_hash.ts +1 -1
  696. package/src/delayed_public_mutable/scheduled_value_change.ts +1 -1
  697. package/src/epoch-helpers/index.ts +11 -9
  698. package/src/errors/simulation_error.ts +1 -1
  699. package/src/fees/transaction_fee.ts +1 -1
  700. package/src/gas/gas.ts +1 -1
  701. package/src/gas/gas_fees.ts +1 -1
  702. package/src/gas/gas_settings.ts +1 -1
  703. package/src/hash/hash.ts +3 -13
  704. package/src/hash/map_slot.ts +2 -2
  705. package/src/interfaces/allowed_element.ts +10 -8
  706. package/src/interfaces/archiver.ts +18 -9
  707. package/src/interfaces/aztec-node-admin.ts +2 -2
  708. package/src/interfaces/aztec-node.ts +21 -32
  709. package/src/interfaces/block-builder.ts +12 -2
  710. package/src/interfaces/configs.ts +64 -33
  711. package/src/interfaces/epoch-prover.ts +1 -1
  712. package/src/interfaces/get_logs_response.ts +13 -9
  713. package/src/interfaces/l2_logs_source.ts +9 -13
  714. package/src/interfaces/merkle_tree_operations.ts +5 -2
  715. package/src/interfaces/prover-client.ts +13 -10
  716. package/src/interfaces/public_state_source.ts +1 -1
  717. package/src/interfaces/server_circuit_prover.ts +0 -1
  718. package/src/interfaces/slasher.ts +24 -22
  719. package/src/interfaces/validator.ts +23 -19
  720. package/src/interfaces/world_state.ts +16 -9
  721. package/src/kernel/claimed_length_array.ts +1 -1
  722. package/src/kernel/hints/build_nullifier_read_request_hints.ts +1 -1
  723. package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +2 -4
  724. package/src/kernel/hints/key_validation_hint.ts +1 -1
  725. package/src/kernel/hints/key_validation_request.ts +2 -1
  726. package/src/kernel/hints/key_validation_request_and_generator.ts +1 -1
  727. package/src/kernel/hints/note_hash_read_request_hints.ts +1 -1
  728. package/src/kernel/hints/read_request.ts +1 -1
  729. package/src/kernel/hints/scoped_key_validation_request_and_generator.ts +1 -1
  730. package/src/kernel/hints/scoped_value_cache.ts +1 -1
  731. package/src/kernel/hints/transient_data_squashing_hint.ts +1 -1
  732. package/src/kernel/hints/tree_leaf_read_request.ts +1 -1
  733. package/src/kernel/log_hash.ts +1 -1
  734. package/src/kernel/note_hash.ts +1 -1
  735. package/src/kernel/nullifier.ts +1 -1
  736. package/src/kernel/padded_side_effects.ts +1 -1
  737. package/src/kernel/private_call_data.ts +1 -1
  738. package/src/kernel/private_call_request.ts +1 -1
  739. package/src/kernel/private_circuit_public_inputs.ts +86 -86
  740. package/src/kernel/private_context_inputs.ts +1 -1
  741. package/src/kernel/private_kernel_circuit_public_inputs.ts +1 -1
  742. package/src/kernel/private_kernel_init_circuit_private_inputs.ts +1 -1
  743. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +1 -1
  744. package/src/kernel/private_log_data.ts +1 -1
  745. package/src/kernel/private_to_avm_accumulated_data.ts +1 -1
  746. package/src/kernel/private_to_public_accumulated_data.ts +1 -1
  747. package/src/kernel/private_to_public_accumulated_data_builder.ts +1 -1
  748. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +2 -2
  749. package/src/kernel/private_to_rollup_accumulated_data.ts +1 -1
  750. package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +2 -2
  751. package/src/kernel/public_call_request.ts +1 -1
  752. package/src/kernel/utils/optional_number.ts +1 -1
  753. package/src/keys/derivation.ts +5 -2
  754. package/src/keys/public_key.ts +1 -1
  755. package/src/keys/public_keys.ts +3 -2
  756. package/src/l1-contracts/slash_factory.ts +3 -1
  757. package/src/logs/contract_class_log.ts +2 -2
  758. package/src/logs/debug_log.ts +1 -1
  759. package/src/logs/directional_app_tagging_secret.ts +4 -2
  760. package/src/logs/index.ts +2 -1
  761. package/src/logs/log_id.ts +16 -6
  762. package/src/logs/message_context.ts +1 -1
  763. package/src/logs/pending_tagged_log.ts +1 -1
  764. package/src/logs/private_log.ts +3 -2
  765. package/src/logs/public_log.ts +8 -1
  766. package/src/logs/shared_secret_derivation.ts +2 -2
  767. package/src/logs/siloed_tag.ts +44 -0
  768. package/src/logs/tag.ts +42 -0
  769. package/src/logs/tx_scoped_l2_log.ts +45 -43
  770. package/src/messaging/in_hash.ts +1 -1
  771. package/src/messaging/inbox_leaf.ts +11 -10
  772. package/src/messaging/l1_actor.ts +2 -2
  773. package/src/messaging/l1_to_l2_message.ts +3 -2
  774. package/src/messaging/l1_to_l2_message_source.ts +3 -16
  775. package/src/messaging/l2_actor.ts +2 -2
  776. package/src/messaging/l2_to_l1_membership.ts +1 -1
  777. package/src/messaging/l2_to_l1_message.ts +5 -1
  778. package/src/messaging/out_hash.ts +1 -1
  779. package/src/note/note.ts +5 -2
  780. package/src/note/note_dao.ts +22 -1
  781. package/src/note/notes_filter.ts +1 -1
  782. package/src/p2p/block_attestation.ts +3 -2
  783. package/src/p2p/block_proposal.ts +3 -2
  784. package/src/p2p/consensus_payload.ts +1 -1
  785. package/src/p2p/signature_utils.ts +2 -1
  786. package/src/parity/parity_base_private_inputs.ts +1 -1
  787. package/src/parity/parity_public_inputs.ts +1 -1
  788. package/src/proofs/chonk_proof.ts +2 -2
  789. package/src/proofs/proof.ts +1 -1
  790. package/src/proofs/proof_data.ts +24 -0
  791. package/src/proofs/recursive_proof.ts +1 -1
  792. package/src/rollup/avm_proof_data.ts +2 -9
  793. package/src/rollup/base_rollup_hints.ts +1 -1
  794. package/src/rollup/block_constant_data.ts +1 -1
  795. package/src/rollup/block_headers_hash.ts +1 -1
  796. package/src/rollup/block_rollup_public_inputs.ts +1 -1
  797. package/src/rollup/block_root_rollup_private_inputs.ts +1 -1
  798. package/src/rollup/checkpoint_constant_data.ts +2 -1
  799. package/src/rollup/checkpoint_header.ts +7 -3
  800. package/src/rollup/checkpoint_rollup_public_inputs.ts +1 -1
  801. package/src/rollup/checkpoint_root_rollup_private_inputs.ts +2 -1
  802. package/src/rollup/epoch_constant_data.ts +1 -1
  803. package/src/rollup/public_chonk_verifier_private_inputs.ts +1 -1
  804. package/src/rollup/public_chonk_verifier_public_inputs.ts +1 -1
  805. package/src/rollup/public_tx_base_rollup_private_inputs.ts +2 -2
  806. package/src/rollup/root_rollup_public_inputs.ts +1 -1
  807. package/src/rollup/tree_snapshot_diff_hints.ts +1 -1
  808. package/src/rollup/tx_rollup_public_inputs.ts +1 -1
  809. package/src/schemas/schemas.ts +6 -1
  810. package/src/slashing/types.ts +24 -20
  811. package/src/snapshots/types.ts +33 -29
  812. package/src/stats/stats.ts +10 -5
  813. package/src/tests/factories.ts +72 -6
  814. package/src/tests/mocks.ts +81 -6
  815. package/src/trees/append_only_tree_snapshot.ts +1 -1
  816. package/src/trees/database_public_state_source.ts +1 -1
  817. package/src/trees/nullifier_leaf.ts +1 -1
  818. package/src/trees/nullifier_membership_witness.ts +1 -1
  819. package/src/trees/public_data_leaf.ts +1 -1
  820. package/src/trees/public_data_witness.ts +1 -1
  821. package/src/tx/block_header.ts +15 -9
  822. package/src/tx/call_context.ts +1 -1
  823. package/src/tx/capsule.ts +1 -1
  824. package/src/tx/content_commitment.ts +2 -2
  825. package/src/tx/function_data.ts +1 -1
  826. package/src/tx/global_variable_builder.ts +8 -1
  827. package/src/tx/global_variables.ts +8 -2
  828. package/src/tx/hashed_values.ts +1 -1
  829. package/src/tx/in_tx.ts +24 -0
  830. package/src/tx/index.ts +1 -0
  831. package/src/tx/indexed_tx_effect.ts +3 -3
  832. package/src/tx/offchain_effect.ts +1 -1
  833. package/src/tx/partial_state_reference.ts +1 -1
  834. package/src/tx/private_execution_result.ts +3 -3
  835. package/src/tx/private_tx_constant_data.ts +1 -1
  836. package/src/tx/processed_tx.ts +11 -14
  837. package/src/tx/profiling.ts +1 -1
  838. package/src/tx/protocol_contracts.ts +2 -2
  839. package/src/tx/public_call_request_with_calldata.ts +1 -1
  840. package/src/tx/public_simulation_output.ts +1 -1
  841. package/src/tx/state_reference.ts +1 -1
  842. package/src/tx/tree_snapshots.ts +1 -1
  843. package/src/tx/tx.ts +10 -3
  844. package/src/tx/tx_constant_data.ts +1 -1
  845. package/src/tx/tx_context.ts +1 -1
  846. package/src/tx/tx_effect.ts +5 -3
  847. package/src/tx/tx_execution_request.ts +1 -1
  848. package/src/tx/tx_hash.ts +1 -1
  849. package/src/tx/tx_request.ts +2 -2
  850. package/src/tx/validator/tx_validator.ts +8 -6
  851. package/src/update-checker/update-checker.ts +2 -1
  852. package/src/validators/errors.ts +1 -1
  853. package/src/validators/schemas.ts +54 -48
  854. package/src/versioning/versioning.ts +1 -1
  855. package/src/vks/verification_key.ts +1 -1
  856. package/src/vks/vk_data.ts +1 -1
  857. package/src/zkpassport/index.ts +2 -2
  858. package/dest/block/published_l2_block.d.ts +0 -130
  859. package/dest/block/published_l2_block.d.ts.map +0 -1
  860. package/dest/logs/log_with_tx_data.d.ts +0 -19
  861. package/dest/logs/log_with_tx_data.d.ts.map +0 -1
  862. package/dest/logs/log_with_tx_data.js +0 -49
  863. package/src/logs/log_with_tx_data.ts +0 -46
@@ -5,6 +5,7 @@ import { BufferReader } from '@aztec/foundation/serialize';
5
5
 
6
6
  import { z } from 'zod';
7
7
 
8
+ import { L2BlockHash } from '../block/block_hash.js';
8
9
  import { schemas } from '../schemas/index.js';
9
10
 
10
11
  /** A globally unique log id. */
@@ -18,6 +19,8 @@ export class LogId {
18
19
  constructor(
19
20
  /** The block number the log was emitted in. */
20
21
  public readonly blockNumber: BlockNumber,
22
+ /** The hash of the block the log was emitted in. */
23
+ public readonly blockHash: L2BlockHash,
21
24
  /** The index of a tx in a block the log was emitted in. */
22
25
  public readonly txIndex: number,
23
26
  /** The index of a log the tx was emitted in. */
@@ -37,6 +40,7 @@ export class LogId {
37
40
  static random() {
38
41
  return new LogId(
39
42
  BlockNumber(Math.floor(Math.random() * 1000) + 1),
43
+ L2BlockHash.random(),
40
44
  Math.floor(Math.random() * 1000),
41
45
  Math.floor(Math.random() * 100),
42
46
  );
@@ -46,10 +50,13 @@ export class LogId {
46
50
  return z
47
51
  .object({
48
52
  blockNumber: BlockNumberSchema,
53
+ blockHash: L2BlockHash.schema,
49
54
  txIndex: schemas.Integer,
50
55
  logIndex: schemas.Integer,
51
56
  })
52
- .transform(({ blockNumber, txIndex, logIndex }) => new LogId(blockNumber, txIndex, logIndex));
57
+ .transform(
58
+ ({ blockNumber, blockHash, txIndex, logIndex }) => new LogId(blockNumber, blockHash, txIndex, logIndex),
59
+ );
53
60
  }
54
61
 
55
62
  /**
@@ -59,6 +66,7 @@ export class LogId {
59
66
  public toBuffer(): Buffer {
60
67
  return Buffer.concat([
61
68
  toBufferBE(BigInt(this.blockNumber), 4),
69
+ this.blockHash.toBuffer(),
62
70
  toBufferBE(BigInt(this.txIndex), 4),
63
71
  toBufferBE(BigInt(this.logIndex), 4),
64
72
  ]);
@@ -73,10 +81,11 @@ export class LogId {
73
81
  const reader = BufferReader.asReader(buffer);
74
82
 
75
83
  const blockNumber = BlockNumber(reader.readNumber());
84
+ const blockHash = reader.readObject(L2BlockHash);
76
85
  const txIndex = reader.readNumber();
77
86
  const logIndex = reader.readNumber();
78
87
 
79
- return new LogId(blockNumber, txIndex, logIndex);
88
+ return new LogId(blockNumber, blockHash, txIndex, logIndex);
80
89
  }
81
90
 
82
91
  /**
@@ -84,7 +93,7 @@ export class LogId {
84
93
  * @returns A string representation of the log id.
85
94
  */
86
95
  public toString(): string {
87
- return `${this.blockNumber}-${this.txIndex}-${this.logIndex}`;
96
+ return `${this.blockNumber}-${this.txIndex}-${this.logIndex}-${this.blockHash.toString()}`;
88
97
  }
89
98
 
90
99
  /**
@@ -93,12 +102,13 @@ export class LogId {
93
102
  * @returns A log id.
94
103
  */
95
104
  static fromString(data: string): LogId {
96
- const [rawBlockNumber, rawTxIndex, rawLogIndex] = data.split('-');
105
+ const [rawBlockNumber, rawTxIndex, rawLogIndex, rawBlockHash] = data.split('-');
97
106
  const blockNumber = BlockNumber(Number(rawBlockNumber));
107
+ const blockHash = L2BlockHash.fromString(rawBlockHash);
98
108
  const txIndex = Number(rawTxIndex);
99
109
  const logIndex = Number(rawLogIndex);
100
110
 
101
- return new LogId(blockNumber, txIndex, logIndex);
111
+ return new LogId(blockNumber, blockHash, txIndex, logIndex);
102
112
  }
103
113
 
104
114
  /**
@@ -106,6 +116,6 @@ export class LogId {
106
116
  * @returns A human readable representation of the log id.
107
117
  */
108
118
  public toHumanReadable(): string {
109
- return `logId: (blockNumber: ${this.blockNumber}, txIndex: ${this.txIndex}, logIndex: ${this.logIndex})`;
119
+ return `logId: (blockNumber: ${this.blockNumber}, blockHash: ${this.blockHash.toString()}, txIndex: ${this.txIndex}, logIndex: ${this.logIndex})`;
110
120
  }
111
121
  }
@@ -1,5 +1,5 @@
1
1
  import { MAX_NOTE_HASHES_PER_TX } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
 
4
4
  import type { AztecAddress } from '../aztec-address/index.js';
5
5
  import type { TxEffect } from '../tx/tx_effect.js';
@@ -1,5 +1,5 @@
1
1
  import { PRIVATE_LOG_SIZE_IN_FIELDS } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
 
4
4
  import type { AztecAddress } from '../aztec-address/index.js';
5
5
  import type { TxHash } from '../tx/tx_hash.js';
@@ -1,7 +1,7 @@
1
1
  import { PRIVATE_LOG_LENGTH, PRIVATE_LOG_SIZE_IN_FIELDS } from '@aztec/constants';
2
2
  import { type FieldsOf, makeTuple } from '@aztec/foundation/array';
3
3
  import { padArrayEnd } from '@aztec/foundation/collection';
4
- import { Fr } from '@aztec/foundation/fields';
4
+ import { Fr } from '@aztec/foundation/curves/bn254';
5
5
  import { schemas } from '@aztec/foundation/schemas';
6
6
  import {
7
7
  BufferReader,
@@ -59,7 +59,8 @@ export class PrivateLog {
59
59
  }
60
60
 
61
61
  isEmpty() {
62
- return this.fields.every(f => f.isZero());
62
+ // Faster to check emittedLength than compare all fields against zero
63
+ return this.emittedLength === 0;
63
64
  }
64
65
 
65
66
  static empty() {
@@ -1,6 +1,6 @@
1
1
  import { FLAT_PUBLIC_LOGS_PAYLOAD_LENGTH, PUBLIC_LOG_HEADER_LENGTH } from '@aztec/constants';
2
2
  import type { FieldsOf } from '@aztec/foundation/array';
3
- import { Fr } from '@aztec/foundation/fields';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import { type ZodFor, schemas } from '@aztec/foundation/schemas';
5
5
  import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
6
6
 
@@ -172,6 +172,13 @@ export class PublicLog {
172
172
  return new PublicLog(reader.readObject(AztecAddress), reader.readArray(fieldsLength, Fr));
173
173
  }
174
174
 
175
+ static fromPlainObject(obj: any): PublicLog {
176
+ return new PublicLog(
177
+ AztecAddress.fromPlainObject(obj.contractAddress),
178
+ obj.fields.map((f: any) => Fr.fromPlainObject(f)),
179
+ );
180
+ }
181
+
175
182
  static async random() {
176
183
  return new PublicLog(
177
184
  await AztecAddress.random(),
@@ -1,5 +1,5 @@
1
- import { Grumpkin } from '@aztec/foundation/crypto';
2
- import type { GrumpkinScalar, Point } from '@aztec/foundation/fields';
1
+ import { Grumpkin } from '@aztec/foundation/crypto/grumpkin';
2
+ import type { GrumpkinScalar, Point } from '@aztec/foundation/curves/grumpkin';
3
3
 
4
4
  import type { PublicKey } from '../keys/public_key.js';
5
5
 
@@ -0,0 +1,44 @@
1
+ import { poseidon2Hash } from '@aztec/foundation/crypto/poseidon';
2
+ import type { Fr } from '@aztec/foundation/curves/bn254';
3
+ import type { ZodFor } from '@aztec/foundation/schemas';
4
+
5
+ import type { AztecAddress } from '../aztec-address/index.js';
6
+ import { schemas } from '../schemas/schemas.js';
7
+ import type { Tag } from './tag.js';
8
+
9
+ /* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
10
+
11
+ /** Branding to ensure fields are not interchangeable types. */
12
+ export interface SiloedTag {
13
+ /** Brand. */
14
+ _branding: 'SiloedTag';
15
+ }
16
+
17
+ /**
18
+ * Represents a tag used in private log as it "appears on the chain" - that is the tag is siloed with a contract
19
+ * address that emitted the log.
20
+ */
21
+ export class SiloedTag {
22
+ constructor(public readonly value: Fr) {}
23
+
24
+ static async compute(tag: Tag, app: AztecAddress): Promise<SiloedTag> {
25
+ const siloedTag = await poseidon2Hash([app, tag.value]);
26
+ return new SiloedTag(siloedTag);
27
+ }
28
+
29
+ toString(): string {
30
+ return this.value.toString();
31
+ }
32
+
33
+ toJSON(): string {
34
+ return this.value.toString();
35
+ }
36
+
37
+ equals(other: SiloedTag): boolean {
38
+ return this.value.equals(other.value);
39
+ }
40
+
41
+ static get schema(): ZodFor<SiloedTag> {
42
+ return schemas.Fr.transform((fr: Fr) => new SiloedTag(fr));
43
+ }
44
+ }
@@ -0,0 +1,42 @@
1
+ import { poseidon2Hash } from '@aztec/foundation/crypto/poseidon';
2
+ import type { Fr } from '@aztec/foundation/curves/bn254';
3
+ import type { ZodFor } from '@aztec/foundation/schemas';
4
+
5
+ import { schemas } from '../schemas/schemas.js';
6
+ import type { PreTag } from './pre_tag.js';
7
+
8
+ /* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
9
+
10
+ export interface Tag {
11
+ /** Brand. */
12
+ _branding: 'Tag';
13
+ }
14
+
15
+ /**
16
+ * Represents a tag of a private log. This is not the tag that "appears" on the chain as this tag is first siloed
17
+ * with a contract address by kernels before being included in the final log.
18
+ */
19
+ export class Tag {
20
+ constructor(public readonly value: Fr) {}
21
+
22
+ static async compute(preTag: PreTag): Promise<Tag> {
23
+ const tag = await poseidon2Hash([preTag.secret.value, preTag.index]);
24
+ return new Tag(tag);
25
+ }
26
+
27
+ toString(): string {
28
+ return this.value.toString();
29
+ }
30
+
31
+ toJSON(): string {
32
+ return this.value.toString();
33
+ }
34
+
35
+ equals(other: Tag): boolean {
36
+ return this.value.equals(other.value);
37
+ }
38
+
39
+ static get schema(): ZodFor<Tag> {
40
+ return schemas.Fr.transform((fr: Fr) => new Tag(fr));
41
+ }
42
+ }
@@ -1,13 +1,19 @@
1
1
  import { BlockNumber, BlockNumberSchema } from '@aztec/foundation/branded-types';
2
- import { BufferReader, boolToBuffer, numToUInt32BE } from '@aztec/foundation/serialize';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
+ import { schemas as foundationSchemas } from '@aztec/foundation/schemas';
4
+ import {
5
+ BufferReader,
6
+ bigintToUInt64BE,
7
+ numToUInt32BE,
8
+ serializeArrayOfBufferableToVector,
9
+ } from '@aztec/foundation/serialize';
3
10
 
4
11
  import { z } from 'zod';
5
12
 
13
+ import { schemas } from '../schemas/schemas.js';
6
14
  import { TxHash } from '../tx/tx_hash.js';
7
- import { PrivateLog } from './private_log.js';
8
- import { PublicLog } from './public_log.js';
15
+ import type { UInt64 } from '../types/shared.js';
9
16
 
10
- // TODO(#14460): Split to private and public versions instead of having this weird mix.
11
17
  export class TxScopedL2Log {
12
18
  constructor(
13
19
  /*
@@ -15,82 +21,78 @@ export class TxScopedL2Log {
15
21
  */
16
22
  public txHash: TxHash,
17
23
  /*
18
- * The next available leaf index for the note hash tree for this transaction. It is stored
19
- * with the log so the noteHashIndex can be reconstructed after decryption.
24
+ * The block this log is included in
20
25
  */
21
- public dataStartIndexForTx: number,
26
+ public blockNumber: BlockNumber,
22
27
  /*
23
- * The index of the log in the transaction. Note that public and private logs are in separate arrays in the tx
24
- * effect and for this reason these indices are independent (a private and public log can have the same index).
28
+ * The timestamp of the block this log is included in
25
29
  */
26
- public logIndexInTx: number,
30
+ public blockTimestamp: UInt64,
27
31
  /*
28
- * The block this log is included in
32
+ * The log data as an array of field elements
29
33
  */
30
- public blockNumber: BlockNumber,
34
+ public logData: Fr[],
35
+ /*
36
+ * The note hashes from the tx effect
37
+ */
38
+ public noteHashes: Fr[],
31
39
  /*
32
- * The log data as either a PrivateLog or PublicLog
40
+ * The first nullifier from the tx effect. Used for nonce discovery when processing notes from logs.
41
+ *
42
+ * (Note nonces are computed as `hash(firstNullifier, noteIndexInTx)`.)
33
43
  */
34
- public log: PrivateLog | PublicLog,
44
+ public firstNullifier: Fr,
35
45
  ) {}
36
46
 
37
- get isFromPublic() {
38
- return this.log instanceof PublicLog;
39
- }
40
-
41
47
  static get schema() {
42
48
  return z
43
49
  .object({
44
50
  txHash: TxHash.schema,
45
- dataStartIndexForTx: z.number(),
46
- logIndexInTx: z.number(),
47
51
  blockNumber: BlockNumberSchema,
48
- log: z.union([PrivateLog.schema, PublicLog.schema]),
52
+ blockTimestamp: schemas.UInt64,
53
+ logData: z.array(foundationSchemas.Fr),
54
+ noteHashes: z.array(foundationSchemas.Fr),
55
+ firstNullifier: foundationSchemas.Fr,
49
56
  })
50
57
  .transform(
51
- ({ txHash, dataStartIndexForTx, logIndexInTx, blockNumber, log }) =>
52
- new TxScopedL2Log(txHash, dataStartIndexForTx, logIndexInTx, blockNumber, log),
58
+ ({ txHash, blockNumber, blockTimestamp, logData, noteHashes, firstNullifier }) =>
59
+ new TxScopedL2Log(txHash, blockNumber, blockTimestamp, logData, noteHashes, firstNullifier),
53
60
  );
54
61
  }
55
62
 
56
63
  toBuffer() {
57
- const isFromPublic = this.log instanceof PublicLog;
58
64
  return Buffer.concat([
59
65
  this.txHash.toBuffer(),
60
- numToUInt32BE(this.dataStartIndexForTx),
61
- numToUInt32BE(this.logIndexInTx),
62
66
  numToUInt32BE(this.blockNumber),
63
- boolToBuffer(isFromPublic),
64
- this.log.toBuffer(),
67
+ bigintToUInt64BE(this.blockTimestamp),
68
+ serializeArrayOfBufferableToVector(this.logData),
69
+ serializeArrayOfBufferableToVector(this.noteHashes),
70
+ this.firstNullifier.toBuffer(),
65
71
  ]);
66
72
  }
67
73
 
68
74
  static fromBuffer(buffer: Buffer) {
69
75
  const reader = BufferReader.asReader(buffer);
70
76
  const txHash = reader.readObject(TxHash);
71
- const dataStartIndexForTx = reader.readNumber();
72
- const logIndexInTx = reader.readNumber();
73
77
  const blockNumber = BlockNumber(reader.readNumber());
74
- const isFromPublic = reader.readBoolean();
75
- const log = isFromPublic ? PublicLog.fromBuffer(reader) : PrivateLog.fromBuffer(reader);
76
-
77
- return new TxScopedL2Log(txHash, dataStartIndexForTx, logIndexInTx, blockNumber, log);
78
- }
78
+ const blockTimestamp = reader.readUInt64();
79
+ const logData = reader.readVector(Fr);
80
+ const noteHashes = reader.readVector(Fr);
81
+ const firstNullifier = reader.readObject(Fr);
79
82
 
80
- static async random(isFromPublic = Math.random() < 0.5) {
81
- const log = isFromPublic ? await PublicLog.random() : PrivateLog.random();
82
- return new TxScopedL2Log(TxHash.random(), 1, 1, BlockNumber(1), log);
83
+ return new TxScopedL2Log(txHash, blockNumber, blockTimestamp, logData, noteHashes, firstNullifier);
83
84
  }
84
85
 
85
86
  equals(other: TxScopedL2Log) {
86
87
  return (
87
88
  this.txHash.equals(other.txHash) &&
88
- this.dataStartIndexForTx === other.dataStartIndexForTx &&
89
- this.logIndexInTx === other.logIndexInTx &&
90
89
  this.blockNumber === other.blockNumber &&
91
- ((this.log instanceof PublicLog && other.log instanceof PublicLog) ||
92
- (this.log instanceof PrivateLog && other.log instanceof PrivateLog)) &&
93
- this.log.equals(other.log as any)
90
+ this.blockTimestamp === other.blockTimestamp &&
91
+ this.logData.length === other.logData.length &&
92
+ this.logData.every((f, i) => f.equals(other.logData[i])) &&
93
+ this.noteHashes.length === other.noteHashes.length &&
94
+ this.noteHashes.every((h, i) => h.equals(other.noteHashes[i])) &&
95
+ this.firstNullifier.equals(other.firstNullifier)
94
96
  );
95
97
  }
96
98
  }
@@ -1,6 +1,6 @@
1
1
  import { NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP } from '@aztec/constants';
2
2
  import { padArrayEnd } from '@aztec/foundation/collection';
3
- import { Fr } from '@aztec/foundation/fields';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import { computeBalancedShaRoot } from '@aztec/foundation/trees';
5
5
 
6
6
  /** Computes the inHash for a block's ContentCommitment given its l1 to l2 messages. */
@@ -1,6 +1,7 @@
1
- import { INITIAL_L2_BLOCK_NUM, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP } from '@aztec/constants';
1
+ import { INITIAL_CHECKPOINT_NUMBER, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP } from '@aztec/constants';
2
2
  import { toBigIntBE } from '@aztec/foundation/bigint-buffer';
3
- import { Fr } from '@aztec/foundation/fields';
3
+ import { CheckpointNumber } from '@aztec/foundation/branded-types';
4
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
5
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
5
6
 
6
7
  export class InboxLeaf {
@@ -22,22 +23,22 @@ export class InboxLeaf {
22
23
  return new InboxLeaf(index, leaf);
23
24
  }
24
25
 
25
- static smallestIndexFromL2Block(l2blockNumber: number): bigint {
26
- return BigInt(l2blockNumber - INITIAL_L2_BLOCK_NUM) * BigInt(NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP);
26
+ static smallestIndexForCheckpoint(checkpointNumber: CheckpointNumber): bigint {
27
+ return BigInt(checkpointNumber - INITIAL_CHECKPOINT_NUMBER) * BigInt(NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP);
27
28
  }
28
29
 
29
30
  /**
30
- * Returns the range of valid indices for a given L2 block.
31
+ * Returns the range of valid indices for a given checkpoint.
31
32
  * Start index is inclusive, end index is exclusive.
32
33
  */
33
- static indexRangeFromL2Block(l2blockNumber: number): [bigint, bigint] {
34
- const start = this.smallestIndexFromL2Block(l2blockNumber);
34
+ static indexRangeForCheckpoint(checkpointNumber: CheckpointNumber): [bigint, bigint] {
35
+ const start = this.smallestIndexForCheckpoint(checkpointNumber);
35
36
  const end = start + BigInt(NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP);
36
37
  return [start, end];
37
38
  }
38
39
 
39
- /** Returns the L2 block number for a given leaf index */
40
- static l2BlockFromIndex(index: bigint): number {
41
- return Number(index / BigInt(NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP)) + INITIAL_L2_BLOCK_NUM;
40
+ /** Returns the checkpoint number for a given leaf index */
41
+ static checkpointNumberFromIndex(index: bigint): CheckpointNumber {
42
+ return CheckpointNumber(Number(index / BigInt(NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP)) + INITIAL_CHECKPOINT_NUMBER);
42
43
  }
43
44
  }
@@ -1,6 +1,6 @@
1
- import { randomInt } from '@aztec/foundation/crypto';
1
+ import { randomInt } from '@aztec/foundation/crypto/random';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
3
  import { EthAddress } from '@aztec/foundation/eth-address';
3
- import { Fr } from '@aztec/foundation/fields';
4
4
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
2
- import { sha256ToField } from '@aztec/foundation/crypto';
3
- import { Fr } from '@aztec/foundation/fields';
2
+ import { sha256ToField } from '@aztec/foundation/crypto/sha256';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
5
5
  import { bufferToHex } from '@aztec/foundation/string';
6
6
  import { SiblingPath } from '@aztec/foundation/trees';
@@ -84,6 +84,7 @@ export async function getNonNullifiedL1ToL2MessageWitness(
84
84
  if (!response) {
85
85
  throw new Error(`No L1 to L2 message found for message hash ${messageHash.toString()}`);
86
86
  }
87
+
87
88
  const [messageIndex, siblingPath] = response;
88
89
 
89
90
  const messageNullifier = await computeL1ToL2MessageNullifier(contractAddress, messageHash, secret);
@@ -1,5 +1,5 @@
1
- import type { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
2
- import type { Fr } from '@aztec/foundation/fields';
1
+ import type { CheckpointNumber } from '@aztec/foundation/branded-types';
2
+ import type { Fr } from '@aztec/foundation/curves/bn254';
3
3
 
4
4
  import type { L2Tips } from '../block/l2_block_source.js';
5
5
 
@@ -12,14 +12,7 @@ export interface L1ToL2MessageSource {
12
12
  * @param checkpointNumber - Checkpoint number to get messages for.
13
13
  * @returns The L1 to L2 messages/leaves of the messages subtree (throws if not found).
14
14
  */
15
- getL1ToL2MessagesForCheckpoint(checkpointNumber: CheckpointNumber): Promise<Fr[]>;
16
-
17
- /**
18
- * Gets new L1 to L2 message (to be) included in a given block.
19
- * @param blockNumber - L2 block number to get messages for.
20
- * @returns The L1 to L2 messages/leaves of the messages subtree (throws if not found).
21
- */
22
- getL1ToL2Messages(blockNumber: BlockNumber): Promise<Fr[]>;
15
+ getL1ToL2Messages(checkpointNumber: CheckpointNumber): Promise<Fr[]>;
23
16
 
24
17
  /**
25
18
  * Gets the L1 to L2 message index in the L1 to L2 message tree.
@@ -28,12 +21,6 @@ export interface L1ToL2MessageSource {
28
21
  */
29
22
  getL1ToL2MessageIndex(l1ToL2Message: Fr): Promise<bigint | undefined>;
30
23
 
31
- /**
32
- * Gets the number of the latest L2 block processed by the implementation.
33
- * @returns The number of the latest L2 block processed by the implementation.
34
- */
35
- getBlockNumber(): Promise<BlockNumber>;
36
-
37
24
  /**
38
25
  * Returns the tips of the L2 chain.
39
26
  */
@@ -1,5 +1,5 @@
1
- import { randomInt } from '@aztec/foundation/crypto';
2
- import { Fr } from '@aztec/foundation/fields';
1
+ import { randomInt } from '@aztec/foundation/crypto/random';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
4
 
5
5
  import { AztecAddress } from '../aztec-address/index.js';
@@ -1,5 +1,5 @@
1
1
  import type { BlockNumber } from '@aztec/foundation/branded-types';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { SiblingPath, UnbalancedMerkleTreeCalculator, computeUnbalancedShaRoot } from '@aztec/foundation/trees';
4
4
 
5
5
  export interface MessageRetrieval {
@@ -1,5 +1,5 @@
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
1
2
  import { EthAddress } from '@aztec/foundation/eth-address';
2
- import { Fr } from '@aztec/foundation/fields';
3
3
  import { schemas } from '@aztec/foundation/schemas';
4
4
  import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
5
5
 
@@ -160,6 +160,10 @@ export class ScopedL2ToL1Message {
160
160
  return new ScopedL2ToL1Message(L2ToL1Message.empty(), AztecAddress.ZERO);
161
161
  }
162
162
 
163
+ equals(other: ScopedL2ToL1Message): boolean {
164
+ return this.message.equals(other.message) && this.contractAddress.equals(other.contractAddress);
165
+ }
166
+
163
167
  /**
164
168
  * Creates a ScopedL2ToL1Message instance from a plain object without Zod validation.
165
169
  * This method is optimized for performance and skips validation, making it suitable
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { UnbalancedMerkleTreeCalculator, computeUnbalancedShaRoot } from '@aztec/foundation/trees';
3
3
 
4
4
  export function computeTxOutHash(messages: Fr[]): Fr {
package/src/note/note.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { randomInt } from '@aztec/foundation/crypto';
2
- import { Fr } from '@aztec/foundation/fields';
1
+ import { randomInt } from '@aztec/foundation/crypto/random';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { BufferReader } from '@aztec/foundation/serialize';
4
4
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
5
5
 
@@ -67,6 +67,9 @@ export class Note extends Vector<Fr> {
67
67
  }
68
68
 
69
69
  equals(other: Note) {
70
+ if (this.items.length !== other.items.length) {
71
+ return false;
72
+ }
70
73
  return this.items.every((item, index) => item.equals(other.items[index]));
71
74
  }
72
75
  }
@@ -1,6 +1,7 @@
1
1
  import { toBigIntBE } from '@aztec/foundation/bigint-buffer';
2
2
  import { BlockNumber } from '@aztec/foundation/branded-types';
3
- import { Fr, Point } from '@aztec/foundation/fields';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
+ import { Point } from '@aztec/foundation/curves/grumpkin';
4
5
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
5
6
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
6
7
  import { Note } from '@aztec/stdlib/note';
@@ -117,6 +118,26 @@ export class NoteDao {
117
118
  return NoteDao.fromBuffer(Buffer.from(hex, 'hex'));
118
119
  }
119
120
 
121
+ /**
122
+ * Returns true if this note is equal to the `other` one.
123
+ */
124
+ equals(other: NoteDao): boolean {
125
+ return (
126
+ this.note.equals(other.note) &&
127
+ this.contractAddress.equals(other.contractAddress) &&
128
+ this.owner.equals(other.owner) &&
129
+ this.storageSlot.equals(other.storageSlot) &&
130
+ this.randomness.equals(other.randomness) &&
131
+ this.noteNonce.equals(other.noteNonce) &&
132
+ this.noteHash.equals(other.noteHash) &&
133
+ this.siloedNullifier.equals(other.siloedNullifier) &&
134
+ this.txHash.equals(other.txHash) &&
135
+ this.l2BlockNumber === other.l2BlockNumber &&
136
+ this.l2BlockHash === other.l2BlockHash &&
137
+ this.index === other.index
138
+ );
139
+ }
140
+
120
141
  /**
121
142
  * Returns the size in bytes of the Note Dao.
122
143
  * @returns - Its size in bytes.
@@ -1,4 +1,4 @@
1
- import type { Fr } from '@aztec/foundation/fields';
1
+ import type { Fr } from '@aztec/foundation/curves/bn254';
2
2
 
3
3
  import { z } from 'zod';
4
4
 
@@ -1,9 +1,10 @@
1
1
  import { SlotNumber } from '@aztec/foundation/branded-types';
2
2
  import { Buffer32 } from '@aztec/foundation/buffer';
3
- import { keccak256, tryRecoverAddress } from '@aztec/foundation/crypto';
3
+ import { keccak256 } from '@aztec/foundation/crypto/keccak';
4
+ import { tryRecoverAddress } from '@aztec/foundation/crypto/secp256k1-signer';
5
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
6
  import type { EthAddress } from '@aztec/foundation/eth-address';
5
7
  import { Signature } from '@aztec/foundation/eth-signature';
6
- import { Fr } from '@aztec/foundation/fields';
7
8
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
8
9
 
9
10
  import { z } from 'zod';
@@ -1,9 +1,10 @@
1
1
  import { SlotNumber } from '@aztec/foundation/branded-types';
2
2
  import { Buffer32 } from '@aztec/foundation/buffer';
3
- import { keccak256, tryRecoverAddress } from '@aztec/foundation/crypto';
3
+ import { keccak256 } from '@aztec/foundation/crypto/keccak';
4
+ import { tryRecoverAddress } from '@aztec/foundation/crypto/secp256k1-signer';
5
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
6
  import type { EthAddress } from '@aztec/foundation/eth-address';
5
7
  import { Signature } from '@aztec/foundation/eth-signature';
6
- import { Fr } from '@aztec/foundation/fields';
7
8
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
8
9
 
9
10
  import type { L2BlockInfo } from '../block/l2_block_info.js';
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { schemas } from '@aztec/foundation/schemas';
3
3
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
4
  import { hexToBuffer } from '@aztec/foundation/string';
@@ -1,5 +1,6 @@
1
1
  import { Buffer32 } from '@aztec/foundation/buffer';
2
- import { keccak256, makeEthSignDigest } from '@aztec/foundation/crypto';
2
+ import { keccak256 } from '@aztec/foundation/crypto/keccak';
3
+ import { makeEthSignDigest } from '@aztec/foundation/crypto/secp256k1-signer';
3
4
 
4
5
  export enum SignatureDomainSeparator {
5
6
  blockProposal = 0,