@aztec/stdlib 6.0.0-nightly.20260605 → 6.0.0-nightly.20260721

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 (499) hide show
  1. package/dest/abi/buffer.d.ts +6 -2
  2. package/dest/abi/buffer.d.ts.map +1 -1
  3. package/dest/abi/buffer.js +13 -1
  4. package/dest/avm/avm.js +1 -1
  5. package/dest/avm/avm_proving_request.d.ts +70 -70
  6. package/dest/avm/index.d.ts +1 -6
  7. package/dest/avm/index.d.ts.map +1 -1
  8. package/dest/avm/index.js +0 -5
  9. package/dest/aztec-address/index.d.ts +35 -5
  10. package/dest/aztec-address/index.d.ts.map +1 -1
  11. package/dest/aztec-address/index.js +32 -8
  12. package/dest/block/attestation_info.d.ts +1 -1
  13. package/dest/block/attestation_info.d.ts.map +1 -1
  14. package/dest/block/attestation_info.js +7 -4
  15. package/dest/block/l2_block_source.d.ts +46 -23
  16. package/dest/block/l2_block_source.d.ts.map +1 -1
  17. package/dest/block/l2_block_source.js +15 -1
  18. package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts +39 -0
  19. package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts.map +1 -0
  20. package/dest/block/l2_block_stream/event_driven_l2_block_stream.js +165 -0
  21. package/dest/block/l2_block_stream/index.d.ts +2 -1
  22. package/dest/block/l2_block_stream/index.d.ts.map +1 -1
  23. package/dest/block/l2_block_stream/index.js +1 -0
  24. package/dest/block/l2_block_stream/interfaces.d.ts +81 -11
  25. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  26. package/dest/block/l2_block_stream/interfaces.js +25 -1
  27. package/dest/block/l2_block_stream/l2_block_stream.d.ts +23 -15
  28. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  29. package/dest/block/l2_block_stream/l2_block_stream.js +149 -152
  30. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +6 -12
  31. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  32. package/dest/block/l2_block_stream/l2_tips_memory_store.js +8 -32
  33. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +17 -18
  34. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
  35. package/dest/block/l2_block_stream/l2_tips_store_base.js +70 -58
  36. package/dest/block/proposal/attestations_and_signers.d.ts +19 -1
  37. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
  38. package/dest/block/proposal/attestations_and_signers.js +47 -7
  39. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  40. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  41. package/dest/block/test/l2_tips_store_test_suite.js +296 -37
  42. package/dest/block/validate_block_result.d.ts +16 -1
  43. package/dest/block/validate_block_result.d.ts.map +1 -1
  44. package/dest/block/validate_block_result.js +18 -3
  45. package/dest/checkpoint/checkpoint.js +2 -2
  46. package/dest/checkpoint/index.d.ts +2 -1
  47. package/dest/checkpoint/index.d.ts.map +1 -1
  48. package/dest/checkpoint/index.js +1 -0
  49. package/dest/checkpoint/simulation_overrides.d.ts +61 -0
  50. package/dest/checkpoint/simulation_overrides.d.ts.map +1 -0
  51. package/dest/checkpoint/simulation_overrides.js +98 -0
  52. package/dest/checkpoint/validate.d.ts +11 -3
  53. package/dest/checkpoint/validate.d.ts.map +1 -1
  54. package/dest/checkpoint/validate.js +9 -6
  55. package/dest/config/index.d.ts +2 -1
  56. package/dest/config/index.d.ts.map +1 -1
  57. package/dest/config/index.js +1 -0
  58. package/dest/config/network-consensus-config.d.ts +72 -0
  59. package/dest/config/network-consensus-config.d.ts.map +1 -0
  60. package/dest/config/network-consensus-config.js +223 -0
  61. package/dest/config/sequencer-config.d.ts +4 -2
  62. package/dest/config/sequencer-config.d.ts.map +1 -1
  63. package/dest/config/sequencer-config.js +22 -3
  64. package/dest/contract/contract_address.d.ts +5 -4
  65. package/dest/contract/contract_address.d.ts.map +1 -1
  66. package/dest/contract/contract_class.d.ts +1 -1
  67. package/dest/contract/contract_class.d.ts.map +1 -1
  68. package/dest/contract/contract_class.js +3 -2
  69. package/dest/contract/contract_instance.d.ts +16 -2
  70. package/dest/contract/contract_instance.d.ts.map +1 -1
  71. package/dest/contract/contract_instance.js +45 -0
  72. package/dest/contract/index.d.ts +1 -2
  73. package/dest/contract/index.d.ts.map +1 -1
  74. package/dest/contract/index.js +0 -1
  75. package/dest/contract/interfaces/contract_data_source.d.ts +3 -5
  76. package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
  77. package/dest/contract/interfaces/contract_instance.d.ts +71 -10
  78. package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
  79. package/dest/contract/interfaces/contract_instance.js +7 -2
  80. package/dest/contract/interfaces/node-info.d.ts +11 -1
  81. package/dest/contract/interfaces/node-info.d.ts.map +1 -1
  82. package/dest/contract/interfaces/node-info.js +7 -1
  83. package/dest/contract/partial_address.d.ts +9 -3
  84. package/dest/contract/partial_address.d.ts.map +1 -1
  85. package/dest/contract/partial_address.js +8 -2
  86. package/dest/database-version/version_manager.d.ts +18 -4
  87. package/dest/database-version/version_manager.d.ts.map +1 -1
  88. package/dest/database-version/version_manager.js +76 -6
  89. package/dest/deserialization/index.d.ts +35 -3
  90. package/dest/deserialization/index.d.ts.map +1 -1
  91. package/dest/deserialization/index.js +32 -1
  92. package/dest/file-store/factory.d.ts +1 -1
  93. package/dest/file-store/factory.d.ts.map +1 -1
  94. package/dest/file-store/factory.js +7 -0
  95. package/dest/file-store/index.d.ts +2 -1
  96. package/dest/file-store/index.d.ts.map +1 -1
  97. package/dest/file-store/index.js +1 -0
  98. package/dest/file-store/memory.d.ts +24 -0
  99. package/dest/file-store/memory.d.ts.map +1 -0
  100. package/dest/file-store/memory.js +80 -0
  101. package/dest/gas/gas_settings.d.ts +7 -13
  102. package/dest/gas/gas_settings.d.ts.map +1 -1
  103. package/dest/gas/gas_settings.js +9 -16
  104. package/dest/gas/index.d.ts +2 -1
  105. package/dest/gas/index.d.ts.map +1 -1
  106. package/dest/gas/index.js +1 -0
  107. package/dest/gas/tx_gas_limits.d.ts +72 -0
  108. package/dest/gas/tx_gas_limits.d.ts.map +1 -0
  109. package/dest/gas/tx_gas_limits.js +85 -0
  110. package/dest/ha-signing/config.d.ts +19 -5
  111. package/dest/ha-signing/config.d.ts.map +1 -1
  112. package/dest/ha-signing/config.js +9 -3
  113. package/dest/ha-signing/local_config.d.ts +10 -2
  114. package/dest/ha-signing/local_config.d.ts.map +1 -1
  115. package/dest/ha-signing/local_config.js +8 -2
  116. package/dest/interfaces/archiver.d.ts +7 -9
  117. package/dest/interfaces/archiver.d.ts.map +1 -1
  118. package/dest/interfaces/archiver.js +3 -2
  119. package/dest/interfaces/aztec-node-admin.d.ts +24 -17
  120. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  121. package/dest/interfaces/aztec-node-admin.js +1 -1
  122. package/dest/interfaces/aztec-node-debug.d.ts +40 -2
  123. package/dest/interfaces/aztec-node-debug.d.ts.map +1 -1
  124. package/dest/interfaces/aztec-node-debug.js +29 -1
  125. package/dest/interfaces/aztec-node.d.ts +69 -28
  126. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  127. package/dest/interfaces/aztec-node.js +56 -20
  128. package/dest/interfaces/block-builder.d.ts +3 -1
  129. package/dest/interfaces/block-builder.d.ts.map +1 -1
  130. package/dest/interfaces/chain_tips.d.ts +8 -47
  131. package/dest/interfaces/chain_tips.d.ts.map +1 -1
  132. package/dest/interfaces/chain_tips.js +1 -6
  133. package/dest/interfaces/checkpoint_parameter.d.ts +3 -3
  134. package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -1
  135. package/dest/interfaces/checkpoint_parameter.js +3 -3
  136. package/dest/interfaces/client.d.ts +2 -1
  137. package/dest/interfaces/client.d.ts.map +1 -1
  138. package/dest/interfaces/configs.d.ts +27 -6
  139. package/dest/interfaces/configs.d.ts.map +1 -1
  140. package/dest/interfaces/configs.js +5 -1
  141. package/dest/interfaces/get_tx_by_hash_options.d.ts +9 -0
  142. package/dest/interfaces/get_tx_by_hash_options.d.ts.map +1 -0
  143. package/dest/interfaces/get_tx_by_hash_options.js +4 -0
  144. package/dest/interfaces/merkle_tree_operations.d.ts +8 -3
  145. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  146. package/dest/interfaces/p2p.d.ts +38 -9
  147. package/dest/interfaces/p2p.d.ts.map +1 -1
  148. package/dest/interfaces/p2p.js +14 -2
  149. package/dest/interfaces/private_kernel_prover.d.ts +71 -12
  150. package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
  151. package/dest/interfaces/prover-client.d.ts +2 -3
  152. package/dest/interfaces/prover-client.d.ts.map +1 -1
  153. package/dest/interfaces/prover-node.d.ts +12 -8
  154. package/dest/interfaces/prover-node.d.ts.map +1 -1
  155. package/dest/interfaces/prover-node.js +24 -17
  156. package/dest/interfaces/proving-job.d.ts +4 -4
  157. package/dest/interfaces/proving-job.d.ts.map +1 -1
  158. package/dest/interfaces/proving-job.js +2 -2
  159. package/dest/interfaces/server.d.ts +1 -3
  160. package/dest/interfaces/server.d.ts.map +1 -1
  161. package/dest/interfaces/server.js +0 -2
  162. package/dest/interfaces/server_circuit_prover.d.ts +3 -3
  163. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  164. package/dest/interfaces/validator.d.ts +15 -4
  165. package/dest/interfaces/validator.d.ts.map +1 -1
  166. package/dest/interfaces/validator.js +3 -1
  167. package/dest/interfaces/world_state.d.ts +14 -1
  168. package/dest/interfaces/world_state.d.ts.map +1 -1
  169. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts +8 -2
  170. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts.map +1 -1
  171. package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +12 -74
  172. package/dest/kernel/hints/index.d.ts +1 -2
  173. package/dest/kernel/hints/index.d.ts.map +1 -1
  174. package/dest/kernel/hints/index.js +0 -1
  175. package/dest/kernel/hints/read_request.js +1 -1
  176. package/dest/kernel/index.d.ts +6 -2
  177. package/dest/kernel/index.d.ts.map +1 -1
  178. package/dest/kernel/index.js +5 -1
  179. package/dest/kernel/log_hash.d.ts +1 -1
  180. package/dest/kernel/log_hash.d.ts.map +1 -1
  181. package/dest/kernel/log_hash.js +2 -2
  182. package/dest/kernel/note_hash.js +1 -1
  183. package/dest/kernel/nullifier.js +1 -1
  184. package/dest/kernel/private_circuit_public_inputs.d.ts +13 -3
  185. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  186. package/dest/kernel/private_circuit_public_inputs.js +14 -7
  187. package/dest/kernel/private_context_inputs.d.ts +4 -3
  188. package/dest/kernel/private_context_inputs.d.ts.map +1 -1
  189. package/dest/kernel/private_context_inputs.js +7 -3
  190. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +7 -9
  191. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  192. package/dest/kernel/private_kernel_circuit_public_inputs.js +10 -7
  193. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts +2 -3
  194. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts.map +1 -1
  195. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.js +3 -5
  196. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts +2 -3
  197. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts.map +1 -1
  198. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.js +3 -5
  199. package/dest/kernel/private_kernel_init_4_circuit_private_inputs.d.ts +24 -0
  200. package/dest/kernel/private_kernel_init_4_circuit_private_inputs.d.ts.map +1 -0
  201. package/dest/kernel/private_kernel_init_4_circuit_private_inputs.js +37 -0
  202. package/dest/kernel/private_kernel_init_5_circuit_private_inputs.d.ts +25 -0
  203. package/dest/kernel/private_kernel_init_5_circuit_private_inputs.d.ts.map +1 -0
  204. package/dest/kernel/private_kernel_init_5_circuit_private_inputs.js +39 -0
  205. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +1 -9
  206. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  207. package/dest/kernel/private_kernel_init_circuit_private_inputs.js +2 -6
  208. package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.d.ts +18 -0
  209. package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.d.ts.map +1 -0
  210. package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.js +27 -0
  211. package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.d.ts +19 -0
  212. package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.d.ts.map +1 -0
  213. package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.js +29 -0
  214. package/dest/kernel/private_kernel_prover_output.d.ts +4 -1
  215. package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
  216. package/dest/kernel/private_kernel_prover_output.js +4 -1
  217. package/dest/kernel/private_kernel_reset_dimensions.d.ts +7 -8
  218. package/dest/kernel/private_kernel_reset_dimensions.d.ts.map +1 -1
  219. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts +29 -0
  220. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts.map +1 -0
  221. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.js +36 -0
  222. package/dest/kernel/private_kernel_simulated_output.d.ts +1 -7
  223. package/dest/kernel/private_kernel_simulated_output.d.ts.map +1 -1
  224. package/dest/kernel/private_kernel_simulated_output.js +2 -1
  225. package/dest/kernel/private_log_data.d.ts +1 -1
  226. package/dest/kernel/private_log_data.d.ts.map +1 -1
  227. package/dest/kernel/private_log_data.js +1 -1
  228. package/dest/kernel/utils/index.d.ts +1 -2
  229. package/dest/kernel/utils/index.d.ts.map +1 -1
  230. package/dest/kernel/utils/index.js +0 -1
  231. package/dest/keys/derivation.d.ts +41 -5
  232. package/dest/keys/derivation.d.ts.map +1 -1
  233. package/dest/keys/derivation.js +53 -23
  234. package/dest/logs/app_tagging_secret.d.ts +30 -7
  235. package/dest/logs/app_tagging_secret.d.ts.map +1 -1
  236. package/dest/logs/app_tagging_secret.js +44 -28
  237. package/dest/logs/app_tagging_secret_kind.js +1 -1
  238. package/dest/logs/contract_class_log.d.ts +1 -2
  239. package/dest/logs/contract_class_log.d.ts.map +1 -1
  240. package/dest/logs/contract_class_log.js +0 -4
  241. package/dest/logs/message_context.d.ts +5 -15
  242. package/dest/logs/message_context.d.ts.map +1 -1
  243. package/dest/logs/message_context.js +1 -66
  244. package/dest/logs/pending_tagged_log.d.ts +6 -8
  245. package/dest/logs/pending_tagged_log.d.ts.map +1 -1
  246. package/dest/logs/pending_tagged_log.js +1 -31
  247. package/dest/logs/shared_secret_derivation.d.ts +19 -6
  248. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  249. package/dest/logs/shared_secret_derivation.js +26 -11
  250. package/dest/p2p/attestation_utils.d.ts +1 -1
  251. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  252. package/dest/p2p/attestation_utils.js +8 -1
  253. package/dest/p2p/checkpoint_attestation.d.ts +10 -1
  254. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
  255. package/dest/p2p/checkpoint_attestation.js +10 -0
  256. package/dest/p2p/checkpoint_proposal.d.ts +2 -1
  257. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
  258. package/dest/p2p/consensus_payload.d.ts +2 -1
  259. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  260. package/dest/p2p/index.d.ts +1 -2
  261. package/dest/p2p/index.d.ts.map +1 -1
  262. package/dest/p2p/index.js +0 -1
  263. package/dest/p2p/signature_utils.d.ts +10 -1
  264. package/dest/p2p/signature_utils.d.ts.map +1 -1
  265. package/dest/p2p/signature_utils.js +9 -1
  266. package/dest/rollup/avm_proof_data.d.ts +3 -3
  267. package/dest/rollup/avm_proof_data.d.ts.map +1 -1
  268. package/dest/rollup/checkpoint_header.d.ts +8 -3
  269. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  270. package/dest/rollup/checkpoint_header.js +20 -10
  271. package/dest/stats/stats.d.ts +2 -2
  272. package/dest/stats/stats.d.ts.map +1 -1
  273. package/dest/tests/factories.d.ts +1 -27
  274. package/dest/tests/factories.d.ts.map +1 -1
  275. package/dest/tests/factories.js +10 -45
  276. package/dest/tests/mocks.d.ts +1 -1
  277. package/dest/tests/mocks.d.ts.map +1 -1
  278. package/dest/tests/mocks.js +3 -2
  279. package/dest/timetable/budgets.d.ts +57 -0
  280. package/dest/timetable/budgets.d.ts.map +1 -0
  281. package/dest/timetable/budgets.js +56 -0
  282. package/dest/timetable/build_proposer_timetable.d.ts +21 -0
  283. package/dest/timetable/build_proposer_timetable.d.ts.map +1 -0
  284. package/dest/timetable/build_proposer_timetable.js +17 -0
  285. package/dest/timetable/consensus_timetable.d.ts +70 -0
  286. package/dest/timetable/consensus_timetable.d.ts.map +1 -0
  287. package/dest/timetable/consensus_timetable.js +89 -0
  288. package/dest/timetable/index.d.ts +5 -84
  289. package/dest/timetable/index.d.ts.map +1 -1
  290. package/dest/timetable/index.js +4 -209
  291. package/dest/timetable/proposer_timetable.d.ts +106 -0
  292. package/dest/timetable/proposer_timetable.d.ts.map +1 -0
  293. package/dest/timetable/proposer_timetable.js +132 -0
  294. package/dest/trees/nullifier_membership_witness.d.ts +5 -8
  295. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  296. package/dest/trees/nullifier_membership_witness.js +0 -9
  297. package/dest/trees/public_data_witness.d.ts +7 -17
  298. package/dest/trees/public_data_witness.d.ts.map +1 -1
  299. package/dest/trees/public_data_witness.js +0 -27
  300. package/dest/tx/execution_payload.d.ts +1 -1
  301. package/dest/tx/execution_payload.d.ts.map +1 -1
  302. package/dest/tx/execution_payload.js +1 -1
  303. package/dest/tx/fee_provider.d.ts +2 -2
  304. package/dest/tx/fee_provider.d.ts.map +1 -1
  305. package/dest/tx/global_variable_builder.d.ts +2 -12
  306. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  307. package/dest/tx/global_variables.js +2 -2
  308. package/dest/tx/index.d.ts +1 -2
  309. package/dest/tx/index.d.ts.map +1 -1
  310. package/dest/tx/index.js +0 -1
  311. package/dest/tx/private_tx_constant_data.d.ts +18 -2
  312. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  313. package/dest/tx/private_tx_constant_data.js +13 -4
  314. package/dest/tx/profiling.d.ts +1 -1
  315. package/dest/tx/profiling.d.ts.map +1 -1
  316. package/dest/tx/profiling.js +2 -0
  317. package/dest/tx/simulated_tx.d.ts +10 -6
  318. package/dest/tx/simulated_tx.d.ts.map +1 -1
  319. package/dest/tx/tx.d.ts +9 -1
  320. package/dest/tx/tx.d.ts.map +1 -1
  321. package/dest/tx/tx.js +15 -0
  322. package/dest/tx/validator/error_texts.d.ts +2 -2
  323. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  324. package/dest/tx/validator/error_texts.js +1 -1
  325. package/dest/world-state/world_state_revision.d.ts +1 -18
  326. package/dest/world-state/world_state_revision.d.ts.map +1 -1
  327. package/dest/world-state/world_state_revision.js +0 -20
  328. package/package.json +8 -8
  329. package/src/abi/buffer.ts +13 -1
  330. package/src/avm/avm.ts +1 -1
  331. package/src/avm/index.ts +0 -5
  332. package/src/aztec-address/index.ts +36 -6
  333. package/src/block/attestation_info.ts +7 -2
  334. package/src/block/l2_block_source.ts +67 -13
  335. package/src/block/l2_block_stream/event_driven_l2_block_stream.ts +207 -0
  336. package/src/block/l2_block_stream/index.ts +1 -0
  337. package/src/block/l2_block_stream/interfaces.ts +96 -10
  338. package/src/block/l2_block_stream/l2_block_stream.ts +216 -175
  339. package/src/block/l2_block_stream/l2_tips_memory_store.ts +12 -41
  340. package/src/block/l2_block_stream/l2_tips_store_base.ts +84 -93
  341. package/src/block/proposal/attestations_and_signers.ts +53 -7
  342. package/src/block/test/l2_tips_store_test_suite.ts +270 -28
  343. package/src/block/validate_block_result.ts +48 -2
  344. package/src/checkpoint/checkpoint.ts +2 -2
  345. package/src/checkpoint/index.ts +1 -0
  346. package/src/checkpoint/simulation_overrides.ts +171 -0
  347. package/src/checkpoint/validate.ts +16 -6
  348. package/src/config/index.ts +1 -0
  349. package/src/config/network-consensus-config.ts +291 -0
  350. package/src/config/sequencer-config.ts +36 -5
  351. package/src/contract/contract_address.ts +4 -3
  352. package/src/contract/contract_class.ts +3 -2
  353. package/src/contract/contract_instance.ts +62 -1
  354. package/src/contract/index.ts +0 -1
  355. package/src/contract/interfaces/contract_data_source.ts +2 -4
  356. package/src/contract/interfaces/contract_instance.ts +26 -8
  357. package/src/contract/interfaces/node-info.ts +11 -0
  358. package/src/contract/partial_address.ts +8 -2
  359. package/src/database-version/version_manager.ts +96 -6
  360. package/src/deserialization/index.ts +35 -2
  361. package/src/file-store/factory.ts +7 -0
  362. package/src/file-store/index.ts +1 -0
  363. package/src/file-store/memory.ts +94 -0
  364. package/src/gas/README.md +92 -0
  365. package/src/gas/gas_settings.ts +11 -21
  366. package/src/gas/index.ts +1 -0
  367. package/src/gas/tx_gas_limits.ts +123 -0
  368. package/src/ha-signing/config.ts +23 -5
  369. package/src/ha-signing/local_config.ts +20 -1
  370. package/src/interfaces/archiver.ts +8 -9
  371. package/src/interfaces/aztec-node-admin.ts +1 -1
  372. package/src/interfaces/aztec-node-debug.ts +54 -2
  373. package/src/interfaces/aztec-node.ts +121 -43
  374. package/src/interfaces/block-builder.ts +2 -0
  375. package/src/interfaces/chain_tips.ts +8 -16
  376. package/src/interfaces/checkpoint_parameter.ts +3 -3
  377. package/src/interfaces/client.ts +1 -0
  378. package/src/interfaces/configs.ts +27 -6
  379. package/src/interfaces/get_tx_by_hash_options.ts +14 -0
  380. package/src/interfaces/merkle_tree_operations.ts +8 -2
  381. package/src/interfaces/p2p.ts +29 -9
  382. package/src/interfaces/private_kernel_prover.ts +104 -13
  383. package/src/interfaces/prover-client.ts +1 -3
  384. package/src/interfaces/prover-node.ts +32 -17
  385. package/src/interfaces/proving-job.ts +3 -3
  386. package/src/interfaces/server.ts +0 -2
  387. package/src/interfaces/server_circuit_prover.ts +2 -2
  388. package/src/interfaces/validator.ts +11 -0
  389. package/src/interfaces/world_state.ts +14 -0
  390. package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +22 -112
  391. package/src/kernel/hints/index.ts +0 -1
  392. package/src/kernel/hints/read_request.ts +1 -1
  393. package/src/kernel/index.ts +5 -1
  394. package/src/kernel/log_hash.ts +5 -2
  395. package/src/kernel/note_hash.ts +1 -1
  396. package/src/kernel/nullifier.ts +1 -1
  397. package/src/kernel/private_circuit_public_inputs.ts +12 -1
  398. package/src/kernel/private_context_inputs.ts +10 -3
  399. package/src/kernel/private_kernel_circuit_public_inputs.ts +9 -7
  400. package/src/kernel/private_kernel_init_2_circuit_private_inputs.ts +0 -3
  401. package/src/kernel/private_kernel_init_3_circuit_private_inputs.ts +0 -3
  402. package/src/kernel/private_kernel_init_4_circuit_private_inputs.ts +52 -0
  403. package/src/kernel/private_kernel_init_5_circuit_private_inputs.ts +55 -0
  404. package/src/kernel/private_kernel_init_circuit_private_inputs.ts +0 -6
  405. package/src/kernel/private_kernel_inner_4_circuit_private_inputs.ts +39 -0
  406. package/src/kernel/private_kernel_inner_5_circuit_private_inputs.ts +42 -0
  407. package/src/kernel/private_kernel_prover_output.ts +4 -0
  408. package/src/kernel/private_kernel_reset_dimensions.ts +15 -5
  409. package/src/kernel/private_kernel_reset_tail_circuit_private_inputs.ts +69 -0
  410. package/src/kernel/private_kernel_simulated_output.ts +0 -7
  411. package/src/kernel/private_log_data.ts +4 -1
  412. package/src/kernel/utils/index.ts +0 -1
  413. package/src/keys/derivation.ts +71 -21
  414. package/src/logs/app_tagging_secret.ts +56 -24
  415. package/src/logs/app_tagging_secret_kind.ts +1 -1
  416. package/src/logs/contract_class_log.ts +0 -9
  417. package/src/logs/message_context.ts +7 -65
  418. package/src/logs/pending_tagged_log.ts +6 -33
  419. package/src/logs/shared_secret_derivation.ts +31 -15
  420. package/src/p2p/attestation_utils.ts +8 -1
  421. package/src/p2p/checkpoint_attestation.ts +12 -0
  422. package/src/p2p/index.ts +0 -1
  423. package/src/p2p/signature_utils.ts +9 -0
  424. package/src/rollup/avm_proof_data.ts +2 -2
  425. package/src/rollup/checkpoint_header.ts +16 -2
  426. package/src/stats/stats.ts +6 -2
  427. package/src/tests/factories.ts +13 -51
  428. package/src/tests/mocks.ts +7 -2
  429. package/src/timetable/README.md +609 -0
  430. package/src/timetable/budgets.ts +87 -0
  431. package/src/timetable/build_proposer_timetable.ts +42 -0
  432. package/src/timetable/consensus_timetable.ts +126 -0
  433. package/src/timetable/index.ts +4 -304
  434. package/src/timetable/proposer_timetable.ts +190 -0
  435. package/src/timetable/timetable-example.svg +108 -0
  436. package/src/trees/nullifier_membership_witness.ts +0 -11
  437. package/src/trees/public_data_witness.ts +0 -31
  438. package/src/tx/execution_payload.ts +2 -1
  439. package/src/tx/fee_provider.ts +1 -1
  440. package/src/tx/global_variable_builder.ts +1 -17
  441. package/src/tx/global_variables.ts +2 -2
  442. package/src/tx/index.ts +0 -1
  443. package/src/tx/private_tx_constant_data.ts +25 -2
  444. package/src/tx/profiling.ts +2 -0
  445. package/src/tx/tx.ts +17 -0
  446. package/src/tx/validator/error_texts.ts +2 -1
  447. package/src/world-state/world_state_revision.ts +0 -33
  448. package/dest/avm/contract_storage_read.d.ts +0 -58
  449. package/dest/avm/contract_storage_read.d.ts.map +0 -1
  450. package/dest/avm/contract_storage_read.js +0 -65
  451. package/dest/avm/contract_storage_update_request.d.ts +0 -65
  452. package/dest/avm/contract_storage_update_request.d.ts.map +0 -1
  453. package/dest/avm/contract_storage_update_request.js +0 -80
  454. package/dest/avm/public_call_stack_item_compressed.d.ts +0 -43
  455. package/dest/avm/public_call_stack_item_compressed.d.ts.map +0 -1
  456. package/dest/avm/public_call_stack_item_compressed.js +0 -70
  457. package/dest/avm/public_data_update_request.d.ts +0 -62
  458. package/dest/avm/public_data_update_request.d.ts.map +0 -1
  459. package/dest/avm/public_data_update_request.js +0 -67
  460. package/dest/avm/public_inner_call_request.d.ts +0 -50
  461. package/dest/avm/public_inner_call_request.d.ts.map +0 -1
  462. package/dest/avm/public_inner_call_request.js +0 -74
  463. package/dest/contract/deployment_info.d.ts +0 -24
  464. package/dest/contract/deployment_info.d.ts.map +0 -1
  465. package/dest/contract/deployment_info.js +0 -3
  466. package/dest/interfaces/epoch-prover.d.ts +0 -57
  467. package/dest/interfaces/epoch-prover.d.ts.map +0 -1
  468. package/dest/interfaces/epoch-prover.js +0 -1
  469. package/dest/interfaces/prover-coordination.d.ts +0 -15
  470. package/dest/interfaces/prover-coordination.d.ts.map +0 -1
  471. package/dest/interfaces/prover-coordination.js +0 -1
  472. package/dest/kernel/hints/tree_leaf_read_request.d.ts +0 -14
  473. package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +0 -1
  474. package/dest/kernel/hints/tree_leaf_read_request.js +0 -33
  475. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +0 -47
  476. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +0 -1
  477. package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +0 -38
  478. package/dest/kernel/utils/optional_number.d.ts +0 -31
  479. package/dest/kernel/utils/optional_number.d.ts.map +0 -1
  480. package/dest/kernel/utils/optional_number.js +0 -42
  481. package/dest/p2p/interface.d.ts +0 -5
  482. package/dest/p2p/interface.d.ts.map +0 -1
  483. package/dest/p2p/interface.js +0 -1
  484. package/dest/tx/validator/empty_validator.d.ts +0 -5
  485. package/dest/tx/validator/empty_validator.d.ts.map +0 -1
  486. package/dest/tx/validator/empty_validator.js +0 -7
  487. package/src/avm/contract_storage_read.ts +0 -77
  488. package/src/avm/contract_storage_update_request.ts +0 -93
  489. package/src/avm/public_call_stack_item_compressed.ts +0 -113
  490. package/src/avm/public_data_update_request.ts +0 -106
  491. package/src/avm/public_inner_call_request.ts +0 -85
  492. package/src/contract/deployment_info.ts +0 -25
  493. package/src/interfaces/epoch-prover.ts +0 -72
  494. package/src/interfaces/prover-coordination.ts +0 -17
  495. package/src/kernel/hints/tree_leaf_read_request.ts +0 -35
  496. package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +0 -58
  497. package/src/kernel/utils/optional_number.ts +0 -50
  498. package/src/p2p/interface.ts +0 -4
  499. package/src/tx/validator/empty_validator.ts +0 -7
