@aztec/pxe 3.0.0-canary.a9708bd → 3.0.0-devnet.20251212
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 +5 -5
- package/dest/bin/check_oracle_version.d.ts +1 -1
- package/dest/bin/check_oracle_version.js +110 -10
- package/dest/config/index.d.ts +9 -17
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +10 -16
- package/dest/config/package_info.d.ts +1 -1
- package/dest/config/package_info.js +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +6 -6
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +97 -42
- package/dest/contract_function_simulator/execution_data_provider.d.ts +40 -57
- package/dest/contract_function_simulator/execution_data_provider.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_note_cache.d.ts +11 -9
- package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_note_cache.js +28 -17
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +16 -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 +26 -0
- 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 +4 -2
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +2 -1
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +2 -2
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +2 -2
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +3 -3
- 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 +8 -4
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +6 -3
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.js +12 -3
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +22 -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 +33 -0
- package/dest/contract_function_simulator/oracle/index.d.ts +2 -2
- package/dest/contract_function_simulator/oracle/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/index.js +1 -1
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +104 -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/message_load_oracle_inputs.d.ts +2 -4
- 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 +10 -4
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +10 -5
- package/dest/contract_function_simulator/oracle/oracle.d.ts +17 -15
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +101 -81
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +6 -5
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.js +7 -16
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +34 -22
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +89 -25
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +23 -33
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +38 -42
- package/dest/contract_function_simulator/pick_notes.d.ts +2 -2
- package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
- package/dest/contract_function_simulator/pick_notes.js +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
- package/dest/contract_function_simulator/proxied_node.d.ts +1 -1
- package/dest/contract_function_simulator/proxied_node.d.ts.map +1 -1
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts +34 -68
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +1 -1
- package/dest/contract_function_simulator/pxe_oracle_interface.js +220 -208
- package/dest/entrypoints/client/bundle/index.d.ts +4 -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 +9 -9
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +12 -12
- package/dest/entrypoints/client/lazy/index.d.ts +4 -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 +8 -8
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +11 -11
- package/dest/entrypoints/pxe_creation_options.d.ts +3 -1
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/server/index.d.ts +4 -2
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +2 -1
- package/dest/entrypoints/server/utils.d.ts +5 -24
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +9 -41
- package/dest/error_enriching.d.ts +11 -0
- package/dest/error_enriching.d.ts.map +1 -0
- package/dest/{pxe_service/error_enriching.js → error_enriching.js} +3 -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 +8 -0
- package/dest/events/private_event_filter_validator.d.ts.map +1 -0
- package/dest/events/private_event_filter_validator.js +39 -0
- package/dest/oracle_version.d.ts +3 -3
- package/dest/oracle_version.js +2 -2
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +3 -3
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +1 -1
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.js +7 -7
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +1 -1
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.js +6 -6
- package/dest/private_kernel/hints/index.d.ts +1 -1
- package/dest/private_kernel/index.d.ts +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +9 -2
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +38 -32
- package/dest/private_kernel/private_kernel_oracle.d.ts +3 -2
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts +8 -7
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +1 -1
- package/dest/pxe.d.ts +240 -0
- package/dest/pxe.d.ts.map +1 -0
- package/dest/{pxe_service/pxe_service.js → pxe.js} +227 -241
- package/dest/storage/address_data_provider/address_data_provider.d.ts +2 -4
- package/dest/storage/address_data_provider/address_data_provider.d.ts.map +1 -1
- package/dest/storage/address_data_provider/address_data_provider.js +0 -3
- package/dest/storage/address_data_provider/index.d.ts +1 -1
- package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +3 -5
- package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +1 -1
- package/dest/storage/capsule_data_provider/capsule_data_provider.js +1 -5
- package/dest/storage/capsule_data_provider/index.d.ts +1 -1
- package/dest/storage/contract_data_provider/contract_data_provider.d.ts +6 -17
- package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +1 -1
- package/dest/storage/contract_data_provider/contract_data_provider.js +0 -15
- package/dest/storage/contract_data_provider/index.d.ts +1 -1
- package/dest/storage/contract_data_provider/private_functions_tree.d.ts +1 -1
- package/dest/storage/contract_data_provider/private_functions_tree.d.ts.map +1 -1
- package/dest/storage/contract_data_provider/private_functions_tree.js +1 -1
- package/dest/storage/index.d.ts +1 -2
- package/dest/storage/index.d.ts.map +1 -1
- package/dest/storage/index.js +0 -1
- package/dest/storage/metadata.d.ts +1 -1
- package/dest/storage/note_data_provider/index.d.ts +2 -2
- package/dest/storage/note_data_provider/index.d.ts.map +1 -1
- package/dest/storage/note_data_provider/index.js +1 -1
- package/dest/storage/note_data_provider/note_data_provider.d.ts +75 -11
- package/dest/storage/note_data_provider/note_data_provider.d.ts.map +1 -1
- package/dest/storage/note_data_provider/note_data_provider.js +143 -81
- package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +31 -17
- package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +1 -1
- package/dest/storage/private_event_data_provider/private_event_data_provider.js +47 -28
- package/dest/storage/sync_data_provider/index.d.ts +1 -1
- package/dest/storage/sync_data_provider/sync_data_provider.d.ts +4 -5
- package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +1 -1
- package/dest/storage/sync_data_provider/sync_data_provider.js +0 -3
- package/dest/storage/tagging_data_provider/index.d.ts +1 -1
- package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +29 -7
- package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +1 -1
- package/dest/storage/tagging_data_provider/tagging_data_provider.js +46 -39
- package/dest/synchronizer/index.d.ts +1 -1
- package/dest/synchronizer/synchronizer.d.ts +3 -2
- package/dest/synchronizer/synchronizer.d.ts.map +1 -1
- package/dest/synchronizer/synchronizer.js +4 -4
- package/dest/tagging/constants.d.ts +2 -0
- package/dest/tagging/constants.d.ts.map +1 -0
- package/dest/tagging/constants.js +2 -0
- package/dest/tagging/index.d.ts +7 -0
- package/dest/tagging/index.d.ts.map +1 -0
- package/dest/tagging/index.js +5 -0
- package/dest/tagging/siloed_tag.d.ts +14 -0
- package/dest/tagging/siloed_tag.d.ts.map +1 -0
- package/dest/tagging/siloed_tag.js +20 -0
- package/dest/tagging/tag.d.ts +12 -0
- package/dest/tagging/tag.d.ts.map +1 -0
- package/dest/tagging/tag.js +17 -0
- package/dest/tagging/utils.d.ts +18 -0
- package/dest/tagging/utils.d.ts.map +1 -0
- package/dest/tagging/utils.js +24 -0
- package/package.json +22 -24
- package/src/bin/check_oracle_version.ts +134 -10
- package/src/config/index.ts +18 -32
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/contract_function_simulator.ts +151 -62
- package/src/contract_function_simulator/execution_data_provider.ts +47 -65
- package/src/contract_function_simulator/execution_note_cache.ts +33 -17
- package/src/contract_function_simulator/execution_tagging_index_cache.ts +32 -0
- package/src/contract_function_simulator/hashed_values_cache.ts +1 -1
- package/src/contract_function_simulator/index.ts +3 -1
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +1 -1
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +1 -1
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +10 -5
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +14 -2
- package/src/contract_function_simulator/noir-structs/utility_context.ts +42 -0
- package/src/contract_function_simulator/oracle/index.ts +1 -1
- package/src/contract_function_simulator/oracle/interfaces.ts +176 -0
- package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +1 -1
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +21 -5
- package/src/contract_function_simulator/oracle/oracle.ts +135 -80
- package/src/contract_function_simulator/oracle/private_execution.ts +10 -17
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +123 -49
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +68 -80
- package/src/contract_function_simulator/pick_notes.ts +1 -1
- package/src/contract_function_simulator/pxe_oracle_interface.ts +291 -271
- package/src/entrypoints/client/bundle/index.ts +3 -1
- package/src/entrypoints/client/bundle/utils.ts +15 -23
- package/src/entrypoints/client/lazy/index.ts +3 -1
- package/src/entrypoints/client/lazy/utils.ts +14 -22
- package/src/entrypoints/pxe_creation_options.ts +2 -0
- package/src/entrypoints/server/index.ts +3 -1
- package/src/entrypoints/server/utils.ts +12 -56
- package/src/{pxe_service/error_enriching.ts → error_enriching.ts} +5 -1
- package/src/events/index.ts +1 -0
- package/src/events/private_event_filter_validator.ts +47 -0
- package/src/oracle_version.ts +2 -2
- package/src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts +5 -9
- package/src/private_kernel/hints/compute_tx_include_by_timestamp.ts +6 -6
- package/src/private_kernel/private_kernel_execution_prover.ts +51 -43
- package/src/private_kernel/private_kernel_oracle.ts +2 -1
- package/src/private_kernel/private_kernel_oracle_impl.ts +4 -3
- package/src/{pxe_service/pxe_service.ts → pxe.ts} +256 -308
- package/src/storage/address_data_provider/address_data_provider.ts +1 -7
- package/src/storage/capsule_data_provider/capsule_data_provider.ts +2 -12
- package/src/storage/contract_data_provider/contract_data_provider.ts +4 -27
- package/src/storage/contract_data_provider/private_functions_tree.ts +1 -1
- package/src/storage/index.ts +0 -1
- package/src/storage/note_data_provider/index.ts +1 -1
- package/src/storage/note_data_provider/note_data_provider.ts +171 -109
- package/src/storage/private_event_data_provider/private_event_data_provider.ts +69 -41
- package/src/storage/sync_data_provider/sync_data_provider.ts +3 -8
- package/src/storage/tagging_data_provider/tagging_data_provider.ts +52 -55
- package/src/synchronizer/synchronizer.ts +4 -4
- package/src/tagging/constants.ts +2 -0
- package/src/tagging/index.ts +6 -0
- package/src/tagging/siloed_tag.ts +22 -0
- package/src/tagging/tag.ts +16 -0
- package/src/tagging/utils.ts +31 -0
- package/dest/bin/index.d.ts +0 -3
- package/dest/bin/index.d.ts.map +0 -1
- package/dest/bin/index.js +0 -48
- package/dest/contract_function_simulator/oracle/typed_oracle.d.ts +0 -87
- package/dest/contract_function_simulator/oracle/typed_oracle.d.ts.map +0 -1
- package/dest/contract_function_simulator/oracle/typed_oracle.js +0 -146
- package/dest/contract_function_simulator/tagging_utils.d.ts +0 -17
- package/dest/contract_function_simulator/tagging_utils.d.ts.map +0 -1
- package/dest/contract_function_simulator/tagging_utils.js +0 -23
- package/dest/pxe_service/error_enriching.d.ts +0 -11
- package/dest/pxe_service/error_enriching.d.ts.map +0 -1
- package/dest/pxe_service/index.d.ts +0 -3
- package/dest/pxe_service/index.d.ts.map +0 -1
- package/dest/pxe_service/index.js +0 -2
- package/dest/pxe_service/pxe_service.d.ts +0 -100
- package/dest/pxe_service/pxe_service.d.ts.map +0 -1
- package/dest/storage/data_provider.d.ts +0 -4
- package/dest/storage/data_provider.d.ts.map +0 -1
- package/dest/storage/data_provider.js +0 -1
- 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/test/pxe_test_suite.d.ts +0 -3
- package/dest/test/pxe_test_suite.d.ts.map +0 -1
- package/dest/test/pxe_test_suite.js +0 -97
- package/src/bin/index.ts +0 -62
- package/src/contract_function_simulator/oracle/typed_oracle.ts +0 -289
- package/src/contract_function_simulator/tagging_utils.ts +0 -32
- package/src/pxe_service/index.ts +0 -2
- package/src/storage/data_provider.ts +0 -3
- package/src/storage/note_data_provider/note_dao.ts +0 -154
- package/src/test/pxe_test_suite.ts +0 -113
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
+
import type { Point } from '@aztec/foundation/curves/grumpkin';
|
|
5
|
+
import type { FunctionArtifactWithContractName, FunctionSelector } from '@aztec/stdlib/abi';
|
|
4
6
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
7
|
import type { L2Block } from '@aztec/stdlib/block';
|
|
6
8
|
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
7
9
|
import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
|
|
8
|
-
import {
|
|
10
|
+
import type { DirectionalAppTaggingSecret } from '@aztec/stdlib/logs';
|
|
9
11
|
import type { NoteStatus } from '@aztec/stdlib/note';
|
|
10
12
|
import { type MerkleTreeId, type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
|
|
11
13
|
import type { BlockHeader, NodeStats } from '@aztec/stdlib/tx';
|
|
12
|
-
import type {
|
|
14
|
+
import type { NoteData } from './oracle/interfaces.js';
|
|
13
15
|
import type { MessageLoadOracleInputs } from './oracle/message_load_oracle_inputs.js';
|
|
14
|
-
import type { NoteData } from './oracle/typed_oracle.js';
|
|
15
16
|
/**
|
|
16
17
|
* Error thrown when a contract is not found in the database.
|
|
17
18
|
*/
|
|
@@ -60,12 +61,13 @@ export interface ExecutionDataProvider {
|
|
|
60
61
|
* Returns an object containing an array of note data.
|
|
61
62
|
*
|
|
62
63
|
* @param contractAddress - The contract address of the notes.
|
|
64
|
+
* @param owner - The owner of the notes. If undefined, returns notes for all owners.
|
|
63
65
|
* @param storageSlot - The storage slot of the notes.
|
|
64
66
|
* @param status - The status of notes to fetch.
|
|
65
67
|
* @param scopes - The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
66
68
|
* @returns A Promise that resolves to an array of note data.
|
|
67
69
|
*/
|
|
68
|
-
getNotes(contractAddress: AztecAddress, storageSlot: Fr, status: NoteStatus, scopes?: AztecAddress[]): Promise<NoteData[]>;
|
|
70
|
+
getNotes(contractAddress: AztecAddress, owner: AztecAddress | undefined, storageSlot: Fr, status: NoteStatus, scopes?: AztecAddress[]): Promise<NoteData[]>;
|
|
69
71
|
/**
|
|
70
72
|
* Retrieve the artifact information of a specific function within a contract.
|
|
71
73
|
* The function is identified by its selector, which is a unique identifier generated from the function signature.
|
|
@@ -81,15 +83,6 @@ export interface ExecutionDataProvider {
|
|
|
81
83
|
* @param selector - The corresponding function selector.
|
|
82
84
|
*/
|
|
83
85
|
getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
|
|
84
|
-
/**
|
|
85
|
-
* Retrieves the artifact of a specified function within a given contract.
|
|
86
|
-
* The function is identified by its name, which is unique within a contract.
|
|
87
|
-
*
|
|
88
|
-
* @param contractAddress - The AztecAddress representing the contract containing the function.
|
|
89
|
-
* @param functionName - The name of the function.
|
|
90
|
-
* @returns The corresponding function's artifact as an object.
|
|
91
|
-
*/
|
|
92
|
-
getFunctionArtifactByName(contractAddress: AztecAddress, functionName: string): Promise<FunctionArtifact | undefined>;
|
|
93
86
|
/**
|
|
94
87
|
* Gets the index of a nullifier in the nullifier tree.
|
|
95
88
|
* @param nullifier - The nullifier.
|
|
@@ -112,11 +105,12 @@ export interface ExecutionDataProvider {
|
|
|
112
105
|
*/
|
|
113
106
|
getL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
|
|
114
107
|
/**
|
|
115
|
-
* Retrieve the latest block header synchronized by the
|
|
116
|
-
*
|
|
117
|
-
*
|
|
108
|
+
* Retrieve the latest block header synchronized by the execution data provider. This block header is referred
|
|
109
|
+
* to as the anchor block header in Aztec terminology and it defines the state that is used during private function
|
|
110
|
+
* execution.
|
|
111
|
+
* @returns The anchor block header.
|
|
118
112
|
*/
|
|
119
|
-
|
|
113
|
+
getAnchorBlockHeader(): Promise<BlockHeader>;
|
|
120
114
|
/**
|
|
121
115
|
* Fetches the index and sibling path of a leaf at a given block from a given tree.
|
|
122
116
|
* @param blockNumber - The block number at which to get the membership witness.
|
|
@@ -124,14 +118,14 @@ export interface ExecutionDataProvider {
|
|
|
124
118
|
* @param leafValue - The leaf value
|
|
125
119
|
* @returns The index and sibling path concatenated [index, sibling_path]
|
|
126
120
|
*/
|
|
127
|
-
getMembershipWitness(blockNumber:
|
|
121
|
+
getMembershipWitness(blockNumber: BlockNumber, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]>;
|
|
128
122
|
/**
|
|
129
123
|
* Returns a nullifier membership witness for a given nullifier at a given block.
|
|
130
124
|
* @param blockNumber - The block number at which to get the index.
|
|
131
125
|
* @param nullifier - Nullifier we try to find witness for.
|
|
132
126
|
* @returns The nullifier membership witness (if found).
|
|
133
127
|
*/
|
|
134
|
-
getNullifierMembershipWitness(blockNumber:
|
|
128
|
+
getNullifierMembershipWitness(blockNumber: BlockNumber, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
135
129
|
/**
|
|
136
130
|
* Returns a low nullifier membership witness for a given nullifier at a given block.
|
|
137
131
|
* @param blockNumber - The block number at which to get the index.
|
|
@@ -141,13 +135,13 @@ export interface ExecutionDataProvider {
|
|
|
141
135
|
* list structure" of leaves and proving that a lower nullifier is pointing to a bigger next value than the nullifier
|
|
142
136
|
* we are trying to prove non-inclusion for.
|
|
143
137
|
*/
|
|
144
|
-
getLowNullifierMembershipWitness(blockNumber:
|
|
138
|
+
getLowNullifierMembershipWitness(blockNumber: BlockNumber, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
145
139
|
/**
|
|
146
140
|
* Returns a witness for a given slot of the public data tree at a given block.
|
|
147
141
|
* @param blockNumber - The block number at which to get the witness.
|
|
148
142
|
* @param leafSlot - The slot of the public data in the public data tree.
|
|
149
143
|
*/
|
|
150
|
-
getPublicDataWitness(blockNumber:
|
|
144
|
+
getPublicDataWitness(blockNumber: BlockNumber, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
|
|
151
145
|
/**
|
|
152
146
|
* Gets the storage value at the given contract storage slot.
|
|
153
147
|
*
|
|
@@ -160,54 +154,43 @@ export interface ExecutionDataProvider {
|
|
|
160
154
|
* @returns Storage value at the given contract slot.
|
|
161
155
|
* @throws If the contract is not deployed.
|
|
162
156
|
*/
|
|
163
|
-
getPublicStorageAt(blockNumber:
|
|
157
|
+
getPublicStorageAt(blockNumber: BlockNumber, contract: AztecAddress, slot: Fr): Promise<Fr>;
|
|
164
158
|
/**
|
|
165
159
|
* Fetch a block corresponding to the given block number.
|
|
166
160
|
* @param blockNumber - The block number of a block to fetch.
|
|
167
161
|
* @returns - The block corresponding to the given block number. Undefined if it does not exist.
|
|
168
162
|
*/
|
|
169
|
-
getBlock(blockNumber:
|
|
163
|
+
getBlock(blockNumber: BlockNumber): Promise<L2Block | undefined>;
|
|
170
164
|
/**
|
|
171
165
|
* Assert that the oracle version is compatible with the expected version.
|
|
172
166
|
* @param version - The expected version.
|
|
173
167
|
*/
|
|
174
168
|
assertCompatibleOracleVersion(version: number): void;
|
|
175
169
|
/**
|
|
176
|
-
*
|
|
177
|
-
* @returns The block number.
|
|
178
|
-
*/
|
|
179
|
-
getBlockNumber(): Promise<number>;
|
|
180
|
-
/**
|
|
181
|
-
* Fetches the timestamp of the latest block synchronized by the node.
|
|
182
|
-
* @returns The timestamp.
|
|
183
|
-
*/
|
|
184
|
-
getTimestamp(): Promise<UInt64>;
|
|
185
|
-
/**
|
|
186
|
-
* Fetches the current chain id.
|
|
187
|
-
* @returns The chain id.
|
|
188
|
-
*/
|
|
189
|
-
getChainId(): Promise<number>;
|
|
190
|
-
/**
|
|
191
|
-
* Fetches the current chain id.
|
|
192
|
-
* @returns The chain id.
|
|
193
|
-
*/
|
|
194
|
-
getVersion(): Promise<number>;
|
|
195
|
-
/**
|
|
196
|
-
* Returns the tagging secret for a given sender and recipient pair. For this to work, the ivsk_m of the sender must be known.
|
|
197
|
-
* Includes the next index to be used used for tagging with this secret.
|
|
170
|
+
* Calculates the directional app tagging secret for a given contract, sender and recipient.
|
|
198
171
|
* @param contractAddress - The contract address to silo the secret for
|
|
199
172
|
* @param sender - The address sending the note
|
|
200
173
|
* @param recipient - The address receiving the note
|
|
201
|
-
* @returns
|
|
174
|
+
* @returns The directional app tagging secret
|
|
202
175
|
*/
|
|
203
|
-
|
|
176
|
+
calculateDirectionalAppTaggingSecret(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<DirectionalAppTaggingSecret>;
|
|
204
177
|
/**
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
* @param
|
|
208
|
-
*
|
|
178
|
+
* Updates the local index of the shared tagging secret of a (sender, recipient, contract) tuple if a log with
|
|
179
|
+
* a larger index is found from the node.
|
|
180
|
+
* @param secret - The secret that's unique for (sender, recipient, contract) tuple while the direction
|
|
181
|
+
* of sender -> recipient matters.
|
|
182
|
+
* @param contractAddress - The address of the contract that the logs are tagged for. Needs to be provided to store
|
|
183
|
+
* because the function performs second round of siloing which is necessary because kernels do it as well (they silo
|
|
184
|
+
* first field of the private log which corresponds to the tag).
|
|
185
|
+
*/
|
|
186
|
+
syncTaggedLogsAsSender(secret: DirectionalAppTaggingSecret, contractAddress: AztecAddress): Promise<void>;
|
|
187
|
+
/**
|
|
188
|
+
* Returns the last used index when sending a log with a given secret.
|
|
189
|
+
* @param secret - The directional app tagging secret.
|
|
190
|
+
* @returns The last used index for the given directional app tagging secret, or undefined if we never sent a log
|
|
191
|
+
* from this sender to a recipient in a given contract (implicitly included in the secret).
|
|
209
192
|
*/
|
|
210
|
-
|
|
193
|
+
getLastUsedIndexAsSender(secret: DirectionalAppTaggingSecret): Promise<number | undefined>;
|
|
211
194
|
/**
|
|
212
195
|
* Synchronizes the private logs tagged with scoped addresses and all the senders in the address book. Stores the found
|
|
213
196
|
* logs in CapsuleArray ready for a later retrieval in Aztec.nr.
|
|
@@ -230,9 +213,9 @@ export interface ExecutionDataProvider {
|
|
|
230
213
|
validateEnqueuedNotesAndEvents(contractAddress: AztecAddress, noteValidationRequestsArrayBaseSlot: Fr, eventValidationRequestsArrayBaseSlot: Fr): Promise<void>;
|
|
231
214
|
bulkRetrieveLogs(contractAddress: AztecAddress, logRetrievalRequestsArrayBaseSlot: Fr, logRetrievalResponsesArrayBaseSlot: Fr): Promise<void>;
|
|
232
215
|
/**
|
|
233
|
-
*
|
|
216
|
+
* Looks for nullifiers of active contract notes and marks them as nullified in the db if a nullifier is found.
|
|
234
217
|
*/
|
|
235
|
-
|
|
218
|
+
syncNoteNullifiers(contractAddress: AztecAddress): Promise<void>;
|
|
236
219
|
/**
|
|
237
220
|
* Stores arbitrary information in a per-contract non-volatile database, which can later be retrieved with `loadCapsule`.
|
|
238
221
|
* * If data was already stored at this slot, it is overwritten.
|
|
@@ -282,4 +265,4 @@ export interface ExecutionDataProvider {
|
|
|
282
265
|
*/
|
|
283
266
|
getStats(): ExecutionStats;
|
|
284
267
|
}
|
|
285
|
-
//# sourceMappingURL=
|
|
268
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhlY3V0aW9uX2RhdGFfcHJvdmlkZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cmFjdF9mdW5jdGlvbl9zaW11bGF0b3IvZXhlY3V0aW9uX2RhdGFfcHJvdmlkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsd0JBQXdCLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUNqRSxPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUNuRSxPQUFPLEtBQUssRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUN6RCxPQUFPLEtBQUssRUFBRSxLQUFLLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUMvRCxPQUFPLEtBQUss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LEtBQUssR0FBRyxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUM7SUFFckU7OztPQUdHO0lBQ0gsUUFBUSxJQUFJLGNBQWMsQ0FBQztDQUM1QiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution_data_provider.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution_data_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"execution_data_provider.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution_data_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,KAAK,EAAE,gCAAgC,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC5G,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAA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AIG;IACH,aAAa,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtE;;;;;;;;;;OAUG;IACH,WAAW,CAAC,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExG;;;;;OAKG;IACH,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAErE;;;OAGG;IACH,QAAQ,IAAI,cAAc,CAAC;CAC5B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
-
import type { NoteData } from './oracle/
|
|
3
|
+
import type { NoteData } from './oracle/interfaces.js';
|
|
4
4
|
interface PendingNote {
|
|
5
5
|
note: NoteData;
|
|
6
6
|
counter: number;
|
|
@@ -11,7 +11,7 @@ interface PendingNote {
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class ExecutionNoteCache {
|
|
13
13
|
#private;
|
|
14
|
-
private readonly
|
|
14
|
+
private readonly protocolNullifier;
|
|
15
15
|
/**
|
|
16
16
|
* New notes created in this transaction.
|
|
17
17
|
* They are pushed to this array in the same order as they are emitted.
|
|
@@ -37,15 +37,16 @@ export declare class ExecutionNoteCache {
|
|
|
37
37
|
* We don't need to use the tx request hash for nonces if another non revertible nullifier is emitted.
|
|
38
38
|
* In that case we disable injecting the tx request hash as a nullifier.
|
|
39
39
|
*/
|
|
40
|
-
private
|
|
41
|
-
constructor(
|
|
40
|
+
private usedProtocolNullifierForNonces;
|
|
41
|
+
constructor(protocolNullifier: Fr);
|
|
42
42
|
/**
|
|
43
43
|
* Enters the revertible phase of the transaction.
|
|
44
44
|
* @param minRevertibleSideEffectCounter - The counter at which the transaction enters the revertible phase.
|
|
45
45
|
*/
|
|
46
46
|
setMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter: number): Promise<void>;
|
|
47
|
+
isSideEffectCounterRevertible(sideEffectCounter: number): boolean;
|
|
47
48
|
finish(): {
|
|
48
|
-
|
|
49
|
+
usedProtocolNullifierForNonces: boolean;
|
|
49
50
|
};
|
|
50
51
|
/**
|
|
51
52
|
* Add a new note to cache.
|
|
@@ -70,9 +71,10 @@ export declare class ExecutionNoteCache {
|
|
|
70
71
|
* Return notes created up to current point in execution.
|
|
71
72
|
* If a nullifier for a note in this list is emitted, the note will be deleted.
|
|
72
73
|
* @param contractAddress - Contract address of the notes.
|
|
74
|
+
* @param owner - Owner of the notes. If undefined, returns all notes regardless of owner.
|
|
73
75
|
* @param storageSlot - Storage slot of the notes.
|
|
74
76
|
**/
|
|
75
|
-
getNotes(contractAddress: AztecAddress, storageSlot: Fr): NoteData[];
|
|
77
|
+
getNotes(contractAddress: AztecAddress, owner: AztecAddress | undefined, storageSlot: Fr): NoteData[];
|
|
76
78
|
/**
|
|
77
79
|
* Check if a note exists in the newNotes array.
|
|
78
80
|
* @param contractAddress - Contract address of the note.
|
|
@@ -87,7 +89,7 @@ export declare class ExecutionNoteCache {
|
|
|
87
89
|
getNullifiers(contractAddress: AztecAddress): Set<bigint>;
|
|
88
90
|
getAllNotes(): PendingNote[];
|
|
89
91
|
getAllNullifiers(): Fr[];
|
|
90
|
-
recordNullifier(contractAddress: AztecAddress, siloedNullifier:
|
|
92
|
+
recordNullifier(contractAddress: AztecAddress, siloedNullifier: bigint): void;
|
|
91
93
|
}
|
|
92
94
|
export {};
|
|
93
|
-
//# sourceMappingURL=
|
|
95
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhlY3V0aW9uX25vdGVfY2FjaGUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJz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DQUt2RTtJQUVNLE1BQU07O01BVVo7SUFFRDs7O09BR0c7SUFDSSxVQUFVLENBQUMsSUFBSSxFQUFFLFFBQVEsRUFBRSxPQUFPLEVBQUUsTUFBTSxRQVNoRDtJQUVEOzs7Ozs7T0FNRztJQUNVLFdBQVcsQ0FBQyxlQUFlLEVBQUUsWUFBWSxFQUFFLGNBQWMsRUFBRSxFQUFFLEVBQUUsUUFBUSxFQUFFLEVBQUUsK0JBeUJ2RjtJQUVEOzs7O09BSUc7SUFDVSxnQkFBZ0IsQ0FBQyxlQUFlLEVBQUUsWUFBWSxFQUFFLGNBQWMsRUFBRSxFQUFFLGlCQUc5RTtJQUVEOzs7Ozs7UUFNSTtJQUNHLFFBQVEsQ0FBQyxlQUFlLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxZQUFZLEdBQUcsU0FBUyxFQUFFLFdBQVcsRUFBRSxFQUFFLGNBTTlGO0lBRUQ7Ozs7O1FBS0k7SUFDRyxlQUFlLENBQUMsZUFBZSxFQUFFLFlBQVksRUFBRSxRQUFRLEVBQUUsRUFBRSxXQUdqRTtJQUVEOzs7T0FHRztJQUNJLGFBQWEsQ0FBQyxlQUFlLEVBQUUsWUFBWSxHQUFHLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FFL0Q7SUFVRCxXQUFXLElBQUksV0FBVyxFQUFFLENBRTNCO0lBRUQsZ0JBQWdCLElBQUksRUFBRSxFQUFFLENBRXZCO0lBRUQsZUFBZSxDQUFDLGVBQWUsRUFBRSxZQUFZLEVBQUUsZUFBZSxFQUFFLE1BQU0sUUFVckU7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution_note_cache.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution_note_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"execution_note_cache.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution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AAE,WAAW,EAAE,EAAE,cAM9F;IAED;;;;;QAKI;IACG,eAAe,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,WAGjE;IAED;;;OAGG;IACI,aAAa,CAAC,eAAe,EAAE,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC,CAE/D;IAUD,WAAW,IAAI,WAAW,EAAE,CAE3B;IAED,gBAAgB,IAAI,EAAE,EAAE,CAEvB;IAED,eAAe,CAAC,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,QAUrE;CACF"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifier } from '@aztec/stdlib/hash';
|
|
3
3
|
/**
|
|
4
4
|
* Data that's accessible by all the function calls in an execution.
|
|
5
5
|
*/ export class ExecutionNoteCache {
|
|
6
|
-
|
|
6
|
+
protocolNullifier;
|
|
7
7
|
/**
|
|
8
8
|
* New notes created in this transaction.
|
|
9
9
|
* They are pushed to this array in the same order as they are emitted.
|
|
@@ -24,16 +24,16 @@ import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifie
|
|
|
24
24
|
/**
|
|
25
25
|
* We don't need to use the tx request hash for nonces if another non revertible nullifier is emitted.
|
|
26
26
|
* In that case we disable injecting the tx request hash as a nullifier.
|
|
27
|
-
*/
|
|
28
|
-
constructor(
|
|
29
|
-
this.
|
|
27
|
+
*/ usedProtocolNullifierForNonces;
|
|
28
|
+
constructor(protocolNullifier){
|
|
29
|
+
this.protocolNullifier = protocolNullifier;
|
|
30
30
|
this.notes = [];
|
|
31
31
|
this.noteMap = new Map();
|
|
32
32
|
this.nullifierMap = new Map();
|
|
33
33
|
this.allNullifiers = new Set();
|
|
34
34
|
this.minRevertibleSideEffectCounter = 0;
|
|
35
35
|
this.inRevertiblePhase = false;
|
|
36
|
-
this.
|
|
36
|
+
this.usedProtocolNullifierForNonces = true;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Enters the revertible phase of the transaction.
|
|
@@ -44,11 +44,11 @@ import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifie
|
|
|
44
44
|
}
|
|
45
45
|
this.inRevertiblePhase = true;
|
|
46
46
|
this.minRevertibleSideEffectCounter = minRevertibleSideEffectCounter;
|
|
47
|
-
let nonceGenerator = this.
|
|
47
|
+
let nonceGenerator = this.protocolNullifier;
|
|
48
48
|
const nullifiers = this.getAllNullifiers();
|
|
49
49
|
if (nullifiers.length > 0) {
|
|
50
50
|
nonceGenerator = new Fr(nullifiers[0]);
|
|
51
|
-
this.
|
|
51
|
+
this.usedProtocolNullifierForNonces = false;
|
|
52
52
|
}
|
|
53
53
|
// The existing pending notes are all non-revertible.
|
|
54
54
|
// They cannot be squashed by nullifiers emitted after minRevertibleSideEffectCounter is set.
|
|
@@ -71,14 +71,21 @@ import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifie
|
|
|
71
71
|
this.noteMap = new Map();
|
|
72
72
|
updatedNotes.forEach((n)=>this.#addNote(n));
|
|
73
73
|
}
|
|
74
|
+
isSideEffectCounterRevertible(sideEffectCounter) {
|
|
75
|
+
if (!this.inRevertiblePhase) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
return sideEffectCounter >= this.minRevertibleSideEffectCounter;
|
|
79
|
+
}
|
|
74
80
|
finish() {
|
|
75
|
-
// If we never entered the revertible phase, we need to use the
|
|
81
|
+
// If we never entered the revertible phase, we need to use the protocol nullifier to compute the nonces for the
|
|
82
|
+
// notes if no nullifiers have been emitted.
|
|
76
83
|
if (!this.inRevertiblePhase) {
|
|
77
|
-
this.
|
|
84
|
+
this.usedProtocolNullifierForNonces = this.getAllNullifiers().length === 0;
|
|
78
85
|
}
|
|
79
86
|
// If we entered the revertible phase, the nonce generator was decided based on wether or not a nullifier was emitted before entering.
|
|
80
87
|
return {
|
|
81
|
-
|
|
88
|
+
usedProtocolNullifierForNonces: this.usedProtocolNullifierForNonces
|
|
82
89
|
};
|
|
83
90
|
}
|
|
84
91
|
/**
|
|
@@ -102,7 +109,7 @@ import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifie
|
|
|
102
109
|
* @param noteHash - A hash of the note. If this value equals 0, it means the note being nullified is from a previous
|
|
103
110
|
* transaction (and thus not a new note).
|
|
104
111
|
*/ async nullifyNote(contractAddress, innerNullifier, noteHash) {
|
|
105
|
-
const siloedNullifier = await siloNullifier(contractAddress, innerNullifier);
|
|
112
|
+
const siloedNullifier = (await siloNullifier(contractAddress, innerNullifier)).toBigInt();
|
|
106
113
|
let nullifiedNoteHashCounter = undefined;
|
|
107
114
|
// Find and remove the matching new note and log(s) if the emitted noteHash is not empty.
|
|
108
115
|
if (!noteHash.isEmpty()) {
|
|
@@ -130,17 +137,18 @@ import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifie
|
|
|
130
137
|
* @param contractAddress - Contract address that emitted the nullifier.
|
|
131
138
|
* @param innerNullifier
|
|
132
139
|
*/ async nullifierCreated(contractAddress, innerNullifier) {
|
|
133
|
-
const siloedNullifier = await siloNullifier(contractAddress, innerNullifier);
|
|
140
|
+
const siloedNullifier = (await siloNullifier(contractAddress, innerNullifier)).toBigInt();
|
|
134
141
|
this.recordNullifier(contractAddress, siloedNullifier);
|
|
135
142
|
}
|
|
136
143
|
/**
|
|
137
144
|
* Return notes created up to current point in execution.
|
|
138
145
|
* If a nullifier for a note in this list is emitted, the note will be deleted.
|
|
139
146
|
* @param contractAddress - Contract address of the notes.
|
|
147
|
+
* @param owner - Owner of the notes. If undefined, returns all notes regardless of owner.
|
|
140
148
|
* @param storageSlot - Storage slot of the notes.
|
|
141
|
-
**/ getNotes(contractAddress, storageSlot) {
|
|
149
|
+
**/ getNotes(contractAddress, owner, storageSlot) {
|
|
142
150
|
const notes = this.noteMap.get(contractAddress.toBigInt()) ?? [];
|
|
143
|
-
return notes.filter((n)=>n.note.storageSlot.equals(storageSlot)).map((n)=>n.note);
|
|
151
|
+
return notes.filter((n)=>owner === undefined || n.note.owner.equals(owner)).filter((n)=>n.note.storageSlot.equals(storageSlot)).map((n)=>n.note);
|
|
144
152
|
}
|
|
145
153
|
/**
|
|
146
154
|
* Check if a note exists in the newNotes array.
|
|
@@ -173,8 +181,11 @@ import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifie
|
|
|
173
181
|
}
|
|
174
182
|
recordNullifier(contractAddress, siloedNullifier) {
|
|
175
183
|
const nullifiers = this.getNullifiers(contractAddress);
|
|
176
|
-
nullifiers.
|
|
184
|
+
if (nullifiers.has(siloedNullifier)) {
|
|
185
|
+
throw new Error(`Duplicate siloed nullifier ${siloedNullifier} emitted by contract ${contractAddress}`);
|
|
186
|
+
}
|
|
187
|
+
nullifiers.add(siloedNullifier);
|
|
177
188
|
this.nullifierMap.set(contractAddress.toBigInt(), nullifiers);
|
|
178
|
-
this.allNullifiers.add(siloedNullifier
|
|
189
|
+
this.allNullifiers.add(siloedNullifier);
|
|
179
190
|
}
|
|
180
191
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DirectionalAppTaggingSecret, type PreTag } from '@aztec/stdlib/logs';
|
|
2
|
+
/**
|
|
3
|
+
* A map that stores the tagging index for a given directional app tagging secret.
|
|
4
|
+
* Note: The directional app tagging secret is unique for a (sender, recipient, contract) tuple while the direction
|
|
5
|
+
* of sender -> recipient matters.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ExecutionTaggingIndexCache {
|
|
8
|
+
private taggingIndexMap;
|
|
9
|
+
getLastUsedIndex(secret: DirectionalAppTaggingSecret): number | undefined;
|
|
10
|
+
setLastUsedIndex(secret: DirectionalAppTaggingSecret, index: number): void;
|
|
11
|
+
/**
|
|
12
|
+
* Returns the pre tags that were used in this execution (and that need to be stored in the db).
|
|
13
|
+
*/
|
|
14
|
+
getUsedPreTags(): PreTag[];
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhlY3V0aW9uX3RhZ2dpbmdfaW5kZXhfY2FjaGUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cmFjdF9mdW5jdGlvbl9zaW11bGF0b3IvZXhlY3V0aW9uX3RhZ2dpbmdfaW5kZXhfY2FjaGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLDJCQUEyQixFQUFFLEtBQUssTUFBTSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFFOUU7Ozs7R0FJRztBQUNILHFCQUFhLDBCQUEwQjtJQUNyQyxPQUFPLENBQUMsZUFBZSxDQUFrQztJQUVsRCxnQkFBZ0IsQ0FBQyxNQUFNLEVBQUUsMkJBQTJCLEdBQUcsTUFBTSxHQUFHLFNBQVMsQ0FFL0U7SUFFTSxnQkFBZ0IsQ0FBQyxNQUFNLEVBQUUsMkJBQTJCLEVBQUUsS0FBSyxFQUFFLE1BQU0sUUFNekU7SUFFRDs7T0FFRztJQUNJLGNBQWMsSUFBSSxNQUFNLEVBQUUsQ0FLaEM7Q0FDRiJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution_tagging_index_cache.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution_tagging_index_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE9E;;;;GAIG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,eAAe,CAAkC;IAElD,gBAAgB,CAAC,MAAM,EAAE,2BAA2B,GAAG,MAAM,GAAG,SAAS,CAE/E;IAEM,gBAAgB,CAAC,MAAM,EAAE,2BAA2B,EAAE,KAAK,EAAE,MAAM,QAMzE;IAED;;OAEG;IACI,cAAc,IAAI,MAAM,EAAE,CAKhC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DirectionalAppTaggingSecret } from '@aztec/stdlib/logs';
|
|
2
|
+
/**
|
|
3
|
+
* A map that stores the tagging index for a given directional app tagging secret.
|
|
4
|
+
* Note: The directional app tagging secret is unique for a (sender, recipient, contract) tuple while the direction
|
|
5
|
+
* of sender -> recipient matters.
|
|
6
|
+
*/ export class ExecutionTaggingIndexCache {
|
|
7
|
+
taggingIndexMap = new Map();
|
|
8
|
+
getLastUsedIndex(secret) {
|
|
9
|
+
return this.taggingIndexMap.get(secret.toString());
|
|
10
|
+
}
|
|
11
|
+
setLastUsedIndex(secret, index) {
|
|
12
|
+
const currentValue = this.taggingIndexMap.get(secret.toString());
|
|
13
|
+
if (currentValue !== undefined && currentValue !== index - 1) {
|
|
14
|
+
throw new Error(`Invalid tagging index update. Current value: ${currentValue}, new value: ${index}`);
|
|
15
|
+
}
|
|
16
|
+
this.taggingIndexMap.set(secret.toString(), index);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Returns the pre tags that were used in this execution (and that need to be stored in the db).
|
|
20
|
+
*/ getUsedPreTags() {
|
|
21
|
+
return Array.from(this.taggingIndexMap.entries()).map(([secret, index])=>({
|
|
22
|
+
secret: DirectionalAppTaggingSecret.fromString(secret),
|
|
23
|
+
index
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { HashedValues } from '@aztec/stdlib/tx';
|
|
3
3
|
/**
|
|
4
4
|
* A cache for hashed values (arguments, returns) during transaction execution.
|
|
@@ -25,4 +25,4 @@ export declare class HashedValuesCache {
|
|
|
25
25
|
*/
|
|
26
26
|
store(values: Fr[], hash: Fr): void;
|
|
27
27
|
}
|
|
28
|
-
//# sourceMappingURL=
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFzaGVkX3ZhbHVlc19jYWNoZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9oYXNoZWRfdmFsdWVzX2NhY2hlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFaEQ7O0dBRUc7QUFDSCxxQkFBYSxpQkFBaUI7SUFDNUIsT0FBTyxDQUFDLEtBQUssQ0FBb0I7SUFFakMsWUFBWSxnQkFBZ0IsR0FBRSxZQUFZLEVBQU8sRUFLaEQ7SUFFRDs7OztPQUlHO0lBQ0gsT0FBYyxNQUFNLENBQUMsZ0JBQWdCLEdBQUUsWUFBWSxFQUFPLHFCQUV6RDtJQUVEOzs7O09BSUc7SUFDSSxXQUFXLENBQUMsSUFBSSxFQUFFLEVBQUUsR0FBRyxFQUFFLEVBQUUsR0FBRyxTQUFTLENBTTdDO0lBRUQ7Ozs7T0FJRztJQUNJLEtBQUssQ0FBQyxNQUFNLEVBQUUsRUFBRSxFQUFFLEVBQUUsSUFBSSxFQUFFLEVBQUUsUUFFbEM7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashed_values_cache.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/hashed_values_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"hashed_values_cache.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/hashed_values_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,KAAK,CAAoB;IAEjC,YAAY,gBAAgB,GAAE,YAAY,EAAO,EAKhD;IAED;;;;OAIG;IACH,OAAc,MAAM,CAAC,gBAAgB,GAAE,YAAY,EAAO,qBAEzD;IAED;;;;OAIG;IACI,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,GAAG,SAAS,CAM7C;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,QAElC;CACF"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { ExecutionNoteCache } from './execution_note_cache.js';
|
|
2
|
+
export { ExecutionTaggingIndexCache } from './execution_tagging_index_cache.js';
|
|
2
3
|
export { HashedValuesCache } from './hashed_values_cache.js';
|
|
3
4
|
export { pickNotes } from './pick_notes.js';
|
|
4
|
-
export {
|
|
5
|
+
export type { NoteData, IMiscOracle, IUtilityExecutionOracle, IPrivateExecutionOracle } from './oracle/interfaces.js';
|
|
5
6
|
export { MessageLoadOracleInputs } from './oracle/message_load_oracle_inputs.js';
|
|
6
7
|
export { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js';
|
|
7
8
|
export { PrivateExecutionOracle } from './oracle/private_execution_oracle.js';
|
|
@@ -9,4 +10,5 @@ export { Oracle } from './oracle/oracle.js';
|
|
|
9
10
|
export { executePrivateFunction, extractPrivateCircuitPublicInputs } from './oracle/private_execution.js';
|
|
10
11
|
export { generateSimulatedProvingResult } from './contract_function_simulator.js';
|
|
11
12
|
export { packAsRetrievedNote } from './oracle/note_packing_utils.js';
|
|
12
|
-
|
|
13
|
+
export { UtilityContext } from './noir-structs/utility_context.js';
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLC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["../../src/contract_function_simulator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,iCAAiC,EAAE,MAAM,+BAA+B,CAAC;AAC1G,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ExecutionNoteCache } from './execution_note_cache.js';
|
|
2
|
+
export { ExecutionTaggingIndexCache } from './execution_tagging_index_cache.js';
|
|
2
3
|
export { HashedValuesCache } from './hashed_values_cache.js';
|
|
3
4
|
export { pickNotes } from './pick_notes.js';
|
|
4
|
-
export { TypedOracle } from './oracle/typed_oracle.js';
|
|
5
5
|
export { MessageLoadOracleInputs } from './oracle/message_load_oracle_inputs.js';
|
|
6
6
|
export { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js';
|
|
7
7
|
export { PrivateExecutionOracle } from './oracle/private_execution_oracle.js';
|
|
@@ -9,3 +9,4 @@ export { Oracle } from './oracle/oracle.js';
|
|
|
9
9
|
export { executePrivateFunction, extractPrivateCircuitPublicInputs } from './oracle/private_execution.js';
|
|
10
10
|
export { generateSimulatedProvingResult } from './contract_function_simulator.js';
|
|
11
11
|
export { packAsRetrievedNote } from './oracle/note_packing_utils.js';
|
|
12
|
+
export { UtilityContext } from './noir-structs/utility_context.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { FieldReader } from '@aztec/foundation/serialize';
|
|
3
3
|
import { EventSelector } from '@aztec/stdlib/abi';
|
|
4
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
@@ -17,4 +17,4 @@ export declare class EventValidationRequest {
|
|
|
17
17
|
constructor(contractAddress: AztecAddress, eventTypeId: EventSelector, serializedEvent: Fr[], eventCommitment: Fr, txHash: TxHash, recipient: AztecAddress);
|
|
18
18
|
static fromFields(fields: Fr[] | FieldReader): EventValidationRequest;
|
|
19
19
|
}
|
|
20
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnRfdmFsaWRhdGlvbl9yZXF1ZXN0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL25vaXItc3RydWN0cy9ldmVudF92YWxpZGF0aW9uX3JlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDbEQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQzNELE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUsxQzs7O0dBR0c7QUFDSCxxQkFBYSxzQkFBc0I7SUFFeEIsZUFBZSxFQUFFLFlBQVk7SUFDN0IsV0FBVyxFQUFFLGFBQWE7SUFDMUIsZUFBZSxFQUFFLEVBQUUsRUFBRTtJQUNyQixlQUFlLEVBQUUsRUFBRTtJQUNuQixNQUFNLEVBQUUsTUFBTTtJQUNkLFNBQVMsRUFBRSxZQUFZO0lBTmhDLFlBQ1MsZUFBZSxFQUFFLFlBQVksRUFDN0IsV0FBVyxFQUFFLGFBQWEsRUFDMUIsZUFBZSxFQUFFLEVBQUUsRUFBRSxFQUNyQixlQUFlLEVBQUUsRUFBRSxFQUNuQixNQUFNLEVBQUUsTUFBTSxFQUNkLFNBQVMsRUFBRSxZQUFZLEVBQzVCO0lBRUosTUFBTSxDQUFDLFVBQVUsQ0FBQyxNQUFNLEVBQUUsRUFBRSxFQUFFLEdBQUcsV0FBVyxHQUFHLHNCQUFzQixDQXNCcEU7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event_validation_request.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/event_validation_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"event_validation_request.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/event_validation_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAK1C;;;GAGG;AACH,qBAAa,sBAAsB;IAExB,eAAe,EAAE,YAAY;IAC7B,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,EAAE,EAAE;IACrB,eAAe,EAAE,EAAE;IACnB,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,YAAY;IANhC,YACS,eAAe,EAAE,YAAY,EAC7B,WAAW,EAAE,aAAa,EAC1B,eAAe,EAAE,EAAE,EAAE,EACrB,eAAe,EAAE,EAAE,EACnB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,YAAY,EAC5B;IAEJ,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,GAAG,sBAAsB,CAsBpE;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { FieldReader } from '@aztec/foundation/serialize';
|
|
3
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
4
|
/**
|
|
@@ -12,4 +12,4 @@ export declare class LogRetrievalRequest {
|
|
|
12
12
|
toFields(): Fr[];
|
|
13
13
|
static fromFields(fields: Fr[] | FieldReader): LogRetrievalRequest;
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nX3JldHJpZXZhbF9yZXF1ZXN0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL25vaXItc3RydWN0cy9sb2dfcmV0cmlldmFsX3JlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFFM0Q7OztHQUdHO0FBQ0gscUJBQWEsbUJBQW1CO0lBRXJCLGVBQWUsRUFBRSxZQUFZO0lBQzdCLFdBQVcsRUFBRSxFQUFFO0lBRnhCLFlBQ1MsZUFBZSxFQUFFLFlBQVksRUFDN0IsV0FBVyxFQUFFLEVBQUUsRUFDcEI7SUFFSixRQUFRLElBQUksRUFBRSxFQUFFLENBRWY7SUFFRCxNQUFNLENBQUMsVUFBVSxDQUFDLE1BQU0sRUFBRSxFQUFFLEVBQUUsR0FBRyxXQUFXLEdBQUcsbUJBQW1CLENBT2pFO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log_retrieval_request.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/log_retrieval_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"log_retrieval_request.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/log_retrieval_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D;;;GAGG;AACH,qBAAa,mBAAmB;IAErB,eAAe,EAAE,YAAY;IAC7B,WAAW,EAAE,EAAE;IAFxB,YACS,eAAe,EAAE,YAAY,EAC7B,WAAW,EAAE,EAAE,EACpB;IAEJ,QAAQ,IAAI,EAAE,EAAE,CAEf;IAED,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,GAAG,mBAAmB,CAOjE;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import type { TxHash } from '@aztec/stdlib/tx';
|
|
3
3
|
/**
|
|
4
4
|
* Intermediate struct used to perform batch log retrieval by PXE. The `utilityBulkRetrieveLogs` oracle stores values of this
|
|
@@ -12,6 +12,6 @@ export declare class LogRetrievalResponse {
|
|
|
12
12
|
constructor(logPayload: Fr[], txHash: TxHash, uniqueNoteHashesInTx: Fr[], firstNullifierInTx: Fr);
|
|
13
13
|
toFields(): Fr[];
|
|
14
14
|
static toEmptyFields(): Fr[];
|
|
15
|
-
static toSerializedOption(response
|
|
15
|
+
static toSerializedOption(response: LogRetrievalResponse | null): Fr[];
|
|
16
16
|
}
|
|
17
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nX3JldHJpZXZhbF9yZXNwb25zZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9ub2lyLXN0cnVjdHMvbG9nX3JldHJpZXZhbF9yZXNwb25zZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDcEQsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFPL0M7OztHQUdHO0FBQ0gscUJBQWEsb0JBQW9CO0lBRXRCLFVBQVUsRUFBRSxFQUFFLEVBQUU7SUFDaEIsTUFBTSxFQUFFLE1BQU07SUFDZCxvQkFBb0IsRUFBRSxFQUFFLEVBQUU7SUFDMUIsa0JBQWtCLEVBQUUsRUFBRTtJQUovQixZQUNTLFVBQVUsRUFBRSxFQUFFLEVBQUUsRUFDaEIsTUFBTSxFQUFFLE1BQU0sRUFDZCxvQkFBb0IsRUFBRSxFQUFFLEVBQUUsRUFDMUIsa0JBQWtCLEVBQUUsRUFBRSxFQUMzQjtJQUVKLFFBQVEsSUFBSSxFQUFFLEVBQUUsQ0FTZjtJQUVELE1BQU0sQ0FBQyxhQUFhLElBQUksRUFBRSxFQUFFLENBUzNCO0lBRUQsTUFBTSxDQUFDLGtCQUFrQixDQUFDLFFBQVEsRUFBRSxvQkFBb0IsR0FBRyxJQUFJLEdBQUcsRUFBRSxFQUFFLENBTXJFO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log_retrieval_response.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/log_retrieval_response.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"log_retrieval_response.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/log_retrieval_response.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAO/C;;;GAGG;AACH,qBAAa,oBAAoB;IAEtB,UAAU,EAAE,EAAE,EAAE;IAChB,MAAM,EAAE,MAAM;IACd,oBAAoB,EAAE,EAAE,EAAE;IAC1B,kBAAkB,EAAE,EAAE;IAJ/B,YACS,UAAU,EAAE,EAAE,EAAE,EAChB,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,EAAE,EAAE,EAC1B,kBAAkB,EAAE,EAAE,EAC3B;IAEJ,QAAQ,IAAI,EAAE,EAAE,CASf;IAED,MAAM,CAAC,aAAa,IAAI,EAAE,EAAE,CAS3B;IAED,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,GAAG,EAAE,EAAE,CAMrE;CACF"}
|