@aztec/stdlib 0.0.1-commit.03f7ef2 → 0.0.1-commit.04d373f

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 (1224) hide show
  1. package/dest/abi/abi.d.ts +142 -1081
  2. package/dest/abi/abi.d.ts.map +1 -1
  3. package/dest/abi/abi.js +41 -18
  4. package/dest/abi/authorization_selector.d.ts +4 -7
  5. package/dest/abi/authorization_selector.d.ts.map +1 -1
  6. package/dest/abi/buffer.d.ts +14 -4
  7. package/dest/abi/buffer.d.ts.map +1 -1
  8. package/dest/abi/buffer.js +25 -4
  9. package/dest/abi/contract_artifact.d.ts +2 -2
  10. package/dest/abi/contract_artifact.d.ts.map +1 -1
  11. package/dest/abi/contract_artifact.js +14 -7
  12. package/dest/abi/decoder.d.ts +6 -45
  13. package/dest/abi/decoder.d.ts.map +1 -1
  14. package/dest/abi/decoder.js +17 -70
  15. package/dest/abi/encoder.d.ts +1 -1
  16. package/dest/abi/encoder.d.ts.map +1 -1
  17. package/dest/abi/encoder.js +64 -7
  18. package/dest/abi/event_metadata_definition.d.ts +3 -1
  19. package/dest/abi/event_metadata_definition.d.ts.map +1 -1
  20. package/dest/abi/event_metadata_definition.js +1 -1
  21. package/dest/abi/event_selector.d.ts +4 -7
  22. package/dest/abi/event_selector.d.ts.map +1 -1
  23. package/dest/abi/function_call.d.ts +30 -10
  24. package/dest/abi/function_call.d.ts.map +1 -1
  25. package/dest/abi/function_call.js +20 -3
  26. package/dest/abi/function_selector.d.ts +3 -6
  27. package/dest/abi/function_selector.d.ts.map +1 -1
  28. package/dest/abi/function_selector.js +2 -4
  29. package/dest/abi/function_signature_decoder.d.ts +43 -0
  30. package/dest/abi/function_signature_decoder.d.ts.map +1 -0
  31. package/dest/abi/function_signature_decoder.js +66 -0
  32. package/dest/abi/index.d.ts +2 -1
  33. package/dest/abi/index.d.ts.map +1 -1
  34. package/dest/abi/index.js +1 -0
  35. package/dest/abi/note_selector.d.ts +4 -7
  36. package/dest/abi/note_selector.d.ts.map +1 -1
  37. package/dest/abi/note_selector.js +1 -3
  38. package/dest/abi/selector.d.ts +2 -2
  39. package/dest/abi/selector.d.ts.map +1 -1
  40. package/dest/abi/selector.js +4 -2
  41. package/dest/abi/utils.d.ts +20 -1
  42. package/dest/abi/utils.d.ts.map +1 -1
  43. package/dest/abi/utils.js +22 -0
  44. package/dest/auth_witness/auth_witness.d.ts +3 -2
  45. package/dest/auth_witness/auth_witness.d.ts.map +1 -1
  46. package/dest/auth_witness/auth_witness.js +3 -3
  47. package/dest/avm/avm.d.ts +1777 -10484
  48. package/dest/avm/avm.d.ts.map +1 -1
  49. package/dest/avm/avm.js +6 -3
  50. package/dest/avm/avm_accumulated_data.d.ts +50 -87
  51. package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
  52. package/dest/avm/avm_accumulated_data.js +5 -2
  53. package/dest/avm/avm_circuit_public_inputs.d.ts +185 -937
  54. package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
  55. package/dest/avm/avm_circuit_public_inputs.js +3 -1
  56. package/dest/avm/avm_proving_request.d.ts +824 -5617
  57. package/dest/avm/avm_proving_request.d.ts.map +1 -1
  58. package/dest/avm/contract_storage_read.d.ts +13 -1
  59. package/dest/avm/contract_storage_read.d.ts.map +1 -1
  60. package/dest/avm/contract_storage_update_request.d.ts +13 -1
  61. package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
  62. package/dest/avm/message_pack.js +12 -3
  63. package/dest/avm/public_call_stack_item_compressed.d.ts +3 -1
  64. package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
  65. package/dest/avm/public_data_read.d.ts +10 -1
  66. package/dest/avm/public_data_read.d.ts.map +1 -1
  67. package/dest/avm/public_data_update_request.d.ts +10 -1
  68. package/dest/avm/public_data_update_request.d.ts.map +1 -1
  69. package/dest/avm/public_data_update_request.js +3 -1
  70. package/dest/avm/public_data_write.d.ts +12 -12
  71. package/dest/avm/public_data_write.d.ts.map +1 -1
  72. package/dest/avm/public_inner_call_request.d.ts +4 -1
  73. package/dest/avm/public_inner_call_request.d.ts.map +1 -1
  74. package/dest/avm/public_inner_call_request.js +3 -1
  75. package/dest/avm/revert_code.d.ts +9 -10
  76. package/dest/avm/revert_code.d.ts.map +1 -1
  77. package/dest/avm/revert_code.js +16 -22
  78. package/dest/aztec-address/index.d.ts +8 -8
  79. package/dest/aztec-address/index.d.ts.map +1 -1
  80. package/dest/aztec-address/index.js +12 -7
  81. package/dest/block/attestation_info.d.ts +7 -6
  82. package/dest/block/attestation_info.d.ts.map +1 -1
  83. package/dest/block/attestation_info.js +8 -6
  84. package/dest/block/block_data.d.ts +27 -0
  85. package/dest/block/block_data.d.ts.map +1 -0
  86. package/dest/block/block_data.js +12 -0
  87. package/dest/block/block_hash.d.ts +20 -15
  88. package/dest/block/block_hash.d.ts.map +1 -1
  89. package/dest/block/block_hash.js +23 -20
  90. package/dest/block/block_parameter.d.ts +38 -4
  91. package/dest/block/block_parameter.d.ts.map +1 -1
  92. package/dest/block/block_parameter.js +55 -2
  93. package/dest/block/body.d.ts +1 -1
  94. package/dest/block/body.d.ts.map +1 -1
  95. package/dest/block/body.js +5 -2
  96. package/dest/block/in_block.d.ts +9 -28
  97. package/dest/block/in_block.d.ts.map +1 -1
  98. package/dest/block/in_block.js +5 -5
  99. package/dest/block/index.d.ts +2 -4
  100. package/dest/block/index.d.ts.map +1 -1
  101. package/dest/block/index.js +1 -3
  102. package/dest/block/l2_block.d.ts +65 -85
  103. package/dest/block/l2_block.d.ts.map +1 -1
  104. package/dest/block/l2_block.js +73 -107
  105. package/dest/block/l2_block_info.d.ts +10 -29
  106. package/dest/block/l2_block_info.d.ts.map +1 -1
  107. package/dest/block/l2_block_info.js +6 -5
  108. package/dest/block/l2_block_source.d.ts +265 -163
  109. package/dest/block/l2_block_source.d.ts.map +1 -1
  110. package/dest/block/l2_block_source.js +91 -6
  111. package/dest/block/l2_block_stream/index.d.ts +2 -1
  112. package/dest/block/l2_block_stream/index.d.ts.map +1 -1
  113. package/dest/block/l2_block_stream/index.js +1 -0
  114. package/dest/block/l2_block_stream/interfaces.d.ts +20 -7
  115. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  116. package/dest/block/l2_block_stream/l2_block_stream.d.ts +8 -3
  117. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  118. package/dest/block/l2_block_stream/l2_block_stream.js +149 -37
  119. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +26 -16
  120. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  121. package/dest/block/l2_block_stream/l2_tips_memory_store.js +58 -61
  122. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +52 -0
  123. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -0
  124. package/dest/block/l2_block_stream/l2_tips_store_base.js +211 -0
  125. package/dest/block/proposal/attestations_and_signers.d.ts +19 -30
  126. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
  127. package/dest/block/proposal/attestations_and_signers.js +26 -18
  128. package/dest/block/proposal/committee_attestation.d.ts +6 -12
  129. package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
  130. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  131. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  132. package/dest/block/test/l2_tips_store_test_suite.js +481 -40
  133. package/dest/block/validate_block_result.d.ts +24 -24
  134. package/dest/block/validate_block_result.d.ts.map +1 -1
  135. package/dest/block/validate_block_result.js +18 -17
  136. package/dest/checkpoint/checkpoint.d.ts +61 -102
  137. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  138. package/dest/checkpoint/checkpoint.js +54 -17
  139. package/dest/checkpoint/checkpoint_data.d.ts +97 -0
  140. package/dest/checkpoint/checkpoint_data.d.ts.map +1 -0
  141. package/dest/checkpoint/checkpoint_data.js +38 -0
  142. package/dest/checkpoint/checkpoint_info.d.ts +16 -3
  143. package/dest/checkpoint/checkpoint_info.d.ts.map +1 -1
  144. package/dest/checkpoint/checkpoint_info.js +34 -1
  145. package/dest/checkpoint/checkpoint_reexecution_tracker.d.ts +60 -0
  146. package/dest/checkpoint/checkpoint_reexecution_tracker.d.ts.map +1 -0
  147. package/dest/checkpoint/checkpoint_reexecution_tracker.js +108 -0
  148. package/dest/checkpoint/digest.d.ts +18 -0
  149. package/dest/checkpoint/digest.d.ts.map +1 -0
  150. package/dest/checkpoint/digest.js +12 -0
  151. package/dest/checkpoint/index.d.ts +7 -1
  152. package/dest/checkpoint/index.d.ts.map +1 -1
  153. package/dest/checkpoint/index.js +6 -0
  154. package/dest/checkpoint/previous_checkpoint_out_hashes.d.ts +33 -0
  155. package/dest/checkpoint/previous_checkpoint_out_hashes.d.ts.map +1 -0
  156. package/dest/checkpoint/previous_checkpoint_out_hashes.js +45 -0
  157. package/dest/checkpoint/published_checkpoint.d.ts +55 -190
  158. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  159. package/dest/checkpoint/published_checkpoint.js +5 -5
  160. package/dest/checkpoint/validate.d.ts +36 -0
  161. package/dest/checkpoint/validate.d.ts.map +1 -0
  162. package/dest/checkpoint/validate.js +120 -0
  163. package/dest/config/chain-config.d.ts +4 -9
  164. package/dest/config/chain-config.d.ts.map +1 -1
  165. package/dest/config/chain-config.js +13 -12
  166. package/dest/config/index.d.ts +3 -1
  167. package/dest/config/index.d.ts.map +1 -1
  168. package/dest/config/index.js +2 -0
  169. package/dest/config/node-rpc-config.js +1 -1
  170. package/dest/config/pipelining-config.d.ts +15 -0
  171. package/dest/config/pipelining-config.d.ts.map +1 -0
  172. package/dest/config/pipelining-config.js +18 -0
  173. package/dest/config/sequencer-config.d.ts +14 -0
  174. package/dest/config/sequencer-config.d.ts.map +1 -0
  175. package/dest/config/sequencer-config.js +38 -0
  176. package/dest/contract/complete_address.d.ts +6 -2
  177. package/dest/contract/complete_address.d.ts.map +1 -1
  178. package/dest/contract/complete_address.js +6 -2
  179. package/dest/contract/contract_address.d.ts +6 -6
  180. package/dest/contract/contract_address.d.ts.map +1 -1
  181. package/dest/contract/contract_address.js +9 -8
  182. package/dest/contract/contract_class.d.ts +2 -3
  183. package/dest/contract/contract_class.d.ts.map +1 -1
  184. package/dest/contract/contract_class_id.d.ts +3 -3
  185. package/dest/contract/contract_class_id.d.ts.map +1 -1
  186. package/dest/contract/contract_class_id.js +7 -6
  187. package/dest/contract/contract_deployment_data.d.ts +18 -64
  188. package/dest/contract/contract_deployment_data.d.ts.map +1 -1
  189. package/dest/contract/contract_instance.d.ts +4 -2
  190. package/dest/contract/contract_instance.d.ts.map +1 -1
  191. package/dest/contract/contract_instance.js +10 -3
  192. package/dest/contract/index.d.ts +1 -5
  193. package/dest/contract/index.d.ts.map +1 -1
  194. package/dest/contract/index.js +0 -4
  195. package/dest/contract/interfaces/contract_class.d.ts +17 -241
  196. package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
  197. package/dest/contract/interfaces/contract_class.js +1 -28
  198. package/dest/contract/interfaces/contract_instance.d.ts +41 -95
  199. package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
  200. package/dest/contract/interfaces/contract_instance.js +4 -2
  201. package/dest/contract/interfaces/contract_instance_update.d.ts +6 -26
  202. package/dest/contract/interfaces/contract_instance_update.d.ts.map +1 -1
  203. package/dest/contract/interfaces/node-info.d.ts +3 -1
  204. package/dest/contract/interfaces/node-info.d.ts.map +1 -1
  205. package/dest/contract/interfaces/node-info.js +2 -1
  206. package/dest/contract/interfaces/protocol_contract_addresses.d.ts +2 -12
  207. package/dest/contract/interfaces/protocol_contract_addresses.d.ts.map +1 -1
  208. package/dest/contract/private_function.d.ts +1 -1
  209. package/dest/contract/private_function.d.ts.map +1 -1
  210. package/dest/contract/private_function.js +5 -8
  211. package/dest/database-version/database_version.d.ts +52 -0
  212. package/dest/database-version/database_version.d.ts.map +1 -0
  213. package/dest/database-version/database_version.js +69 -0
  214. package/dest/database-version/version_manager.d.ts +8 -50
  215. package/dest/database-version/version_manager.d.ts.map +1 -1
  216. package/dest/database-version/version_manager.js +13 -65
  217. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +2 -2
  218. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
  219. package/dest/delayed_public_mutable/delayed_public_mutable_values.js +7 -10
  220. package/dest/deserialization/index.d.ts +11 -0
  221. package/dest/deserialization/index.d.ts.map +1 -0
  222. package/dest/deserialization/index.js +10 -0
  223. package/dest/epoch-helpers/index.d.ts +16 -18
  224. package/dest/epoch-helpers/index.d.ts.map +1 -1
  225. package/dest/epoch-helpers/index.js +23 -3
  226. package/dest/errors/proving_error.d.ts +2 -2
  227. package/dest/errors/proving_error.d.ts.map +1 -1
  228. package/dest/file-store/factory.d.ts +4 -3
  229. package/dest/file-store/factory.d.ts.map +1 -1
  230. package/dest/file-store/factory.js +2 -2
  231. package/dest/file-store/http.d.ts +9 -2
  232. package/dest/file-store/http.d.ts.map +1 -1
  233. package/dest/file-store/http.js +20 -9
  234. package/dest/file-store/index.d.ts +2 -1
  235. package/dest/file-store/index.d.ts.map +1 -1
  236. package/dest/file-store/local.d.ts +3 -3
  237. package/dest/file-store/local.d.ts.map +1 -1
  238. package/dest/file-store/local.js +13 -4
  239. package/dest/file-store/s3.d.ts +1 -1
  240. package/dest/file-store/s3.d.ts.map +1 -1
  241. package/dest/file-store/s3.js +11 -3
  242. package/dest/gas/fee_math.d.ts +49 -0
  243. package/dest/gas/fee_math.d.ts.map +1 -0
  244. package/dest/gas/fee_math.js +80 -0
  245. package/dest/gas/gas.d.ts +9 -14
  246. package/dest/gas/gas.d.ts.map +1 -1
  247. package/dest/gas/gas.js +9 -4
  248. package/dest/gas/gas_fees.d.ts +13 -14
  249. package/dest/gas/gas_fees.d.ts.map +1 -1
  250. package/dest/gas/gas_fees.js +23 -5
  251. package/dest/gas/gas_settings.d.ts +66 -86
  252. package/dest/gas/gas_settings.d.ts.map +1 -1
  253. package/dest/gas/gas_settings.js +56 -9
  254. package/dest/gas/index.d.ts +2 -1
  255. package/dest/gas/index.d.ts.map +1 -1
  256. package/dest/gas/index.js +1 -0
  257. package/dest/ha-signing/config.d.ts +72 -0
  258. package/dest/ha-signing/config.d.ts.map +1 -0
  259. package/dest/ha-signing/config.js +88 -0
  260. package/dest/ha-signing/index.d.ts +4 -0
  261. package/dest/ha-signing/index.d.ts.map +1 -0
  262. package/dest/ha-signing/index.js +3 -0
  263. package/dest/ha-signing/local_config.d.ts +32 -0
  264. package/dest/ha-signing/local_config.d.ts.map +1 -0
  265. package/dest/ha-signing/local_config.js +24 -0
  266. package/dest/ha-signing/types.d.ts +90 -0
  267. package/dest/ha-signing/types.d.ts.map +1 -0
  268. package/dest/ha-signing/types.js +39 -0
  269. package/dest/hash/hash.d.ts +35 -1
  270. package/dest/hash/hash.d.ts.map +1 -1
  271. package/dest/hash/hash.js +78 -11
  272. package/dest/hash/map_slot.d.ts +1 -1
  273. package/dest/hash/map_slot.d.ts.map +1 -1
  274. package/dest/hash/map_slot.js +4 -3
  275. package/dest/interfaces/allowed_element.d.ts +17 -35
  276. package/dest/interfaces/allowed_element.d.ts.map +1 -1
  277. package/dest/interfaces/allowed_element.js +8 -8
  278. package/dest/interfaces/api_limit.d.ts +3 -1
  279. package/dest/interfaces/api_limit.d.ts.map +1 -1
  280. package/dest/interfaces/api_limit.js +2 -0
  281. package/dest/interfaces/archiver.d.ts +25 -35
  282. package/dest/interfaces/archiver.d.ts.map +1 -1
  283. package/dest/interfaces/archiver.js +211 -61
  284. package/dest/interfaces/aztec-node-admin.d.ts +115 -228
  285. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  286. package/dest/interfaces/aztec-node-admin.js +70 -19
  287. package/dest/interfaces/aztec-node-debug.d.ts +21 -0
  288. package/dest/interfaces/aztec-node-debug.d.ts.map +1 -0
  289. package/dest/interfaces/aztec-node-debug.js +21 -0
  290. package/dest/interfaces/aztec-node.d.ts +115 -134
  291. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  292. package/dest/interfaces/aztec-node.js +301 -72
  293. package/dest/interfaces/block-builder.d.ts +55 -18
  294. package/dest/interfaces/block-builder.d.ts.map +1 -1
  295. package/dest/interfaces/block-builder.js +16 -2
  296. package/dest/interfaces/block_response.d.ts +90 -0
  297. package/dest/interfaces/block_response.d.ts.map +1 -0
  298. package/dest/interfaces/block_response.js +30 -0
  299. package/dest/interfaces/chain_tips.d.ts +50 -0
  300. package/dest/interfaces/chain_tips.d.ts.map +1 -0
  301. package/dest/interfaces/chain_tips.js +11 -0
  302. package/dest/interfaces/checkpoint_parameter.d.ts +14 -0
  303. package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -0
  304. package/dest/interfaces/checkpoint_parameter.js +18 -0
  305. package/dest/interfaces/checkpoint_response.d.ts +122 -0
  306. package/dest/interfaces/checkpoint_response.d.ts.map +1 -0
  307. package/dest/interfaces/checkpoint_response.js +26 -0
  308. package/dest/interfaces/client.d.ts +8 -2
  309. package/dest/interfaces/client.d.ts.map +1 -1
  310. package/dest/interfaces/client.js +7 -1
  311. package/dest/interfaces/configs.d.ts +77 -116
  312. package/dest/interfaces/configs.d.ts.map +1 -1
  313. package/dest/interfaces/configs.js +19 -3
  314. package/dest/interfaces/l1_publish_info.d.ts +29 -0
  315. package/dest/interfaces/l1_publish_info.d.ts.map +1 -0
  316. package/dest/interfaces/l1_publish_info.js +26 -0
  317. package/dest/interfaces/l2_logs_source.d.ts +14 -25
  318. package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
  319. package/dest/interfaces/l2_logs_source.js +5 -0
  320. package/dest/interfaces/merkle_tree_operations.d.ts +13 -22
  321. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  322. package/dest/interfaces/p2p-bootstrap.js +8 -2
  323. package/dest/interfaces/p2p.d.ts +21 -18
  324. package/dest/interfaces/p2p.d.ts.map +1 -1
  325. package/dest/interfaces/p2p.js +29 -7
  326. package/dest/interfaces/private_kernel_prover.d.ts +62 -2
  327. package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
  328. package/dest/interfaces/prover-agent.d.ts +5 -23
  329. package/dest/interfaces/prover-agent.d.ts.map +1 -1
  330. package/dest/interfaces/prover-agent.js +4 -1
  331. package/dest/interfaces/prover-broker.d.ts +16 -1
  332. package/dest/interfaces/prover-broker.d.ts.map +1 -1
  333. package/dest/interfaces/prover-broker.js +4 -1
  334. package/dest/interfaces/prover-client.d.ts +19 -21
  335. package/dest/interfaces/prover-client.d.ts.map +1 -1
  336. package/dest/interfaces/prover-client.js +18 -4
  337. package/dest/interfaces/prover-node.js +22 -8
  338. package/dest/interfaces/proving-job-source.js +24 -4
  339. package/dest/interfaces/proving-job.d.ts +752 -5803
  340. package/dest/interfaces/proving-job.d.ts.map +1 -1
  341. package/dest/interfaces/proving-job.js +2 -8
  342. package/dest/interfaces/public_storage_override.d.ts +22 -0
  343. package/dest/interfaces/public_storage_override.d.ts.map +1 -0
  344. package/dest/interfaces/public_storage_override.js +7 -0
  345. package/dest/interfaces/server.d.ts +6 -1
  346. package/dest/interfaces/server.d.ts.map +1 -1
  347. package/dest/interfaces/server.js +5 -0
  348. package/dest/interfaces/server_circuit_prover.d.ts +4 -3
  349. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  350. package/dest/interfaces/slasher.d.ts +27 -59
  351. package/dest/interfaces/slasher.d.ts.map +1 -1
  352. package/dest/interfaces/slasher.js +10 -4
  353. package/dest/interfaces/tx_provider.d.ts +8 -3
  354. package/dest/interfaces/tx_provider.d.ts.map +1 -1
  355. package/dest/interfaces/validator.d.ts +117 -119
  356. package/dest/interfaces/validator.d.ts.map +1 -1
  357. package/dest/interfaces/validator.js +18 -5
  358. package/dest/interfaces/world_state.d.ts +13 -10
  359. package/dest/interfaces/world_state.d.ts.map +1 -1
  360. package/dest/kernel/claimed_length_array.js +3 -1
  361. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +7 -6
  362. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
  363. package/dest/kernel/hints/build_note_hash_read_request_hints.js +31 -19
  364. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +4 -4
  365. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
  366. package/dest/kernel/hints/build_nullifier_read_request_hints.js +28 -17
  367. package/dest/kernel/hints/build_transient_data_hints.d.ts +5 -2
  368. package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
  369. package/dest/kernel/hints/build_transient_data_hints.js +9 -3
  370. package/dest/kernel/hints/index.d.ts +2 -2
  371. package/dest/kernel/hints/index.js +2 -2
  372. package/dest/kernel/hints/key_validation_hint.d.ts +2 -1
  373. package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
  374. package/dest/kernel/hints/key_validation_request.d.ts +12 -7
  375. package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
  376. package/dest/kernel/hints/key_validation_request.js +20 -18
  377. package/dest/kernel/hints/key_validation_request_and_separator.d.ts +24 -0
  378. package/dest/kernel/hints/key_validation_request_and_separator.d.ts.map +1 -0
  379. package/dest/kernel/hints/{key_validation_request_and_generator.js → key_validation_request_and_separator.js} +12 -15
  380. package/dest/kernel/hints/private_kernel_reset_hints.d.ts +13 -1
  381. package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
  382. package/dest/kernel/hints/read_request.d.ts +7 -1
  383. package/dest/kernel/hints/read_request.d.ts.map +1 -1
  384. package/dest/kernel/hints/read_request_hints.d.ts +7 -1
  385. package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
  386. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts → scoped_key_validation_request_and_separator.d.ts} +8 -8
  387. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts.map → scoped_key_validation_request_and_separator.d.ts.map} +1 -1
  388. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.js → scoped_key_validation_request_and_separator.js} +6 -6
  389. package/dest/kernel/hints/transient_data_squashing_hint.js +3 -1
  390. package/dest/kernel/index.d.ts +5 -1
  391. package/dest/kernel/index.d.ts.map +1 -1
  392. package/dest/kernel/index.js +4 -0
  393. package/dest/kernel/log_hash.d.ts +6 -2
  394. package/dest/kernel/log_hash.d.ts.map +1 -1
  395. package/dest/kernel/log_hash.js +24 -10
  396. package/dest/kernel/private_accumulated_data.d.ts +23 -1
  397. package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
  398. package/dest/kernel/private_call_data.d.ts +25 -1
  399. package/dest/kernel/private_call_data.d.ts.map +1 -1
  400. package/dest/kernel/private_call_request.d.ts +16 -1
  401. package/dest/kernel/private_call_request.d.ts.map +1 -1
  402. package/dest/kernel/private_circuit_public_inputs.d.ts +82 -9
  403. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  404. package/dest/kernel/private_circuit_public_inputs.js +16 -16
  405. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +34 -4
  406. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  407. package/dest/kernel/private_kernel_circuit_public_inputs.js +4 -4
  408. package/dest/kernel/private_kernel_data.d.ts +7 -1
  409. package/dest/kernel/private_kernel_data.d.ts.map +1 -1
  410. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts +23 -0
  411. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts.map +1 -0
  412. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.js +35 -0
  413. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts +24 -0
  414. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts.map +1 -0
  415. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.js +37 -0
  416. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +22 -1
  417. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  418. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.d.ts +16 -0
  419. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.d.ts.map +1 -0
  420. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.js +23 -0
  421. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.d.ts +17 -0
  422. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.d.ts.map +1 -0
  423. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.js +25 -0
  424. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts +7 -1
  425. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
  426. package/dest/kernel/private_kernel_prover_output.d.ts +3 -29
  427. package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
  428. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +4 -1
  429. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
  430. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +12 -3
  431. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
  432. package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +4 -4
  433. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +34 -8
  434. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  435. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +32 -13
  436. package/dest/kernel/private_log_data.js +5 -2
  437. package/dest/kernel/private_to_avm_accumulated_data.d.ts +26 -70
  438. package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
  439. package/dest/kernel/private_to_avm_accumulated_data.js +16 -7
  440. package/dest/kernel/private_to_public_accumulated_data.d.ts +4 -3
  441. package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
  442. package/dest/kernel/private_to_public_accumulated_data.js +9 -4
  443. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +7 -6
  444. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  445. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +13 -9
  446. package/dest/kernel/private_to_rollup_accumulated_data.d.ts +21 -4
  447. package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
  448. package/dest/kernel/private_to_rollup_accumulated_data.js +9 -4
  449. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +22 -6
  450. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  451. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +13 -9
  452. package/dest/kernel/private_validation_requests.d.ts +13 -4
  453. package/dest/kernel/private_validation_requests.d.ts.map +1 -1
  454. package/dest/kernel/private_validation_requests.js +12 -10
  455. package/dest/kernel/public_call_request.d.ts +36 -30
  456. package/dest/kernel/public_call_request.d.ts.map +1 -1
  457. package/dest/kernel/public_call_request.js +21 -9
  458. package/dest/kernel/utils/optional_number.d.ts +7 -1
  459. package/dest/kernel/utils/optional_number.d.ts.map +1 -1
  460. package/dest/keys/derivation.d.ts +9 -5
  461. package/dest/keys/derivation.d.ts.map +1 -1
  462. package/dest/keys/derivation.js +28 -18
  463. package/dest/keys/key_types.d.ts +3 -3
  464. package/dest/keys/key_types.d.ts.map +1 -1
  465. package/dest/keys/public_key.d.ts +22 -3
  466. package/dest/keys/public_key.d.ts.map +1 -1
  467. package/dest/keys/public_key.js +20 -1
  468. package/dest/keys/public_keys.d.ts +56 -79
  469. package/dest/keys/public_keys.d.ts.map +1 -1
  470. package/dest/keys/public_keys.js +102 -74
  471. package/dest/keys/utils.d.ts +1 -1
  472. package/dest/keys/utils.d.ts.map +1 -1
  473. package/dest/keys/utils.js +8 -4
  474. package/dest/kv-store/config.d.ts +14 -0
  475. package/dest/kv-store/config.d.ts.map +1 -0
  476. package/dest/kv-store/config.js +21 -0
  477. package/dest/kv-store/index.d.ts +2 -0
  478. package/dest/kv-store/index.d.ts.map +1 -0
  479. package/dest/kv-store/index.js +1 -0
  480. package/dest/l1-contracts/index.d.ts +2 -2
  481. package/dest/l1-contracts/index.d.ts.map +1 -1
  482. package/dest/l1-contracts/index.js +1 -1
  483. package/dest/logs/app_tagging_secret.d.ts +46 -0
  484. package/dest/logs/app_tagging_secret.d.ts.map +1 -0
  485. package/dest/logs/app_tagging_secret.js +109 -0
  486. package/dest/logs/app_tagging_secret_kind.d.ts +6 -0
  487. package/dest/logs/app_tagging_secret_kind.d.ts.map +1 -0
  488. package/dest/logs/app_tagging_secret_kind.js +4 -0
  489. package/dest/logs/contract_class_log.d.ts +16 -34
  490. package/dest/logs/contract_class_log.d.ts.map +1 -1
  491. package/dest/logs/contract_class_log.js +14 -10
  492. package/dest/logs/debug_log_store.d.ts +30 -0
  493. package/dest/logs/debug_log_store.d.ts.map +1 -0
  494. package/dest/logs/debug_log_store.js +30 -0
  495. package/dest/logs/index.d.ts +9 -8
  496. package/dest/logs/index.d.ts.map +1 -1
  497. package/dest/logs/index.js +8 -7
  498. package/dest/logs/log_cursor.d.ts +51 -0
  499. package/dest/logs/log_cursor.d.ts.map +1 -0
  500. package/dest/logs/log_cursor.js +82 -0
  501. package/dest/logs/log_result.d.ts +54 -0
  502. package/dest/logs/log_result.d.ts.map +1 -0
  503. package/dest/logs/log_result.js +56 -0
  504. package/dest/logs/logs_query.d.ts +82 -0
  505. package/dest/logs/logs_query.d.ts.map +1 -0
  506. package/dest/logs/logs_query.js +50 -0
  507. package/dest/logs/message_context.d.ts +4 -7
  508. package/dest/logs/message_context.d.ts.map +1 -1
  509. package/dest/logs/message_context.js +23 -9
  510. package/dest/logs/pending_tagged_log.d.ts +2 -3
  511. package/dest/logs/pending_tagged_log.d.ts.map +1 -1
  512. package/dest/logs/pending_tagged_log.js +2 -2
  513. package/dest/logs/pre_tag.d.ts +14 -22
  514. package/dest/logs/pre_tag.d.ts.map +1 -1
  515. package/dest/logs/pre_tag.js +2 -2
  516. package/dest/logs/private_log.d.ts +8 -13
  517. package/dest/logs/private_log.d.ts.map +1 -1
  518. package/dest/logs/private_log.js +9 -4
  519. package/dest/logs/public_log.d.ts +4 -3
  520. package/dest/logs/public_log.d.ts.map +1 -1
  521. package/dest/logs/public_log.js +5 -2
  522. package/dest/logs/query_all_logs_by_tags.d.ts +24 -0
  523. package/dest/logs/query_all_logs_by_tags.d.ts.map +1 -0
  524. package/dest/logs/query_all_logs_by_tags.js +64 -0
  525. package/dest/logs/shared_secret_derivation.d.ts +11 -10
  526. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  527. package/dest/logs/shared_secret_derivation.js +15 -9
  528. package/dest/logs/siloed_tag.d.ts +12 -9
  529. package/dest/logs/siloed_tag.d.ts.map +1 -1
  530. package/dest/logs/siloed_tag.js +18 -6
  531. package/dest/logs/tag.d.ts +5 -6
  532. package/dest/logs/tag.d.ts.map +1 -1
  533. package/dest/logs/tag.js +5 -1
  534. package/dest/logs/tagging_index_range.d.ts +22 -0
  535. package/dest/logs/tagging_index_range.d.ts.map +1 -0
  536. package/dest/logs/tagging_index_range.js +8 -0
  537. package/dest/messaging/append_l1_to_l2_messages.d.ts +9 -0
  538. package/dest/messaging/append_l1_to_l2_messages.d.ts.map +1 -0
  539. package/dest/messaging/append_l1_to_l2_messages.js +12 -0
  540. package/dest/messaging/in_hash.d.ts +4 -2
  541. package/dest/messaging/in_hash.d.ts.map +1 -1
  542. package/dest/messaging/in_hash.js +3 -1
  543. package/dest/messaging/inbox_leaf.d.ts +3 -1
  544. package/dest/messaging/inbox_leaf.d.ts.map +1 -1
  545. package/dest/messaging/index.d.ts +2 -1
  546. package/dest/messaging/index.d.ts.map +1 -1
  547. package/dest/messaging/index.js +1 -0
  548. package/dest/messaging/l1_actor.d.ts +7 -1
  549. package/dest/messaging/l1_actor.d.ts.map +1 -1
  550. package/dest/messaging/l1_to_l2_message.d.ts +8 -2
  551. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  552. package/dest/messaging/l1_to_l2_message.js +11 -13
  553. package/dest/messaging/l1_to_l2_message_source.d.ts +4 -2
  554. package/dest/messaging/l1_to_l2_message_source.d.ts.map +1 -1
  555. package/dest/messaging/l2_actor.d.ts +7 -1
  556. package/dest/messaging/l2_actor.d.ts.map +1 -1
  557. package/dest/messaging/l2_to_l1_membership.d.ts +145 -7
  558. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  559. package/dest/messaging/l2_to_l1_membership.js +253 -47
  560. package/dest/messaging/l2_to_l1_message.d.ts +38 -112
  561. package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
  562. package/dest/messaging/l2_to_l1_message.js +21 -12
  563. package/dest/messaging/out_hash.d.ts +41 -3
  564. package/dest/messaging/out_hash.d.ts.map +1 -1
  565. package/dest/messaging/out_hash.js +54 -19
  566. package/dest/noir/index.d.ts +5 -3
  567. package/dest/noir/index.d.ts.map +1 -1
  568. package/dest/note/index.d.ts +1 -2
  569. package/dest/note/index.d.ts.map +1 -1
  570. package/dest/note/index.js +0 -1
  571. package/dest/note/note.d.ts +2 -2
  572. package/dest/note/note.d.ts.map +1 -1
  573. package/dest/note/note_dao.d.ts +36 -5
  574. package/dest/note/note_dao.d.ts.map +1 -1
  575. package/dest/note/note_dao.js +14 -14
  576. package/dest/p2p/attestation_utils.d.ts +13 -3
  577. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  578. package/dest/p2p/attestation_utils.js +46 -1
  579. package/dest/p2p/block_proposal.d.ts +126 -30
  580. package/dest/p2p/block_proposal.d.ts.map +1 -1
  581. package/dest/p2p/block_proposal.js +168 -51
  582. package/dest/p2p/checkpoint_attestation.d.ts +88 -0
  583. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -0
  584. package/dest/p2p/checkpoint_attestation.js +103 -0
  585. package/dest/p2p/checkpoint_proposal.d.ts +193 -0
  586. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -0
  587. package/dest/p2p/checkpoint_proposal.js +241 -0
  588. package/dest/p2p/client_type.d.ts +2 -5
  589. package/dest/p2p/client_type.d.ts.map +1 -1
  590. package/dest/p2p/client_type.js +0 -7
  591. package/dest/p2p/consensus_payload.d.ts +40 -25
  592. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  593. package/dest/p2p/consensus_payload.js +49 -25
  594. package/dest/p2p/constants.d.ts +5 -0
  595. package/dest/p2p/constants.d.ts.map +1 -0
  596. package/dest/p2p/constants.js +3 -0
  597. package/dest/p2p/gossipable.d.ts +7 -6
  598. package/dest/p2p/gossipable.d.ts.map +1 -1
  599. package/dest/p2p/gossipable.js +16 -5
  600. package/dest/p2p/index.d.ts +5 -3
  601. package/dest/p2p/index.d.ts.map +1 -1
  602. package/dest/p2p/index.js +4 -2
  603. package/dest/p2p/message_validator.d.ts +18 -3
  604. package/dest/p2p/message_validator.d.ts.map +1 -1
  605. package/dest/p2p/message_validator.js +2 -1
  606. package/dest/p2p/peer_error.d.ts +3 -1
  607. package/dest/p2p/peer_error.d.ts.map +1 -1
  608. package/dest/p2p/peer_error.js +5 -0
  609. package/dest/p2p/signature_utils.d.ts +28 -17
  610. package/dest/p2p/signature_utils.d.ts.map +1 -1
  611. package/dest/p2p/signature_utils.js +118 -19
  612. package/dest/p2p/signed_txs.d.ts +44 -0
  613. package/dest/p2p/signed_txs.d.ts.map +1 -0
  614. package/dest/p2p/signed_txs.js +77 -0
  615. package/dest/p2p/topic_type.d.ts +5 -5
  616. package/dest/p2p/topic_type.d.ts.map +1 -1
  617. package/dest/p2p/topic_type.js +9 -19
  618. package/dest/parity/parity_base_private_inputs.d.ts +10 -4
  619. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
  620. package/dest/parity/parity_base_private_inputs.js +7 -5
  621. package/dest/parity/parity_public_inputs.d.ts +11 -4
  622. package/dest/parity/parity_public_inputs.d.ts.map +1 -1
  623. package/dest/parity/parity_public_inputs.js +6 -3
  624. package/dest/parity/parity_root_private_inputs.d.ts +3 -2
  625. package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
  626. package/dest/proofs/chonk_proof.d.ts +57 -7
  627. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  628. package/dest/proofs/chonk_proof.js +121 -19
  629. package/dest/proofs/proof.d.ts +4 -1
  630. package/dest/proofs/proof.d.ts.map +1 -1
  631. package/dest/proofs/recursive_proof.d.ts +11 -2
  632. package/dest/proofs/recursive_proof.d.ts.map +1 -1
  633. package/dest/rollup/base_rollup_hints.d.ts +34 -1
  634. package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
  635. package/dest/rollup/block_constant_data.d.ts +12 -1
  636. package/dest/rollup/block_constant_data.d.ts.map +1 -1
  637. package/dest/rollup/block_headers_hash.d.ts +1 -1
  638. package/dest/rollup/block_headers_hash.d.ts.map +1 -1
  639. package/dest/rollup/block_headers_hash.js +9 -3
  640. package/dest/rollup/block_merge_rollup_private_inputs.d.ts +5 -2
  641. package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
  642. package/dest/rollup/block_rollup_public_inputs.d.ts +58 -12
  643. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
  644. package/dest/rollup/block_rollup_public_inputs.js +20 -12
  645. package/dest/rollup/block_root_rollup_private_inputs.d.ts +69 -6
  646. package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
  647. package/dest/rollup/checkpoint_constant_data.d.ts +10 -1
  648. package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
  649. package/dest/rollup/checkpoint_constant_data.js +3 -1
  650. package/dest/rollup/checkpoint_header.d.ts +43 -13
  651. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  652. package/dest/rollup/checkpoint_header.js +50 -20
  653. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +5 -2
  654. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
  655. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +54 -7
  656. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  657. package/dest/rollup/checkpoint_rollup_public_inputs.js +20 -3
  658. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +48 -7
  659. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  660. package/dest/rollup/checkpoint_root_rollup_private_inputs.js +13 -2
  661. package/dest/rollup/epoch_constant_data.d.ts +16 -1
  662. package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
  663. package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts +2 -2
  664. package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts.map +1 -1
  665. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +2 -2
  666. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -1
  667. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts +2 -2
  668. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -1
  669. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +2 -2
  670. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
  671. package/dest/rollup/root_rollup_private_inputs.d.ts +7 -2
  672. package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
  673. package/dest/rollup/root_rollup_public_inputs.d.ts +22 -7
  674. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  675. package/dest/rollup/root_rollup_public_inputs.js +10 -4
  676. package/dest/rollup/tree_snapshot_diff_hints.d.ts +24 -1
  677. package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
  678. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +5 -2
  679. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
  680. package/dest/rollup/tx_rollup_public_inputs.d.ts +30 -2
  681. package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
  682. package/dest/schemas/schemas.d.ts +33 -79
  683. package/dest/schemas/schemas.d.ts.map +1 -1
  684. package/dest/schemas/schemas.js +2 -2
  685. package/dest/slashing/helpers.d.ts +2 -2
  686. package/dest/slashing/helpers.d.ts.map +1 -1
  687. package/dest/slashing/helpers.js +16 -7
  688. package/dest/slashing/index.d.ts +2 -3
  689. package/dest/slashing/index.d.ts.map +1 -1
  690. package/dest/slashing/index.js +1 -2
  691. package/dest/slashing/serialization.d.ts +2 -6
  692. package/dest/slashing/serialization.d.ts.map +1 -1
  693. package/dest/slashing/serialization.js +0 -60
  694. package/dest/slashing/types.d.ts +21 -111
  695. package/dest/slashing/types.d.ts.map +1 -1
  696. package/dest/slashing/types.js +28 -24
  697. package/dest/slashing/{tally.d.ts → votes.d.ts} +8 -2
  698. package/dest/slashing/votes.d.ts.map +1 -0
  699. package/dest/slashing/{tally.js → votes.js} +35 -3
  700. package/dest/snapshots/types.d.ts +15 -78
  701. package/dest/snapshots/types.d.ts.map +1 -1
  702. package/dest/stats/stats.d.ts +2 -4
  703. package/dest/stats/stats.d.ts.map +1 -1
  704. package/dest/tests/factories.d.ts +50 -26
  705. package/dest/tests/factories.d.ts.map +1 -1
  706. package/dest/tests/factories.js +156 -93
  707. package/dest/tests/jest.js +1 -1
  708. package/dest/tests/mocks.d.ts +84 -21
  709. package/dest/tests/mocks.d.ts.map +1 -1
  710. package/dest/tests/mocks.js +153 -89
  711. package/dest/timetable/index.d.ts +87 -0
  712. package/dest/timetable/index.d.ts.map +1 -0
  713. package/dest/timetable/index.js +243 -0
  714. package/dest/trees/append_only_tree_snapshot.d.ts +21 -14
  715. package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
  716. package/dest/trees/append_only_tree_snapshot.js +9 -4
  717. package/dest/trees/nullifier_leaf.d.ts +31 -42
  718. package/dest/trees/nullifier_leaf.d.ts.map +1 -1
  719. package/dest/trees/nullifier_leaf.js +3 -0
  720. package/dest/trees/nullifier_membership_witness.d.ts +25 -59
  721. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  722. package/dest/trees/nullifier_membership_witness.js +2 -14
  723. package/dest/trees/public_data_leaf.d.ts +37 -53
  724. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  725. package/dest/trees/public_data_leaf.js +7 -6
  726. package/dest/trees/public_data_witness.d.ts +26 -58
  727. package/dest/trees/public_data_witness.d.ts.map +1 -1
  728. package/dest/tx/block_header.d.ts +19 -4
  729. package/dest/tx/block_header.d.ts.map +1 -1
  730. package/dest/tx/block_header.js +19 -6
  731. package/dest/tx/call_context.d.ts +16 -14
  732. package/dest/tx/call_context.d.ts.map +1 -1
  733. package/dest/tx/call_context.js +3 -1
  734. package/dest/tx/capsule.d.ts +10 -3
  735. package/dest/tx/capsule.d.ts.map +1 -1
  736. package/dest/tx/capsule.js +9 -3
  737. package/dest/tx/execution_payload.d.ts +9 -1
  738. package/dest/tx/execution_payload.d.ts.map +1 -1
  739. package/dest/tx/fee_provider.d.ts +10 -0
  740. package/dest/tx/fee_provider.d.ts.map +1 -0
  741. package/dest/tx/fee_provider.js +1 -0
  742. package/dest/tx/function_data.d.ts +7 -11
  743. package/dest/tx/function_data.d.ts.map +1 -1
  744. package/dest/tx/global_variable_builder.d.ts +3 -4
  745. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  746. package/dest/tx/global_variables.d.ts +27 -52
  747. package/dest/tx/global_variables.d.ts.map +1 -1
  748. package/dest/tx/global_variables.js +11 -13
  749. package/dest/tx/hashed_values.d.ts +10 -3
  750. package/dest/tx/hashed_values.d.ts.map +1 -1
  751. package/dest/tx/hashed_values.js +6 -3
  752. package/dest/tx/in_tx.d.ts +6 -18
  753. package/dest/tx/in_tx.d.ts.map +1 -1
  754. package/dest/tx/index.d.ts +2 -2
  755. package/dest/tx/index.d.ts.map +1 -1
  756. package/dest/tx/index.js +1 -1
  757. package/dest/tx/indexed_tx_effect.d.ts +6 -20
  758. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  759. package/dest/tx/indexed_tx_effect.js +2 -2
  760. package/dest/tx/partial_state_reference.d.ts +25 -65
  761. package/dest/tx/partial_state_reference.d.ts.map +1 -1
  762. package/dest/tx/partial_state_reference.js +6 -3
  763. package/dest/tx/private_execution_result.d.ts +32 -25
  764. package/dest/tx/private_execution_result.d.ts.map +1 -1
  765. package/dest/tx/private_execution_result.js +8 -25
  766. package/dest/tx/private_tx_constant_data.d.ts +16 -1
  767. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  768. package/dest/tx/profiling.d.ts +115 -278
  769. package/dest/tx/profiling.d.ts.map +1 -1
  770. package/dest/tx/profiling.js +59 -12
  771. package/dest/tx/protocol_contracts.d.ts +5 -9
  772. package/dest/tx/protocol_contracts.d.ts.map +1 -1
  773. package/dest/tx/protocol_contracts.js +2 -2
  774. package/dest/tx/proven_tx.d.ts +30 -74
  775. package/dest/tx/proven_tx.d.ts.map +1 -1
  776. package/dest/tx/proven_tx.js +6 -0
  777. package/dest/tx/public_call_request_with_calldata.d.ts +10 -3
  778. package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
  779. package/dest/tx/public_call_request_with_calldata.js +9 -4
  780. package/dest/tx/public_simulation_output.d.ts +4 -2
  781. package/dest/tx/public_simulation_output.d.ts.map +1 -1
  782. package/dest/tx/public_simulation_output.js +7 -3
  783. package/dest/tx/simulated_tx.d.ts +68 -1144
  784. package/dest/tx/simulated_tx.d.ts.map +1 -1
  785. package/dest/tx/simulated_tx.js +17 -12
  786. package/dest/tx/state_reference.d.ts +32 -117
  787. package/dest/tx/state_reference.d.ts.map +1 -1
  788. package/dest/tx/state_reference.js +9 -5
  789. package/dest/tx/tree_snapshots.d.ts +27 -84
  790. package/dest/tx/tree_snapshots.d.ts.map +1 -1
  791. package/dest/tx/tree_snapshots.js +9 -5
  792. package/dest/tx/tx.d.ts +44 -19
  793. package/dest/tx/tx.d.ts.map +1 -1
  794. package/dest/tx/tx.js +58 -35
  795. package/dest/tx/tx_constant_data.d.ts +4 -3
  796. package/dest/tx/tx_constant_data.d.ts.map +1 -1
  797. package/dest/tx/tx_constant_data.js +6 -3
  798. package/dest/tx/tx_context.d.ts +33 -131
  799. package/dest/tx/tx_context.d.ts.map +1 -1
  800. package/dest/tx/tx_context.js +6 -6
  801. package/dest/tx/tx_effect.d.ts +32 -6
  802. package/dest/tx/tx_effect.d.ts.map +1 -1
  803. package/dest/tx/tx_effect.js +6 -9
  804. package/dest/tx/tx_execution_request.d.ts +30 -1
  805. package/dest/tx/tx_execution_request.d.ts.map +1 -1
  806. package/dest/tx/tx_execution_request.js +6 -2
  807. package/dest/tx/tx_hash.d.ts +7 -4
  808. package/dest/tx/tx_hash.d.ts.map +1 -1
  809. package/dest/tx/tx_hash.js +13 -5
  810. package/dest/tx/tx_receipt.d.ts +69 -18
  811. package/dest/tx/tx_receipt.d.ts.map +1 -1
  812. package/dest/tx/tx_receipt.js +58 -29
  813. package/dest/tx/tx_request.d.ts +6 -1
  814. package/dest/tx/tx_request.d.ts.map +1 -1
  815. package/dest/tx/tx_request.js +2 -2
  816. package/dest/tx/validator/empty_validator.d.ts +2 -2
  817. package/dest/tx/validator/empty_validator.d.ts.map +1 -1
  818. package/dest/tx/validator/error_texts.d.ts +11 -2
  819. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  820. package/dest/tx/validator/error_texts.js +13 -1
  821. package/dest/tx/validator/tx_validator.d.ts +6 -28
  822. package/dest/tx/validator/tx_validator.d.ts.map +1 -1
  823. package/dest/tx/validator/tx_validator.js +0 -4
  824. package/dest/types/shared.d.ts +7 -12
  825. package/dest/types/shared.d.ts.map +1 -1
  826. package/dest/types/shared.js +6 -12
  827. package/dest/update-checker/dev_version.d.ts +3 -0
  828. package/dest/update-checker/dev_version.d.ts.map +1 -0
  829. package/dest/update-checker/dev_version.js +1 -0
  830. package/dest/update-checker/index.d.ts +4 -2
  831. package/dest/update-checker/index.d.ts.map +1 -1
  832. package/dest/update-checker/index.js +3 -1
  833. package/dest/update-checker/package_version.d.ts +6 -0
  834. package/dest/update-checker/package_version.d.ts.map +1 -0
  835. package/dest/update-checker/package_version.js +13 -0
  836. package/dest/update-checker/version_checker.d.ts +25 -0
  837. package/dest/update-checker/version_checker.d.ts.map +1 -0
  838. package/dest/update-checker/version_checker.js +50 -0
  839. package/dest/validators/errors.d.ts +6 -1
  840. package/dest/validators/errors.d.ts.map +1 -1
  841. package/dest/validators/errors.js +7 -0
  842. package/dest/validators/schemas.d.ts +147 -614
  843. package/dest/validators/schemas.d.ts.map +1 -1
  844. package/dest/validators/schemas.js +9 -6
  845. package/dest/validators/types.d.ts +21 -4
  846. package/dest/validators/types.d.ts.map +1 -1
  847. package/dest/versioning/versioning.d.ts +4 -2
  848. package/dest/versioning/versioning.d.ts.map +1 -1
  849. package/dest/versioning/versioning.js +5 -2
  850. package/dest/vks/verification_key.d.ts +4 -118
  851. package/dest/vks/verification_key.d.ts.map +1 -1
  852. package/dest/vks/verification_key.js +5 -126
  853. package/dest/vks/vk_data.d.ts +7 -1
  854. package/dest/vks/vk_data.d.ts.map +1 -1
  855. package/dest/world-state/genesis_data.d.ts +13 -0
  856. package/dest/world-state/genesis_data.d.ts.map +1 -0
  857. package/dest/world-state/genesis_data.js +7 -0
  858. package/dest/world-state/index.d.ts +2 -1
  859. package/dest/world-state/index.d.ts.map +1 -1
  860. package/dest/world-state/index.js +1 -0
  861. package/dest/world-state/world_state_revision.d.ts +15 -26
  862. package/dest/world-state/world_state_revision.d.ts.map +1 -1
  863. package/dest/world-state/world_state_revision.js +7 -1
  864. package/dest/zkpassport/index.d.ts +3 -4
  865. package/dest/zkpassport/index.d.ts.map +1 -1
  866. package/dest/zkpassport/index.js +9 -9
  867. package/package.json +32 -16
  868. package/src/abi/abi.ts +78 -21
  869. package/src/abi/authorization_selector.ts +2 -8
  870. package/src/abi/buffer.ts +25 -4
  871. package/src/abi/contract_artifact.ts +21 -16
  872. package/src/abi/decoder.ts +36 -82
  873. package/src/abi/encoder.ts +85 -6
  874. package/src/abi/event_metadata_definition.ts +2 -0
  875. package/src/abi/event_selector.ts +2 -8
  876. package/src/abi/function_call.ts +25 -3
  877. package/src/abi/function_selector.ts +4 -13
  878. package/src/abi/function_signature_decoder.ts +77 -0
  879. package/src/abi/index.ts +1 -0
  880. package/src/abi/note_selector.ts +3 -12
  881. package/src/abi/selector.ts +1 -1
  882. package/src/abi/utils.ts +44 -0
  883. package/src/auth_witness/auth_witness.ts +3 -3
  884. package/src/avm/avm.ts +5 -0
  885. package/src/avm/message_pack.ts +12 -3
  886. package/src/avm/revert_code.ts +20 -25
  887. package/src/aztec-address/index.ts +15 -12
  888. package/src/block/attestation_info.ts +13 -10
  889. package/src/block/block_data.ts +25 -0
  890. package/src/block/block_hash.ts +32 -24
  891. package/src/block/block_parameter.ts +74 -4
  892. package/src/block/body.ts +2 -1
  893. package/src/block/in_block.ts +6 -6
  894. package/src/block/index.ts +1 -3
  895. package/src/block/l2_block.ts +112 -147
  896. package/src/block/l2_block_info.ts +8 -6
  897. package/src/block/l2_block_source.ts +265 -105
  898. package/src/block/l2_block_stream/index.ts +1 -0
  899. package/src/block/l2_block_stream/interfaces.ts +21 -6
  900. package/src/block/l2_block_stream/l2_block_stream.ts +169 -46
  901. package/src/block/l2_block_stream/l2_tips_memory_store.ts +67 -56
  902. package/src/block/l2_block_stream/l2_tips_store_base.ts +260 -0
  903. package/src/block/proposal/attestations_and_signers.ts +32 -17
  904. package/src/block/test/l2_tips_store_test_suite.ts +489 -38
  905. package/src/block/validate_block_result.ts +40 -35
  906. package/src/checkpoint/checkpoint.ts +83 -23
  907. package/src/checkpoint/checkpoint_data.ts +91 -0
  908. package/src/checkpoint/checkpoint_info.ts +45 -2
  909. package/src/checkpoint/checkpoint_reexecution_tracker.ts +167 -0
  910. package/src/checkpoint/digest.ts +28 -0
  911. package/src/checkpoint/index.ts +6 -0
  912. package/src/checkpoint/previous_checkpoint_out_hashes.ts +61 -0
  913. package/src/checkpoint/published_checkpoint.ts +7 -4
  914. package/src/checkpoint/validate.ts +230 -0
  915. package/src/config/chain-config.ts +13 -16
  916. package/src/config/index.ts +2 -0
  917. package/src/config/node-rpc-config.ts +1 -1
  918. package/src/config/pipelining-config.ts +31 -0
  919. package/src/config/sequencer-config.ts +65 -0
  920. package/src/contract/complete_address.ts +7 -3
  921. package/src/contract/contract_address.ts +10 -10
  922. package/src/contract/contract_class.ts +3 -3
  923. package/src/contract/contract_class_id.ts +7 -6
  924. package/src/contract/contract_instance.ts +11 -2
  925. package/src/contract/index.ts +0 -4
  926. package/src/contract/interfaces/contract_class.ts +2 -82
  927. package/src/contract/interfaces/contract_instance.ts +6 -2
  928. package/src/contract/interfaces/node-info.ts +3 -0
  929. package/src/contract/private_function.ts +6 -5
  930. package/src/database-version/database_version.ts +87 -0
  931. package/src/database-version/version_manager.ts +18 -77
  932. package/src/delayed_public_mutable/delayed_public_mutable_values.ts +9 -10
  933. package/src/deserialization/index.ts +21 -0
  934. package/src/epoch-helpers/index.ts +40 -1
  935. package/src/file-store/factory.ts +13 -4
  936. package/src/file-store/http.ts +29 -10
  937. package/src/file-store/index.ts +1 -0
  938. package/src/file-store/local.ts +15 -5
  939. package/src/file-store/s3.ts +12 -3
  940. package/src/gas/README.md +154 -0
  941. package/src/gas/fee_math.ts +120 -0
  942. package/src/gas/gas.ts +8 -3
  943. package/src/gas/gas_fees.ts +29 -10
  944. package/src/gas/gas_settings.ts +73 -15
  945. package/src/gas/index.ts +1 -0
  946. package/src/ha-signing/config.ts +152 -0
  947. package/src/ha-signing/index.ts +29 -0
  948. package/src/ha-signing/local_config.ts +46 -0
  949. package/src/ha-signing/types.ts +126 -0
  950. package/src/hash/hash.ts +76 -11
  951. package/src/hash/map_slot.ts +3 -2
  952. package/src/interfaces/allowed_element.ts +29 -9
  953. package/src/interfaces/api_limit.ts +2 -0
  954. package/src/interfaces/archiver.ts +88 -90
  955. package/src/interfaces/aztec-node-admin.ts +63 -21
  956. package/src/interfaces/aztec-node-debug.ts +40 -0
  957. package/src/interfaces/aztec-node.ts +298 -297
  958. package/src/interfaces/block-builder.ts +95 -29
  959. package/src/interfaces/block_response.ts +92 -0
  960. package/src/interfaces/chain_tips.ts +24 -0
  961. package/src/interfaces/checkpoint_parameter.ts +20 -0
  962. package/src/interfaces/checkpoint_response.ts +84 -0
  963. package/src/interfaces/client.ts +7 -1
  964. package/src/interfaces/configs.ts +78 -8
  965. package/src/interfaces/l1_publish_info.ts +40 -0
  966. package/src/interfaces/l2_logs_source.ts +13 -26
  967. package/src/interfaces/merkle_tree_operations.ts +12 -21
  968. package/src/interfaces/p2p-bootstrap.ts +2 -2
  969. package/src/interfaces/p2p.ts +41 -36
  970. package/src/interfaces/private_kernel_prover.ts +88 -0
  971. package/src/interfaces/prover-agent.ts +1 -1
  972. package/src/interfaces/prover-broker.ts +22 -0
  973. package/src/interfaces/prover-client.ts +32 -5
  974. package/src/interfaces/prover-node.ts +7 -7
  975. package/src/interfaces/proving-job-source.ts +4 -4
  976. package/src/interfaces/proving-job.ts +5 -14
  977. package/src/interfaces/public_storage_override.ts +26 -0
  978. package/src/interfaces/server.ts +5 -0
  979. package/src/interfaces/server_circuit_prover.ts +3 -2
  980. package/src/interfaces/slasher.ts +21 -10
  981. package/src/interfaces/tx_provider.ts +8 -2
  982. package/src/interfaces/validator.ts +132 -33
  983. package/src/interfaces/world_state.ts +14 -11
  984. package/src/kernel/hints/build_note_hash_read_request_hints.ts +34 -30
  985. package/src/kernel/hints/build_nullifier_read_request_hints.ts +32 -32
  986. package/src/kernel/hints/build_transient_data_hints.ts +17 -2
  987. package/src/kernel/hints/index.ts +2 -2
  988. package/src/kernel/hints/key_validation_request.ts +18 -16
  989. package/src/kernel/hints/{key_validation_request_and_generator.ts → key_validation_request_and_separator.ts} +12 -15
  990. package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +10 -10
  991. package/src/kernel/index.ts +4 -0
  992. package/src/kernel/log_hash.ts +29 -9
  993. package/src/kernel/private_circuit_public_inputs.ts +14 -14
  994. package/src/kernel/private_kernel_circuit_public_inputs.ts +2 -2
  995. package/src/kernel/private_kernel_init_2_circuit_private_inputs.ts +49 -0
  996. package/src/kernel/private_kernel_init_3_circuit_private_inputs.ts +52 -0
  997. package/src/kernel/private_kernel_inner_2_circuit_private_inputs.ts +29 -0
  998. package/src/kernel/private_kernel_inner_3_circuit_private_inputs.ts +31 -0
  999. package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -2
  1000. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +42 -18
  1001. package/src/kernel/private_to_avm_accumulated_data.ts +16 -5
  1002. package/src/kernel/private_to_public_accumulated_data.ts +9 -3
  1003. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +14 -8
  1004. package/src/kernel/private_to_rollup_accumulated_data.ts +8 -3
  1005. package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +13 -13
  1006. package/src/kernel/private_validation_requests.ts +8 -8
  1007. package/src/kernel/public_call_request.ts +22 -7
  1008. package/src/keys/derivation.ts +33 -21
  1009. package/src/keys/key_types.ts +6 -2
  1010. package/src/keys/public_key.ts +26 -2
  1011. package/src/keys/public_keys.ts +125 -111
  1012. package/src/keys/utils.ts +8 -4
  1013. package/src/kv-store/config.ts +29 -0
  1014. package/src/kv-store/index.ts +1 -0
  1015. package/src/l1-contracts/index.ts +1 -1
  1016. package/src/logs/app_tagging_secret.ts +137 -0
  1017. package/src/logs/app_tagging_secret_kind.ts +6 -0
  1018. package/src/logs/contract_class_log.ts +15 -5
  1019. package/src/logs/debug_log_store.ts +54 -0
  1020. package/src/logs/index.ts +8 -7
  1021. package/src/logs/log_cursor.ts +110 -0
  1022. package/src/logs/log_result.ts +104 -0
  1023. package/src/logs/logs_query.ts +138 -0
  1024. package/src/logs/message_context.ts +17 -7
  1025. package/src/logs/pending_tagged_log.ts +1 -3
  1026. package/src/logs/pre_tag.ts +3 -6
  1027. package/src/logs/private_log.ts +9 -3
  1028. package/src/logs/public_log.ts +4 -2
  1029. package/src/logs/query_all_logs_by_tags.ts +98 -0
  1030. package/src/logs/shared_secret_derivation.ts +21 -10
  1031. package/src/logs/siloed_tag.ts +28 -13
  1032. package/src/logs/tag.ts +9 -9
  1033. package/src/logs/tagging_index_range.ts +18 -0
  1034. package/src/messaging/append_l1_to_l2_messages.ts +21 -0
  1035. package/src/messaging/in_hash.ts +3 -1
  1036. package/src/messaging/index.ts +1 -0
  1037. package/src/messaging/l1_to_l2_message.ts +12 -9
  1038. package/src/messaging/l1_to_l2_message_source.ts +3 -1
  1039. package/src/messaging/l2_to_l1_membership.ts +324 -61
  1040. package/src/messaging/l2_to_l1_message.ts +29 -9
  1041. package/src/messaging/out_hash.ts +62 -21
  1042. package/src/noir/index.ts +4 -2
  1043. package/src/note/index.ts +0 -1
  1044. package/src/note/note_dao.ts +17 -15
  1045. package/src/p2p/attestation_utils.ts +59 -3
  1046. package/src/p2p/block_proposal.ts +303 -63
  1047. package/src/p2p/checkpoint_attestation.ts +144 -0
  1048. package/src/p2p/checkpoint_proposal.ts +428 -0
  1049. package/src/p2p/client_type.ts +0 -6
  1050. package/src/p2p/consensus_payload.ts +73 -31
  1051. package/src/p2p/constants.ts +6 -0
  1052. package/src/p2p/gossipable.ts +18 -8
  1053. package/src/p2p/index.ts +4 -2
  1054. package/src/p2p/message_validator.ts +14 -2
  1055. package/src/p2p/peer_error.ts +7 -0
  1056. package/src/p2p/signature_utils.ts +110 -23
  1057. package/src/p2p/signed_txs.ts +106 -0
  1058. package/src/p2p/topic_type.ts +10 -16
  1059. package/src/parity/parity_base_private_inputs.ts +10 -4
  1060. package/src/parity/parity_public_inputs.ts +9 -2
  1061. package/src/proofs/chonk_proof.ts +141 -17
  1062. package/src/rollup/block_headers_hash.ts +12 -3
  1063. package/src/rollup/block_rollup_public_inputs.ts +18 -11
  1064. package/src/rollup/checkpoint_header.ts +64 -21
  1065. package/src/rollup/checkpoint_rollup_public_inputs.ts +27 -5
  1066. package/src/rollup/checkpoint_root_rollup_private_inputs.ts +14 -1
  1067. package/src/rollup/root_rollup_public_inputs.ts +16 -7
  1068. package/src/schemas/schemas.ts +6 -1
  1069. package/src/slashing/helpers.ts +21 -9
  1070. package/src/slashing/index.ts +1 -2
  1071. package/src/slashing/serialization.ts +1 -81
  1072. package/src/slashing/types.ts +38 -49
  1073. package/src/slashing/{tally.ts → votes.ts} +41 -2
  1074. package/src/stats/stats.ts +4 -2
  1075. package/src/tests/factories.ts +187 -125
  1076. package/src/tests/jest.ts +1 -1
  1077. package/src/tests/mocks.ts +272 -128
  1078. package/src/timetable/index.ts +361 -0
  1079. package/src/trees/append_only_tree_snapshot.ts +8 -3
  1080. package/src/trees/nullifier_leaf.ts +4 -0
  1081. package/src/trees/nullifier_membership_witness.ts +2 -12
  1082. package/src/trees/public_data_leaf.ts +11 -5
  1083. package/src/tx/block_header.ts +26 -7
  1084. package/src/tx/capsule.ts +10 -2
  1085. package/src/tx/fee_provider.ts +10 -0
  1086. package/src/tx/global_variable_builder.ts +2 -3
  1087. package/src/tx/global_variables.ts +13 -21
  1088. package/src/tx/hashed_values.ts +8 -3
  1089. package/src/tx/index.ts +1 -1
  1090. package/src/tx/indexed_tx_effect.ts +2 -2
  1091. package/src/tx/partial_state_reference.ts +8 -3
  1092. package/src/tx/private_execution_result.ts +6 -21
  1093. package/src/tx/profiling.ts +60 -9
  1094. package/src/tx/protocol_contracts.ts +2 -2
  1095. package/src/tx/proven_tx.ts +6 -0
  1096. package/src/tx/public_call_request_with_calldata.ts +8 -3
  1097. package/src/tx/public_simulation_output.ts +4 -0
  1098. package/src/tx/simulated_tx.ts +30 -22
  1099. package/src/tx/state_reference.ts +9 -4
  1100. package/src/tx/tree_snapshots.ts +9 -4
  1101. package/src/tx/tx.ts +72 -46
  1102. package/src/tx/tx_constant_data.ts +8 -3
  1103. package/src/tx/tx_context.ts +8 -3
  1104. package/src/tx/tx_effect.ts +3 -10
  1105. package/src/tx/tx_execution_request.ts +2 -0
  1106. package/src/tx/tx_hash.ts +20 -5
  1107. package/src/tx/tx_receipt.ts +89 -29
  1108. package/src/tx/tx_request.ts +2 -2
  1109. package/src/tx/validator/empty_validator.ts +1 -1
  1110. package/src/tx/validator/error_texts.ts +16 -1
  1111. package/src/tx/validator/tx_validator.ts +2 -6
  1112. package/src/types/shared.ts +8 -13
  1113. package/src/update-checker/dev_version.ts +2 -0
  1114. package/src/update-checker/index.ts +3 -1
  1115. package/src/update-checker/package_version.ts +17 -0
  1116. package/src/update-checker/version_checker.ts +65 -0
  1117. package/src/validators/errors.ts +9 -0
  1118. package/src/validators/schemas.ts +13 -4
  1119. package/src/validators/types.ts +25 -5
  1120. package/src/versioning/versioning.ts +5 -2
  1121. package/src/vks/verification_key.ts +5 -184
  1122. package/src/world-state/genesis_data.ts +27 -0
  1123. package/src/world-state/index.ts +1 -0
  1124. package/src/world-state/world_state_revision.ts +9 -1
  1125. package/src/zkpassport/index.ts +11 -12
  1126. package/dest/abi/mocked_keys.d.ts +0 -2
  1127. package/dest/abi/mocked_keys.d.ts.map +0 -1
  1128. package/dest/abi/mocked_keys.js +0 -1
  1129. package/dest/block/checkpointed_l2_block.d.ts +0 -267
  1130. package/dest/block/checkpointed_l2_block.d.ts.map +0 -1
  1131. package/dest/block/checkpointed_l2_block.js +0 -84
  1132. package/dest/block/l2_block_code_to_purge.d.ts +0 -12
  1133. package/dest/block/l2_block_code_to_purge.d.ts.map +0 -1
  1134. package/dest/block/l2_block_code_to_purge.js +0 -61
  1135. package/dest/block/l2_block_header.d.ts +0 -98
  1136. package/dest/block/l2_block_header.d.ts.map +0 -1
  1137. package/dest/block/l2_block_header.js +0 -153
  1138. package/dest/block/l2_block_new.d.ts +0 -135
  1139. package/dest/block/l2_block_new.d.ts.map +0 -1
  1140. package/dest/block/l2_block_new.js +0 -152
  1141. package/dest/contract/contract_class_metadata.d.ts +0 -8
  1142. package/dest/contract/contract_class_metadata.d.ts.map +0 -1
  1143. package/dest/contract/contract_class_metadata.js +0 -1
  1144. package/dest/contract/contract_metadata.d.ts +0 -7
  1145. package/dest/contract/contract_metadata.d.ts.map +0 -1
  1146. package/dest/contract/contract_metadata.js +0 -1
  1147. package/dest/contract/private_function_membership_proof.d.ts +0 -32
  1148. package/dest/contract/private_function_membership_proof.d.ts.map +0 -1
  1149. package/dest/contract/private_function_membership_proof.js +0 -124
  1150. package/dest/contract/utility_function_membership_proof.d.ts +0 -27
  1151. package/dest/contract/utility_function_membership_proof.d.ts.map +0 -1
  1152. package/dest/contract/utility_function_membership_proof.js +0 -87
  1153. package/dest/database-version/index.d.ts +0 -2
  1154. package/dest/database-version/index.d.ts.map +0 -1
  1155. package/dest/database-version/index.js +0 -1
  1156. package/dest/interfaces/get_logs_response.d.ts +0 -90
  1157. package/dest/interfaces/get_logs_response.d.ts.map +0 -1
  1158. package/dest/interfaces/get_logs_response.js +0 -12
  1159. package/dest/kernel/hints/key_validation_request_and_generator.d.ts +0 -25
  1160. package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +0 -1
  1161. package/dest/l1-contracts/slash_factory.d.ts +0 -45
  1162. package/dest/l1-contracts/slash_factory.d.ts.map +0 -1
  1163. package/dest/l1-contracts/slash_factory.js +0 -157
  1164. package/dest/logs/directional_app_tagging_secret.d.ts +0 -40
  1165. package/dest/logs/directional_app_tagging_secret.d.ts.map +0 -1
  1166. package/dest/logs/directional_app_tagging_secret.js +0 -64
  1167. package/dest/logs/extended_contract_class_log.d.ts +0 -49
  1168. package/dest/logs/extended_contract_class_log.d.ts.map +0 -1
  1169. package/dest/logs/extended_contract_class_log.js +0 -67
  1170. package/dest/logs/extended_public_log.d.ts +0 -98
  1171. package/dest/logs/extended_public_log.d.ts.map +0 -1
  1172. package/dest/logs/extended_public_log.js +0 -73
  1173. package/dest/logs/log_filter.d.ts +0 -22
  1174. package/dest/logs/log_filter.d.ts.map +0 -1
  1175. package/dest/logs/log_filter.js +0 -11
  1176. package/dest/logs/log_id.d.ts +0 -78
  1177. package/dest/logs/log_id.d.ts.map +0 -1
  1178. package/dest/logs/log_id.js +0 -91
  1179. package/dest/logs/log_with_tx_data.d.ts +0 -19
  1180. package/dest/logs/log_with_tx_data.d.ts.map +0 -1
  1181. package/dest/logs/log_with_tx_data.js +0 -49
  1182. package/dest/logs/tx_scoped_l2_log.d.ts +0 -70
  1183. package/dest/logs/tx_scoped_l2_log.d.ts.map +0 -1
  1184. package/dest/logs/tx_scoped_l2_log.js +0 -91
  1185. package/dest/note/notes_filter.d.ts +0 -27
  1186. package/dest/note/notes_filter.d.ts.map +0 -1
  1187. package/dest/note/notes_filter.js +0 -11
  1188. package/dest/p2p/block_attestation.d.ts +0 -80
  1189. package/dest/p2p/block_attestation.d.ts.map +0 -1
  1190. package/dest/p2p/block_attestation.js +0 -101
  1191. package/dest/slashing/empire.d.ts +0 -31
  1192. package/dest/slashing/empire.d.ts.map +0 -1
  1193. package/dest/slashing/empire.js +0 -85
  1194. package/dest/slashing/tally.d.ts.map +0 -1
  1195. package/dest/tx/content_commitment.d.ts +0 -49
  1196. package/dest/tx/content_commitment.d.ts.map +0 -1
  1197. package/dest/tx/content_commitment.js +0 -90
  1198. package/dest/update-checker/update-checker.d.ts +0 -49
  1199. package/dest/update-checker/update-checker.d.ts.map +0 -1
  1200. package/dest/update-checker/update-checker.js +0 -130
  1201. package/src/abi/mocked_keys.ts +0 -2
  1202. package/src/block/checkpointed_l2_block.ts +0 -120
  1203. package/src/block/l2_block_code_to_purge.ts +0 -88
  1204. package/src/block/l2_block_header.ts +0 -246
  1205. package/src/block/l2_block_new.ts +0 -207
  1206. package/src/contract/contract_class_metadata.ts +0 -8
  1207. package/src/contract/contract_metadata.ts +0 -7
  1208. package/src/contract/private_function_membership_proof.ts +0 -167
  1209. package/src/contract/utility_function_membership_proof.ts +0 -118
  1210. package/src/database-version/index.ts +0 -1
  1211. package/src/interfaces/get_logs_response.ts +0 -35
  1212. package/src/l1-contracts/slash_factory.ts +0 -179
  1213. package/src/logs/directional_app_tagging_secret.ts +0 -79
  1214. package/src/logs/extended_contract_class_log.ts +0 -87
  1215. package/src/logs/extended_public_log.ts +0 -94
  1216. package/src/logs/log_filter.ts +0 -31
  1217. package/src/logs/log_id.ts +0 -121
  1218. package/src/logs/log_with_tx_data.ts +0 -46
  1219. package/src/logs/tx_scoped_l2_log.ts +0 -114
  1220. package/src/note/notes_filter.ts +0 -38
  1221. package/src/p2p/block_attestation.ts +0 -137
  1222. package/src/slashing/empire.ts +0 -102
  1223. package/src/tx/content_commitment.ts +0 -113
  1224. package/src/update-checker/update-checker.ts +0 -166