@@ -20,7 +20,11 @@ export declare function bufferAsFields(input: Buffer, targetLength: number): Fr[
20
20
  * bytecode commitment computations to diverge from what the circuit produced.
21
21
  *
22
22
  * @param fields - An output from bufferAsFields: [byteLength, ...payloadFields].
23
+ * @param maxByteLength - Optional upper bound on the declared byte length. When the field array comes
24
+ * from untrusted input (e.g. a gossiped contract-class log), pass the payload capacity so an
25
+ * attacker-declared length cannot force a large `Buffer.alloc` before the value is otherwise
26
+ * rejected. Throws if the declared length exceeds it, before allocating.
23
27
  * @returns A buffer of exactly `byteLength` bytes.
24
28
  */
25
- export declare function bufferFromFields(fields: Fr[]): Buffer;
26
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVmZmVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYWJpL2J1ZmZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFJcEQ7Ozs7OztHQU1HO0FBQ0gsd0JBQWdCLGNBQWMsQ0FBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxNQUFNLEdBQUcsRUFBRSxFQUFFLENBY3hFO0FBRUQ7Ozs7Ozs7Ozs7Ozs7O0dBY0c7QUFDSCx3QkFBZ0IsZ0JBQWdCLENBQUMsTUFBTSxFQUFFLEVBQUUsRUFBRSxHQUFHLE1BQU0sQ0FjckQifQ==
29
+ export declare function bufferFromFields(fields: Fr[], maxByteLength?: number): Buffer;
30
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVmZmVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYWJpL2J1ZmZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFJcEQ7Ozs7OztHQU1HO0FBQ0gsd0JBQWdCLGNBQWMsQ0FBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxNQUFNLEdBQUcsRUFBRSxFQUFFLENBY3hFO0FBRUQ7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQWtCRztBQUNILHdCQUFnQixnQkFBZ0IsQ0FBQyxNQUFNLEVBQUUsRUFBRSxFQUFFLEVBQUUsYUFBYSxDQUFDLEVBQUUsTUFBTSxHQUFHLE1BQU0sQ0FzQjdFIn0=
@@ -1 +1 @@
1
- {"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../src/abi/buffer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAIpD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,EAAE,EAAE,CAcxE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAcrD"}
1
+ {"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../src/abi/buffer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAIpD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,EAAE,EAAE,CAcxE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAsB7E"}
@@ -37,10 +37,22 @@ import chunk from 'lodash.chunk';
37
37
  * bytecode commitment computations to diverge from what the circuit produced.
38
38
  *
39
39
  * @param fields - An output from bufferAsFields: [byteLength, ...payloadFields].
40
+ * @param maxByteLength - Optional upper bound on the declared byte length. When the field array comes
41
+ * from untrusted input (e.g. a gossiped contract-class log), pass the payload capacity so an
42
+ * attacker-declared length cannot force a large `Buffer.alloc` before the value is otherwise
43
+ * rejected. Throws if the declared length exceeds it, before allocating.
40
44
  * @returns A buffer of exactly `byteLength` bytes.
41
- */ export function bufferFromFields(fields) {
45
+ */ export function bufferFromFields(fields, maxByteLength) {
46
+ // A valid bufferAsFields output always has at least the leading byte-length field, so an empty
47
+ // input encodes no data. Guard so `length` (the destructured head) is never undefined.
48
+ if (fields.length === 0) {
49
+ return Buffer.alloc(0);
50
+ }
42
51
  const [length, ...payload] = fields;
43
52
  const byteLength = length.toNumber();
53
+ if (maxByteLength !== undefined && byteLength > maxByteLength) {
54
+ throw new Error(`Declared byte length ${byteLength} exceeds maximum ${maxByteLength}`);
55
+ }
44
56
  const raw = Buffer.concat(payload.map((f)=>f.toBuffer().subarray(1)));
45
57
  if (raw.length >= byteLength) {
46
58
  return raw.subarray(0, byteLength);
package/dest/avm/avm.js CHANGED
@@ -807,7 +807,7 @@ export class CallStackMetadata {
807
807
  }
808
808
  const { stack, leaf } = failingCall;
809
809
  const aztecCallStack = stack.map((call)=>({
810
- contractAddress: AztecAddress.fromField(call.contractAddress),
810
+ contractAddress: AztecAddress.fromFieldUnsafe(call.contractAddress),
811
811
  functionSelector: call.calldata.length > 0 ? FunctionSelector.fromFieldOrUndefined(call.calldata[0]) : undefined
812
812
  }));
813
813
  // The Noir call stack is the internal call stack at exit of the failing call
@@ -383,18 +383,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
383
383
  }>>;
384
384
  index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
385
385
  leafPreimage: z.ZodPipe<z.ZodObject<{
386
- leaf: z.ZodPipe<z.ZodObject<{
387
- nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
388
- }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
389
- nullifier: import("@aztec/foundation/schemas").Fr;
390
- }>>;
391
- nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
392
- nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
393
- }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
394
- leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
395
- nextKey: import("@aztec/foundation/schemas").Fr;
396
- nextIndex: bigint;
397
- }>> | z.ZodPipe<z.ZodObject<{
398
386
  leaf: z.ZodPipe<z.ZodObject<{
399
387
  slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
400
388
  value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
@@ -408,6 +396,18 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
408
396
  leaf: import("../trees/public_data_leaf.js").PublicDataTreeLeaf;
409
397
  nextKey: import("@aztec/foundation/schemas").Fr;
410
398
  nextIndex: bigint;
399
+ }>> | z.ZodPipe<z.ZodObject<{
400
+ leaf: z.ZodPipe<z.ZodObject<{
401
+ nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
402
+ }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
403
+ nullifier: import("@aztec/foundation/schemas").Fr;
404
+ }>>;
405
+ nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
406
+ nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
407
+ }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
408
+ leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
409
+ nextKey: import("@aztec/foundation/schemas").Fr;
410
+ nextIndex: bigint;
411
411
  }>>;
