@aztec/pxe 0.0.1-commit.03f7ef2 → 0.0.1-commit.0658669b3
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/access_scopes.d.ts +9 -0
- package/dest/access_scopes.d.ts.map +1 -0
- package/dest/access_scopes.js +6 -0
- package/dest/bin/check_oracle_version.js +1 -1
- package/dest/block_synchronizer/block_synchronizer.d.ts +17 -11
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
- package/dest/block_synchronizer/block_synchronizer.js +80 -34
- package/dest/config/index.d.ts +3 -1
- 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 +65 -40
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +209 -89
- package/dest/contract_function_simulator/execution_note_cache.d.ts +18 -9
- package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_note_cache.js +45 -28
- 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 +4 -3
- 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 +7 -4
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +3 -3
- 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 +2 -2
- 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 +17 -13
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +3 -1
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +6 -6
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +8 -8
- package/dest/contract_function_simulator/oracle/oracle.d.ts +12 -10
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +67 -44
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +2 -26
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.js +1 -37
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +46 -46
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +88 -56
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +82 -48
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +141 -120
- 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 +5 -5
- package/dest/contract_logging.d.ts +22 -0
- package/dest/contract_logging.d.ts.map +1 -0
- package/dest/contract_logging.js +23 -0
- package/dest/contract_sync/contract_sync_service.d.ts +43 -0
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -0
- package/dest/contract_sync/contract_sync_service.js +97 -0
- package/dest/contract_sync/helpers.d.ts +29 -0
- package/dest/contract_sync/helpers.d.ts.map +1 -0
- package/dest/contract_sync/helpers.js +55 -0
- package/dest/debug/pxe_debug_utils.d.ts +26 -12
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
- package/dest/debug/pxe_debug_utils.js +30 -19
- package/dest/entrypoints/client/bundle/index.d.ts +4 -1
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.js +3 -0
- 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 +31 -8
- package/dest/entrypoints/client/lazy/index.d.ts +4 -1
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/index.js +3 -0
- package/dest/entrypoints/client/lazy/utils.d.ts +2 -2
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +32 -9
- package/dest/entrypoints/pxe_creation_options.d.ts +5 -3
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/server/index.d.ts +5 -1
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +4 -0
- 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 +39 -16
- 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 +8 -8
- package/dest/events/event_service.d.ts.map +1 -1
- package/dest/events/event_service.js +21 -24
- package/dest/events/private_event_filter_validator.d.ts +6 -6
- package/dest/events/private_event_filter_validator.d.ts.map +1 -1
- package/dest/events/private_event_filter_validator.js +5 -6
- package/dest/job_coordinator/job_coordinator.d.ts +75 -0
- package/dest/job_coordinator/job_coordinator.d.ts.map +1 -0
- package/dest/job_coordinator/job_coordinator.js +94 -0
- package/dest/logs/log_service.d.ts +18 -32
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +76 -197
- package/dest/notes/note_service.d.ts +13 -12
- package/dest/notes/note_service.d.ts.map +1 -1
- package/dest/notes/note_service.js +42 -46
- package/dest/notes_filter.d.ts +25 -0
- package/dest/notes_filter.d.ts.map +1 -0
- package/dest/notes_filter.js +4 -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/compute_tx_expiration_timestamp.d.ts +4 -0
- package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts.map +1 -0
- package/dest/private_kernel/hints/{compute_tx_include_by_timestamp.js → compute_tx_expiration_timestamp.js} +12 -12
- package/dest/private_kernel/hints/index.d.ts +3 -3
- package/dest/private_kernel/hints/index.d.ts.map +1 -1
- package/dest/private_kernel/hints/index.js +2 -2
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +29 -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} +141 -74
- package/dest/private_kernel/hints/test_utils.d.ts +122 -0
- package/dest/private_kernel/hints/test_utils.d.ts.map +1 -0
- package/dest/private_kernel/hints/test_utils.js +203 -0
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +3 -2
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +24 -17
- package/dest/private_kernel/private_kernel_oracle.d.ts +24 -24
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +94 -2
- package/dest/pxe.d.ts +85 -66
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +203 -185
- 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} +13 -12
- 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/anchor_block_store/anchor_block_store.d.ts +17 -0
- package/dest/storage/anchor_block_store/anchor_block_store.d.ts.map +1 -0
- package/dest/storage/{anchor_block_data_provider/anchor_block_data_provider.js → anchor_block_store/anchor_block_store.js} +9 -2
- package/dest/storage/anchor_block_store/index.d.ts +2 -0
- 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 +253 -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_store/contract_store.d.ts +93 -0
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -0
- package/dest/storage/contract_store/contract_store.js +309 -0
- 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/index.d.ts +8 -8
- package/dest/storage/index.d.ts.map +1 -1
- package/dest/storage/index.js +7 -7
- package/dest/storage/metadata.d.ts +1 -1
- package/dest/storage/metadata.js +1 -1
- 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 +83 -0
- package/dest/storage/note_store/note_store.d.ts.map +1 -0
- package/dest/storage/note_store/note_store.js +343 -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 +273 -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 +111 -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 +36 -0
- package/dest/storage/{tagging_data_provider/sender_tagging_data_provider.d.ts → tagging_store/sender_tagging_store.d.ts} +19 -9
- package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -0
- package/dest/storage/tagging_store/sender_tagging_store.js +348 -0
- package/dest/tagging/constants.d.ts +2 -2
- package/dest/tagging/constants.d.ts.map +1 -1
- package/dest/tagging/constants.js +10 -3
- 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 +60 -0
- package/dest/tagging/index.d.ts +15 -3
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +14 -2
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +4 -3
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +12 -12
- package/dest/tagging/recipient_sync/utils/find_highest_indexes.js +2 -2
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +3 -2
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -1
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +5 -2
- package/dest/tagging/{sync → sender_sync}/sync_sender_tagging_indexes.d.ts +4 -4
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -0
- package/dest/tagging/{sync → sender_sync}/sync_sender_tagging_indexes.js +8 -23
- package/dest/tagging/{sync → sender_sync}/utils/get_status_change_of_pending.d.ts +1 -1
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -0
- package/dest/tagging/{sync → sender_sync}/utils/get_status_change_of_pending.js +5 -8
- package/dest/tagging/{sync → sender_sync}/utils/load_and_store_new_tagging_indexes.d.ts +7 -4
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -0
- package/dest/tagging/{sync → sender_sync}/utils/load_and_store_new_tagging_indexes.js +12 -7
- package/package.json +27 -18
- package/src/access_scopes.ts +9 -0
- package/src/bin/check_oracle_version.ts +1 -0
- package/src/block_synchronizer/block_synchronizer.ts +99 -46
- package/src/config/index.ts +14 -0
- 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 +363 -153
- package/src/contract_function_simulator/execution_note_cache.ts +44 -25
- 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/note_validation_request.ts +2 -2
- package/src/contract_function_simulator/noir-structs/utility_context.ts +6 -25
- package/src/contract_function_simulator/oracle/interfaces.ts +22 -12
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +10 -10
- package/src/contract_function_simulator/oracle/oracle.ts +79 -47
- package/src/contract_function_simulator/oracle/private_execution.ts +1 -69
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +121 -135
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +217 -132
- package/src/contract_function_simulator/proxied_contract_data_source.ts +7 -7
- package/src/contract_logging.ts +39 -0
- package/src/contract_sync/contract_sync_service.ts +152 -0
- package/src/contract_sync/helpers.ts +98 -0
- package/src/debug/pxe_debug_utils.ts +65 -20
- package/src/entrypoints/client/bundle/index.ts +3 -0
- package/src/entrypoints/client/bundle/utils.ts +23 -16
- package/src/entrypoints/client/lazy/index.ts +3 -0
- package/src/entrypoints/client/lazy/utils.ts +24 -17
- package/src/entrypoints/pxe_creation_options.ts +4 -2
- package/src/entrypoints/server/index.ts +4 -0
- package/src/entrypoints/server/utils.ts +33 -41
- package/src/error_enriching.ts +7 -15
- package/src/events/event_service.ts +22 -28
- package/src/events/private_event_filter_validator.ts +4 -6
- package/src/job_coordinator/job_coordinator.ts +150 -0
- package/src/logs/log_service.ts +118 -274
- package/src/notes/note_service.ts +45 -49
- package/src/notes_filter.ts +26 -0
- package/src/oracle_version.ts +4 -3
- package/src/private_kernel/hints/{compute_tx_include_by_timestamp.ts → compute_tx_expiration_timestamp.ts} +13 -13
- package/src/private_kernel/hints/index.ts +2 -2
- package/src/private_kernel/hints/{build_private_kernel_reset_private_inputs.ts → private_kernel_reset_private_inputs_builder.ts} +196 -138
- package/src/private_kernel/hints/test_utils.ts +325 -0
- package/src/private_kernel/private_kernel_execution_prover.ts +27 -19
- package/src/private_kernel/private_kernel_oracle.ts +116 -36
- package/src/pxe.ts +331 -257
- package/src/storage/{address_data_provider/address_data_provider.ts → address_store/address_store.ts} +16 -16
- package/src/storage/address_store/index.ts +1 -0
- package/src/storage/{anchor_block_data_provider/anchor_block_data_provider.ts → anchor_block_store/anchor_block_store.ts} +9 -1
- 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_store/contract_store.ts +429 -0
- package/src/storage/contract_store/index.ts +1 -0
- package/src/storage/index.ts +7 -7
- package/src/storage/metadata.ts +1 -1
- package/src/storage/note_store/index.ts +2 -0
- package/src/storage/note_store/note_store.ts +418 -0
- package/src/storage/note_store/stored_note.ts +48 -0
- package/src/storage/private_event_store/private_event_store.ts +384 -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 +139 -0
- package/src/storage/tagging_store/sender_address_book_store.ts +48 -0
- package/src/storage/tagging_store/sender_tagging_store.ts +429 -0
- package/src/tagging/constants.ts +10 -3
- package/src/tagging/get_all_logs_by_tags.ts +92 -0
- package/src/tagging/index.ts +17 -2
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +27 -13
- package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +2 -2
- package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +7 -1
- package/src/tagging/{sync → sender_sync}/sync_sender_tagging_indexes.ts +12 -25
- package/src/tagging/{sync → sender_sync}/utils/get_status_change_of_pending.ts +5 -13
- package/src/tagging/{sync → sender_sync}/utils/load_and_store_new_tagging_indexes.ts +19 -7
- 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/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/hints/compute_tx_include_by_timestamp.d.ts +0 -4
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +0 -1
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts +0 -46
- 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/public_storage/public_storage_service.d.ts +0 -24
- package/dest/public_storage/public_storage_service.d.ts.map +0 -1
- package/dest/public_storage/public_storage_service.js +0 -26
- 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/anchor_block_data_provider/anchor_block_data_provider.d.ts +0 -9
- package/dest/storage/anchor_block_data_provider/anchor_block_data_provider.d.ts.map +0 -1
- package/dest/storage/anchor_block_data_provider/index.d.ts +0 -2
- package/dest/storage/anchor_block_data_provider/index.d.ts.map +0 -1
- package/dest/storage/anchor_block_data_provider/index.js +0 -1
- package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +0 -57
- 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 -146
- 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 +0 -66
- package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +0 -1
- package/dest/storage/contract_data_provider/contract_data_provider.js +0 -224
- 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 -84
- 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 -322
- package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +0 -51
- 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 -115
- package/dest/storage/tagging_data_provider/index.d.ts +0 -3
- package/dest/storage/tagging_data_provider/index.d.ts.map +0 -1
- package/dest/storage/tagging_data_provider/index.js +0 -2
- package/dest/storage/tagging_data_provider/recipient_tagging_data_provider.d.ts +0 -31
- package/dest/storage/tagging_data_provider/recipient_tagging_data_provider.d.ts.map +0 -1
- package/dest/storage/tagging_data_provider/recipient_tagging_data_provider.js +0 -65
- package/dest/storage/tagging_data_provider/sender_tagging_data_provider.d.ts.map +0 -1
- package/dest/storage/tagging_data_provider/sender_tagging_data_provider.js +0 -196
- package/dest/tagging/recipient_sync/new_recipient_tagging_data_provider.d.ts +0 -21
- package/dest/tagging/recipient_sync/new_recipient_tagging_data_provider.d.ts.map +0 -1
- package/dest/tagging/recipient_sync/new_recipient_tagging_data_provider.js +0 -42
- package/dest/tagging/sync/sync_sender_tagging_indexes.d.ts.map +0 -1
- package/dest/tagging/sync/utils/get_status_change_of_pending.d.ts.map +0 -1
- package/dest/tagging/sync/utils/load_and_store_new_tagging_indexes.d.ts.map +0 -1
- package/dest/tagging/utils.d.ts +0 -18
- package/dest/tagging/utils.d.ts.map +0 -1
- package/dest/tagging/utils.js +0 -25
- package/dest/tree_membership/tree_membership_service.d.ts +0 -52
- package/dest/tree_membership/tree_membership_service.d.ts.map +0 -1
- package/dest/tree_membership/tree_membership_service.js +0 -84
- package/src/contract_function_simulator/proxied_node.ts +0 -33
- package/src/private_kernel/private_kernel_oracle_impl.ts +0 -133
- package/src/public_storage/public_storage_service.ts +0 -33
- package/src/storage/address_data_provider/index.ts +0 -1
- package/src/storage/anchor_block_data_provider/index.ts +0 -1
- package/src/storage/capsule_data_provider/capsule_data_provider.ts +0 -179
- package/src/storage/capsule_data_provider/index.ts +0 -1
- package/src/storage/contract_data_provider/contract_data_provider.ts +0 -319
- 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 -412
- package/src/storage/private_event_data_provider/private_event_data_provider.ts +0 -162
- package/src/storage/tagging_data_provider/index.ts +0 -2
- package/src/storage/tagging_data_provider/recipient_tagging_data_provider.ts +0 -86
- package/src/storage/tagging_data_provider/sender_tagging_data_provider.ts +0 -244
- package/src/tagging/recipient_sync/new_recipient_tagging_data_provider.ts +0 -53
- package/src/tagging/utils.ts +0 -32
- package/src/tree_membership/tree_membership_service.ts +0 -112
- /package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.js +0 -0
- /package/src/storage/{contract_data_provider → contract_store}/private_functions_tree.ts +0 -0
package/dest/logs/log_service.js
CHANGED
|
@@ -1,239 +1,118 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
2
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
+
import { DirectionalAppTaggingSecret, PendingTaggedLog, SiloedTag } from '@aztec/stdlib/logs';
|
|
2
4
|
import { LogRetrievalResponse } from '../contract_function_simulator/noir-structs/log_retrieval_response.js';
|
|
3
|
-
import {
|
|
4
|
-
import { getInitialIndexesMap, getPreTagsForTheWindow } from '../tagging/utils.js';
|
|
5
|
+
import { getAllPrivateLogsByTags, getAllPublicLogsByTagsFromContract, loadPrivateLogsForSenderRecipientPair } from '../tagging/index.js';
|
|
5
6
|
export class LogService {
|
|
6
7
|
aztecNode;
|
|
7
|
-
|
|
8
|
+
anchorBlockHeader;
|
|
8
9
|
keyStore;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
capsuleStore;
|
|
11
|
+
recipientTaggingStore;
|
|
12
|
+
senderAddressBookStore;
|
|
13
|
+
addressStore;
|
|
14
|
+
jobId;
|
|
15
|
+
log;
|
|
16
|
+
constructor(aztecNode, anchorBlockHeader, keyStore, capsuleStore, recipientTaggingStore, senderAddressBookStore, addressStore, jobId, bindings){
|
|
13
17
|
this.aztecNode = aztecNode;
|
|
14
|
-
this.
|
|
18
|
+
this.anchorBlockHeader = anchorBlockHeader;
|
|
15
19
|
this.keyStore = keyStore;
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
20
|
+
this.capsuleStore = capsuleStore;
|
|
21
|
+
this.recipientTaggingStore = recipientTaggingStore;
|
|
22
|
+
this.senderAddressBookStore = senderAddressBookStore;
|
|
23
|
+
this.addressStore = addressStore;
|
|
24
|
+
this.jobId = jobId;
|
|
25
|
+
this.log = createLogger('pxe:log_service', bindings);
|
|
19
26
|
}
|
|
20
27
|
async bulkRetrieveLogs(logRetrievalRequests) {
|
|
21
28
|
return await Promise.all(logRetrievalRequests.map(async (request)=>{
|
|
22
|
-
// TODO(F-231): remove these internal functions and have node endpoints that do this instead
|
|
23
29
|
const [publicLog, privateLog] = await Promise.all([
|
|
24
|
-
this
|
|
25
|
-
this
|
|
30
|
+
this.#getPublicLogByTag(request.tag, request.contractAddress),
|
|
31
|
+
this.#getPrivateLogByTag(await SiloedTag.compute(request.tag, request.contractAddress))
|
|
26
32
|
]);
|
|
27
|
-
if (publicLog !== null) {
|
|
28
|
-
|
|
29
|
-
throw new Error(`Found both a public and private log when searching for tag ${request.tag} from contract ${request.contractAddress}`);
|
|
30
|
-
}
|
|
31
|
-
return new LogRetrievalResponse(publicLog.logPayload, publicLog.txHash, publicLog.uniqueNoteHashesInTx, publicLog.firstNullifierInTx);
|
|
32
|
-
} else if (privateLog !== null) {
|
|
33
|
-
return new LogRetrievalResponse(privateLog.logPayload, privateLog.txHash, privateLog.uniqueNoteHashesInTx, privateLog.firstNullifierInTx);
|
|
34
|
-
} else {
|
|
35
|
-
return null;
|
|
33
|
+
if (publicLog !== null && privateLog !== null) {
|
|
34
|
+
throw new Error(`Found both a public and private log when searching for tag ${request.tag} from contract ${request.contractAddress}`);
|
|
36
35
|
}
|
|
36
|
+
return publicLog ?? privateLog;
|
|
37
37
|
}));
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const
|
|
39
|
+
async #getPublicLogByTag(tag, contractAddress) {
|
|
40
|
+
const anchorBlockHash = await this.anchorBlockHeader.hash();
|
|
41
|
+
const allLogsPerTag = await getAllPublicLogsByTagsFromContract(this.aztecNode, contractAddress, [
|
|
42
42
|
tag
|
|
43
|
-
]);
|
|
44
|
-
const logsForTag =
|
|
45
|
-
if (logsForTag.length
|
|
43
|
+
], anchorBlockHash);
|
|
44
|
+
const logsForTag = allLogsPerTag[0];
|
|
45
|
+
if (logsForTag.length === 0) {
|
|
46
46
|
return null;
|
|
47
47
|
} else if (logsForTag.length > 1) {
|
|
48
48
|
// TODO(#11627): handle this case
|
|
49
49
|
throw new Error(`Got ${logsForTag.length} logs for tag ${tag} and contract ${contractAddress.toString()}. getPublicLogByTag currently only supports a single log per tag`);
|
|
50
50
|
}
|
|
51
51
|
const scopedLog = logsForTag[0];
|
|
52
|
-
|
|
53
|
-
// we need to make a second call to the node for `getTxEffect`.
|
|
54
|
-
// TODO(#9789): bundle this information in the `getLogsByTag` call.
|
|
55
|
-
const txEffect = await this.aztecNode.getTxEffect(scopedLog.txHash);
|
|
56
|
-
if (txEffect == undefined) {
|
|
57
|
-
throw new Error(`Unexpected: failed to retrieve tx effects for tx ${scopedLog.txHash} which is known to exist`);
|
|
58
|
-
}
|
|
59
|
-
return new PublicLogWithTxData(scopedLog.log.getEmittedFieldsWithoutTag(), scopedLog.txHash, txEffect.data.noteHashes, txEffect.data.nullifiers[0]);
|
|
52
|
+
return new LogRetrievalResponse(scopedLog.logData.slice(1), scopedLog.txHash, scopedLog.noteHashes, scopedLog.firstNullifier);
|
|
60
53
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const
|
|
54
|
+
async #getPrivateLogByTag(siloedTag) {
|
|
55
|
+
const anchorBlockHash = await this.anchorBlockHeader.hash();
|
|
56
|
+
const allLogsPerTag = await getAllPrivateLogsByTags(this.aztecNode, [
|
|
64
57
|
siloedTag
|
|
65
|
-
]);
|
|
66
|
-
const logsForTag =
|
|
67
|
-
if (logsForTag.length
|
|
58
|
+
], anchorBlockHash);
|
|
59
|
+
const logsForTag = allLogsPerTag[0];
|
|
60
|
+
if (logsForTag.length === 0) {
|
|
68
61
|
return null;
|
|
69
62
|
} else if (logsForTag.length > 1) {
|
|
70
63
|
// TODO(#11627): handle this case
|
|
71
64
|
throw new Error(`Got ${logsForTag.length} logs for tag ${siloedTag}. getPrivateLogByTag currently only supports a single log per tag`);
|
|
72
65
|
}
|
|
73
66
|
const scopedLog = logsForTag[0];
|
|
74
|
-
|
|
75
|
-
// we need to make a second call to the node for `getTxEffect`.
|
|
76
|
-
// TODO(#9789): bundle this information in the `getLogsByTag` call.
|
|
77
|
-
const txEffect = await this.aztecNode.getTxEffect(scopedLog.txHash);
|
|
78
|
-
if (txEffect == undefined) {
|
|
79
|
-
throw new Error(`Unexpected: failed to retrieve tx effects for tx ${scopedLog.txHash} which is known to exist`);
|
|
80
|
-
}
|
|
81
|
-
return new PrivateLogWithTxData(scopedLog.log.getEmittedFieldsWithoutTag(), scopedLog.txHash, txEffect.data.noteHashes, txEffect.data.nullifiers[0]);
|
|
67
|
+
return new LogRetrievalResponse(scopedLog.logData.slice(1), scopedLog.txHash, scopedLog.noteHashes, scopedLog.firstNullifier);
|
|
82
68
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
//
|
|
89
|
-
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
//
|
|
96
|
-
const
|
|
97
|
-
//
|
|
98
|
-
|
|
99
|
-
//
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
// for logs the first time we don't receive any logs for a tag, we might never receive anything from that sender again.
|
|
103
|
-
// Also there's a possibility that we have advanced our index, but the sender has reused it, so we might have missed
|
|
104
|
-
// some logs. For these reasons, we have to look both back and ahead of the stored index.
|
|
105
|
-
let secretsAndWindows = indexedSecrets.map((indexedSecret)=>{
|
|
106
|
-
if (indexedSecret.index === undefined) {
|
|
107
|
-
return {
|
|
108
|
-
secret: indexedSecret.secret,
|
|
109
|
-
leftMostIndex: 0,
|
|
110
|
-
rightMostIndex: WINDOW_HALF_SIZE
|
|
111
|
-
};
|
|
112
|
-
} else {
|
|
113
|
-
return {
|
|
114
|
-
secret: indexedSecret.secret,
|
|
115
|
-
leftMostIndex: Math.max(0, indexedSecret.index - WINDOW_HALF_SIZE),
|
|
116
|
-
rightMostIndex: indexedSecret.index + WINDOW_HALF_SIZE
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
// As we iterate we store the largest index we have seen for a given secret to later on store it in the db.
|
|
121
|
-
const newLargestIndexMapToStore = {};
|
|
122
|
-
// The initial/unmodified indexes of the secrets stored in a key-value map where key is the directional app
|
|
123
|
-
// tagging secret.
|
|
124
|
-
const initialIndexesMap = getInitialIndexesMap(indexedSecrets);
|
|
125
|
-
while(secretsAndWindows.length > 0){
|
|
126
|
-
const preTagsForTheWholeWindow = getPreTagsForTheWindow(secretsAndWindows);
|
|
127
|
-
const tagsForTheWholeWindow = await Promise.all(preTagsForTheWholeWindow.map(async (preTag)=>{
|
|
128
|
-
return SiloedTag.compute(await Tag.compute(preTag), contractAddress);
|
|
129
|
-
}));
|
|
130
|
-
// We store the new largest indexes we find in the iteration in the following map to later on construct
|
|
131
|
-
// a new set of secrets and windows to fetch logs for.
|
|
132
|
-
const newLargestIndexMapForIteration = {};
|
|
133
|
-
// Fetch the private logs for the tags and iterate over them
|
|
134
|
-
const logsByTags = await this.aztecNode.getPrivateLogsByTags(tagsForTheWholeWindow);
|
|
135
|
-
for(let logIndex = 0; logIndex < logsByTags.length; logIndex++){
|
|
136
|
-
const logsByTag = logsByTags[logIndex];
|
|
137
|
-
if (logsByTag.length > 0) {
|
|
138
|
-
// We filter out the logs that are newer than the anchor block number of the tx currently being constructed
|
|
139
|
-
const filteredLogsByBlockNumber = logsByTag.filter((l)=>l.blockNumber <= maxBlockNumber);
|
|
140
|
-
// We store the logs in capsules (to later be obtained in Noir)
|
|
141
|
-
await this.#storePendingTaggedLogs(contractAddress, pendingTaggedLogArrayBaseSlot, recipient, filteredLogsByBlockNumber);
|
|
142
|
-
// We retrieve the pre-tag corresponding to the log as I need that to evaluate whether
|
|
143
|
-
// a new largest index have been found.
|
|
144
|
-
const preTagCorrespondingToLog = preTagsForTheWholeWindow[logIndex];
|
|
145
|
-
const initialIndex = initialIndexesMap[preTagCorrespondingToLog.secret.toString()];
|
|
146
|
-
if (preTagCorrespondingToLog.index >= initialIndex && (newLargestIndexMapForIteration[preTagCorrespondingToLog.secret.toString()] === undefined || preTagCorrespondingToLog.index >= newLargestIndexMapForIteration[preTagCorrespondingToLog.secret.toString()])) {
|
|
147
|
-
// We have found a new largest index so we store it for later processing (storing it in the db + fetching
|
|
148
|
-
// the difference of the window sets of current and the next iteration)
|
|
149
|
-
newLargestIndexMapForIteration[preTagCorrespondingToLog.secret.toString()] = preTagCorrespondingToLog.index + 1;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
// Now based on the new largest indexes we found, we will construct a new secrets and windows set to fetch logs
|
|
154
|
-
// for. Note that it's very unlikely that a new log from the current window would appear between the iterations
|
|
155
|
-
// so we fetch the logs only for the difference of the window sets.
|
|
156
|
-
const newSecretsAndWindows = [];
|
|
157
|
-
for (const [directionalAppTaggingSecret, newIndex] of Object.entries(newLargestIndexMapForIteration)){
|
|
158
|
-
const maybeIndexedSecret = indexedSecrets.find((indexedSecret)=>indexedSecret.secret.toString() === directionalAppTaggingSecret);
|
|
159
|
-
if (maybeIndexedSecret) {
|
|
160
|
-
newSecretsAndWindows.push({
|
|
161
|
-
secret: maybeIndexedSecret.secret,
|
|
162
|
-
// We set the left most index to the new index to avoid fetching the same logs again
|
|
163
|
-
leftMostIndex: newIndex,
|
|
164
|
-
rightMostIndex: newIndex + WINDOW_HALF_SIZE
|
|
165
|
-
});
|
|
166
|
-
// We store the new largest index in the map to later store it in the db.
|
|
167
|
-
newLargestIndexMapToStore[directionalAppTaggingSecret] = newIndex;
|
|
168
|
-
} else {
|
|
169
|
-
throw new Error(`Secret not found for directionalAppTaggingSecret ${directionalAppTaggingSecret}. This is a bug as it should never happen!`);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
// Now we set the new secrets and windows and proceed to the next iteration.
|
|
173
|
-
secretsAndWindows = newSecretsAndWindows;
|
|
69
|
+
async fetchTaggedLogs(contractAddress, pendingTaggedLogArrayBaseSlot, scopes) {
|
|
70
|
+
this.log.verbose(`Fetching tagged logs for ${contractAddress.toString()}`);
|
|
71
|
+
// We only load logs from block up to and including the anchor block number
|
|
72
|
+
const anchorBlockNumber = this.anchorBlockHeader.getBlockNumber();
|
|
73
|
+
const anchorBlockHash = await this.anchorBlockHeader.hash();
|
|
74
|
+
// Determine recipients: use scopes if provided, otherwise get all accounts
|
|
75
|
+
const recipients = scopes !== 'ALL_SCOPES' && scopes.length > 0 ? scopes : await this.keyStore.getAccounts();
|
|
76
|
+
// For each recipient, fetch secrets, load logs, and store them.
|
|
77
|
+
// We run these per-recipient tasks in parallel so that logs are loaded for all recipients concurrently.
|
|
78
|
+
await Promise.all(recipients.map(async (recipient)=>{
|
|
79
|
+
// Get all secrets for this recipient (one per sender)
|
|
80
|
+
const secrets = await this.#getSecretsForSenders(contractAddress, recipient);
|
|
81
|
+
// Load logs for all sender-recipient pairs in parallel
|
|
82
|
+
const logArrays = await Promise.all(secrets.map((secret)=>loadPrivateLogsForSenderRecipientPair(secret, contractAddress, this.aztecNode, this.recipientTaggingStore, anchorBlockNumber, anchorBlockHash, this.jobId)));
|
|
83
|
+
// Flatten all logs from all secrets
|
|
84
|
+
const allLogs = logArrays.flat();
|
|
85
|
+
// Store the logs for this recipient
|
|
86
|
+
if (allLogs.length > 0) {
|
|
87
|
+
await this.#storePendingTaggedLogs(contractAddress, pendingTaggedLogArrayBaseSlot, recipient, allLogs);
|
|
174
88
|
}
|
|
175
|
-
|
|
176
|
-
// newLargestIndexMapToStore contains "next" indexes to look for (one past the last found), so subtract 1 to get
|
|
177
|
-
// last used.
|
|
178
|
-
await this.recipientTaggingDataProvider.setLastUsedIndexes(Object.entries(newLargestIndexMapToStore).map(([directionalAppTaggingSecret, index])=>({
|
|
179
|
-
secret: DirectionalAppTaggingSecret.fromString(directionalAppTaggingSecret),
|
|
180
|
-
index: index - 1
|
|
181
|
-
})));
|
|
182
|
-
}
|
|
89
|
+
}));
|
|
183
90
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
* so we're keeping it private for now.
|
|
190
|
-
* @param contractAddress - The contract address to silo the secret for
|
|
191
|
-
* @param recipient - The address receiving the notes
|
|
192
|
-
* @returns A list of directional app tagging secrets along with the last used tagging indexes. If the corresponding
|
|
193
|
-
* secret was never used, the index is undefined.
|
|
194
|
-
* TODO(#17775): The naming here is broken as the function name does not reflect the return type. Make sure this gets
|
|
195
|
-
* fixed when implementing the linked issue.
|
|
196
|
-
*/ async getLastUsedTaggingIndexesForSenders(contractAddress, recipient) {
|
|
197
|
-
const recipientCompleteAddress = await this.#getCompleteAddress(recipient);
|
|
91
|
+
async #getSecretsForSenders(contractAddress, recipient) {
|
|
92
|
+
const recipientCompleteAddress = await this.addressStore.getCompleteAddress(recipient);
|
|
93
|
+
if (!recipientCompleteAddress) {
|
|
94
|
+
return [];
|
|
95
|
+
}
|
|
198
96
|
const recipientIvsk = await this.keyStore.getMasterIncomingViewingSecretKey(recipient);
|
|
199
97
|
// We implicitly add all PXE accounts as senders, this helps us decrypt tags on notes that we send to ourselves
|
|
200
98
|
// (recipient = us, sender = us)
|
|
201
|
-
const
|
|
202
|
-
...await this.
|
|
99
|
+
const allSenders = [
|
|
100
|
+
...await this.senderAddressBookStore.getSenders(),
|
|
203
101
|
...await this.keyStore.getAccounts()
|
|
204
|
-
]
|
|
205
|
-
|
|
206
|
-
|
|
102
|
+
];
|
|
103
|
+
// We deduplicate the senders by adding them to a set and then converting the set back to an array
|
|
104
|
+
const deduplicatedSenders = Array.from(new Set(allSenders.map((sender)=>sender.toString()))).map((sender)=>AztecAddress.fromString(sender));
|
|
105
|
+
return Promise.all(deduplicatedSenders.map((sender)=>{
|
|
106
|
+
return DirectionalAppTaggingSecret.compute(recipientCompleteAddress, recipientIvsk, sender, contractAddress, recipient);
|
|
207
107
|
}));
|
|
208
|
-
const indexes = await this.recipientTaggingDataProvider.getLastUsedIndexes(secrets);
|
|
209
|
-
if (indexes.length !== secrets.length) {
|
|
210
|
-
throw new Error('Indexes and directional app tagging secrets have different lengths');
|
|
211
|
-
}
|
|
212
|
-
return secrets.map((secret, i)=>({
|
|
213
|
-
secret,
|
|
214
|
-
index: indexes[i]
|
|
215
|
-
}));
|
|
216
108
|
}
|
|
217
|
-
|
|
218
|
-
// Build all pending tagged logs
|
|
219
|
-
const pendingTaggedLogs =
|
|
220
|
-
|
|
221
|
-
const txEffect = await this.aztecNode.getTxEffect(scopedLog.txHash);
|
|
222
|
-
if (!txEffect) {
|
|
223
|
-
throw new Error(`Could not find tx effect for tx hash ${scopedLog.txHash}`);
|
|
224
|
-
}
|
|
225
|
-
const pendingTaggedLog = new PendingTaggedLog(scopedLog.log.fields, scopedLog.txHash, txEffect.data.noteHashes, txEffect.data.nullifiers[0], recipient);
|
|
109
|
+
#storePendingTaggedLogs(contractAddress, capsuleArrayBaseSlot, recipient, privateLogs) {
|
|
110
|
+
// Build all pending tagged logs from the scoped logs
|
|
111
|
+
const pendingTaggedLogs = privateLogs.map((scopedLog)=>{
|
|
112
|
+
const pendingTaggedLog = new PendingTaggedLog(scopedLog.logData, scopedLog.txHash, scopedLog.noteHashes, scopedLog.firstNullifier, recipient);
|
|
226
113
|
return pendingTaggedLog.toFields();
|
|
227
|
-
})
|
|
114
|
+
});
|
|
228
115
|
// TODO: This looks like it could belong more at the oracle interface level
|
|
229
|
-
return this.
|
|
230
|
-
}
|
|
231
|
-
async #getCompleteAddress(account) {
|
|
232
|
-
const completeAddress = await this.addressDataProvider.getCompleteAddress(account);
|
|
233
|
-
if (!completeAddress) {
|
|
234
|
-
throw new Error(`No public key registered for address ${account}.
|
|
235
|
-
Register it by calling pxe.addAccount(...).\nSee docs for context: https://docs.aztec.network/developers/resources/debugging/aztecnr-errors#simulation-error-no-public-key-registered-for-address-0x0-register-it-by-calling-pxeregisterrecipient-or-pxeregisteraccount`);
|
|
236
|
-
}
|
|
237
|
-
return completeAddress;
|
|
116
|
+
return this.capsuleStore.appendToCapsuleArray(contractAddress, capsuleArrayBaseSlot, pendingTaggedLogs, this.jobId);
|
|
238
117
|
}
|
|
239
118
|
}
|
|
@@ -2,14 +2,15 @@ import { Fr } from '@aztec/foundation/curves/bn254';
|
|
|
2
2
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
3
|
import { type AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
4
4
|
import { Note, NoteStatus } from '@aztec/stdlib/note';
|
|
5
|
-
import type { TxHash } from '@aztec/stdlib/tx';
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
5
|
+
import type { BlockHeader, TxHash } from '@aztec/stdlib/tx';
|
|
6
|
+
import type { AccessScopes } from '../access_scopes.js';
|
|
7
|
+
import type { NoteStore } from '../storage/note_store/note_store.js';
|
|
8
8
|
export declare class NoteService {
|
|
9
|
-
private readonly
|
|
9
|
+
private readonly noteStore;
|
|
10
10
|
private readonly aztecNode;
|
|
11
|
-
private readonly
|
|
12
|
-
|
|
11
|
+
private readonly anchorBlockHeader;
|
|
12
|
+
private readonly jobId;
|
|
13
|
+
constructor(noteStore: NoteStore, aztecNode: AztecNode, anchorBlockHeader: BlockHeader, jobId: string);
|
|
13
14
|
/**
|
|
14
15
|
* Retrieves a set of notes stored in the database for a given contract address and storage slot.
|
|
15
16
|
* The query result is paginated using 'limit' and 'offset' values.
|
|
@@ -19,7 +20,7 @@ export declare class NoteService {
|
|
|
19
20
|
* @param status - The status of notes to fetch.
|
|
20
21
|
* @param scopes - The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
21
22
|
*/
|
|
22
|
-
getNotes(contractAddress: AztecAddress, owner: AztecAddress | undefined, storageSlot: Fr, status: NoteStatus, scopes
|
|
23
|
+
getNotes(contractAddress: AztecAddress, owner: AztecAddress | undefined, storageSlot: Fr, status: NoteStatus, scopes: AccessScopes): Promise<{
|
|
23
24
|
contractAddress: AztecAddress;
|
|
24
25
|
owner: AztecAddress;
|
|
25
26
|
storageSlot: Fr;
|
|
@@ -27,13 +28,13 @@ export declare class NoteService {
|
|
|
27
28
|
noteNonce: Fr;
|
|
28
29
|
note: Note;
|
|
29
30
|
noteHash: Fr;
|
|
31
|
+
isPending: boolean;
|
|
30
32
|
siloedNullifier: Fr;
|
|
31
|
-
index: bigint;
|
|
32
33
|
}[]>;
|
|
33
34
|
/**
|
|
34
35
|
* Looks for nullifiers of active contract notes and marks them as nullified if a nullifier is found.
|
|
35
36
|
*
|
|
36
|
-
* Fetches notes from the
|
|
37
|
+
* Fetches notes from the NoteStore and checks which nullifiers are present in the
|
|
37
38
|
* onchain nullifier Merkle tree - up to the latest locally synced block. We use the
|
|
38
39
|
* locally synced block instead of querying the chain's 'latest' block to ensure correctness:
|
|
39
40
|
* notes are only marked nullified once their corresponding nullifier has been included in a
|
|
@@ -42,7 +43,7 @@ export declare class NoteService {
|
|
|
42
43
|
*
|
|
43
44
|
* @param contractAddress - The contract whose notes should be checked and nullified.
|
|
44
45
|
*/
|
|
45
|
-
syncNoteNullifiers(contractAddress: AztecAddress): Promise<void>;
|
|
46
|
-
|
|
46
|
+
syncNoteNullifiers(contractAddress: AztecAddress, scopes: AccessScopes): Promise<void>;
|
|
47
|
+
validateAndStoreNote(contractAddress: AztecAddress, owner: AztecAddress, storageSlot: Fr, randomness: Fr, noteNonce: Fr, content: Fr[], noteHash: Fr, nullifier: Fr, txHash: TxHash, recipient: AztecAddress): Promise<void>;
|
|
47
48
|
}
|
|
48
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90ZV9zZXJ2aWNlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbm90ZXMvbm90ZV9zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUdoRSxPQUFPLEVBQUUsS0FBSyxTQUFTLEVBQWUsTUFBTSxpQ0FBaUMsQ0FBQztBQUM5RSxPQUFPLEVBQUUsSUFBSSxFQUFXLFVBQVUsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRS9ELE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUU1RCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUN4RCxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxxQ0FBcUMsQ0FBQztBQUVyRSxxQkFBYSxXQUFXO0lBRXBCLE9BQU8sQ0FBQyxRQUFRLENBQUMsU0FBUztJQUMxQixPQUFPLENBQUMsUUFBUSxDQUFDLFNBQVM7SUFDMUIsT0FBTyxDQUFDLFFBQVEsQ0FBQyxpQkFBaUI7SUFDbEMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxLQUFLO0lBSnhCLFlBQ21CLFNBQVMsRUFBRSxTQUFTLEVBQ3BCLFNBQVMsRUFBRSxTQUFTLEVBQ3BCLGlCQUFpQixFQUFFLFdBQVcsRUFDOUIsS0FBSyxFQUFFLE1BQU0sRUFDNUI7SUFFSjs7Ozs7Ozs7T0FRRztJQUNVLFFBQVEsQ0FDbkIsZUFBZSxFQUFFLFlBQVksRUFDN0IsS0FBSyxFQUFFLFlBQVksR0FBRyxTQUFTLEVBQy9CLFdBQVcsRUFBRSxFQUFFLEVBQ2YsTUFBTSxFQUFFLFVBQVUsRUFDbEIsTUFBTSxFQUFFLFlBQVk7Ozs7Ozs7Ozs7U0F5QnJCO0lBRUQ7Ozs7Ozs7Ozs7O09BV0c7SUFDVSxrQkFBa0IsQ0FBQyxlQUFlLEVBQUUsWUFBWSxFQUFFLE1BQU0sRUFBRSxZQUFZLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQXNDbEc7SUFFWSxvQkFBb0IsQ0FDL0IsZUFBZSxFQUFFLFlBQVksRUFDN0IsS0FBSyxFQUFFLFlBQVksRUFDbkIsV0FBVyxFQUFFLEVBQUUsRUFDZixVQUFVLEVBQUUsRUFBRSxFQUNkLFNBQVMsRUFBRSxFQUFFLEVBQ2IsT0FBTyxFQUFFLEVBQUUsRUFBRSxFQUNiLFFBQVEsRUFBRSxFQUFFLEVBQ1osU0FBUyxFQUFFLEVBQUUsRUFDYixNQUFNLEVBQUUsTUFBTSxFQUNkLFNBQVMsRUFBRSxZQUFZLEdBQ3RCLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FzRWY7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"note_service.d.ts","sourceRoot":"","sources":["../../src/notes/note_service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAW,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"note_service.d.ts","sourceRoot":"","sources":["../../src/notes/note_service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAW,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAErE,qBAAa,WAAW;IAEpB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK;IAJxB,YACmB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,WAAW,EAC9B,KAAK,EAAE,MAAM,EAC5B;IAEJ;;;;;;;;OAQG;IACU,QAAQ,CACnB,eAAe,EAAE,YAAY,EAC7B,KAAK,EAAE,YAAY,GAAG,SAAS,EAC/B,WAAW,EAAE,EAAE,EACf,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,YAAY;;;;;;;;;;SAyBrB;IAED;;;;;;;;;;;OAWG;IACU,kBAAkB,CAAC,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAsClG;IAEY,oBAAoB,CAC/B,eAAe,EAAE,YAAY,EAC7B,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,EAAE,EACf,UAAU,EAAE,EAAE,EACd,SAAS,EAAE,EAAE,EACb,OAAO,EAAE,EAAE,EAAE,EACb,QAAQ,EAAE,EAAE,EACZ,SAAS,EAAE,EAAE,EACb,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,IAAI,CAAC,CAsEf;CACF"}
|
|
@@ -3,13 +3,15 @@ import { MAX_RPC_LEN } from '@aztec/stdlib/interfaces/client';
|
|
|
3
3
|
import { Note, NoteDao } from '@aztec/stdlib/note';
|
|
4
4
|
import { MerkleTreeId } from '@aztec/stdlib/trees';
|
|
5
5
|
export class NoteService {
|
|
6
|
-
|
|
6
|
+
noteStore;
|
|
7
7
|
aztecNode;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
anchorBlockHeader;
|
|
9
|
+
jobId;
|
|
10
|
+
constructor(noteStore, aztecNode, anchorBlockHeader, jobId){
|
|
11
|
+
this.noteStore = noteStore;
|
|
11
12
|
this.aztecNode = aztecNode;
|
|
12
|
-
this.
|
|
13
|
+
this.anchorBlockHeader = anchorBlockHeader;
|
|
14
|
+
this.jobId = jobId;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* Retrieves a set of notes stored in the database for a given contract address and storage slot.
|
|
@@ -20,14 +22,14 @@ export class NoteService {
|
|
|
20
22
|
* @param status - The status of notes to fetch.
|
|
21
23
|
* @param scopes - The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
22
24
|
*/ async getNotes(contractAddress, owner, storageSlot, status, scopes) {
|
|
23
|
-
const noteDaos = await this.
|
|
25
|
+
const noteDaos = await this.noteStore.getNotes({
|
|
24
26
|
contractAddress,
|
|
25
27
|
owner,
|
|
26
28
|
storageSlot,
|
|
27
29
|
status,
|
|
28
30
|
scopes
|
|
29
|
-
});
|
|
30
|
-
return noteDaos.map(({ contractAddress, owner, storageSlot, randomness, noteNonce, note, noteHash, siloedNullifier
|
|
31
|
+
}, this.jobId);
|
|
32
|
+
return noteDaos.map(({ contractAddress, owner, storageSlot, randomness, noteNonce, note, noteHash, siloedNullifier })=>({
|
|
31
33
|
contractAddress,
|
|
32
34
|
owner,
|
|
33
35
|
storageSlot,
|
|
@@ -35,15 +37,14 @@ export class NoteService {
|
|
|
35
37
|
noteNonce,
|
|
36
38
|
note,
|
|
37
39
|
noteHash,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
index
|
|
40
|
+
isPending: false,
|
|
41
|
+
siloedNullifier
|
|
41
42
|
}));
|
|
42
43
|
}
|
|
43
44
|
/**
|
|
44
45
|
* Looks for nullifiers of active contract notes and marks them as nullified if a nullifier is found.
|
|
45
46
|
*
|
|
46
|
-
* Fetches notes from the
|
|
47
|
+
* Fetches notes from the NoteStore and checks which nullifiers are present in the
|
|
47
48
|
* onchain nullifier Merkle tree - up to the latest locally synced block. We use the
|
|
48
49
|
* locally synced block instead of querying the chain's 'latest' block to ensure correctness:
|
|
49
50
|
* notes are only marked nullified once their corresponding nullifier has been included in a
|
|
@@ -51,11 +52,12 @@ export class NoteService {
|
|
|
51
52
|
* This allows recent nullifications to be processed even if the node is not an archive node.
|
|
52
53
|
*
|
|
53
54
|
* @param contractAddress - The contract whose notes should be checked and nullified.
|
|
54
|
-
*/ async syncNoteNullifiers(contractAddress) {
|
|
55
|
-
const
|
|
56
|
-
const contractNotes = await this.
|
|
57
|
-
contractAddress
|
|
58
|
-
|
|
55
|
+
*/ async syncNoteNullifiers(contractAddress, scopes) {
|
|
56
|
+
const anchorBlockHash = await this.anchorBlockHeader.hash();
|
|
57
|
+
const contractNotes = await this.noteStore.getNotes({
|
|
58
|
+
contractAddress,
|
|
59
|
+
scopes
|
|
60
|
+
}, this.jobId);
|
|
59
61
|
if (contractNotes.length === 0) {
|
|
60
62
|
return;
|
|
61
63
|
}
|
|
@@ -72,7 +74,7 @@ export class NoteService {
|
|
|
72
74
|
}, [
|
|
73
75
|
[]
|
|
74
76
|
]);
|
|
75
|
-
const nullifierIndexes = (await Promise.all(nullifierBatches.map((batch)=>this.aztecNode.findLeavesIndexes(
|
|
77
|
+
const nullifierIndexes = (await Promise.all(nullifierBatches.map((batch)=>this.aztecNode.findLeavesIndexes(anchorBlockHash, MerkleTreeId.NULLIFIER_TREE, batch)))).flat();
|
|
76
78
|
const foundNullifiers = nullifiersToCheck.map((nullifier, i)=>{
|
|
77
79
|
if (nullifierIndexes[i] !== undefined) {
|
|
78
80
|
return {
|
|
@@ -83,10 +85,10 @@ export class NoteService {
|
|
|
83
85
|
};
|
|
84
86
|
}
|
|
85
87
|
}).filter((nullifier)=>nullifier !== undefined);
|
|
86
|
-
await this.
|
|
88
|
+
await this.noteStore.applyNullifiers(foundNullifiers, this.jobId);
|
|
87
89
|
}
|
|
88
|
-
async
|
|
89
|
-
// We are going to store the new note in the
|
|
90
|
+
async validateAndStoreNote(contractAddress, owner, storageSlot, randomness, noteNonce, content, noteHash, nullifier, txHash, recipient) {
|
|
91
|
+
// We are going to store the new note in the NoteStore, which will let us later return it via `getNotes`.
|
|
90
92
|
// There's two things we need to check before we do this however:
|
|
91
93
|
// - we must make sure the note does actually exist in the note hash tree
|
|
92
94
|
// - we need to check if the note has already been nullified
|
|
@@ -104,49 +106,43 @@ export class NoteService {
|
|
|
104
106
|
// number which *should* be recent enough to be available, even for non-archive nodes.
|
|
105
107
|
// Also note that the note should never be ahead of the synced block here since `fetchTaggedLogs` only processes
|
|
106
108
|
// logs up to the synced block making this only an additional safety check.
|
|
107
|
-
const
|
|
109
|
+
const anchorBlockNumber = this.anchorBlockHeader.getBlockNumber();
|
|
110
|
+
const anchorBlockHash = await this.anchorBlockHeader.hash();
|
|
108
111
|
// By computing siloed and unique note hashes ourselves we prevent contracts from interfering with the note storage
|
|
109
112
|
// of other contracts, which would constitute a security breach.
|
|
110
113
|
const uniqueNoteHash = await computeUniqueNoteHash(noteNonce, await siloNoteHash(contractAddress, noteHash));
|
|
111
114
|
const siloedNullifier = await siloNullifier(contractAddress, nullifier);
|
|
112
|
-
const txEffect = await
|
|
115
|
+
const [txEffect, [nullifierIndex]] = await Promise.all([
|
|
116
|
+
this.aztecNode.getTxEffect(txHash),
|
|
117
|
+
this.aztecNode.findLeavesIndexes(anchorBlockHash, MerkleTreeId.NULLIFIER_TREE, [
|
|
118
|
+
siloedNullifier
|
|
119
|
+
])
|
|
120
|
+
]);
|
|
113
121
|
if (!txEffect) {
|
|
114
122
|
throw new Error(`Could not find tx effect for tx hash ${txHash}`);
|
|
115
123
|
}
|
|
116
|
-
if (txEffect.l2BlockNumber >
|
|
117
|
-
throw new Error(`Could not find tx effect for tx hash ${txHash} as of block number ${
|
|
124
|
+
if (txEffect.l2BlockNumber > anchorBlockNumber) {
|
|
125
|
+
throw new Error(`Could not find tx effect for tx hash ${txHash} as of block number ${anchorBlockNumber}`);
|
|
118
126
|
}
|
|
119
|
-
|
|
120
|
-
|
|
127
|
+
// Find the index of the note hash in the noteHashes array to determine note ordering within the tx
|
|
128
|
+
const noteIndexInTx = txEffect.data.noteHashes.findIndex((nh)=>nh.equals(uniqueNoteHash));
|
|
129
|
+
if (noteIndexInTx === -1) {
|
|
121
130
|
throw new Error(`Note hash ${noteHash} (uniqued as ${uniqueNoteHash}) is not present in tx ${txHash}`);
|
|
122
131
|
}
|
|
123
|
-
|
|
124
|
-
// note existence in said tree. We concurrently also check if the note's nullifier exists, performing all node
|
|
125
|
-
// queries in a single round-trip.
|
|
126
|
-
const [[uniqueNoteHashTreeIndexInBlock], [nullifierIndex]] = await Promise.all([
|
|
127
|
-
this.aztecNode.findLeavesIndexes(syncedBlockNumber, MerkleTreeId.NOTE_HASH_TREE, [
|
|
128
|
-
uniqueNoteHash
|
|
129
|
-
]),
|
|
130
|
-
this.aztecNode.findLeavesIndexes(syncedBlockNumber, MerkleTreeId.NULLIFIER_TREE, [
|
|
131
|
-
siloedNullifier
|
|
132
|
-
])
|
|
133
|
-
]);
|
|
134
|
-
if (uniqueNoteHashTreeIndexInBlock === undefined) {
|
|
135
|
-
throw new Error(`Note hash ${noteHash} (uniqued as ${uniqueNoteHash}) is not present on the tree at block ${syncedBlockNumber} (from tx ${txHash})`);
|
|
136
|
-
}
|
|
137
|
-
const noteDao = new NoteDao(new Note(content), contractAddress, owner, storageSlot, randomness, noteNonce, noteHash, siloedNullifier, txHash, uniqueNoteHashTreeIndexInBlock.l2BlockNumber, uniqueNoteHashTreeIndexInBlock.l2BlockHash.toString(), uniqueNoteHashTreeIndexInBlock.data);
|
|
132
|
+
const noteDao = new NoteDao(new Note(content), contractAddress, owner, storageSlot, randomness, noteNonce, noteHash, siloedNullifier, txHash, txEffect.l2BlockNumber, txEffect.l2BlockHash.toString(), txEffect.txIndexInBlock, noteIndexInTx);
|
|
138
133
|
// The note was found by `recipient`, so we use that as the scope when storing the note.
|
|
139
|
-
await this.
|
|
134
|
+
await this.noteStore.addNotes([
|
|
140
135
|
noteDao
|
|
141
|
-
], recipient);
|
|
136
|
+
], recipient, this.jobId);
|
|
142
137
|
if (nullifierIndex !== undefined) {
|
|
138
|
+
// We found nullifier index which implies that the note has already been nullified.
|
|
143
139
|
const { data: _, ...blockHashAndNum } = nullifierIndex;
|
|
144
|
-
await this.
|
|
140
|
+
await this.noteStore.applyNullifiers([
|
|
145
141
|
{
|
|
146
142
|
data: siloedNullifier,
|
|
147
143
|
...blockHashAndNum
|
|
148
144
|
}
|
|
149
|
-
]);
|
|
145
|
+
], this.jobId);
|
|
150
146
|
}
|
|
151
147
|
}
|
|
152
148
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
+
import type { NoteStatus } from '@aztec/stdlib/note';
|
|
4
|
+
import type { AccessScopes } from './access_scopes.js';
|
|
5
|
+
/**
|
|
6
|
+
* A filter used to fetch notes.
|
|
7
|
+
* @remarks This filter is applied as an intersection of all its params.
|
|
8
|
+
*/
|
|
9
|
+
export type NotesFilter = {
|
|
10
|
+
/**
|
|
11
|
+
* The contract address the note belongs to.
|
|
12
|
+
* @remarks Providing a contract address is required as we need that information to trigger private state sync.
|
|
13
|
+
*/
|
|
14
|
+
contractAddress: AztecAddress;
|
|
15
|
+
/** The owner of the note. */
|
|
16
|
+
owner?: AztecAddress;
|
|
17
|
+
/** The specific storage location of the note on the contract. */
|
|
18
|
+
storageSlot?: Fr;
|
|
19
|
+
/** The status of the note. Defaults to 'ACTIVE'. */
|
|
20
|
+
status?: NoteStatus;
|
|
21
|
+
/** The siloed nullifier for the note. */
|
|
22
|
+
siloedNullifier?: Fr;
|
|
23
|
+
scopes: AccessScopes;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90ZXNfZmlsdGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvbm90ZXNfZmlsdGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3pELE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLFVBQVUsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRXJELE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRXZEOzs7R0FHRztBQUNILE1BQU0sTUFBTSxXQUFXLEdBQUc7SUFDeEI7OztPQUdHO0lBQ0gsZUFBZSxFQUFFLFlBQVksQ0FBQztJQUM5Qiw2QkFBNkI7SUFDN0IsS0FBSyxDQUFDLEVBQUUsWUFBWSxDQUFDO0lBQ3JCLGlFQUFpRTtJQUNqRSxXQUFXLENBQUMsRUFBRSxFQUFFLENBQUM7SUFDakIsb0RBQW9EO0lBQ3BELE1BQU0sQ0FBQyxFQUFFLFVBQVUsQ0FBQztJQUNwQix5Q0FBeUM7SUFDekMsZUFBZSxDQUFDLEVBQUUsRUFBRSxDQUFDO0lBQ3JCLE1BQU0sRUFBRSxZQUFZLENBQUM7Q0FDdEIsQ0FBQyJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notes_filter.d.ts","sourceRoot":"","sources":["../src/notes_filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;;OAGG;IACH,eAAe,EAAE,YAAY,CAAC;IAC9B,6BAA6B;IAC7B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,iEAAiE;IACjE,WAAW,CAAC,EAAE,EAAE,CAAC;IACjB,oDAAoD;IACpD,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,yCAAyC;IACzC,eAAe,CAAC,EAAE,EAAE,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC"}
|
package/dest/oracle_version.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ORACLE_VERSION =
|
|
2
|
-
export declare const ORACLE_INTERFACE_HASH = "
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export declare const ORACLE_VERSION = 12;
|
|
2
|
+
export declare const ORACLE_INTERFACE_HASH = "666a8a7fc697f72b29dbf0ae7464db269cf5afa019acac8861f814543147dbb4";
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JhY2xlX3ZlcnNpb24uZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9vcmFjbGVfdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSxlQUFPLE1BQU0sY0FBYyxLQUFLLENBQUM7QUFLakMsZUFBTyxNQUFNLHFCQUFxQixxRUFBcUUsQ0FBQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oracle_version.d.ts","sourceRoot":"","sources":["../src/oracle_version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"oracle_version.d.ts","sourceRoot":"","sources":["../src/oracle_version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,KAAK,CAAC;AAKjC,eAAO,MAAM,qBAAqB,qEAAqE,CAAC"}
|