package/src/tx/index.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  export * from './block_header.js';
2
2
  export * from './call_context.js';
3
3
  export * from './global_variables.js';
4
- export * from './content_commitment.js';
5
4
  export * from './state_reference.js';
6
5
  export * from './partial_state_reference.js';
7
6
  export * from './function_data.js';
@@ -25,6 +24,7 @@ export * from './validator/tx_validator.js';
25
24
  export * from './validator/empty_validator.js';
26
25
  export * from './validator/error_texts.js';
27
26
  export * from './capsule.js';
27
+ export * from './fee_provider.js';
28
28
  export * from './global_variable_builder.js';
29
29
  export * from './hashed_values.js';
30
30
  export * from './indexed_tx_effect.js';
@@ -2,7 +2,7 @@ import { BlockNumber } from '@aztec/foundation/branded-types';
2
2
  import { schemas } from '@aztec/foundation/schemas';
3
3
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
4
 
5
- import { L2BlockHash } from '../block/block_hash.js';
5
+ import { BlockHash } from '../block/block_hash.js';
6
6
  import { type DataInBlock, dataInBlockSchemaFor, randomDataInBlock } from '../block/in_block.js';
7
7
  import { TxEffect } from './tx_effect.js';
8
8
 
@@ -26,7 +26,7 @@ export function serializeIndexedTxEffect(effect: IndexedTxEffect): Buffer {
26
26
  export function deserializeIndexedTxEffect(buffer: Buffer): IndexedTxEffect {
27
27
  const reader = BufferReader.asReader(buffer);
28
28
 
29
- const l2BlockHash = reader.readObject(L2BlockHash);
29
+ const l2BlockHash = BlockHash.fromBuffer(reader);
30
30
  const l2BlockNumber = BlockNumber(reader.readNumber());
31
31
  const txIndexInBlock = reader.readNumber();
32
32
  const data = reader.readObject(TxEffect);
@@ -1,6 +1,6 @@
1
1
  import { PARTIAL_STATE_REFERENCE_LENGTH } from '@aztec/constants';
2
2
  import type { Fr } from '@aztec/foundation/curves/bn254';
3
- import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
+ import { BufferReader, BufferSink, FieldReader, serializeToSink } from '@aztec/foundation/serialize';
4
4
  import type { FieldsOf } from '@aztec/foundation/types';
5
5
 
6
6
  import { z } from 'zod';
@@ -88,8 +88,13 @@ export class PartialStateReference {
88
88
  );
89
89
  }
90
90
 
91
- toBuffer() {
92
- return serializeToBuffer(this.noteHashTree, this.nullifierTree, this.publicDataTree);
91
+ toBuffer(): Buffer;
92
+ toBuffer(sink: BufferSink): void;
93
+ toBuffer(sink?: BufferSink): Buffer | void {
94
+ if (!sink) {
95
+ return BufferSink.serialize(this);
96
+ }
97
+ serializeToSink(sink, this.noteHashTree, this.nullifierTree, this.publicDataTree);
93
98
  }
94
99
 
95
100
  toFields() {
@@ -11,7 +11,7 @@ import { PrivateCircuitPublicInputs } from '../kernel/private_circuit_public_inp
11
11
  import type { IsEmpty } from '../kernel/utils/interfaces.js';
12
12
  import { sortByCounter } from '../kernel/utils/order_and_comparison.js';
13
13
  import { ContractClassLog, ContractClassLogFields } from '../logs/contract_class_log.js';
14
- import { type PreTag, PreTagSchema } from '../logs/pre_tag.js';
14
+ import { type TaggingIndexRange, TaggingIndexRangeSchema } from '../logs/tagging_index_range.js';
15
15
  import { Note } from '../note/note.js';
16
16
  import { type ZodFor, mapSchema, schemas } from '../schemas/index.js';
17
17
  import { HashedValues } from './hashed_values.js';
@@ -79,7 +79,7 @@ export class CountedContractClassLog implements IsEmpty {
79
79
  export class PrivateExecutionResult {
80
80
  constructor(
81
81
  public entrypoint: PrivateCallExecutionResult,
82
- /** The first non revertible nullifier, or zero if there was none. */
82
+ /** The first non-revertible nullifier emitted by any private call, or the protocol nullifier if there was none. */
83
83
  public firstNullifier: Fr,
84
84
  /** An array of calldata for the enqueued public function calls and the teardown function call. */
85
85
  public publicFunctionCalldata: HashedValues[],
@@ -129,8 +129,6 @@ export class PrivateCallExecutionResult {
129
129
  // Needed for the verifier (kernel)
130
130
  /** The call stack item. */
131
131
  public publicInputs: PrivateCircuitPublicInputs,
132
- /** Mapping of note hash to its index in the note hash tree. Used for building hints for note hash read requests. */
133
- public noteHashLeafIndexMap: Map<bigint, bigint>,
134
132
  /** The notes created in the executed function. */
135
133
  public newNotes: NoteAndSlot[],
136
134
  /** Mapping of note hash counter to the counter of its nullifier. */
@@ -139,8 +137,8 @@ export class PrivateCallExecutionResult {
139
137
  public returnValues: Fr[],
140
138
  /** The offchain effects emitted during execution of this function call via the `emit_offchain_effect` oracle. */
141
139
  public offchainEffects: { data: Fr[] }[],
142
- /** The pre-tags used in this tx to compute tags for private logs */
143
- public preTags: PreTag[],
140
+ /** The tagging index ranges used in this tx to compute tags for private logs */
141
+ public taggingIndexRanges: TaggingIndexRange[],
144
142
  /** The nested executions. */
145
143
  public nestedExecutionResults: PrivateCallExecutionResult[],
146
144
  /**
@@ -159,12 +157,11 @@ export class PrivateCallExecutionResult {
159
157
  vk: schemas.Buffer,
160
158
  partialWitness: mapSchema(z.coerce.number(), z.string()),
161
159
  publicInputs: PrivateCircuitPublicInputs.schema,
162
- noteHashLeafIndexMap: mapSchema(schemas.BigInt, schemas.BigInt),
163
160
  newNotes: z.array(NoteAndSlot.schema),
164
161
  noteHashNullifierCounterMap: mapSchema(z.coerce.number(), z.number()),
165
162
  returnValues: z.array(schemas.Fr),
166
163
  offchainEffects: z.array(z.object({ data: z.array(schemas.Fr) })),
167
- preTags: z.array(PreTagSchema),
164
+ taggingIndexRanges: z.array(TaggingIndexRangeSchema),
168
165
  nestedExecutionResults: z.array(z.lazy(() => PrivateCallExecutionResult.schema)),
169
166
  contractClassLogs: z.array(CountedContractClassLog.schema),
170
167
  })
@@ -177,12 +174,11 @@ export class PrivateCallExecutionResult {
177
174
  fields.vk,
178
175
  fields.partialWitness,
179
176
  fields.publicInputs,
180
- fields.noteHashLeafIndexMap,
181
177
  fields.newNotes,
182
178
  fields.noteHashNullifierCounterMap,
183
179
  fields.returnValues,
184
180
  fields.offchainEffects,
185
- fields.preTags,
181
+ fields.taggingIndexRanges,
186
182
  fields.nestedExecutionResults,
187
183
  fields.contractClassLogs,
188
184
  );
@@ -194,7 +190,6 @@ export class PrivateCallExecutionResult {
194
190
  randomBytes(4),
195
191
  new Map([[1, 'one']]),
196
192
  PrivateCircuitPublicInputs.empty(),
197
- new Map([[1n, 1n]]),
198
193
  [NoteAndSlot.random()],
199
194
  new Map([[0, 0]]),
200
195
  [Fr.random()],
@@ -210,16 +205,6 @@ export class PrivateCallExecutionResult {
210
205
  }
211
206
  }
212
207
 
213
- export function collectNoteHashLeafIndexMap(execResult: PrivateExecutionResult) {
214
- const accum: Map<bigint, bigint> = new Map();
215
- const collectNoteHashLeafIndexMapRecursive = (callResult: PrivateCallExecutionResult, accum: Map<bigint, bigint>) => {
216
- callResult.noteHashLeafIndexMap.forEach((value, key) => accum.set(key, value));
217
- callResult.nestedExecutionResults.forEach(nested => collectNoteHashLeafIndexMapRecursive(nested, accum));
218
- };
219
- collectNoteHashLeafIndexMapRecursive(execResult.entrypoint, accum);
220
- return accum;
221
- }
222
-
223
208
  export function collectNoteHashNullifierCounterMap(execResult: PrivateExecutionResult) {
224
209
  const accum: Map<number, number> = new Map();
225
210
  const collectNoteHashNullifierCounterMapRecursive = (
@@ -3,12 +3,39 @@ import { type ZodFor, optional, schemas } from '@aztec/foundation/schemas';
3
3
 
4
4
  import { z } from 'zod';
5
5
 
6
+ import { AztecAddress } from '../aztec-address/index.js';
6
7
  import type { AztecNode } from '../interfaces/aztec-node.js';
7
8
  import { type PrivateExecutionStep, PrivateExecutionStepSchema } from '../kernel/private_kernel_prover_output.js';
8
9
 
9
- export type NodeStats = Partial<Record<keyof AztecNode, { times: number[] }>>;
10
+ export type RoundTripStats = {
11
+ /** Number of round trips (times we blocked waiting for node responses) */
12
+ roundTrips: number;
13
+ /** Total wall-clock time spent waiting on node (excludes parallel overlap) */
14
+ totalBlockingTime: number;
15
+ /** Individual round trip durations */
16
+ roundTripDurations: number[];
17
+ /** Methods called in each round trip (parallel calls grouped together) */
18
+ roundTripMethods: string[][];
19
+ };
20
+
21
+ const RoundTripStatsSchema = z.object({
22
+ roundTrips: z.number(),
23
+ totalBlockingTime: z.number(),
24
+ roundTripDurations: z.array(z.number()),
25
+ roundTripMethods: z.array(z.array(z.string())),
26
+ });
27
+
28
+ export type NodeStats = {
29
+ /** Per-method call stats */
30
+ perMethod: Partial<Record<keyof AztecNode, { times: number[] }>>;
31
+ /** Round trip stats tracking actual blocking waits */
32
+ roundTrips: RoundTripStats;
33
+ };
10
34
 
11
- const NodeStatsSchema = z.record(z.string(), z.object({ times: z.array(z.number()) }));
35
+ const NodeStatsSchema = z.object({
36
+ perMethod: z.record(z.string(), z.object({ times: z.array(z.number()) })),
37
+ roundTrips: RoundTripStatsSchema,
38
+ });
12
39
 
13
40
  type FunctionTiming = {
14
41
  functionName: string;
@@ -105,7 +132,15 @@ export class TxProfileResult {
105
132
  },
106
133
  ],
107
134
  {
108
- nodeRPCCalls: { getBlockHeader: { times: [1] } },
135
+ nodeRPCCalls: {
136
+ perMethod: { getBlock: { times: [1] } },
137
+ roundTrips: {
138
+ roundTrips: 1,
139
+ totalBlockingTime: 1,
140
+ roundTripDurations: [1],
141
+ roundTripMethods: [['getBlock']],
142
+ },
143
+ },
109
144
  timings: {
110
145
  sync: 1,
111
146
  proving: 1,
@@ -123,24 +158,40 @@ export class TxProfileResult {
123
158
  }
124
159
  }
125
160
 
126
- export class UtilitySimulationResult {
161
+ export class UtilityExecutionResult {
127
162
  constructor(
128
163
  public result: Fr[],
164
+ public offchainEffects: { data: Fr[]; contractAddress: AztecAddress }[],
165
+ /** Timestamp of the anchor block used during utility execution. */
166
+ public anchorBlockTimestamp: bigint,
129
167
  public stats?: SimulationStats,
130
168
  ) {}
131
169
 
132
- static get schema(): ZodFor<UtilitySimulationResult> {
170
+ static get schema(): ZodFor<UtilityExecutionResult> {
133
171
  return z
134
172
  .object({
135
173
  result: z.array(schemas.Fr),
174
+ offchainEffects: z.array(z.object({ data: z.array(schemas.Fr), contractAddress: AztecAddress.schema })),
175
+ anchorBlockTimestamp: schemas.BigInt,
136
176
  stats: optional(SimulationStatsSchema),
137
177
  })
138
- .transform(({ result, stats }) => new UtilitySimulationResult(result, stats));
178
+ .transform(
179
+ ({ result, offchainEffects, anchorBlockTimestamp, stats }) =>
180
+ new UtilityExecutionResult(result, offchainEffects, anchorBlockTimestamp, stats),
181
+ );
139
182
  }
140
183
 
141
- static random(): UtilitySimulationResult {
142
- return new UtilitySimulationResult([Fr.random()], {
143
- nodeRPCCalls: { getBlockHeader: { times: [1] } },
184
+ static random(): UtilityExecutionResult {
185
+ return new UtilityExecutionResult([Fr.random()], [], 0n, {
186
+ nodeRPCCalls: {
187
+ perMethod: { getBlock: { times: [1] } },
188
+ roundTrips: {
189
+ roundTrips: 1,
190
+ totalBlockingTime: 1,
191
+ roundTripDurations: [1],
192
+ roundTripMethods: [['getBlock']],
193
+ },
194
+ },
144
195
  timings: {
145
196
  sync: 1,
146
197
  publicSimulation: 1,
@@ -1,4 +1,4 @@
1
- import { GeneratorIndex, MAX_PROTOCOL_CONTRACTS } from '@aztec/constants';
1
+ import { DomainSeparator, MAX_PROTOCOL_CONTRACTS } from '@aztec/constants';
2
2
  import { makeTuple } from '@aztec/foundation/array';
3
3
  import { arraySerializedSizeOfNonEmpty } from '@aztec/foundation/collection';
4
4
  import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
@@ -71,7 +71,7 @@ export class ProtocolContracts {
71
71
  }
72
72
 
73
73
  hash() {
74
- return poseidon2HashWithSeparator(this.derivedAddresses, GeneratorIndex.PROTOCOL_CONTRACTS);
74
+ return poseidon2HashWithSeparator(this.derivedAddresses, DomainSeparator.PROTOCOL_CONTRACTS);
75
75
  }
76
76
 
77
77
  static get schema() {
@@ -13,6 +13,7 @@ import {
13
13
  } from './private_execution_result.js';
14
14
  import { type ProvingStats, ProvingTimingsSchema } from './profiling.js';
15
15
  import { Tx } from './tx.js';
16
+ import type { TxHash } from './tx_hash.js';
16
17
 
17
18
  export class TxProvingResult {
18
19
  constructor(
@@ -22,6 +23,11 @@ export class TxProvingResult {
22
23
  public stats?: ProvingStats,
23
24
  ) {}
24
25
 
26
+ getTxHash(): Promise<TxHash> {
27
+ // Equivalent to `(await this.toTx()).txHash` but skips walking the execution result tree to collect logs.
28
+ return Tx.computeTxHash({ data: this.publicInputs });
29
+ }
30
+
25
31
  async toTx(): Promise<Tx> {
26
32
  const contractClassLogs = collectSortedContractClassLogs(this.privateExecutionResult);
27
33
 
@@ -1,5 +1,5 @@
1
1
  import { Fr } from '@aztec/foundation/curves/bn254';
2
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
2
+ import { BufferReader, BufferSink, serializeToSink } from '@aztec/foundation/serialize';
3
3
 
4
4
  import { inspect } from 'util';
5
5
  import { z } from 'zod';
@@ -63,8 +63,13 @@ export class PublicCallRequestWithCalldata {
63
63
  );
64
64
  }
65
65
 
66
- toBuffer() {
67
- return serializeToBuffer(this.request, new Vector(this.calldata));
66
+ toBuffer(): Buffer;
67
+ toBuffer(sink: BufferSink): void;
68
+ toBuffer(sink?: BufferSink): Buffer | void {
69
+ if (!sink) {
70
+ return BufferSink.serialize(this);
71
+ }
72
+ serializeToSink(sink, this.request, new Vector(this.calldata));
68
73
  }
69
74
 
70
75
  static fromBuffer(buffer: Buffer | BufferReader) {
@@ -7,6 +7,7 @@ import { z } from 'zod';
7
7
  import { SimulationError } from '../errors/simulation_error.js';
8
8
  import { Gas } from '../gas/gas.js';
9
9
  import type { GasUsed } from '../gas/gas_used.js';
10
+ import { DebugLog } from '../logs/debug_log.js';
10
11
  import { NullishToUndefined } from '../schemas/schemas.js';
11
12
  import { TxEffect } from '../tx/tx_effect.js';
12
13
  import { GlobalVariables } from './global_variables.js';
@@ -71,6 +72,7 @@ export class PublicSimulationOutput {
71
72
  public txEffect: TxEffect,
72
73
  public publicReturnValues: NestedProcessReturnValues[],
73
74
  public gasUsed: GasUsed,
75
+ public debugLogs: DebugLog[] = [],
74
76
  ) {}
75
77
 
76
78
  static get schema(): ZodFor<PublicSimulationOutput> {
@@ -86,6 +88,7 @@ export class PublicSimulationOutput {
86
88
  publicGas: Gas.schema,
87
89
  billedGas: Gas.schema,
88
90
  }),
91
+ debugLogs: z.array(DebugLog.schema).default([]),
89
92
  })
90
93
  .transform(
91
94
  fields =>
@@ -95,6 +98,7 @@ export class PublicSimulationOutput {
95
98
  fields.txEffect,
96
99
  fields.publicReturnValues,
97
100
  fields.gasUsed,
101
+ fields.debugLogs,
98
102
  ),
99
103
  );
100
104
  }
@@ -3,18 +3,20 @@ import type { FieldsOf } from '@aztec/foundation/types';
3
3
 
4
4
  import { z } from 'zod';
5
5
 
6
- import { type ContractArtifact, ContractArtifactSchema } from '../abi/abi.js';
7
6
  import {
8
7
  type ContractInstanceWithAddress,
9
8
  ContractInstanceWithAddressSchema,
10
9
  } from '../contract/interfaces/contract_instance.js';
11
10
  import { Gas } from '../gas/gas.js';
12
11
  import type { GasUsed } from '../gas/gas_used.js';
12
+ import { type PublicStorageOverride, PublicStorageOverrideSchema } from '../interfaces/public_storage_override.js';
13
13
  import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
14
14
  import { ChonkProof } from '../proofs/chonk_proof.js';
15
+ import type { OffchainEffect } from './offchain_effect.js';
15
16
  import {
16
17
  PrivateCallExecutionResult,
17
18
  PrivateExecutionResult,
19
+ collectOffchainEffects,
18
20
  collectSortedContractClassLogs,
19
21
  } from './private_execution_result.js';
20
22
  import { type SimulationStats, SimulationStatsSchema } from './profiling.js';
@@ -22,35 +24,36 @@ import { NestedProcessReturnValues, PublicSimulationOutput } from './public_simu
22
24
  import { Tx } from './tx.js';
23
25
 
24
26
  /*
25
- * If passed during the execution of a user circuit, the contract function simulator will replace the instance and class
26
- * of the contract with the one provided in the overrides for that address. An example use case
27
- * would be overriding your own account contract so that valid signatures don't have to be provided while simulating.
27
+ * If passed during the execution of a user circuit, the contract function simulator will replace
28
+ * the contract instance at that address with the one provided. An example use case would be
29
+ * overriding your own account contract so that valid signatures don't have to be provided while
30
+ * simulating. The override's `currentContractClassId` resolves through PXE's locally registered
31
+ * classes, so pre-register the target artifact via `pxe.registerContractClass(...)`.
28
32
  */
29
- export type ContractOverrides = Record<
30
- string /* AztecAddress as string */,
31
- { instance: ContractInstanceWithAddress; artifact: ContractArtifact }
32
- >;
33
+ export type ContractOverrides = Record<string /* AztecAddress as string */, { instance: ContractInstanceWithAddress }>;
33
34
 
34
35
  /*
35
- * Optional values that can be overridden during simulation. In order to simulate a transaction with these
36
- * set, it *must* be run without the kernel circuits, or validations will fail
36
+ * Optional values that can be overridden during simulation. `publicStorage` writes to the public-data
37
+ * tree fork. `contracts` overrides contract instances in the contract DB.
38
+ * In order to simulate a transaction with these set, it *must* be run without the kernel circuits,
39
+ * or validations will fail.
37
40
  */
38
41
  export class SimulationOverrides {
39
- constructor(public contracts?: ContractOverrides) {}
42
+ public publicStorage?: PublicStorageOverride[];
43
+ public contracts?: ContractOverrides;
44
+
45
+ constructor(args: { publicStorage?: PublicStorageOverride[]; contracts?: ContractOverrides } = {}) {
46
+ this.publicStorage = args.publicStorage?.length ? args.publicStorage : undefined;
47
+ this.contracts = args.contracts && Object.keys(args.contracts).length > 0 ? args.contracts : undefined;
48
+ }
40
49
 
41
50
  static get schema() {
42
51
  return z
43
52
  .object({
44
- contracts: optional(
45
- z.record(
46
- z.string(),
47
- z.object({ instance: ContractInstanceWithAddressSchema, artifact: ContractArtifactSchema }),
48
- ),
49
- ),
53
+ publicStorage: optional(z.array(PublicStorageOverrideSchema)),
54
+ contracts: optional(z.record(z.string(), z.object({ instance: ContractInstanceWithAddressSchema }))),
50
55
  })
51
- .transform(({ contracts }) => {
52
- return new SimulationOverrides(contracts);
53
- });
56
+ .transform(args => new SimulationOverrides(args));
54
57
  }
55
58
  }
56
59
 
@@ -84,6 +87,11 @@ export class TxSimulationResult {
84
87
  public stats?: SimulationStats,
85
88
  ) {}
86
89
 
90
+ /** Returns offchain effects collected from private execution. */
91
+ get offchainEffects(): OffchainEffect[] {
92
+ return collectOffchainEffects(this.privateExecutionResult);
93
+ }
94
+
87
95
  get gasUsed(): GasUsed {
88
96
  return (
89
97
  this.publicOutput?.gasUsed ?? {
@@ -106,7 +114,7 @@ export class TxSimulationResult {
106
114
  .transform(TxSimulationResult.from);
107
115
  }
108
116
 
109
- static from(fields: Omit<FieldsOf<TxSimulationResult>, 'gasUsed'>) {
117
+ static from(fields: Omit<FieldsOf<TxSimulationResult>, 'gasUsed' | 'offchainEffects'>) {
110
118
  return new TxSimulationResult(
111
119
  fields.privateExecutionResult,
112
120
  fields.publicInputs,
@@ -150,7 +158,7 @@ export class TxSimulationResult {
150
158
  }
151
159
 
152
160
  /**
153
- * Recursively accummulate the return values of a call result and its nested executions,
161
+ * Recursively accumulate the return values of a call result and its nested executions,
154
162
  * so they can be retrieved in order.
155
163
  * @param executionResult
156
164
  * @returns
@@ -5,7 +5,7 @@ import {
5
5
  STATE_REFERENCE_LENGTH,
6
6
  } from '@aztec/constants';
7
7
  import type { Fr } from '@aztec/foundation/curves/bn254';
8
- import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
8
+ import { BufferReader, BufferSink, FieldReader, serializeToSink } from '@aztec/foundation/serialize';
9
9
  import type { FieldsOf } from '@aztec/foundation/types';
10
10
 
11
11
  import { inspect } from 'util';
@@ -46,9 +46,14 @@ export class StateReference {
46
46
  return new StateReference(...StateReference.getFields(fields));
47
47
  }
48
48
 
49
- toBuffer() {
50
- // Note: The order here must match the order in the ProposedHeaderLib solidity library.
51
- return serializeToBuffer(this.l1ToL2MessageTree, this.partial);
49
+ // Note: The order here must match the order in the ProposedHeaderLib solidity library.
50
+ toBuffer(): Buffer;
51
+ toBuffer(sink: BufferSink): void;
52
+ toBuffer(sink?: BufferSink): Buffer | void {
53
+ if (!sink) {
54
+ return BufferSink.serialize(this);
55
+ }
56
+ serializeToSink(sink, this.l1ToL2MessageTree, this.partial);
52
57
  }
53
58
 
54
59
  toFields(): Fr[] {
@@ -1,6 +1,6 @@
1
1
  import { TREE_SNAPSHOTS_LENGTH } from '@aztec/constants';
2
2
  import type { Fr } from '@aztec/foundation/curves/bn254';
3
- import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
+ import { BufferReader, BufferSink, FieldReader, serializeToSink } from '@aztec/foundation/serialize';
4
4
 
5
5
  import { inspect } from 'util';
6
6
  import { z } from 'zod';
@@ -51,9 +51,14 @@ export class TreeSnapshots {
51
51
  );
52
52
  }
53
53
 
54
- toBuffer() {
55
- // Note: The order here must match the order in the ProposedHeaderLib solidity library.
56
- return serializeToBuffer(this.l1ToL2MessageTree, this.noteHashTree, this.nullifierTree, this.publicDataTree);
54
+ // Note: The order here must match the order in the ProposedHeaderLib solidity library.
55
+ toBuffer(): Buffer;
56
+ toBuffer(sink: BufferSink): void;
57
+ toBuffer(sink?: BufferSink): Buffer | void {
58
+ if (!sink) {
59
+ return BufferSink.serialize(this);
60
+ }
61
+ serializeToSink(sink, this.l1ToL2MessageTree, this.noteHashTree, this.nullifierTree, this.publicDataTree);
57
62
  }
58
63
 
59
64
  static fromFields(fields: Fr[] | FieldReader) {