@aztec/pxe 4.0.0-nightly.20250907 → 4.0.0-nightly.20260108

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 (379) hide show
  1. package/README.md +5 -5
  2. package/dest/bin/check_oracle_version.d.ts +1 -1
  3. package/dest/bin/check_oracle_version.js +110 -10
  4. package/dest/block_synchronizer/block_synchronizer.d.ts +39 -0
  5. package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -0
  6. package/dest/{synchronizer/synchronizer.js → block_synchronizer/block_synchronizer.js} +23 -23
  7. package/dest/block_synchronizer/index.d.ts +2 -0
  8. package/dest/block_synchronizer/index.d.ts.map +1 -0
  9. package/dest/block_synchronizer/index.js +1 -0
  10. package/dest/config/index.d.ts +9 -17
  11. package/dest/config/index.d.ts.map +1 -1
  12. package/dest/config/index.js +10 -16
  13. package/dest/config/package_info.d.ts +1 -1
  14. package/dest/config/package_info.js +1 -1
  15. package/dest/contract_function_simulator/contract_function_simulator.d.ts +44 -15
  16. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
  17. package/dest/contract_function_simulator/contract_function_simulator.js +142 -57
  18. package/dest/contract_function_simulator/execution_note_cache.d.ts +11 -9
  19. package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
  20. package/dest/contract_function_simulator/execution_note_cache.js +28 -17
  21. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +16 -0
  22. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -0
  23. package/dest/contract_function_simulator/execution_tagging_index_cache.js +26 -0
  24. package/dest/contract_function_simulator/hashed_values_cache.d.ts +2 -2
  25. package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -1
  26. package/dest/contract_function_simulator/index.d.ts +4 -2
  27. package/dest/contract_function_simulator/index.d.ts.map +1 -1
  28. package/dest/contract_function_simulator/index.js +2 -1
  29. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +2 -2
  30. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
  31. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +5 -4
  32. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts.map +1 -1
  33. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +7 -6
  34. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +3 -3
  35. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -1
  36. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +8 -4
  37. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +6 -3
  38. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
  39. package/dest/contract_function_simulator/noir-structs/note_validation_request.js +12 -3
  40. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +22 -0
  41. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -0
  42. package/dest/contract_function_simulator/noir-structs/utility_context.js +33 -0
  43. package/dest/contract_function_simulator/oracle/index.d.ts +2 -2
  44. package/dest/contract_function_simulator/oracle/index.d.ts.map +1 -1
  45. package/dest/contract_function_simulator/oracle/index.js +1 -1
  46. package/dest/contract_function_simulator/oracle/interfaces.d.ts +103 -0
  47. package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -0
  48. package/dest/contract_function_simulator/oracle/interfaces.js +4 -0
  49. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +2 -4
  50. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -1
  51. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.js +1 -1
  52. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +10 -4
  53. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
  54. package/dest/contract_function_simulator/oracle/note_packing_utils.js +10 -5
  55. package/dest/contract_function_simulator/oracle/oracle.d.ts +17 -15
  56. package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
  57. package/dest/contract_function_simulator/oracle/oracle.js +101 -81
  58. package/dest/contract_function_simulator/oracle/private_execution.d.ts +11 -12
  59. package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
  60. package/dest/contract_function_simulator/oracle/private_execution.js +15 -24
  61. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +51 -25
  62. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
  63. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +103 -27
  64. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +65 -36
  65. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
  66. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +171 -69
  67. package/dest/contract_function_simulator/pick_notes.d.ts +2 -2
  68. package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
  69. package/dest/contract_function_simulator/pick_notes.js +1 -1
  70. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +4 -4
  71. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
  72. package/dest/contract_function_simulator/proxied_contract_data_source.js +23 -5
  73. package/dest/contract_function_simulator/proxied_node.d.ts +1 -1
  74. package/dest/contract_function_simulator/proxied_node.d.ts.map +1 -1
  75. package/dest/debug/pxe_debug_utils.d.ts +31 -0
  76. package/dest/debug/pxe_debug_utils.d.ts.map +1 -0
  77. package/dest/debug/pxe_debug_utils.js +37 -0
  78. package/dest/entrypoints/client/bundle/index.d.ts +4 -3
  79. package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
  80. package/dest/entrypoints/client/bundle/index.js +2 -2
  81. package/dest/entrypoints/client/bundle/utils.d.ts +9 -9
  82. package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
  83. package/dest/entrypoints/client/bundle/utils.js +21 -12
  84. package/dest/entrypoints/client/lazy/index.d.ts +4 -3
  85. package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
  86. package/dest/entrypoints/client/lazy/index.js +2 -2
  87. package/dest/entrypoints/client/lazy/utils.d.ts +8 -8
  88. package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
  89. package/dest/entrypoints/client/lazy/utils.js +20 -11
  90. package/dest/entrypoints/pxe_creation_options.d.ts +5 -2
  91. package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
  92. package/dest/entrypoints/server/index.d.ts +5 -3
  93. package/dest/entrypoints/server/index.d.ts.map +1 -1
  94. package/dest/entrypoints/server/index.js +3 -2
  95. package/dest/entrypoints/server/utils.d.ts +5 -24
  96. package/dest/entrypoints/server/utils.d.ts.map +1 -1
  97. package/dest/entrypoints/server/utils.js +17 -45
  98. package/dest/error_enriching.d.ts +11 -0
  99. package/dest/error_enriching.d.ts.map +1 -0
  100. package/dest/{pxe_service/error_enriching.js → error_enriching.js} +9 -6
  101. package/dest/events/event_service.d.ts +15 -0
  102. package/dest/events/event_service.d.ts.map +1 -0
  103. package/dest/events/event_service.js +47 -0
  104. package/dest/events/index.d.ts +2 -0
  105. package/dest/events/index.d.ts.map +1 -0
  106. package/dest/events/index.js +1 -0
  107. package/dest/events/private_event_filter_validator.d.ts +9 -0
  108. package/dest/events/private_event_filter_validator.d.ts.map +1 -0
  109. package/dest/events/private_event_filter_validator.js +39 -0
  110. package/dest/logs/log_service.d.ts +26 -0
  111. package/dest/logs/log_service.d.ts.map +1 -0
  112. package/dest/logs/log_service.js +120 -0
  113. package/dest/notes/index.d.ts +2 -0
  114. package/dest/notes/index.d.ts.map +1 -0
  115. package/dest/notes/index.js +1 -0
  116. package/dest/notes/note_service.d.ts +48 -0
  117. package/dest/notes/note_service.d.ts.map +1 -0
  118. package/dest/notes/note_service.js +152 -0
  119. package/dest/oracle_version.d.ts +3 -3
  120. package/dest/oracle_version.js +2 -2
  121. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +3 -3
  122. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +1 -1
  123. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.js +7 -7
  124. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +1 -1
  125. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.js +6 -6
  126. package/dest/private_kernel/hints/index.d.ts +1 -1
  127. package/dest/private_kernel/index.d.ts +1 -1
  128. package/dest/private_kernel/private_kernel_execution_prover.d.ts +9 -2
  129. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
  130. package/dest/private_kernel/private_kernel_execution_prover.js +38 -32
  131. package/dest/private_kernel/private_kernel_oracle.d.ts +3 -2
  132. package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
  133. package/dest/private_kernel/private_kernel_oracle_impl.d.ts +10 -9
  134. package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +1 -1
  135. package/dest/private_kernel/private_kernel_oracle_impl.js +7 -7
  136. package/dest/public_storage/public_storage_service.d.ts +24 -0
  137. package/dest/public_storage/public_storage_service.d.ts.map +1 -0
  138. package/dest/public_storage/public_storage_service.js +26 -0
  139. package/dest/pxe.d.ts +232 -0
  140. package/dest/pxe.d.ts.map +1 -0
  141. package/dest/{pxe_service/pxe_service.js → pxe.js} +299 -324
  142. package/dest/storage/address_store/address_store.d.ts +11 -0
  143. package/dest/storage/address_store/address_store.d.ts.map +1 -0
  144. package/dest/storage/{address_data_provider/address_data_provider.js → address_store/address_store.js} +1 -4
  145. package/dest/storage/address_store/index.d.ts +2 -0
  146. package/dest/storage/address_store/index.d.ts.map +1 -0
  147. package/dest/storage/address_store/index.js +1 -0
  148. package/dest/storage/anchor_block_store/anchor_block_store.d.ts +9 -0
  149. package/dest/storage/anchor_block_store/anchor_block_store.d.ts.map +1 -0
  150. package/dest/storage/{sync_data_provider/sync_data_provider.js → anchor_block_store/anchor_block_store.js} +2 -12
  151. package/dest/storage/anchor_block_store/index.d.ts +2 -0
  152. package/dest/storage/anchor_block_store/index.d.ts.map +1 -0
  153. package/dest/storage/anchor_block_store/index.js +1 -0
  154. package/dest/storage/capsule_store/capsule_store.d.ts +57 -0
  155. package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -0
  156. package/dest/storage/{capsule_data_provider/capsule_data_provider.js → capsule_store/capsule_store.js} +34 -10
  157. package/dest/storage/capsule_store/index.d.ts +2 -0
  158. package/dest/storage/capsule_store/index.d.ts.map +1 -0
  159. package/dest/storage/capsule_store/index.js +1 -0
  160. package/dest/storage/{contract_data_provider/contract_data_provider.d.ts → contract_store/contract_store.d.ts} +10 -18
  161. package/dest/storage/contract_store/contract_store.d.ts.map +1 -0
  162. package/dest/storage/{contract_data_provider/contract_data_provider.js → contract_store/contract_store.js} +46 -18
  163. package/dest/storage/contract_store/index.d.ts +2 -0
  164. package/dest/storage/contract_store/index.d.ts.map +1 -0
  165. package/dest/storage/contract_store/index.js +1 -0
  166. package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.d.ts +1 -1
  167. package/dest/storage/contract_store/private_functions_tree.d.ts.map +1 -0
  168. package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.js +1 -1
  169. package/dest/storage/index.d.ts +8 -9
  170. package/dest/storage/index.d.ts.map +1 -1
  171. package/dest/storage/index.js +7 -8
  172. package/dest/storage/metadata.d.ts +1 -1
  173. package/dest/storage/note_store/index.d.ts +3 -0
  174. package/dest/storage/note_store/index.d.ts.map +1 -0
  175. package/dest/storage/note_store/index.js +2 -0
  176. package/dest/storage/note_store/note_store.d.ts +84 -0
  177. package/dest/storage/note_store/note_store.d.ts.map +1 -0
  178. package/dest/storage/{note_data_provider/note_data_provider.js → note_store/note_store.js} +144 -82
  179. package/dest/storage/private_event_store/private_event_store.d.ts +56 -0
  180. package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -0
  181. package/dest/storage/private_event_store/private_event_store.js +157 -0
  182. package/dest/storage/tagging_store/index.d.ts +4 -0
  183. package/dest/storage/tagging_store/index.d.ts.map +1 -0
  184. package/dest/storage/tagging_store/index.js +3 -0
  185. package/dest/storage/tagging_store/recipient_tagging_store.d.ts +21 -0
  186. package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -0
  187. package/dest/storage/tagging_store/recipient_tagging_store.js +42 -0
  188. package/dest/storage/tagging_store/sender_address_book_store.d.ts +14 -0
  189. package/dest/storage/tagging_store/sender_address_book_store.d.ts.map +1 -0
  190. package/dest/storage/tagging_store/sender_address_book_store.js +30 -0
  191. package/dest/storage/tagging_store/sender_tagging_store.d.ts +67 -0
  192. package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -0
  193. package/dest/storage/tagging_store/sender_tagging_store.js +196 -0
  194. package/dest/tagging/index.d.ts +16 -0
  195. package/dest/tagging/index.d.ts.map +1 -0
  196. package/dest/tagging/index.js +23 -0
  197. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +14 -0
  198. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -0
  199. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +99 -0
  200. package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts +12 -0
  201. package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts.map +1 -0
  202. package/dest/tagging/recipient_sync/utils/find_highest_indexes.js +20 -0
  203. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +14 -0
  204. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -0
  205. package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +29 -0
  206. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +20 -0
  207. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -0
  208. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +74 -0
  209. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +11 -0
  210. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -0
  211. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +32 -0
  212. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +18 -0
  213. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -0
  214. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +55 -0
  215. package/dest/tree_membership/tree_membership_service.d.ts +52 -0
  216. package/dest/tree_membership/tree_membership_service.d.ts.map +1 -0
  217. package/dest/tree_membership/tree_membership_service.js +84 -0
  218. package/package.json +22 -24
  219. package/src/bin/check_oracle_version.ts +134 -10
  220. package/src/{synchronizer/synchronizer.ts → block_synchronizer/block_synchronizer.ts} +22 -23
  221. package/src/block_synchronizer/index.ts +1 -0
  222. package/src/config/index.ts +18 -32
  223. package/src/config/package_info.ts +1 -1
  224. package/src/contract_function_simulator/contract_function_simulator.ts +233 -75
  225. package/src/contract_function_simulator/execution_note_cache.ts +33 -17
  226. package/src/contract_function_simulator/execution_tagging_index_cache.ts +32 -0
  227. package/src/contract_function_simulator/hashed_values_cache.ts +1 -1
  228. package/src/contract_function_simulator/index.ts +3 -1
  229. package/src/contract_function_simulator/noir-structs/event_validation_request.ts +1 -1
  230. package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +6 -5
  231. package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +10 -5
  232. package/src/contract_function_simulator/noir-structs/note_validation_request.ts +14 -2
  233. package/src/contract_function_simulator/noir-structs/utility_context.ts +42 -0
  234. package/src/contract_function_simulator/oracle/index.ts +1 -1
  235. package/src/contract_function_simulator/oracle/interfaces.ts +175 -0
  236. package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +1 -1
  237. package/src/contract_function_simulator/oracle/note_packing_utils.ts +21 -5
  238. package/src/contract_function_simulator/oracle/oracle.ts +135 -80
  239. package/src/contract_function_simulator/oracle/private_execution.ts +22 -28
  240. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +200 -56
  241. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +260 -109
  242. package/src/contract_function_simulator/pick_notes.ts +1 -1
  243. package/src/contract_function_simulator/proxied_contract_data_source.ts +24 -7
  244. package/src/debug/pxe_debug_utils.ts +48 -0
  245. package/src/entrypoints/client/bundle/index.ts +3 -2
  246. package/src/entrypoints/client/bundle/utils.ts +21 -23
  247. package/src/entrypoints/client/lazy/index.ts +3 -2
  248. package/src/entrypoints/client/lazy/utils.ts +20 -23
  249. package/src/entrypoints/pxe_creation_options.ts +4 -1
  250. package/src/entrypoints/server/index.ts +4 -2
  251. package/src/entrypoints/server/utils.ts +20 -68
  252. package/src/{pxe_service/error_enriching.ts → error_enriching.ts} +11 -15
  253. package/src/events/event_service.ts +77 -0
  254. package/src/events/index.ts +1 -0
  255. package/src/events/private_event_filter_validator.ts +48 -0
  256. package/src/logs/log_service.ts +202 -0
  257. package/src/notes/index.ts +1 -0
  258. package/src/notes/note_service.ts +200 -0
  259. package/src/oracle_version.ts +2 -2
  260. package/src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts +5 -9
  261. package/src/private_kernel/hints/compute_tx_include_by_timestamp.ts +6 -6
  262. package/src/private_kernel/private_kernel_execution_prover.ts +51 -43
  263. package/src/private_kernel/private_kernel_oracle.ts +2 -1
  264. package/src/private_kernel/private_kernel_oracle_impl.ts +10 -9
  265. package/src/public_storage/public_storage_service.ts +33 -0
  266. package/src/{pxe_service/pxe_service.ts → pxe.ts} +349 -410
  267. package/src/storage/{address_data_provider/address_data_provider.ts → address_store/address_store.ts} +1 -7
  268. package/src/storage/address_store/index.ts +1 -0
  269. package/src/storage/{sync_data_provider/sync_data_provider.ts → anchor_block_store/anchor_block_store.ts} +2 -17
  270. package/src/storage/anchor_block_store/index.ts +1 -0
  271. package/src/storage/{capsule_data_provider/capsule_data_provider.ts → capsule_store/capsule_store.ts} +34 -12
  272. package/src/storage/capsule_store/index.ts +1 -0
  273. package/src/storage/{contract_data_provider/contract_data_provider.ts → contract_store/contract_store.ts} +67 -28
  274. package/src/storage/contract_store/index.ts +1 -0
  275. package/src/storage/{contract_data_provider → contract_store}/private_functions_tree.ts +1 -1
  276. package/src/storage/index.ts +7 -8
  277. package/src/storage/note_store/index.ts +2 -0
  278. package/src/storage/{note_data_provider/note_data_provider.ts → note_store/note_store.ts} +173 -111
  279. package/src/storage/private_event_store/private_event_store.ts +213 -0
  280. package/src/storage/tagging_store/index.ts +3 -0
  281. package/src/storage/tagging_store/recipient_tagging_store.ts +53 -0
  282. package/src/storage/tagging_store/sender_address_book_store.ts +42 -0
  283. package/src/storage/tagging_store/sender_tagging_store.ts +244 -0
  284. package/src/tagging/index.ts +28 -0
  285. package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +129 -0
  286. package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +34 -0
  287. package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +43 -0
  288. package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +96 -0
  289. package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +44 -0
  290. package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +72 -0
  291. package/src/tree_membership/tree_membership_service.ts +112 -0
  292. package/dest/bin/index.d.ts +0 -3
  293. package/dest/bin/index.d.ts.map +0 -1
  294. package/dest/bin/index.js +0 -48
  295. package/dest/contract_function_simulator/execution_data_provider.d.ts +0 -285
  296. package/dest/contract_function_simulator/execution_data_provider.d.ts.map +0 -1
  297. package/dest/contract_function_simulator/execution_data_provider.js +0 -14
  298. package/dest/contract_function_simulator/oracle/typed_oracle.d.ts +0 -87
  299. package/dest/contract_function_simulator/oracle/typed_oracle.d.ts.map +0 -1
  300. package/dest/contract_function_simulator/oracle/typed_oracle.js +0 -146
  301. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts +0 -158
  302. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +0 -1
  303. package/dest/contract_function_simulator/pxe_oracle_interface.js +0 -701
  304. package/dest/contract_function_simulator/tagging_utils.d.ts +0 -17
  305. package/dest/contract_function_simulator/tagging_utils.d.ts.map +0 -1
  306. package/dest/contract_function_simulator/tagging_utils.js +0 -23
  307. package/dest/pxe_service/error_enriching.d.ts +0 -11
  308. package/dest/pxe_service/error_enriching.d.ts.map +0 -1
  309. package/dest/pxe_service/index.d.ts +0 -3
  310. package/dest/pxe_service/index.d.ts.map +0 -1
  311. package/dest/pxe_service/index.js +0 -2
  312. package/dest/pxe_service/pxe_service.d.ts +0 -100
  313. package/dest/pxe_service/pxe_service.d.ts.map +0 -1
  314. package/dest/storage/address_data_provider/address_data_provider.d.ts +0 -13
  315. package/dest/storage/address_data_provider/address_data_provider.d.ts.map +0 -1
  316. package/dest/storage/address_data_provider/index.d.ts +0 -2
  317. package/dest/storage/address_data_provider/index.d.ts.map +0 -1
  318. package/dest/storage/address_data_provider/index.js +0 -1
  319. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +0 -27
  320. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +0 -1
  321. package/dest/storage/capsule_data_provider/index.d.ts +0 -2
  322. package/dest/storage/capsule_data_provider/index.d.ts.map +0 -1
  323. package/dest/storage/capsule_data_provider/index.js +0 -1
  324. package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +0 -1
  325. package/dest/storage/contract_data_provider/index.d.ts +0 -2
  326. package/dest/storage/contract_data_provider/index.d.ts.map +0 -1
  327. package/dest/storage/contract_data_provider/index.js +0 -1
  328. package/dest/storage/contract_data_provider/private_functions_tree.d.ts.map +0 -1
  329. package/dest/storage/data_provider.d.ts +0 -4
  330. package/dest/storage/data_provider.d.ts.map +0 -1
  331. package/dest/storage/data_provider.js +0 -1
  332. package/dest/storage/note_data_provider/index.d.ts +0 -3
  333. package/dest/storage/note_data_provider/index.d.ts.map +0 -1
  334. package/dest/storage/note_data_provider/index.js +0 -2
  335. package/dest/storage/note_data_provider/note_dao.d.ts +0 -100
  336. package/dest/storage/note_data_provider/note_dao.d.ts.map +0 -1
  337. package/dest/storage/note_data_provider/note_dao.js +0 -102
  338. package/dest/storage/note_data_provider/note_data_provider.d.ts +0 -20
  339. package/dest/storage/note_data_provider/note_data_provider.d.ts.map +0 -1
  340. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +0 -37
  341. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +0 -1
  342. package/dest/storage/private_event_data_provider/private_event_data_provider.js +0 -96
  343. package/dest/storage/sync_data_provider/index.d.ts +0 -2
  344. package/dest/storage/sync_data_provider/index.d.ts.map +0 -1
  345. package/dest/storage/sync_data_provider/index.js +0 -1
  346. package/dest/storage/sync_data_provider/sync_data_provider.d.ts +0 -12
  347. package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +0 -1
  348. package/dest/storage/tagging_data_provider/index.d.ts +0 -2
  349. package/dest/storage/tagging_data_provider/index.d.ts.map +0 -1
  350. package/dest/storage/tagging_data_provider/index.js +0 -1
  351. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +0 -18
  352. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +0 -1
  353. package/dest/storage/tagging_data_provider/tagging_data_provider.js +0 -82
  354. package/dest/synchronizer/index.d.ts +0 -2
  355. package/dest/synchronizer/index.d.ts.map +0 -1
  356. package/dest/synchronizer/index.js +0 -1
  357. package/dest/synchronizer/synchronizer.d.ts +0 -35
  358. package/dest/synchronizer/synchronizer.d.ts.map +0 -1
  359. package/dest/test/pxe_test_suite.d.ts +0 -3
  360. package/dest/test/pxe_test_suite.d.ts.map +0 -1
  361. package/dest/test/pxe_test_suite.js +0 -97
  362. package/src/bin/index.ts +0 -62
  363. package/src/contract_function_simulator/execution_data_provider.ts +0 -361
  364. package/src/contract_function_simulator/oracle/typed_oracle.ts +0 -289
  365. package/src/contract_function_simulator/pxe_oracle_interface.ts +0 -1020
  366. package/src/contract_function_simulator/tagging_utils.ts +0 -32
  367. package/src/pxe_service/index.ts +0 -2
  368. package/src/storage/address_data_provider/index.ts +0 -1
  369. package/src/storage/capsule_data_provider/index.ts +0 -1
  370. package/src/storage/contract_data_provider/index.ts +0 -1
  371. package/src/storage/data_provider.ts +0 -3
  372. package/src/storage/note_data_provider/index.ts +0 -2
  373. package/src/storage/note_data_provider/note_dao.ts +0 -154
  374. package/src/storage/private_event_data_provider/private_event_data_provider.ts +0 -134
  375. package/src/storage/sync_data_provider/index.ts +0 -1
  376. package/src/storage/tagging_data_provider/index.ts +0 -1
  377. package/src/storage/tagging_data_provider/tagging_data_provider.ts +0 -123
  378. package/src/synchronizer/index.ts +0 -1
  379. package/src/test/pxe_test_suite.ts +0 -113