412
412
  }, z.core.$strip>, z.ZodTransform<{
413
413
  readonly hintKey: import("../trees/append_only_tree_snapshot.js").AppendOnlyTreeSnapshot;
@@ -428,18 +428,6 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
428
428
  }>>;
429
429
  index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
430
430
  leafPreimage: z.ZodPipe<z.ZodObject<{
431
- leaf: z.ZodPipe<z.ZodObject<{
432
- nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
433
- }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
434
- nullifier: import("@aztec/foundation/schemas").Fr;
435
- }>>;
436
- nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
437
- nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
438
- }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
439
- leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
440
- nextKey: import("@aztec/foundation/schemas").Fr;
441
- nextIndex: bigint;
442
- }>> | z.ZodPipe<z.ZodObject<{
443
431
  leaf: z.ZodPipe<z.ZodObject<{
444
432
  slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
445
433
  value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
@@ -453,6 +441,18 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
453
441
  leaf: import("../trees/public_data_leaf.js").PublicDataTreeLeaf;
454
442
  nextKey: import("@aztec/foundation/schemas").Fr;
455
443
  nextIndex: bigint;
444
+ }>> | z.ZodPipe<z.ZodObject<{
445
+ leaf: z.ZodPipe<z.ZodObject<{
446
+ nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
447
+ }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
448
+ nullifier: import("@aztec/foundation/schemas").Fr;
449
+ }>>;
450
+ nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
451
+ nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
452
+ }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
453
+ leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
454
+ nextKey: import("@aztec/foundation/schemas").Fr;
455
+ nextIndex: bigint;
456
456
  }>>;
