@aztec/pxe 0.0.1-commit.24de95ac → 0.0.1-commit.2606882
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.d.ts +1 -1
- package/dest/bin/check_oracle_version.js +54 -20
- package/dest/bin/index.d.ts +2 -0
- package/dest/bin/index.d.ts.map +1 -0
- package/dest/bin/index.js +1 -0
- package/dest/bin/oracle_version_helpers.d.ts +26 -0
- package/dest/bin/oracle_version_helpers.d.ts.map +1 -0
- package/dest/bin/oracle_version_helpers.js +93 -0
- package/dest/block_synchronizer/block_stream_source.d.ts +10 -0
- package/dest/block_synchronizer/block_stream_source.d.ts.map +1 -0
- package/dest/block_synchronizer/block_stream_source.js +62 -0
- package/dest/block_synchronizer/block_synchronizer.d.ts +49 -0
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -0
- package/dest/block_synchronizer/block_synchronizer.js +173 -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 +13 -13
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +24 -15
- package/dest/config/package_info.d.ts +1 -1
- 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 +89 -26
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +267 -88
- package/dest/contract_function_simulator/ephemeral_array_service.d.ts +28 -0
- package/dest/contract_function_simulator/ephemeral_array_service.d.ts.map +1 -0
- package/dest/contract_function_simulator/ephemeral_array_service.js +78 -0
- package/dest/contract_function_simulator/execution_note_cache.d.ts +26 -15
- package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_note_cache.js +59 -34
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +7 -11
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_tagging_index_cache.js +19 -15
- 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 +15 -3
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +12 -1
- package/dest/contract_function_simulator/noir-structs/bounded_vec.d.ts +48 -0
- package/dest/contract_function_simulator/noir-structs/bounded_vec.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/bounded_vec.js +45 -0
- package/dest/contract_function_simulator/noir-structs/ephemeral_array.d.ts +37 -0
- package/dest/contract_function_simulator/noir-structs/ephemeral_array.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/ephemeral_array.js +59 -0
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +6 -6
- 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 +12 -10
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +16 -5
- 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 +39 -7
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +4 -4
- 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 +3 -5
- package/dest/contract_function_simulator/noir-structs/note_data.d.ts +27 -0
- package/dest/contract_function_simulator/noir-structs/note_data.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/note_data.js +3 -0
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +7 -7
- 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 +15 -10
- package/dest/contract_function_simulator/noir-structs/option.d.ts +61 -0
- package/dest/contract_function_simulator/noir-structs/option.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/option.js +62 -0
- package/dest/contract_function_simulator/noir-structs/provided_secret.d.ts +11 -0
- package/dest/contract_function_simulator/noir-structs/provided_secret.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/provided_secret.js +24 -0
- 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/index.d.ts +1 -1
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +16 -88
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/interfaces.js +2 -2
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +2 -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 +14 -8
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +17 -12
- package/dest/contract_function_simulator/oracle/oracle.d.ts +75 -43
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +475 -251
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts +127 -0
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/oracle_registry.js +786 -0
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts +139 -0
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.js +560 -0
- 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 +6 -40
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +78 -102
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +177 -137
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +189 -60
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +507 -118
- 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 +21 -4
- 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 +39 -50
- package/dest/contract_logging.d.ts +27 -0
- package/dest/contract_logging.d.ts.map +1 -0
- package/dest/contract_logging.js +38 -0
- package/dest/contract_sync/contract_sync_service.d.ts +42 -0
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -0
- package/dest/contract_sync/contract_sync_service.js +135 -0
- package/dest/contract_sync/helpers.d.ts +27 -0
- package/dest/contract_sync/helpers.d.ts.map +1 -0
- package/dest/contract_sync/helpers.js +53 -0
- package/dest/debug/pxe_debug_utils.d.ts +40 -0
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -0
- package/dest/debug/pxe_debug_utils.js +42 -0
- package/dest/entrypoints/client/bundle/index.d.ts +3 -2
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.js +2 -1
- package/dest/entrypoints/client/bundle/utils.d.ts +2 -2
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +43 -12
- package/dest/entrypoints/client/lazy/index.d.ts +3 -2
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/index.js +2 -1
- package/dest/entrypoints/client/lazy/utils.d.ts +3 -3
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +44 -13
- package/dest/entrypoints/pxe_creation_options.d.ts +15 -3
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/pxe_creation_options.js +3 -1
- package/dest/entrypoints/server/index.d.ts +7 -3
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +6 -2
- package/dest/entrypoints/server/utils.d.ts +4 -3
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +50 -30
- 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 +24 -0
- package/dest/events/event_service.d.ts.map +1 -0
- package/dest/events/event_service.js +77 -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 +10 -0
- package/dest/events/private_event_filter_validator.d.ts.map +1 -0
- package/dest/events/private_event_filter_validator.js +53 -0
- package/dest/hooks/authorize_utility_call.d.ts +41 -0
- package/dest/hooks/authorize_utility_call.d.ts.map +1 -0
- package/dest/hooks/authorize_utility_call.js +4 -0
- package/dest/hooks/execution_hooks.d.ts +42 -0
- package/dest/hooks/execution_hooks.d.ts.map +1 -0
- package/dest/hooks/execution_hooks.js +9 -0
- package/dest/hooks/index.d.ts +4 -0
- package/dest/hooks/index.d.ts.map +1 -0
- package/dest/hooks/index.js +1 -0
- 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 +29 -0
- package/dest/logs/log_service.d.ts.map +1 -0
- package/dest/logs/log_service.js +172 -0
- package/dest/messages/message_context_service.d.ts +17 -0
- package/dest/messages/message_context_service.d.ts.map +1 -0
- package/dest/messages/message_context_service.js +55 -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 +70 -0
- package/dest/notes/note_service.d.ts.map +1 -0
- package/dest/notes/note_service.js +172 -0
- package/dest/notes_filter.d.ts +24 -0
- package/dest/notes_filter.d.ts.map +1 -0
- package/dest/notes_filter.js +4 -0
- package/dest/oracle_version.d.ts +4 -3
- package/dest/oracle_version.d.ts.map +1 -1
- package/dest/oracle_version.js +20 -9
- package/dest/private_kernel/batch_planner.d.ts +47 -0
- package/dest/private_kernel/batch_planner.d.ts.map +1 -0
- package/dest/private_kernel/batch_planner.js +104 -0
- 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} +145 -78
- 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 +202 -0
- package/dest/private_kernel/index.d.ts +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +7 -2
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +177 -76
- package/dest/private_kernel/private_kernel_oracle.d.ts +30 -29
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +96 -2
- package/dest/pxe.d.ts +170 -103
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +356 -306
- 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_store/anchor_block_store.js +26 -0
- 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/backwards_compatibility_tests/kv_store_snapshot.d.ts +42 -0
- package/dest/storage/backwards_compatibility_tests/kv_store_snapshot.d.ts.map +1 -0
- package/dest/storage/backwards_compatibility_tests/kv_store_snapshot.js +93 -0
- package/dest/storage/backwards_compatibility_tests/schema_tests.d.ts +15 -0
- package/dest/storage/backwards_compatibility_tests/schema_tests.d.ts.map +1 -0
- package/dest/storage/backwards_compatibility_tests/schema_tests.js +591 -0
- package/dest/storage/backwards_compatibility_tests/store_spy.d.ts +19 -0
- package/dest/storage/backwards_compatibility_tests/store_spy.d.ts.map +1 -0
- package/dest/storage/backwards_compatibility_tests/store_spy.js +63 -0
- package/dest/storage/capsule_store/capsule_service.d.ts +21 -0
- package/dest/storage/capsule_store/capsule_service.d.ts.map +1 -0
- package/dest/storage/capsule_store/capsule_service.js +50 -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 +261 -0
- package/dest/storage/capsule_store/index.d.ts +3 -0
- package/dest/storage/capsule_store/index.d.ts.map +1 -0
- package/dest/storage/capsule_store/index.js +2 -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 +292 -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/{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/metadata.d.ts +2 -2
- 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/open_pxe_stores.d.ts +33 -0
- package/dest/storage/open_pxe_stores.d.ts.map +1 -0
- package/dest/storage/open_pxe_stores.js +27 -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 +276 -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_store/sender_tagging_store.d.ts +78 -0
- package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -0
- package/dest/storage/tagging_store/sender_tagging_store.js +374 -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 +48 -0
- package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -0
- package/dest/tagging/get_all_logs_by_tags.js +59 -0
- package/dest/tagging/index.d.ts +18 -7
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +16 -5
- package/dest/tagging/persist_sender_tagging_index_ranges.d.ts +29 -0
- package/dest/tagging/persist_sender_tagging_index_ranges.d.ts.map +1 -0
- package/dest/tagging/persist_sender_tagging_index_ranges.js +42 -0
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.d.ts +56 -0
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.d.ts.map +1 -0
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.js +163 -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/reconcile_tagging_index_ranges.d.ts +36 -0
- package/dest/tagging/reconcile_tagging_index_ranges.d.ts.map +1 -0
- package/dest/tagging/reconcile_tagging_index_ranges.js +74 -0
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +16 -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 +92 -0
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +17 -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 +60 -0
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +19 -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 +72 -0
- package/package.json +33 -20
- package/src/bin/check_oracle_version.ts +63 -25
- package/src/bin/index.ts +1 -0
- package/src/bin/oracle_version_helpers.ts +121 -0
- package/src/block_synchronizer/block_stream_source.ts +81 -0
- package/src/block_synchronizer/block_synchronizer.ts +200 -0
- package/src/block_synchronizer/index.ts +1 -0
- package/src/config/index.ts +31 -26
- 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 +462 -122
- package/src/contract_function_simulator/ephemeral_array_service.ts +110 -0
- package/src/contract_function_simulator/execution_note_cache.ts +59 -29
- package/src/contract_function_simulator/execution_tagging_index_cache.ts +19 -18
- package/src/contract_function_simulator/hashed_values_cache.ts +1 -1
- package/src/contract_function_simulator/index.ts +52 -2
- package/src/contract_function_simulator/noir-structs/bounded_vec.ts +55 -0
- package/src/contract_function_simulator/noir-structs/ephemeral_array.ts +66 -0
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +15 -10
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +40 -6
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +4 -7
- package/src/contract_function_simulator/noir-structs/note_data.ts +27 -0
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +17 -10
- package/src/contract_function_simulator/noir-structs/option.ts +69 -0
- package/src/contract_function_simulator/noir-structs/provided_secret.ts +27 -0
- package/src/contract_function_simulator/noir-structs/utility_context.ts +6 -25
- package/src/contract_function_simulator/oracle/interfaces.ts +12 -151
- package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +1 -1
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +31 -15
- package/src/contract_function_simulator/oracle/oracle.ts +570 -434
- package/src/contract_function_simulator/oracle/oracle_registry.ts +585 -0
- package/src/contract_function_simulator/oracle/oracle_type_mappings.ts +553 -0
- package/src/contract_function_simulator/oracle/private_execution.ts +6 -72
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +230 -188
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +751 -142
- package/src/contract_function_simulator/pick_notes.ts +23 -4
- package/src/contract_function_simulator/proxied_contract_data_source.ts +47 -53
- package/src/contract_logging.ts +52 -0
- package/src/contract_sync/contract_sync_service.ts +189 -0
- package/src/contract_sync/helpers.ts +86 -0
- package/src/debug/pxe_debug_utils.ts +85 -0
- package/src/entrypoints/client/bundle/index.ts +2 -1
- package/src/entrypoints/client/bundle/utils.ts +33 -21
- package/src/entrypoints/client/lazy/index.ts +2 -1
- package/src/entrypoints/client/lazy/utils.ts +35 -23
- package/src/entrypoints/pxe_creation_options.ts +20 -2
- package/src/entrypoints/server/index.ts +6 -2
- package/src/entrypoints/server/utils.ts +47 -60
- package/src/error_enriching.ts +7 -15
- package/src/events/event_service.ts +119 -0
- package/src/events/index.ts +1 -0
- package/src/events/private_event_filter_validator.ts +66 -0
- package/src/hooks/authorize_utility_call.ts +44 -0
- package/src/hooks/execution_hooks.ts +48 -0
- package/src/hooks/index.ts +7 -0
- package/src/job_coordinator/job_coordinator.ts +150 -0
- package/src/logs/log_service.ts +237 -0
- package/src/messages/message_context_service.ts +62 -0
- package/src/notes/index.ts +1 -0
- package/src/notes/note_service.ts +230 -0
- package/src/notes_filter.ts +24 -0
- package/src/oracle_version.ts +20 -9
- package/src/private_kernel/batch_planner.ts +169 -0
- 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} +200 -146
- package/src/private_kernel/hints/test_utils.ts +318 -0
- package/src/private_kernel/private_kernel_execution_prover.ts +272 -110
- package/src/private_kernel/private_kernel_oracle.ts +130 -39
- package/src/pxe.ts +606 -414
- 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/{sync_data_provider/sync_data_provider.ts → anchor_block_store/anchor_block_store.ts} +11 -12
- package/src/storage/anchor_block_store/index.ts +1 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/AddressStore.json +22 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/AnchorBlockStore.json +3 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/CapsuleStore.json +16 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/ContractStore.json +28 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/KeyStore.json +52 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/L2TipsKVStore.json +46 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/NoteStore.json +36 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/PrivateEventStore.json +44 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/RecipientTaggingStore.json +18 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/SenderAddressBookStore.json +16 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/SenderTaggingStore.json +22 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/opened_stores.json +97 -0
- package/src/storage/backwards_compatibility_tests/kv_store_snapshot.ts +122 -0
- package/src/storage/backwards_compatibility_tests/schema_tests.ts +712 -0
- package/src/storage/backwards_compatibility_tests/store_spy.ts +73 -0
- package/src/storage/capsule_store/capsule_service.ts +90 -0
- package/src/storage/capsule_store/capsule_store.ts +333 -0
- package/src/storage/capsule_store/index.ts +2 -0
- package/src/storage/contract_store/contract_store.ts +408 -0
- 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/metadata.ts +1 -1
- package/src/storage/note_store/index.ts +2 -0
- package/src/storage/note_store/note_store.ts +415 -0
- package/src/storage/note_store/stored_note.ts +48 -0
- package/src/storage/open_pxe_stores.ts +49 -0
- package/src/storage/private_event_store/private_event_store.ts +388 -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 +476 -0
- package/src/tagging/constants.ts +10 -2
- package/src/tagging/get_all_logs_by_tags.ts +120 -0
- package/src/tagging/index.ts +20 -6
- package/src/tagging/persist_sender_tagging_index_ranges.ts +57 -0
- package/src/tagging/recipient_sync/sync_tagged_private_logs.ts +240 -0
- package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +34 -0
- package/src/tagging/reconcile_tagging_index_ranges.ts +102 -0
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +134 -0
- package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +66 -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 -274
- 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 -701
- 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 -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 +0 -74
- 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 -205
- 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_dao.d.ts +0 -100
- package/dest/storage/note_data_provider/note_dao.d.ts.map +0 -1
- package/dest/storage/note_data_provider/note_dao.js +0 -102
- 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 -308
- package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +0 -43
- 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 -104
- package/dest/storage/sync_data_provider/index.d.ts +0 -2
- 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 +0 -10
- package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +0 -1
- package/dest/storage/sync_data_provider/sync_data_provider.js +0 -26
- 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 -343
- package/src/contract_function_simulator/proxied_node.ts +0 -33
- package/src/contract_function_simulator/pxe_oracle_interface.ts +0 -1019
- 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/contract_data_provider.ts +0 -294
- 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_dao.ts +0 -154
- package/src/storage/note_data_provider/note_data_provider.ts +0 -393
- package/src/storage/private_event_data_provider/private_event_data_provider.ts +0 -148
- 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,10 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { FunctionSelector, NoteSelector } from '@aztec/stdlib/abi';
|
|
4
|
-
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
-
import { ContractClassLog, ContractClassLogFields } from '@aztec/stdlib/logs';
|
|
6
|
-
import { MerkleTreeId } from '@aztec/stdlib/trees';
|
|
7
|
-
import { packAsRetrievedNote } from './note_packing_utils.js';
|
|
1
|
+
import { ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR } from '../../oracle_version.js';
|
|
2
|
+
import { callHandler } from './oracle_registry.js';
|
|
8
3
|
export class UnavailableOracleError extends Error {
|
|
9
4
|
constructor(oracleName){
|
|
10
5
|
super(`${oracleName} oracles not available with the current handler`);
|
|
@@ -12,6 +7,25 @@ export class UnavailableOracleError extends Error {
|
|
|
12
7
|
}
|
|
13
8
|
/**
|
|
14
9
|
* A data source that has all the apis required by Aztec.nr.
|
|
10
|
+
*
|
|
11
|
+
* ## Oracle naming conventions
|
|
12
|
+
*
|
|
13
|
+
* We try to keep oracle naming consistent, please see below the conventions we adhere to.
|
|
14
|
+
*
|
|
15
|
+
* Each oracle method name has the form `aztec_{scope}_{verb}{Object}`, where:
|
|
16
|
+
*
|
|
17
|
+
* - **Scope prefix** indicates the execution context required:
|
|
18
|
+
* - `aztec_prv_` — available only during private function execution.
|
|
19
|
+
* - `aztec_utl_` — available during both utility and private execution.
|
|
20
|
+
*
|
|
21
|
+
* - **Verb** signals the operation's semantics (verb-first, then object):
|
|
22
|
+
* - `get` — read / lookup / get data from oracle into contract.
|
|
23
|
+
* - `does`/`is`/`has` — predicate (returns boolean).
|
|
24
|
+
* - `emit`/`notify` — propagate data from contract to oracle.
|
|
25
|
+
* - `set` — contract driven oracle state mutation (capsules, execution cache, tagging, etc).
|
|
26
|
+
* - `call` — trigger nested execution (control flow).
|
|
27
|
+
* - `assert` — validate a condition, throw on failure.
|
|
28
|
+
* - Standalone verbs (`delete`, `copy`, `decrypt`, `log`, etc) are used when no generic verb fits.
|
|
15
29
|
*/ export class Oracle {
|
|
16
30
|
handler;
|
|
17
31
|
constructor(handler){
|
|
@@ -46,11 +60,11 @@ export class UnavailableOracleError extends Error {
|
|
|
46
60
|
];
|
|
47
61
|
// Get all the oracle function names
|
|
48
62
|
const oracleNames = Object.getOwnPropertyNames(Oracle.prototype).filter((name)=>!excludedProps.includes(name));
|
|
49
|
-
// Validate oracle names - these must be prefixed with either "
|
|
63
|
+
// Validate oracle names - these must be prefixed with either "aztec_prv_" or "aztec_utl_" to indicate their scope
|
|
50
64
|
// and must correspond to a function on the Oracle class.
|
|
51
65
|
oracleNames.forEach((name)=>{
|
|
52
|
-
if (!name.startsWith('
|
|
53
|
-
throw new Error(`Oracle function "${name}" must be prefixed with
|
|
66
|
+
if (!name.startsWith('aztec_prv_') && !name.startsWith('aztec_utl_') && !name.startsWith('aztec_misc_')) {
|
|
67
|
+
throw new Error(`Oracle function "${name}" must be prefixed with "aztec_prv_", "aztec_utl_", or "aztec_misc_" to indicate its scope`);
|
|
54
68
|
}
|
|
55
69
|
const method = this[name];
|
|
56
70
|
if (typeof method !== 'function') {
|
|
@@ -58,271 +72,481 @@ export class UnavailableOracleError extends Error {
|
|
|
58
72
|
}
|
|
59
73
|
});
|
|
60
74
|
// Build callback object and return it
|
|
61
|
-
|
|
75
|
+
const callback = oracleNames.reduce((acc, name)=>{
|
|
62
76
|
const method = this[name];
|
|
63
77
|
acc[name] = method.bind(this);
|
|
64
78
|
return acc;
|
|
65
79
|
}, {});
|
|
80
|
+
// Wrap in a Proxy to intercept access to missing oracle names and provide enhanced error messages when the
|
|
81
|
+
// contract's minor version is higher than the PXE's (i.e. the contract expects oracles that were added in a newer
|
|
82
|
+
// minor version).
|
|
83
|
+
const handler = this.handler;
|
|
84
|
+
return new Proxy(callback, {
|
|
85
|
+
get (target, prop) {
|
|
86
|
+
if (prop in target) {
|
|
87
|
+
return target[prop];
|
|
88
|
+
}
|
|
89
|
+
// Return a function that throws with an enhanced error message if applicable
|
|
90
|
+
return ()=>{
|
|
91
|
+
let contractVersion = undefined;
|
|
92
|
+
if ('nonOracleFunctionGetContractOracleVersion' in handler) {
|
|
93
|
+
contractVersion = handler.nonOracleFunctionGetContractOracleVersion();
|
|
94
|
+
}
|
|
95
|
+
if (!contractVersion) {
|
|
96
|
+
throw new Error(`Oracle '${prop}' not found and the contract's oracle version is unknown (the version check oracle ` + `was not called before '${prop}'). This usually means the contract was not compiled with the ` + `#[aztec] macro, which injects the version check as the first oracle call in every private/utility ` + `external function. If you're using a custom entry point, ensure assert_compatible_oracle_version() ` + `is called before any other oracle calls. See https://docs.aztec.network/errors/8`);
|
|
97
|
+
} else if (contractVersion.minor > ORACLE_VERSION_MINOR) {
|
|
98
|
+
throw new Error(`Oracle '${prop}' not found.` + ` This usually means the contract requires a newer private execution environment than you have.` + ` Upgrade your private execution environment to a compatible version. The contract was compiled with` + ` Aztec.nr oracle version ${contractVersion.major}.${contractVersion.minor}, but this private` + ` execution environment only supports up to ${ORACLE_VERSION_MAJOR}.${ORACLE_VERSION_MINOR}.` + ` See https://docs.aztec.network/errors/8`);
|
|
99
|
+
} else {
|
|
100
|
+
throw new Error(`Oracle '${prop}' not found.` + ` The contract's oracle version (${contractVersion.major}.${contractVersion.minor}) is compatible` + ` with this private execution environment (${ORACLE_VERSION_MAJOR}.${ORACLE_VERSION_MINOR}), so all` + ` standard oracles should be available. This could mean the contract was compiled against a modified` + ` version of Aztec.nr, or that it references an oracle that does not exist.` + ` See https://docs.aztec.network/errors/8`);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
});
|
|
66
105
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
// Since the argument is a slice, noir automatically adds a length field to oracle call.
|
|
78
|
-
privateStoreInExecutionCache(_length, values, [hash]) {
|
|
79
|
-
this.handlerAsPrivate().privateStoreInExecutionCache(values.map(Fr.fromString), Fr.fromString(hash));
|
|
80
|
-
return Promise.resolve([]);
|
|
81
|
-
}
|
|
82
|
-
async privateLoadFromExecutionCache([returnsHash]) {
|
|
83
|
-
const values = await this.handlerAsPrivate().privateLoadFromExecutionCache(Fr.fromString(returnsHash));
|
|
84
|
-
return [
|
|
85
|
-
values.map(toACVMField)
|
|
86
|
-
];
|
|
106
|
+
// eslint-disable-next-line camelcase
|
|
107
|
+
aztec_misc_assertCompatibleOracleVersion(...inputs) {
|
|
108
|
+
return callHandler({
|
|
109
|
+
oracle: 'aztec_misc_assertCompatibleOracleVersion',
|
|
110
|
+
inputs,
|
|
111
|
+
handler: ([major, minor])=>{
|
|
112
|
+
this.handlerAsMisc().assertCompatibleOracleVersion(major, minor);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
87
115
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
async utilityGetContractInstance([address]) {
|
|
97
|
-
const instance = await this.handlerAsUtility().utilityGetContractInstance(AztecAddress.fromField(Fr.fromString(address)));
|
|
98
|
-
return [
|
|
99
|
-
instance.salt,
|
|
100
|
-
instance.deployer,
|
|
101
|
-
instance.currentContractClassId,
|
|
102
|
-
instance.initializationHash,
|
|
103
|
-
...instance.publicKeys.toFields()
|
|
104
|
-
].map(toACVMField);
|
|
105
|
-
}
|
|
106
|
-
async utilityGetMembershipWitness([blockNumber], [treeId], [leafValue]) {
|
|
107
|
-
const parsedBlockNumber = Fr.fromString(blockNumber).toNumber();
|
|
108
|
-
const parsedTreeId = Fr.fromString(treeId).toNumber();
|
|
109
|
-
const parsedLeafValue = Fr.fromString(leafValue);
|
|
110
|
-
const witness = await this.handlerAsUtility().utilityGetMembershipWitness(parsedBlockNumber, parsedTreeId, parsedLeafValue);
|
|
111
|
-
if (!witness) {
|
|
112
|
-
throw new Error(`Leaf ${leafValue} not found in the tree ${MerkleTreeId[parsedTreeId]} at block ${parsedBlockNumber}.`);
|
|
113
|
-
}
|
|
114
|
-
return [
|
|
115
|
-
toACVMField(witness[0]),
|
|
116
|
-
witness.slice(1).map(toACVMField)
|
|
117
|
-
];
|
|
116
|
+
// eslint-disable-next-line camelcase
|
|
117
|
+
aztec_misc_getRandomField() {
|
|
118
|
+
return callHandler({
|
|
119
|
+
oracle: 'aztec_misc_getRandomField',
|
|
120
|
+
inputs: [],
|
|
121
|
+
handler: ()=>this.handlerAsMisc().getRandomField()
|
|
122
|
+
});
|
|
118
123
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
async utilityGetLowNullifierMembershipWitness([blockNumber], [nullifier]) {
|
|
129
|
-
const parsedBlockNumber = Fr.fromString(blockNumber).toNumber();
|
|
130
|
-
const parsedNullifier = Fr.fromString(nullifier);
|
|
131
|
-
const witness = await this.handlerAsUtility().utilityGetLowNullifierMembershipWitness(parsedBlockNumber, parsedNullifier);
|
|
132
|
-
if (!witness) {
|
|
133
|
-
throw new Error(`Low nullifier witness not found for nullifier ${parsedNullifier} at block ${parsedBlockNumber}.`);
|
|
134
|
-
}
|
|
135
|
-
return witness.toNoirRepresentation();
|
|
136
|
-
}
|
|
137
|
-
async utilityGetPublicDataWitness([blockNumber], [leafSlot]) {
|
|
138
|
-
const parsedBlockNumber = Fr.fromString(blockNumber).toNumber();
|
|
139
|
-
const parsedLeafSlot = Fr.fromString(leafSlot);
|
|
140
|
-
const witness = await this.handlerAsUtility().utilityGetPublicDataWitness(parsedBlockNumber, parsedLeafSlot);
|
|
141
|
-
if (!witness) {
|
|
142
|
-
throw new Error(`Public data witness not found for slot ${parsedLeafSlot} at block ${parsedBlockNumber}.`);
|
|
143
|
-
}
|
|
144
|
-
return witness.toNoirRepresentation();
|
|
124
|
+
// eslint-disable-next-line camelcase
|
|
125
|
+
aztec_prv_setHashPreimage(...inputs) {
|
|
126
|
+
return callHandler({
|
|
127
|
+
oracle: 'aztec_prv_setHashPreimage',
|
|
128
|
+
inputs,
|
|
129
|
+
handler: ([values, hash])=>{
|
|
130
|
+
this.handlerAsPrivate().setHashPreimage(values, hash);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
145
133
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
134
|
+
// eslint-disable-next-line camelcase
|
|
135
|
+
aztec_prv_getHashPreimage(...inputs) {
|
|
136
|
+
return callHandler({
|
|
137
|
+
oracle: 'aztec_prv_getHashPreimage',
|
|
138
|
+
inputs,
|
|
139
|
+
handler: ([returnsHash])=>this.handlerAsPrivate().getHashPreimage(returnsHash)
|
|
140
|
+
});
|
|
153
141
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
witness.map(toACVMField)
|
|
162
|
-
];
|
|
142
|
+
// eslint-disable-next-line camelcase
|
|
143
|
+
aztec_utl_getUtilityContext() {
|
|
144
|
+
return callHandler({
|
|
145
|
+
oracle: 'aztec_utl_getUtilityContext',
|
|
146
|
+
inputs: [],
|
|
147
|
+
handler: ()=>this.handlerAsUtility().getUtilityContext()
|
|
148
|
+
});
|
|
163
149
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
].map(toACVMField)
|
|
172
|
-
];
|
|
150
|
+
// eslint-disable-next-line camelcase
|
|
151
|
+
aztec_utl_getKeyValidationRequest(...inputs) {
|
|
152
|
+
return callHandler({
|
|
153
|
+
oracle: 'aztec_utl_getKeyValidationRequest',
|
|
154
|
+
inputs,
|
|
155
|
+
handler: ([pkMHash])=>this.handlerAsUtility().getKeyValidationRequest(pkMHash)
|
|
156
|
+
});
|
|
173
157
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
privateNotifyCreatedNote([storageSlot], [noteTypeId], note, [noteHash], [counter]) {
|
|
183
|
-
this.handlerAsPrivate().privateNotifyCreatedNote(Fr.fromString(storageSlot), NoteSelector.fromField(Fr.fromString(noteTypeId)), note.map(Fr.fromString), Fr.fromString(noteHash), +counter);
|
|
184
|
-
return Promise.resolve([]);
|
|
185
|
-
}
|
|
186
|
-
async privateNotifyNullifiedNote([innerNullifier], [noteHash], [counter]) {
|
|
187
|
-
await this.handlerAsPrivate().privateNotifyNullifiedNote(Fr.fromString(innerNullifier), Fr.fromString(noteHash), +counter);
|
|
188
|
-
return [];
|
|
189
|
-
}
|
|
190
|
-
async privateNotifyCreatedNullifier([innerNullifier]) {
|
|
191
|
-
await this.handlerAsPrivate().privateNotifyCreatedNullifier(Fr.fromString(innerNullifier));
|
|
192
|
-
return [];
|
|
193
|
-
}
|
|
194
|
-
async utilityCheckNullifierExists([innerNullifier]) {
|
|
195
|
-
const exists = await this.handlerAsUtility().utilityCheckNullifierExists(Fr.fromString(innerNullifier));
|
|
196
|
-
return [
|
|
197
|
-
toACVMField(exists)
|
|
198
|
-
];
|
|
158
|
+
// eslint-disable-next-line camelcase
|
|
159
|
+
aztec_utl_getContractInstance(...inputs) {
|
|
160
|
+
return callHandler({
|
|
161
|
+
oracle: 'aztec_utl_getContractInstance',
|
|
162
|
+
inputs,
|
|
163
|
+
handler: ([address])=>this.handlerAsUtility().getContractInstance(address)
|
|
164
|
+
});
|
|
199
165
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
return
|
|
166
|
+
// eslint-disable-next-line camelcase
|
|
167
|
+
aztec_utl_getNoteHashMembershipWitness(...inputs) {
|
|
168
|
+
return callHandler({
|
|
169
|
+
oracle: 'aztec_utl_getNoteHashMembershipWitness',
|
|
170
|
+
inputs,
|
|
171
|
+
handler: ([anchorBlockHash, noteHash])=>this.handlerAsUtility().getNoteHashMembershipWitness(anchorBlockHash, noteHash)
|
|
172
|
+
});
|
|
203
173
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
return
|
|
207
|
-
|
|
208
|
-
|
|
174
|
+
// eslint-disable-next-line camelcase
|
|
175
|
+
aztec_utl_getBlockHashMembershipWitness(...inputs) {
|
|
176
|
+
return callHandler({
|
|
177
|
+
oracle: 'aztec_utl_getBlockHashMembershipWitness',
|
|
178
|
+
inputs,
|
|
179
|
+
handler: ([anchorBlockHash, blockHash])=>this.handlerAsUtility().getBlockHashMembershipWitness(anchorBlockHash, blockHash)
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
// eslint-disable-next-line camelcase
|
|
183
|
+
aztec_utl_getNullifierMembershipWitness(...inputs) {
|
|
184
|
+
return callHandler({
|
|
185
|
+
oracle: 'aztec_utl_getNullifierMembershipWitness',
|
|
186
|
+
inputs,
|
|
187
|
+
handler: ([blockHash, nullifier])=>this.handlerAsUtility().getNullifierMembershipWitness(blockHash, nullifier)
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
// eslint-disable-next-line camelcase
|
|
191
|
+
aztec_utl_getLowNullifierMembershipWitness(...inputs) {
|
|
192
|
+
return callHandler({
|
|
193
|
+
oracle: 'aztec_utl_getLowNullifierMembershipWitness',
|
|
194
|
+
inputs,
|
|
195
|
+
handler: ([blockHash, nullifier])=>this.handlerAsUtility().getLowNullifierMembershipWitness(blockHash, nullifier)
|
|
196
|
+
});
|
|
209
197
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
198
|
+
// eslint-disable-next-line camelcase
|
|
199
|
+
aztec_utl_getPublicDataWitness(...inputs) {
|
|
200
|
+
return callHandler({
|
|
201
|
+
oracle: 'aztec_utl_getPublicDataWitness',
|
|
202
|
+
inputs,
|
|
203
|
+
handler: ([blockHash, leafSlot])=>this.handlerAsUtility().getPublicDataWitness(blockHash, leafSlot)
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
// eslint-disable-next-line camelcase
|
|
207
|
+
aztec_utl_getBlockHeader(...inputs) {
|
|
208
|
+
return callHandler({
|
|
209
|
+
oracle: 'aztec_utl_getBlockHeader',
|
|
210
|
+
inputs,
|
|
211
|
+
handler: ([blockNumber])=>this.handlerAsUtility().getBlockHeader(blockNumber)
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
// eslint-disable-next-line camelcase
|
|
215
|
+
aztec_utl_getAuthWitness(...inputs) {
|
|
216
|
+
return callHandler({
|
|
217
|
+
oracle: 'aztec_utl_getAuthWitness',
|
|
218
|
+
inputs,
|
|
219
|
+
handler: ([messageHash])=>this.handlerAsUtility().getAuthWitness(messageHash)
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
// eslint-disable-next-line camelcase
|
|
223
|
+
aztec_utl_getPublicKeysAndPartialAddress(...inputs) {
|
|
224
|
+
return callHandler({
|
|
225
|
+
oracle: 'aztec_utl_getPublicKeysAndPartialAddress',
|
|
226
|
+
inputs,
|
|
227
|
+
handler: ([address])=>this.handlerAsUtility().getPublicKeysAndPartialAddress(address)
|
|
228
|
+
});
|
|
215
229
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
230
|
+
// eslint-disable-next-line camelcase
|
|
231
|
+
aztec_utl_getNotes(...inputs) {
|
|
232
|
+
return callHandler({
|
|
233
|
+
oracle: 'aztec_utl_getNotes',
|
|
234
|
+
inputs,
|
|
235
|
+
handler: ([owner, storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status, maxNotes, packedHintedNoteLength])=>this.handlerAsUtility().getNotes(owner, storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status, maxNotes, packedHintedNoteLength)
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
// eslint-disable-next-line camelcase
|
|
239
|
+
aztec_prv_notifyCreatedNote(...inputs) {
|
|
240
|
+
return callHandler({
|
|
241
|
+
oracle: 'aztec_prv_notifyCreatedNote',
|
|
242
|
+
inputs,
|
|
243
|
+
handler: ([owner, storageSlot, randomness, noteTypeId, note, noteHash, counter])=>{
|
|
244
|
+
this.handlerAsPrivate().notifyCreatedNote(owner, storageSlot, randomness, noteTypeId, note, noteHash, counter);
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
// eslint-disable-next-line camelcase
|
|
249
|
+
aztec_prv_notifyNullifiedNote(...inputs) {
|
|
250
|
+
return callHandler({
|
|
251
|
+
oracle: 'aztec_prv_notifyNullifiedNote',
|
|
252
|
+
inputs,
|
|
253
|
+
handler: ([innerNullifier, noteHash, counter])=>this.handlerAsPrivate().notifyNullifiedNote(innerNullifier, noteHash, counter)
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
// eslint-disable-next-line camelcase
|
|
257
|
+
aztec_prv_notifyCreatedNullifier(...inputs) {
|
|
258
|
+
return callHandler({
|
|
259
|
+
oracle: 'aztec_prv_notifyCreatedNullifier',
|
|
260
|
+
inputs,
|
|
261
|
+
handler: ([innerNullifier])=>this.handlerAsPrivate().notifyCreatedNullifier(innerNullifier)
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
// eslint-disable-next-line camelcase
|
|
265
|
+
aztec_prv_isNullifierPending(...inputs) {
|
|
266
|
+
return callHandler({
|
|
267
|
+
oracle: 'aztec_prv_isNullifierPending',
|
|
268
|
+
inputs,
|
|
269
|
+
handler: ([innerNullifier, contractAddress])=>this.handlerAsPrivate().isNullifierPending(innerNullifier, contractAddress)
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
// eslint-disable-next-line camelcase
|
|
273
|
+
aztec_utl_doesNullifierExist(...inputs) {
|
|
274
|
+
return callHandler({
|
|
275
|
+
oracle: 'aztec_utl_doesNullifierExist',
|
|
276
|
+
inputs,
|
|
277
|
+
handler: ([innerNullifier])=>this.handlerAsUtility().doesNullifierExist(innerNullifier)
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
// eslint-disable-next-line camelcase
|
|
281
|
+
aztec_utl_getL1ToL2MembershipWitness(...inputs) {
|
|
282
|
+
return callHandler({
|
|
283
|
+
oracle: 'aztec_utl_getL1ToL2MembershipWitness',
|
|
284
|
+
inputs,
|
|
285
|
+
handler: ([contractAddress, messageHash, secret])=>this.handlerAsUtility().getL1ToL2MembershipWitness(contractAddress, messageHash, secret)
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
// eslint-disable-next-line camelcase
|
|
289
|
+
aztec_utl_getFromPublicStorage(...inputs) {
|
|
290
|
+
return callHandler({
|
|
291
|
+
oracle: 'aztec_utl_getFromPublicStorage',
|
|
292
|
+
inputs,
|
|
293
|
+
handler: ([blockHash, contractAddress, startStorageSlot, numberOfElements])=>this.handlerAsUtility().getFromPublicStorage(blockHash, contractAddress, startStorageSlot, numberOfElements)
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
// eslint-disable-next-line camelcase
|
|
297
|
+
aztec_utl_callUtilityFunction(...inputs) {
|
|
298
|
+
return callHandler({
|
|
299
|
+
oracle: 'aztec_utl_callUtilityFunction',
|
|
300
|
+
inputs,
|
|
301
|
+
handler: ([contractAddress, functionSelector, args])=>this.handlerAsUtility().callUtilityFunction(contractAddress, functionSelector, args)
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
// eslint-disable-next-line camelcase
|
|
305
|
+
aztec_prv_notifyCreatedContractClassLog(...inputs) {
|
|
306
|
+
return callHandler({
|
|
307
|
+
oracle: 'aztec_prv_notifyCreatedContractClassLog',
|
|
308
|
+
inputs,
|
|
309
|
+
handler: ([log, counter])=>{
|
|
310
|
+
this.handlerAsPrivate().notifyCreatedContractClassLog(log, counter);
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
// eslint-disable-next-line camelcase
|
|
315
|
+
aztec_misc_log(...inputs) {
|
|
316
|
+
return callHandler({
|
|
317
|
+
oracle: 'aztec_misc_log',
|
|
318
|
+
inputs,
|
|
319
|
+
handler: ([level, message, fieldsSize, fields])=>this.handlerAsMisc().log(level, message, fieldsSize, fields)
|
|
320
|
+
});
|
|
222
321
|
}
|
|
223
322
|
// This function's name is directly hardcoded in `circuit_recorder.ts`. Don't forget to update it there if you
|
|
224
323
|
// change the name here.
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
return
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
];
|
|
324
|
+
// eslint-disable-next-line camelcase
|
|
325
|
+
aztec_prv_callPrivateFunction(...inputs) {
|
|
326
|
+
return callHandler({
|
|
327
|
+
oracle: 'aztec_prv_callPrivateFunction',
|
|
328
|
+
inputs,
|
|
329
|
+
handler: ([contractAddress, functionSelector, argsHash, sideEffectCounter, isStaticCall])=>this.handlerAsPrivate().callPrivateFunction(contractAddress, functionSelector, argsHash, sideEffectCounter, isStaticCall)
|
|
330
|
+
});
|
|
233
331
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
return
|
|
332
|
+
// eslint-disable-next-line camelcase
|
|
333
|
+
aztec_prv_assertValidPublicCalldata(...inputs) {
|
|
334
|
+
return callHandler({
|
|
335
|
+
oracle: 'aztec_prv_assertValidPublicCalldata',
|
|
336
|
+
inputs,
|
|
337
|
+
handler: ([calldataHash])=>this.handlerAsPrivate().assertValidPublicCalldata(calldataHash)
|
|
338
|
+
});
|
|
237
339
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
return
|
|
340
|
+
// eslint-disable-next-line camelcase
|
|
341
|
+
aztec_prv_notifyRevertiblePhaseStart(...inputs) {
|
|
342
|
+
return callHandler({
|
|
343
|
+
oracle: 'aztec_prv_notifyRevertiblePhaseStart',
|
|
344
|
+
inputs,
|
|
345
|
+
handler: ([minRevertibleSideEffectCounter])=>this.handlerAsPrivate().notifyRevertiblePhaseStart(minRevertibleSideEffectCounter)
|
|
346
|
+
});
|
|
241
347
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
return
|
|
348
|
+
// eslint-disable-next-line camelcase
|
|
349
|
+
aztec_prv_isExecutionInRevertiblePhase(...inputs) {
|
|
350
|
+
return callHandler({
|
|
351
|
+
oracle: 'aztec_prv_isExecutionInRevertiblePhase',
|
|
352
|
+
inputs,
|
|
353
|
+
handler: ([sideEffectCounter])=>this.handlerAsPrivate().isExecutionInRevertiblePhase(sideEffectCounter)
|
|
354
|
+
});
|
|
245
355
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
return
|
|
249
|
-
|
|
250
|
-
|
|
356
|
+
// eslint-disable-next-line camelcase
|
|
357
|
+
aztec_prv_getAppTaggingSecret(...inputs) {
|
|
358
|
+
return callHandler({
|
|
359
|
+
oracle: 'aztec_prv_getAppTaggingSecret',
|
|
360
|
+
inputs,
|
|
361
|
+
handler: ([sender, recipient])=>this.handlerAsPrivate().getAppTaggingSecret(sender, recipient)
|
|
362
|
+
});
|
|
251
363
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
return
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}
|
|
260
|
-
async utilityBulkRetrieveLogs([contractAddress], [logRetrievalRequestsArrayBaseSlot], [logRetrievalResponsesArrayBaseSlot]) {
|
|
261
|
-
await this.handlerAsUtility().utilityBulkRetrieveLogs(AztecAddress.fromString(contractAddress), Fr.fromString(logRetrievalRequestsArrayBaseSlot), Fr.fromString(logRetrievalResponsesArrayBaseSlot));
|
|
262
|
-
return [];
|
|
263
|
-
}
|
|
264
|
-
async utilityStoreCapsule([contractAddress], [slot], capsule) {
|
|
265
|
-
await this.handlerAsUtility().utilityStoreCapsule(AztecAddress.fromField(Fr.fromString(contractAddress)), Fr.fromString(slot), capsule.map(Fr.fromString));
|
|
266
|
-
return [];
|
|
267
|
-
}
|
|
268
|
-
async utilityLoadCapsule([contractAddress], [slot], [tSize]) {
|
|
269
|
-
const values = await this.handlerAsUtility().utilityLoadCapsule(AztecAddress.fromField(Fr.fromString(contractAddress)), Fr.fromString(slot));
|
|
270
|
-
// We are going to return a Noir Option struct to represent the possibility of null values. Options are a struct
|
|
271
|
-
// with two fields: `some` (a boolean) and `value` (a field array in this case).
|
|
272
|
-
if (values === null) {
|
|
273
|
-
// No data was found so we set `some` to 0 and pad `value` with zeros get the correct return size.
|
|
274
|
-
return [
|
|
275
|
-
toACVMField(0),
|
|
276
|
-
Array(Fr.fromString(tSize).toNumber()).fill(toACVMField(0))
|
|
277
|
-
];
|
|
278
|
-
} else {
|
|
279
|
-
// Data was found so we set `some` to 1 and return it along with `value`.
|
|
280
|
-
return [
|
|
281
|
-
toACVMField(1),
|
|
282
|
-
values.map(toACVMField)
|
|
283
|
-
];
|
|
284
|
-
}
|
|
364
|
+
// eslint-disable-next-line camelcase
|
|
365
|
+
aztec_prv_getNextTaggingIndex(...inputs) {
|
|
366
|
+
return callHandler({
|
|
367
|
+
oracle: 'aztec_prv_getNextTaggingIndex',
|
|
368
|
+
inputs,
|
|
369
|
+
handler: ([secret, mode])=>this.handlerAsPrivate().getNextTaggingIndex(secret, mode)
|
|
370
|
+
});
|
|
285
371
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
return
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}
|
|
294
|
-
async utilityAes128Decrypt(ciphertextBVecStorage, [ciphertextLength], iv, symKey) {
|
|
295
|
-
const ciphertext = fromUintBoundedVec(ciphertextBVecStorage, ciphertextLength, 8);
|
|
296
|
-
const ivBuffer = fromUintArray(iv, 8);
|
|
297
|
-
const symKeyBuffer = fromUintArray(symKey, 8);
|
|
298
|
-
const plaintext = await this.handlerAsUtility().utilityAes128Decrypt(ciphertext, ivBuffer, symKeyBuffer);
|
|
299
|
-
return bufferToBoundedVec(plaintext, ciphertextBVecStorage.length);
|
|
300
|
-
}
|
|
301
|
-
async utilityGetSharedSecret([address], [ephPKField0], [ephPKField1], [ephPKField2]) {
|
|
302
|
-
const secret = await this.handlerAsUtility().utilityGetSharedSecret(AztecAddress.fromField(Fr.fromString(address)), Point.fromFields([
|
|
303
|
-
ephPKField0,
|
|
304
|
-
ephPKField1,
|
|
305
|
-
ephPKField2
|
|
306
|
-
].map(Fr.fromString)));
|
|
307
|
-
return secret.toFields().map(toACVMField);
|
|
308
|
-
}
|
|
309
|
-
async utilityEmitOffchainEffect(data) {
|
|
310
|
-
await this.handlerAsPrivate().utilityEmitOffchainEffect(data.map(Fr.fromString));
|
|
311
|
-
return [];
|
|
312
|
-
}
|
|
313
|
-
async privateGetSenderForTags() {
|
|
314
|
-
const sender = await this.handlerAsPrivate().privateGetSenderForTags();
|
|
315
|
-
// Return [1, address] for Some(address), [0, 0] for None
|
|
316
|
-
return sender ? [
|
|
317
|
-
toACVMField(1n),
|
|
318
|
-
toACVMField(sender)
|
|
319
|
-
] : [
|
|
320
|
-
toACVMField(0n),
|
|
321
|
-
toACVMField(0n)
|
|
322
|
-
];
|
|
372
|
+
// eslint-disable-next-line camelcase
|
|
373
|
+
aztec_utl_getPendingTaggedLogs(...inputs) {
|
|
374
|
+
return callHandler({
|
|
375
|
+
oracle: 'aztec_utl_getPendingTaggedLogs',
|
|
376
|
+
inputs,
|
|
377
|
+
handler: ([scope, providedSecrets])=>this.handlerAsUtility().getPendingTaggedLogs(scope, providedSecrets)
|
|
378
|
+
});
|
|
323
379
|
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
return
|
|
380
|
+
// eslint-disable-next-line camelcase
|
|
381
|
+
aztec_utl_validateAndStoreEnqueuedNotesAndEvents(...inputs) {
|
|
382
|
+
return callHandler({
|
|
383
|
+
oracle: 'aztec_utl_validateAndStoreEnqueuedNotesAndEvents',
|
|
384
|
+
inputs,
|
|
385
|
+
handler: ([noteValidationRequests, eventValidationRequests, scope])=>this.handlerAsUtility().validateAndStoreEnqueuedNotesAndEvents(noteValidationRequests, eventValidationRequests, scope)
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
// eslint-disable-next-line camelcase
|
|
389
|
+
aztec_utl_getLogsByTag(...inputs) {
|
|
390
|
+
return callHandler({
|
|
391
|
+
oracle: 'aztec_utl_getLogsByTag',
|
|
392
|
+
inputs,
|
|
393
|
+
handler: ([requests])=>this.handlerAsUtility().getLogsByTag(requests)
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
// eslint-disable-next-line camelcase
|
|
397
|
+
aztec_utl_getMessageContextsByTxHash(...inputs) {
|
|
398
|
+
return callHandler({
|
|
399
|
+
oracle: 'aztec_utl_getMessageContextsByTxHash',
|
|
400
|
+
inputs,
|
|
401
|
+
handler: ([requests])=>this.handlerAsUtility().getMessageContextsByTxHash(requests)
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
// eslint-disable-next-line camelcase
|
|
405
|
+
aztec_utl_getTxEffect(...inputs) {
|
|
406
|
+
return callHandler({
|
|
407
|
+
oracle: 'aztec_utl_getTxEffect',
|
|
408
|
+
inputs,
|
|
409
|
+
handler: ([txHash])=>this.handlerAsUtility().getTxEffect(txHash)
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
// eslint-disable-next-line camelcase
|
|
413
|
+
aztec_utl_setCapsule(...inputs) {
|
|
414
|
+
return callHandler({
|
|
415
|
+
oracle: 'aztec_utl_setCapsule',
|
|
416
|
+
inputs,
|
|
417
|
+
handler: ([contractAddress, slot, capsule, scope])=>{
|
|
418
|
+
this.handlerAsUtility().setCapsule(contractAddress, slot, capsule, scope);
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
// eslint-disable-next-line camelcase
|
|
423
|
+
aztec_utl_getCapsule(...inputs) {
|
|
424
|
+
return callHandler({
|
|
425
|
+
oracle: 'aztec_utl_getCapsule',
|
|
426
|
+
inputs,
|
|
427
|
+
handler: ([contractAddress, slot, tSize, scope])=>this.handlerAsUtility().getCapsule(contractAddress, slot, tSize, scope)
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
// eslint-disable-next-line camelcase
|
|
431
|
+
aztec_utl_deleteCapsule(...inputs) {
|
|
432
|
+
return callHandler({
|
|
433
|
+
oracle: 'aztec_utl_deleteCapsule',
|
|
434
|
+
inputs,
|
|
435
|
+
handler: ([contractAddress, slot, scope])=>{
|
|
436
|
+
this.handlerAsUtility().deleteCapsule(contractAddress, slot, scope);
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
// eslint-disable-next-line camelcase
|
|
441
|
+
aztec_utl_copyCapsule(...inputs) {
|
|
442
|
+
return callHandler({
|
|
443
|
+
oracle: 'aztec_utl_copyCapsule',
|
|
444
|
+
inputs,
|
|
445
|
+
handler: ([contractAddress, srcSlot, dstSlot, numEntries, scope])=>this.handlerAsUtility().copyCapsule(contractAddress, srcSlot, dstSlot, numEntries, scope)
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
// eslint-disable-next-line camelcase
|
|
449
|
+
aztec_utl_pushEphemeral(...inputs) {
|
|
450
|
+
return callHandler({
|
|
451
|
+
oracle: 'aztec_utl_pushEphemeral',
|
|
452
|
+
inputs,
|
|
453
|
+
handler: ([slot, elements])=>this.handlerAsUtility().pushEphemeral(slot, elements)
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
// eslint-disable-next-line camelcase
|
|
457
|
+
aztec_utl_popEphemeral(...inputs) {
|
|
458
|
+
return callHandler({
|
|
459
|
+
oracle: 'aztec_utl_popEphemeral',
|
|
460
|
+
inputs,
|
|
461
|
+
handler: ([slot])=>this.handlerAsUtility().popEphemeral(slot)
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
// eslint-disable-next-line camelcase
|
|
465
|
+
aztec_utl_getEphemeral(...inputs) {
|
|
466
|
+
return callHandler({
|
|
467
|
+
oracle: 'aztec_utl_getEphemeral',
|
|
468
|
+
inputs,
|
|
469
|
+
handler: ([slot, index])=>this.handlerAsUtility().getEphemeral(slot, index)
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
// eslint-disable-next-line camelcase
|
|
473
|
+
aztec_utl_setEphemeral(...inputs) {
|
|
474
|
+
return callHandler({
|
|
475
|
+
oracle: 'aztec_utl_setEphemeral',
|
|
476
|
+
inputs,
|
|
477
|
+
handler: ([slot, index, elements])=>{
|
|
478
|
+
this.handlerAsUtility().setEphemeral(slot, index, elements);
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
// eslint-disable-next-line camelcase
|
|
483
|
+
aztec_utl_getEphemeralLen(...inputs) {
|
|
484
|
+
return callHandler({
|
|
485
|
+
oracle: 'aztec_utl_getEphemeralLen',
|
|
486
|
+
inputs,
|
|
487
|
+
handler: ([slot])=>this.handlerAsUtility().getEphemeralLen(slot)
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
// eslint-disable-next-line camelcase
|
|
491
|
+
aztec_utl_removeEphemeral(...inputs) {
|
|
492
|
+
return callHandler({
|
|
493
|
+
oracle: 'aztec_utl_removeEphemeral',
|
|
494
|
+
inputs,
|
|
495
|
+
handler: ([slot, index])=>{
|
|
496
|
+
this.handlerAsUtility().removeEphemeral(slot, index);
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
// eslint-disable-next-line camelcase
|
|
501
|
+
aztec_utl_clearEphemeral(...inputs) {
|
|
502
|
+
return callHandler({
|
|
503
|
+
oracle: 'aztec_utl_clearEphemeral',
|
|
504
|
+
inputs,
|
|
505
|
+
handler: ([slot])=>{
|
|
506
|
+
this.handlerAsUtility().clearEphemeral(slot);
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
// eslint-disable-next-line camelcase
|
|
511
|
+
aztec_utl_decryptAes128(...inputs) {
|
|
512
|
+
return callHandler({
|
|
513
|
+
oracle: 'aztec_utl_decryptAes128',
|
|
514
|
+
inputs,
|
|
515
|
+
handler: ([ciphertext, iv, symKey])=>this.handlerAsUtility().decryptAes128(ciphertext, iv, symKey)
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
// eslint-disable-next-line camelcase
|
|
519
|
+
aztec_utl_getSharedSecrets(...inputs) {
|
|
520
|
+
return callHandler({
|
|
521
|
+
oracle: 'aztec_utl_getSharedSecrets',
|
|
522
|
+
inputs,
|
|
523
|
+
handler: ([address, ephPks, contractAddress])=>this.handlerAsUtility().getSharedSecrets(address, ephPks, contractAddress)
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
// eslint-disable-next-line camelcase
|
|
527
|
+
aztec_utl_setContractSyncCacheInvalid(...inputs) {
|
|
528
|
+
return callHandler({
|
|
529
|
+
oracle: 'aztec_utl_setContractSyncCacheInvalid',
|
|
530
|
+
inputs,
|
|
531
|
+
handler: ([contractAddress, scopes])=>{
|
|
532
|
+
this.handlerAsUtility().setContractSyncCacheInvalid(contractAddress, scopes);
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
// eslint-disable-next-line camelcase
|
|
537
|
+
aztec_utl_emitOffchainEffect(...inputs) {
|
|
538
|
+
return callHandler({
|
|
539
|
+
oracle: 'aztec_utl_emitOffchainEffect',
|
|
540
|
+
inputs,
|
|
541
|
+
handler: ([data])=>this.handlerAsUtility().emitOffchainEffect(data)
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
// eslint-disable-next-line camelcase
|
|
545
|
+
aztec_prv_getSenderForTags() {
|
|
546
|
+
return callHandler({
|
|
547
|
+
oracle: 'aztec_prv_getSenderForTags',
|
|
548
|
+
inputs: [],
|
|
549
|
+
handler: ()=>this.handlerAsPrivate().getSenderForTags()
|
|
550
|
+
});
|
|
327
551
|
}
|
|
328
552
|
}
|