@aztec/pxe 0.0.1-commit.fce3e4f → 0.0.1-commit.fffb133c
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.
- package/dest/bin/check_oracle_version.js +105 -15
- package/dest/block_synchronizer/block_synchronizer.d.ts +43 -0
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -0
- package/dest/block_synchronizer/block_synchronizer.js +147 -0
- package/dest/block_synchronizer/index.d.ts +2 -0
- package/dest/block_synchronizer/index.d.ts.map +1 -0
- package/dest/block_synchronizer/index.js +1 -0
- package/dest/config/index.d.ts +6 -4
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +17 -0
- package/dest/config/package_info.js +1 -1
- package/dest/contract_function_simulator/benchmarked_node.d.ts +9 -0
- package/dest/contract_function_simulator/benchmarked_node.d.ts.map +1 -0
- package/dest/contract_function_simulator/benchmarked_node.js +77 -0
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +42 -14
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +71 -30
- package/dest/contract_function_simulator/execution_note_cache.d.ts +21 -11
- package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_note_cache.js +49 -31
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +1 -1
- package/dest/contract_function_simulator/execution_tagging_index_cache.js +1 -1
- package/dest/contract_function_simulator/hashed_values_cache.d.ts +2 -2
- package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.d.ts +2 -2
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +1 -1
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +5 -4
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/event_validation_request.js +6 -3
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +5 -4
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +7 -6
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +2 -2
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +6 -5
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.js +7 -4
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +4 -10
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/utility_context.js +7 -18
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +25 -18
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +4 -2
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.js +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +11 -7
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +14 -10
- package/dest/contract_function_simulator/oracle/oracle.d.ts +11 -9
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +62 -39
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +2 -27
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.js +2 -38
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +35 -26
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +46 -48
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +77 -25
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +171 -64
- package/dest/contract_function_simulator/pick_notes.d.ts +2 -2
- package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
- package/dest/contract_function_simulator/pick_notes.js +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +4 -4
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.js +23 -5
- package/dest/contract_sync/index.d.ts +23 -0
- package/dest/contract_sync/index.d.ts.map +1 -0
- package/dest/contract_sync/index.js +54 -0
- package/dest/debug/pxe_debug_utils.d.ts +31 -0
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -0
- package/dest/debug/pxe_debug_utils.js +38 -0
- package/dest/entrypoints/client/bundle/index.d.ts +1 -2
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.js +0 -1
- package/dest/entrypoints/client/bundle/utils.d.ts +1 -1
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +12 -3
- package/dest/entrypoints/client/lazy/index.d.ts +1 -2
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/index.js +0 -1
- package/dest/entrypoints/client/lazy/utils.d.ts +1 -1
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +12 -3
- package/dest/entrypoints/pxe_creation_options.d.ts +5 -2
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/server/index.d.ts +4 -2
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +3 -1
- package/dest/entrypoints/server/utils.d.ts +1 -1
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +12 -8
- package/dest/error_enriching.d.ts +4 -4
- package/dest/error_enriching.d.ts.map +1 -1
- package/dest/error_enriching.js +6 -6
- package/dest/events/event_service.d.ts +16 -0
- package/dest/events/event_service.d.ts.map +1 -0
- package/dest/events/event_service.js +45 -0
- package/dest/events/index.d.ts +2 -0
- package/dest/events/index.d.ts.map +1 -0
- package/dest/events/index.js +1 -0
- package/dest/events/private_event_filter_validator.d.ts +9 -0
- package/dest/events/private_event_filter_validator.d.ts.map +1 -0
- package/dest/events/private_event_filter_validator.js +38 -0
- package/dest/job_coordinator/job_coordinator.d.ts +74 -0
- package/dest/job_coordinator/job_coordinator.d.ts.map +1 -0
- package/dest/job_coordinator/job_coordinator.js +93 -0
- package/dest/logs/log_service.d.ts +27 -0
- package/dest/logs/log_service.d.ts.map +1 -0
- package/dest/logs/log_service.js +128 -0
- package/dest/notes/index.d.ts +2 -0
- package/dest/notes/index.d.ts.map +1 -0
- package/dest/notes/index.js +1 -0
- package/dest/notes/note_service.d.ts +49 -0
- package/dest/notes/note_service.d.ts.map +1 -0
- package/dest/notes/note_service.js +148 -0
- package/dest/oracle_version.d.ts +3 -3
- package/dest/oracle_version.d.ts.map +1 -1
- package/dest/oracle_version.js +4 -3
- package/dest/private_kernel/hints/index.d.ts +2 -2
- package/dest/private_kernel/hints/index.d.ts.map +1 -1
- package/dest/private_kernel/hints/index.js +1 -1
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +28 -0
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -0
- package/dest/private_kernel/hints/{build_private_kernel_reset_private_inputs.js → private_kernel_reset_private_inputs_builder.js} +13 -7
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +8 -9
- package/dest/private_kernel/private_kernel_oracle.d.ts +26 -29
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +90 -2
- package/dest/pxe.d.ts +45 -81
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +185 -216
- package/dest/storage/address_store/address_store.d.ts +11 -0
- package/dest/storage/address_store/address_store.d.ts.map +1 -0
- package/dest/storage/{address_data_provider/address_data_provider.js → address_store/address_store.js} +1 -1
- package/dest/storage/address_store/index.d.ts +2 -0
- package/dest/storage/address_store/index.d.ts.map +1 -0
- package/dest/storage/address_store/index.js +1 -0
- package/dest/storage/{sync_data_provider/sync_data_provider.d.ts → anchor_block_store/anchor_block_store.d.ts} +2 -3
- package/dest/storage/anchor_block_store/anchor_block_store.d.ts.map +1 -0
- package/dest/storage/{sync_data_provider/sync_data_provider.js → anchor_block_store/anchor_block_store.js} +2 -9
- package/dest/storage/{sync_data_provider → anchor_block_store}/index.d.ts +2 -2
- package/dest/storage/anchor_block_store/index.d.ts.map +1 -0
- package/dest/storage/anchor_block_store/index.js +1 -0
- package/dest/storage/capsule_store/capsule_store.d.ts +72 -0
- package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -0
- package/dest/storage/capsule_store/capsule_store.js +255 -0
- package/dest/storage/capsule_store/index.d.ts +2 -0
- package/dest/storage/capsule_store/index.d.ts.map +1 -0
- package/dest/storage/capsule_store/index.js +1 -0
- package/dest/storage/{contract_data_provider/contract_data_provider.d.ts → contract_store/contract_store.d.ts} +7 -5
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -0
- package/dest/storage/{contract_data_provider/contract_data_provider.js → contract_store/contract_store.js} +34 -3
- package/dest/storage/contract_store/index.d.ts +2 -0
- package/dest/storage/contract_store/index.d.ts.map +1 -0
- package/dest/storage/contract_store/index.js +1 -0
- package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.d.ts +1 -1
- package/dest/storage/contract_store/private_functions_tree.d.ts.map +1 -0
- package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.js +1 -1
- package/dest/storage/index.d.ts +8 -8
- package/dest/storage/index.d.ts.map +1 -1
- package/dest/storage/index.js +7 -7
- package/dest/storage/note_store/index.d.ts +3 -0
- package/dest/storage/note_store/index.d.ts.map +1 -0
- package/dest/storage/note_store/index.js +2 -0
- package/dest/storage/note_store/note_store.d.ts +73 -0
- package/dest/storage/note_store/note_store.d.ts.map +1 -0
- package/dest/storage/note_store/note_store.js +303 -0
- package/dest/storage/note_store/stored_note.d.ts +16 -0
- package/dest/storage/note_store/stored_note.d.ts.map +1 -0
- package/dest/storage/note_store/stored_note.js +43 -0
- package/dest/storage/private_event_store/private_event_store.d.ts +91 -0
- package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -0
- package/dest/storage/private_event_store/private_event_store.js +250 -0
- package/dest/storage/private_event_store/stored_private_event.d.ts +23 -0
- package/dest/storage/private_event_store/stored_private_event.d.ts.map +1 -0
- package/dest/storage/private_event_store/stored_private_event.js +56 -0
- package/dest/storage/tagging_store/index.d.ts +4 -0
- package/dest/storage/tagging_store/index.d.ts.map +1 -0
- package/dest/storage/tagging_store/index.js +3 -0
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts +28 -0
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -0
- package/dest/storage/tagging_store/recipient_tagging_store.js +99 -0
- package/dest/storage/tagging_store/sender_address_book_store.d.ts +14 -0
- package/dest/storage/tagging_store/sender_address_book_store.d.ts.map +1 -0
- package/dest/storage/tagging_store/sender_address_book_store.js +30 -0
- package/dest/storage/tagging_store/sender_tagging_store.d.ts +77 -0
- package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -0
- package/dest/storage/tagging_store/sender_tagging_store.js +278 -0
- package/dest/tagging/constants.d.ts +2 -2
- package/dest/tagging/constants.d.ts.map +1 -1
- package/dest/tagging/constants.js +10 -2
- package/dest/tagging/get_all_logs_by_tags.d.ts +24 -0
- package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -0
- package/dest/tagging/get_all_logs_by_tags.js +46 -0
- package/dest/tagging/index.d.ts +16 -6
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +15 -5
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +15 -0
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -0
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +99 -0
- package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts +12 -0
- package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts.map +1 -0
- package/dest/tagging/recipient_sync/utils/find_highest_indexes.js +20 -0
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +15 -0
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -0
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +32 -0
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +21 -0
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -0
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +74 -0
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +11 -0
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -0
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +29 -0
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +21 -0
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -0
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +60 -0
- package/package.json +19 -19
- package/src/bin/check_oracle_version.ts +131 -20
- package/src/block_synchronizer/block_synchronizer.ts +174 -0
- package/src/block_synchronizer/index.ts +1 -0
- package/src/config/index.ts +17 -3
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/benchmarked_node.ts +103 -0
- package/src/contract_function_simulator/contract_function_simulator.ts +113 -33
- package/src/contract_function_simulator/execution_note_cache.ts +51 -28
- package/src/contract_function_simulator/execution_tagging_index_cache.ts +1 -1
- package/src/contract_function_simulator/hashed_values_cache.ts +1 -1
- package/src/contract_function_simulator/index.ts +1 -1
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +6 -2
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +6 -5
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +1 -1
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +6 -3
- package/src/contract_function_simulator/noir-structs/utility_context.ts +6 -25
- package/src/contract_function_simulator/oracle/interfaces.ts +30 -15
- package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +1 -1
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +27 -13
- package/src/contract_function_simulator/oracle/oracle.ts +78 -41
- package/src/contract_function_simulator/oracle/private_execution.ts +2 -68
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +129 -59
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +261 -71
- package/src/contract_function_simulator/pick_notes.ts +1 -1
- package/src/contract_function_simulator/proxied_contract_data_source.ts +24 -7
- package/src/contract_sync/index.ts +98 -0
- package/src/debug/pxe_debug_utils.ts +49 -0
- package/src/entrypoints/client/bundle/index.ts +0 -1
- package/src/entrypoints/client/bundle/utils.ts +9 -3
- package/src/entrypoints/client/lazy/index.ts +0 -1
- package/src/entrypoints/client/lazy/utils.ts +9 -4
- package/src/entrypoints/pxe_creation_options.ts +4 -1
- package/src/entrypoints/server/index.ts +3 -1
- package/src/entrypoints/server/utils.ts +12 -16
- package/src/error_enriching.ts +7 -15
- package/src/events/event_service.ts +73 -0
- package/src/events/index.ts +1 -0
- package/src/events/private_event_filter_validator.ts +46 -0
- package/src/job_coordinator/job_coordinator.ts +149 -0
- package/src/logs/log_service.ts +220 -0
- package/src/notes/index.ts +1 -0
- package/src/notes/note_service.ts +197 -0
- package/src/oracle_version.ts +4 -3
- package/src/private_kernel/hints/index.ts +1 -1
- package/src/private_kernel/hints/{build_private_kernel_reset_private_inputs.ts → private_kernel_reset_private_inputs_builder.ts} +34 -23
- package/src/private_kernel/private_kernel_execution_prover.ts +8 -9
- package/src/private_kernel/private_kernel_oracle.ts +118 -37
- package/src/pxe.ts +257 -280
- package/src/storage/{address_data_provider/address_data_provider.ts → address_store/address_store.ts} +1 -1
- package/src/storage/address_store/index.ts +1 -0
- package/src/storage/{sync_data_provider/sync_data_provider.ts → anchor_block_store/anchor_block_store.ts} +2 -11
- package/src/storage/anchor_block_store/index.ts +1 -0
- package/src/storage/capsule_store/capsule_store.ts +315 -0
- package/src/storage/capsule_store/index.ts +1 -0
- package/src/storage/{contract_data_provider/contract_data_provider.ts → contract_store/contract_store.ts} +45 -3
- package/src/storage/contract_store/index.ts +1 -0
- package/src/storage/{contract_data_provider → contract_store}/private_functions_tree.ts +1 -1
- package/src/storage/index.ts +7 -7
- package/src/storage/note_store/index.ts +2 -0
- package/src/storage/note_store/note_store.ts +381 -0
- package/src/storage/note_store/stored_note.ts +48 -0
- package/src/storage/private_event_store/private_event_store.ts +363 -0
- package/src/storage/private_event_store/stored_private_event.ts +73 -0
- package/src/storage/tagging_store/index.ts +3 -0
- package/src/storage/tagging_store/recipient_tagging_store.ts +129 -0
- package/src/storage/tagging_store/sender_address_book_store.ts +42 -0
- package/src/storage/tagging_store/sender_tagging_store.ts +345 -0
- package/src/tagging/constants.ts +10 -2
- package/src/tagging/get_all_logs_by_tags.ts +68 -0
- package/src/tagging/index.ts +18 -5
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +143 -0
- package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +34 -0
- package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +49 -0
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +99 -0
- package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +36 -0
- package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +84 -0
- package/dest/contract_function_simulator/execution_data_provider.d.ts +0 -265
- package/dest/contract_function_simulator/execution_data_provider.d.ts.map +0 -1
- package/dest/contract_function_simulator/execution_data_provider.js +0 -14
- package/dest/contract_function_simulator/proxied_node.d.ts +0 -9
- package/dest/contract_function_simulator/proxied_node.d.ts.map +0 -1
- package/dest/contract_function_simulator/proxied_node.js +0 -27
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts +0 -122
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +0 -1
- package/dest/contract_function_simulator/pxe_oracle_interface.js +0 -694
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +0 -28
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +0 -1
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts +0 -45
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +0 -1
- package/dest/private_kernel/private_kernel_oracle_impl.js +0 -86
- package/dest/storage/address_data_provider/address_data_provider.d.ts +0 -11
- package/dest/storage/address_data_provider/address_data_provider.d.ts.map +0 -1
- package/dest/storage/address_data_provider/index.d.ts +0 -2
- package/dest/storage/address_data_provider/index.d.ts.map +0 -1
- package/dest/storage/address_data_provider/index.js +0 -1
- package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +0 -25
- package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +0 -1
- package/dest/storage/capsule_data_provider/capsule_data_provider.js +0 -118
- package/dest/storage/capsule_data_provider/index.d.ts +0 -2
- package/dest/storage/capsule_data_provider/index.d.ts.map +0 -1
- package/dest/storage/capsule_data_provider/index.js +0 -1
- package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +0 -1
- package/dest/storage/contract_data_provider/index.d.ts +0 -2
- package/dest/storage/contract_data_provider/index.d.ts.map +0 -1
- package/dest/storage/contract_data_provider/index.js +0 -1
- package/dest/storage/contract_data_provider/private_functions_tree.d.ts.map +0 -1
- package/dest/storage/note_data_provider/index.d.ts +0 -3
- package/dest/storage/note_data_provider/index.d.ts.map +0 -1
- package/dest/storage/note_data_provider/index.js +0 -2
- package/dest/storage/note_data_provider/note_data_provider.d.ts +0 -83
- package/dest/storage/note_data_provider/note_data_provider.d.ts.map +0 -1
- package/dest/storage/note_data_provider/note_data_provider.js +0 -311
- package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +0 -37
- package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +0 -1
- package/dest/storage/private_event_data_provider/private_event_data_provider.js +0 -105
- package/dest/storage/sync_data_provider/index.d.ts.map +0 -1
- package/dest/storage/sync_data_provider/index.js +0 -1
- package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +0 -1
- package/dest/storage/tagging_data_provider/index.d.ts +0 -2
- package/dest/storage/tagging_data_provider/index.d.ts.map +0 -1
- package/dest/storage/tagging_data_provider/index.js +0 -1
- package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +0 -40
- package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +0 -1
- package/dest/storage/tagging_data_provider/tagging_data_provider.js +0 -89
- package/dest/synchronizer/index.d.ts +0 -2
- package/dest/synchronizer/index.d.ts.map +0 -1
- package/dest/synchronizer/index.js +0 -1
- package/dest/synchronizer/synchronizer.d.ts +0 -35
- package/dest/synchronizer/synchronizer.d.ts.map +0 -1
- package/dest/synchronizer/synchronizer.js +0 -101
- package/dest/tagging/siloed_tag.d.ts +0 -14
- package/dest/tagging/siloed_tag.d.ts.map +0 -1
- package/dest/tagging/siloed_tag.js +0 -20
- package/dest/tagging/tag.d.ts +0 -12
- package/dest/tagging/tag.d.ts.map +0 -1
- package/dest/tagging/tag.js +0 -17
- package/dest/tagging/utils.d.ts +0 -18
- package/dest/tagging/utils.d.ts.map +0 -1
- package/dest/tagging/utils.js +0 -24
- package/src/contract_function_simulator/execution_data_provider.ts +0 -333
- package/src/contract_function_simulator/proxied_node.ts +0 -33
- package/src/contract_function_simulator/pxe_oracle_interface.ts +0 -1008
- package/src/private_kernel/private_kernel_oracle_impl.ts +0 -132
- package/src/storage/address_data_provider/index.ts +0 -1
- package/src/storage/capsule_data_provider/capsule_data_provider.ts +0 -147
- package/src/storage/capsule_data_provider/index.ts +0 -1
- package/src/storage/contract_data_provider/index.ts +0 -1
- package/src/storage/note_data_provider/index.ts +0 -2
- package/src/storage/note_data_provider/note_data_provider.ts +0 -399
- package/src/storage/private_event_data_provider/private_event_data_provider.ts +0 -143
- package/src/storage/sync_data_provider/index.ts +0 -1
- package/src/storage/tagging_data_provider/index.ts +0 -1
- package/src/storage/tagging_data_provider/tagging_data_provider.ts +0 -120
- package/src/synchronizer/index.ts +0 -1
- package/src/synchronizer/synchronizer.ts +0 -120
- package/src/tagging/siloed_tag.ts +0 -22
- package/src/tagging/tag.ts +0 -16
- package/src/tagging/utils.ts +0 -31
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type PrivateKernelCircuitPublicInputs, PrivateKernelResetCircuitPrivateInputs, type PrivateKernelSimulateOutput } from '@aztec/stdlib/kernel';
|
|
2
|
-
import { type PrivateCallExecutionResult } from '@aztec/stdlib/tx';
|
|
3
|
-
import type { PrivateKernelOracle } from '../private_kernel_oracle.js';
|
|
4
|
-
export declare class PrivateKernelResetPrivateInputsBuilder {
|
|
5
|
-
private previousKernelOutput;
|
|
6
|
-
private executionStack;
|
|
7
|
-
private noteHashNullifierCounterMap;
|
|
8
|
-
private splitCounter;
|
|
9
|
-
private previousKernel;
|
|
10
|
-
private nextIteration?;
|
|
11
|
-
private noteHashResetActions;
|
|
12
|
-
private nullifierResetActions;
|
|
13
|
-
private numTransientData?;
|
|
14
|
-
private transientDataSquashingHints;
|
|
15
|
-
private requestedDimensions;
|
|
16
|
-
constructor(previousKernelOutput: PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>, executionStack: PrivateCallExecutionResult[], noteHashNullifierCounterMap: Map<number, number>, splitCounter: number);
|
|
17
|
-
needsReset(): boolean;
|
|
18
|
-
build(oracle: PrivateKernelOracle, noteHashLeafIndexMap: Map<bigint, bigint>): Promise<PrivateKernelResetCircuitPrivateInputs>;
|
|
19
|
-
private reduceReadRequestActions;
|
|
20
|
-
private needsResetNoteHashReadRequests;
|
|
21
|
-
private needsResetNullifierReadRequests;
|
|
22
|
-
private needsResetNullifierKeys;
|
|
23
|
-
private needsResetTransientData;
|
|
24
|
-
private needsSiloNoteHashes;
|
|
25
|
-
private needsSiloNullifiers;
|
|
26
|
-
private needsSiloPrivateLogs;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGRfcHJpdmF0ZV9rZXJuZWxfcmVzZXRfcHJpdmF0ZV9pbnB1dHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wcml2YXRlX2tlcm5lbC9oaW50cy9idWlsZF9wcml2YXRlX2tlcm5lbF9yZXNldF9wcml2YXRlX2lucHV0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFlQSxPQUFPLEVBS0wsS0FBSyxnQ0FBZ0MsRUFFckMsc0NBQXNDLEVBR3RDLEtBQUssMkJBQTJCLEVBZWpDLE1BQU0sc0JBQXNCLENBQUM7QUFDOUIsT0FBTyxFQUFFLEtBQUssMEJBQTBCLEVBQWlCLE1BQU0sa0JBQWtCLENBQUM7QUFHbEYsT0FBTyxLQUFLLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQTRDdkUscUJBQWEsc0NBQXNDO0lBWS9DLE9BQU8sQ0FBQyxvQkFBb0I7SUFDNUIsT0FBTyxDQUFDLGNBQWM7SUFDdEIsT0FBTyxDQUFDLDJCQUEyQjtJQUNuQyxPQUFPLENBQUMsWUFBWTtJQWR0QixPQUFPLENBQUMsY0FBYyxDQUFtQztJQUV6RCxPQUFPLENBQUMsYUFBYSxDQUFDLENBQTZCO0lBRW5ELE9BQU8sQ0FBQyxvQkFBb0IsQ0FBcUU7SUFDakcsT0FBTyxDQUFDLHFCQUFxQixDQUFxRTtJQUNsRyxPQUFPLENBQUMsZ0JBQWdCLENBQUMsQ0FBUztJQUNsQyxPQUFPLENBQUMsMkJBQTJCLENBQWtFO0lBQ3JHLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBK0I7SUFFMUQsWUFDVSxvQkFBb0IsRUFBRSwyQkFBMkIsQ0FBQyxnQ0FBZ0MsQ0FBQyxFQUNuRixjQUFjLEVBQUUsMEJBQTBCLEVBQUUsRUFDNUMsMkJBQTJCLEVBQUUsR0FBRyxDQUFDLE1BQU0sRUFBRSxNQUFNLENBQUMsRUFDaEQsWUFBWSxFQUFFLE1BQU0sRUFXN0I7SUFFRCxVQUFVLElBQUksT0FBTyxDQXNCcEI7SUFFSyxLQUFLLENBQUMsTUFBTSxFQUFFLG1CQUFtQixFQUFFLG9CQUFvQixFQUFFLEdBQUcsQ0FBQyxNQUFNLEVBQUUsTUFBTSxDQUFDLG1EQW9FakY7SUFFRCxPQUFPLENBQUMsd0JBQXdCO0lBMkJoQyxPQUFPLENBQUMsOEJBQThCO0lBdUR0QyxPQUFPLENBQUMsK0JBQStCO0lBdUR2QyxPQUFPLENBQUMsdUJBQXVCO0lBYS9CLE9BQU8sQ0FBQyx1QkFBdUI7SUFzRS9CLE9BQU8sQ0FBQyxtQkFBbUI7SUFjM0IsT0FBTyxDQUFDLG1CQUFtQjtJQWtCM0IsT0FBTyxDQUFDLG9CQUFvQjtDQXFCN0IifQ==
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build_private_kernel_reset_private_inputs.d.ts","sourceRoot":"","sources":["../../../src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts"],"names":[],"mappings":"AAeA,OAAO,EAKL,KAAK,gCAAgC,EAErC,sCAAsC,EAGtC,KAAK,2BAA2B,EAejC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,0BAA0B,EAAiB,MAAM,kBAAkB,CAAC;AAGlF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AA4CvE,qBAAa,sCAAsC;IAY/C,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,2BAA2B;IACnC,OAAO,CAAC,YAAY;IAdtB,OAAO,CAAC,cAAc,CAAmC;IAEzD,OAAO,CAAC,aAAa,CAAC,CAA6B;IAEnD,OAAO,CAAC,oBAAoB,CAAqE;IACjG,OAAO,CAAC,qBAAqB,CAAqE;IAClG,OAAO,CAAC,gBAAgB,CAAC,CAAS;IAClC,OAAO,CAAC,2BAA2B,CAAkE;IACrG,OAAO,CAAC,mBAAmB,CAA+B;IAE1D,YACU,oBAAoB,EAAE,2BAA2B,CAAC,gCAAgC,CAAC,EACnF,cAAc,EAAE,0BAA0B,EAAE,EAC5C,2BAA2B,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAChD,YAAY,EAAE,MAAM,EAW7B;IAED,UAAU,IAAI,OAAO,CAsBpB;IAEK,KAAK,CAAC,MAAM,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,mDAoEjF;IAED,OAAO,CAAC,wBAAwB;IA2BhC,OAAO,CAAC,8BAA8B;IAuDtC,OAAO,CAAC,+BAA+B;IAuDvC,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,uBAAuB;IAsE/B,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,mBAAmB;IAkB3B,OAAO,CAAC,oBAAoB;CAqB7B"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { NOTE_HASH_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
-
import type { Fr, GrumpkinScalar, Point } from '@aztec/foundation/fields';
|
|
3
|
-
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
4
|
-
import type { KeyStore } from '@aztec/key-store';
|
|
5
|
-
import type { FunctionSelector } from '@aztec/stdlib/abi';
|
|
6
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
|
-
import type { L2BlockNumber } from '@aztec/stdlib/block';
|
|
8
|
-
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
9
|
-
import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
|
|
10
|
-
import type { NullifierMembershipWitness } from '@aztec/stdlib/trees';
|
|
11
|
-
import type { VerificationKeyAsFields } from '@aztec/stdlib/vks';
|
|
12
|
-
import type { ContractDataProvider } from '../storage/index.js';
|
|
13
|
-
import type { PrivateKernelOracle } from './private_kernel_oracle.js';
|
|
14
|
-
/**
|
|
15
|
-
* A data oracle that provides information needed for simulating a transaction.
|
|
16
|
-
*/
|
|
17
|
-
export declare class PrivateKernelOracleImpl implements PrivateKernelOracle {
|
|
18
|
-
private contractDataProvider;
|
|
19
|
-
private keyStore;
|
|
20
|
-
private node;
|
|
21
|
-
private blockNumber;
|
|
22
|
-
private log;
|
|
23
|
-
constructor(contractDataProvider: ContractDataProvider, keyStore: KeyStore, node: AztecNode, blockNumber?: L2BlockNumber, log?: import("@aztec/foundation/log").Logger);
|
|
24
|
-
getContractAddressPreimage(address: AztecAddress): Promise<{
|
|
25
|
-
version: 1;
|
|
26
|
-
salt: Fr;
|
|
27
|
-
deployer: AztecAddress;
|
|
28
|
-
currentContractClassId: Fr;
|
|
29
|
-
originalContractClassId: Fr;
|
|
30
|
-
initializationHash: Fr;
|
|
31
|
-
publicKeys: import("../../../stdlib/dest/keys/public_keys.js").PublicKeys;
|
|
32
|
-
address: AztecAddress;
|
|
33
|
-
saltedInitializationHash: Fr;
|
|
34
|
-
}>;
|
|
35
|
-
getContractClassIdPreimage(contractClassId: Fr): Promise<import("@aztec/stdlib/contract").ContractClassIdPreimage>;
|
|
36
|
-
getFunctionMembershipWitness(contractClassId: Fr, selector: FunctionSelector): Promise<MembershipWitness<7>>;
|
|
37
|
-
getVkMembershipWitness(vk: VerificationKeyAsFields): Promise<MembershipWitness<7>>;
|
|
38
|
-
getNoteHashMembershipWitness(leafIndex: bigint): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT>>;
|
|
39
|
-
getNullifierMembershipWitness(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
40
|
-
getNoteHashTreeRoot(): Promise<Fr>;
|
|
41
|
-
getMasterSecretKey(masterPublicKey: Point): Promise<GrumpkinScalar>;
|
|
42
|
-
getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
|
|
43
|
-
getUpdatedClassIdHints(contractAddress: AztecAddress): Promise<UpdatedClassIdHints>;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9rZXJuZWxfb3JhY2xlX2ltcGwuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wcml2YXRlX2tlcm5lbC9wcml2YXRlX2tlcm5lbF9vcmFjbGVfaW1wbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUscUJBQXFCLEVBQTJDLE1BQU0sa0JBQWtCLENBQUM7QUFDbEcsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLGNBQWMsRUFBRSxLQUFLLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUcxRSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUM1RCxPQUFPLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUdqRCxPQUFPLEtBQUssRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQzFELE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLGFBQ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AE,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAEtG;IAEY,sBAAsB,CAAC,eAAe,EAAE,YAAY,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA8B/F;CACF"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { PUBLIC_DATA_TREE_HEIGHT, VK_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
-
import { createLogger } from '@aztec/foundation/log';
|
|
3
|
-
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
4
|
-
import { getVKIndex, getVKSiblingPath } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
5
|
-
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
6
|
-
import { computeContractClassIdPreimage, computeSaltedInitializationHash } from '@aztec/stdlib/contract';
|
|
7
|
-
import { DelayedPublicMutableValues, DelayedPublicMutableValuesWithHash } from '@aztec/stdlib/delayed-public-mutable';
|
|
8
|
-
import { computePublicDataTreeLeafSlot } from '@aztec/stdlib/hash';
|
|
9
|
-
import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
|
|
10
|
-
// TODO: Block number should not be "latest".
|
|
11
|
-
// It should be fixed at the time the proof is being simulated. I.e., it should be the same as the value defined in the constant data.
|
|
12
|
-
/**
|
|
13
|
-
* A data oracle that provides information needed for simulating a transaction.
|
|
14
|
-
*/ export class PrivateKernelOracleImpl {
|
|
15
|
-
contractDataProvider;
|
|
16
|
-
keyStore;
|
|
17
|
-
node;
|
|
18
|
-
blockNumber;
|
|
19
|
-
log;
|
|
20
|
-
constructor(contractDataProvider, keyStore, node, blockNumber = 'latest', log = createLogger('pxe:kernel_oracle')){
|
|
21
|
-
this.contractDataProvider = contractDataProvider;
|
|
22
|
-
this.keyStore = keyStore;
|
|
23
|
-
this.node = node;
|
|
24
|
-
this.blockNumber = blockNumber;
|
|
25
|
-
this.log = log;
|
|
26
|
-
}
|
|
27
|
-
async getContractAddressPreimage(address) {
|
|
28
|
-
const instance = await this.contractDataProvider.getContractInstance(address);
|
|
29
|
-
if (!instance) {
|
|
30
|
-
throw new Error(`Contract instance not found when getting address preimage. Contract address: ${address}.`);
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
saltedInitializationHash: await computeSaltedInitializationHash(instance),
|
|
34
|
-
...instance
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
async getContractClassIdPreimage(contractClassId) {
|
|
38
|
-
const contractClass = await this.contractDataProvider.getContractClass(contractClassId);
|
|
39
|
-
if (!contractClass) {
|
|
40
|
-
throw new Error(`Contract class not found when getting class id preimage. Class id: ${contractClassId}.`);
|
|
41
|
-
}
|
|
42
|
-
return computeContractClassIdPreimage(contractClass);
|
|
43
|
-
}
|
|
44
|
-
async getFunctionMembershipWitness(contractClassId, selector) {
|
|
45
|
-
const membershipWitness = await this.contractDataProvider.getFunctionMembershipWitness(contractClassId, selector);
|
|
46
|
-
if (!membershipWitness) {
|
|
47
|
-
throw new Error(`Membership witness not found for contract class id ${contractClassId} and selector ${selector}.`);
|
|
48
|
-
}
|
|
49
|
-
return membershipWitness;
|
|
50
|
-
}
|
|
51
|
-
getVkMembershipWitness(vk) {
|
|
52
|
-
const leafIndex = getVKIndex(vk);
|
|
53
|
-
return Promise.resolve(new MembershipWitness(VK_TREE_HEIGHT, BigInt(leafIndex), getVKSiblingPath(leafIndex)));
|
|
54
|
-
}
|
|
55
|
-
async getNoteHashMembershipWitness(leafIndex) {
|
|
56
|
-
const path = await this.node.getNoteHashSiblingPath(this.blockNumber, leafIndex);
|
|
57
|
-
return new MembershipWitness(path.pathSize, leafIndex, path.toFields());
|
|
58
|
-
}
|
|
59
|
-
getNullifierMembershipWitness(nullifier) {
|
|
60
|
-
return this.node.getNullifierMembershipWitness(this.blockNumber, nullifier);
|
|
61
|
-
}
|
|
62
|
-
async getNoteHashTreeRoot() {
|
|
63
|
-
const header = await this.node.getBlockHeader(this.blockNumber);
|
|
64
|
-
if (!header) {
|
|
65
|
-
throw new Error(`No block header found for block number ${this.blockNumber}`);
|
|
66
|
-
}
|
|
67
|
-
return header.state.partial.noteHashTree.root;
|
|
68
|
-
}
|
|
69
|
-
getMasterSecretKey(masterPublicKey) {
|
|
70
|
-
return this.keyStore.getMasterSecretKey(masterPublicKey);
|
|
71
|
-
}
|
|
72
|
-
getDebugFunctionName(contractAddress, selector) {
|
|
73
|
-
return this.contractDataProvider.getDebugFunctionName(contractAddress, selector);
|
|
74
|
-
}
|
|
75
|
-
async getUpdatedClassIdHints(contractAddress) {
|
|
76
|
-
const { delayedPublicMutableSlot, delayedPublicMutableHashSlot } = await DelayedPublicMutableValuesWithHash.getContractUpdateSlots(contractAddress);
|
|
77
|
-
const hashLeafSlot = await computePublicDataTreeLeafSlot(ProtocolContractAddress.ContractInstanceRegistry, delayedPublicMutableHashSlot);
|
|
78
|
-
const updatedClassIdWitness = await this.node.getPublicDataWitness(this.blockNumber, hashLeafSlot);
|
|
79
|
-
if (!updatedClassIdWitness) {
|
|
80
|
-
throw new Error(`No public data tree witness found for ${hashLeafSlot}`);
|
|
81
|
-
}
|
|
82
|
-
const readStorage = (storageSlot)=>this.node.getPublicStorageAt(this.blockNumber, ProtocolContractAddress.ContractInstanceRegistry, storageSlot);
|
|
83
|
-
const delayedPublicMutableValues = await DelayedPublicMutableValues.readFromTree(delayedPublicMutableSlot, readStorage);
|
|
84
|
-
return new UpdatedClassIdHints(new MembershipWitness(PUBLIC_DATA_TREE_HEIGHT, updatedClassIdWitness.index, updatedClassIdWitness.siblingPath.toTuple()), updatedClassIdWitness.leafPreimage, delayedPublicMutableValues);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
@@ -1,11 +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
|
-
export declare class AddressDataProvider {
|
|
5
|
-
#private;
|
|
6
|
-
constructor(store: AztecAsyncKVStore);
|
|
7
|
-
addCompleteAddress(completeAddress: CompleteAddress): Promise<boolean>;
|
|
8
|
-
getCompleteAddress(account: AztecAddress): Promise<CompleteAddress | undefined>;
|
|
9
|
-
getCompleteAddresses(): Promise<CompleteAddress[]>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkcmVzc19kYXRhX3Byb3ZpZGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc3RvcmFnZS9hZGRyZXNzX2RhdGFfcHJvdmlkZXIvYWRkcmVzc19kYXRhX3Byb3ZpZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFtQixpQkFBaUIsRUFBaUIsTUFBTSxpQkFBaUIsQ0FBQztBQUN6RixPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUNoRSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFekQscUJBQWEsbUJBQW1COztJQUs5QixZQUFZLEtBQUssRUFBRSxpQkFBaUIsRUFLbkM7SUFFRCxrQkFBa0IsQ0FBQyxlQUFlLEVBQUUsZUFBZSxHQUFHLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0EwQnJFO0lBWUQsa0JBQWtCLENBQUMsT0FBTyxFQUFFLFlBQVksR0FBRyxPQUFPLENBQUMsZUFBZSxHQUFHLFNBQVMsQ0FBQyxDQUU5RTtJQUVLLG9CQUFvQixJQUFJLE9BQU8sQ0FBQyxlQUFlLEVBQUUsQ0FBQyxDQUl2RDtDQUNGIn0=
|
|
@@ -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,qBAAa,mBAAmB;;IAK9B,YAAY,KAAK,EAAE,iBAAiB,EAKnC;IAED,kBAAkB,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CA0BrE;IAYD,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAE9E;IAEK,oBAAoB,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAIvD;CACF"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export { AddressDataProvider } from './address_data_provider.js';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zdG9yYWdlL2FkZHJlc3NfZGF0YV9wcm92aWRlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQyJ9
|
|
@@ -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,25 +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
|
-
export declare class CapsuleDataProvider {
|
|
6
|
-
#private;
|
|
7
|
-
logger: Logger;
|
|
8
|
-
constructor(store: AztecAsyncKVStore);
|
|
9
|
-
storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[]): Promise<void>;
|
|
10
|
-
loadCapsule(contractAddress: AztecAddress, slot: Fr): Promise<Fr[] | null>;
|
|
11
|
-
deleteCapsule(contractAddress: AztecAddress, slot: Fr): Promise<void>;
|
|
12
|
-
copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Appends multiple capsules to a capsule array stored at the base slot.
|
|
15
|
-
* The array length is stored at the base slot, and elements are stored in consecutive slots after it.
|
|
16
|
-
* All operations are performed in a single transaction.
|
|
17
|
-
* @param contractAddress - The contract address that owns the capsule array
|
|
18
|
-
* @param baseSlot - The slot where the array length is stored
|
|
19
|
-
* @param content - Array of capsule data to append
|
|
20
|
-
*/
|
|
21
|
-
appendToCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][]): Promise<void>;
|
|
22
|
-
readCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr): Promise<Fr[][]>;
|
|
23
|
-
setCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][]): Promise<void>;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2Fwc3VsZV9kYXRhX3Byb3ZpZGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc3RvcmFnZS9jYXBzdWxlX2RhdGFfcHJvdmlkZXIvY2Fwc3VsZV9kYXRhX3Byb3ZpZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxFQUFFLEVBQUUsT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G;IAED;;;;;;;OAOG;IACH,oBAAoB,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBhG;IAED,gBAAgB,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAsB7E;IAED,eAAe,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,iBAmB3E;CACF"}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import { createLogger } from '@aztec/foundation/log';
|
|
3
|
-
export class CapsuleDataProvider {
|
|
4
|
-
#store;
|
|
5
|
-
// Arbitrary data stored by contracts. Key is computed as `${contractAddress}:${key}`
|
|
6
|
-
#capsules;
|
|
7
|
-
logger;
|
|
8
|
-
constructor(store){
|
|
9
|
-
this.#store = store;
|
|
10
|
-
this.#capsules = this.#store.openMap('capsules');
|
|
11
|
-
this.logger = createLogger('pxe:capsule-data-provider');
|
|
12
|
-
}
|
|
13
|
-
async storeCapsule(contractAddress, slot, capsule) {
|
|
14
|
-
await this.#capsules.set(dbSlotToKey(contractAddress, slot), Buffer.concat(capsule.map((value)=>value.toBuffer())));
|
|
15
|
-
}
|
|
16
|
-
async loadCapsule(contractAddress, slot) {
|
|
17
|
-
const dataBuffer = await this.#capsules.getAsync(dbSlotToKey(contractAddress, slot));
|
|
18
|
-
if (!dataBuffer) {
|
|
19
|
-
this.logger.trace(`Data not found for contract ${contractAddress.toString()} and slot ${slot.toString()}`);
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
const capsule = [];
|
|
23
|
-
for(let i = 0; i < dataBuffer.length; i += Fr.SIZE_IN_BYTES){
|
|
24
|
-
capsule.push(Fr.fromBuffer(dataBuffer.subarray(i, i + Fr.SIZE_IN_BYTES)));
|
|
25
|
-
}
|
|
26
|
-
return capsule;
|
|
27
|
-
}
|
|
28
|
-
async deleteCapsule(contractAddress, slot) {
|
|
29
|
-
await this.#capsules.delete(dbSlotToKey(contractAddress, slot));
|
|
30
|
-
}
|
|
31
|
-
copyCapsule(contractAddress, srcSlot, dstSlot, numEntries) {
|
|
32
|
-
return this.#store.transactionAsync(async ()=>{
|
|
33
|
-
// In order to support overlapping source and destination regions, we need to check the relative positions of source
|
|
34
|
-
// and destination. If destination is ahead of source, then by the time we overwrite source elements using forward
|
|
35
|
-
// indexes we'll have already read those. On the contrary, if source is ahead of destination we need to use backward
|
|
36
|
-
// indexes to avoid reading elements that've been overwritten.
|
|
37
|
-
const indexes = Array.from(Array(numEntries).keys());
|
|
38
|
-
if (srcSlot.lt(dstSlot)) {
|
|
39
|
-
indexes.reverse();
|
|
40
|
-
}
|
|
41
|
-
for (const i of indexes){
|
|
42
|
-
const currentSrcSlot = dbSlotToKey(contractAddress, srcSlot.add(new Fr(i)));
|
|
43
|
-
const currentDstSlot = dbSlotToKey(contractAddress, dstSlot.add(new Fr(i)));
|
|
44
|
-
const toCopy = await this.#capsules.getAsync(currentSrcSlot);
|
|
45
|
-
if (!toCopy) {
|
|
46
|
-
throw new Error(`Attempted to copy empty slot ${currentSrcSlot} for contract ${contractAddress.toString()}`);
|
|
47
|
-
}
|
|
48
|
-
await this.#capsules.set(currentDstSlot, toCopy);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Appends multiple capsules to a capsule array stored at the base slot.
|
|
54
|
-
* The array length is stored at the base slot, and elements are stored in consecutive slots after it.
|
|
55
|
-
* All operations are performed in a single transaction.
|
|
56
|
-
* @param contractAddress - The contract address that owns the capsule array
|
|
57
|
-
* @param baseSlot - The slot where the array length is stored
|
|
58
|
-
* @param content - Array of capsule data to append
|
|
59
|
-
*/ appendToCapsuleArray(contractAddress, baseSlot, content) {
|
|
60
|
-
return this.#store.transactionAsync(async ()=>{
|
|
61
|
-
// Load current length, defaulting to 0 if not found
|
|
62
|
-
const lengthData = await this.loadCapsule(contractAddress, baseSlot);
|
|
63
|
-
const currentLength = lengthData ? lengthData[0].toNumber() : 0;
|
|
64
|
-
// Store each capsule at consecutive slots after baseSlot + 1 + currentLength
|
|
65
|
-
for(let i = 0; i < content.length; i++){
|
|
66
|
-
const nextSlot = arraySlot(baseSlot, currentLength + i);
|
|
67
|
-
await this.storeCapsule(contractAddress, nextSlot, content[i]);
|
|
68
|
-
}
|
|
69
|
-
// Update length to include all new capsules
|
|
70
|
-
const newLength = currentLength + content.length;
|
|
71
|
-
await this.storeCapsule(contractAddress, baseSlot, [
|
|
72
|
-
new Fr(newLength)
|
|
73
|
-
]);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
readCapsuleArray(contractAddress, baseSlot) {
|
|
77
|
-
return this.#store.transactionAsync(async ()=>{
|
|
78
|
-
// Load length, defaulting to 0 if not found
|
|
79
|
-
const maybeLength = await this.loadCapsule(contractAddress, baseSlot);
|
|
80
|
-
const length = maybeLength ? maybeLength[0].toBigInt() : 0n;
|
|
81
|
-
const values = [];
|
|
82
|
-
// Read each capsule at consecutive slots after baseSlot
|
|
83
|
-
for(let i = 0; i < length; i++){
|
|
84
|
-
const currentValue = await this.loadCapsule(contractAddress, arraySlot(baseSlot, i));
|
|
85
|
-
if (currentValue == undefined) {
|
|
86
|
-
throw new Error(`Expected non-empty value at capsule array in base slot ${baseSlot} at index ${i} for contract ${contractAddress}`);
|
|
87
|
-
}
|
|
88
|
-
values.push(currentValue);
|
|
89
|
-
}
|
|
90
|
-
return values;
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
setCapsuleArray(contractAddress, baseSlot, content) {
|
|
94
|
-
return this.#store.transactionAsync(async ()=>{
|
|
95
|
-
// Load current length, defaulting to 0 if not found
|
|
96
|
-
const maybeLength = await this.loadCapsule(contractAddress, baseSlot);
|
|
97
|
-
const originalLength = maybeLength ? maybeLength[0].toNumber() : 0;
|
|
98
|
-
// Set the new length
|
|
99
|
-
await this.storeCapsule(contractAddress, baseSlot, [
|
|
100
|
-
new Fr(content.length)
|
|
101
|
-
]);
|
|
102
|
-
// Store the new content, possibly overwriting existing values
|
|
103
|
-
for(let i = 0; i < content.length; i++){
|
|
104
|
-
await this.storeCapsule(contractAddress, arraySlot(baseSlot, i), content[i]);
|
|
105
|
-
}
|
|
106
|
-
// Clear any stragglers
|
|
107
|
-
for(let i = content.length; i < originalLength; i++){
|
|
108
|
-
await this.deleteCapsule(contractAddress, arraySlot(baseSlot, i));
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
function dbSlotToKey(contractAddress, slot) {
|
|
114
|
-
return `${contractAddress.toString()}:${slot.toString()}`;
|
|
115
|
-
}
|
|
116
|
-
function arraySlot(baseSlot, index) {
|
|
117
|
-
return baseSlot.add(new Fr(1)).add(new Fr(index));
|
|
118
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export { CapsuleDataProvider } from './capsule_data_provider.js';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zdG9yYWdlL2NhcHN1bGVfZGF0YV9wcm92aWRlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQyJ9
|
|
@@ -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,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,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,EAEhB,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;AAIhC;;;;;;GAMG;AACH,qBAAa,oBAAoB;;IAW/B,YAAY,KAAK,EAAE,iBAAiB,EAGnC;IAIY,mBAAmB,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBlF;IAEK,mBAAmB,CAAC,QAAQ,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAO9E;IA4CK,qBAAqB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAGrD;IAED,4EAA4E;IAC/D,mBAAmB,CAAC,eAAe,EAAE,YAAY,GAAG,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC,CAGhH;IAEY,mBAAmB,CAAC,eAAe,EAAE,EAAE,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAI3F;IAED,0EAA0E;IAC7D,gBAAgB,CAAC,eAAe,EAAE,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bIi4uLy4uLy4uL3NyYy9zdG9yYWdlL2NvbnRyYWN0X2RhdGFfcHJvdmlkZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sNkJBQTZCLENBQUMifQ==
|
|
@@ -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,eAAqE;IAE5E,OAAa,MAAM,CAAC,QAAQ,EAAE,gBAAgB,iCAO7C;IAED;;;;;;;;OAQG;IACU,4BAA4B,CACvC,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,iBAAiB,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAezD;YAEa,OAAO;CAMtB"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { NoteDao } from '@aztec/stdlib/note';
|
|
2
|
-
export { NoteDataProvider } from './note_data_provider.js';
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zdG9yYWdlL25vdGVfZGF0YV9wcm92aWRlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDN0MsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUMifQ==
|
|
@@ -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,oBAAoB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,83 +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 { NoteDao } from '@aztec/stdlib/note';
|
|
7
|
-
/**
|
|
8
|
-
* NoteDataProvider manages the storage and retrieval of notes.
|
|
9
|
-
*
|
|
10
|
-
* Notes can be active or nullified. This class processes new notes, nullifications,
|
|
11
|
-
* and performs rollback handling in the case of a reorg.
|
|
12
|
-
**/
|
|
13
|
-
export declare class NoteDataProvider {
|
|
14
|
-
#private;
|
|
15
|
-
private constructor();
|
|
16
|
-
/**
|
|
17
|
-
* Creates and initializes a new NoteDataProvider instance.
|
|
18
|
-
*
|
|
19
|
-
* This factory method creates a NoteDataProvider and restores any existing
|
|
20
|
-
* scope-specific indexes from the database.
|
|
21
|
-
*
|
|
22
|
-
* @param store - The key-value store to use for persistence
|
|
23
|
-
* @returns Promise resolving to a fully initialized NoteDataProvider instance
|
|
24
|
-
*/
|
|
25
|
-
static create(store: AztecAsyncKVStore): Promise<NoteDataProvider>;
|
|
26
|
-
/**
|
|
27
|
-
* Adds a new scope to the note data provider.
|
|
28
|
-
*
|
|
29
|
-
* Scopes provide privacy isolation by creating separate indexes for each user.
|
|
30
|
-
* Each scope gets its own set of indexes for efficient note retrieval by various criteria.
|
|
31
|
-
*
|
|
32
|
-
* @param scope - The AztecAddress representing the scope/user to add
|
|
33
|
-
* @returns Promise resolving to true if scope was added, false if it already existed
|
|
34
|
-
*/
|
|
35
|
-
addScope(scope: AztecAddress): Promise<boolean>;
|
|
36
|
-
/**
|
|
37
|
-
* Adds multiple notes to the data provider under the specified scope.
|
|
38
|
-
*
|
|
39
|
-
* Notes are stored using their index from the notes hash tree as the key, which provides
|
|
40
|
-
* uniqueness and maintains creation order. Each note is indexed by multiple criteria
|
|
41
|
-
* for efficient retrieval.
|
|
42
|
-
*
|
|
43
|
-
* @param notes - Notes to store
|
|
44
|
-
* @param scope - The scope (user/account) under which to store the notes
|
|
45
|
-
*/
|
|
46
|
-
addNotes(notes: NoteDao[], scope: AztecAddress): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* Synchronizes notes and nullifiers to a specific block number.
|
|
49
|
-
*
|
|
50
|
-
* This method ensures that the state of notes and nullifiers is consistent with the
|
|
51
|
-
* specified block number. It restores any notes that were nullified after the given block
|
|
52
|
-
* and deletes any active notes created after that block.
|
|
53
|
-
*
|
|
54
|
-
* @param blockNumber - The new chain tip after a reorg
|
|
55
|
-
* @param synchedBlockNumber - The block number up to which PXE managed to sync before the reorg happened.
|
|
56
|
-
*/
|
|
57
|
-
rollbackNotesAndNullifiers(blockNumber: number, synchedBlockNumber: number): Promise<void>;
|
|
58
|
-
/**
|
|
59
|
-
* Retrieves notes based on the provided filter criteria.
|
|
60
|
-
*
|
|
61
|
-
* This method queries both active and optionally nullified notes based on the filter
|
|
62
|
-
* parameters.
|
|
63
|
-
*
|
|
64
|
-
* @param filter - Filter criteria including contractAddress (required), and optional
|
|
65
|
-
* storageSlot, status, scopes and siloedNullifier.
|
|
66
|
-
* @returns Promise resolving to array of NoteDao objects matching the filter
|
|
67
|
-
* @throws If filtering by an empty scopes array. Scopes have to be set to undefined or to a non-empty array.
|
|
68
|
-
*/
|
|
69
|
-
getNotes(filter: NotesFilter): Promise<NoteDao[]>;
|
|
70
|
-
/**
|
|
71
|
-
* Transitions notes from "active" to "nullified" state.
|
|
72
|
-
*
|
|
73
|
-
* This operation processes a batch of nullifiers to mark the corresponding notes
|
|
74
|
-
* as spent/nullified. The operation is atomic - if any nullifier is not found,
|
|
75
|
-
* the entire operation fails and no notes are modified.
|
|
76
|
-
*
|
|
77
|
-
* @param nullifiers - Array of nullifiers with their block numbers to process
|
|
78
|
-
* @returns Promise resolving to array of nullified NoteDao objects
|
|
79
|
-
* @throws Error if any nullifier is not found in the active notes
|
|
80
|
-
*/
|
|
81
|
-
applyNullifiers(nullifiers: InBlock<Fr>[]): Promise<NoteDao[]>;
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90ZV9kYXRhX3Byb3ZpZGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc3RvcmFnZS9ub3RlX2RhdGFfcHJvdmlkZXIvbm90ZV9kYXRhX3Byb3ZpZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLEVBQUUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRW5ELE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFxQyxNQUFNLGlCQUFpQixDQUFDO0FBQzVGLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUMzRCxPQUFPLEtBQUssRU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@
|
|
|
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;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C;;;;;IAKI;AACJ,qBAAa,gBAAgB;;IAiB3B,OAAO,eAgBN;IAED;;;;;;;;OAQG;IACH,OAAoB,MAAM,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAO9E;IAED;;;;;;;;OAQG;IACU,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAY3D;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB7D;IAED;;;;;;;;;OASG;IACU,0BAA0B,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGtG;IAuFD;;;;;;;;;;OAUG;IACG,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CA4FtD;IAED;;;;;;;;;;OAUG;IACH,eAAe,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CA8D7D;CACF"}
|