457
457
  }, z.core.$strip>, z.ZodTransform<{
458
458
  readonly hintKey: import("../trees/append_only_tree_snapshot.js").AppendOnlyTreeSnapshot;
@@ -497,30 +497,18 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
497
497
  }>>;
498
498
  treeId: z.ZodNumber;
499
499
  leaf: z.ZodPipe<z.ZodObject<{
500
- nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
501
- }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
502
- nullifier: import("@aztec/foundation/schemas").Fr;
503
- }>> | z.ZodPipe<z.ZodObject<{
504
500
  slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
505
501
  value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
506
502
  }, z.core.$strip>, z.ZodTransform<import("../trees/public_data_leaf.js").PublicDataTreeLeaf, {
507
503
  slot: import("@aztec/foundation/schemas").Fr;
508
504
  value: import("@aztec/foundation/schemas").Fr;
505
+ }>> | z.ZodPipe<z.ZodObject<{
506
+ nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
507
+ }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
508
+ nullifier: import("@aztec/foundation/schemas").Fr;
509
509
  }>>;
510
510
  lowLeavesWitnessData: z.ZodObject<{
511
511
  leaf: z.ZodPipe<z.ZodObject<{
512
- leaf: z.ZodPipe<z.ZodObject<{
513
- nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
514
- }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
515
- nullifier: import("@aztec/foundation/schemas").Fr;
516
- }>>;
517
- nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
518
- nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
519
- }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
520
- leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
521
- nextKey: import("@aztec/foundation/schemas").Fr;
522
- nextIndex: bigint;
523
- }>> | z.ZodPipe<z.ZodObject<{
524
512
  leaf: z.ZodPipe<z.ZodObject<{
525
513
  slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
526
514
  value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
@@ -534,12 +522,7 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
534
522
  leaf: import("../trees/public_data_leaf.js").PublicDataTreeLeaf;
535
523
  nextKey: import("@aztec/foundation/schemas").Fr;
536
524
  nextIndex: bigint;
537
- }>>;
538
- index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
539
- path: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
540
- }, z.core.$strip>;
541
- insertionWitnessData: z.ZodObject<{
542
- leaf: z.ZodPipe<z.ZodObject<{
525
+ }>> | z.ZodPipe<z.ZodObject<{
543
526
  leaf: z.ZodPipe<z.ZodObject<{
544
527
  nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
545
528
  }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
@@ -551,7 +534,12 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
551
534
  leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
552
535
  nextKey: import("@aztec/foundation/schemas").Fr;
553
536
  nextIndex: bigint;
554
- }>> | z.ZodPipe<z.ZodObject<{
537
+ }>>;
538
+ index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
539
+ path: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
540
+ }, z.core.$strip>;
541
+ insertionWitnessData: z.ZodObject<{
542
+ leaf: z.ZodPipe<z.ZodObject<{
555
543
  leaf: z.ZodPipe<z.ZodObject<{
556
544
  slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
557
545
  value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
@@ -565,6 +553,18 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
565
553
  leaf: import("../trees/public_data_leaf.js").PublicDataTreeLeaf;
566
554
  nextKey: import("@aztec/foundation/schemas").Fr;
567
555
  nextIndex: bigint;
556
+ }>> | z.ZodPipe<z.ZodObject<{
557
+ leaf: z.ZodPipe<z.ZodObject<{
558
+ nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
559
+ }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
560
+ nullifier: import("@aztec/foundation/schemas").Fr;
561
+ }>>;
562
+ nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
563
+ nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
564
+ }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
565
+ leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
566
+ nextKey: import("@aztec/foundation/schemas").Fr;
567
+ nextIndex: bigint;
568
568
  }>>;
