@aztec/pxe 0.0.0-test.1 → 0.0.1-commit.5476d83

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 (328) hide show
  1. package/README.md +5 -5
  2. package/dest/bin/check_oracle_version.d.ts +2 -0
  3. package/dest/bin/check_oracle_version.d.ts.map +1 -0
  4. package/dest/bin/check_oracle_version.js +39 -0
  5. package/dest/config/index.d.ts +11 -24
  6. package/dest/config/index.d.ts.map +1 -1
  7. package/dest/config/index.js +18 -33
  8. package/dest/config/package_info.d.ts +1 -1
  9. package/dest/config/package_info.js +1 -1
  10. package/dest/contract_function_simulator/contract_function_simulator.d.ts +56 -0
  11. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -0
  12. package/dest/contract_function_simulator/contract_function_simulator.js +300 -0
  13. package/dest/contract_function_simulator/execution_data_provider.d.ts +265 -0
  14. package/dest/contract_function_simulator/execution_data_provider.d.ts.map +1 -0
  15. package/dest/contract_function_simulator/execution_data_provider.js +14 -0
  16. package/dest/contract_function_simulator/execution_note_cache.d.ts +94 -0
  17. package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -0
  18. package/dest/contract_function_simulator/execution_note_cache.js +190 -0
  19. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +16 -0
  20. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -0
  21. package/dest/contract_function_simulator/execution_tagging_index_cache.js +26 -0
  22. package/dest/contract_function_simulator/hashed_values_cache.d.ts +28 -0
  23. package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -0
  24. package/dest/contract_function_simulator/hashed_values_cache.js +36 -0
  25. package/dest/contract_function_simulator/index.d.ts +14 -0
  26. package/dest/contract_function_simulator/index.d.ts.map +1 -0
  27. package/dest/contract_function_simulator/index.js +12 -0
  28. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +20 -0
  29. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -0
  30. package/dest/contract_function_simulator/noir-structs/event_validation_request.js +37 -0
  31. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +15 -0
  32. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts.map +1 -0
  33. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +25 -0
  34. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +17 -0
  35. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -0
  36. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +65 -0
  37. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +23 -0
  38. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -0
  39. package/dest/contract_function_simulator/noir-structs/note_validation_request.js +48 -0
  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 +14 -0
  44. package/dest/contract_function_simulator/oracle/index.d.ts.map +1 -0
  45. package/dest/contract_function_simulator/oracle/index.js +2 -0
  46. package/dest/contract_function_simulator/oracle/interfaces.d.ts +100 -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 +17 -0
  50. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -0
  51. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.js +24 -0
  52. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +24 -0
  53. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -0
  54. package/dest/contract_function_simulator/oracle/note_packing_utils.js +50 -0
  55. package/dest/contract_function_simulator/oracle/oracle.d.ts +58 -0
  56. package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -0
  57. package/dest/contract_function_simulator/oracle/oracle.js +333 -0
  58. package/dest/contract_function_simulator/oracle/private_execution.d.ts +48 -0
  59. package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -0
  60. package/dest/contract_function_simulator/oracle/private_execution.js +123 -0
  61. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +231 -0
  62. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -0
  63. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +428 -0
  64. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +153 -0
  65. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -0
  66. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +265 -0
  67. package/dest/contract_function_simulator/pick_notes.d.ts +85 -0
  68. package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -0
  69. package/dest/contract_function_simulator/pick_notes.js +51 -0
  70. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +6 -0
  71. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -0
  72. package/dest/contract_function_simulator/proxied_contract_data_source.js +62 -0
  73. package/dest/contract_function_simulator/proxied_node.d.ts +9 -0
  74. package/dest/contract_function_simulator/proxied_node.d.ts.map +1 -0
  75. package/dest/contract_function_simulator/proxied_node.js +27 -0
  76. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts +122 -0
  77. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +1 -0
  78. package/dest/contract_function_simulator/pxe_oracle_interface.js +694 -0
  79. package/dest/entrypoints/client/bundle/index.d.ts +5 -3
  80. package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
  81. package/dest/entrypoints/client/bundle/index.js +3 -2
  82. package/dest/entrypoints/client/bundle/utils.d.ts +10 -10
  83. package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
  84. package/dest/entrypoints/client/bundle/utils.js +18 -12
  85. package/dest/entrypoints/client/lazy/index.d.ts +5 -3
  86. package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
  87. package/dest/entrypoints/client/lazy/index.js +3 -2
  88. package/dest/entrypoints/client/lazy/utils.d.ts +9 -9
  89. package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
  90. package/dest/entrypoints/client/lazy/utils.js +17 -11
  91. package/dest/entrypoints/pxe_creation_options.d.ts +14 -0
  92. package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -0
  93. package/dest/entrypoints/server/index.d.ts +6 -4
  94. package/dest/entrypoints/server/index.d.ts.map +1 -1
  95. package/dest/entrypoints/server/index.js +4 -3
  96. package/dest/entrypoints/server/utils.d.ts +8 -16
  97. package/dest/entrypoints/server/utils.d.ts.map +1 -1
  98. package/dest/entrypoints/server/utils.js +30 -35
  99. package/dest/error_enriching.d.ts +11 -0
  100. package/dest/error_enriching.d.ts.map +1 -0
  101. package/dest/{pxe_service/error_enriching.js → error_enriching.js} +26 -18
  102. package/dest/oracle_version.d.ts +3 -0
  103. package/dest/oracle_version.d.ts.map +1 -0
  104. package/dest/oracle_version.js +10 -0
  105. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +28 -0
  106. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +1 -0
  107. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.js +271 -0
  108. package/dest/private_kernel/hints/compute_side_effect_uniqueness_hints.d.ts +3 -0
  109. package/dest/private_kernel/hints/compute_side_effect_uniqueness_hints.d.ts.map +1 -0
  110. package/dest/private_kernel/hints/compute_side_effect_uniqueness_hints.js +48 -0
  111. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +4 -0
  112. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +1 -0
  113. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.js +41 -0
  114. package/dest/private_kernel/hints/index.d.ts +3 -0
  115. package/dest/private_kernel/hints/index.d.ts.map +1 -0
  116. package/dest/{kernel_prover → private_kernel}/hints/index.js +1 -0
  117. package/dest/private_kernel/index.d.ts +3 -0
  118. package/dest/private_kernel/index.d.ts.map +1 -0
  119. package/dest/private_kernel/index.js +2 -0
  120. package/dest/private_kernel/private_kernel_execution_prover.d.ts +44 -0
  121. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -0
  122. package/dest/private_kernel/private_kernel_execution_prover.js +289 -0
  123. package/dest/private_kernel/private_kernel_oracle.d.ts +62 -0
  124. package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -0
  125. package/dest/private_kernel/private_kernel_oracle.js +4 -0
  126. package/dest/private_kernel/private_kernel_oracle_impl.d.ts +45 -0
  127. package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +1 -0
  128. package/dest/{kernel_oracle/index.js → private_kernel/private_kernel_oracle_impl.js} +19 -9
  129. package/dest/pxe.d.ts +240 -0
  130. package/dest/pxe.d.ts.map +1 -0
  131. package/dest/pxe.js +771 -0
  132. package/dest/storage/address_data_provider/address_data_provider.d.ts +2 -4
  133. package/dest/storage/address_data_provider/address_data_provider.d.ts.map +1 -1
  134. package/dest/storage/address_data_provider/address_data_provider.js +0 -3
  135. package/dest/storage/address_data_provider/index.d.ts +1 -1
  136. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +15 -6
  137. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +1 -1
  138. package/dest/storage/capsule_data_provider/capsule_data_provider.js +85 -24
  139. package/dest/storage/capsule_data_provider/index.d.ts +1 -1
  140. package/dest/storage/contract_data_provider/contract_data_provider.d.ts +13 -58
  141. package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +1 -1
  142. package/dest/storage/contract_data_provider/contract_data_provider.js +89 -79
  143. package/dest/storage/contract_data_provider/index.d.ts +1 -2
  144. package/dest/storage/contract_data_provider/index.d.ts.map +1 -1
  145. package/dest/storage/contract_data_provider/index.js +0 -1
  146. package/dest/storage/contract_data_provider/private_functions_tree.d.ts +3 -42
  147. package/dest/storage/contract_data_provider/private_functions_tree.d.ts.map +1 -1
  148. package/dest/storage/contract_data_provider/private_functions_tree.js +9 -61
  149. package/dest/storage/index.d.ts +3 -4
  150. package/dest/storage/index.d.ts.map +1 -1
  151. package/dest/storage/index.js +2 -3
  152. package/dest/storage/metadata.d.ts +2 -0
  153. package/dest/storage/metadata.d.ts.map +1 -0
  154. package/dest/storage/metadata.js +1 -0
  155. package/dest/storage/note_data_provider/index.d.ts +2 -2
  156. package/dest/storage/note_data_provider/index.d.ts.map +1 -1
  157. package/dest/storage/note_data_provider/index.js +1 -1
  158. package/dest/storage/note_data_provider/note_data_provider.d.ts +73 -10
  159. package/dest/storage/note_data_provider/note_data_provider.d.ts.map +1 -1
  160. package/dest/storage/note_data_provider/note_data_provider.js +145 -83
  161. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +37 -0
  162. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +1 -0
  163. package/dest/storage/private_event_data_provider/private_event_data_provider.js +105 -0
  164. package/dest/storage/sync_data_provider/index.d.ts +1 -1
  165. package/dest/storage/sync_data_provider/sync_data_provider.d.ts +3 -5
  166. package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +1 -1
  167. package/dest/storage/sync_data_provider/sync_data_provider.js +2 -5
  168. package/dest/storage/tagging_data_provider/index.d.ts +1 -1
  169. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +29 -7
  170. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +1 -1
  171. package/dest/storage/tagging_data_provider/tagging_data_provider.js +48 -24
  172. package/dest/synchronizer/index.d.ts +1 -1
  173. package/dest/synchronizer/synchronizer.d.ts +8 -10
  174. package/dest/synchronizer/synchronizer.d.ts.map +1 -1
  175. package/dest/synchronizer/synchronizer.js +17 -19
  176. package/dest/tagging/constants.d.ts +2 -0
  177. package/dest/tagging/constants.d.ts.map +1 -0
  178. package/dest/tagging/constants.js +2 -0
  179. package/dest/tagging/index.d.ts +7 -0
  180. package/dest/tagging/index.d.ts.map +1 -0
  181. package/dest/tagging/index.js +5 -0
  182. package/dest/tagging/siloed_tag.d.ts +14 -0
  183. package/dest/tagging/siloed_tag.d.ts.map +1 -0
  184. package/dest/tagging/siloed_tag.js +20 -0
  185. package/dest/tagging/tag.d.ts +12 -0
  186. package/dest/tagging/tag.d.ts.map +1 -0
  187. package/dest/tagging/tag.js +17 -0
  188. package/dest/tagging/utils.d.ts +18 -0
  189. package/dest/tagging/utils.d.ts.map +1 -0
  190. package/dest/tagging/utils.js +24 -0
  191. package/package.json +37 -34
  192. package/src/bin/check_oracle_version.ts +50 -0
  193. package/src/config/index.ts +27 -55
  194. package/src/config/package_info.ts +1 -1
  195. package/src/contract_function_simulator/contract_function_simulator.ts +553 -0
  196. package/src/contract_function_simulator/execution_data_provider.ts +333 -0
  197. package/src/contract_function_simulator/execution_note_cache.ts +229 -0
  198. package/src/contract_function_simulator/execution_tagging_index_cache.ts +32 -0
  199. package/src/contract_function_simulator/hashed_values_cache.ts +47 -0
  200. package/src/contract_function_simulator/index.ts +13 -0
  201. package/src/contract_function_simulator/noir-structs/event_validation_request.ts +47 -0
  202. package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +27 -0
  203. package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +69 -0
  204. package/src/contract_function_simulator/noir-structs/note_validation_request.ts +61 -0
  205. package/src/contract_function_simulator/noir-structs/utility_context.ts +42 -0
  206. package/src/contract_function_simulator/oracle/index.ts +16 -0
  207. package/src/contract_function_simulator/oracle/interfaces.ts +170 -0
  208. package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +23 -0
  209. package/src/contract_function_simulator/oracle/note_packing_utils.ts +54 -0
  210. package/src/contract_function_simulator/oracle/oracle.ts +583 -0
  211. package/src/contract_function_simulator/oracle/private_execution.ts +207 -0
  212. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +633 -0
  213. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +358 -0
  214. package/src/contract_function_simulator/pick_notes.ts +141 -0
  215. package/src/contract_function_simulator/proxied_contract_data_source.ts +66 -0
  216. package/src/contract_function_simulator/proxied_node.ts +33 -0
  217. package/src/contract_function_simulator/pxe_oracle_interface.ts +1008 -0
  218. package/src/entrypoints/client/bundle/index.ts +4 -2
  219. package/src/entrypoints/client/bundle/utils.ts +36 -36
  220. package/src/entrypoints/client/lazy/index.ts +4 -2
  221. package/src/entrypoints/client/lazy/utils.ts +36 -31
  222. package/src/entrypoints/{client/pxe_creation_options.ts → pxe_creation_options.ts} +4 -1
  223. package/src/entrypoints/server/index.ts +5 -3
  224. package/src/entrypoints/server/utils.ts +58 -50
  225. package/src/{pxe_service/error_enriching.ts → error_enriching.ts} +36 -27
  226. package/src/oracle_version.ts +11 -0
  227. package/src/{kernel_prover → private_kernel}/hints/build_private_kernel_reset_private_inputs.ts +158 -146
  228. package/src/private_kernel/hints/compute_side_effect_uniqueness_hints.ts +173 -0
  229. package/src/private_kernel/hints/compute_tx_include_by_timestamp.ts +58 -0
  230. package/src/{kernel_prover → private_kernel}/hints/index.ts +1 -0
  231. package/src/private_kernel/index.ts +2 -0
  232. package/src/private_kernel/private_kernel_execution_prover.ts +436 -0
  233. package/src/{kernel_prover/proving_data_oracle.ts → private_kernel/private_kernel_oracle.ts} +17 -29
  234. package/src/{kernel_oracle/index.ts → private_kernel/private_kernel_oracle_impl.ts} +30 -15
  235. package/src/pxe.ts +1085 -0
  236. package/src/storage/address_data_provider/address_data_provider.ts +1 -7
  237. package/src/storage/capsule_data_provider/capsule_data_provider.ts +97 -30
  238. package/src/storage/contract_data_provider/contract_data_provider.ts +109 -93
  239. package/src/storage/contract_data_provider/index.ts +0 -1
  240. package/src/storage/contract_data_provider/private_functions_tree.ts +11 -75
  241. package/src/storage/index.ts +2 -4
  242. package/src/storage/metadata.ts +1 -0
  243. package/src/storage/note_data_provider/index.ts +1 -1
  244. package/src/storage/note_data_provider/note_data_provider.ts +176 -122
  245. package/src/storage/private_event_data_provider/private_event_data_provider.ts +143 -0
  246. package/src/storage/sync_data_provider/sync_data_provider.ts +4 -10
  247. package/src/storage/tagging_data_provider/tagging_data_provider.ts +58 -30
  248. package/src/synchronizer/synchronizer.ts +21 -22
  249. package/src/tagging/constants.ts +2 -0
  250. package/src/tagging/index.ts +6 -0
  251. package/src/tagging/siloed_tag.ts +22 -0
  252. package/src/tagging/tag.ts +16 -0
  253. package/src/tagging/utils.ts +31 -0
  254. package/dest/bin/index.d.ts +0 -3
  255. package/dest/bin/index.d.ts.map +0 -1
  256. package/dest/bin/index.js +0 -28
  257. package/dest/entrypoints/client/pxe_creation_options.d.ts +0 -11
  258. package/dest/entrypoints/client/pxe_creation_options.d.ts.map +0 -1
  259. package/dest/kernel_oracle/index.d.ts +0 -45
  260. package/dest/kernel_oracle/index.d.ts.map +0 -1
  261. package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.d.ts +0 -28
  262. package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.d.ts.map +0 -1
  263. package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.js +0 -270
  264. package/dest/kernel_prover/hints/index.d.ts +0 -2
  265. package/dest/kernel_prover/hints/index.d.ts.map +0 -1
  266. package/dest/kernel_prover/index.d.ts +0 -3
  267. package/dest/kernel_prover/index.d.ts.map +0 -1
  268. package/dest/kernel_prover/index.js +0 -2
  269. package/dest/kernel_prover/kernel_prover.d.ts +0 -38
  270. package/dest/kernel_prover/kernel_prover.d.ts.map +0 -1
  271. package/dest/kernel_prover/kernel_prover.js +0 -217
  272. package/dest/kernel_prover/proving_data_oracle.d.ts +0 -73
  273. package/dest/kernel_prover/proving_data_oracle.d.ts.map +0 -1
  274. package/dest/kernel_prover/proving_data_oracle.js +0 -4
  275. package/dest/note_decryption_utils/add_public_values_to_payload.d.ts +0 -11
  276. package/dest/note_decryption_utils/add_public_values_to_payload.d.ts.map +0 -1
  277. package/dest/note_decryption_utils/add_public_values_to_payload.js +0 -47
  278. package/dest/pxe_http/index.d.ts +0 -2
  279. package/dest/pxe_http/index.d.ts.map +0 -1
  280. package/dest/pxe_http/index.js +0 -1
  281. package/dest/pxe_http/pxe_http_server.d.ts +0 -16
  282. package/dest/pxe_http/pxe_http_server.d.ts.map +0 -1
  283. package/dest/pxe_http/pxe_http_server.js +0 -27
  284. package/dest/pxe_oracle_interface/index.d.ts +0 -159
  285. package/dest/pxe_oracle_interface/index.d.ts.map +0 -1
  286. package/dest/pxe_oracle_interface/index.js +0 -692
  287. package/dest/pxe_oracle_interface/tagging_utils.d.ts +0 -17
  288. package/dest/pxe_oracle_interface/tagging_utils.d.ts.map +0 -1
  289. package/dest/pxe_oracle_interface/tagging_utils.js +0 -23
  290. package/dest/pxe_service/error_enriching.d.ts +0 -11
  291. package/dest/pxe_service/error_enriching.d.ts.map +0 -1
  292. package/dest/pxe_service/index.d.ts +0 -3
  293. package/dest/pxe_service/index.d.ts.map +0 -1
  294. package/dest/pxe_service/index.js +0 -2
  295. package/dest/pxe_service/pxe_service.d.ts +0 -111
  296. package/dest/pxe_service/pxe_service.d.ts.map +0 -1
  297. package/dest/pxe_service/pxe_service.js +0 -664
  298. package/dest/storage/auth_witness_data_provider/auth_witness_data_provider.d.ts +0 -11
  299. package/dest/storage/auth_witness_data_provider/auth_witness_data_provider.d.ts.map +0 -1
  300. package/dest/storage/auth_witness_data_provider/auth_witness_data_provider.js +0 -20
  301. package/dest/storage/auth_witness_data_provider/index.d.ts +0 -2
  302. package/dest/storage/auth_witness_data_provider/index.d.ts.map +0 -1
  303. package/dest/storage/auth_witness_data_provider/index.js +0 -1
  304. package/dest/storage/data_provider.d.ts +0 -4
  305. package/dest/storage/data_provider.d.ts.map +0 -1
  306. package/dest/storage/data_provider.js +0 -1
  307. package/dest/storage/note_data_provider/note_dao.d.ts +0 -106
  308. package/dest/storage/note_data_provider/note_dao.d.ts.map +0 -1
  309. package/dest/storage/note_data_provider/note_dao.js +0 -106
  310. package/dest/test/pxe_test_suite.d.ts +0 -3
  311. package/dest/test/pxe_test_suite.d.ts.map +0 -1
  312. package/dest/test/pxe_test_suite.js +0 -97
  313. package/src/bin/index.ts +0 -38
  314. package/src/kernel_prover/index.ts +0 -2
  315. package/src/kernel_prover/kernel_prover.ts +0 -351
  316. package/src/note_decryption_utils/add_public_values_to_payload.ts +0 -64
  317. package/src/pxe_http/index.ts +0 -1
  318. package/src/pxe_http/pxe_http_server.ts +0 -29
  319. package/src/pxe_oracle_interface/index.ts +0 -925
  320. package/src/pxe_oracle_interface/tagging_utils.ts +0 -32
  321. package/src/pxe_service/index.ts +0 -2
  322. package/src/pxe_service/pxe_service.ts +0 -949
  323. package/src/storage/auth_witness_data_provider/auth_witness_data_provider.ts +0 -34
  324. package/src/storage/auth_witness_data_provider/index.ts +0 -1
  325. package/src/storage/data_provider.ts +0 -3
  326. package/src/storage/note_data_provider/note_dao.ts +0 -162
  327. package/src/test/pxe_test_suite.ts +0 -111
  328. /package/dest/entrypoints/{client/pxe_creation_options.js → pxe_creation_options.js} +0 -0
