@aztec/stdlib 0.0.1-commit.b6e433891 → 0.0.1-commit.b8a057fa

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 (1105) 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 +19 -5
  7. package/dest/abi/buffer.d.ts.map +1 -1
  8. package/dest/abi/buffer.js +38 -5
  9. package/dest/abi/contract_artifact.d.ts +1 -1
  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 +5 -44
  13. package/dest/abi/decoder.d.ts.map +1 -1
  14. package/dest/abi/decoder.js +12 -67
  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 +32 -6
  18. package/dest/abi/event_selector.d.ts +4 -7
  19. package/dest/abi/event_selector.d.ts.map +1 -1
  20. package/dest/abi/function_call.d.ts +7 -25
  21. package/dest/abi/function_call.d.ts.map +1 -1
  22. package/dest/abi/function_selector.d.ts +3 -6
  23. package/dest/abi/function_selector.d.ts.map +1 -1
  24. package/dest/abi/function_selector.js +2 -4
  25. package/dest/abi/function_signature_decoder.d.ts +43 -0
  26. package/dest/abi/function_signature_decoder.d.ts.map +1 -0
  27. package/dest/abi/function_signature_decoder.js +66 -0
  28. package/dest/abi/index.d.ts +2 -1
  29. package/dest/abi/index.d.ts.map +1 -1
  30. package/dest/abi/index.js +1 -0
  31. package/dest/abi/note_selector.d.ts +4 -7
  32. package/dest/abi/note_selector.d.ts.map +1 -1
  33. package/dest/abi/note_selector.js +1 -3
  34. package/dest/abi/selector.d.ts +2 -2
  35. package/dest/abi/selector.d.ts.map +1 -1
  36. package/dest/abi/selector.js +1 -1
  37. package/dest/abi/utils.d.ts +1 -1
  38. package/dest/abi/utils.d.ts.map +1 -1
  39. package/dest/abi/utils.js +1 -1
  40. package/dest/auth_witness/auth_witness.d.ts +2 -2
  41. package/dest/auth_witness/auth_witness.d.ts.map +1 -1
  42. package/dest/avm/avm.d.ts +1756 -10463
  43. package/dest/avm/avm.d.ts.map +1 -1
  44. package/dest/avm/avm.js +7 -4
  45. package/dest/avm/avm_accumulated_data.d.ts +22 -86
  46. package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
  47. package/dest/avm/avm_circuit_public_inputs.d.ts +180 -932
  48. package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
  49. package/dest/avm/avm_proving_request.d.ts +674 -5467
  50. package/dest/avm/avm_proving_request.d.ts.map +1 -1
  51. package/dest/avm/index.d.ts +1 -6
  52. package/dest/avm/index.d.ts.map +1 -1
  53. package/dest/avm/index.js +0 -5
  54. package/dest/avm/message_pack.js +12 -3
  55. package/dest/avm/public_data_write.d.ts +6 -12
  56. package/dest/avm/public_data_write.d.ts.map +1 -1
  57. package/dest/avm/revert_code.d.ts +5 -21
  58. package/dest/avm/revert_code.d.ts.map +1 -1
  59. package/dest/avm/revert_code.js +12 -30
  60. package/dest/aztec-address/index.d.ts +42 -12
  61. package/dest/aztec-address/index.d.ts.map +1 -1
  62. package/dest/aztec-address/index.js +40 -13
  63. package/dest/block/attestation_info.d.ts +3 -2
  64. package/dest/block/attestation_info.d.ts.map +1 -1
  65. package/dest/block/attestation_info.js +10 -5
  66. package/dest/block/block_data.d.ts +13 -38
  67. package/dest/block/block_data.d.ts.map +1 -1
  68. package/dest/block/block_data.js +2 -2
  69. package/dest/block/block_hash.d.ts +11 -10
  70. package/dest/block/block_hash.d.ts.map +1 -1
  71. package/dest/block/block_hash.js +10 -9
  72. package/dest/block/block_parameter.d.ts +37 -4
  73. package/dest/block/block_parameter.d.ts.map +1 -1
  74. package/dest/block/block_parameter.js +53 -2
  75. package/dest/block/in_block.d.ts +5 -24
  76. package/dest/block/in_block.d.ts.map +1 -1
  77. package/dest/block/index.d.ts +1 -2
  78. package/dest/block/index.d.ts.map +1 -1
  79. package/dest/block/index.js +0 -1
  80. package/dest/block/l2_block.d.ts +13 -41
  81. package/dest/block/l2_block.d.ts.map +1 -1
  82. package/dest/block/l2_block_info.d.ts +10 -29
  83. package/dest/block/l2_block_info.d.ts.map +1 -1
  84. package/dest/block/l2_block_info.js +6 -5
  85. package/dest/block/l2_block_source.d.ts +232 -356
  86. package/dest/block/l2_block_source.d.ts.map +1 -1
  87. package/dest/block/l2_block_source.js +81 -1
  88. package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts +39 -0
  89. package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts.map +1 -0
  90. package/dest/block/l2_block_stream/event_driven_l2_block_stream.js +165 -0
  91. package/dest/block/l2_block_stream/index.d.ts +2 -1
  92. package/dest/block/l2_block_stream/index.d.ts.map +1 -1
  93. package/dest/block/l2_block_stream/index.js +1 -0
  94. package/dest/block/l2_block_stream/interfaces.d.ts +83 -10
  95. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  96. package/dest/block/l2_block_stream/interfaces.js +25 -1
  97. package/dest/block/l2_block_stream/l2_block_stream.d.ts +23 -15
  98. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  99. package/dest/block/l2_block_stream/l2_block_stream.js +159 -135
  100. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +8 -12
  101. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  102. package/dest/block/l2_block_stream/l2_tips_memory_store.js +11 -32
  103. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +20 -18
  104. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
  105. package/dest/block/l2_block_stream/l2_tips_store_base.js +84 -40
  106. package/dest/block/proposal/attestations_and_signers.d.ts +37 -30
  107. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
  108. package/dest/block/proposal/attestations_and_signers.js +73 -25
  109. package/dest/block/proposal/committee_attestation.d.ts +6 -12
  110. package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
  111. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  112. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  113. package/dest/block/test/l2_tips_store_test_suite.js +296 -36
  114. package/dest/block/validate_block_result.d.ts +16 -1
  115. package/dest/block/validate_block_result.d.ts.map +1 -1
  116. package/dest/block/validate_block_result.js +18 -3
  117. package/dest/checkpoint/checkpoint.d.ts +30 -96
  118. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  119. package/dest/checkpoint/checkpoint.js +11 -3
  120. package/dest/checkpoint/checkpoint_data.d.ts +68 -91
  121. package/dest/checkpoint/checkpoint_data.d.ts.map +1 -1
  122. package/dest/checkpoint/checkpoint_data.js +12 -0
  123. package/dest/checkpoint/checkpoint_info.d.ts +7 -23
  124. package/dest/checkpoint/checkpoint_info.d.ts.map +1 -1
  125. package/dest/checkpoint/checkpoint_reexecution_tracker.d.ts +60 -0
  126. package/dest/checkpoint/checkpoint_reexecution_tracker.d.ts.map +1 -0
  127. package/dest/checkpoint/checkpoint_reexecution_tracker.js +108 -0
  128. package/dest/checkpoint/digest.d.ts +18 -0
  129. package/dest/checkpoint/digest.d.ts.map +1 -0
  130. package/dest/checkpoint/digest.js +12 -0
  131. package/dest/checkpoint/index.d.ts +5 -1
  132. package/dest/checkpoint/index.d.ts.map +1 -1
  133. package/dest/checkpoint/index.js +4 -0
  134. package/dest/checkpoint/previous_checkpoint_out_hashes.d.ts +33 -0
  135. package/dest/checkpoint/previous_checkpoint_out_hashes.d.ts.map +1 -0
  136. package/dest/checkpoint/previous_checkpoint_out_hashes.js +45 -0
  137. package/dest/checkpoint/published_checkpoint.d.ts +42 -194
  138. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  139. package/dest/checkpoint/simulation_overrides.d.ts +61 -0
  140. package/dest/checkpoint/simulation_overrides.d.ts.map +1 -0
  141. package/dest/checkpoint/simulation_overrides.js +98 -0
  142. package/dest/checkpoint/validate.d.ts +11 -3
  143. package/dest/checkpoint/validate.d.ts.map +1 -1
  144. package/dest/checkpoint/validate.js +9 -6
  145. package/dest/config/chain-config.d.ts +4 -9
  146. package/dest/config/chain-config.d.ts.map +1 -1
  147. package/dest/config/chain-config.js +13 -12
  148. package/dest/config/index.d.ts +2 -2
  149. package/dest/config/index.d.ts.map +1 -1
  150. package/dest/config/index.js +1 -1
  151. package/dest/config/network-consensus-config.d.ts +72 -0
  152. package/dest/config/network-consensus-config.d.ts.map +1 -0
  153. package/dest/config/network-consensus-config.js +223 -0
  154. package/dest/config/sequencer-config.d.ts +7 -3
  155. package/dest/config/sequencer-config.d.ts.map +1 -1
  156. package/dest/config/sequencer-config.js +38 -5
  157. package/dest/contract/complete_address.d.ts +3 -2
  158. package/dest/contract/complete_address.d.ts.map +1 -1
  159. package/dest/contract/complete_address.js +6 -2
  160. package/dest/contract/contract_address.d.ts +9 -8
  161. package/dest/contract/contract_address.d.ts.map +1 -1
  162. package/dest/contract/contract_address.js +5 -4
  163. package/dest/contract/contract_class.d.ts +1 -1
  164. package/dest/contract/contract_class.d.ts.map +1 -1
  165. package/dest/contract/contract_class.js +3 -2
  166. package/dest/contract/contract_deployment_data.d.ts +15 -61
  167. package/dest/contract/contract_deployment_data.d.ts.map +1 -1
  168. package/dest/contract/contract_instance.d.ts +19 -3
  169. package/dest/contract/contract_instance.d.ts.map +1 -1
  170. package/dest/contract/contract_instance.js +55 -3
  171. package/dest/contract/index.d.ts +1 -4
  172. package/dest/contract/index.d.ts.map +1 -1
  173. package/dest/contract/index.js +0 -3
  174. package/dest/contract/interfaces/contract_class.d.ts +17 -241
  175. package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
  176. package/dest/contract/interfaces/contract_class.js +1 -28
  177. package/dest/contract/interfaces/contract_data_source.d.ts +3 -5
  178. package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
  179. package/dest/contract/interfaces/contract_instance.d.ts +111 -104
  180. package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
  181. package/dest/contract/interfaces/contract_instance.js +11 -4
  182. package/dest/contract/interfaces/contract_instance_update.d.ts +6 -26
  183. package/dest/contract/interfaces/contract_instance_update.d.ts.map +1 -1
  184. package/dest/contract/interfaces/node-info.d.ts +11 -1
  185. package/dest/contract/interfaces/node-info.d.ts.map +1 -1
  186. package/dest/contract/interfaces/node-info.js +7 -1
  187. package/dest/contract/interfaces/protocol_contract_addresses.d.ts +2 -12
  188. package/dest/contract/interfaces/protocol_contract_addresses.d.ts.map +1 -1
  189. package/dest/contract/partial_address.d.ts +9 -3
  190. package/dest/contract/partial_address.d.ts.map +1 -1
  191. package/dest/contract/partial_address.js +8 -2
  192. package/dest/contract/private_function.d.ts +1 -1
  193. package/dest/contract/private_function.d.ts.map +1 -1
  194. package/dest/contract/private_function.js +2 -4
  195. package/dest/database-version/database_version.d.ts +5 -11
  196. package/dest/database-version/database_version.d.ts.map +1 -1
  197. package/dest/database-version/version_manager.d.ts +22 -4
  198. package/dest/database-version/version_manager.d.ts.map +1 -1
  199. package/dest/database-version/version_manager.js +87 -6
  200. package/dest/deserialization/index.d.ts +35 -3
  201. package/dest/deserialization/index.d.ts.map +1 -1
  202. package/dest/deserialization/index.js +32 -1
  203. package/dest/epoch-helpers/index.d.ts +10 -22
  204. package/dest/epoch-helpers/index.d.ts.map +1 -1
  205. package/dest/epoch-helpers/index.js +12 -0
  206. package/dest/file-store/factory.d.ts +4 -3
  207. package/dest/file-store/factory.d.ts.map +1 -1
  208. package/dest/file-store/factory.js +9 -2
  209. package/dest/file-store/http.d.ts +9 -2
  210. package/dest/file-store/http.d.ts.map +1 -1
  211. package/dest/file-store/http.js +20 -9
  212. package/dest/file-store/index.d.ts +3 -1
  213. package/dest/file-store/index.d.ts.map +1 -1
  214. package/dest/file-store/index.js +1 -0
  215. package/dest/file-store/memory.d.ts +24 -0
  216. package/dest/file-store/memory.d.ts.map +1 -0
  217. package/dest/file-store/memory.js +80 -0
  218. package/dest/gas/fee_math.d.ts +49 -0
  219. package/dest/gas/fee_math.d.ts.map +1 -0
  220. package/dest/gas/fee_math.js +80 -0
  221. package/dest/gas/gas.d.ts +9 -14
  222. package/dest/gas/gas.d.ts.map +1 -1
  223. package/dest/gas/gas.js +6 -3
  224. package/dest/gas/gas_fees.d.ts +13 -14
  225. package/dest/gas/gas_fees.d.ts.map +1 -1
  226. package/dest/gas/gas_fees.js +17 -4
  227. package/dest/gas/gas_settings.d.ts +60 -86
  228. package/dest/gas/gas_settings.d.ts.map +1 -1
  229. package/dest/gas/gas_settings.js +49 -9
  230. package/dest/gas/index.d.ts +3 -1
  231. package/dest/gas/index.d.ts.map +1 -1
  232. package/dest/gas/index.js +2 -0
  233. package/dest/gas/tx_gas_limits.d.ts +72 -0
  234. package/dest/gas/tx_gas_limits.d.ts.map +1 -0
  235. package/dest/gas/tx_gas_limits.js +85 -0
  236. package/dest/ha-signing/config.d.ts +29 -79
  237. package/dest/ha-signing/config.d.ts.map +1 -1
  238. package/dest/ha-signing/config.js +18 -21
  239. package/dest/ha-signing/index.d.ts +2 -2
  240. package/dest/ha-signing/index.d.ts.map +1 -1
  241. package/dest/ha-signing/index.js +1 -1
  242. package/dest/ha-signing/local_config.d.ts +12 -35
  243. package/dest/ha-signing/local_config.d.ts.map +1 -1
  244. package/dest/ha-signing/local_config.js +9 -3
  245. package/dest/ha-signing/types.d.ts +37 -32
  246. package/dest/ha-signing/types.d.ts.map +1 -1
  247. package/dest/ha-signing/types.js +13 -6
  248. package/dest/hash/hash.d.ts +19 -1
  249. package/dest/hash/hash.d.ts.map +1 -1
  250. package/dest/hash/hash.js +39 -2
  251. package/dest/interfaces/allowed_element.d.ts +4 -28
  252. package/dest/interfaces/allowed_element.d.ts.map +1 -1
  253. package/dest/interfaces/api_limit.d.ts +1 -1
  254. package/dest/interfaces/api_limit.js +1 -1
  255. package/dest/interfaces/archiver.d.ts +20 -32
  256. package/dest/interfaces/archiver.d.ts.map +1 -1
  257. package/dest/interfaces/archiver.js +215 -70
  258. package/dest/interfaces/aztec-node-admin.d.ts +74 -305
  259. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  260. package/dest/interfaces/aztec-node-admin.js +60 -17
  261. package/dest/interfaces/aztec-node-debug.d.ts +59 -0
  262. package/dest/interfaces/aztec-node-debug.d.ts.map +1 -0
  263. package/dest/interfaces/aztec-node-debug.js +49 -0
  264. package/dest/interfaces/aztec-node.d.ts +160 -116
  265. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  266. package/dest/interfaces/aztec-node.js +350 -74
  267. package/dest/interfaces/block-builder.d.ts +5 -1
  268. package/dest/interfaces/block-builder.d.ts.map +1 -1
  269. package/dest/interfaces/block_response.d.ts +90 -0
  270. package/dest/interfaces/block_response.d.ts.map +1 -0
  271. package/dest/interfaces/block_response.js +30 -0
  272. package/dest/interfaces/chain_tips.d.ts +11 -0
  273. package/dest/interfaces/chain_tips.d.ts.map +1 -0
  274. package/dest/interfaces/chain_tips.js +6 -0
  275. package/dest/interfaces/checkpoint_parameter.d.ts +14 -0
  276. package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -0
  277. package/dest/interfaces/checkpoint_parameter.js +18 -0
  278. package/dest/interfaces/checkpoint_response.d.ts +122 -0
  279. package/dest/interfaces/checkpoint_response.d.ts.map +1 -0
  280. package/dest/interfaces/checkpoint_response.js +26 -0
  281. package/dest/interfaces/client.d.ts +9 -2
  282. package/dest/interfaces/client.d.ts.map +1 -1
  283. package/dest/interfaces/client.js +7 -1
  284. package/dest/interfaces/configs.d.ts +66 -134
  285. package/dest/interfaces/configs.d.ts.map +1 -1
  286. package/dest/interfaces/configs.js +14 -2
  287. package/dest/interfaces/get_tx_by_hash_options.d.ts +9 -0
  288. package/dest/interfaces/get_tx_by_hash_options.d.ts.map +1 -0
  289. package/dest/interfaces/get_tx_by_hash_options.js +4 -0
  290. package/dest/interfaces/l1_publish_info.d.ts +29 -0
  291. package/dest/interfaces/l1_publish_info.d.ts.map +1 -0
  292. package/dest/interfaces/l1_publish_info.js +26 -0
  293. package/dest/interfaces/l2_logs_source.d.ts +14 -36
  294. package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
  295. package/dest/interfaces/l2_logs_source.js +5 -0
  296. package/dest/interfaces/merkle_tree_operations.d.ts +11 -5
  297. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  298. package/dest/interfaces/p2p-bootstrap.js +8 -2
  299. package/dest/interfaces/p2p.d.ts +46 -7
  300. package/dest/interfaces/p2p.d.ts.map +1 -1
  301. package/dest/interfaces/p2p.js +41 -6
  302. package/dest/interfaces/private_kernel_prover.d.ts +131 -12
  303. package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
  304. package/dest/interfaces/prover-agent.d.ts +5 -23
  305. package/dest/interfaces/prover-agent.d.ts.map +1 -1
  306. package/dest/interfaces/prover-agent.js +4 -1
  307. package/dest/interfaces/prover-client.d.ts +7 -29
  308. package/dest/interfaces/prover-client.d.ts.map +1 -1
  309. package/dest/interfaces/prover-client.js +0 -3
  310. package/dest/interfaces/prover-node.d.ts +12 -8
  311. package/dest/interfaces/prover-node.d.ts.map +1 -1
  312. package/dest/interfaces/prover-node.js +37 -16
  313. package/dest/interfaces/proving-job-source.js +24 -4
  314. package/dest/interfaces/proving-job.d.ts +744 -5795
  315. package/dest/interfaces/proving-job.d.ts.map +1 -1
  316. package/dest/interfaces/proving-job.js +3 -3
  317. package/dest/interfaces/public_storage_override.d.ts +22 -0
  318. package/dest/interfaces/public_storage_override.d.ts.map +1 -0
  319. package/dest/interfaces/public_storage_override.js +7 -0
  320. package/dest/interfaces/server.d.ts +6 -3
  321. package/dest/interfaces/server.d.ts.map +1 -1
  322. package/dest/interfaces/server.js +5 -2
  323. package/dest/interfaces/server_circuit_prover.d.ts +3 -3
  324. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  325. package/dest/interfaces/slasher.d.ts +25 -65
  326. package/dest/interfaces/slasher.d.ts.map +1 -1
  327. package/dest/interfaces/slasher.js +8 -4
  328. package/dest/interfaces/tx_provider.d.ts +6 -1
  329. package/dest/interfaces/tx_provider.d.ts.map +1 -1
  330. package/dest/interfaces/validator.d.ts +59 -248
  331. package/dest/interfaces/validator.d.ts.map +1 -1
  332. package/dest/interfaces/validator.js +8 -2
  333. package/dest/interfaces/world_state.d.ts +15 -2
  334. package/dest/interfaces/world_state.d.ts.map +1 -1
  335. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts +8 -2
  336. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts.map +1 -1
  337. package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +12 -74
  338. package/dest/kernel/hints/index.d.ts +1 -2
  339. package/dest/kernel/hints/index.d.ts.map +1 -1
  340. package/dest/kernel/hints/index.js +0 -1
  341. package/dest/kernel/hints/key_validation_request.d.ts +12 -8
  342. package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
  343. package/dest/kernel/hints/key_validation_request.js +20 -18
  344. package/dest/kernel/hints/read_request.js +1 -1
  345. package/dest/kernel/index.d.ts +10 -2
  346. package/dest/kernel/index.d.ts.map +1 -1
  347. package/dest/kernel/index.js +9 -1
  348. package/dest/kernel/log_hash.d.ts +6 -2
  349. package/dest/kernel/log_hash.d.ts.map +1 -1
  350. package/dest/kernel/log_hash.js +23 -11
  351. package/dest/kernel/note_hash.js +1 -1
  352. package/dest/kernel/nullifier.js +1 -1
  353. package/dest/kernel/private_circuit_public_inputs.d.ts +14 -4
  354. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  355. package/dest/kernel/private_circuit_public_inputs.js +14 -7
  356. package/dest/kernel/private_context_inputs.d.ts +4 -3
  357. package/dest/kernel/private_context_inputs.d.ts.map +1 -1
  358. package/dest/kernel/private_context_inputs.js +7 -3
  359. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +8 -10
  360. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  361. package/dest/kernel/private_kernel_circuit_public_inputs.js +10 -7
  362. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts +22 -0
  363. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts.map +1 -0
  364. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.js +33 -0
  365. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts +23 -0
  366. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts.map +1 -0
  367. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.js +35 -0
  368. package/dest/kernel/private_kernel_init_4_circuit_private_inputs.d.ts +24 -0
  369. package/dest/kernel/private_kernel_init_4_circuit_private_inputs.d.ts.map +1 -0
  370. package/dest/kernel/private_kernel_init_4_circuit_private_inputs.js +37 -0
  371. package/dest/kernel/private_kernel_init_5_circuit_private_inputs.d.ts +25 -0
  372. package/dest/kernel/private_kernel_init_5_circuit_private_inputs.d.ts.map +1 -0
  373. package/dest/kernel/private_kernel_init_5_circuit_private_inputs.js +39 -0
  374. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +1 -9
  375. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  376. package/dest/kernel/private_kernel_init_circuit_private_inputs.js +2 -6
  377. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.d.ts +16 -0
  378. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.d.ts.map +1 -0
  379. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.js +23 -0
  380. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.d.ts +17 -0
  381. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.d.ts.map +1 -0
  382. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.js +25 -0
  383. package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.d.ts +18 -0
  384. package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.d.ts.map +1 -0
  385. package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.js +27 -0
  386. package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.d.ts +19 -0
  387. package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.d.ts.map +1 -0
  388. package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.js +29 -0
  389. package/dest/kernel/private_kernel_prover_output.d.ts +6 -29
  390. package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
  391. package/dest/kernel/private_kernel_prover_output.js +4 -1
  392. package/dest/kernel/private_kernel_reset_dimensions.d.ts +7 -8
  393. package/dest/kernel/private_kernel_reset_dimensions.d.ts.map +1 -1
  394. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts +29 -0
  395. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts.map +1 -0
  396. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.js +36 -0
  397. package/dest/kernel/private_kernel_simulated_output.d.ts +1 -7
  398. package/dest/kernel/private_kernel_simulated_output.d.ts.map +1 -1
  399. package/dest/kernel/private_kernel_simulated_output.js +2 -1
  400. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +9 -6
  401. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  402. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +22 -7
  403. package/dest/kernel/private_log_data.d.ts +1 -1
  404. package/dest/kernel/private_log_data.d.ts.map +1 -1
  405. package/dest/kernel/private_log_data.js +1 -1
  406. package/dest/kernel/private_to_avm_accumulated_data.d.ts +25 -69
  407. package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
  408. package/dest/kernel/private_to_avm_accumulated_data.js +11 -5
  409. package/dest/kernel/private_to_public_accumulated_data.d.ts +4 -3
  410. package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
  411. package/dest/kernel/private_to_public_accumulated_data.js +6 -3
  412. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +5 -4
  413. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  414. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -3
  415. package/dest/kernel/private_to_rollup_accumulated_data.d.ts +5 -4
  416. package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
  417. package/dest/kernel/private_to_rollup_accumulated_data.js +6 -3
  418. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +5 -4
  419. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  420. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +7 -3
  421. package/dest/kernel/public_call_request.d.ts +15 -30
  422. package/dest/kernel/public_call_request.d.ts.map +1 -1
  423. package/dest/kernel/public_call_request.js +16 -7
  424. package/dest/kernel/utils/index.d.ts +1 -2
  425. package/dest/kernel/utils/index.d.ts.map +1 -1
  426. package/dest/kernel/utils/index.js +0 -1
  427. package/dest/keys/derivation.d.ts +45 -5
  428. package/dest/keys/derivation.d.ts.map +1 -1
  429. package/dest/keys/derivation.js +59 -19
  430. package/dest/keys/public_key.d.ts +22 -3
  431. package/dest/keys/public_key.d.ts.map +1 -1
  432. package/dest/keys/public_key.js +20 -1
  433. package/dest/keys/public_keys.d.ts +55 -82
  434. package/dest/keys/public_keys.d.ts.map +1 -1
  435. package/dest/keys/public_keys.js +102 -74
  436. package/dest/kv-store/config.d.ts +3 -6
  437. package/dest/kv-store/config.d.ts.map +1 -1
  438. package/dest/kv-store/config.js +2 -7
  439. package/dest/l1-contracts/index.d.ts +2 -2
  440. package/dest/l1-contracts/index.d.ts.map +1 -1
  441. package/dest/l1-contracts/index.js +1 -1
  442. package/dest/logs/app_tagging_secret.d.ts +69 -0
  443. package/dest/logs/app_tagging_secret.d.ts.map +1 -0
  444. package/dest/logs/app_tagging_secret.js +125 -0
  445. package/dest/logs/app_tagging_secret_kind.d.ts +7 -0
  446. package/dest/logs/app_tagging_secret_kind.d.ts.map +1 -0
  447. package/dest/logs/app_tagging_secret_kind.js +17 -0
  448. package/dest/logs/contract_class_log.d.ts +16 -35
  449. package/dest/logs/contract_class_log.d.ts.map +1 -1
  450. package/dest/logs/contract_class_log.js +11 -13
  451. package/dest/logs/index.d.ts +7 -7
  452. package/dest/logs/index.d.ts.map +1 -1
  453. package/dest/logs/index.js +6 -6
  454. package/dest/logs/log_cursor.d.ts +51 -0
  455. package/dest/logs/log_cursor.d.ts.map +1 -0
  456. package/dest/logs/log_cursor.js +82 -0
  457. package/dest/logs/log_result.d.ts +54 -0
  458. package/dest/logs/log_result.d.ts.map +1 -0
  459. package/dest/logs/log_result.js +56 -0
  460. package/dest/logs/logs_query.d.ts +82 -0
  461. package/dest/logs/logs_query.d.ts.map +1 -0
  462. package/dest/logs/logs_query.js +50 -0
  463. package/dest/logs/message_context.d.ts +4 -16
  464. package/dest/logs/message_context.d.ts.map +1 -1
  465. package/dest/logs/message_context.js +1 -48
  466. package/dest/logs/pending_tagged_log.d.ts +6 -9
  467. package/dest/logs/pending_tagged_log.d.ts.map +1 -1
  468. package/dest/logs/pending_tagged_log.js +1 -31
  469. package/dest/logs/pre_tag.d.ts +11 -24
  470. package/dest/logs/pre_tag.d.ts.map +1 -1
  471. package/dest/logs/pre_tag.js +2 -2
  472. package/dest/logs/private_log.d.ts +7 -12
  473. package/dest/logs/private_log.d.ts.map +1 -1
  474. package/dest/logs/private_log.js +6 -3
  475. package/dest/logs/query_all_logs_by_tags.d.ts +24 -0
  476. package/dest/logs/query_all_logs_by_tags.d.ts.map +1 -0
  477. package/dest/logs/query_all_logs_by_tags.js +64 -0
  478. package/dest/logs/shared_secret_derivation.d.ts +22 -8
  479. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  480. package/dest/logs/shared_secret_derivation.js +31 -10
  481. package/dest/logs/siloed_tag.d.ts +8 -7
  482. package/dest/logs/siloed_tag.d.ts.map +1 -1
  483. package/dest/logs/siloed_tag.js +13 -3
  484. package/dest/logs/tag.d.ts +5 -6
  485. package/dest/logs/tag.d.ts.map +1 -1
  486. package/dest/logs/tag.js +4 -0
  487. package/dest/logs/tagging_index_range.d.ts +13 -31
  488. package/dest/logs/tagging_index_range.d.ts.map +1 -1
  489. package/dest/logs/tagging_index_range.js +2 -2
  490. package/dest/messaging/append_l1_to_l2_messages.d.ts +9 -0
  491. package/dest/messaging/append_l1_to_l2_messages.d.ts.map +1 -0
  492. package/dest/messaging/append_l1_to_l2_messages.js +12 -0
  493. package/dest/messaging/index.d.ts +2 -1
  494. package/dest/messaging/index.d.ts.map +1 -1
  495. package/dest/messaging/index.js +1 -0
  496. package/dest/messaging/l1_to_l2_message.d.ts +3 -2
  497. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  498. package/dest/messaging/l1_to_l2_message.js +11 -13
  499. package/dest/messaging/l2_to_l1_membership.d.ts +43 -6
  500. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  501. package/dest/messaging/l2_to_l1_membership.js +72 -12
  502. package/dest/messaging/l2_to_l1_message.d.ts +38 -112
  503. package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
  504. package/dest/messaging/l2_to_l1_message.js +21 -12
  505. package/dest/noir/index.d.ts +3 -1
  506. package/dest/noir/index.d.ts.map +1 -1
  507. package/dest/note/note.d.ts +2 -2
  508. package/dest/note/note.d.ts.map +1 -1
  509. package/dest/note/note_dao.d.ts +1 -1
  510. package/dest/note/note_dao.d.ts.map +1 -1
  511. package/dest/note/note_dao.js +1 -4
  512. package/dest/p2p/attestation_utils.d.ts +1 -1
  513. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  514. package/dest/p2p/attestation_utils.js +8 -1
  515. package/dest/p2p/block_proposal.d.ts +31 -14
  516. package/dest/p2p/block_proposal.d.ts.map +1 -1
  517. package/dest/p2p/block_proposal.js +57 -39
  518. package/dest/p2p/checkpoint_attestation.d.ts +24 -9
  519. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
  520. package/dest/p2p/checkpoint_attestation.js +33 -24
  521. package/dest/p2p/checkpoint_proposal.d.ts +36 -16
  522. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
  523. package/dest/p2p/checkpoint_proposal.js +59 -51
  524. package/dest/p2p/consensus_payload.d.ts +27 -20
  525. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  526. package/dest/p2p/consensus_payload.js +38 -19
  527. package/dest/p2p/gossipable.d.ts +4 -4
  528. package/dest/p2p/gossipable.d.ts.map +1 -1
  529. package/dest/p2p/index.d.ts +1 -2
  530. package/dest/p2p/index.d.ts.map +1 -1
  531. package/dest/p2p/index.js +0 -1
  532. package/dest/p2p/signature_utils.d.ts +35 -17
  533. package/dest/p2p/signature_utils.d.ts.map +1 -1
  534. package/dest/p2p/signature_utils.js +125 -20
  535. package/dest/p2p/signed_txs.d.ts +15 -13
  536. package/dest/p2p/signed_txs.d.ts.map +1 -1
  537. package/dest/p2p/signed_txs.js +26 -24
  538. package/dest/parity/parity_base_private_inputs.d.ts +8 -4
  539. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
  540. package/dest/parity/parity_base_private_inputs.js +7 -5
  541. package/dest/parity/parity_public_inputs.d.ts +8 -4
  542. package/dest/parity/parity_public_inputs.d.ts.map +1 -1
  543. package/dest/parity/parity_public_inputs.js +6 -3
  544. package/dest/parity/parity_root_private_inputs.d.ts +2 -2
  545. package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
  546. package/dest/proofs/chonk_proof.d.ts +57 -7
  547. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  548. package/dest/proofs/chonk_proof.js +112 -15
  549. package/dest/proofs/recursive_proof.d.ts +2 -2
  550. package/dest/proofs/recursive_proof.d.ts.map +1 -1
  551. package/dest/rollup/avm_proof_data.d.ts +3 -3
  552. package/dest/rollup/avm_proof_data.d.ts.map +1 -1
  553. package/dest/rollup/block_headers_hash.d.ts +1 -1
  554. package/dest/rollup/block_headers_hash.d.ts.map +1 -1
  555. package/dest/rollup/block_headers_hash.js +8 -2
  556. package/dest/rollup/block_merge_rollup_private_inputs.d.ts +2 -2
  557. package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
  558. package/dest/rollup/block_rollup_public_inputs.d.ts +12 -2
  559. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
  560. package/dest/rollup/block_rollup_public_inputs.js +12 -0
  561. package/dest/rollup/block_root_rollup_private_inputs.d.ts +6 -6
  562. package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
  563. package/dest/rollup/checkpoint_header.d.ts +8 -3
  564. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  565. package/dest/rollup/checkpoint_header.js +20 -10
  566. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +2 -2
  567. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
  568. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +9 -2
  569. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  570. package/dest/rollup/checkpoint_rollup_public_inputs.js +9 -0
  571. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +5 -5
  572. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  573. package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts +2 -2
  574. package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts.map +1 -1
  575. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +2 -2
  576. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -1
  577. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts +2 -2
  578. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -1
  579. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +2 -2
  580. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
  581. package/dest/rollup/root_rollup_private_inputs.d.ts +2 -2
  582. package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
  583. package/dest/rollup/root_rollup_public_inputs.d.ts +2 -2
  584. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  585. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +2 -2
  586. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
  587. package/dest/rollup/tx_rollup_public_inputs.d.ts +2 -2
  588. package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
  589. package/dest/schemas/schemas.d.ts +32 -78
  590. package/dest/schemas/schemas.d.ts.map +1 -1
  591. package/dest/schemas/schemas.js +2 -2
  592. package/dest/slashing/helpers.d.ts +2 -2
  593. package/dest/slashing/helpers.d.ts.map +1 -1
  594. package/dest/slashing/helpers.js +10 -7
  595. package/dest/slashing/index.d.ts +2 -3
  596. package/dest/slashing/index.d.ts.map +1 -1
  597. package/dest/slashing/index.js +1 -2
  598. package/dest/slashing/serialization.d.ts +2 -6
  599. package/dest/slashing/serialization.d.ts.map +1 -1
  600. package/dest/slashing/serialization.js +0 -60
  601. package/dest/slashing/types.d.ts +18 -112
  602. package/dest/slashing/types.d.ts.map +1 -1
  603. package/dest/slashing/types.js +16 -24
  604. package/dest/slashing/{tally.d.ts → votes.d.ts} +1 -1
  605. package/dest/slashing/{tally.d.ts.map → votes.d.ts.map} +1 -1
  606. package/dest/slashing/{tally.js → votes.js} +1 -1
  607. package/dest/snapshots/types.d.ts +15 -78
  608. package/dest/snapshots/types.d.ts.map +1 -1
  609. package/dest/stats/stats.d.ts +2 -2
  610. package/dest/stats/stats.d.ts.map +1 -1
  611. package/dest/tests/factories.d.ts +25 -58
  612. package/dest/tests/factories.d.ts.map +1 -1
  613. package/dest/tests/factories.js +81 -116
  614. package/dest/tests/mocks.d.ts +8 -5
  615. package/dest/tests/mocks.d.ts.map +1 -1
  616. package/dest/tests/mocks.js +45 -56
  617. package/dest/timetable/budgets.d.ts +57 -0
  618. package/dest/timetable/budgets.d.ts.map +1 -0
  619. package/dest/timetable/budgets.js +56 -0
  620. package/dest/timetable/build_proposer_timetable.d.ts +21 -0
  621. package/dest/timetable/build_proposer_timetable.d.ts.map +1 -0
  622. package/dest/timetable/build_proposer_timetable.js +17 -0
  623. package/dest/timetable/consensus_timetable.d.ts +70 -0
  624. package/dest/timetable/consensus_timetable.d.ts.map +1 -0
  625. package/dest/timetable/consensus_timetable.js +89 -0
  626. package/dest/timetable/index.d.ts +5 -37
  627. package/dest/timetable/index.d.ts.map +1 -1
  628. package/dest/timetable/index.js +4 -39
  629. package/dest/timetable/proposer_timetable.d.ts +106 -0
  630. package/dest/timetable/proposer_timetable.d.ts.map +1 -0
  631. package/dest/timetable/proposer_timetable.js +132 -0
  632. package/dest/trees/append_only_tree_snapshot.d.ts +9 -14
  633. package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
  634. package/dest/trees/append_only_tree_snapshot.js +6 -3
  635. package/dest/trees/nullifier_leaf.d.ts +19 -42
  636. package/dest/trees/nullifier_leaf.d.ts.map +1 -1
  637. package/dest/trees/nullifier_leaf.js +3 -0
  638. package/dest/trees/nullifier_membership_witness.d.ts +17 -63
  639. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  640. package/dest/trees/nullifier_membership_witness.js +0 -21
  641. package/dest/trees/public_data_leaf.d.ts +21 -53
  642. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  643. package/dest/trees/public_data_witness.d.ts +19 -71
  644. package/dest/trees/public_data_witness.d.ts.map +1 -1
  645. package/dest/trees/public_data_witness.js +0 -27
  646. package/dest/tx/block_header.d.ts +5 -4
  647. package/dest/tx/block_header.d.ts.map +1 -1
  648. package/dest/tx/block_header.js +7 -4
  649. package/dest/tx/call_context.d.ts +4 -14
  650. package/dest/tx/call_context.d.ts.map +1 -1
  651. package/dest/tx/capsule.d.ts +7 -3
  652. package/dest/tx/capsule.d.ts.map +1 -1
  653. package/dest/tx/capsule.js +9 -3
  654. package/dest/tx/execution_payload.d.ts +1 -1
  655. package/dest/tx/execution_payload.d.ts.map +1 -1
  656. package/dest/tx/execution_payload.js +1 -1
  657. package/dest/tx/fee_provider.d.ts +10 -0
  658. package/dest/tx/fee_provider.d.ts.map +1 -0
  659. package/dest/tx/fee_provider.js +1 -0
  660. package/dest/tx/function_data.d.ts +4 -10
  661. package/dest/tx/function_data.d.ts.map +1 -1
  662. package/dest/tx/global_variable_builder.d.ts +4 -15
  663. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  664. package/dest/tx/global_variables.d.ts +16 -49
  665. package/dest/tx/global_variables.d.ts.map +1 -1
  666. package/dest/tx/global_variables.js +10 -14
  667. package/dest/tx/hashed_values.d.ts +4 -3
  668. package/dest/tx/hashed_values.d.ts.map +1 -1
  669. package/dest/tx/hashed_values.js +6 -3
  670. package/dest/tx/in_tx.d.ts +5 -17
  671. package/dest/tx/in_tx.d.ts.map +1 -1
  672. package/dest/tx/index.d.ts +2 -2
  673. package/dest/tx/index.d.ts.map +1 -1
  674. package/dest/tx/index.js +1 -1
  675. package/dest/tx/indexed_tx_effect.d.ts +8 -19
  676. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  677. package/dest/tx/indexed_tx_effect.js +9 -6
  678. package/dest/tx/partial_state_reference.d.ts +22 -65
  679. package/dest/tx/partial_state_reference.d.ts.map +1 -1
  680. package/dest/tx/partial_state_reference.js +6 -3
  681. package/dest/tx/private_execution_result.d.ts +6 -16
  682. package/dest/tx/private_execution_result.d.ts.map +1 -1
  683. package/dest/tx/private_tx_constant_data.d.ts +18 -2
  684. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  685. package/dest/tx/private_tx_constant_data.js +13 -4
  686. package/dest/tx/profiling.d.ts +54 -352
  687. package/dest/tx/profiling.d.ts.map +1 -1
  688. package/dest/tx/profiling.js +6 -4
  689. package/dest/tx/protocol_contracts.d.ts +5 -9
  690. package/dest/tx/protocol_contracts.d.ts.map +1 -1
  691. package/dest/tx/proven_tx.d.ts +30 -74
  692. package/dest/tx/proven_tx.d.ts.map +1 -1
  693. package/dest/tx/proven_tx.js +6 -0
  694. package/dest/tx/public_call_request_with_calldata.d.ts +4 -3
  695. package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
  696. package/dest/tx/public_call_request_with_calldata.js +6 -3
  697. package/dest/tx/simulated_tx.d.ts +73 -1148
  698. package/dest/tx/simulated_tx.d.ts.map +1 -1
  699. package/dest/tx/simulated_tx.js +13 -11
  700. package/dest/tx/state_reference.d.ts +30 -117
  701. package/dest/tx/state_reference.d.ts.map +1 -1
  702. package/dest/tx/state_reference.js +6 -4
  703. package/dest/tx/tree_snapshots.d.ts +27 -84
  704. package/dest/tx/tree_snapshots.d.ts.map +1 -1
  705. package/dest/tx/tree_snapshots.js +6 -4
  706. package/dest/tx/tx.d.ts +22 -13
  707. package/dest/tx/tx.d.ts.map +1 -1
  708. package/dest/tx/tx.js +44 -22
  709. package/dest/tx/tx_constant_data.d.ts +4 -3
  710. package/dest/tx/tx_constant_data.d.ts.map +1 -1
  711. package/dest/tx/tx_constant_data.js +6 -3
  712. package/dest/tx/tx_context.d.ts +32 -131
  713. package/dest/tx/tx_context.d.ts.map +1 -1
  714. package/dest/tx/tx_context.js +6 -6
  715. package/dest/tx/tx_hash.d.ts +6 -4
  716. package/dest/tx/tx_hash.d.ts.map +1 -1
  717. package/dest/tx/tx_hash.js +13 -5
  718. package/dest/tx/tx_receipt.d.ts +144 -63
  719. package/dest/tx/tx_receipt.d.ts.map +1 -1
  720. package/dest/tx/tx_receipt.js +143 -60
  721. package/dest/tx/validator/error_texts.d.ts +6 -2
  722. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  723. package/dest/tx/validator/error_texts.js +7 -1
  724. package/dest/tx/validator/tx_validator.d.ts +5 -27
  725. package/dest/tx/validator/tx_validator.d.ts.map +1 -1
  726. package/dest/tx/validator/tx_validator.js +0 -4
  727. package/dest/types/shared.d.ts +4 -12
  728. package/dest/types/shared.d.ts.map +1 -1
  729. package/dest/types/shared.js +6 -12
  730. package/dest/update-checker/dev_version.d.ts +3 -0
  731. package/dest/update-checker/dev_version.d.ts.map +1 -0
  732. package/dest/update-checker/dev_version.js +1 -0
  733. package/dest/update-checker/index.d.ts +2 -1
  734. package/dest/update-checker/index.d.ts.map +1 -1
  735. package/dest/update-checker/index.js +1 -0
  736. package/dest/update-checker/package_version.d.ts +6 -3
  737. package/dest/update-checker/package_version.d.ts.map +1 -1
  738. package/dest/update-checker/package_version.js +8 -19
  739. package/dest/validators/schemas.d.ts +147 -614
  740. package/dest/validators/schemas.d.ts.map +1 -1
  741. package/dest/validators/schemas.js +6 -4
  742. package/dest/validators/types.d.ts +20 -3
  743. package/dest/validators/types.d.ts.map +1 -1
  744. package/dest/versioning/versioning.js +1 -1
  745. package/dest/vks/verification_key.d.ts +4 -139
  746. package/dest/vks/verification_key.d.ts.map +1 -1
  747. package/dest/vks/verification_key.js +5 -126
  748. package/dest/world-state/genesis_data.d.ts +13 -0
  749. package/dest/world-state/genesis_data.d.ts.map +1 -0
  750. package/dest/world-state/genesis_data.js +7 -0
  751. package/dest/world-state/index.d.ts +2 -1
  752. package/dest/world-state/index.d.ts.map +1 -1
  753. package/dest/world-state/index.js +1 -0
  754. package/dest/world-state/world_state_revision.d.ts +11 -39
  755. package/dest/world-state/world_state_revision.d.ts.map +1 -1
  756. package/dest/world-state/world_state_revision.js +7 -21
  757. package/package.json +12 -11
  758. package/src/abi/abi.ts +78 -21
  759. package/src/abi/authorization_selector.ts +2 -8
  760. package/src/abi/buffer.ts +38 -5
  761. package/src/abi/contract_artifact.ts +11 -6
  762. package/src/abi/decoder.ts +23 -78
  763. package/src/abi/encoder.ts +42 -6
  764. package/src/abi/event_selector.ts +2 -8
  765. package/src/abi/function_selector.ts +4 -13
  766. package/src/abi/function_signature_decoder.ts +77 -0
  767. package/src/abi/index.ts +1 -0
  768. package/src/abi/note_selector.ts +3 -12
  769. package/src/abi/selector.ts +1 -1
  770. package/src/abi/utils.ts +6 -4
  771. package/src/avm/avm.ts +6 -1
  772. package/src/avm/index.ts +0 -5
  773. package/src/avm/message_pack.ts +12 -3
  774. package/src/avm/revert_code.ts +19 -39
  775. package/src/aztec-address/index.ts +50 -17
  776. package/src/block/attestation_info.ts +16 -11
  777. package/src/block/block_data.ts +3 -4
  778. package/src/block/block_hash.ts +21 -14
  779. package/src/block/block_parameter.ts +72 -4
  780. package/src/block/index.ts +0 -1
  781. package/src/block/l2_block_info.ts +8 -6
  782. package/src/block/l2_block_source.ts +262 -146
  783. package/src/block/l2_block_stream/event_driven_l2_block_stream.ts +207 -0
  784. package/src/block/l2_block_stream/index.ts +1 -0
  785. package/src/block/l2_block_stream/interfaces.ts +99 -9
  786. package/src/block/l2_block_stream/l2_block_stream.ts +229 -177
  787. package/src/block/l2_block_stream/l2_tips_memory_store.ts +17 -41
  788. package/src/block/l2_block_stream/l2_tips_store_base.ts +85 -60
  789. package/src/block/proposal/attestations_and_signers.ts +85 -24
  790. package/src/block/test/l2_tips_store_test_suite.ts +271 -22
  791. package/src/block/validate_block_result.ts +48 -2
  792. package/src/checkpoint/checkpoint.ts +13 -3
  793. package/src/checkpoint/checkpoint_data.ts +44 -4
  794. package/src/checkpoint/checkpoint_reexecution_tracker.ts +167 -0
  795. package/src/checkpoint/digest.ts +28 -0
  796. package/src/checkpoint/index.ts +4 -0
  797. package/src/checkpoint/previous_checkpoint_out_hashes.ts +61 -0
  798. package/src/checkpoint/simulation_overrides.ts +171 -0
  799. package/src/checkpoint/validate.ts +16 -6
  800. package/src/config/chain-config.ts +13 -16
  801. package/src/config/index.ts +1 -1
  802. package/src/config/network-consensus-config.ts +291 -0
  803. package/src/config/sequencer-config.ts +68 -9
  804. package/src/contract/complete_address.ts +7 -3
  805. package/src/contract/contract_address.ts +10 -9
  806. package/src/contract/contract_class.ts +3 -2
  807. package/src/contract/contract_instance.ts +73 -3
  808. package/src/contract/index.ts +0 -3
  809. package/src/contract/interfaces/contract_class.ts +2 -82
  810. package/src/contract/interfaces/contract_data_source.ts +2 -4
  811. package/src/contract/interfaces/contract_instance.ts +32 -10
  812. package/src/contract/interfaces/node-info.ts +11 -0
  813. package/src/contract/partial_address.ts +8 -2
  814. package/src/contract/private_function.ts +3 -1
  815. package/src/database-version/version_manager.ts +113 -6
  816. package/src/deserialization/index.ts +35 -2
  817. package/src/epoch-helpers/index.ts +24 -0
  818. package/src/file-store/factory.ts +20 -4
  819. package/src/file-store/http.ts +29 -10
  820. package/src/file-store/index.ts +2 -0
  821. package/src/file-store/memory.ts +94 -0
  822. package/src/gas/README.md +123 -0
  823. package/src/gas/fee_math.ts +120 -0
  824. package/src/gas/gas.ts +8 -3
  825. package/src/gas/gas_fees.ts +26 -13
  826. package/src/gas/gas_settings.ts +63 -15
  827. package/src/gas/index.ts +2 -0
  828. package/src/gas/tx_gas_limits.ts +123 -0
  829. package/src/ha-signing/config.ts +37 -23
  830. package/src/ha-signing/index.ts +3 -1
  831. package/src/ha-signing/local_config.ts +21 -2
  832. package/src/ha-signing/types.ts +48 -34
  833. package/src/hash/hash.ts +34 -2
  834. package/src/interfaces/api_limit.ts +1 -1
  835. package/src/interfaces/archiver.ts +88 -93
  836. package/src/interfaces/aztec-node-admin.ts +36 -21
  837. package/src/interfaces/aztec-node-debug.ts +92 -0
  838. package/src/interfaces/aztec-node.ts +398 -271
  839. package/src/interfaces/block-builder.ts +4 -0
  840. package/src/interfaces/block_response.ts +92 -0
  841. package/src/interfaces/chain_tips.ts +16 -0
  842. package/src/interfaces/checkpoint_parameter.ts +20 -0
  843. package/src/interfaces/checkpoint_response.ts +84 -0
  844. package/src/interfaces/client.ts +8 -1
  845. package/src/interfaces/configs.ts +67 -7
  846. package/src/interfaces/get_tx_by_hash_options.ts +14 -0
  847. package/src/interfaces/l1_publish_info.ts +40 -0
  848. package/src/interfaces/l2_logs_source.ts +13 -42
  849. package/src/interfaces/merkle_tree_operations.ts +11 -4
  850. package/src/interfaces/p2p-bootstrap.ts +2 -2
  851. package/src/interfaces/p2p.ts +59 -19
  852. package/src/interfaces/private_kernel_prover.ts +192 -13
  853. package/src/interfaces/prover-agent.ts +1 -1
  854. package/src/interfaces/prover-client.ts +3 -8
  855. package/src/interfaces/prover-node.ts +36 -21
  856. package/src/interfaces/proving-job-source.ts +4 -4
  857. package/src/interfaces/proving-job.ts +6 -6
  858. package/src/interfaces/public_storage_override.ts +26 -0
  859. package/src/interfaces/server.ts +5 -2
  860. package/src/interfaces/server_circuit_prover.ts +2 -2
  861. package/src/interfaces/slasher.ts +17 -10
  862. package/src/interfaces/tx_provider.ts +6 -0
  863. package/src/interfaces/validator.ts +45 -15
  864. package/src/interfaces/world_state.ts +15 -1
  865. package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +22 -112
  866. package/src/kernel/hints/index.ts +0 -1
  867. package/src/kernel/hints/key_validation_request.ts +18 -16
  868. package/src/kernel/hints/read_request.ts +1 -1
  869. package/src/kernel/index.ts +9 -1
  870. package/src/kernel/log_hash.ts +36 -13
  871. package/src/kernel/note_hash.ts +1 -1
  872. package/src/kernel/nullifier.ts +1 -1
  873. package/src/kernel/private_circuit_public_inputs.ts +12 -1
  874. package/src/kernel/private_context_inputs.ts +10 -3
  875. package/src/kernel/private_kernel_circuit_public_inputs.ts +9 -7
  876. package/src/kernel/private_kernel_init_2_circuit_private_inputs.ts +46 -0
  877. package/src/kernel/private_kernel_init_3_circuit_private_inputs.ts +49 -0
  878. package/src/kernel/private_kernel_init_4_circuit_private_inputs.ts +52 -0
  879. package/src/kernel/private_kernel_init_5_circuit_private_inputs.ts +55 -0
  880. package/src/kernel/private_kernel_init_circuit_private_inputs.ts +0 -6
  881. package/src/kernel/private_kernel_inner_2_circuit_private_inputs.ts +29 -0
  882. package/src/kernel/private_kernel_inner_3_circuit_private_inputs.ts +31 -0
  883. package/src/kernel/private_kernel_inner_4_circuit_private_inputs.ts +39 -0
  884. package/src/kernel/private_kernel_inner_5_circuit_private_inputs.ts +42 -0
  885. package/src/kernel/private_kernel_prover_output.ts +4 -0
  886. package/src/kernel/private_kernel_reset_dimensions.ts +15 -5
  887. package/src/kernel/private_kernel_reset_tail_circuit_private_inputs.ts +69 -0
  888. package/src/kernel/private_kernel_simulated_output.ts +0 -7
  889. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +29 -14
  890. package/src/kernel/private_log_data.ts +4 -1
  891. package/src/kernel/private_to_avm_accumulated_data.ts +16 -5
  892. package/src/kernel/private_to_public_accumulated_data.ts +9 -3
  893. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +10 -4
  894. package/src/kernel/private_to_rollup_accumulated_data.ts +8 -3
  895. package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +9 -9
  896. package/src/kernel/public_call_request.ts +22 -7
  897. package/src/kernel/utils/index.ts +0 -1
  898. package/src/keys/derivation.ts +81 -19
  899. package/src/keys/public_key.ts +26 -2
  900. package/src/keys/public_keys.ts +124 -110
  901. package/src/kv-store/config.ts +3 -10
  902. package/src/l1-contracts/index.ts +1 -1
  903. package/src/logs/app_tagging_secret.ts +169 -0
  904. package/src/logs/app_tagging_secret_kind.ts +21 -0
  905. package/src/logs/contract_class_log.ts +15 -14
  906. package/src/logs/index.ts +6 -6
  907. package/src/logs/log_cursor.ts +110 -0
  908. package/src/logs/log_result.ts +104 -0
  909. package/src/logs/logs_query.ts +138 -0
  910. package/src/logs/message_context.ts +6 -50
  911. package/src/logs/pending_tagged_log.ts +6 -35
  912. package/src/logs/pre_tag.ts +3 -6
  913. package/src/logs/private_log.ts +9 -3
  914. package/src/logs/query_all_logs_by_tags.ts +98 -0
  915. package/src/logs/shared_secret_derivation.ts +37 -10
  916. package/src/logs/siloed_tag.ts +20 -11
  917. package/src/logs/tag.ts +8 -8
  918. package/src/logs/tagging_index_range.ts +4 -10
  919. package/src/messaging/append_l1_to_l2_messages.ts +21 -0
  920. package/src/messaging/index.ts +1 -0
  921. package/src/messaging/l1_to_l2_message.ts +12 -9
  922. package/src/messaging/l2_to_l1_membership.ts +108 -19
  923. package/src/messaging/l2_to_l1_message.ts +29 -9
  924. package/src/noir/index.ts +2 -0
  925. package/src/note/note_dao.ts +1 -4
  926. package/src/p2p/attestation_utils.ts +8 -1
  927. package/src/p2p/block_proposal.ts +111 -36
  928. package/src/p2p/checkpoint_attestation.ts +38 -30
  929. package/src/p2p/checkpoint_proposal.ts +128 -73
  930. package/src/p2p/consensus_payload.ts +59 -28
  931. package/src/p2p/gossipable.ts +4 -4
  932. package/src/p2p/index.ts +0 -1
  933. package/src/p2p/signature_utils.ts +117 -23
  934. package/src/p2p/signed_txs.ts +46 -28
  935. package/src/parity/parity_base_private_inputs.ts +10 -4
  936. package/src/parity/parity_public_inputs.ts +9 -2
  937. package/src/proofs/chonk_proof.ts +132 -12
  938. package/src/rollup/avm_proof_data.ts +2 -2
  939. package/src/rollup/block_headers_hash.ts +11 -2
  940. package/src/rollup/block_rollup_public_inputs.ts +13 -0
  941. package/src/rollup/checkpoint_header.ts +16 -2
  942. package/src/rollup/checkpoint_rollup_public_inputs.ts +10 -0
  943. package/src/schemas/schemas.ts +6 -1
  944. package/src/slashing/helpers.ts +13 -9
  945. package/src/slashing/index.ts +1 -2
  946. package/src/slashing/serialization.ts +1 -81
  947. package/src/slashing/types.ts +24 -49
  948. package/src/slashing/{tally.ts → votes.ts} +1 -1
  949. package/src/stats/stats.ts +10 -2
  950. package/src/tests/factories.ts +111 -157
  951. package/src/tests/mocks.ts +72 -71
  952. package/src/timetable/README.md +609 -0
  953. package/src/timetable/budgets.ts +87 -0
  954. package/src/timetable/build_proposer_timetable.ts +42 -0
  955. package/src/timetable/consensus_timetable.ts +126 -0
  956. package/src/timetable/index.ts +4 -66
  957. package/src/timetable/proposer_timetable.ts +190 -0
  958. package/src/timetable/timetable-example.svg +108 -0
  959. package/src/trees/append_only_tree_snapshot.ts +8 -3
  960. package/src/trees/nullifier_leaf.ts +4 -0
  961. package/src/trees/nullifier_membership_witness.ts +0 -21
  962. package/src/trees/public_data_witness.ts +0 -31
  963. package/src/tx/block_header.ts +10 -5
  964. package/src/tx/capsule.ts +10 -2
  965. package/src/tx/execution_payload.ts +2 -1
  966. package/src/tx/fee_provider.ts +10 -0
  967. package/src/tx/global_variable_builder.ts +3 -20
  968. package/src/tx/global_variables.ts +12 -20
  969. package/src/tx/hashed_values.ts +8 -3
  970. package/src/tx/index.ts +1 -1
  971. package/src/tx/indexed_tx_effect.ts +18 -6
  972. package/src/tx/partial_state_reference.ts +8 -3
  973. package/src/tx/private_tx_constant_data.ts +25 -2
  974. package/src/tx/profiling.ts +6 -4
  975. package/src/tx/proven_tx.ts +6 -0
  976. package/src/tx/public_call_request_with_calldata.ts +8 -3
  977. package/src/tx/simulated_tx.ts +22 -21
  978. package/src/tx/state_reference.ts +9 -4
  979. package/src/tx/tree_snapshots.ts +9 -4
  980. package/src/tx/tx.ts +60 -24
  981. package/src/tx/tx_constant_data.ts +8 -3
  982. package/src/tx/tx_context.ts +8 -3
  983. package/src/tx/tx_hash.ts +20 -5
  984. package/src/tx/tx_receipt.ts +265 -85
  985. package/src/tx/validator/error_texts.ts +10 -1
  986. package/src/tx/validator/tx_validator.ts +1 -5
  987. package/src/types/shared.ts +8 -13
  988. package/src/update-checker/dev_version.ts +2 -0
  989. package/src/update-checker/index.ts +1 -0
  990. package/src/update-checker/package_version.ts +10 -23
  991. package/src/validators/schemas.ts +6 -4
  992. package/src/validators/types.ts +21 -2
  993. package/src/versioning/versioning.ts +1 -1
  994. package/src/vks/verification_key.ts +5 -184
  995. package/src/world-state/genesis_data.ts +27 -0
  996. package/src/world-state/index.ts +1 -0
  997. package/src/world-state/world_state_revision.ts +9 -34
  998. package/dest/abi/mocked_keys.d.ts +0 -2
  999. package/dest/abi/mocked_keys.d.ts.map +0 -1
  1000. package/dest/abi/mocked_keys.js +0 -1
  1001. package/dest/avm/contract_storage_read.d.ts +0 -58
  1002. package/dest/avm/contract_storage_read.d.ts.map +0 -1
  1003. package/dest/avm/contract_storage_read.js +0 -65
  1004. package/dest/avm/contract_storage_update_request.d.ts +0 -65
  1005. package/dest/avm/contract_storage_update_request.d.ts.map +0 -1
  1006. package/dest/avm/contract_storage_update_request.js +0 -80
  1007. package/dest/avm/public_call_stack_item_compressed.d.ts +0 -43
  1008. package/dest/avm/public_call_stack_item_compressed.d.ts.map +0 -1
  1009. package/dest/avm/public_call_stack_item_compressed.js +0 -70
  1010. package/dest/avm/public_data_update_request.d.ts +0 -62
  1011. package/dest/avm/public_data_update_request.d.ts.map +0 -1
  1012. package/dest/avm/public_data_update_request.js +0 -67
  1013. package/dest/avm/public_inner_call_request.d.ts +0 -50
  1014. package/dest/avm/public_inner_call_request.d.ts.map +0 -1
  1015. package/dest/avm/public_inner_call_request.js +0 -74
  1016. package/dest/block/checkpointed_l2_block.d.ts +0 -150
  1017. package/dest/block/checkpointed_l2_block.d.ts.map +0 -1
  1018. package/dest/block/checkpointed_l2_block.js +0 -46
  1019. package/dest/config/pipelining-config.d.ts +0 -19
  1020. package/dest/config/pipelining-config.d.ts.map +0 -1
  1021. package/dest/config/pipelining-config.js +0 -18
  1022. package/dest/contract/deployment_info.d.ts +0 -24
  1023. package/dest/contract/deployment_info.d.ts.map +0 -1
  1024. package/dest/contract/deployment_info.js +0 -3
  1025. package/dest/contract/private_function_membership_proof.d.ts +0 -32
  1026. package/dest/contract/private_function_membership_proof.d.ts.map +0 -1
  1027. package/dest/contract/private_function_membership_proof.js +0 -124
  1028. package/dest/contract/utility_function_membership_proof.d.ts +0 -27
  1029. package/dest/contract/utility_function_membership_proof.d.ts.map +0 -1
  1030. package/dest/contract/utility_function_membership_proof.js +0 -87
  1031. package/dest/interfaces/epoch-prover.d.ts +0 -57
  1032. package/dest/interfaces/epoch-prover.d.ts.map +0 -1
  1033. package/dest/interfaces/epoch-prover.js +0 -1
  1034. package/dest/interfaces/get_logs_response.d.ts +0 -97
  1035. package/dest/interfaces/get_logs_response.d.ts.map +0 -1
  1036. package/dest/interfaces/get_logs_response.js +0 -12
  1037. package/dest/interfaces/prover-coordination.d.ts +0 -15
  1038. package/dest/interfaces/prover-coordination.d.ts.map +0 -1
  1039. package/dest/interfaces/prover-coordination.js +0 -1
  1040. package/dest/kernel/hints/tree_leaf_read_request.d.ts +0 -14
  1041. package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +0 -1
  1042. package/dest/kernel/hints/tree_leaf_read_request.js +0 -33
  1043. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +0 -47
  1044. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +0 -1
  1045. package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +0 -38
  1046. package/dest/kernel/utils/optional_number.d.ts +0 -31
  1047. package/dest/kernel/utils/optional_number.d.ts.map +0 -1
  1048. package/dest/kernel/utils/optional_number.js +0 -42
  1049. package/dest/l1-contracts/slash_factory.d.ts +0 -45
  1050. package/dest/l1-contracts/slash_factory.d.ts.map +0 -1
  1051. package/dest/l1-contracts/slash_factory.js +0 -158
  1052. package/dest/logs/extended_contract_class_log.d.ts +0 -51
  1053. package/dest/logs/extended_contract_class_log.d.ts.map +0 -1
  1054. package/dest/logs/extended_contract_class_log.js +0 -67
  1055. package/dest/logs/extended_directional_app_tagging_secret.d.ts +0 -47
  1056. package/dest/logs/extended_directional_app_tagging_secret.d.ts.map +0 -1
  1057. package/dest/logs/extended_directional_app_tagging_secret.js +0 -72
  1058. package/dest/logs/extended_public_log.d.ts +0 -106
  1059. package/dest/logs/extended_public_log.d.ts.map +0 -1
  1060. package/dest/logs/extended_public_log.js +0 -73
  1061. package/dest/logs/log_filter.d.ts +0 -25
  1062. package/dest/logs/log_filter.d.ts.map +0 -1
  1063. package/dest/logs/log_filter.js +0 -12
  1064. package/dest/logs/log_id.d.ts +0 -85
  1065. package/dest/logs/log_id.d.ts.map +0 -1
  1066. package/dest/logs/log_id.js +0 -94
  1067. package/dest/logs/tx_scoped_l2_log.d.ts +0 -51
  1068. package/dest/logs/tx_scoped_l2_log.d.ts.map +0 -1
  1069. package/dest/logs/tx_scoped_l2_log.js +0 -77
  1070. package/dest/p2p/interface.d.ts +0 -5
  1071. package/dest/p2p/interface.d.ts.map +0 -1
  1072. package/dest/p2p/interface.js +0 -1
  1073. package/dest/slashing/empire.d.ts +0 -31
  1074. package/dest/slashing/empire.d.ts.map +0 -1
  1075. package/dest/slashing/empire.js +0 -87
  1076. package/dest/tx/validator/empty_validator.d.ts +0 -5
  1077. package/dest/tx/validator/empty_validator.d.ts.map +0 -1
  1078. package/dest/tx/validator/empty_validator.js +0 -7
  1079. package/src/abi/mocked_keys.ts +0 -2
  1080. package/src/avm/contract_storage_read.ts +0 -77
  1081. package/src/avm/contract_storage_update_request.ts +0 -93
  1082. package/src/avm/public_call_stack_item_compressed.ts +0 -113
  1083. package/src/avm/public_data_update_request.ts +0 -106
  1084. package/src/avm/public_inner_call_request.ts +0 -85
  1085. package/src/block/checkpointed_l2_block.ts +0 -70
  1086. package/src/config/pipelining-config.ts +0 -31
  1087. package/src/contract/deployment_info.ts +0 -25
  1088. package/src/contract/private_function_membership_proof.ts +0 -167
  1089. package/src/contract/utility_function_membership_proof.ts +0 -118
  1090. package/src/interfaces/epoch-prover.ts +0 -72
  1091. package/src/interfaces/get_logs_response.ts +0 -35
  1092. package/src/interfaces/prover-coordination.ts +0 -17
  1093. package/src/kernel/hints/tree_leaf_read_request.ts +0 -35
  1094. package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +0 -58
  1095. package/src/kernel/utils/optional_number.ts +0 -50
  1096. package/src/l1-contracts/slash_factory.ts +0 -180
  1097. package/src/logs/extended_contract_class_log.ts +0 -87
  1098. package/src/logs/extended_directional_app_tagging_secret.ts +0 -87
  1099. package/src/logs/extended_public_log.ts +0 -94
  1100. package/src/logs/log_filter.ts +0 -36
  1101. package/src/logs/log_id.ts +0 -125
  1102. package/src/logs/tx_scoped_l2_log.ts +0 -114
  1103. package/src/p2p/interface.ts +0 -4
  1104. package/src/slashing/empire.ts +0 -104
  1105. package/src/tx/validator/empty_validator.ts +0 -7
