@aztec/pxe 0.66.0 → 0.67.1-devnet
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/bin/index.js +5 -6
- package/dest/config/index.d.ts +0 -9
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +1 -17
- 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 +4 -0
- package/dest/contract_data_oracle/index.js +2 -2
- package/dest/database/incoming_note_dao.d.ts +1 -1
- package/dest/database/incoming_note_dao.d.ts.map +1 -1
- package/dest/database/incoming_note_dao.js +2 -2
- package/dest/database/kv_pxe_database.d.ts +10 -13
- package/dest/database/kv_pxe_database.d.ts.map +1 -1
- package/dest/database/kv_pxe_database.js +153 -230
- package/dest/database/outgoing_note_dao.js +2 -2
- package/dest/database/pxe_database.d.ts +7 -25
- package/dest/database/pxe_database.d.ts.map +1 -1
- package/dest/database/pxe_database_test_suite.d.ts.map +1 -1
- package/dest/database/pxe_database_test_suite.js +18 -59
- package/dest/index.d.ts +2 -0
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +3 -1
- package/dest/kernel_oracle/index.d.ts.map +1 -1
- package/dest/kernel_oracle/index.js +4 -4
- package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.js +2 -2
- package/dest/kernel_prover/index.d.ts +1 -0
- package/dest/kernel_prover/index.d.ts.map +1 -1
- package/dest/kernel_prover/index.js +2 -1
- package/dest/kernel_prover/kernel_prover.d.ts +1 -0
- package/dest/kernel_prover/kernel_prover.d.ts.map +1 -1
- package/dest/kernel_prover/kernel_prover.js +42 -5
- package/dest/kernel_prover/test/test_circuit_prover.d.ts +1 -2
- package/dest/kernel_prover/test/test_circuit_prover.d.ts.map +1 -1
- package/dest/kernel_prover/test/test_circuit_prover.js +7 -13
- package/dest/note_decryption_utils/add_public_values_to_payload.js +2 -2
- package/dest/note_decryption_utils/brute_force_note_info.d.ts +3 -3
- package/dest/note_decryption_utils/brute_force_note_info.d.ts.map +1 -1
- package/dest/note_decryption_utils/brute_force_note_info.js +8 -8
- package/dest/note_decryption_utils/produce_note_daos.d.ts +3 -6
- package/dest/note_decryption_utils/produce_note_daos.d.ts.map +1 -1
- package/dest/note_decryption_utils/produce_note_daos.js +5 -19
- package/dest/note_decryption_utils/produce_note_daos_for_key.d.ts +1 -1
- package/dest/note_decryption_utils/produce_note_daos_for_key.d.ts.map +1 -1
- package/dest/pxe_service/error_enriching.d.ts +3 -3
- package/dest/pxe_service/error_enriching.d.ts.map +1 -1
- package/dest/pxe_service/error_enriching.js +10 -10
- package/dest/pxe_service/index.d.ts +0 -1
- package/dest/pxe_service/index.d.ts.map +1 -1
- package/dest/pxe_service/index.js +1 -2
- package/dest/pxe_service/pxe_service.d.ts +2 -16
- package/dest/pxe_service/pxe_service.d.ts.map +1 -1
- package/dest/pxe_service/pxe_service.js +74 -96
- package/dest/pxe_service/test/pxe_test_suite.d.ts.map +1 -1
- package/dest/pxe_service/test/pxe_test_suite.js +1 -3
- package/dest/simulator/index.d.ts +1 -1
- package/dest/simulator/index.d.ts.map +1 -1
- package/dest/simulator/index.js +2 -2
- package/dest/simulator_oracle/index.d.ts +14 -11
- package/dest/simulator_oracle/index.d.ts.map +1 -1
- package/dest/simulator_oracle/index.js +170 -140
- package/dest/simulator_oracle/tagging_utils.d.ts +15 -0
- package/dest/simulator_oracle/tagging_utils.d.ts.map +1 -0
- package/dest/simulator_oracle/tagging_utils.js +23 -0
- package/dest/synchronizer/synchronizer.d.ts +10 -40
- package/dest/synchronizer/synchronizer.d.ts.map +1 -1
- package/dest/synchronizer/synchronizer.js +35 -69
- package/dest/{pxe_service → utils}/create_pxe_service.d.ts +1 -1
- package/dest/utils/create_pxe_service.d.ts.map +1 -0
- package/dest/utils/create_pxe_service.js +52 -0
- package/package.json +31 -19
- package/src/bin/index.ts +4 -5
- package/src/config/index.ts +0 -21
- package/src/config/package_info.ts +3 -0
- package/src/contract_data_oracle/index.ts +1 -1
- package/src/database/incoming_note_dao.ts +2 -2
- package/src/database/kv_pxe_database.ts +214 -309
- package/src/database/outgoing_note_dao.ts +1 -1
- package/src/database/pxe_database.ts +7 -28
- package/src/database/pxe_database_test_suite.ts +20 -75
- package/src/index.ts +2 -0
- package/src/kernel_oracle/index.ts +3 -3
- package/src/kernel_prover/hints/build_private_kernel_reset_private_inputs.ts +1 -1
- package/src/kernel_prover/index.ts +2 -0
- package/src/kernel_prover/kernel_prover.ts +72 -3
- package/src/kernel_prover/test/test_circuit_prover.ts +11 -25
- package/src/note_decryption_utils/add_public_values_to_payload.ts +1 -1
- package/src/note_decryption_utils/brute_force_note_info.ts +9 -9
- package/src/note_decryption_utils/produce_note_daos.ts +5 -48
- package/src/note_decryption_utils/produce_note_daos_for_key.ts +1 -1
- package/src/pxe_service/error_enriching.ts +14 -12
- package/src/pxe_service/index.ts +0 -1
- package/src/pxe_service/pxe_service.ts +127 -174
- package/src/pxe_service/test/pxe_test_suite.ts +0 -3
- package/src/simulator/index.ts +1 -1
- package/src/simulator_oracle/index.ts +201 -188
- package/src/simulator_oracle/tagging_utils.ts +28 -0
- package/src/synchronizer/synchronizer.ts +37 -77
- package/src/{pxe_service → utils}/create_pxe_service.ts +16 -13
- package/dest/pxe_service/create_pxe_service.d.ts.map +0 -1
- package/dest/pxe_service/create_pxe_service.js +0 -49
package/dest/simulator/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AcirSimulator } from '@aztec/simulator';
|
|
1
|
+
import { AcirSimulator } from '@aztec/simulator/client';
|
|
2
2
|
import { ContractDataOracle } from '../contract_data_oracle/index.js';
|
|
3
3
|
import { SimulatorOracle } from '../simulator_oracle/index.js';
|
|
4
4
|
/**
|
|
@@ -8,4 +8,4 @@ export function getAcirSimulator(db, aztecNode, keyStore, contractDataOracle) {
|
|
|
8
8
|
const simulatorOracle = new SimulatorOracle(contractDataOracle ?? new ContractDataOracle(db), db, keyStore, aztecNode);
|
|
9
9
|
return new AcirSimulator(simulatorOracle, aztecNode);
|
|
10
10
|
}
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2ltdWxhdG9yL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUV4RCxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUV0RSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFFL0Q7O0dBRUc7QUFDSCxNQUFNLFVBQVUsZ0JBQWdCLENBQzlCLEVBQWUsRUFDZixTQUFvQixFQUNwQixRQUFrQixFQUNsQixrQkFBdUM7SUFFdkMsTUFBTSxlQUFlLEdBQUcsSUFBSSxlQUFlLENBQ3pDLGtCQUFrQixJQUFJLElBQUksa0JBQWtCLENBQUMsRUFBRSxDQUFDLEVBQ2hELEVBQUUsRUFDRixRQUFRLEVBQ1IsU0FBUyxDQUNWLENBQUM7SUFDRixPQUFPLElBQUksYUFBYSxDQUFDLGVBQWUsRUFBRSxTQUFTLENBQUMsQ0FBQztBQUN2RCxDQUFDIn0=
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type AztecNode, type L2Block, type L2BlockNumber, MerkleTreeId, type NoteStatus, type NullifierMembershipWitness, type PublicDataWitness, type TxScopedL2Log } from '@aztec/circuit-types';
|
|
2
|
-
import { type AztecAddress, type CompleteAddress, type ContractInstance, Fr, type FunctionSelector,
|
|
2
|
+
import { type AztecAddress, type BlockHeader, type CompleteAddress, type ContractInstance, Fr, type FunctionSelector, IndexedTaggingSecret, type KeyValidationRequest, type L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/circuits.js';
|
|
3
3
|
import { type FunctionArtifact } from '@aztec/foundation/abi';
|
|
4
4
|
import { type KeyStore } from '@aztec/key-store';
|
|
5
|
-
import {
|
|
5
|
+
import { MessageLoadOracleInputs } from '@aztec/simulator/acvm';
|
|
6
|
+
import { type AcirSimulator, type DBOracle } from '@aztec/simulator/client';
|
|
6
7
|
import { type ContractDataOracle } from '../contract_data_oracle/index.js';
|
|
7
8
|
import { type PxeDatabase } from '../database/index.js';
|
|
8
9
|
/**
|
|
@@ -61,9 +62,9 @@ export declare class SimulatorOracle implements DBOracle {
|
|
|
61
62
|
* Retrieve the databases view of the Block Header object.
|
|
62
63
|
* This structure is fed into the circuits simulator and is used to prove against certain historical roots.
|
|
63
64
|
*
|
|
64
|
-
* @returns A Promise that resolves to a
|
|
65
|
+
* @returns A Promise that resolves to a BlockHeader object.
|
|
65
66
|
*/
|
|
66
|
-
|
|
67
|
+
getBlockHeader(): Promise<BlockHeader>;
|
|
67
68
|
/**
|
|
68
69
|
* Fetches the current block number.
|
|
69
70
|
* @returns The block number.
|
|
@@ -76,18 +77,18 @@ export declare class SimulatorOracle implements DBOracle {
|
|
|
76
77
|
* finally the index specified tag. We will then query the node with this tag for each address in the address book.
|
|
77
78
|
* @returns The full list of the users contact addresses.
|
|
78
79
|
*/
|
|
79
|
-
getContacts(): AztecAddress[]
|
|
80
|
+
getContacts(): Promise<AztecAddress[]>;
|
|
80
81
|
/**
|
|
81
|
-
* Returns the tagging secret for a given sender and recipient pair. For this to work, the
|
|
82
|
+
* Returns the tagging secret for a given sender and recipient pair. For this to work, the ivsk_m of the sender must be known.
|
|
82
83
|
* Includes the next index to be used used for tagging with this secret.
|
|
83
84
|
* @param contractAddress - The contract address to silo the secret for
|
|
84
85
|
* @param sender - The address sending the note
|
|
85
86
|
* @param recipient - The address receiving the note
|
|
86
|
-
* @returns
|
|
87
|
+
* @returns An indexed tagging secret that can be used to tag notes.
|
|
87
88
|
*/
|
|
88
|
-
|
|
89
|
+
getIndexedTaggingSecretAsSender(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<IndexedTaggingSecret>;
|
|
89
90
|
/**
|
|
90
|
-
* Increments the tagging secret for a given sender and recipient pair. For this to work, the
|
|
91
|
+
* Increments the tagging secret for a given sender and recipient pair. For this to work, the ivsk_m of the sender must be known.
|
|
91
92
|
* @param contractAddress - The contract address to silo the secret for
|
|
92
93
|
* @param sender - The address sending the note
|
|
93
94
|
* @param recipient - The address receiving the note
|
|
@@ -102,8 +103,9 @@ export declare class SimulatorOracle implements DBOracle {
|
|
|
102
103
|
*/
|
|
103
104
|
syncTaggedLogsAsSender(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<void>;
|
|
104
105
|
/**
|
|
105
|
-
* Synchronizes the logs tagged with scoped addresses and all the senders in the
|
|
106
|
-
* Returns the unsynched logs and updates the indexes of the secrets used to tag them until there are no more logs
|
|
106
|
+
* Synchronizes the logs tagged with scoped addresses and all the senders in the address book.
|
|
107
|
+
* Returns the unsynched logs and updates the indexes of the secrets used to tag them until there are no more logs
|
|
108
|
+
* to sync.
|
|
107
109
|
* @param contractAddress - The address of the contract that the logs are tagged for
|
|
108
110
|
* @param recipient - The address of the recipient
|
|
109
111
|
* @returns A list of encrypted logs tagged with the recipient's address
|
|
@@ -115,5 +117,6 @@ export declare class SimulatorOracle implements DBOracle {
|
|
|
115
117
|
* @param recipient - The recipient of the logs.
|
|
116
118
|
*/
|
|
117
119
|
processTaggedLogs(logs: TxScopedL2Log[], recipient: AztecAddress, simulator?: AcirSimulator): Promise<void>;
|
|
120
|
+
removeNullifiedNotes(contractAddress: AztecAddress): Promise<void>;
|
|
118
121
|
}
|
|
119
122
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/simulator_oracle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK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