@@ -1,17 +0,0 @@
1
- import type { Fr } from '@aztec/foundation/fields';
2
- import { IndexedTaggingSecret } from '@aztec/stdlib/logs';
3
- export declare const WINDOW_HALF_SIZE = 10;
4
- export declare function getIndexedTaggingSecretsForTheWindow(secretsAndWindows: {
5
- appTaggingSecret: Fr;
6
- leftMostIndex: number;
7
- rightMostIndex: number;
8
- }[]): IndexedTaggingSecret[];
9
- /**
10
- * Creates a map from app tagging secret to initial index.
11
- * @param indexedTaggingSecrets - The indexed tagging secrets to get the initial indexes from.
12
- * @returns The map from app tagging secret to initial index.
13
- */
14
- export declare function getInitialIndexesMap(indexedTaggingSecrets: IndexedTaggingSecret[]): {
15
- [k: string]: number;
16
- };
17
- //# sourceMappingURL=tagging_utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tagging_utils.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/tagging_utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAG1D,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,wBAAgB,oCAAoC,CAClD,iBAAiB,EAAE;IAAE,gBAAgB,EAAE,EAAE,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,EAAE,GAC3F,oBAAoB,EAAE,CAQxB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,qBAAqB,EAAE,oBAAoB,EAAE,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAQ3G"}
@@ -1,23 +0,0 @@
1
- import { IndexedTaggingSecret } from '@aztec/stdlib/logs';
2
- // Half the size of the window we slide over the tagging secret indexes.
3
- export const WINDOW_HALF_SIZE = 10;
4
- export function getIndexedTaggingSecretsForTheWindow(secretsAndWindows) {
5
- const secrets = [];
6
- for (const secretAndWindow of secretsAndWindows){
7
- for(let i = secretAndWindow.leftMostIndex; i <= secretAndWindow.rightMostIndex; i++){
8
- secrets.push(new IndexedTaggingSecret(secretAndWindow.appTaggingSecret, i));
9
- }
10
- }
11
- return secrets;
12
- }
13
- /**
14
- * Creates a map from app tagging secret to initial index.
15
- * @param indexedTaggingSecrets - The indexed tagging secrets to get the initial indexes from.
16
- * @returns The map from app tagging secret to initial index.
17
- */ export function getInitialIndexesMap(indexedTaggingSecrets) {
18
- const initialIndexes = {};
19
- for (const indexedTaggingSecret of indexedTaggingSecrets){
20
- initialIndexes[indexedTaggingSecret.appTaggingSecret.toString()] = indexedTaggingSecret.index;
21
- }
22
- return initialIndexes;
23
- }
@@ -1,11 +0,0 @@
1
- import type { Logger } from '@aztec/foundation/log';
2
- import { type SimulationError } from '@aztec/stdlib/errors';
3
- import type { ContractDataProvider } from '../storage/contract_data_provider/contract_data_provider.js';
4
- /**
5
- * Adds contract and function names to a simulation error, if they
6
- * can be found in the PXE database
7
- * @param err - The error to enrich.
8
- */
9
- export declare function enrichSimulationError(err: SimulationError, contractDataProvider: ContractDataProvider, logger: Logger): Promise<void>;
10
- export declare function enrichPublicSimulationError(err: SimulationError, contractDataProvider: ContractDataProvider, logger: Logger): Promise<void>;
11
- //# sourceMappingURL=error_enriching.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error_enriching.d.ts","sourceRoot":"","sources":["../../src/pxe_service/error_enriching.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAIpD,OAAO,EAAE,KAAK,eAAe,EAA6B,MAAM,sBAAsB,CAAC;AAEvF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AAExG;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,eAAe,EACpB,oBAAoB,EAAE,oBAAoB,EAC1C,MAAM,EAAE,MAAM,iBAoDf;AAED,wBAAsB,2BAA2B,CAC/C,GAAG,EAAE,eAAe,EACpB,oBAAoB,EAAE,oBAAoB,EAC1C,MAAM,EAAE,MAAM,iBAqCf"}
@@ -1,3 +0,0 @@
1
- export * from './pxe_service.js';
2
- export { enrichPublicSimulationError } from './error_enriching.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pxe_service/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './pxe_service.js';
2
- export { enrichPublicSimulationError } from './error_enriching.js';
@@ -1,100 +0,0 @@
1
- import { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
3
- import { type Logger } from '@aztec/foundation/log';
4
- import type { SiblingPath } from '@aztec/foundation/trees';
5
- import type { AztecAsyncKVStore } from '@aztec/kv-store';
6
- import { type ProtocolContractsProvider } from '@aztec/protocol-contracts';
7
- import type { CircuitSimulator } from '@aztec/simulator/client';
8
- import { type ContractArtifact } from '@aztec/stdlib/abi';
9
- import type { AuthWitness } from '@aztec/stdlib/auth-witness';
10
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
11
- import type { L2Block } from '@aztec/stdlib/block';
12
- import { CompleteAddress, type ContractClassWithId, type ContractInstanceWithAddress, type NodeInfo, type PartialAddress } from '@aztec/stdlib/contract';
13
- import type { GasFees } from '@aztec/stdlib/gas';
14
- import type { AztecNode, EventMetadataDefinition, GetContractClassLogsResponse, GetPublicLogsResponse, PXE, PXEInfo, PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
15
- import type { LogFilter } from '@aztec/stdlib/logs';
16
- import { type NotesFilter, UniqueNote } from '@aztec/stdlib/note';
17
- import { type IndexedTxEffect, PrivateExecutionResult, SimulationOverrides, Tx, TxExecutionRequest, type TxHash, TxProfileResult, TxProvingResult, type TxReceipt, TxSimulationResult, UtilitySimulationResult } from '@aztec/stdlib/tx';
18
- import type { PXEServiceConfig } from '../config/index.js';
19
- /**
20
- * A Private eXecution Environment (PXE) implementation.
21
- */
22
- export declare class PXEService implements PXE {
23
- #private;
24
- private node;
25
- private synchronizer;
26
- private keyStore;
27
- private contractDataProvider;
28
- private noteDataProvider;
29
- private capsuleDataProvider;
30
- private syncDataProvider;
31
- private taggingDataProvider;
32
- private addressDataProvider;
33
- private privateEventDataProvider;
34
- private simulator;
35
- private packageVersion;
36
- private proverEnabled;
37
- private proofCreator;
38
- private protocolContractsProvider;
39
- private log;
40
- private jobQueue;
41
- private constructor();
42
- /**
43
- * Creates an instance of a PXE Service by instantiating all the necessary data providers and services.
44
- * Also triggers the registration of the protocol contracts and makes sure the provided node
45
- * can be contacted.
46
- *
47
- * @returns A promise that resolves PXE service is ready to be used.
48
- */
49
- static create(node: AztecNode, store: AztecAsyncKVStore, proofCreator: PrivateKernelProver, simulator: CircuitSimulator, protocolContractsProvider: ProtocolContractsProvider, config: PXEServiceConfig, loggerOrSuffix?: string | Logger): Promise<PXEService>;
50
- isL1ToL2MessageSynced(l1ToL2Message: Fr): Promise<boolean>;
51
- getL2ToL1MembershipWitness(blockNumber: number, l2Tol1Message: Fr): Promise<[bigint, SiblingPath<number>]>;
52
- getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
53
- getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
54
- getBlockNumber(): Promise<number>;
55
- getProvenBlockNumber(): Promise<number>;
56
- getPublicLogs(filter: LogFilter): Promise<GetPublicLogsResponse>;
57
- getContractClassLogs(filter: LogFilter): Promise<GetContractClassLogsResponse>;
58
- getPublicStorageAt(contract: AztecAddress, slot: Fr): Promise<Fr>;
59
- getL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>]>;
60
- /** Returns an estimate of the db size in bytes. */
61
- estimateDbSize(): Promise<number>;
62
- getContractInstance(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined>;
63
- getContractClassMetadata(id: Fr, includeArtifact?: boolean): Promise<{
64
- contractClass: ContractClassWithId | undefined;
65
- isContractClassPubliclyRegistered: boolean;
66
- artifact: ContractArtifact | undefined;
67
- }>;
68
- getContractMetadata(address: AztecAddress): Promise<{
69
- contractInstance: ContractInstanceWithAddress | undefined;
70
- isContractInitialized: boolean;
71
- isContractPublished: boolean;
72
- }>;
73
- registerAccount(secretKey: Fr, partialAddress: PartialAddress): Promise<CompleteAddress>;
74
- registerSender(address: AztecAddress): Promise<AztecAddress>;
75
- getSenders(): Promise<AztecAddress[]>;
76
- removeSender(address: AztecAddress): Promise<void>;
77
- getRegisteredAccounts(): Promise<CompleteAddress[]>;
78
- registerContractClass(artifact: ContractArtifact): Promise<void>;
79
- registerContract(contract: {
80
- instance: ContractInstanceWithAddress;
81
- artifact?: ContractArtifact;
82
- }): Promise<void>;
83
- updateContract(contractAddress: AztecAddress, artifact: ContractArtifact): Promise<void>;
84
- getContracts(): Promise<AztecAddress[]>;
85
- getNotes(filter: NotesFilter): Promise<UniqueNote[]>;
86
- getBlock(blockNumber: number): Promise<L2Block | undefined>;
87
- getCurrentBaseFees(): Promise<GasFees>;
88
- proveTx(txRequest: TxExecutionRequest, privateExecutionResult?: PrivateExecutionResult): Promise<TxProvingResult>;
89
- profileTx(txRequest: TxExecutionRequest, profileMode: 'full' | 'execution-steps' | 'gates', skipProofGeneration?: boolean): Promise<TxProfileResult>;
90
- simulateTx(txRequest: TxExecutionRequest, simulatePublic: boolean, skipTxValidation?: boolean, skipFeeEnforcement?: boolean, overrides?: SimulationOverrides, scopes?: AztecAddress[]): Promise<TxSimulationResult>;
91
- sendTx(tx: Tx): Promise<TxHash>;
92
- simulateUtility(functionName: string, args: any[], to: AztecAddress, authwits?: AuthWitness[], _from?: AztecAddress, scopes?: AztecAddress[]): Promise<UtilitySimulationResult>;
93
- getNodeInfo(): Promise<NodeInfo>;
94
- getPXEInfo(): Promise<PXEInfo>;
95
- getPrivateEvents<T>(contractAddress: AztecAddress, eventMetadataDef: EventMetadataDefinition, from: number, numBlocks: number, recipients: AztecAddress[]): Promise<T[]>;
96
- getPublicEvents<T>(eventMetadataDef: EventMetadataDefinition, from: number, limit: number): Promise<T[]>;
97
- resetNoteSyncData(): Promise<void>;
98
- stop(): Promise<void>;
99
- }
100
- //# sourceMappingURL=pxe_service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pxe_service.d.ts","sourceRoot":"","sources":["../../src/pxe_service/pxe_service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAGlE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAEL,KAAK,yBAAyB,EAE/B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACL,KAAK,gBAAgB,EAQtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO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E,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IA6BxG,iBAAiB;IAIhB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
@@ -1,13 +0,0 @@
1
- import type { AztecAsyncKVStore } from '@aztec/kv-store';
2
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
3
- import { CompleteAddress } from '@aztec/stdlib/contract';
4
- import type { DataProvider } from '../data_provider.js';
5
- export declare class AddressDataProvider implements DataProvider {
6
- #private;
7
- constructor(store: AztecAsyncKVStore);
8
- addCompleteAddress(completeAddress: CompleteAddress): Promise<boolean>;
9
- getCompleteAddress(account: AztecAddress): Promise<CompleteAddress | undefined>;
10
- getCompleteAddresses(): Promise<CompleteAddress[]>;
11
- getSize(): Promise<number>;
12
- }
13
- //# sourceMappingURL=address_data_provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"address_data_provider.d.ts","sourceRoot":"","sources":["../../../src/storage/address_data_provider/address_data_provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AACzF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,qBAAa,mBAAoB,YAAW,YAAY;;gBAK1C,KAAK,EAAE,iBAAiB;IAOpC,kBAAkB,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC;IAsCtE,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAIzE,oBAAoB,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;IAMlD,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;CAGjC"}
@@ -1,2 +0,0 @@
1
- export { AddressDataProvider } from './address_data_provider.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/address_data_provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1 +0,0 @@
1
- export { AddressDataProvider } from './address_data_provider.js';
@@ -1,27 +0,0 @@
1
- import { Fr } from '@aztec/foundation/fields';
2
- import { type Logger } from '@aztec/foundation/log';
3
- import type { AztecAsyncKVStore } from '@aztec/kv-store';
4
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
5
- import type { DataProvider } from '../data_provider.js';
6
- export declare class CapsuleDataProvider implements DataProvider {
7
- #private;
8
- logger: Logger;
9
- constructor(store: AztecAsyncKVStore);
10
- storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[]): Promise<void>;
11
- loadCapsule(contractAddress: AztecAddress, slot: Fr): Promise<Fr[] | null>;
12
- deleteCapsule(contractAddress: AztecAddress, slot: Fr): Promise<void>;
13
- copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number): Promise<void>;
14
- /**
15
- * Appends multiple capsules to a capsule array stored at the base slot.
16
- * The array length is stored at the base slot, and elements are stored in consecutive slots after it.
17
- * All operations are performed in a single transaction.
18
- * @param contractAddress - The contract address that owns the capsule array
19
- * @param baseSlot - The slot where the array length is stored
20
- * @param content - Array of capsule data to append
21
- */
22
- appendToCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][]): Promise<void>;
23
- readCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr): Promise<Fr[][]>;
24
- setCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][]): Promise<void>;
25
- getSize(): Promise<number>;
26
- }
27
- //# sourceMappingURL=capsule_data_provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capsule_data_provider.d.ts","sourceRoot":"","sources":["../../../src/storage/capsule_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;IAqB/D,OAAO;CAMrB"}
@@ -1,2 +0,0 @@
1
- export { CapsuleDataProvider } from './capsule_data_provider.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/capsule_data_provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1 +0,0 @@
1
- export { CapsuleDataProvider } from './capsule_data_provider.js';
@@ -1 +0,0 @@
1
- {"version":3,"file":"contract_data_provider.d.ts","sourceRoot":"","sources":["../../../src/storage/contract_data_provider/contract_data_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AACxE,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,gCAAgC,EACrC,KAAK,qBAAqB,EAC1B,gBAAgB,EAKjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,2BAA2B,EAGjC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD;;;;;;GAMG;AACH,qBAAa,oBAAqB,YAAW,YAAY;;gBAW3C,KAAK,EAAE,iBAAiB;IAOvB,mBAAmB,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoB7E,mBAAmB,CAAC,QAAQ,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;IAmDzE,qBAAqB,IAAI,OAAO,CAAC,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AK/B,oBAAoB,CAAC,eAAe,EAAE,YAAY;IAKlD,oBAAoB,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB;IAM9E,OAAO;CAiCrB"}
@@ -1,2 +0,0 @@
1
- export { ContractDataProvider } from './contract_data_provider.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/contract_data_provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -1 +0,0 @@
1
- export { ContractDataProvider } from './contract_data_provider.js';
@@ -1 +0,0 @@
1
- {"version":3,"file":"private_functions_tree.d.ts","sourceRoot":"","sources":["../../../src/storage/contract_data_provider/private_functions_tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EAAE,iBAAiB,EAAmB,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,KAAK,gBAAgB,EAAE,gBAAgB,EAAgB,MAAM,mBAAmB,CAAC;AAQ1F;;;;;GAKG;AACH,qBAAa,oBAAoB;IAGX,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAFrD,OAAO,CAAC,IAAI,CAAC,CAAa;IAE1B,OAAO;WAEM,MAAM,CAAC,QAAQ,EAAE,gBAAgB;IAS9C;;;;;;;;OAQG;IACU,4BAA4B,CACvC,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,iBAAiB,CAAC,OAAO,oBAAoB,CAAC,CAAC;YAiB5C,OAAO;CAMtB"}
@@ -1,4 +0,0 @@
1
- export interface DataProvider {
2
- getSize(): Promise<number>;
3
- }
4
- //# sourceMappingURL=data_provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data_provider.d.ts","sourceRoot":"","sources":["../../src/storage/data_provider.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5B"}
@@ -1 +0,0 @@
1
- export { };
@@ -1,3 +0,0 @@
1
- export { NoteDao } from './note_dao.js';
2
- export { NoteDataProvider } from './note_data_provider.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/note_data_provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { NoteDao } from './note_dao.js';
2
- export { NoteDataProvider } from './note_data_provider.js';
@@ -1,100 +0,0 @@
1
- import { Fr } from '@aztec/foundation/fields';
2
- import { BufferReader } from '@aztec/foundation/serialize';
3
- import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
- import { Note } from '@aztec/stdlib/note';
5
- import { TxHash } from '@aztec/stdlib/tx';
6
- import type { NoteData } from '../../contract_function_simulator/oracle/typed_oracle.js';
7
- /**
8
- * A Note Data Access Object, representing a note that was committed to the note hash tree, holding all of the
9
- * information required to use it during execution and manage its state.
10
- */
11
- export declare class NoteDao implements NoteData {
12
- /** The packed content of the note, as will be returned in the getNotes oracle. */
13
- note: Note;
14
- /** The address of the contract that created the note (i.e. the address used by the kernel during siloing). */
15
- contractAddress: AztecAddress;
16
- /**
17
- * The storage location of the note. This value is not used for anything in PXE, but we do index by storage slot
18
- * since contracts typically make queries based on it.
19
- */
20
- storageSlot: Fr;
21
- /** The nonce that was injected into the note hash preimage in order to guarantee uniqueness. */
22
- noteNonce: Fr;
23
- /**
24
- * The inner hash (non-unique, non-siloed) of the note. Each contract determines how the note is hashed. Can
25
- * be used alongside contractAddress and nonce to compute the uniqueNoteHash and the siloedNoteHash.
26
- */
27
- noteHash: Fr;
28
- /**
29
- * The nullifier of the note, siloed by contract address.
30
- * Note: Might be set as 0 if the note was added to PXE as nullified.
31
- */
32
- siloedNullifier: Fr;
33
- /** The hash of the tx in which this note was created. Knowing the tx hash allows for efficient node queries e.g.
34
- * when searching for txEffects.
35
- */
36
- txHash: TxHash;
37
- /** The L2 block number in which the tx with this note was included. Used for note management while processing
38
- * reorgs.*/
39
- l2BlockNumber: number;
40
- /** The L2 block hash in which the tx with this note was included. Used for note management while processing
41
- * reorgs.*/
42
- l2BlockHash: string;
43
- /** The index of the leaf in the global note hash tree the note is stored at */
44
- index: bigint;
45
- /**
46
- * The address whose public key was used to encrypt the note log during delivery.
47
- * (This is the x-coordinate of the public key.)
48
- */
49
- recipient: AztecAddress;
50
- constructor(
51
- /** The packed content of the note, as will be returned in the getNotes oracle. */
52
- note: Note,
53
- /** The address of the contract that created the note (i.e. the address used by the kernel during siloing). */
54
- contractAddress: AztecAddress,
55
- /**
56
- * The storage location of the note. This value is not used for anything in PXE, but we do index by storage slot
57
- * since contracts typically make queries based on it.
58
- */
59
- storageSlot: Fr,
60
- /** The nonce that was injected into the note hash preimage in order to guarantee uniqueness. */
61
- noteNonce: Fr,
62
- /**
63
- * The inner hash (non-unique, non-siloed) of the note. Each contract determines how the note is hashed. Can
64
- * be used alongside contractAddress and nonce to compute the uniqueNoteHash and the siloedNoteHash.
65
- */
66
- noteHash: Fr,
67
- /**
68
- * The nullifier of the note, siloed by contract address.
69
- * Note: Might be set as 0 if the note was added to PXE as nullified.
70
- */
71
- siloedNullifier: Fr,
72
- /** The hash of the tx in which this note was created. Knowing the tx hash allows for efficient node queries e.g.
73
- * when searching for txEffects.
74
- */
75
- txHash: TxHash,
76
- /** The L2 block number in which the tx with this note was included. Used for note management while processing
77
- * reorgs.*/
78
- l2BlockNumber: number,
79
- /** The L2 block hash in which the tx with this note was included. Used for note management while processing
80
- * reorgs.*/
81
- l2BlockHash: string,
82
- /** The index of the leaf in the global note hash tree the note is stored at */
83
- index: bigint,
84
- /**
85
- * The address whose public key was used to encrypt the note log during delivery.
86
- * (This is the x-coordinate of the public key.)
87
- */
88
- recipient: AztecAddress);
89
- toBuffer(): Buffer;
90
- static fromBuffer(buffer: Buffer | BufferReader): NoteDao;
91
- toString(): string;
92
- static fromString(str: string): NoteDao;
93
- /**
94
- * Returns the size in bytes of the Note Dao.
95
- * @returns - Its size in bytes.
96
- */
97
- getSize(): number;
98
- static random({ note, contractAddress, storageSlot, noteNonce, noteHash, siloedNullifier, txHash, l2BlockNumber, l2BlockHash, index, recipient, }?: Partial<NoteDao>): Promise<NoteDao>;
99
- }
100
- //# sourceMappingURL=note_dao.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"note_dao.d.ts","sourceRoot":"","sources":["../../../src/storage/note_data_provider/note_dao.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAS,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0DAA0D,CAAC;AAEzF;;;GAGG;AACH,qBAAa,OAAQ,YAAW,QAAQ;IAIpC,kFAAkF;IAC3E,IAAI,EAAE,IAAI;IACjB,8GAA8G;IACvG,eAAe,EAAE,YAAY;IACpC;;;OAGG;IACI,WAAW,EAAE,EAAE;IACtB,gGAAgG;IACzF,SAAS,EAAE,EAAE;IAGpB;;;OAGG;IACI,QAAQ,EAAE,EAAE;IACnB;;;OAGG;IACI,eAAe,EAAE,EAAE;IAG1B;;OAEG;IACI,MAAM,EAAE,MAAM;IACrB;gBACY;IACL,aAAa,EAAE,MAAM;IAC5B;gBACY;IACL,WAAW,EAAE,MAAM;IAC1B,+EAA+E;IACxE,KAAK,EAAE,MAAM;IACpB;;;OAGG;IACI,SAAS,EAAE,YAAY;;IAzC9B,kFAAkF;IAC3E,IAAI,EAAE,IAAI;IACjB,8GAA8G;IACvG,eAAe,EAAE,YAAY;IACpC;;;OAGG;IACI,WAAW,EAAE,EAAE;IACtB,gGAAgG;IACzF,SAAS,EAAE,EAAE;IAGpB;;;OAGG;IACI,QAAQ,EAAE,EAAE;IACnB;;;OAGG;IACI,eAAe,EAAE,EAAE;IAG1B;;OAEG;IACI,MAAM,EAAE,MAAM;IACrB;gBACY;IACL,aAAa,EAAE,MAAM;IAC5B;gBACY;IACL,WAAW,EAAE,MAAM;IAC1B,+EAA+E;IACxE,KAAK,EAAE,MAAM;IACpB;;;OAGG;IACI,SAAS,EAAE,YAAY;IAGhC,QAAQ,IAAI,MAAM;IAgBlB,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IA8B/C,QAAQ;IAIR,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;IAK7B;;;OAGG;IACI,OAAO;WAMD,MAAM,CAAC,EAClB,IAAoB,EACpB,eAA2B,EAC3B,WAAyB,EACzB,SAAuB,EACvB,QAAsB,EACtB,eAA6B,EAC7B,MAAwB,EACxB,aAAgD,EAChD,WAAoC,EACpC,KAA8B,EAC9B,SAAqB,GACtB,GAAE,OAAO,CAAC,OAAO,CAAM;CAezB"}
@@ -1,102 +0,0 @@
1
- import { toBigIntBE } from '@aztec/foundation/bigint-buffer';
2
- import { Fr, Point } from '@aztec/foundation/fields';
3
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
- import { AztecAddress } from '@aztec/stdlib/aztec-address';
5
- import { Note } from '@aztec/stdlib/note';
6
- import { TxHash } from '@aztec/stdlib/tx';
7
- /**
8
- * A Note Data Access Object, representing a note that was committed to the note hash tree, holding all of the
9
- * information required to use it during execution and manage its state.
10
- */ export class NoteDao {
11
- note;
12
- contractAddress;
13
- storageSlot;
14
- noteNonce;
15
- noteHash;
16
- siloedNullifier;
17
- txHash;
18
- l2BlockNumber;
19
- l2BlockHash;
20
- index;
21
- recipient;
22
- constructor(// Note information
23
- /** The packed content of the note, as will be returned in the getNotes oracle. */ note, /** The address of the contract that created the note (i.e. the address used by the kernel during siloing). */ contractAddress, /**
24
- * The storage location of the note. This value is not used for anything in PXE, but we do index by storage slot
25
- * since contracts typically make queries based on it.
26
- */ storageSlot, /** The nonce that was injected into the note hash preimage in order to guarantee uniqueness. */ noteNonce, // Computed values
27
- /**
28
- * The inner hash (non-unique, non-siloed) of the note. Each contract determines how the note is hashed. Can
29
- * be used alongside contractAddress and nonce to compute the uniqueNoteHash and the siloedNoteHash.
30
- */ noteHash, /**
31
- * The nullifier of the note, siloed by contract address.
32
- * Note: Might be set as 0 if the note was added to PXE as nullified.
33
- */ siloedNullifier, // Metadata
34
- /** The hash of the tx in which this note was created. Knowing the tx hash allows for efficient node queries e.g.
35
- * when searching for txEffects.
36
- */ txHash, /** The L2 block number in which the tx with this note was included. Used for note management while processing
37
- * reorgs.*/ l2BlockNumber, /** The L2 block hash in which the tx with this note was included. Used for note management while processing
38
- * reorgs.*/ l2BlockHash, /** The index of the leaf in the global note hash tree the note is stored at */ index, /**
39
- * The address whose public key was used to encrypt the note log during delivery.
40
- * (This is the x-coordinate of the public key.)
41
- */ recipient){
42
- this.note = note;
43
- this.contractAddress = contractAddress;
44
- this.storageSlot = storageSlot;
45
- this.noteNonce = noteNonce;
46
- this.noteHash = noteHash;
47
- this.siloedNullifier = siloedNullifier;
48
- this.txHash = txHash;
49
- this.l2BlockNumber = l2BlockNumber;
50
- this.l2BlockHash = l2BlockHash;
51
- this.index = index;
52
- this.recipient = recipient;
53
- }
54
- toBuffer() {
55
- return serializeToBuffer([
56
- this.note,
57
- this.contractAddress,
58
- this.storageSlot,
59
- this.noteNonce,
60
- this.noteHash,
61
- this.siloedNullifier,
62
- this.txHash,
63
- this.l2BlockNumber,
64
- Fr.fromHexString(this.l2BlockHash),
65
- this.index,
66
- this.recipient
67
- ]);
68
- }
69
- static fromBuffer(buffer) {
70
- const reader = BufferReader.asReader(buffer);
71
- const note = Note.fromBuffer(reader);
72
- const contractAddress = AztecAddress.fromBuffer(reader);
73
- const storageSlot = Fr.fromBuffer(reader);
74
- const noteNonce = Fr.fromBuffer(reader);
75
- const noteHash = Fr.fromBuffer(reader);
76
- const siloedNullifier = Fr.fromBuffer(reader);
77
- const txHash = reader.readObject(TxHash);
78
- const l2BlockNumber = reader.readNumber();
79
- const l2BlockHash = Fr.fromBuffer(reader).toString();
80
- const index = toBigIntBE(reader.readBytes(32));
81
- const recipient = AztecAddress.fromBuffer(reader);
82
- return new NoteDao(note, contractAddress, storageSlot, noteNonce, noteHash, siloedNullifier, txHash, l2BlockNumber, l2BlockHash, index, recipient);
83
- }
84
- toString() {
85
- return '0x' + this.toBuffer().toString('hex');
86
- }
87
- static fromString(str) {
88
- const hex = str.replace(/^0x/, '');
89
- return NoteDao.fromBuffer(Buffer.from(hex, 'hex'));
90
- }
91
- /**
92
- * Returns the size in bytes of the Note Dao.
93
- * @returns - Its size in bytes.
94
- */ getSize() {
95
- const indexSize = Math.ceil(Math.log2(Number(this.index)));
96
- const noteSize = 4 + this.note.items.length * Fr.SIZE_IN_BYTES;
97
- return noteSize + AztecAddress.SIZE_IN_BYTES + Fr.SIZE_IN_BYTES * 4 + TxHash.SIZE + Point.SIZE_IN_BYTES + indexSize;
98
- }
99
- static async random({ note = Note.random(), contractAddress = undefined, storageSlot = Fr.random(), noteNonce = Fr.random(), noteHash = Fr.random(), siloedNullifier = Fr.random(), txHash = TxHash.random(), l2BlockNumber = Math.floor(Math.random() * 1000), l2BlockHash = Fr.random().toString(), index = Fr.random().toBigInt(), recipient = undefined } = {}) {
100
- return new NoteDao(note, contractAddress ?? await AztecAddress.random(), storageSlot, noteNonce, noteHash, siloedNullifier, txHash, l2BlockNumber, l2BlockHash, index, recipient ?? await AztecAddress.random());
101
- }
102
- }
@@ -1,20 +0,0 @@
1
- import type { Fr } from '@aztec/foundation/fields';
2
- import type { AztecAsyncKVStore } from '@aztec/kv-store';
3
- import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
- import type { InBlock } from '@aztec/stdlib/block';
5
- import { type NotesFilter } from '@aztec/stdlib/note';
6
- import type { DataProvider } from '../data_provider.js';
7
- import { NoteDao } from './note_dao.js';
8
- export declare class NoteDataProvider implements DataProvider {
9
- #private;
10
- private constructor();
11
- static create(store: AztecAsyncKVStore): Promise<NoteDataProvider>;
12
- addScope(scope: AztecAddress): Promise<boolean>;
13
- addNotes(notes: NoteDao[], scope?: AztecAddress): Promise<void>;
14
- removeNotesAfter(blockNumber: number): Promise<void>;
15
- unnullifyNotesAfter(blockNumber: number, synchedBlockNumber?: number): Promise<void>;
16
- getNotes(filter: NotesFilter): Promise<NoteDao[]>;
17
- removeNullifiedNotes(nullifiers: InBlock<Fr>[], recipient: AztecAddress): Promise<NoteDao[]>;
18
- getSize(): Promise<number>;
19
- }
20
- //# sourceMappingURL=note_data_provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"note_data_provider.d.ts","sourceRoot":"","sources":["../../../src/storage/note_data_provider/note_data_provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,KAAK,EAAE,iBAAiB,EAAqC,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,qBAAa,gBAAiB,YAAW,YAAY;;IAsBnD,OAAO;WAsBa,MAAM,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAWlE,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;IAgB5D,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,KAAK,GAAE,YAAgC,GAAG,OAAO,CAAC,IAAI,CAAC;IAwB3E,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB9C,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkD3F,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IA8FvD,oBAAoB,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IA2DtF,OAAO;CAkBd"}
@@ -1,37 +0,0 @@
1
- import { Fr } from '@aztec/foundation/fields';
2
- import type { AztecAsyncKVStore } from '@aztec/kv-store';
3
- import type { EventSelector } from '@aztec/stdlib/abi';
4
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
5
- import type { TxHash } from '@aztec/stdlib/tx';
6
- import type { DataProvider } from '../data_provider.js';
7
- /**
8
- * Stores decrypted private event logs.
9
- */
10
- export declare class PrivateEventDataProvider implements DataProvider {
11
- #private;
12
- logger: import("@aztec/foundation/log").Logger;
13
- constructor(store: AztecAsyncKVStore);
14
- /**
15
- * Store a private event log.
16
- * @param contractAddress - The address of the contract that emitted the event.
17
- * @param recipient - The recipient of the event.
18
- * @param eventSelector - The event selector of the event.
19
- * @param msgContent - The content of the event.
20
- * @param txHash - The transaction hash of the event log.
21
- * @param eventCommitmentIndex - The index of the event commitment in the nullifier tree.
22
- * @param blockNumber - The block number in which the event was emitted.
23
- */
24
- storePrivateEventLog(contractAddress: AztecAddress, recipient: AztecAddress, eventSelector: EventSelector, msgContent: Fr[], txHash: TxHash, eventCommitmentIndex: number, blockNumber: number): Promise<void>;
25
- /**
26
- * Returns the private events given search parameters.
27
- * @param contractAddress - The address of the contract to get events from.
28
- * @param from - The block number to search from.
29
- * @param numBlocks - The amount of blocks to search.
30
- * @param recipients - The addresses that decrypted the logs.
31
- * @param eventSelector - The event selector to filter by.
32
- * @returns - The event log contents.
33
- */
34
- getPrivateEvents(contractAddress: AztecAddress, from: number, numBlocks: number, recipients: AztecAddress[], eventSelector: EventSelector): Promise<Fr[][]>;
35
- getSize(): Promise<number>;
36
- }
37
- //# sourceMappingURL=private_event_data_provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"private_event_data_provider.d.ts","sourceRoot":"","sources":["../../../src/storage/private_event_data_provider/private_event_data_provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,KAAK,EAAmB,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AACzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAQxD;;GAEG;AACH,qBAAa,wBAAyB,YAAW,YAAY;;IAS3D,MAAM,yCAA+C;gBAEzC,KAAK,EAAE,iBAAiB;IAOpC;;;;;;;;;OASG;IACH,oBAAoB,CAClB,eAAe,EAAE,YAAY,EAC7B,SAAS,EAAE,YAAY,EACvB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,EAAE,EAAE,EAChB,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,MAAM,EAC5B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC;IA4BhB;;;;;;;;OAQG;IACU,gBAAgB,CAC3B,eAAe,EAAE,YAAY,EAC7B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,YAAY,EAAE,EAC1B,aAAa,EAAE,aAAa,GAC3B,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC;IAgClB,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;CAG3B"}