569
569
  index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
570
570
  path: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
@@ -617,30 +617,18 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
617
617
  }>>;
618
618
  treeId: z.ZodNumber;
619
619
  leaf: z.ZodPipe<z.ZodObject<{
620
- nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
621
- }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
622
- nullifier: import("@aztec/foundation/schemas").Fr;
623
- }>> | z.ZodPipe<z.ZodObject<{
624
620
  slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
625
621
  value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
626
622
  }, z.core.$strip>, z.ZodTransform<import("../trees/public_data_leaf.js").PublicDataTreeLeaf, {
627
623
  slot: import("@aztec/foundation/schemas").Fr;
628
624
  value: import("@aztec/foundation/schemas").Fr;
625
+ }>> | z.ZodPipe<z.ZodObject<{
626
+ nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
627
+ }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
628
+ nullifier: import("@aztec/foundation/schemas").Fr;
629
629
  }>>;
630
630
  lowLeavesWitnessData: z.ZodObject<{
631
631
  leaf: z.ZodPipe<z.ZodObject<{
632
- leaf: z.ZodPipe<z.ZodObject<{
633
- nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
634
- }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
635
- nullifier: import("@aztec/foundation/schemas").Fr;
636
- }>>;
637
- nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
638
- nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
639
- }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
640
- leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
641
- nextKey: import("@aztec/foundation/schemas").Fr;
642
- nextIndex: bigint;
643
- }>> | z.ZodPipe<z.ZodObject<{
644
632
  leaf: z.ZodPipe<z.ZodObject<{
645
633
  slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
646
634
  value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
@@ -654,12 +642,7 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
654
642
  leaf: import("../trees/public_data_leaf.js").PublicDataTreeLeaf;
655
643
  nextKey: import("@aztec/foundation/schemas").Fr;
656
644
  nextIndex: bigint;
657
- }>>;
658
- index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
659
- path: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
660
- }, z.core.$strip>;
661
- insertionWitnessData: z.ZodObject<{
662
- leaf: z.ZodPipe<z.ZodObject<{
645
+ }>> | z.ZodPipe<z.ZodObject<{
663
646
  leaf: z.ZodPipe<z.ZodObject<{
664
647
  nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
665
648
  }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
@@ -671,7 +654,12 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
671
654
  leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
672
655
  nextKey: import("@aztec/foundation/schemas").Fr;
673
656
  nextIndex: bigint;
674
- }>> | z.ZodPipe<z.ZodObject<{
657
+ }>>;
658
+ index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
659
+ path: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
660
+ }, z.core.$strip>;
661
+ insertionWitnessData: z.ZodObject<{
662
+ leaf: z.ZodPipe<z.ZodObject<{
675
663
  leaf: z.ZodPipe<z.ZodObject<{
676
664
  slot: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
677
665
  value: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
@@ -685,6 +673,18 @@ export declare const AvmProvingRequestSchema: z.ZodObject<{
685
673
  leaf: import("../trees/public_data_leaf.js").PublicDataTreeLeaf;
686
674
  nextKey: import("@aztec/foundation/schemas").Fr;
687
675
  nextIndex: bigint;
676
+ }>> | z.ZodPipe<z.ZodObject<{
677
+ leaf: z.ZodPipe<z.ZodObject<{
678
+ nullifier: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
679
+ }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeaf, {
680
+ nullifier: import("@aztec/foundation/schemas").Fr;
681
+ }>>;
682
+ nextKey: z.ZodType<import("@aztec/foundation/schemas").Fr, string, z.core.$ZodTypeInternals<import("@aztec/foundation/schemas").Fr, string>>;
683
+ nextIndex: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
684
+ }, z.core.$strip>, z.ZodTransform<import("../trees/nullifier_leaf.js").NullifierLeafPreimage, {
685
+ leaf: import("../trees/nullifier_leaf.js").NullifierLeaf;
686
+ nextKey: import("@aztec/foundation/schemas").Fr;
687
+ nextIndex: bigint;
688
688
  }>>;
689
689
  index: z.ZodPipe<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodCoercedBigInt<string | number | bigint>>;
690
690
  path: z.ZodArray<import("@aztec/foundation/schemas").ZodFor<import("@aztec/foundation/schemas").Fr>>;
@@ -3,11 +3,6 @@ export * from './avm_accumulated_data.js';
3
3
  export * from './avm_circuit_public_inputs.js';
4
4
  export * from './revert_code.js';
5
5
  export * from './public_data_write.js';
6
- export * from './public_data_update_request.js';
7
- export * from './contract_storage_update_request.js';
8
- export * from './contract_storage_read.js';
9
- export * from './public_inner_call_request.js';
10
- export * from './public_call_stack_item_compressed.js';
11
6
  export * from './avm_proving_request.js';
12
7
  export * from './message_pack.js';
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hdm0vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxVQUFVLENBQUM7QUFDekIsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLGdDQUFnQyxDQUFDO0FBQy9DLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLGlDQUFpQyxDQUFDO0FBQ2hELGNBQWMsc0NBQXNDLENBQUM7QUFDckQsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxjQUFjLGdDQUFnQyxDQUFDO0FBQy9DLGNBQWMsd0NBQXdDLENBQUM7QUFDdkQsY0FBYywwQkFBMEIsQ0FBQztBQUN6QyxjQUFjLG1CQUFtQixDQUFDIn0=
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hdm0vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxVQUFVLENBQUM7QUFDekIsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLGdDQUFnQyxDQUFDO0FBQy9DLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLDBCQUEwQixDQUFDO0FBQ3pDLGNBQWMsbUJBQW1CLENBQUMifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/avm/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/avm/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC"}
package/dest/avm/index.js CHANGED
@@ -3,10 +3,5 @@ export * from './avm_accumulated_data.js';
3
3
  export * from './avm_circuit_public_inputs.js';
4
4
  export * from './revert_code.js';
5
5
  export * from './public_data_write.js';
6
- export * from './public_data_update_request.js';
7
- export * from './contract_storage_update_request.js';
8
- export * from './contract_storage_read.js';
9
- export * from './public_inner_call_request.js';
10
- export * from './public_call_stack_item_compressed.js';
11
6
  export * from './avm_proving_request.js';
12
7
  export * from './message_pack.js';
@@ -24,12 +24,42 @@ export declare class AztecAddress {
24
24
  /** Null msg sender address. Not part of the protocol contracts tree. */
25
25
  static NULL_MSG_SENDER: AztecAddress;
26
26
  static zero(): AztecAddress;
27
- static fromField(fr: Fr): AztecAddress;
27
+ /**
28
+ * Builds an `AztecAddress` from a field **without checking it is a valid address** (the x-coordinate of a point on
29
+ * the Grumpkin curve, which is what lets it be encrypted to). Use {@link AztecAddress.isValid} to validate an
30
+ * untrusted one, or {@link AztecAddress.random} for valid test addresses.
31
+ */
32
+ static fromFieldUnsafe(fr: Fr): AztecAddress;
33
+ /**
34
+ * Deserializes an `AztecAddress` from a buffer. It does **not** check the value is a valid Grumpkin-curve address
35
+ * (see {@link AztecAddress.isValid}); it is meant for reading addresses from already-validated serialized data. Use
36
+ * {@link AztecAddress.random} for valid test addresses.
37
+ */
28
38
  static fromBuffer(buffer: Buffer | BufferReader): AztecAddress;
39
+ /**
40
+ * Deserializes an `AztecAddress` from a field reader. It does **not** check the value is a valid Grumpkin-curve
41
+ * address (see {@link AztecAddress.isValid}); it is meant for reading addresses from already-validated serialized
42
+ * data. Use {@link AztecAddress.random} for valid test addresses.
43
+ */
29
44
  static fromFields(fields: Fr[] | FieldReader): AztecAddress;
30
- static fromBigInt(value: bigint): AztecAddress;
31
- static fromNumber(value: number): AztecAddress;
32
- static fromString(buf: string): AztecAddress;
45
+ /**
46
+ * Builds an `AztecAddress` from a bigint **without checking it is a valid address** (the x-coordinate of a point on
47
+ * the Grumpkin curve, which is what lets it be encrypted to). Use {@link AztecAddress.isValid} to validate an
48
+ * untrusted one, or {@link AztecAddress.random} for valid test addresses.
49
+ */
50
+ static fromBigIntUnsafe(value: bigint): AztecAddress;
51
+ /**
52
+ * Builds an `AztecAddress` from a number **without checking it is a valid address** (the x-coordinate of a point on
53
+ * the Grumpkin curve, which is what lets it be encrypted to). Use {@link AztecAddress.isValid} to validate an
54
+ * untrusted one, or {@link AztecAddress.random} for valid test addresses.
55
+ */
56
+ static fromNumberUnsafe(value: number): AztecAddress;
57
+ /**
58
+ * Builds an `AztecAddress` from a hex string **without checking it is a valid address** (the x-coordinate of a
59
+ * point on the Grumpkin curve, which is what lets it be encrypted to). Use {@link AztecAddress.isValid} to
60
+ * validate an untrusted one, or {@link AztecAddress.random} for valid test addresses.
61
+ */
62
+ static fromStringUnsafe(buf: string): AztecAddress;
33
63
  /**
34
64
  * Creates an AztecAddress from a plain object without Zod validation.
35
65
  * This method is optimized for performance and skips validation, making it suitable
@@ -62,4 +92,4 @@ export declare class AztecAddress {
62
92
  toJSON(): `0x${string}`;
63
93
  static get schema(): ZodFor<AztecAddress>;
64
94
  }
65
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9henRlYy1hZGRyZXNzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxFQUFFLEVBQWMsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNoRSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFDMUQsT0FBTyxFQUFFLEtBQUssTUFBTSxFQUFpQyx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M,CAAC,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,YAAY,CAQ7C;IAED;;OAEG;IACH,OAAa,MAAM,0BAQlB;IAED,IAAI,IAAI,WAEP;IAED,MAAM,CAAC,KAAK,EAAE,YAAY,WAEzB;IAED,MAAM,YAEL;IAED;;OAEG;IACG,OAAO,qBAQZ;IAED;;OAEG;IACH,cAAc,IAAI,OAAO,CAAC,KAAK,CAAC,CAE/B;IAED,QAAQ,IAAI,MAAM,CAAC;IACnB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IAQjC,QAAQ,WAEP;IAED,OAAO,OAEN;IAED,QAAQ,kBAEP;IAED,MAAM,kBAEL;IAED,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAOxC;CACF"}
@@ -32,27 +32,51 @@ _computedKey = inspect.custom;
32
32
  }
33
33
  static SIZE_IN_BYTES = Fr.SIZE_IN_BYTES;
34
34
  static ZERO = new AztecAddress(Buffer.alloc(32, 0));
35
- /** Null msg sender address. Not part of the protocol contracts tree. */ static NULL_MSG_SENDER = AztecAddress.fromBigInt(NULL_MSG_SENDER_CONTRACT_ADDRESS);
35
+ /** Null msg sender address. Not part of the protocol contracts tree. */ static NULL_MSG_SENDER = AztecAddress.fromBigIntUnsafe(NULL_MSG_SENDER_CONTRACT_ADDRESS);
36
36
  static zero() {
37
37
  return AztecAddress.ZERO;
38
38
  }
39
- static fromField(fr) {
39
+ /**
40
+ * Builds an `AztecAddress` from a field **without checking it is a valid address** (the x-coordinate of a point on
41
+ * the Grumpkin curve, which is what lets it be encrypted to). Use {@link AztecAddress.isValid} to validate an
42
+ * untrusted one, or {@link AztecAddress.random} for valid test addresses.
43
+ */ static fromFieldUnsafe(fr) {
40
44
  return new AztecAddress(fr);
41
45
  }
42
- static fromBuffer(buffer) {
46
+ /**
47
+ * Deserializes an `AztecAddress` from a buffer. It does **not** check the value is a valid Grumpkin-curve address
48
+ * (see {@link AztecAddress.isValid}); it is meant for reading addresses from already-validated serialized data. Use
49
+ * {@link AztecAddress.random} for valid test addresses.
50
+ */ static fromBuffer(buffer) {
43
51
  return new AztecAddress(fromBuffer(buffer, Fr));
44
52
  }
45
- static fromFields(fields) {
53
+ /**
54
+ * Deserializes an `AztecAddress` from a field reader. It does **not** check the value is a valid Grumpkin-curve
55
+ * address (see {@link AztecAddress.isValid}); it is meant for reading addresses from already-validated serialized
56
+ * data. Use {@link AztecAddress.random} for valid test addresses.
57
+ */ static fromFields(fields) {
46
58
  const reader = FieldReader.asReader(fields);
47
59
  return new AztecAddress(reader.readField());
48
60
  }
49
- static fromBigInt(value) {
61
+ /**
62
+ * Builds an `AztecAddress` from a bigint **without checking it is a valid address** (the x-coordinate of a point on
63
+ * the Grumpkin curve, which is what lets it be encrypted to). Use {@link AztecAddress.isValid} to validate an
64
+ * untrusted one, or {@link AztecAddress.random} for valid test addresses.
65
+ */ static fromBigIntUnsafe(value) {
50
66
  return new AztecAddress(new Fr(value));
51
67
  }
52
- static fromNumber(value) {
68
+ /**
69
+ * Builds an `AztecAddress` from a number **without checking it is a valid address** (the x-coordinate of a point on
70
+ * the Grumpkin curve, which is what lets it be encrypted to). Use {@link AztecAddress.isValid} to validate an
71
+ * untrusted one, or {@link AztecAddress.random} for valid test addresses.
72
+ */ static fromNumberUnsafe(value) {
53
73
  return new AztecAddress(new Fr(value));
54
74
  }
55
- static fromString(buf) {
75
+ /**
76
+ * Builds an `AztecAddress` from a hex string **without checking it is a valid address** (the x-coordinate of a
77
+ * point on the Grumpkin curve, which is what lets it be encrypted to). Use {@link AztecAddress.isValid} to
78
+ * validate an untrusted one, or {@link AztecAddress.random} for valid test addresses.
79
+ */ static fromStringUnsafe(buf) {
56
80
  return new AztecAddress(hexToBuffer(buf));
57
81
  }
58
82
  /**
@@ -69,7 +93,7 @@ _computedKey = inspect.custom;
69
93
  if (obj instanceof Buffer || Buffer.isBuffer(obj)) {
70
94
  return new AztecAddress(obj);
71
95
  }
72
- return AztecAddress.fromString(obj);
96
+ return AztecAddress.fromStringUnsafe(obj);
73
97
  }
74
98
  /**
75
99
  * @returns a random valid address (i.e. one that can be encrypted to).
@@ -30,4 +30,4 @@ export declare function getAttestationInfoFromPublishedCheckpoint(block: {
30
30
  checkpoint: Checkpoint;
31
31
  }, signatureContext: CoordinationSignatureContext): AttestationInfo[];
32
32
  export declare function getAttestationInfoFromPayload(payload: ConsensusPayload, attestations: CommitteeAttestation[]): AttestationInfo[];
33
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXR0ZXN0YXRpb25faW5mby5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Jsb2NrL2F0dGVzdGF0aW9uX2luZm8udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFFaEUsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ3pELE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQy9ELE9BQU8sRUFBRSxLQUFLLDRCQUE0QixFQUFzQyxNQUFNLDJCQUEyQixDQUFDO0FBQ2xILE9BQU8sS0FBSyxFQUFFLG9CQUFvQixFQUFFLE1BQU0scUNBQXFDLENBQUM7QUFFaEY7O0dBRUc7QUFDSCxNQUFNLE1BQU0saUJBQWlCLEdBQUcsMEJBQTBCLEdBQUcscUJBQXFCLEdBQUcsbUJBQW1CLEdBQUcsT0FBTyxDQUFDO0FBRW5IOztHQUVHO0FBQ0gsTUFBTSxNQUFNLGVBQWUsR0FDdkI7SUFDRSwrRUFBK0U7SUFDL0UsT0FBTyxDQUFDLEVBQUUsU0FBUyxDQUFDO0lBQ3BCLGlEQUFpRDtJQUNqRCxNQUFNLEVBQUUsT0FBTyxDQUFDLGlCQUFpQixFQUF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,2BAA2B,CAAC;AAClH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAEhF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,0BAA0B,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,OAAO,CAAC;AAEnH;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB;IACE,+EAA+E;IAC/E,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,iDAAiD;IACjD,MAAM,EAAE,OAAO,CAAC,iBAAiB,EAAE,mBAAmB,GAAG,OAAO,CAAC,CAAC;CACnE,GACD;IACE,8BAA8B;IAC9B,OAAO,EAAE,UAAU,CAAC;IACpB,iDAAiD;IACjD,MAAM,EAAE,OAAO,CAAC,iBAAiB,EAAE,qBAAqB,GAAG,0BAA0B,CAAC,CAAC;CACxF,CAAC;AAEN;;;GAGG;AACH,wBAAgB,yCAAyC,CACvD,KAAK,EAAE;IACL,YAAY,EAAE,oBAAoB,EAAE,CAAC;IACrC,UAAU,EAAE,UAAU,CAAC;CACxB,EACD,gBAAgB,EAAE,4BAA4B,GAC7C,eAAe,EAAE,CAGnB;AAED,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,oBAAoB,EAAE,GACnC,eAAe,EAAE,CA4BnB"}
@@ -25,11 +25,14 @@ export function getAttestationInfoFromPayload(payload, attestations) {
25
25
  status: 'provided-as-address'
26
26
  };
27
27
  }
28
- // Try to recover address from signature
28
+ // Try to recover address from signature. Recover with default opts (no allowYParityAsV): a slot
29
+ // whose recovery byte is in yParity form (v ∈ {0, 1}) is judged invalid here, matching L1 proving
30
+ // (ValidatorSelectionLib.verifyAttestations → ECDSA.recover only accepts v ∈ {27, 28}). A malicious
31
+ // proposer that lands such a slot cannot have it silently treated as valid off-chain; it is routed to
32
+ // invalid-attestation and invalidated. The gossip receipt path (recoverCoordinationSigner) stays
33
+ // lenient with allowYParityAsV; A-1351 normalizes on pool ingress and before the L1 bundle.
29
34
  try {
30
- const recoveredAddress = recoverAddress(hashedPayload, attestation.signature, {
31
- allowYParityAsV: true
32
- });
35
+ const recoveredAddress = recoverAddress(hashedPayload, attestation.signature);
33
36
  return {
34
37
  address: recoveredAddress,
35
38
  status: 'recovered-from-signature'