@aztec-labs/pxe 6.0.0-nightly.20260829
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/README.md +13 -0
- package/dest/bin/check_oracle_version.d.ts +2 -0
- package/dest/bin/check_oracle_version.d.ts.map +1 -0
- package/dest/bin/check_oracle_version.js +22 -0
- 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 +20 -0
- package/dest/bin/oracle_version_helpers.d.ts.map +1 -0
- package/dest/bin/oracle_version_helpers.js +25 -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 +37 -0
- package/dest/block_synchronizer/block_synchronizer.d.ts +47 -0
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -0
- package/dest/block_synchronizer/block_synchronizer.js +192 -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 +57 -0
- package/dest/config/index.d.ts.map +1 -0
- package/dest/config/index.js +80 -0
- package/dest/config/package_info.d.ts +5 -0
- package/dest/config/package_info.d.ts.map +1 -0
- package/dest/config/package_info.js +6 -0
- package/dest/contract/contract_call_graph.d.ts +51 -0
- package/dest/contract/contract_call_graph.d.ts.map +1 -0
- package/dest/contract/contract_call_graph.js +91 -0
- package/dest/contract/contract_class_service.d.ts +24 -0
- package/dest/contract/contract_class_service.d.ts.map +1 -0
- package/dest/contract/contract_class_service.js +36 -0
- package/dest/contract/contract_sync_service.d.ts +82 -0
- package/dest/contract/contract_sync_service.d.ts.map +1 -0
- package/dest/contract/contract_sync_service.js +210 -0
- package/dest/contract/helpers.d.ts +7 -0
- package/dest/contract/helpers.d.ts.map +1 -0
- package/dest/contract/helpers.js +20 -0
- package/dest/contract/skip_sync_contracts.d.ts +11 -0
- package/dest/contract/skip_sync_contracts.d.ts.map +1 -0
- package/dest/contract/skip_sync_contracts.js +18 -0
- package/dest/contract_function_simulator/anchored_contract_data.d.ts +36 -0
- package/dest/contract_function_simulator/anchored_contract_data.d.ts.map +1 -0
- package/dest/contract_function_simulator/anchored_contract_data.js +54 -0
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +114 -0
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -0
- package/dest/contract_function_simulator/contract_function_simulator.js +495 -0
- 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 +98 -0
- package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -0
- package/dest/contract_function_simulator/execution_note_cache.js +189 -0
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +12 -0
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -0
- package/dest/contract_function_simulator/execution_tagging_index_cache.js +30 -0
- package/dest/contract_function_simulator/hashed_values_cache.d.ts +28 -0
- package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -0
- package/dest/contract_function_simulator/hashed_values_cache.js +36 -0
- package/dest/contract_function_simulator/index.d.ts +36 -0
- package/dest/contract_function_simulator/index.d.ts.map +1 -0
- package/dest/contract_function_simulator/index.js +20 -0
- package/dest/contract_function_simulator/noir-structs/bounded_vec.d.ts +29 -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 +30 -0
- package/dest/contract_function_simulator/noir-structs/contract_class_log_data.d.ts +9 -0
- package/dest/contract_function_simulator/noir-structs/contract_class_log_data.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/contract_class_log_data.js +1 -0
- package/dest/contract_function_simulator/noir-structs/embedded_curve_point.d.ts +7 -0
- package/dest/contract_function_simulator/noir-structs/embedded_curve_point.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/embedded_curve_point.js +1 -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 +20 -0
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/event_validation_request.js +39 -0
- package/dest/contract_function_simulator/noir-structs/fact.d.ts +16 -0
- package/dest/contract_function_simulator/noir-structs/fact.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/fact.js +6 -0
- package/dest/contract_function_simulator/noir-structs/fact_collection.d.ts +27 -0
- package/dest/contract_function_simulator/noir-structs/fact_collection.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/fact_collection.js +31 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +25 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +14 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +19 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +4 -0
- 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 +22 -0
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/note_validation_request.js +47 -0
- package/dest/contract_function_simulator/noir-structs/nullifier_membership_witness_data.d.ts +12 -0
- package/dest/contract_function_simulator/noir-structs/nullifier_membership_witness_data.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/nullifier_membership_witness_data.js +6 -0
- package/dest/contract_function_simulator/noir-structs/option.d.ts +59 -0
- package/dest/contract_function_simulator/noir-structs/option.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/option.js +67 -0
- package/dest/contract_function_simulator/noir-structs/origin_block.d.ts +11 -0
- package/dest/contract_function_simulator/noir-structs/origin_block.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/origin_block.js +5 -0
- package/dest/contract_function_simulator/noir-structs/pending_tagged_log.d.ts +11 -0
- package/dest/contract_function_simulator/noir-structs/pending_tagged_log.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/pending_tagged_log.js +4 -0
- package/dest/contract_function_simulator/noir-structs/provided_secret.d.ts +8 -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 +1 -0
- package/dest/contract_function_simulator/noir-structs/public_data_witness_data.d.ts +13 -0
- package/dest/contract_function_simulator/noir-structs/public_data_witness_data.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/public_data_witness_data.js +3 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tagging_strategy.d.ts +28 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tagging_strategy.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tagging_strategy.js +50 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tx.d.ts +19 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tx.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/resolved_tx.js +9 -0
- package/dest/contract_function_simulator/noir-structs/tx_effect_data.d.ts +15 -0
- package/dest/contract_function_simulator/noir-structs/tx_effect_data.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/tx_effect_data.js +5 -0
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +11 -0
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -0
- package/dest/contract_function_simulator/noir-structs/utility_context.js +3 -0
- package/dest/contract_function_simulator/oracle/acir_callback.d.ts +21 -0
- package/dest/contract_function_simulator/oracle/acir_callback.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/acir_callback.js +115 -0
- package/dest/contract_function_simulator/oracle/index.d.ts +3 -0
- package/dest/contract_function_simulator/oracle/index.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/index.js +2 -0
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +24 -0
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/interfaces.js +4 -0
- package/dest/contract_function_simulator/oracle/legacy_oracle_registry.d.ts +39 -0
- package/dest/contract_function_simulator/oracle/legacy_oracle_registry.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/legacy_oracle_registry.js +107 -0
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +28 -0
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +54 -0
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts +139 -0
- package/dest/contract_function_simulator/oracle/oracle_registry.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/oracle_registry.js +1024 -0
- package/dest/contract_function_simulator/oracle/oracle_type_mappings.d.ts +292 -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 +1258 -0
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +23 -0
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/private_execution.js +88 -0
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +226 -0
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +585 -0
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +333 -0
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +900 -0
- package/dest/contract_function_simulator/pick_notes.d.ts +85 -0
- package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -0
- package/dest/contract_function_simulator/pick_notes.js +68 -0
- package/dest/contract_function_simulator/transient_array_service.d.ts +31 -0
- package/dest/contract_function_simulator/transient_array_service.d.ts.map +1 -0
- package/dest/contract_function_simulator/transient_array_service.js +62 -0
- 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/debug/pxe_debug_utils.d.ts +38 -0
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -0
- package/dest/debug/pxe_debug_utils.js +44 -0
- package/dest/entrypoints/client/bundle/index.d.ts +10 -0
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -0
- package/dest/entrypoints/client/bundle/index.js +8 -0
- package/dest/entrypoints/client/bundle/utils.d.ts +16 -0
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -0
- package/dest/entrypoints/client/bundle/utils.js +78 -0
- package/dest/entrypoints/client/lazy/index.d.ts +10 -0
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -0
- package/dest/entrypoints/client/lazy/index.js +8 -0
- package/dest/entrypoints/client/lazy/utils.d.ts +15 -0
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -0
- package/dest/entrypoints/client/lazy/utils.js +77 -0
- package/dest/entrypoints/client/store.d.ts +14 -0
- package/dest/entrypoints/client/store.d.ts.map +1 -0
- package/dest/entrypoints/client/store.js +42 -0
- package/dest/entrypoints/pxe_creation_options.d.ts +32 -0
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -0
- package/dest/entrypoints/pxe_creation_options.js +3 -0
- package/dest/entrypoints/server/circuit_recording/circuit_recorder.d.ts +121 -0
- package/dest/entrypoints/server/circuit_recording/circuit_recorder.d.ts.map +1 -0
- package/dest/entrypoints/server/circuit_recording/circuit_recorder.js +208 -0
- package/dest/entrypoints/server/circuit_recording/file_circuit_recorder.d.ts +20 -0
- package/dest/entrypoints/server/circuit_recording/file_circuit_recorder.d.ts.map +1 -0
- package/dest/entrypoints/server/circuit_recording/file_circuit_recorder.js +131 -0
- package/dest/entrypoints/server/circuit_recording/memory_circuit_recorder.d.ts +10 -0
- package/dest/entrypoints/server/circuit_recording/memory_circuit_recorder.d.ts.map +1 -0
- package/dest/entrypoints/server/circuit_recording/memory_circuit_recorder.js +9 -0
- package/dest/entrypoints/server/circuit_recording/simulator_recorder_wrapper.d.ts +18 -0
- package/dest/entrypoints/server/circuit_recording/simulator_recorder_wrapper.d.ts.map +1 -0
- package/dest/entrypoints/server/circuit_recording/simulator_recorder_wrapper.js +41 -0
- package/dest/entrypoints/server/index.d.ts +17 -0
- package/dest/entrypoints/server/index.d.ts.map +1 -0
- package/dest/entrypoints/server/index.js +14 -0
- package/dest/entrypoints/server/store.d.ts +18 -0
- package/dest/entrypoints/server/store.d.ts.map +1 -0
- package/dest/entrypoints/server/store.js +28 -0
- package/dest/entrypoints/server/utils.d.ts +9 -0
- package/dest/entrypoints/server/utils.d.ts.map +1 -0
- package/dest/entrypoints/server/utils.js +84 -0
- package/dest/error_enriching.d.ts +13 -0
- package/dest/error_enriching.d.ts.map +1 -0
- package/dest/error_enriching.js +80 -0
- package/dest/events/event_service.d.ts +30 -0
- package/dest/events/event_service.d.ts.map +1 -0
- package/dest/events/event_service.js +76 -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 +62 -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 +5 -0
- package/dest/hooks/index.d.ts.map +1 -0
- package/dest/hooks/index.js +2 -0
- package/dest/hooks/resolve_custom_request.d.ts +23 -0
- package/dest/hooks/resolve_custom_request.d.ts.map +1 -0
- package/dest/hooks/resolve_custom_request.js +3 -0
- package/dest/hooks/resolve_tagging_secret_strategy.d.ts +50 -0
- package/dest/hooks/resolve_tagging_secret_strategy.d.ts.map +1 -0
- package/dest/hooks/resolve_tagging_secret_strategy.js +3 -0
- package/dest/logs/log_service.d.ts +40 -0
- package/dest/logs/log_service.d.ts.map +1 -0
- package/dest/logs/log_service.js +217 -0
- package/dest/messages/tx_resolver_service.d.ts +28 -0
- package/dest/messages/tx_resolver_service.d.ts.map +1 -0
- package/dest/messages/tx_resolver_service.js +62 -0
- package/dest/node/benchmarked_node.d.ts +22 -0
- package/dest/node/benchmarked_node.d.ts.map +1 -0
- package/dest/node/benchmarked_node.js +93 -0
- package/dest/node/caching_aztec_node.d.ts +24 -0
- package/dest/node/caching_aztec_node.d.ts.map +1 -0
- package/dest/node/caching_aztec_node.js +268 -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 +77 -0
- package/dest/notes/note_service.d.ts.map +1 -0
- package/dest/notes/note_service.js +173 -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/operation_lifecycle.d.ts +45 -0
- package/dest/operation_lifecycle.d.ts.map +1 -0
- package/dest/operation_lifecycle.js +68 -0
- package/dest/operation_queue.d.ts +75 -0
- package/dest/operation_queue.d.ts.map +1 -0
- package/dest/operation_queue.js +100 -0
- package/dest/oracle_version.d.ts +4 -0
- package/dest/oracle_version.d.ts.map +1 -0
- package/dest/oracle_version.js +21 -0
- 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_expiration_timestamp.js +41 -0
- package/dest/private_kernel/hints/index.d.ts +3 -0
- package/dest/private_kernel/hints/index.d.ts.map +1 -0
- package/dest/private_kernel/hints/index.js +2 -0
- 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/private_kernel_reset_private_inputs_builder.js +343 -0
- 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 +3 -0
- package/dest/private_kernel/index.d.ts.map +1 -0
- package/dest/private_kernel/index.js +2 -0
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +49 -0
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -0
- package/dest/private_kernel/private_kernel_execution_prover.js +408 -0
- package/dest/private_kernel/private_kernel_oracle.d.ts +65 -0
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -0
- package/dest/private_kernel/private_kernel_oracle.js +110 -0
- package/dest/pxe.d.ts +364 -0
- package/dest/pxe.d.ts.map +1 -0
- package/dest/pxe.js +903 -0
- 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_store/address_store.js +49 -0
- 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/allowed_scopes.d.ts +6 -0
- package/dest/storage/allowed_scopes.d.ts.map +1 -0
- package/dest/storage/allowed_scopes.js +7 -0
- package/dest/storage/anchor_block_store/anchor_block_store.d.ts +20 -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 +28 -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 +674 -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/base_staging_store.d.ts +110 -0
- package/dest/storage/base_staging_store.d.ts.map +1 -0
- package/dest/storage/base_staging_store.js +141 -0
- package/dest/storage/capsule_store/capsule_service.d.ts +22 -0
- package/dest/storage/capsule_store/capsule_service.d.ts.map +1 -0
- package/dest/storage/capsule_store/capsule_service.js +47 -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 +256 -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 +96 -0
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -0
- package/dest/storage/contract_store/contract_store.js +282 -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_store/private_functions_tree.d.ts +27 -0
- package/dest/storage/contract_store/private_functions_tree.d.ts.map +1 -0
- package/dest/storage/contract_store/private_functions_tree.js +48 -0
- package/dest/storage/fact_store/fact_service.d.ts +23 -0
- package/dest/storage/fact_store/fact_service.d.ts.map +1 -0
- package/dest/storage/fact_store/fact_service.js +45 -0
- package/dest/storage/fact_store/fact_store.d.ts +101 -0
- package/dest/storage/fact_store/fact_store.d.ts.map +1 -0
- package/dest/storage/fact_store/fact_store.js +350 -0
- package/dest/storage/fact_store/fact_store_keys.d.ts +34 -0
- package/dest/storage/fact_store/fact_store_keys.d.ts.map +1 -0
- package/dest/storage/fact_store/fact_store_keys.js +50 -0
- package/dest/storage/fact_store/index.d.ts +6 -0
- package/dest/storage/fact_store/index.d.ts.map +1 -0
- package/dest/storage/fact_store/index.js +4 -0
- package/dest/storage/fact_store/origin_state.d.ts +59 -0
- package/dest/storage/fact_store/origin_state.d.ts.map +1 -0
- package/dest/storage/fact_store/origin_state.js +60 -0
- package/dest/storage/fact_store/stored_fact.d.ts +32 -0
- package/dest/storage/fact_store/stored_fact.d.ts.map +1 -0
- package/dest/storage/fact_store/stored_fact.js +64 -0
- package/dest/storage/index.d.ts +10 -0
- package/dest/storage/index.d.ts.map +1 -0
- package/dest/storage/index.js +9 -0
- package/dest/storage/metadata.d.ts +2 -0
- package/dest/storage/metadata.d.ts.map +1 -0
- package/dest/storage/metadata.js +1 -0
- 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 +92 -0
- package/dest/storage/note_store/note_store.d.ts.map +1 -0
- package/dest/storage/note_store/note_store.js +273 -0
- package/dest/storage/note_store/stored_note.d.ts +11 -0
- package/dest/storage/note_store/stored_note.d.ts.map +1 -0
- package/dest/storage/note_store/stored_note.js +27 -0
- package/dest/storage/note_store/test_utils.d.ts +9 -0
- package/dest/storage/note_store/test_utils.d.ts.map +1 -0
- package/dest/storage/note_store/test_utils.js +10 -0
- package/dest/storage/open_pxe_stores.d.ts +35 -0
- package/dest/storage/open_pxe_stores.d.ts.map +1 -0
- package/dest/storage/open_pxe_stores.js +29 -0
- package/dest/storage/private_event_store/private_event_store.d.ts +90 -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/rollbackable.d.ts +15 -0
- package/dest/storage/rollbackable.d.ts.map +1 -0
- package/dest/storage/rollbackable.js +3 -0
- package/dest/storage/staged_write_coordinator.d.ts +103 -0
- package/dest/storage/staged_write_coordinator.d.ts.map +1 -0
- package/dest/storage/staged_write_coordinator.js +141 -0
- package/dest/storage/store_identity.d.ts +35 -0
- package/dest/storage/store_identity.d.ts.map +1 -0
- package/dest/storage/store_identity.js +44 -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 +36 -0
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -0
- package/dest/storage/tagging_store/recipient_tagging_store.js +74 -0
- package/dest/storage/tagging_store/sender_tagging_store.d.ts +113 -0
- package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -0
- package/dest/storage/tagging_store/sender_tagging_store.js +432 -0
- package/dest/storage/tagging_store/tagging_secret_sources_store.d.ts +51 -0
- package/dest/storage/tagging_store/tagging_secret_sources_store.d.ts.map +1 -0
- package/dest/storage/tagging_store/tagging_secret_sources_store.js +105 -0
- package/dest/tagging/constants.d.ts +11 -0
- package/dest/tagging/constants.d.ts.map +1 -0
- package/dest/tagging/constants.js +38 -0
- package/dest/tagging/get_all_logs_by_tags.d.ts +69 -0
- package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -0
- package/dest/tagging/get_all_logs_by_tags.js +79 -0
- package/dest/tagging/index.d.ts +18 -0
- package/dest/tagging/index.d.ts.map +1 -0
- package/dest/tagging/index.js +16 -0
- package/dest/tagging/persist_sender_tagging_index_ranges.d.ts +31 -0
- package/dest/tagging/persist_sender_tagging_index_ranges.d.ts.map +1 -0
- package/dest/tagging/persist_sender_tagging_index_ranges.js +43 -0
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.d.ts +75 -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 +235 -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 +20 -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 +77 -0
- package/dest/tagging/sender_sync/utils/classify_pending_txs.d.ts +22 -0
- package/dest/tagging/sender_sync/utils/classify_pending_txs.d.ts.map +1 -0
- package/dest/tagging/sender_sync/utils/classify_pending_txs.js +62 -0
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +30 -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 +74 -0
- package/dest/tagging/sender_sync/utils/resolve_pending_txs.d.ts +29 -0
- package/dest/tagging/sender_sync/utils/resolve_pending_txs.d.ts.map +1 -0
- package/dest/tagging/sender_sync/utils/resolve_pending_txs.js +42 -0
- package/dest/tagging/sender_sync/utils/test_utils.d.ts +16 -0
- package/dest/tagging/sender_sync/utils/test_utils.d.ts.map +1 -0
- package/dest/tagging/sender_sync/utils/test_utils.js +24 -0
- package/dest/tagging/testing/tag_query_test_utils.d.ts +6 -0
- package/dest/tagging/testing/tag_query_test_utils.d.ts.map +1 -0
- package/dest/tagging/testing/tag_query_test_utils.js +10 -0
- package/dest/test_utils.d.ts +3 -0
- package/dest/test_utils.d.ts.map +1 -0
- package/dest/test_utils.js +1 -0
- package/package.json +119 -0
- package/src/bin/check_oracle_version.ts +28 -0
- package/src/bin/index.ts +1 -0
- package/src/bin/oracle_version_helpers.ts +30 -0
- package/src/block_synchronizer/block_stream_source.ts +48 -0
- package/src/block_synchronizer/block_synchronizer.ts +225 -0
- package/src/block_synchronizer/index.ts +1 -0
- package/src/config/index.ts +141 -0
- package/src/config/package_info.ts +3 -0
- package/src/contract/contract_call_graph.ts +121 -0
- package/src/contract/contract_class_service.ts +45 -0
- package/src/contract/contract_sync_service.ts +349 -0
- package/src/contract/helpers.ts +35 -0
- package/src/contract/skip_sync_contracts.ts +23 -0
- package/src/contract_function_simulator/anchored_contract_data.ts +74 -0
- package/src/contract_function_simulator/contract_function_simulator.ts +928 -0
- package/src/contract_function_simulator/ephemeral_array_service.ts +110 -0
- package/src/contract_function_simulator/execution_note_cache.ts +232 -0
- package/src/contract_function_simulator/execution_tagging_index_cache.ts +33 -0
- package/src/contract_function_simulator/hashed_values_cache.ts +47 -0
- package/src/contract_function_simulator/index.ts +107 -0
- package/src/contract_function_simulator/noir-structs/bounded_vec.ts +43 -0
- package/src/contract_function_simulator/noir-structs/contract_class_log_data.ts +9 -0
- package/src/contract_function_simulator/noir-structs/embedded_curve_point.ts +4 -0
- package/src/contract_function_simulator/noir-structs/ephemeral_array.ts +66 -0
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +52 -0
- package/src/contract_function_simulator/noir-structs/fact.ts +13 -0
- package/src/contract_function_simulator/noir-structs/fact_collection.ts +64 -0
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +35 -0
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +19 -0
- package/src/contract_function_simulator/noir-structs/note_data.ts +27 -0
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +59 -0
- package/src/contract_function_simulator/noir-structs/nullifier_membership_witness_data.ts +15 -0
- package/src/contract_function_simulator/noir-structs/option.ts +75 -0
- package/src/contract_function_simulator/noir-structs/origin_block.ts +8 -0
- package/src/contract_function_simulator/noir-structs/pending_tagged_log.ts +12 -0
- package/src/contract_function_simulator/noir-structs/provided_secret.ts +5 -0
- package/src/contract_function_simulator/noir-structs/public_data_witness_data.ts +13 -0
- package/src/contract_function_simulator/noir-structs/resolved_tagging_strategy.ts +66 -0
- package/src/contract_function_simulator/noir-structs/resolved_tx.ts +19 -0
- package/src/contract_function_simulator/noir-structs/tx_effect_data.ts +16 -0
- package/src/contract_function_simulator/noir-structs/utility_context.ts +11 -0
- package/src/contract_function_simulator/oracle/acir_callback.ts +154 -0
- package/src/contract_function_simulator/oracle/index.ts +2 -0
- package/src/contract_function_simulator/oracle/interfaces.ts +20 -0
- package/src/contract_function_simulator/oracle/legacy_oracle_registry.ts +147 -0
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +68 -0
- package/src/contract_function_simulator/oracle/oracle_registry.ts +709 -0
- package/src/contract_function_simulator/oracle/oracle_type_mappings.ts +1089 -0
- package/src/contract_function_simulator/oracle/private_execution.ts +140 -0
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +812 -0
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +1341 -0
- package/src/contract_function_simulator/pick_notes.ts +160 -0
- package/src/contract_function_simulator/transient_array_service.ts +91 -0
- package/src/contract_logging.ts +52 -0
- package/src/debug/pxe_debug_utils.ts +89 -0
- package/src/entrypoints/client/bundle/index.ts +9 -0
- package/src/entrypoints/client/bundle/utils.ts +89 -0
- package/src/entrypoints/client/lazy/index.ts +9 -0
- package/src/entrypoints/client/lazy/utils.ts +89 -0
- package/src/entrypoints/client/store.ts +54 -0
- package/src/entrypoints/pxe_creation_options.ts +34 -0
- package/src/entrypoints/server/circuit_recording/circuit_recorder.ts +267 -0
- package/src/entrypoints/server/circuit_recording/file_circuit_recorder.ts +152 -0
- package/src/entrypoints/server/circuit_recording/memory_circuit_recorder.ts +13 -0
- package/src/entrypoints/server/circuit_recording/simulator_recorder_wrapper.ts +90 -0
- package/src/entrypoints/server/index.ts +17 -0
- package/src/entrypoints/server/store.ts +46 -0
- package/src/entrypoints/server/utils.ts +103 -0
- package/src/error_enriching.ts +124 -0
- package/src/events/event_service.ts +129 -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 +68 -0
- package/src/hooks/index.ts +13 -0
- package/src/hooks/resolve_custom_request.ts +24 -0
- package/src/hooks/resolve_tagging_secret_strategy.ts +60 -0
- package/src/logs/log_service.ts +295 -0
- package/src/messages/tx_resolver_service.ts +81 -0
- package/src/node/benchmarked_node.ts +141 -0
- package/src/node/caching_aztec_node.ts +407 -0
- package/src/notes/index.ts +1 -0
- package/src/notes/note_service.ts +238 -0
- package/src/notes_filter.ts +24 -0
- package/src/operation_lifecycle.ts +99 -0
- package/src/operation_queue.ts +149 -0
- package/src/oracle_version.ts +22 -0
- package/src/private_kernel/batch_planner.ts +168 -0
- package/src/private_kernel/hints/compute_tx_expiration_timestamp.ts +58 -0
- package/src/private_kernel/hints/index.ts +2 -0
- package/src/private_kernel/hints/private_kernel_reset_private_inputs_builder.ts +553 -0
- package/src/private_kernel/hints/test_utils.ts +318 -0
- package/src/private_kernel/index.ts +2 -0
- package/src/private_kernel/private_kernel_execution_prover.ts +656 -0
- package/src/private_kernel/private_kernel_oracle.ts +184 -0
- package/src/pxe.ts +1417 -0
- package/src/storage/address_store/address_store.ts +66 -0
- package/src/storage/address_store/index.ts +1 -0
- package/src/storage/allowed_scopes.ts +14 -0
- package/src/storage/anchor_block_store/anchor_block_store.ts +35 -0
- 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__/FactStore.json +40 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/KeyStore.json +52 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/L2TipsKVStore.json +40 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/NoteStore.json +56 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/PrivateEventStore.json +44 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/RecipientTaggingStore.json +26 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/SenderTaggingStore.json +30 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/TaggingSecretSourcesStore.json +30 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/opened_stores.json +117 -0
- package/src/storage/backwards_compatibility_tests/kv_store_snapshot.ts +122 -0
- package/src/storage/backwards_compatibility_tests/schema_tests.ts +813 -0
- package/src/storage/backwards_compatibility_tests/store_spy.ts +73 -0
- package/src/storage/base_staging_store.ts +227 -0
- package/src/storage/capsule_store/capsule_service.ts +97 -0
- package/src/storage/capsule_store/capsule_store.ts +349 -0
- package/src/storage/capsule_store/index.ts +2 -0
- package/src/storage/contract_store/contract_store.ts +403 -0
- package/src/storage/contract_store/index.ts +1 -0
- package/src/storage/contract_store/private_functions_tree.ts +68 -0
- package/src/storage/fact_store/fact_service.ts +70 -0
- package/src/storage/fact_store/fact_store.ts +424 -0
- package/src/storage/fact_store/fact_store_keys.ts +75 -0
- package/src/storage/fact_store/index.ts +15 -0
- package/src/storage/fact_store/origin_state.ts +84 -0
- package/src/storage/fact_store/stored_fact.ts +80 -0
- package/src/storage/index.ts +9 -0
- package/src/storage/metadata.ts +1 -0
- package/src/storage/note_store/index.ts +2 -0
- package/src/storage/note_store/note_store.ts +367 -0
- package/src/storage/note_store/stored_note.ts +26 -0
- package/src/storage/note_store/test_utils.ts +16 -0
- package/src/storage/open_pxe_stores.ts +52 -0
- package/src/storage/private_event_store/private_event_store.ts +383 -0
- package/src/storage/private_event_store/stored_private_event.ts +73 -0
- package/src/storage/rollbackable.ts +14 -0
- package/src/storage/staged_write_coordinator.ts +218 -0
- package/src/storage/store_identity.ts +72 -0
- package/src/storage/tagging_store/index.ts +3 -0
- package/src/storage/tagging_store/recipient_tagging_store.ts +114 -0
- package/src/storage/tagging_store/sender_tagging_store.ts +564 -0
- package/src/storage/tagging_store/tagging_secret_sources_store.ts +138 -0
- package/src/tagging/constants.ts +42 -0
- package/src/tagging/get_all_logs_by_tags.ts +157 -0
- package/src/tagging/index.ts +25 -0
- package/src/tagging/persist_sender_tagging_index_ranges.ts +59 -0
- package/src/tagging/recipient_sync/sync_tagged_private_logs.ts +357 -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 +113 -0
- package/src/tagging/sender_sync/utils/classify_pending_txs.ts +92 -0
- package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +92 -0
- package/src/tagging/sender_sync/utils/resolve_pending_txs.ts +65 -0
- package/src/tagging/sender_sync/utils/test_utils.ts +46 -0
- package/src/tagging/testing/tag_query_test_utils.ts +11 -0
- package/src/test_utils.ts +2 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
2
|
+
import type { AppTaggingSecretKind } from '@aztec-labs/stdlib/logs';
|
|
3
|
+
/** A tagging secret an app supplies explicitly to `getPendingTaggedLogsV2` when PXE cannot derive it internally. */
|
|
4
|
+
export type ProvidedSecret = {
|
|
5
|
+
secret: Fr;
|
|
6
|
+
mode: AppTaggingSecretKind;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvdmlkZWRfc2VjcmV0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL25vaXItc3RydWN0cy9wcm92aWRlZF9zZWNyZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLE1BQU0scUNBQXFDLENBQUM7QUFDOUQsT0FBTyxLQUFLLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUVwRSxvSEFBb0g7QUFDcEgsTUFBTSxNQUFNLGNBQWMsR0FBRztJQUFFLE1BQU0sRUFBRSxFQUFFLENBQUM7SUFBQyxJQUFJLEVBQUUsb0JBQW9CLENBQUE7Q0FBRSxDQUFDIn0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provided_secret.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/provided_secret.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,oHAAoH;AACpH,MAAM,MAAM,cAAc,GAAG;IAAE,MAAM,EAAE,EAAE,CAAC;IAAC,IAAI,EAAE,oBAAoB,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/** A tagging secret an app supplies explicitly to `getPendingTaggedLogsV2` when PXE cannot derive it internally. */ export { };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PUBLIC_DATA_TREE_HEIGHT } from '@aztec-labs/constants';
|
|
2
|
+
import type { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
3
|
+
import type { Tuple } from '@aztec-labs/foundation/serialize';
|
|
4
|
+
import type { PublicDataTreeLeafPreimage } from '@aztec-labs/stdlib/trees';
|
|
5
|
+
/**
|
|
6
|
+
* A public data leaf preimage and the witness proving its membership in the public data tree.
|
|
7
|
+
*/
|
|
8
|
+
export type PublicDataWitnessData = {
|
|
9
|
+
index: bigint;
|
|
10
|
+
leafPreimage: PublicDataTreeLeafPreimage;
|
|
11
|
+
siblingPath: Tuple<Fr, typeof PUBLIC_DATA_TREE_HEIGHT>;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2RhdGFfd2l0bmVzc19kYXRhLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL25vaXItc3RydWN0cy9wdWJsaWNfZGF0YV93aXRuZXNzX2RhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUNyRSxPQUFPLEtBQUssRUFBRSxFQUFFLEVBQUUsTUFBTSxxQ0FBcUMsQ0FBQztBQUM5RCxPQUFPLEtBQUssRUFBRSxLQUFLLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUM5RCxPQUFPLEtBQUssRUFBRSwwQkFBMEIsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRTNFOztHQUVHO0FBQ0gsTUFBTSxNQUFNLHFCQUFxQixHQUFHO0lBQ2xDLEtBQUssRUFBRSxNQUFNLENBQUM7SUFDZCxZQUFZLEVBQUUsMEJBQTBCLENBQUM7SUFDekMsV0FBVyxFQUFFLEtBQUssQ0FBQyxFQUFFLEVBQUUsT0FBTyx1QkFBdUIsQ0FBQyxDQUFDO0NBQ3hELENBQUMifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public_data_witness_data.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/public_data_witness_data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,0BAA0B,CAAC;IACzC,WAAW,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,uBAAuB,CAAC,CAAC;CACxD,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
2
|
+
/**
|
|
3
|
+
* The tagging secret PXE hands to the contract after applying the wallet's {@link TaggingSecretStrategy} choice
|
|
4
|
+
* (and app-siloing). The contract uses it directly to derive the message tag, so it never sees raw key material.
|
|
5
|
+
*/
|
|
6
|
+
export type ResolvedTaggingStrategy = {
|
|
7
|
+
/** A non-interactive handshake: the recipient re-derives the secret from the onchain handshake registry. */
|
|
8
|
+
type: 'non-interactive-handshake';
|
|
9
|
+
} | {
|
|
10
|
+
/**
|
|
11
|
+
* An interactive handshake: the registry obtains the recipient's signed authorization through the custom
|
|
12
|
+
* request oracle, and the recipient learns the secret while signing. Nothing announcing the handshake is
|
|
13
|
+
* published onchain.
|
|
14
|
+
*/
|
|
15
|
+
type: 'interactive-handshake';
|
|
16
|
+
} | {
|
|
17
|
+
/**
|
|
18
|
+
* An app-siloed, recipient-directional secret, ready to use. Only sound for unconstrained delivery.
|
|
19
|
+
*/
|
|
20
|
+
type: 'unconstrained-secret';
|
|
21
|
+
/** The app-siloed directional tagging secret. */
|
|
22
|
+
secret: Fr;
|
|
23
|
+
};
|
|
24
|
+
/** Serializes a {@link ResolvedTaggingStrategy} to its Noir `[kind, secret]` field layout, zero-filling absent fields. */
|
|
25
|
+
export declare function resolvedTaggingStrategyToFields(resolved: ResolvedTaggingStrategy): Fr[];
|
|
26
|
+
/** Deserializes a {@link ResolvedTaggingStrategy} from its `kind` discriminant and `secret` field. */
|
|
27
|
+
export declare function resolvedTaggingStrategyFromFields(kind: number, secret: Fr): ResolvedTaggingStrategy;
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZWRfdGFnZ2luZ19zdHJhdGVneS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9ub2lyLXN0cnVjdHMvcmVzb2x2ZWRfdGFnZ2luZ19zdHJhdGVneS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0scUNBQXFDLENBQUM7QUFPekQ7OztHQUdHO0FBQ0gsTUFBTSxNQUFNLHVCQUF1QixHQUMvQjtJQUNFLDRHQUE0RztJQUM1RyxJQUFJLEVBQUUsMkJBQTJCLENBQUM7Q0FDbkMsR0FDRDtJQUNFOzs7O09BSUc7SUFDSCxJQUFJLEVBQUUsdUJBQXVCLENBQUM7Q0FDL0IsR0FDRDtJQUNFOztPQUVHO0lBQ0gsSUFBSSxFQUFFLHNCQUFzQixDQUFDO0lBQzdCLGlEQUFpRDtJQUNqRCxNQUFNLEVBQUUsRUFBRSxDQUFDO0NBQ1osQ0FBQztBQUVOLDBIQUEwSDtBQUMxSCx3QkFBZ0IsK0JBQStCLENBQUMsUUFBUSxFQUFFLHVCQUF1QixHQUFHLEVBQUUsRUFBRSxDQVN2RjtBQUVELHNHQUFzRztBQUN0Ryx3QkFBZ0IsaUNBQWlDLENBQUMsSUFBSSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsRUFBRSxHQUFHLHVCQUF1QixDQWFuRyJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolved_tagging_strategy.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/resolved_tagging_strategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,qCAAqC,CAAC;AAOzD;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAC/B;IACE,4GAA4G;IAC5G,IAAI,EAAE,2BAA2B,CAAC;CACnC,GACD;IACE;;;;OAIG;IACH,IAAI,EAAE,uBAAuB,CAAC;CAC/B,GACD;IACE;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAC7B,iDAAiD;IACjD,MAAM,EAAE,EAAE,CAAC;CACZ,CAAC;AAEN,0HAA0H;AAC1H,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,uBAAuB,GAAG,EAAE,EAAE,CASvF;AAED,sGAAsG;AACtG,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,uBAAuB,CAanG"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
2
|
+
// Keep in sync with aztec::messages::delivery::ResolvedTaggingStrategy
|
|
3
|
+
const NON_INTERACTIVE_HANDSHAKE = 1;
|
|
4
|
+
const UNCONSTRAINED_SECRET = 2;
|
|
5
|
+
const INTERACTIVE_HANDSHAKE = 3;
|
|
6
|
+
/** Serializes a {@link ResolvedTaggingStrategy} to its Noir `[kind, secret]` field layout, zero-filling absent fields. */ export function resolvedTaggingStrategyToFields(resolved) {
|
|
7
|
+
switch(resolved.type){
|
|
8
|
+
case 'non-interactive-handshake':
|
|
9
|
+
return [
|
|
10
|
+
new Fr(NON_INTERACTIVE_HANDSHAKE),
|
|
11
|
+
Fr.ZERO
|
|
12
|
+
];
|
|
13
|
+
case 'unconstrained-secret':
|
|
14
|
+
return [
|
|
15
|
+
new Fr(UNCONSTRAINED_SECRET),
|
|
16
|
+
resolved.secret
|
|
17
|
+
];
|
|
18
|
+
case 'interactive-handshake':
|
|
19
|
+
return [
|
|
20
|
+
new Fr(INTERACTIVE_HANDSHAKE),
|
|
21
|
+
Fr.ZERO
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** Deserializes a {@link ResolvedTaggingStrategy} from its `kind` discriminant and `secret` field. */ export function resolvedTaggingStrategyFromFields(kind, secret) {
|
|
26
|
+
switch(kind){
|
|
27
|
+
case NON_INTERACTIVE_HANDSHAKE:
|
|
28
|
+
assertAbsentSecret(kind, secret);
|
|
29
|
+
return {
|
|
30
|
+
type: 'non-interactive-handshake'
|
|
31
|
+
};
|
|
32
|
+
case INTERACTIVE_HANDSHAKE:
|
|
33
|
+
assertAbsentSecret(kind, secret);
|
|
34
|
+
return {
|
|
35
|
+
type: 'interactive-handshake'
|
|
36
|
+
};
|
|
37
|
+
case UNCONSTRAINED_SECRET:
|
|
38
|
+
return {
|
|
39
|
+
type: 'unconstrained-secret',
|
|
40
|
+
secret
|
|
41
|
+
};
|
|
42
|
+
default:
|
|
43
|
+
throw new Error(`Unrecognized resolved tagging strategy kind: ${kind}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function assertAbsentSecret(kind, secret) {
|
|
47
|
+
if (!secret.isZero()) {
|
|
48
|
+
throw new Error(`Resolved tagging strategy ${kind} must not include a secret`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
2
|
+
import type { TxHash } from '@aztec-labs/stdlib/tx';
|
|
3
|
+
/**
|
|
4
|
+
* The resolved on-chain context of a transaction.
|
|
5
|
+
*
|
|
6
|
+
* Carries the note hashes and first nullifier needed to discover notes that originated from the transaction, plus the
|
|
7
|
+
* number and hash of the block in which it was mined.
|
|
8
|
+
*
|
|
9
|
+
* A TS version of the `ResolvedTx` struct in `oracle/tx_resolution.nr`; its wire layout lives in the `RESOLVED_TX`
|
|
10
|
+
* type mapping.
|
|
11
|
+
*/
|
|
12
|
+
export type ResolvedTx = {
|
|
13
|
+
txHash: TxHash;
|
|
14
|
+
uniqueNoteHashesInTx: Fr[];
|
|
15
|
+
firstNullifierInTx: Fr;
|
|
16
|
+
blockNumber: number;
|
|
17
|
+
blockHash: Fr;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzb2x2ZWRfdHguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb250cmFjdF9mdW5jdGlvbl9zaW11bGF0b3Ivbm9pci1zdHJ1Y3RzL3Jlc29sdmVkX3R4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLEVBQUUsRUFBRSxNQUFNLHFDQUFxQyxDQUFDO0FBQzlELE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBRXBEOzs7Ozs7OztHQVFHO0FBQ0gsTUFBTSxNQUFNLFVBQVUsR0FBRztJQUN2QixNQUFNLEVBQUUsTUFBTSxDQUFDO0lBQ2Ysb0JBQW9CLEVBQUUsRUFBRSxFQUFFLENBQUM7SUFDM0Isa0JBQWtCLEVBQUUsRUFBRSxDQUFDO0lBQ3ZCLFdBQVcsRUFBRSxNQUFNLENBQUM7SUFDcEIsU0FBUyxFQUFFLEVBQUUsQ0FBQztDQUNmLENBQUMifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolved_tx.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/resolved_tx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,EAAE,EAAE,CAAC;IAC3B,kBAAkB,EAAE,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,EAAE,CAAC;CACf,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The resolved on-chain context of a transaction.
|
|
3
|
+
*
|
|
4
|
+
* Carries the note hashes and first nullifier needed to discover notes that originated from the transaction, plus the
|
|
5
|
+
* number and hash of the block in which it was mined.
|
|
6
|
+
*
|
|
7
|
+
* A TS version of the `ResolvedTx` struct in `oracle/tx_resolution.nr`; its wire layout lives in the `RESOLVED_TX`
|
|
8
|
+
* type mapping.
|
|
9
|
+
*/ export { };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FieldsOf } from '@aztec-labs/foundation/types';
|
|
2
|
+
import type { FlatPublicLogs } from '@aztec-labs/stdlib/logs';
|
|
3
|
+
import type { TxEffect } from '@aztec-labs/stdlib/tx';
|
|
4
|
+
import type { ContractClassLogData } from './contract_class_log_data.js';
|
|
5
|
+
/**
|
|
6
|
+
* Wire form of a {@link TxEffect} as the `getTxEffect` oracle returns it: identical to the domain type except its logs
|
|
7
|
+
* are flattened to their Noir layout and its revert code is the plain `u8` Noir declares. Keeping the conversion in
|
|
8
|
+
* the handler lets the `TX_EFFECT` mapping stay purely structural.
|
|
9
|
+
*/
|
|
10
|
+
export type TxEffectData = Omit<FieldsOf<TxEffect>, 'revertCode' | 'publicLogs' | 'contractClassLogs'> & {
|
|
11
|
+
revertCode: number;
|
|
12
|
+
publicLogs: FlatPublicLogs;
|
|
13
|
+
contractClassLogs: ContractClassLogData[];
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHhfZWZmZWN0X2RhdGEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb250cmFjdF9mdW5jdGlvbl9zaW11bGF0b3Ivbm9pci1zdHJ1Y3RzL3R4X2VmZmVjdF9kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLDhCQUE4QixDQUFDO0FBQzdELE9BQU8sS0FBSyxFQUFFLGNBQWMsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzlELE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBRXRELE9BQU8sS0FBSyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFFekU7Ozs7R0FJRztBQUNILE1BQU0sTUFBTSxZQUFZLEdBQUcsSUFBSSxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsRUFBRSxZQUFZLEdBQUcsWUFBWSxHQUFHLG1CQUFtQixDQUFDLEdBQUc7SUFDdkcsVUFBVSxFQUFFLE1BQU0sQ0FBQztJQUNuQixVQUFVLEVBQUUsY0FBYyxDQUFDO0lBQzNCLGlCQUFpQixFQUFFLG9CQUFvQixFQUFFLENBQUM7Q0FDM0MsQ0FBQyJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tx_effect_data.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/tx_effect_data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,GAAG,YAAY,GAAG,mBAAmB,CAAC,GAAG;IACvG,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,cAAc,CAAC;IAC3B,iBAAiB,EAAE,oBAAoB,EAAE,CAAC;CAC3C,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire form of a {@link TxEffect} as the `getTxEffect` oracle returns it: identical to the domain type except its logs
|
|
3
|
+
* are flattened to their Noir layout and its revert code is the plain `u8` Noir declares. Keeping the conversion in
|
|
4
|
+
* the handler lets the `TX_EFFECT` mapping stay purely structural.
|
|
5
|
+
*/ export { };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AztecAddress } from '@aztec-labs/stdlib/aztec-address';
|
|
2
|
+
import type { BlockHeader } from '@aztec-labs/stdlib/tx';
|
|
3
|
+
/**
|
|
4
|
+
* TypeScript counterpart of utility_context.nr. Used only as a return value for the utilityGetUtilityContext oracle.
|
|
5
|
+
*/
|
|
6
|
+
export type UtilityContext = {
|
|
7
|
+
blockHeader: BlockHeader;
|
|
8
|
+
contractAddress: AztecAddress;
|
|
9
|
+
msgSender: AztecAddress;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbGl0eV9jb250ZXh0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL25vaXItc3RydWN0cy91dGlsaXR5X2NvbnRleHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sa0NBQWtDLENBQUM7QUFDckUsT0FBTyxLQUFLLEVBQUUsV0FBVyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFekQ7O0dBRUc7QUFDSCxNQUFNLE1BQU0sY0FBYyxHQUFHO0lBQzNCLFdBQVcsRUFBRSxXQUFXLENBQUM7SUFDekIsZUFBZSxFQUFFLFlBQVksQ0FBQztJQUM5QixTQUFTLEVBQUUsWUFBWSxDQUFDO0NBQ3pCLENBQUMifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility_context.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/utility_context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,EAAE,YAAY,CAAC;IAC9B,SAAS,EAAE,YAAY,CAAC;CACzB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ACIRCallback } from '@aztec-labs/simulator/client';
|
|
2
|
+
import type { IMiscOracle, IPrivateExecutionOracle, IUtilityExecutionOracle } from './interfaces.js';
|
|
3
|
+
import { type LegacyOracleEntry } from './legacy_oracle_registry.js';
|
|
4
|
+
import { type OracleRegistryEntry } from './oracle_registry.js';
|
|
5
|
+
export declare class UnavailableOracleError extends Error {
|
|
6
|
+
constructor(oracleName: string);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Builds an ACIR callback from the oracle registry and a handler object.
|
|
10
|
+
*
|
|
11
|
+
* Each oracle call is dispatched by matching the oracle name against the registry for serialization, parsing the
|
|
12
|
+
* `aztec_{scope}_{methodName}` convention to resolve the handler, and calling the method directly. Unknown oracle
|
|
13
|
+
* names produce enhanced error messages based on the contract's oracle version.
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildACIRCallback(handler: OracleHandler, registries?: {
|
|
16
|
+
real?: Record<string, OracleRegistryEntry>;
|
|
17
|
+
legacy?: Record<string, LegacyOracleEntry>;
|
|
18
|
+
}): ACIRCallback;
|
|
19
|
+
type OracleHandler = IMiscOracle & (IUtilityExecutionOracle | IPrivateExecutionOracle);
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNpcl9jYWxsYmFjay5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9vcmFjbGUvYWNpcl9jYWxsYmFjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQWEsTUFBTSw4QkFBOEIsQ0FBQztBQUc1RSxPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsdUJBQXVCLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUNyRyxPQUFPLEVBQTBCLEtBQUssaUJBQWlCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUM3RixPQUFPLEVBQW9DLEtBQUssbUJBQW1CLEVBQWEsTUFBTSxzQkFBc0IsQ0FBQztBQUU3RyxxQkFBYSxzQkFBdUIsU0FBUSxLQUFLO0lBQy9DLFlBQVksVUFBVSxFQUFFLE1BQU0sRUFFN0I7Q0FDRjtBQUVEOzs7Ozs7R0FNRztBQUNILHdCQUFnQixpQkFBaUIsQ0FDL0IsT0FBTyxFQUFFLGFBQWEsRUFDdEIsVUFBVSxHQUFFO0lBQ1YsSUFBSSxDQUFDLEVBQUUsTUFBTSxDQUFDLE1BQU0sRUFBRSxtQkFBbUIsQ0FBQyxDQUFDO0lBQzNDLE1BQU0sQ0FBQyxFQUFFLE1BQU0sQ0FBQyxNQUFNLEVBQUUsaUJBQWlCLENBQUMsQ0FBQztDQUN2QyxHQUNMLFlBQVksQ0FzQ2Q7QUErREQsS0FBSyxhQUFhLEdBQUcsV0FBVyxHQUFHLENBQUMsdUJBQXVCLEdBQUcsdUJBQXVCLENBQUMsQ0FBQyJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acir_callback.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/oracle/acir_callback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,8BAA8B,CAAC;AAG5E,OAAO,KAAK,EAAE,WAAW,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AACrG,OAAO,EAA0B,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAoC,KAAK,mBAAmB,EAAa,MAAM,sBAAsB,CAAC;AAE7G,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,YAAY,UAAU,EAAE,MAAM,EAE7B;CACF;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,aAAa,EACtB,UAAU,GAAE;IACV,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;CACvC,GACL,YAAY,CAsCd;AA+DD,KAAK,aAAa,GAAG,WAAW,GAAG,CAAC,uBAAuB,GAAG,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR } from '../../oracle_version.js';
|
|
2
|
+
import { LEGACY_ORACLE_REGISTRY } from './legacy_oracle_registry.js';
|
|
3
|
+
import { ORACLE_REGISTRY, makeEntry } from './oracle_registry.js';
|
|
4
|
+
export class UnavailableOracleError extends Error {
|
|
5
|
+
constructor(oracleName){
|
|
6
|
+
super(`${oracleName} oracles not available with the current handler`);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Builds an ACIR callback from the oracle registry and a handler object.
|
|
11
|
+
*
|
|
12
|
+
* Each oracle call is dispatched by matching the oracle name against the registry for serialization, parsing the
|
|
13
|
+
* `aztec_{scope}_{methodName}` convention to resolve the handler, and calling the method directly. Unknown oracle
|
|
14
|
+
* names produce enhanced error messages based on the contract's oracle version.
|
|
15
|
+
*/ export function buildACIRCallback(handler, registries = {}) {
|
|
16
|
+
const { real = ORACLE_REGISTRY, legacy: legacyRegistry = LEGACY_ORACLE_REGISTRY } = registries;
|
|
17
|
+
const target = {};
|
|
18
|
+
for (const [oracleKey, entry] of Object.entries(real)){
|
|
19
|
+
const { scope, methodName } = parseOracleName(oracleKey, 'Oracle');
|
|
20
|
+
target[oracleKey] = async (...inputs)=>{
|
|
21
|
+
assertHandlerSupportsScope(handler, scope);
|
|
22
|
+
const named = entry.deserializeParams(inputs);
|
|
23
|
+
const positional = named.map((p)=>p.value);
|
|
24
|
+
const result = await handler[methodName](...positional);
|
|
25
|
+
return entry.serializeReturn(result);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
// Legacy oracle names: served for contracts compiled against a retired oracle version. Each reuses the current
|
|
29
|
+
// handler of its `modernOracle` and reshapes the wire (params and/or return) back to what the old bytecode expects.
|
|
30
|
+
for (const [legacyKey, legacy] of Object.entries(legacyRegistry)){
|
|
31
|
+
const { scope } = parseOracleName(legacyKey, 'Legacy oracle');
|
|
32
|
+
if (legacyKey in target) {
|
|
33
|
+
throw new Error(`Legacy oracle "${legacyKey}" collides with a live oracle of the same name in the registry`);
|
|
34
|
+
}
|
|
35
|
+
const modernEntry = real[legacy.modernOracle];
|
|
36
|
+
const { methodName } = parseOracleName(legacy.modernOracle, 'Oracle');
|
|
37
|
+
// Override only the side whose wire changed; inherit the other from the modern entry.
|
|
38
|
+
const paramOverride = legacy.params;
|
|
39
|
+
const paramSource = paramOverride ? makeEntry({
|
|
40
|
+
params: [
|
|
41
|
+
...paramOverride.legacyType
|
|
42
|
+
]
|
|
43
|
+
}) : modernEntry;
|
|
44
|
+
const returnOverride = legacy.returnType;
|
|
45
|
+
const returnSource = returnOverride ? makeEntry({
|
|
46
|
+
returnType: returnOverride.legacyType
|
|
47
|
+
}) : modernEntry;
|
|
48
|
+
target[legacyKey] = async (...inputs)=>{
|
|
49
|
+
assertHandlerSupportsScope(handler, scope);
|
|
50
|
+
const legacyArgs = paramSource.deserializeParams(inputs).map((p)=>p.value);
|
|
51
|
+
const positional = paramOverride ? await paramOverride.mapping(legacyArgs) : legacyArgs;
|
|
52
|
+
const result = await handler[methodName](...positional);
|
|
53
|
+
return returnSource.serializeReturn(returnOverride ? returnOverride.mapping(result) : result);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
return new Proxy(target, makeUnknownOracleTrap(handler));
|
|
57
|
+
}
|
|
58
|
+
/** Parses an `aztec_{scope}_{method}` oracle name into its parts, throwing if it doesn't follow the convention. */ function parseOracleName(key, label) {
|
|
59
|
+
const match = key.match(/^aztec_(\w+?)_(.+)$/);
|
|
60
|
+
if (!match) {
|
|
61
|
+
throw new Error(`${label} "${key}" does not follow the aztec_{scope}_{method} convention`);
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
scope: match[1],
|
|
65
|
+
methodName: match[2]
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Proxy trap for the callback table: a known oracle name passes through; an unknown one throws a diagnostic keyed on
|
|
70
|
+
* the contract's oracle version (version unknown, contract newer than this environment, or a same-version mismatch).
|
|
71
|
+
*/ function makeUnknownOracleTrap(handler) {
|
|
72
|
+
return {
|
|
73
|
+
get (obj, prop) {
|
|
74
|
+
// Own-property check only: `in` would match inherited `Object.prototype` keys (e.g. `constructor`, `toString`)
|
|
75
|
+
// and return the built-in instead of falling through to the unknown-oracle diagnostic below.
|
|
76
|
+
if (Object.hasOwn(obj, prop)) {
|
|
77
|
+
return obj[prop];
|
|
78
|
+
}
|
|
79
|
+
return ()=>{
|
|
80
|
+
let contractVersion = undefined;
|
|
81
|
+
if ('nonOracleFunctionGetContractOracleVersion' in handler) {
|
|
82
|
+
contractVersion = handler.nonOracleFunctionGetContractOracleVersion();
|
|
83
|
+
}
|
|
84
|
+
if (!contractVersion) {
|
|
85
|
+
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`);
|
|
86
|
+
} else if (contractVersion.minor > ORACLE_VERSION_MINOR) {
|
|
87
|
+
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`);
|
|
88
|
+
} else {
|
|
89
|
+
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`);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function assertHandlerSupportsScope(handler, scope) {
|
|
96
|
+
switch(scope){
|
|
97
|
+
case 'misc':
|
|
98
|
+
if (!('isMisc' in handler)) {
|
|
99
|
+
throw new UnavailableOracleError('Misc');
|
|
100
|
+
}
|
|
101
|
+
break;
|
|
102
|
+
case 'utl':
|
|
103
|
+
if (!('isUtility' in handler)) {
|
|
104
|
+
throw new UnavailableOracleError('Utility');
|
|
105
|
+
}
|
|
106
|
+
break;
|
|
107
|
+
case 'prv':
|
|
108
|
+
if (!('isPrivate' in handler)) {
|
|
109
|
+
throw new UnavailableOracleError('Private');
|
|
110
|
+
}
|
|
111
|
+
break;
|
|
112
|
+
default:
|
|
113
|
+
throw new Error(`Unknown oracle scope: ${scope}`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from './acir_callback.js';
|
|
2
|
+
export * from './interfaces.js';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb250cmFjdF9mdW5jdGlvbl9zaW11bGF0b3Ivb3JhY2xlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxpQkFBaUIsQ0FBQyJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/oracle/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { HandlersForPrefix, ORACLE_REGISTRY } from './oracle_registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* Miscellaneous oracle methods, not very Aztec-specific and expected to be available in all scenarios in which aztec-nr
|
|
4
|
+
* code runs, except #[external("public")] functions (since those are transpiled to AVM bytecode, where there are no
|
|
5
|
+
* oracles).
|
|
6
|
+
*/
|
|
7
|
+
export type IMiscOracle = HandlersForPrefix<typeof ORACLE_REGISTRY, 'misc'> & {
|
|
8
|
+
isMisc: true;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Oracle methods associated with the execution of an Aztec #[external("utility")] function. Note that the IMiscOracle
|
|
12
|
+
* methods are also expected to be available in these contexts.
|
|
13
|
+
*/
|
|
14
|
+
export type IUtilityExecutionOracle = HandlersForPrefix<typeof ORACLE_REGISTRY, 'utl'> & {
|
|
15
|
+
isUtility: true;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Oracle methods associated with the execution of an Aztec #[external("private")] function. Note that both the
|
|
19
|
+
* IMiscOracle and IUtilityExecutionOracle methods are also expected to be available in these contexts.
|
|
20
|
+
*/
|
|
21
|
+
export type IPrivateExecutionOracle = HandlersForPrefix<typeof ORACLE_REGISTRY, 'prv'> & {
|
|
22
|
+
isPrivate: true;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9vcmFjbGUvaW50ZXJmYWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBRSxlQUFlLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUUvRTs7OztHQUlHO0FBQ0gsTUFBTSxNQUFNLFdBQVcsR0FBRyxpQkFBaUIsQ0FBQyxPQUFPLGVBQWUsRUFBRSxNQUFNLENBQUMsR0FBRztJQUFFLE1BQU0sRUFBRSxJQUFJLENBQUE7Q0FBRSxDQUFDO0FBRS9GOzs7R0FHRztBQUNILE1BQU0sTUFBTSx1QkFBdUIsR0FBRyxpQkFBaUIsQ0FBQyxPQUFPLGVBQWUsRUFBRSxLQUFLLENBQUMsR0FBRztJQUFFLFNBQVMsRUFBRSxJQUFJLENBQUE7Q0FBRSxDQUFDO0FBRTdHOzs7R0FHRztBQUNILE1BQU0sTUFBTSx1QkFBdUIsR0FBRyxpQkFBaUIsQ0FBQyxPQUFPLGVBQWUsRUFBRSxLQUFLLENBQUMsR0FBRztJQUFFLFNBQVMsRUFBRSxJQUFJLENBQUE7Q0FBRSxDQUFDIn0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/oracle/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE/E;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,CAAC,OAAO,eAAe,EAAE,MAAM,CAAC,GAAG;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,CAAC;AAE/F;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC,OAAO,eAAe,EAAE,KAAK,CAAC,GAAG;IAAE,SAAS,EAAE,IAAI,CAAA;CAAE,CAAC;AAE7G;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC,OAAO,eAAe,EAAE,KAAK,CAAC,GAAG;IAAE,SAAS,EAAE,IAAI,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ORACLE_REGISTRY, type RegistryParam } from './oracle_registry.js';
|
|
2
|
+
import { type TypeMapping } from './oracle_type_mappings.js';
|
|
3
|
+
/**
|
|
4
|
+
* Wire shapes that already-deployed contracts still call by their original oracle name, keyed by that retired name.
|
|
5
|
+
* New Aztec.nr calls the current name in `ORACLE_REGISTRY`; old bytecode keeps calling the name compiled into it and
|
|
6
|
+
* is served from here, so versioning an oracle's wire (e.g. adding return fields) stops being a breaking change.
|
|
7
|
+
*
|
|
8
|
+
* Append-only. Drop an entry only once the `ORACLE_VERSION_MAJOR` that introduced its successor is retired, since
|
|
9
|
+
* older contracts can no longer run against this environment.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LEGACY_ORACLE_REGISTRY: Record<string, LegacyOracleEntry>;
|
|
12
|
+
type Registry = typeof ORACLE_REGISTRY;
|
|
13
|
+
/**
|
|
14
|
+
* A legacy oracle adapter, stored under the retired oracle name that already-deployed contracts still call. It reuses
|
|
15
|
+
* the handler of `modernOracle` and overrides only the wire side(s) that changed; an omitted side falls back to that
|
|
16
|
+
* modern entry.
|
|
17
|
+
*/
|
|
18
|
+
export interface LegacyOracleEntry {
|
|
19
|
+
/** The current oracle whose handler this reuses and whose param/return wire it inherits by default. */
|
|
20
|
+
modernOracle: keyof Registry;
|
|
21
|
+
/**
|
|
22
|
+
* Old param wire. `legacyType` deserializes the old wire; `mapping` bridges the deserialized legacy args to the
|
|
23
|
+
* modern handler's args. The mapping may be async. Omit when the param wire is unchanged.
|
|
24
|
+
*/
|
|
25
|
+
params?: {
|
|
26
|
+
legacyType: readonly RegistryParam[];
|
|
27
|
+
mapping: (legacyArgs: any) => readonly unknown[] | Promise<readonly unknown[]>;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Old return wire. `legacyType` serializes the subset the old contract reads; `mapping` bridges the handler's
|
|
31
|
+
* current result to that subset's value type. Omit when the return wire is unchanged.
|
|
32
|
+
*/
|
|
33
|
+
returnType?: {
|
|
34
|
+
legacyType: TypeMapping;
|
|
35
|
+
mapping: (result: any) => unknown;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGVnYWN5X29yYWNsZV9yZWdpc3RyeS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9vcmFjbGUvbGVnYWN5X29yYWNsZV9yZWdpc3RyeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFTQSxPQUFPLEVBRUwsZUFBZSxFQUdmLEtBQUssYUFBYSxFQUNuQixNQUFNLHNCQUFzQixDQUFDO0FBQzlCLE9BQU8sRUFPTCxLQUFLLFdBQVcsRUFDakIsTUFBTSwyQkFBMkIsQ0FBQztBQXNCbkM7Ozs7Ozs7R0FPRztBQUNILGVBQU8sTUFBTSxzQkFBc0IsRUFBRSxNQUFNLENBQUMsTUFBTSxFQUFFLGlCQUFpQixDQW9DcEUsQ0FBQztBQWNGLEtBQUssUUFBUSxHQUFHLE9BQU8sZUFBZSxDQUFDO0FBUXZDOzs7O0dBSUc7QUFDSCxNQUFNLFdBQVcsaUJBQWlCO0lBQ2hDLHVHQUF1RztJQUN2RyxZQUFZLEVBQUUsTUFBTSxRQUFRLENBQUM7SUFDN0I7OztPQUdHO0lBQ0gsTUFBTSxDQUFDLEVBQUU7UUFDUCxVQUFVLEVBQUUsU0FBUyxhQUFhLEVBQUUsQ0FBQztRQUNyQyxPQUFPLEVBQUUsQ0FBQyxVQUFVLEVBQUUsR0FBRyxLQUFLLFNBQVMsT0FBTyxFQUFFLEdBQUcsT0FBTyxDQUFDLFNBQVMsT0FBTyxFQUFFLENBQUMsQ0FBQztLQUNoRixDQUFDO0lBQ0Y7OztPQUdHO0lBQ0gsVUFBVSxDQUFDLEVBQUU7UUFBRSxVQUFVLEVBQUUsV0FBVyxDQUFDO1FBQUMsT0FBTyxFQUFFLENBQUMsTUFBTSxFQUFFLEdBQUcsS0FBSyxPQUFPLENBQUE7S0FBRSxDQUFDO0NBQzdFIn0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy_oracle_registry.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/oracle/legacy_oracle_registry.ts"],"names":[],"mappings":"AASA,OAAO,EAEL,eAAe,EAGf,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAOL,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;AAsBnC;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAoCpE,CAAC;AAcF,KAAK,QAAQ,GAAG,OAAO,eAAe,CAAC;AAQvC;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,uGAAuG;IACvG,YAAY,EAAE,MAAM,QAAQ,CAAC;IAC7B;;;OAGG;IACH,MAAM,CAAC,EAAE;QACP,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;QACrC,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,KAAK,SAAS,OAAO,EAAE,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC,CAAC;KAChF,CAAC;IACF;;;OAGG;IACH,UAAU,CAAC,EAAE;QAAE,UAAU,EAAE,WAAW,CAAC;QAAC,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,CAAA;KAAE,CAAC;CAC7E"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/* eslint-disable camelcase */ import { MAX_NOTE_HASHES_PER_TX, PRIVATE_LOG_CIPHERTEXT_LEN, PRIVATE_LOG_SIZE_IN_FIELDS } from '@aztec-labs/constants';
|
|
2
|
+
import { computeFeeJuiceMessageNullifier } from '@aztec-labs/stdlib/messaging';
|
|
3
|
+
import { Option } from '../noir-structs/option.js';
|
|
4
|
+
import { AZTEC_ADDRESS, EPHEMERAL_ARRAY, FIELD, FIXED_BOUNDED_VEC, STRUCT, TX_HASH } from './oracle_type_mappings.js';
|
|
5
|
+
const LEGACY_LOG_RETRIEVAL_RESPONSE = STRUCT([
|
|
6
|
+
{
|
|
7
|
+
name: 'logPayload',
|
|
8
|
+
type: FIXED_BOUNDED_VEC(FIELD, PRIVATE_LOG_CIPHERTEXT_LEN)
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: 'txHash',
|
|
12
|
+
type: TX_HASH
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'uniqueNoteHashesInTx',
|
|
16
|
+
type: FIXED_BOUNDED_VEC(FIELD, MAX_NOTE_HASHES_PER_TX)
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'firstNullifierInTx',
|
|
20
|
+
type: FIELD
|
|
21
|
+
}
|
|
22
|
+
]);
|
|
23
|
+
// Block-less transaction context: the prefix of `ResolvedTx`'s wire carried by the original `getPendingTaggedLogs`
|
|
24
|
+
// oracle. Known as `MessageContext` in the Aztec.nr versions that call that oracle.
|
|
25
|
+
const LEGACY_MESSAGE_CONTEXT = STRUCT([
|
|
26
|
+
{
|
|
27
|
+
name: 'txHash',
|
|
28
|
+
type: TX_HASH
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'uniqueNoteHashesInTx',
|
|
32
|
+
type: FIXED_BOUNDED_VEC(FIELD, MAX_NOTE_HASHES_PER_TX)
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'firstNullifierInTx',
|
|
36
|
+
type: FIELD
|
|
37
|
+
}
|
|
38
|
+
]);
|
|
39
|
+
const LEGACY_PENDING_TAGGED_LOG = STRUCT([
|
|
40
|
+
{
|
|
41
|
+
name: 'log',
|
|
42
|
+
type: FIXED_BOUNDED_VEC(FIELD, PRIVATE_LOG_SIZE_IN_FIELDS)
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'context',
|
|
46
|
+
type: LEGACY_MESSAGE_CONTEXT
|
|
47
|
+
}
|
|
48
|
+
]);
|
|
49
|
+
/**
|
|
50
|
+
* Wire shapes that already-deployed contracts still call by their original oracle name, keyed by that retired name.
|
|
51
|
+
* New Aztec.nr calls the current name in `ORACLE_REGISTRY`; old bytecode keeps calling the name compiled into it and
|
|
52
|
+
* is served from here, so versioning an oracle's wire (e.g. adding return fields) stops being a breaking change.
|
|
53
|
+
*
|
|
54
|
+
* Append-only. Drop an entry only once the `ORACLE_VERSION_MAJOR` that introduced its successor is retired, since
|
|
55
|
+
* older contracts can no longer run against this environment.
|
|
56
|
+
*/ export const LEGACY_ORACLE_REGISTRY = {
|
|
57
|
+
aztec_utl_getL1ToL2MembershipWitness: legacyOracle({
|
|
58
|
+
modernOracle: 'aztec_utl_getL1ToL2MembershipWitnessV2',
|
|
59
|
+
// The old wire passed the contract address and secret, the modern oracle takes the unsiloed nullifier (plus the
|
|
60
|
+
// address to silo it with) instead. We derive it here so already-deployed contracts that still emit the old call
|
|
61
|
+
// keep working.
|
|
62
|
+
//
|
|
63
|
+
// This is the fee juice message nullifier derivation: only contracts using that scheme call this retired oracle.
|
|
64
|
+
params: {
|
|
65
|
+
legacyType: [
|
|
66
|
+
{
|
|
67
|
+
name: 'contractAddress',
|
|
68
|
+
type: AZTEC_ADDRESS
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'messageHash',
|
|
72
|
+
type: FIELD
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'secret',
|
|
76
|
+
type: FIELD
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
mapping: async ([contractAddress, messageHash, secret])=>[
|
|
80
|
+
messageHash,
|
|
81
|
+
Option.some({
|
|
82
|
+
contractAddress,
|
|
83
|
+
nullifier: await computeFeeJuiceMessageNullifier(messageHash, secret)
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
}),
|
|
88
|
+
aztec_utl_getLogsByTag: legacyOracle({
|
|
89
|
+
modernOracle: 'aztec_utl_getLogsByTagV2',
|
|
90
|
+
returnType: {
|
|
91
|
+
legacyType: EPHEMERAL_ARRAY(EPHEMERAL_ARRAY(LEGACY_LOG_RETRIEVAL_RESPONSE)),
|
|
92
|
+
// We can map this directly, since the new type is a superset of the old type
|
|
93
|
+
mapping: (result)=>result
|
|
94
|
+
}
|
|
95
|
+
}),
|
|
96
|
+
aztec_utl_getPendingTaggedLogs: legacyOracle({
|
|
97
|
+
modernOracle: 'aztec_utl_getPendingTaggedLogsV2',
|
|
98
|
+
returnType: {
|
|
99
|
+
legacyType: EPHEMERAL_ARRAY(LEGACY_PENDING_TAGGED_LOG),
|
|
100
|
+
// We can map this directly, since `ResolvedTx` carries the legacy context's fields under the same names
|
|
101
|
+
mapping: (result)=>result
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
};
|
|
105
|
+
function legacyOracle(entry) {
|
|
106
|
+
return entry;
|
|
107
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Fr } from '@aztec-labs/foundation/curves/bn254';
|
|
2
|
+
import type { AztecAddress } from '@aztec-labs/stdlib/aztec-address';
|
|
3
|
+
import type { Note } from '@aztec-labs/stdlib/note';
|
|
4
|
+
/**
|
|
5
|
+
* Packs a note in a format that is compatible with the default Packable implementation of the hinted note.
|
|
6
|
+
*
|
|
7
|
+
* @dev Unlike the default Packable implementation, this function first constructs the note metadata from the inputs
|
|
8
|
+
* and only after that it packs the hinted note. Hence it doesn't map one to one with `HintedNote::pack()`.
|
|
9
|
+
*
|
|
10
|
+
* @param contractAddress - The address of the contract that owns the note
|
|
11
|
+
* @param owner - The owner of the note
|
|
12
|
+
* @param randomness - The randomness injected into the note to get the hiding property of commitments
|
|
13
|
+
* @param storageSlot - The storage slot of the note
|
|
14
|
+
* @param noteNonce - The nonce injected into the note hash preimage by kernels.
|
|
15
|
+
* @param isPending - True if the note is pending, false if settled
|
|
16
|
+
* @param note - The note content containing the actual note data
|
|
17
|
+
* @returns The packed note as an array of field elements
|
|
18
|
+
*/
|
|
19
|
+
export declare function packAsHintedNote({ contractAddress, owner, randomness, storageSlot, noteNonce, isPending, note }: {
|
|
20
|
+
contractAddress: AztecAddress;
|
|
21
|
+
owner: AztecAddress;
|
|
22
|
+
randomness: Fr;
|
|
23
|
+
storageSlot: Fr;
|
|
24
|
+
noteNonce: Fr;
|
|
25
|
+
isPending: boolean;
|
|
26
|
+
note: Note;
|
|
27
|
+
}): Fr[];
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90ZV9wYWNraW5nX3V0aWxzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL29yYWNsZS9ub3RlX3BhY2tpbmdfdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLHFDQUFxQyxDQUFDO0FBQ3pELE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBQ3JFLE9BQU8sS0FBSyxFQUFFLElBQUksRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBaUJwRDs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUNILHdCQUFnQixnQkFBZ0IsQ0FBQyxFQUMvQixlQUFlLEVBQ2YsS0FBSyxFQUNMLFVBQVUsRUFDVixXQUFXLEVBQ1gsU0FBUyxFQUNULFNBQVMsRUFDVCxJQUFJLEVBQ0wsRUFBRTtJQUNELGVBQWUsRUFBRSxZQUFZLENBQUM7SUFDOUIsS0FBSyxFQUFFLFlBQVksQ0FBQztJQUNwQixVQUFVLEVBQUUsRUFBRSxDQUFDO0lBQ2YsV0FBVyxFQUFFLEVBQUUsQ0FBQztJQUNoQixTQUFTLEVBQUUsRUFBRSxDQUFDO0lBQ2QsU0FBUyxFQUFFLE9BQU8sQ0FBQztJQUNuQixJQUFJLEVBQUUsSUFBSSxDQUFDO0NBQ1osR0FBRyxFQUFFLEVBQUUsQ0FpQlAifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note_packing_utils.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/oracle/note_packing_utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,qCAAqC,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAiBpD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,eAAe,EACf,KAAK,EACL,UAAU,EACV,WAAW,EACX,SAAS,EACT,SAAS,EACT,IAAI,EACL,EAAE;IACD,eAAe,EAAE,YAAY,CAAC;IAC9B,KAAK,EAAE,YAAY,CAAC;IACpB,UAAU,EAAE,EAAE,CAAC;IACf,WAAW,EAAE,EAAE,CAAC;IAChB,SAAS,EAAE,EAAE,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;CACZ,GAAG,EAAE,EAAE,CAiBP"}
|