@@ -2,8 +2,13 @@ import { toBufferBE } from '@aztec/foundation/bigint-buffer';
2
2
  import { toArray } from '@aztec/foundation/iterable';
3
3
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import { NoteStatus } from '@aztec/stdlib/note';
5
- import { NoteDao } from './note_dao.js';
6
- export class NoteDataProvider {
5
+ import { NoteDao } from '@aztec/stdlib/note';
6
+ /**
7
+ * NoteDataProvider manages the storage and retrieval of notes.
8
+ *
9
+ * Notes can be active or nullified. This class processes new notes, nullifications,
10
+ * and performs rollback handling in the case of a reorg.
11
+ **/ export class NoteDataProvider {
7
12
  #store;
8
13
  #notes;
9
14
  #nullifiedNotes;
@@ -12,15 +17,11 @@ export class NoteDataProvider {
12
17
  #nullifiedNotesToScope;
13
18
  #nullifiedNotesByContract;
14
19
  #nullifiedNotesByStorageSlot;
15
- #nullifiedNotesByTxHash;
16
- #nullifiedNotesByAddressPoint;
17
20
  #nullifiedNotesByNullifier;
18
21
  #scopes;
19
22
  #notesToScope;
20
23
  #notesByContractAndScope;
21
24
  #notesByStorageSlotAndScope;
22
- #notesByTxHashAndScope;
23
- #notesByAddressPointAndScope;
24
25
  constructor(store){
25
26
  this.#store = store;
26
27
  this.#notes = store.openMap('notes');
@@ -30,27 +31,37 @@ export class NoteDataProvider {
30
31
  this.#nullifiedNotesToScope = store.openMultiMap('nullified_notes_to_scope');
31
32
  this.#nullifiedNotesByContract = store.openMultiMap('nullified_notes_by_contract');
32
33
  this.#nullifiedNotesByStorageSlot = store.openMultiMap('nullified_notes_by_storage_slot');
33
- this.#nullifiedNotesByTxHash = store.openMultiMap('nullified_notes_by_tx_hash');
34
- this.#nullifiedNotesByAddressPoint = store.openMultiMap('nullified_notes_by_address_point');
35
34
  this.#nullifiedNotesByNullifier = store.openMap('nullified_notes_by_nullifier');
36
35
  this.#scopes = store.openMap('scopes');
37
36
  this.#notesToScope = store.openMultiMap('notes_to_scope');
38
37
  this.#notesByContractAndScope = new Map();
39
38
  this.#notesByStorageSlotAndScope = new Map();
40
- this.#notesByTxHashAndScope = new Map();
41
- this.#notesByAddressPointAndScope = new Map();
42
39
  }
43
- static async create(store) {
40
+ /**
41
+ * Creates and initializes a new NoteDataProvider instance.
42
+ *
43
+ * This factory method creates a NoteDataProvider and restores any existing
44
+ * scope-specific indexes from the database.
45
+ *
46
+ * @param store - The key-value store to use for persistence
47
+ * @returns Promise resolving to a fully initialized NoteDataProvider instance
48
+ */ static async create(store) {
44
49
  const pxeDB = new NoteDataProvider(store);
45
50
  for await (const scope of pxeDB.#scopes.keysAsync()){
46
51
  pxeDB.#notesByContractAndScope.set(scope, store.openMultiMap(`${scope}:notes_by_contract`));
47
52
  pxeDB.#notesByStorageSlotAndScope.set(scope, store.openMultiMap(`${scope}:notes_by_storage_slot`));
48
- pxeDB.#notesByTxHashAndScope.set(scope, store.openMultiMap(`${scope}:notes_by_tx_hash`));
49
- pxeDB.#notesByAddressPointAndScope.set(scope, store.openMultiMap(`${scope}:notes_by_address_point`));
50
53
  }
51
54
  return pxeDB;
52
55
  }
53
- async addScope(scope) {
56
+ /**
57
+ * Adds a new scope to the note data provider.
58
+ *
59
+ * Scopes provide privacy isolation by creating separate indexes for each user.
60
+ * Each scope gets its own set of indexes for efficient note retrieval by various criteria.
61
+ *
62
+ * @param scope - The AztecAddress representing the scope/user to add
63
+ * @returns Promise resolving to true if scope was added, false if it already existed
64
+ */ async addScope(scope) {
54
65
  const scopeString = scope.toString();
55
66
  if (await this.#scopes.hasAsync(scopeString)) {
56
67
  return false;
@@ -58,32 +69,53 @@ export class NoteDataProvider {
58
69
  await this.#scopes.set(scopeString, true);
59
70
  this.#notesByContractAndScope.set(scopeString, this.#store.openMultiMap(`${scopeString}:notes_by_contract`));
60
71
  this.#notesByStorageSlotAndScope.set(scopeString, this.#store.openMultiMap(`${scopeString}:notes_by_storage_slot`));
61
- this.#notesByTxHashAndScope.set(scopeString, this.#store.openMultiMap(`${scopeString}:notes_by_tx_hash`));
62
- this.#notesByAddressPointAndScope.set(scopeString, this.#store.openMultiMap(`${scopeString}:notes_by_address_point`));
63
72
  return true;
64
73
  }
65
- async addNotes(notes, scope = AztecAddress.ZERO) {
66
- if (!await this.#scopes.hasAsync(scope.toString())) {
67
- await this.addScope(scope);
68
- }
74
+ /**
75
+ * Adds multiple notes to the data provider under the specified scope.
76
+ *
77
+ * Notes are stored using their index from the notes hash tree as the key, which provides
78
+ * uniqueness and maintains creation order. Each note is indexed by multiple criteria
79
+ * for efficient retrieval.
80
+ *
81
+ * @param notes - Notes to store
82
+ * @param scope - The scope (user/account) under which to store the notes
83
+ */ addNotes(notes, scope) {
69
84
  return this.#store.transactionAsync(async ()=>{
85
+ if (!await this.#scopes.hasAsync(scope.toString())) {
86
+ await this.addScope(scope);
87
+ }
70
88
  for (const dao of notes){
71
- // store notes by their index in the notes hash tree
72
- // this provides the uniqueness we need to store individual notes
73
- // and should also return notes in the order that they were created.
74
- // Had we stored them by their nullifier, they would be returned in random order
75
89
  const noteIndex = toBufferBE(dao.index, 32).toString('hex');
76
90
  await this.#notes.set(noteIndex, dao.toBuffer());
77
91
  await this.#notesToScope.set(noteIndex, scope.toString());
78
92
  await this.#nullifierToNoteId.set(dao.siloedNullifier.toString(), noteIndex);
79
93
  await this.#notesByContractAndScope.get(scope.toString()).set(dao.contractAddress.toString(), noteIndex);
80
94
  await this.#notesByStorageSlotAndScope.get(scope.toString()).set(dao.storageSlot.toString(), noteIndex);
81
- await this.#notesByTxHashAndScope.get(scope.toString()).set(dao.txHash.toString(), noteIndex);
82
- await this.#notesByAddressPointAndScope.get(scope.toString()).set(dao.addressPoint.toString(), noteIndex);
83
95
  }
84
96
  });
85
97
  }
86
- removeNotesAfter(blockNumber) {
98
+ /**
99
+ * Synchronizes notes and nullifiers to a specific block number.
100
+ *
101
+ * This method ensures that the state of notes and nullifiers is consistent with the
102
+ * specified block number. It restores any notes that were nullified after the given block
103
+ * and deletes any active notes created after that block.
104
+ *
105
+ * @param blockNumber - The new chain tip after a reorg
106
+ * @param synchedBlockNumber - The block number up to which PXE managed to sync before the reorg happened.
107
+ */ async rollbackNotesAndNullifiers(blockNumber, synchedBlockNumber) {
108
+ await this.#rewindNullifiersAfterBlock(blockNumber, synchedBlockNumber);
109
+ await this.#deleteActiveNotesAfterBlock(blockNumber);
110
+ }
111
+ /**
112
+ * Deletes (removes) all active notes created after the specified block number.
113
+ *
114
+ * Permanently delete notes from the active notes store, e.g. during a reorg.
115
+ * Note: This only affects #notes (active notes), not #nullifiedNotes.
116
+ *
117
+ * @param blockNumber - Notes created after this block number will be deleted
118
+ */ #deleteActiveNotesAfterBlock(blockNumber) {
87
119
  return this.#store.transactionAsync(async ()=>{
88
120
  const notes = await toArray(this.#notes.valuesAsync());
89
121
  for (const note of notes){
@@ -95,8 +127,6 @@ export class NoteDataProvider {
95
127
  await this.#nullifierToNoteId.delete(noteDao.siloedNullifier.toString());
96
128
  const scopes = await toArray(this.#scopes.keysAsync());
97
129
  for (const scope of scopes){
98
- await this.#notesByAddressPointAndScope.get(scope).deleteValue(noteDao.addressPoint.toString(), noteIndex);
99
- await this.#notesByTxHashAndScope.get(scope).deleteValue(noteDao.txHash.toString(), noteIndex);
100
130
  await this.#notesByContractAndScope.get(scope).deleteValue(noteDao.contractAddress.toString(), noteIndex);
101
131
  await this.#notesByStorageSlotAndScope.get(scope).deleteValue(noteDao.storageSlot.toString(), noteIndex);
102
132
  }
@@ -104,33 +134,39 @@ export class NoteDataProvider {
104
134
  }
105
135
  });
106
136
  }
107
- async unnullifyNotesAfter(blockNumber, synchedBlockNumber) {
108
- const nullifiersToUndo = [];
109
- const currentBlockNumber = blockNumber + 1;
110
- const maxBlockNumber = synchedBlockNumber ?? currentBlockNumber;
111
- for(let i = currentBlockNumber; i <= maxBlockNumber; i++){
112
- nullifiersToUndo.push(...await toArray(this.#nullifiersByBlockNumber.getValuesAsync(i)));
113
- }
114
- const notesIndexesToReinsert = await Promise.all(nullifiersToUndo.map((nullifier)=>this.#nullifiedNotesByNullifier.getAsync(nullifier)));
115
- const notNullNoteIndexes = notesIndexesToReinsert.filter((noteIndex)=>noteIndex != undefined);
116
- const nullifiedNoteBuffers = await Promise.all(notNullNoteIndexes.map((noteIndex)=>this.#nullifiedNotes.getAsync(noteIndex)));
117
- const noteDaos = nullifiedNoteBuffers.filter((buffer)=>buffer != undefined).map((buffer)=>NoteDao.fromBuffer(buffer));
137
+ /**
138
+ * Rewinds nullifications after a given block number.
139
+ *
140
+ * This operation "unnullifies" notes, rolling back nullifications that occurred
141
+ * in orphaned blocks, e.g. during a reorg. The notes are restored to the
142
+ * active notes store and removed from the nullified store.
143
+ *
144
+ * @param blockNumber - Revert nullifications that occurred after this block
145
+ * @param synchedBlockNumber - Upper bound for the block range to process
146
+ */ async #rewindNullifiersAfterBlock(blockNumber, synchedBlockNumber) {
118
147
  await this.#store.transactionAsync(async ()=>{
148
+ const nullifiersToUndo = [];
149
+ const currentBlockNumber = blockNumber + 1;
150
+ for(let i = currentBlockNumber; i <= synchedBlockNumber; i++){
151
+ nullifiersToUndo.push(...await toArray(this.#nullifiersByBlockNumber.getValuesAsync(i)));
152
+ }
153
+ const notesIndexesToReinsert = await Promise.all(nullifiersToUndo.map((nullifier)=>this.#nullifiedNotesByNullifier.getAsync(nullifier)));
154
+ const notNullNoteIndexes = notesIndexesToReinsert.filter((noteIndex)=>noteIndex != undefined);
155
+ const nullifiedNoteBuffers = await Promise.all(notNullNoteIndexes.map((noteIndex)=>this.#nullifiedNotes.getAsync(noteIndex)));
156
+ const noteDaos = nullifiedNoteBuffers.filter((buffer)=>buffer != undefined).map((buffer)=>NoteDao.fromBuffer(buffer));
119
157
  for (const dao of noteDaos){
120
158
  const noteIndex = toBufferBE(dao.index, 32).toString('hex');
121
159
  await this.#notes.set(noteIndex, dao.toBuffer());
122
160
  await this.#nullifierToNoteId.set(dao.siloedNullifier.toString(), noteIndex);
123
- let scopes = await toArray(this.#nullifiedNotesToScope.getValuesAsync(noteIndex)) ?? [];
161
+ const scopes = await toArray(this.#nullifiedNotesToScope.getValuesAsync(noteIndex));
124
162
  if (scopes.length === 0) {
125
- scopes = [
126
- new AztecAddress(dao.addressPoint.x).toString()
127
- ];
163
+ // We should never run into this error because notes always have a scope assigned to them - either on initial
164
+ // insertion via `addNotes` or when removing their nullifiers.
165
+ throw new Error(`No scopes found for nullified note with index ${noteIndex}`);
128
166
  }
129
167
  for (const scope of scopes){
130
168
  await this.#notesByContractAndScope.get(scope.toString()).set(dao.contractAddress.toString(), noteIndex);
131
169
  await this.#notesByStorageSlotAndScope.get(scope.toString()).set(dao.storageSlot.toString(), noteIndex);
132
- await this.#notesByTxHashAndScope.get(scope.toString()).set(dao.txHash.toString(), noteIndex);
133
- await this.#notesByAddressPointAndScope.get(scope.toString()).set(dao.addressPoint.toString(), noteIndex);
134
170
  await this.#notesToScope.set(noteIndex, scope);
135
171
  }
136
172
  await this.#nullifiedNotes.delete(noteIndex);
@@ -138,34 +174,57 @@ export class NoteDataProvider {
138
174
  await this.#nullifiersByBlockNumber.deleteValue(dao.l2BlockNumber, dao.siloedNullifier.toString());
139
175
  await this.#nullifiedNotesByContract.deleteValue(dao.contractAddress.toString(), noteIndex);
140
176
  await this.#nullifiedNotesByStorageSlot.deleteValue(dao.storageSlot.toString(), noteIndex);
141
- await this.#nullifiedNotesByTxHash.deleteValue(dao.txHash.toString(), noteIndex);
142
- await this.#nullifiedNotesByAddressPoint.deleteValue(dao.addressPoint.toString(), noteIndex);
143
177
  await this.#nullifiedNotesByNullifier.delete(dao.siloedNullifier.toString());
144
178
  }
145
179
  });
146
180
  }
147
- async getNotes(filter) {
148
- const publicKey = filter.owner ? await filter.owner.toAddressPoint() : undefined;
181
+ /**
182
+ * Retrieves notes based on the provided filter criteria.
183
+ *
184
+ * This method queries both active and optionally nullified notes based on the filter
185
+ * parameters.
186
+ *
187
+ * @param filter - Filter criteria including contractAddress (required), and optional
188
+ * storageSlot, status, scopes and siloedNullifier.
189
+ * @returns Promise resolving to array of NoteDao objects matching the filter
190
+ * @throws If filtering by an empty scopes array. Scopes have to be set to undefined or to a non-empty array.
191
+ */ async getNotes(filter) {
149
192
  filter.status = filter.status ?? NoteStatus.ACTIVE;
193
+ // throw early if scopes is an empty array
194
+ if (filter.scopes !== undefined && filter.scopes.length === 0) {
195
+ throw new Error('Trying to get notes with an empty scopes array. Scopes have to be set to undefined if intending on not filtering by scopes.');
196
+ }
150
197
  const candidateNoteSources = [];
151
198
  filter.scopes ??= (await toArray(this.#scopes.keysAsync())).map((addressString)=>AztecAddress.fromString(addressString));
152
199
  const activeNoteIdsPerScope = [];
153
200
  for (const scope of new Set(filter.scopes)){
154
201
  const formattedScopeString = scope.toString();
155
202
  if (!await this.#scopes.hasAsync(formattedScopeString)) {
156
- throw new Error('Trying to get incoming notes of an scope that is not in the PXE database');
203
+ throw new Error('Trying to get incoming notes of a scope that is not in the PXE database');
157
204
  }
158
- activeNoteIdsPerScope.push(publicKey ? await toArray(this.#notesByAddressPointAndScope.get(formattedScopeString).getValuesAsync(publicKey.toString())) : filter.txHash ? await toArray(this.#notesByTxHashAndScope.get(formattedScopeString).getValuesAsync(filter.txHash.toString())) : filter.contractAddress ? await toArray(this.#notesByContractAndScope.get(formattedScopeString).getValuesAsync(filter.contractAddress.toString())) : filter.storageSlot ? await toArray(this.#notesByStorageSlotAndScope.get(formattedScopeString).getValuesAsync(filter.storageSlot.toString())) : await toArray(this.#notesByAddressPointAndScope.get(formattedScopeString).valuesAsync()));
205
+ activeNoteIdsPerScope.push(filter.storageSlot ? await toArray(this.#notesByStorageSlotAndScope.get(formattedScopeString).getValuesAsync(filter.storageSlot.toString())) : await toArray(this.#notesByContractAndScope.get(formattedScopeString).getValuesAsync(filter.contractAddress.toString())));
159
206
  }
160
207
  candidateNoteSources.push({
161
208
  ids: new Set(activeNoteIdsPerScope.flat()),
162
209
  notes: this.#notes
163
210
  });
164
- if (filter.status == NoteStatus.ACTIVE_OR_NULLIFIED) {
165
- candidateNoteSources.push({
166
- ids: publicKey ? await toArray(this.#nullifiedNotesByAddressPoint.getValuesAsync(publicKey.toString())) : filter.txHash ? await toArray(this.#nullifiedNotesByTxHash.getValuesAsync(filter.txHash.toString())) : filter.contractAddress ? await toArray(this.#nullifiedNotesByContract.getValuesAsync(filter.contractAddress.toString())) : filter.storageSlot ? await toArray(this.#nullifiedNotesByStorageSlot.getValuesAsync(filter.storageSlot.toString())) : await toArray(this.#nullifiedNotes.keysAsync()),
167
- notes: this.#nullifiedNotes
168
- });
211
+ // If status is ACTIVE_OR_NULLIFIED we add nullified notes as candidates on top of the default active ones.
212
+ if (filter.status === NoteStatus.ACTIVE_OR_NULLIFIED) {
213
+ const nullifiedIds = filter.storageSlot ? await toArray(this.#nullifiedNotesByStorageSlot.getValuesAsync(filter.storageSlot.toString())) : await toArray(this.#nullifiedNotesByContract.getValuesAsync(filter.contractAddress.toString()));
214
+ const setOfScopes = new Set(filter.scopes.map((s)=>s.toString()));
215
+ const filteredNullifiedIds = new Set();
216
+ for (const noteId of nullifiedIds){
217
+ const scopeList = await toArray(this.#nullifiedNotesToScope.getValuesAsync(noteId));
218
+ if (scopeList.some((scope)=>setOfScopes.has(scope))) {
219
+ filteredNullifiedIds.add(noteId);
220
+ }
221
+ }
222
+ if (filteredNullifiedIds.size > 0) {
223
+ candidateNoteSources.push({
224
+ ids: filteredNullifiedIds,
225
+ notes: this.#nullifiedNotes
226
+ });
227
+ }
169
228
  }
170
229
  const result = [];
171
230
  for (const { ids, notes } of candidateNoteSources){
@@ -175,18 +234,12 @@ export class NoteDataProvider {
175
234
  continue;
176
235
  }
177
236
  const note = NoteDao.fromBuffer(serializedNote);
178
- if (filter.contractAddress && !note.contractAddress.equals(filter.contractAddress)) {
179
- continue;
180
- }
181
- if (filter.txHash && !note.txHash.equals(filter.txHash)) {
237
+ if (!note.contractAddress.equals(filter.contractAddress)) {
182
238
  continue;
183
239
  }
184
240
  if (filter.storageSlot && !note.storageSlot.equals(filter.storageSlot)) {
185
241
  continue;
186
242
  }
187
- if (publicKey && !note.addressPoint.equals(publicKey)) {
188
- continue;
189
- }
190
243
  if (filter.siloedNullifier && !note.siloedNullifier.equals(filter.siloedNullifier)) {
191
244
  continue;
192
245
  }
@@ -195,7 +248,17 @@ export class NoteDataProvider {
195
248
  }
196
249
  return result;
197
250
  }
198
- removeNullifiedNotes(nullifiers, accountAddressPoint) {
251
+ /**
252
+ * Transitions notes from "active" to "nullified" state.
253
+ *
254
+ * This operation processes a batch of nullifiers to mark the corresponding notes
255
+ * as spent/nullified. The operation is atomic - if any nullifier is not found,
256
+ * the entire operation fails and no notes are modified.
257
+ *
258
+ * @param nullifiers - Array of nullifiers with their block numbers to process
259
+ * @returns Promise resolving to array of nullified NoteDao objects
260
+ * @throws Error if any nullifier is not found in the active notes
261
+ */ applyNullifiers(nullifiers) {
199
262
  if (nullifiers.length === 0) {
200
263
  return Promise.resolve([]);
201
264
  }
@@ -203,47 +266,46 @@ export class NoteDataProvider {
203
266
  const nullifiedNotes = [];
204
267
  for (const blockScopedNullifier of nullifiers){
205
268
  const { data: nullifier, l2BlockNumber: blockNumber } = blockScopedNullifier;
206
- const noteIndex = await this.#nullifierToNoteId.getAsync(nullifier.toString());
269
+ const nullifierKey = nullifier.toString();
270
+ const noteIndex = await this.#nullifierToNoteId.getAsync(nullifierKey);
207
271
  if (!noteIndex) {
208
- continue;
272
+ // Check if already nullified?
273
+ const alreadyNullified = await this.#nullifiedNotesByNullifier.getAsync(nullifierKey);
274
+ if (alreadyNullified) {
275
+ throw new Error(`Nullifier already applied in applyNullifiers`);
276
+ }
277
+ throw new Error('Nullifier not found in applyNullifiers');
209
278
  }
210
279
  const noteBuffer = noteIndex ? await this.#notes.getAsync(noteIndex) : undefined;
211
280
  if (!noteBuffer) {
212
- continue;
281
+ throw new Error('Note not found in applyNullifiers');
213
282
  }
214
- const noteScopes = await toArray(this.#notesToScope.getValuesAsync(noteIndex)) ?? [];
215
- const note = NoteDao.fromBuffer(noteBuffer);
216
- if (!note.addressPoint.equals(accountAddressPoint)) {
217
- continue;
283
+ const noteScopes = await toArray(this.#notesToScope.getValuesAsync(noteIndex));
284
+ if (noteScopes.length === 0) {
285
+ // We should never run into this error because notes always have a scope assigned to them - either on initial
286
+ // insertion via `addNotes` or when removing their nullifiers.
287
+ throw new Error('Note scopes are missing in applyNullifiers');
218
288
  }
289
+ const note = NoteDao.fromBuffer(noteBuffer);
219
290
  nullifiedNotes.push(note);
220
291
  await this.#notes.delete(noteIndex);
221
292
  await this.#notesToScope.delete(noteIndex);
222
293
  const scopes = await toArray(this.#scopes.keysAsync());
223
294
  for (const scope of scopes){
224
- await this.#notesByAddressPointAndScope.get(scope).deleteValue(accountAddressPoint.toString(), noteIndex);
225
- await this.#notesByTxHashAndScope.get(scope).deleteValue(note.txHash.toString(), noteIndex);
226
295
  await this.#notesByContractAndScope.get(scope).deleteValue(note.contractAddress.toString(), noteIndex);
227
296
  await this.#notesByStorageSlotAndScope.get(scope).deleteValue(note.storageSlot.toString(), noteIndex);
228
297
  }
229
- if (noteScopes !== undefined) {
230
- for (const scope of noteScopes){
231
- await this.#nullifiedNotesToScope.set(noteIndex, scope);
232
- }
298
+ for (const scope of noteScopes){
299
+ await this.#nullifiedNotesToScope.set(noteIndex, scope);
233
300
  }
234
301
  await this.#nullifiedNotes.set(noteIndex, note.toBuffer());
235
302
  await this.#nullifiersByBlockNumber.set(blockNumber, nullifier.toString());
236
303
  await this.#nullifiedNotesByContract.set(note.contractAddress.toString(), noteIndex);
237
304
  await this.#nullifiedNotesByStorageSlot.set(note.storageSlot.toString(), noteIndex);
238
- await this.#nullifiedNotesByTxHash.set(note.txHash.toString(), noteIndex);
239
- await this.#nullifiedNotesByAddressPoint.set(note.addressPoint.toString(), noteIndex);
240
305
  await this.#nullifiedNotesByNullifier.set(nullifier.toString(), noteIndex);
241
306
  await this.#nullifierToNoteId.delete(nullifier.toString());
242
307
  }
243
308
  return nullifiedNotes;
244
309
  });
245
310
  }
246
- async getSize() {
247
- return (await this.getNotes({})).reduce((sum, note)=>sum + note.getSize(), 0);
248
- }
249
311
  }
@@ -0,0 +1,37 @@
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 { L2BlockHash } from '@aztec/stdlib/block';
6
+ import { TxHash } from '@aztec/stdlib/tx';
7
+ import type { PrivateEvent } from '../../pxe.js';
8
+ /**
9
+ * Stores decrypted private event logs.
10
+ */
11
+ export declare class PrivateEventDataProvider {
12
+ #private;
13
+ logger: import("@aztec/foundation/log").Logger;
14
+ constructor(store: AztecAsyncKVStore);
15
+ /**
16
+ * Store a private event log.
17
+ * @param contractAddress - The address of the contract that emitted the event.
18
+ * @param recipient - The recipient of the event.
19
+ * @param eventSelector - The event selector of the event.
20
+ * @param msgContent - The content of the event.
21
+ * @param txHash - The transaction hash of the event log.
22
+ * @param eventCommitmentIndex - The index of the event commitment in the nullifier tree.
23
+ * @param blockNumber - The block number in which the event was emitted.
24
+ */
25
+ storePrivateEventLog(contractAddress: AztecAddress, recipient: AztecAddress, eventSelector: EventSelector, msgContent: Fr[], txHash: TxHash, eventCommitmentIndex: number, blockNumber: number, blockHash: L2BlockHash): Promise<void>;
26
+ /**
27
+ * Returns the private events given search parameters.
28
+ * @param contractAddress - The address of the contract to get events from.
29
+ * @param from - The block number to search from.
30
+ * @param numBlocks - The amount of blocks to search.
31
+ * @param recipients - The addresses that decrypted the logs.
32
+ * @param eventSelector - The event selector to filter by.
33
+ * @returns - The event log contents.
34
+ */
35
+ getPrivateEvents(contractAddress: AztecAddress, from: number, numBlocks: number, recipients: AztecAddress[], eventSelector: EventSelector): Promise<PrivateEvent[]>;
36
+ }
37
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9ldmVudF9kYXRhX3Byb3ZpZGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc3RvcmFnZS9wcml2YXRlX2V2ZW50X2RhdGFfcHJvdmlkZXIvcHJpdmF0ZV9ldmVudF9kYXRhX3Byb3ZpZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUc5QyxPQUFPLEtBQUssRUFBbUIsaUJBQWlCLEVBQWlCLE1BQU0saUJBQWlCLENBQUM7QUFDekYsT0FBTyxLQUFLLEVBQUUsYUFBYSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDdkQsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDaEUsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ2xELE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUUxQyxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFVakQ7O0dBRUc7QUFDSCxxQkFBYSx3QkFBd0I7O0lBU25DLE1BQU0seUNBQStDO0lBRXJELFlBQVksS0FBSyxFQUFFLGlCQUFpQixFQUtuQztJQUVEOzs7Ozs7Ozs7T0FTRztJQUNILG9CQUFvQixDQUNsQixlQUFlLEVBQUUsWUFBWSxFQUM3QixTQUFTLEVBQUUsWUFBWSxFQUN2QixhQUFhLEVBQUUsYUFBYSxFQUM1QixVQUFVLEVBQUUsRUFBRSxFQUFFLEVBQ2hCLE1BQU0sRUFBRSxNQUFNLEVBQ2Qsb0JBQW9CLEVBQUUsTUFBTSxFQUM1QixXQUFXLEVBQUUsTUFBTSxFQUNuQixTQUFTLEVBQUUsV0FBVyxHQUNyQixPQUFPLENBQUMsSUFBSSxDQUFDLENBNEJmO0lBRUQ7Ozs7Ozs7O09BUUc7SUFDVSxnQkFBZ0IsQ0FDM0IsZUFBZSxFQUFFLFlBQVksRUFDN0IsSUFBSSxFQUFFLE1BQU0sRUFDWixTQUFTLEVBQUUsTUFBTSxFQUNqQixVQUFVLEVBQUUsWUFBWSxFQUFFLEVBQzFCLGFBQWEsRUFBRSxhQUFhLEdBQzNCLE9BQU8sQ0FBQyxZQUFZLEVBQUUsQ0FBQyxDQXFDekI7Q0FDRiJ9
@@ -0,0 +1 @@
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,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAUjD;;GAEG;AACH,qBAAa,wBAAwB;;IASnC,MAAM,yCAA+C;IAErD,YAAY,KAAK,EAAE,iBAAiB,EAKnC;IAED;;;;;;;;;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,EACnB,SAAS,EAAE,WAAW,GACrB,OAAO,CAAC,IAAI,CAAC,CA4Bf;IAED;;;;;;;;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,YAAY,EAAE,CAAC,CAqCzB;CACF"}
@@ -0,0 +1,105 @@
1
+ import { Fr } from '@aztec/foundation/fields';
2
+ import { createLogger } from '@aztec/foundation/log';
3
+ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
+ import { L2BlockHash } from '@aztec/stdlib/block';
5
+ import { TxHash } from '@aztec/stdlib/tx';
6
+ /**
7
+ * Stores decrypted private event logs.
8
+ */ export class PrivateEventDataProvider {
9
+ #store;
10
+ /** Array storing the actual private event log entries containing the log content and block number */ #eventLogs;
11
+ /** Map from contract_address_recipient_eventSelector to array of indices into #eventLogs for efficient lookup */ #eventLogIndex;
12
+ /** Map from eventCommitmentIndex to boolean indicating if log has been seen. */ #seenLogs;
13
+ logger = createLogger('private_event_data_provider');
14
+ constructor(store){
15
+ this.#store = store;
16
+ this.#eventLogs = this.#store.openArray('private_event_logs');
17
+ this.#eventLogIndex = this.#store.openMap('private_event_log_index');
18
+ this.#seenLogs = this.#store.openMap('seen_logs');
19
+ }
20
+ /**
21
+ * Store a private event log.
22
+ * @param contractAddress - The address of the contract that emitted the event.
23
+ * @param recipient - The recipient of the event.
24
+ * @param eventSelector - The event selector of the event.
25
+ * @param msgContent - The content of the event.
26
+ * @param txHash - The transaction hash of the event log.
27
+ * @param eventCommitmentIndex - The index of the event commitment in the nullifier tree.
28
+ * @param blockNumber - The block number in which the event was emitted.
29
+ */ storePrivateEventLog(contractAddress, recipient, eventSelector, msgContent, txHash, eventCommitmentIndex, blockNumber, blockHash) {
30
+ return this.#store.transactionAsync(async ()=>{
31
+ const key = `${contractAddress.toString()}_${recipient.toString()}_${eventSelector.toString()}`;
32
+ // Check if this exact log has already been stored using eventCommitmentIndex as unique identifier
33
+ const hasBeenSeen = await this.#seenLogs.getAsync(eventCommitmentIndex);
34
+ if (hasBeenSeen) {
35
+ this.logger.verbose('Ignoring duplicate event log', {
36
+ txHash: txHash.toString(),
37
+ eventCommitmentIndex
38
+ });
39
+ return;
40
+ }
41
+ this.logger.verbose('storing private event log', {
42
+ contractAddress,
43
+ recipient,
44
+ msgContent,
45
+ blockNumber
46
+ });
47
+ const index = await this.#eventLogs.lengthAsync();
48
+ await this.#eventLogs.push({
49
+ msgContent: serializeToBuffer(msgContent),
50
+ blockNumber,
51
+ blockHash: blockHash.toBuffer(),
52
+ eventCommitmentIndex,
53
+ txHash: txHash.toBuffer()
54
+ });
55
+ const existingIndices = await this.#eventLogIndex.getAsync(key) || [];
56
+ await this.#eventLogIndex.set(key, [
57
+ ...existingIndices,
58
+ index
59
+ ]);
60
+ // Mark this log as seen using eventCommitmentIndex
61
+ await this.#seenLogs.set(eventCommitmentIndex, true);
62
+ });
63
+ }
64
+ /**
65
+ * Returns the private events given search parameters.
66
+ * @param contractAddress - The address of the contract to get events from.
67
+ * @param from - The block number to search from.
68
+ * @param numBlocks - The amount of blocks to search.
69
+ * @param recipients - The addresses that decrypted the logs.
70
+ * @param eventSelector - The event selector to filter by.
71
+ * @returns - The event log contents.
72
+ */ async getPrivateEvents(contractAddress, from, numBlocks, recipients, eventSelector) {
73
+ const events = [];
74
+ for (const recipient of recipients){
75
+ const key = `${contractAddress.toString()}_${recipient.toString()}_${eventSelector.toString()}`;
76
+ const indices = await this.#eventLogIndex.getAsync(key) || [];
77
+ for (const index of indices){
78
+ const entry = await this.#eventLogs.atAsync(index);
79
+ if (!entry || entry.blockNumber < from || entry.blockNumber >= from + numBlocks) {
80
+ continue;
81
+ }
82
+ // Convert buffer back to Fr array
83
+ const reader = BufferReader.asReader(entry.msgContent);
84
+ const numFields = entry.msgContent.length / Fr.SIZE_IN_BYTES;
85
+ const msgContent = reader.readArray(numFields, Fr);
86
+ const txHash = TxHash.fromBuffer(entry.txHash);
87
+ const blockHash = L2BlockHash.fromBuffer(entry.blockHash);
88
+ events.push({
89
+ eventCommitmentIndex: entry.eventCommitmentIndex,
90
+ event: {
91
+ packedEvent: msgContent,
92
+ blockNumber: entry.blockNumber,
93
+ recipient,
94
+ txHash,
95
+ blockHash,
96
+ eventSelector
97
+ }
98
+ });
99
+ }
100
+ }
101
+ // Sort by eventCommitmentIndex only
102
+ events.sort((a, b)=>a.eventCommitmentIndex - b.eventCommitmentIndex);
103
+ return events.map((ev)=>ev.event);
104
+ }
105
+ }
@@ -1,2 +1,2 @@
1
1
  export { SyncDataProvider } from './sync_data_provider.js';
2
- //# sourceMappingURL=index.d.ts.map
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zdG9yYWdlL3N5bmNfZGF0YV9wcm92aWRlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQyJ9
@@ -1,12 +1,10 @@
1
1
  import type { AztecAsyncKVStore } from '@aztec/kv-store';
2
2
  import { BlockHeader } from '@aztec/stdlib/tx';
3
- import type { DataProvider } from '../data_provider.js';
4
- export declare class SyncDataProvider implements DataProvider {
3
+ export declare class SyncDataProvider {
5
4
  #private;
6
5
  constructor(store: AztecAsyncKVStore);
7
6
  setHeader(header: BlockHeader): Promise<void>;
8
- getBlockNumber(): Promise<number | undefined>;
7
+ getBlockNumber(): Promise<number>;
9
8
  getBlockHeader(): Promise<BlockHeader>;
10
- getSize(): Promise<number>;
11
9
  }
12
- //# sourceMappingURL=sync_data_provider.d.ts.map
10
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3luY19kYXRhX3Byb3ZpZGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc3RvcmFnZS9zeW5jX2RhdGFfcHJvdmlkZXIvc3luY19kYXRhX3Byb3ZpZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUF1QixNQUFNLGlCQUFpQixDQUFDO0FBQzlFLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUUvQyxxQkFBYSxnQkFBZ0I7O0lBSTNCLFlBQVksS0FBSyxFQUFFLGlCQUFpQixFQUduQztJQUVLLFNBQVMsQ0FBQyxNQUFNLEVBQUUsV0FBVyxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FFbEQ7SUFFSyxjQUFjLElBQUksT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQU90QztJQUVLLGNBQWMsSUFBSSxPQUFPLENBQUMsV0FBVyxDQUFDLENBTzNDO0NBQ0YifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"sync_data_provider.d.ts","sourceRoot":"","sources":["../../../src/storage/sync_data_provider/sync_data_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,qBAAa,gBAAiB,YAAW,YAAY;;gBAIvC,KAAK,EAAE,iBAAiB;IAK9B,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C,cAAc,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAS7C,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC;IAStC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;CAGjC"}
1
+ {"version":3,"file":"sync_data_provider.d.ts","sourceRoot":"","sources":["../../../src/storage/sync_data_provider/sync_data_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qBAAa,gBAAgB;;IAI3B,YAAY,KAAK,EAAE,iBAAiB,EAGnC;IAEK,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAElD;IAEK,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAOtC;IAEK,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAO3C;CACF"}
@@ -12,9 +12,9 @@ export class SyncDataProvider {
12
12
  async getBlockNumber() {
13
13
  const headerBuffer = await this.#synchronizedHeader.getAsync();
14
14
  if (!headerBuffer) {
15
- return undefined;
15
+ throw new Error(`Trying to get block number with a not-yet-synchronized PXE - this should never happen`);
16
16
  }
17
- return Number(BlockHeader.fromBuffer(headerBuffer).globalVariables.blockNumber.toBigInt());
17
+ return BlockHeader.fromBuffer(headerBuffer).globalVariables.blockNumber;
18
18
  }
19
19
  async getBlockHeader() {
20
20
  const headerBuffer = await this.#synchronizedHeader.getAsync();
@@ -23,7 +23,4 @@ export class SyncDataProvider {
23
23
  }
24
24
  return BlockHeader.fromBuffer(headerBuffer);
25
25
  }
26
- async getSize() {
27
- return (await this.#synchronizedHeader.getAsync())?.length ?? 0;
28
- }
29
26
  }
@@ -1,2 +1,2 @@
1
1
  export { TaggingDataProvider } from './tagging_data_provider.js';
2
- //# sourceMappingURL=index.d.ts.map
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zdG9yYWdlL3RhZ2dpbmdfZGF0YV9wcm92aWRlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQyJ9
@@ -1,18 +1,40 @@
1
- import type { Fr } from '@aztec/foundation/fields';
2
1
  import type { AztecAsyncKVStore } from '@aztec/kv-store';
3
2
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
- import type { IndexedTaggingSecret } from '@aztec/stdlib/logs';
3
+ import type { DirectionalAppTaggingSecret, PreTag } from '@aztec/stdlib/logs';
5
4
  export declare class TaggingDataProvider {
6
5
  #private;
7
6
  constructor(store: AztecAsyncKVStore);
8
- setTaggingSecretsIndexesAsSender(indexedSecrets: IndexedTaggingSecret[]): Promise<void>;
9
- setTaggingSecretsIndexesAsRecipient(indexedSecrets: IndexedTaggingSecret[]): Promise<void>;
10
- getTaggingSecretsIndexesAsRecipient(appTaggingSecrets: Fr[]): Promise<number[]>;
11
- getTaggingSecretsIndexesAsSender(appTaggingSecrets: Fr[]): Promise<number[]>;
7
+ /**
8
+ * Sets the last used indexes when sending a log.
9
+ * @param preTags - The pre tags containing the directional app tagging secrets and the indexes that are to be
10
+ * updated in the db.
11
+ * @throws If any two pre tags contain the same directional app tagging secret
12
+ */
13
+ setLastUsedIndexesAsSender(preTags: PreTag[]): Promise<void[]>;
14
+ /**
15
+ * Sets the last used indexes when looking for logs.
16
+ * @param preTags - The pre tags containing the directional app tagging secrets and the indexes that are to be
17
+ * updated in the db.
18
+ * @throws If any two pre tags contain the same directional app tagging secret
19
+ */
20
+ setLastUsedIndexesAsRecipient(preTags: PreTag[]): Promise<void[]>;
21
+ /**
22
+ * Returns the last used index when sending a log with a given secret.
23
+ * @param secret - The directional app tagging secret.
24
+ * @returns The last used index for the given directional app tagging secret, or undefined if not found.
25
+ */
26
+ getLastUsedIndexesAsSender(secret: DirectionalAppTaggingSecret): Promise<number | undefined>;
27
+ /**
28
+ * Returns the last used indexes when looking for logs as a recipient.
29
+ * @param secrets - The directional app tagging secrets to obtain the indexes for.
30
+ * @returns The last used indexes for the given directional app tagging secrets, or undefined if have never yet found
31
+ * a log for a given secret.
32
+ */
33
+ getLastUsedIndexesAsRecipient(secrets: DirectionalAppTaggingSecret[]): Promise<(number | undefined)[]>;
12
34
  resetNoteSyncData(): Promise<void>;
13
35
  addSenderAddress(address: AztecAddress): Promise<boolean>;
14
36
  getSenderAddresses(): Promise<AztecAddress[]>;
15
37
  removeSenderAddress(address: AztecAddress): Promise<boolean>;
16
38
  getSize(): Promise<number>;
17
39
  }
18
- //# sourceMappingURL=tagging_data_provider.d.ts.map
40
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFnZ2luZ19kYXRhX3Byb3ZpZGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc3RvcmFnZS90YWdnaW5nX2RhdGFfcHJvdmlkZXIvdGFnZ2luZ19kYXRhX3Byb3ZpZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFpQixNQUFNLGlCQUFpQixDQUFDO0FBQ3hFLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUMzRCxPQUFPLEtBQUssRUFBRSwyQkFBMkIsRUFBRSxNQUFNLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUU5RSxxQkFBYSxtQkFBbUI7O0lBUzlCLFlBQVksS0FBSyxFQUFFLGlCQUFpQixFQU9uQztJQUVEOzs7OztPQUtHO0lBQ0gsMEJBQTBCLENBQUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxtQkFNM0M7SUFFRDs7Ozs7T0FLRztJQUNILDZCQUE2QixDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsbUJBTTlDO0lBYUQ7Ozs7T0FJRztJQUNHLDBCQUEwQixDQUFDLE1BQU0sRUFBRSwyQkFBMkIsR0FBRyxPQUFPLENBQUMsTUFBTSxHQUFHLFNBQVMsQ0FBQyxDQUVqRztJQUVEOzs7OztPQUtHO0lBQ0gsNkJBQTZCLENBQUMsT0FBTyxFQUFFLDJCQUEyQixFQUFFLEdBQUcsT0FBTyxDQUFDLENBQUMsTUFBTSxHQUFHLFNBQVMsQ0FBQyxFQUFFLENBQUMsQ0FFckc7SUFFRCxpQkFBaUIsSUFBSSxPQUFPLENBQUMsSUFBSSxDQUFDLENBT2pDO0lBRUssZ0JBQWdCLENBQUMsT0FBTyxFQUFFLFlBQVksR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLENBUTlEO0lBRUssa0JBQWtCLElBQUksT0FBTyxDQUFDLFlBQVksRUFBRSxDQUFDLENBRWxEO0lBRUssbUJBQW1CLENBQUMsT0FBTyxFQUFFLFlBQVksR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLENBUWpFO0lBRUssT0FBTyxvQkFJWjtDQUNGIn0=