@@ -1,35 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- import { ExtendedContractClassLog } from '../logs/extended_contract_class_log.js';
4
- import { ExtendedPublicLog } from '../logs/extended_public_log.js';
5
- import { zodFor } from '../schemas/index.js';
6
-
7
- /** Response for the getContractClassLogs archiver call. */
8
- export type GetContractClassLogsResponse = {
9
- /** An array of ExtendedContractClassLog elements. */
10
- logs: ExtendedContractClassLog[];
11
- /** Indicates if a limit has been reached. */
12
- maxLogsHit: boolean;
13
- };
14
-
15
- export const GetContractClassLogsResponseSchema = zodFor<GetContractClassLogsResponse>()(
16
- z.object({
17
- logs: z.array(ExtendedContractClassLog.schema),
18
- maxLogsHit: z.boolean(),
19
- }),
20
- );
21
-
22
- /** Response for the getPublicLogs archiver call. */
23
- export type GetPublicLogsResponse = {
24
- /** An array of ExtendedPublicLog elements. */
25
- logs: ExtendedPublicLog[];
26
- /** Indicates if a limit has been reached. */
27
- maxLogsHit: boolean;
28
- };
29
-
30
- export const GetPublicLogsResponseSchema = zodFor<GetPublicLogsResponse>()(
31
- z.object({
32
- logs: z.array(ExtendedPublicLog.schema),
33
- maxLogsHit: z.boolean(),
34
- }),
35
- );
@@ -1,17 +0,0 @@
1
- import { Tx } from '../tx/tx.js';
2
- import { TxHash } from '../tx/tx_hash.js';
3
- import type { P2PClient } from './p2p.js';
4
-
5
- /** Provides basic operations for ProverNodes to interact with other nodes in the network. */
6
- export interface ProverCoordination {
7
- /**
8
- * Returns a set of transactions given their hashes if available.
9
- * @param txHashes - The hashes of the transactions, used as an ID.
10
- * @returns The transactions found, no necessarily in the same order as the hashes.
11
- */
12
- getTxsByHash(txHashes: TxHash[]): Promise<Tx[]>;
13
-
14
- gatherTxs(txHashes: TxHash[]): Promise<void>;
15
-
16
- getP2PClient(): P2PClient | undefined;
17
- }
@@ -1,35 +0,0 @@
1
- import { Fr } from '@aztec/foundation/curves/bn254';
2
- import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
-
4
- export class TreeLeafReadRequest {
5
- constructor(
6
- public value: Fr,
7
- public leafIndex: Fr,
8
- ) {}
9
-
10
- toBuffer(): Buffer {
11
- return serializeToBuffer(this.value, this.leafIndex);
12
- }
13
-
14
- static fromBuffer(buffer: Buffer | BufferReader) {
15
- const reader = BufferReader.asReader(buffer);
16
- return new TreeLeafReadRequest(Fr.fromBuffer(reader), Fr.fromBuffer(reader));
17
- }
18
-
19
- toFields(): Fr[] {
20
- return [this.value, this.leafIndex];
21
- }
22
-
23
- static fromFields(fields: Fr[] | FieldReader) {
24
- const reader = FieldReader.asReader(fields);
25
- return new TreeLeafReadRequest(reader.readField(), reader.readField());
26
- }
27
-
28
- isEmpty() {
29
- return this.value.isZero() && this.leafIndex.isZero();
30
- }
31
-
32
- static empty() {
33
- return new TreeLeafReadRequest(Fr.zero(), Fr.zero());
34
- }
35
- }
@@ -1,58 +0,0 @@
1
- import { BufferReader, bigintToUInt64BE, serializeToBuffer } from '@aztec/foundation/serialize';
2
-
3
- import type { UInt64 } from '../types/shared.js';
4
- import { PaddedSideEffectAmounts } from './padded_side_effects.js';
5
- import { PrivateKernelData } from './private_kernel_data.js';
6
-
7
- /**
8
- * Input to the private kernel circuit - tail call.
9
- */
10
- export class PrivateKernelTailCircuitPrivateInputs {
11
- constructor(
12
- /**
13
- * The previous kernel data
14
- */
15
- public previousKernel: PrivateKernelData,
16
- /**
17
- * The number of the padded side effects.
18
- */
19
- public paddedSideEffectAmounts: PaddedSideEffectAmounts,
20
- /**
21
- * The timestamp by which the transaction must be included in a block.
22
- */
23
- public expirationTimestampUpperBound: UInt64,
24
- ) {}
25
-
26
- isForPublic() {
27
- return (
28
- this.previousKernel.publicInputs.end.publicCallRequests.claimedLength > 0 ||
29
- !this.previousKernel.publicInputs.publicTeardownCallRequest.isEmpty()
30
- );
31
- }
32
-
33
- /**
34
- * Serialize this as a buffer.
35
- * @returns The buffer.
36
- */
37
- toBuffer() {
38
- return serializeToBuffer(
39
- this.previousKernel,
40
- this.paddedSideEffectAmounts,
41
- bigintToUInt64BE(this.expirationTimestampUpperBound),
42
- );
43
- }
44
-
45
- /**
46
- * Deserializes from a buffer or reader.
47
- * @param buffer - Buffer or reader to read from.
48
- * @returns The deserialized instance.
49
- */
50
- static fromBuffer(buffer: Buffer | BufferReader): PrivateKernelTailCircuitPrivateInputs {
51
- const reader = BufferReader.asReader(buffer);
52
- return new PrivateKernelTailCircuitPrivateInputs(
53
- reader.readObject(PrivateKernelData),
54
- reader.readObject(PaddedSideEffectAmounts),
55
- reader.readUInt64(),
56
- );
57
- }
58
- }
@@ -1,50 +0,0 @@
1
- import type { Fr } from '@aztec/foundation/curves/bn254';
2
- import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
3
- import type { FieldsOf } from '@aztec/foundation/types';
4
-
5
- export class OptionalNumber {
6
- constructor(
7
- /**
8
- * Whether a value was set.
9
- */
10
- public isSome: boolean,
11
- /**
12
- * The actual number, if isSome is true.
13
- */
14
- public value: number,
15
- ) {}
16
-
17
- getSize() {
18
- return this.toBuffer().length;
19
- }
20
-
21
- static getFields(fields: FieldsOf<OptionalNumber>) {
22
- return [fields.isSome, fields.value] as const;
23
- }
24
-
25
- toBuffer() {
26
- return serializeToBuffer(...OptionalNumber.getFields(this));
27
- }
28
-
29
- static fromBuffer(buffer: Buffer | BufferReader): OptionalNumber {
30
- const reader = BufferReader.asReader(buffer);
31
- return new OptionalNumber(reader.readBoolean(), reader.readNumber());
32
- }
33
-
34
- toFields(): Fr[] {
35
- return serializeToFields(...OptionalNumber.getFields(this));
36
- }
37
-
38
- static fromFields(fields: Fr[] | FieldReader): OptionalNumber {
39
- const reader = FieldReader.asReader(fields);
40
- return new OptionalNumber(reader.readBoolean(), reader.readU32());
41
- }
42
-
43
- isEmpty(): boolean {
44
- return !this.isSome && !this.value;
45
- }
46
-
47
- static empty() {
48
- return new OptionalNumber(false, 0);
49
- }
50
- }
@@ -1,180 +0,0 @@
1
- import type { L1TxRequest } from '@aztec/ethereum/l1-tx-utils';
2
- import type { ViemClient } from '@aztec/ethereum/types';
3
- import { tryExtractEvent } from '@aztec/ethereum/utils';
4
- import { maxBigint } from '@aztec/foundation/bigint';
5
- import { EthAddress } from '@aztec/foundation/eth-address';
6
- import { createLogger } from '@aztec/foundation/log';
7
- import { SlashFactoryAbi } from '@aztec/l1-artifacts/SlashFactoryAbi';
8
-
9
- import { type GetContractReturnType, type Hex, type Log, encodeFunctionData, getContract } from 'viem';
10
-
11
- import type { L1RollupConstants } from '../epoch-helpers/index.js';
12
- import {
13
- OffenseToBigInt,
14
- type SlashPayload,
15
- type ValidatorSlash,
16
- type ValidatorSlashOffense,
17
- bigIntToOffense,
18
- } from '../slashing/index.js';
19
-
20
- export class SlashFactoryContract {
21
- private readonly logger = createLogger('contracts:slash_factory');
22
- private readonly contract: GetContractReturnType<typeof SlashFactoryAbi, ViemClient>;
23
-
24
- constructor(
25
- public readonly client: ViemClient,
26
- address: Hex | EthAddress,
27
- ) {
28
- this.contract = getContract({
29
- address: typeof address === 'string' ? address : address.toString(),
30
- abi: SlashFactoryAbi,
31
- client,
32
- });
33
- }
34
-
35
- public get address() {
36
- return EthAddress.fromString(this.contract.address);
37
- }
38
-
39
- public buildCreatePayloadRequest(slashes: ValidatorSlash[]): L1TxRequest {
40
- const sorted = this.sortSlashes(slashes);
41
-
42
- return {
43
- to: this.contract.address,
44
- abi: SlashFactoryAbi,
45
- data: encodeFunctionData({
46
- abi: SlashFactoryAbi,
47
- functionName: 'createSlashPayload',
48
- args: [
49
- sorted.map(d => d.validator.toString()),
50
- sorted.map(d => d.amount),
51
- sorted.map(d => d.offenses.map(packValidatorSlashOffense)),
52
- ],
53
- }),
54
- };
55
- }
56
-
57
- /** Tries to extract a SlashPayloadCreated event from the given logs. */
58
- public tryExtractSlashPayloadCreatedEvent(logs: Log[]) {
59
- return tryExtractEvent(logs, this.address.toString(), SlashFactoryAbi, 'SlashPayloadCreated');
60
- }
61
-
62
- public async getSlashPayloadCreatedEvents(): Promise<SlashPayload[]> {
63
- const events = await this.contract.getEvents.SlashPayloadCreated();
64
- return Promise.all(
65
- events.map(async event => {
66
- const { validators, amounts, offenses } = event.args;
67
- const slashes: ValidatorSlash[] = validators!.map((validator, i) => ({
68
- validator: EthAddress.fromString(validator),
69
- amount: amounts![i],
70
- offenses: offenses![i].map(unpackValidatorSlashOffense),
71
- }));
72
-
73
- const block = await this.client.getBlock({ blockNumber: event.blockNumber, includeTransactions: false });
74
- return { address: EthAddress.fromString(event.args.payloadAddress!), slashes, timestamp: block.timestamp };
75
- }),
76
- );
77
- }
78
-
79
- /**
80
- * Searches for a slash payload in the events emitted by the contract.
81
- * This method cannot query for historical payload events, it queries for payloads that have not yet expired.
82
- * @param payloadAddress The address of the payload to search for.
83
- * @param constants The L1 rollup constants needed for time calculations.
84
- */
85
- public async getSlashPayloadFromEvents(
86
- payloadAddress: EthAddress,
87
- settings: {
88
- logsBatchSize?: number;
89
- slashingRoundSize: number;
90
- slashingPayloadLifetimeInRounds: number;
91
- } & Pick<L1RollupConstants, 'slotDuration' | 'ethereumSlotDuration'>,
92
- ): Promise<Omit<SlashPayload, 'votes'> | undefined> {
93
- // We query for the log where the payload was emitted walking backwards until we go past payload expiration time
94
- // Note that all log queries require a block range, and RPC providers cap the max range (eg quicknode is 10k blocks).
95
- const { slashingRoundSize, slashingPayloadLifetimeInRounds, slotDuration, ethereumSlotDuration } = settings;
96
- const currentBlockNumber = await this.client.getBlockNumber({ cacheTime: 0 });
97
-
98
- // Why the +1 below? Just for good measure. Better err on the safe side.
99
- const earliestBlockNumber = maxBigint(
100
- 0n,
101
- currentBlockNumber -
102
- ((BigInt(slashingPayloadLifetimeInRounds) + 1n) * BigInt(slashingRoundSize) * BigInt(slotDuration)) /
103
- BigInt(ethereumSlotDuration),
104
- );
105
-
106
- this.logger.trace(
107
- `Starting search for slash payload ${payloadAddress} from block ${currentBlockNumber} with earliest block ${earliestBlockNumber}`,
108
- );
109
- const batchSize = BigInt(settings.logsBatchSize ?? 10000);
110
- let toBlock = currentBlockNumber;
111
-
112
- do {
113
- const fromBlock = maxBigint(earliestBlockNumber, toBlock - batchSize);
114
- this.logger.trace(`Searching for slash payload ${payloadAddress} in blocks ${fromBlock} to ${toBlock}`);
115
- const logs = await this.contract.getEvents.SlashPayloadCreated(
116
- { payloadAddress: payloadAddress.toString() },
117
- { fromBlock, toBlock, strict: true },
118
- );
119
-
120
- // We found the payload, return it
121
- if (logs.length > 0) {
122
- const log = logs[0];
123
- const { validators, amounts, offenses } = log.args;
124
-
125
- // Convert the data to our internal types
126
- const slashes: ValidatorSlash[] = validators!.map((validator, i) => ({
127
- validator: EthAddress.fromString(validator),
128
- amount: amounts![i],
129
- offenses: offenses![i].map(unpackValidatorSlashOffense),
130
- }));
131
-
132
- // Get the timestamp from the block
133
- const block = await this.client.getBlock({ blockNumber: log.blockNumber, includeTransactions: false });
134
-
135
- return { address: payloadAddress, slashes, timestamp: block.timestamp };
136
- }
137
-
138
- // If not found, we go back one batch
139
- toBlock -= batchSize;
140
- } while (toBlock > earliestBlockNumber);
141
-
142
- return undefined;
143
- }
144
-
145
- public async getAddressAndIsDeployed(
146
- slashes: ValidatorSlash[],
147
- ): Promise<{ address: EthAddress; salt: Hex; isDeployed: boolean }> {
148
- const sortedSlashes = this.sortSlashes(slashes);
149
- const [address, salt, isDeployed] = await this.contract.read.getAddressAndIsDeployed([
150
- sortedSlashes.map(s => s.validator.toString()),
151
- sortedSlashes.map(s => s.amount),
152
- sortedSlashes.map(s => s.offenses.map(packValidatorSlashOffense)),
153
- ]);
154
- return { address: EthAddress.fromString(address), salt, isDeployed };
155
- }
156
-
157
- private sortSlashes(slashes: ValidatorSlash[]): ValidatorSlash[] {
158
- const offenseSorter = (a: ValidatorSlashOffense, b: ValidatorSlashOffense) => {
159
- return a.epochOrSlot === b.epochOrSlot ? a.offenseType - b.offenseType : Number(a.epochOrSlot - b.epochOrSlot);
160
- };
161
- return [...slashes]
162
- .map(slash => ({ ...slash, offenses: [...slash.offenses].sort(offenseSorter) }))
163
- .sort((a, b) => a.validator.toString().localeCompare(b.validator.toString()));
164
- }
165
- }
166
-
167
- export function packValidatorSlashOffense(offense: ValidatorSlashOffense): bigint {
168
- const offenseId = OffenseToBigInt[offense.offenseType];
169
- if (offenseId > (1 << 8) - 1) {
170
- throw new Error(`Offense type ${offense.offenseType} cannot be packed into 8 bits`);
171
- }
172
- return (offenseId << 120n) + offense.epochOrSlot;
173
- }
174
-
175
- export function unpackValidatorSlashOffense(packed: bigint): ValidatorSlashOffense {
176
- const offenseId = (packed >> 120n) & 0xffn;
177
- const epochOrSlot = packed & ((1n << 120n) - 1n);
178
- const offenseType = bigIntToOffense(offenseId);
179
- return { epochOrSlot, offenseType };
180
- }
@@ -1,87 +0,0 @@
1
- import type { ZodFor } from '@aztec/foundation/schemas';
2
- import { BufferReader } from '@aztec/foundation/serialize';
3
- import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
4
- import type { FieldsOf } from '@aztec/foundation/types';
5
-
6
- import isEqual from 'lodash.isequal';
7
- import { z } from 'zod';
8
-
9
- import { ContractClassLog } from './contract_class_log.js';
10
- import { LogId } from './log_id.js';
11
-
12
- /**
13
- * Represents an individual contract class log entry extended with info about the block and tx it was emitted in.
14
- */
15
- export class ExtendedContractClassLog {
16
- constructor(
17
- /** Globally unique id of the log. */
18
- public readonly id: LogId,
19
- /** The data contents of the log. */
20
- public readonly log: ContractClassLog,
21
- ) {}
22
-
23
- static async random() {
24
- return new ExtendedContractClassLog(LogId.random(), await ContractClassLog.random());
25
- }
26
-
27
- static get schema(): ZodFor<ExtendedContractClassLog> {
28
- return z
29
- .object({
30
- id: LogId.schema,
31
- log: ContractClassLog.schema,
32
- })
33
- .transform(ExtendedContractClassLog.from);
34
- }
35
-
36
- static from(fields: FieldsOf<ExtendedContractClassLog>) {
37
- return new ExtendedContractClassLog(fields.id, fields.log);
38
- }
39
-
40
- /**
41
- * Serializes log to a buffer.
42
- * @returns A buffer containing the serialized log.
43
- */
44
- public toBuffer(): Buffer {
45
- return Buffer.concat([this.id.toBuffer(), this.log.toBuffer()]);
46
- }
47
-
48
- /**
49
- * Serializes log to a string.
50
- * @returns A string containing the serialized log.
51
- */
52
- public toString(): string {
53
- return bufferToHex(this.toBuffer());
54
- }
55
-
56
- /**
57
- * Checks if two ExtendedContractClassLog objects are equal.
58
- * @param other - Another ExtendedContractClassLog object to compare with.
59
- * @returns True if the two objects are equal, false otherwise.
60
- */
61
- public equals(other: ExtendedContractClassLog): boolean {
62
- return isEqual(this, other);
63
- }
64
-
65
- /**
66
- * Deserializes log from a buffer.
67
- * @param buffer - The buffer or buffer reader containing the log.
68
- * @returns Deserialized instance of `Log`.
69
- */
70
- public static fromBuffer(buffer: Buffer | BufferReader): ExtendedContractClassLog {
71
- const reader = BufferReader.asReader(buffer);
72
-
73
- const logId = LogId.fromBuffer(reader);
74
- const log = ContractClassLog.fromBuffer(reader);
75
-
76
- return new ExtendedContractClassLog(logId, log);
77
- }
78
-
79
- /**
80
- * Deserializes `ExtendedContractClassLog` object from a hex string representation.
81
- * @param data - A hex string representation of the log.
82
- * @returns An `ExtendedContractClassLog` object.
83
- */
84
- public static fromString(data: string): ExtendedContractClassLog {
85
- return ExtendedContractClassLog.fromBuffer(hexToBuffer(data));
86
- }
87
- }
@@ -1,87 +0,0 @@
1
- import { Grumpkin } from '@aztec/foundation/crypto/grumpkin';
2
- import { poseidon2Hash } from '@aztec/foundation/crypto/poseidon';
3
- import { type Fq, Fr } from '@aztec/foundation/curves/bn254';
4
- import type { Point } from '@aztec/foundation/curves/grumpkin';
5
-
6
- import { z } from 'zod';
7
-
8
- import { AztecAddress } from '../aztec-address/index.js';
9
- import type { CompleteAddress } from '../contract/complete_address.js';
10
- import { computeAddressSecret, computePreaddress } from '../keys/derivation.js';
11
-
12
- /**
13
- * Extended directional application tagging secret used for log tagging.
14
- *
15
- * "Extended" because it bundles the directional app tagging secret with the app (contract) address. This bundling was
16
- * done because where this type is used we commonly need access to both the secret and the address.
17
- *
18
- * "Directional" because the derived secret is bound to the recipient address: A→B differs from B→A even with the same
19
- * participants and app.
20
- *
21
- * Note: It's a bit unfortunate that this type resides in `stdlib` as the rest of the tagging functionality resides in
22
- * `pxe/src/tagging`. We need to use this type in `PreTag` that in turn is used by other types in stdlib hence there
23
- * doesn't seem to be a good way around this.
24
- */
25
- export class ExtendedDirectionalAppTaggingSecret {
26
- private constructor(
27
- public readonly secret: Fr,
28
- public readonly app: AztecAddress,
29
- ) {}
30
-
31
- /**
32
- * Derives shared tagging secret and from that, the app address and recipient derives the directional app tagging
33
- * secret.
34
- *
35
- * @param localAddress - The complete address of entity A in the shared tagging secret derivation scheme
36
- * @param localIvsk - The incoming viewing secret key of entity A
37
- * @param externalAddress - The address of entity B in the shared tagging secret derivation scheme
38
- * @param app - Contract address to silo the secret to
39
- * @param recipient - Recipient of the log. Defines the "direction of the secret".
40
- * @returns The secret that can be used along with an index to compute a tag to be included in a log.
41
- */
42
- static async compute(
43
- localAddress: CompleteAddress,
44
- localIvsk: Fq,
45
- externalAddress: AztecAddress,
46
- app: AztecAddress,
47
- recipient: AztecAddress,
48
- ): Promise<ExtendedDirectionalAppTaggingSecret> {
49
- const taggingSecretPoint = await computeSharedTaggingSecret(localAddress, localIvsk, externalAddress);
50
- const appTaggingSecret = await poseidon2Hash([taggingSecretPoint.x, taggingSecretPoint.y, app]);
51
- const directionalAppTaggingSecret = await poseidon2Hash([appTaggingSecret, recipient]);
52
-
53
- return new ExtendedDirectionalAppTaggingSecret(directionalAppTaggingSecret, app);
54
- }
55
-
56
- toString(): string {
57
- return `${this.secret.toString()}:${this.app.toString()}`;
58
- }
59
-
60
- static fromString(str: string): ExtendedDirectionalAppTaggingSecret {
61
- const [secretStr, appStr] = str.split(':');
62
- return new ExtendedDirectionalAppTaggingSecret(Fr.fromString(secretStr), AztecAddress.fromString(appStr));
63
- }
64
- }
65
-
66
- // Returns shared tagging secret computed with Diffie-Hellman key exchange.
67
- async function computeSharedTaggingSecret(
68
- localAddress: CompleteAddress,
69
- localIvsk: Fq,
70
- externalAddress: AztecAddress,
71
- ): Promise<Point> {
72
- const knownPreaddress = await computePreaddress(await localAddress.publicKeys.hash(), localAddress.partialAddress);
73
- // TODO: #8970 - Computation of address point from x coordinate might fail
74
- const externalAddressPoint = await externalAddress.toAddressPoint();
75
- // Given A (local complete address) -> B (external address) and h == preaddress
76
- // Compute shared secret as S = (h_A + local_ivsk_A) * Addr_Point_B
77
-
78
- // Beware! h_a + local_ivsk_a (also known as the address secret) can lead to an address point with a negative
79
- // y-coordinate, since there's two possible candidates computeAddressSecret takes care of selecting the one that
80
- // leads to a positive y-coordinate, which is the only valid address point
81
- return Grumpkin.mul(externalAddressPoint, await computeAddressSecret(knownPreaddress, localIvsk));
82
- }
83
-
84
- export const ExtendedDirectionalAppTaggingSecretSchema = z.object({
85
- secret: Fr.schema,
86
- app: AztecAddress.schema,
87
- });
@@ -1,94 +0,0 @@
1
- import { BufferReader } from '@aztec/foundation/serialize';
2
- import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
3
- import type { FieldsOf } from '@aztec/foundation/types';
4
-
5
- import isEqual from 'lodash.isequal';
6
- import { z } from 'zod';
7
-
8
- import { LogId } from './log_id.js';
9
- import { PublicLog } from './public_log.js';
10
-
11
- /**
12
- * Represents an individual public log entry extended with info about the block and tx it was emitted in.
13
- */
14
- export class ExtendedPublicLog {
15
- constructor(
16
- /** Globally unique id of the log. */
17
- public readonly id: LogId,
18
- /** The data contents of the log. */
19
- public readonly log: PublicLog,
20
- ) {}
21
-
22
- static async random() {
23
- return new ExtendedPublicLog(LogId.random(), await PublicLog.random());
24
- }
25
-
26
- static get schema() {
27
- return z
28
- .object({
29
- id: LogId.schema,
30
- log: PublicLog.schema,
31
- })
32
- .transform(ExtendedPublicLog.from);
33
- }
34
-
35
- static from(fields: FieldsOf<ExtendedPublicLog>) {
36
- return new ExtendedPublicLog(fields.id, fields.log);
37
- }
38
-
39
- /**
40
- * Serializes log to a buffer.
41
- * @returns A buffer containing the serialized log.
42
- */
43
- public toBuffer(): Buffer {
44
- return Buffer.concat([this.id.toBuffer(), this.log.toBuffer()]);
45
- }
46
-
47
- /**
48
- * Serializes log to a string.
49
- * @returns A string containing the serialized log.
50
- */
51
- public toString(): string {
52
- return bufferToHex(this.toBuffer());
53
- }
54
-
55
- /**
56
- * Serializes log to a human readable string.
57
- * @returns A human readable representation of the log.
58
- */
59
- public toHumanReadable(): string {
60
- return `${this.id.toHumanReadable()}, ${this.log.toHumanReadable()}`;
61
- }
62
-
63
- /**
64
- * Checks if two ExtendedPublicLog objects are equal.
65
- * @param other - Another ExtendedPublicLog object to compare with.
66
- * @returns True if the two objects are equal, false otherwise.
67
- */
68
- public equals(other: ExtendedPublicLog): boolean {
69
- return isEqual(this, other);
70
- }
71
-
72
- /**
73
- * Deserializes log from a buffer.
74
- * @param buffer - The buffer or buffer reader containing the log.
75
- * @returns Deserialized instance of `Log`.
76
- */
77
- public static fromBuffer(buffer: Buffer | BufferReader): ExtendedPublicLog {
78
- const reader = BufferReader.asReader(buffer);
79
-
80
- const logId = LogId.fromBuffer(reader);
81
- const log = PublicLog.fromBuffer(reader);
82
-
83
- return new ExtendedPublicLog(logId, log);
84
- }
85
-
86
- /**
87
- * Deserializes `ExtendedPublicLog` object from a hex string representation.
88
- * @param data - A hex string representation of the log.
89
- * @returns An `ExtendedPublicLog` object.
90
- */
91
- public static fromString(data: string): ExtendedPublicLog {
92
- return ExtendedPublicLog.fromBuffer(hexToBuffer(data));
93
- }
94
- }
@@ -1,36 +0,0 @@
1
- import type { Fr } from '@aztec/foundation/curves/bn254';
2
-
3
- import { z } from 'zod';
4
-
5
- import type { AztecAddress } from '../aztec-address/index.js';
6
- import { type ZodFor, schemas } from '../schemas/index.js';
7
- import { TxHash } from '../tx/tx_hash.js';
8
- import { LogId } from './log_id.js';
9
-
10
- /**
11
- * Log filter used to fetch L2 logs.
12
- * @remarks This filter is applied as an intersection of all it's params.
13
- */
14
- export type LogFilter = {
15
- /** Hash of a transaction from which to fetch the logs. */
16
- txHash?: TxHash;
17
- /** The block number from which to start fetching logs (inclusive). */
18
- fromBlock?: number;
19
- /** The block number until which to fetch logs (not inclusive). */
20
- toBlock?: number;
21
- /** Log id after which to start fetching logs. */
22
- afterLog?: LogId;
23
- /** The contract address to filter logs by. */
24
- contractAddress?: AztecAddress;
25
- /** The tag (first field of the log) to filter logs by. */
26
- tag?: Fr;
27
- };
28
-
29
- export const LogFilterSchema: ZodFor<LogFilter> = z.object({
30
- txHash: TxHash.schema.optional(),
31
- fromBlock: schemas.Integer.optional(),
32
- toBlock: schemas.Integer.optional(),
33
- afterLog: LogId.schema.optional(),
34
- contractAddress: schemas.AztecAddress.optional(),
35
- tag: schemas.Fr.optional(),
36
- });