@aztec/simulator 0.87.5 → 0.87.7
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/client.d.ts +5 -3
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +4 -2
- package/dest/private/acvm/acvm.d.ts +5 -2
- package/dest/private/acvm/acvm.d.ts.map +1 -1
- package/dest/private/acvm/index.d.ts +0 -1
- package/dest/private/acvm/index.d.ts.map +1 -1
- package/dest/private/acvm/index.js +0 -1
- package/dest/private/{providers/acvm_native.d.ts → acvm_native.d.ts} +4 -4
- package/dest/private/acvm_native.d.ts.map +1 -0
- package/dest/private/{providers/acvm_wasm.d.ts → acvm_wasm.d.ts} +4 -4
- package/dest/private/acvm_wasm.d.ts.map +1 -0
- package/dest/private/{providers/acvm_wasm.js → acvm_wasm.js} +2 -2
- package/dest/private/{providers/acvm_wasm_with_blobs.d.ts → acvm_wasm_with_blobs.d.ts} +5 -5
- package/dest/private/acvm_wasm_with_blobs.d.ts.map +1 -0
- package/dest/private/{providers/acvm_wasm_with_blobs.js → acvm_wasm_with_blobs.js} +2 -2
- package/dest/private/{providers/circuit_recording → circuit_recording}/circuit_recorder.d.ts +41 -21
- package/dest/private/circuit_recording/circuit_recorder.d.ts.map +1 -0
- package/dest/private/circuit_recording/circuit_recorder.js +209 -0
- package/dest/private/circuit_recording/file_circuit_recorder.d.ts +31 -0
- package/dest/private/circuit_recording/file_circuit_recorder.d.ts.map +1 -0
- package/dest/private/circuit_recording/file_circuit_recorder.js +135 -0
- package/dest/private/circuit_recording/memory_circuit_recorder.d.ts +5 -0
- package/dest/private/circuit_recording/memory_circuit_recorder.d.ts.map +1 -0
- package/dest/private/circuit_recording/memory_circuit_recorder.js +9 -0
- package/dest/private/{providers/circuit_recording/simulation_provider_recorder_wrapper.d.ts → circuit_recording/simulator_recorder_wrapper.d.ts} +9 -7
- package/dest/private/circuit_recording/simulator_recorder_wrapper.d.ts.map +1 -0
- package/dest/private/{providers/circuit_recording/simulation_provider_recorder_wrapper.js → circuit_recording/simulator_recorder_wrapper.js} +18 -13
- package/dest/private/{providers/simulation_provider.d.ts → circuit_simulator.d.ts} +4 -4
- package/dest/private/circuit_simulator.d.ts.map +1 -0
- package/dest/private/{providers/simulation_provider.js → circuit_simulator.js} +1 -1
- package/dest/private/factory.d.ts +12 -0
- package/dest/private/factory.d.ts.map +1 -0
- package/dest/private/{providers/factory.js → factory.js} +2 -2
- package/dest/public/avm/fixtures/base_avm_simulation_tester.d.ts +1 -0
- package/dest/public/avm/fixtures/base_avm_simulation_tester.d.ts.map +1 -1
- package/dest/public/avm/fixtures/base_avm_simulation_tester.js +6 -0
- package/dest/public/public_tx_simulator/apps_tests/amm_test.d.ts.map +1 -1
- package/dest/public/public_tx_simulator/apps_tests/amm_test.js +27 -55
- package/dest/server.d.ts +6 -3
- package/dest/server.d.ts.map +1 -1
- package/dest/server.js +5 -2
- package/dest/testing.d.ts +1 -1
- package/dest/testing.d.ts.map +1 -1
- package/dest/testing.js +1 -1
- package/package.json +15 -15
- package/src/client.ts +5 -3
- package/src/private/acvm/acvm.ts +5 -3
- package/src/private/acvm/index.ts +0 -1
- package/src/private/{providers/acvm_native.ts → acvm_native.ts} +4 -4
- package/src/private/{providers/acvm_wasm.ts → acvm_wasm.ts} +4 -4
- package/src/private/{providers/acvm_wasm_with_blobs.ts → acvm_wasm_with_blobs.ts} +5 -5
- package/src/private/circuit_recording/circuit_recorder.ts +260 -0
- package/src/private/circuit_recording/file_circuit_recorder.ts +158 -0
- package/src/private/circuit_recording/memory_circuit_recorder.ts +11 -0
- package/src/private/{providers/circuit_recording/simulation_provider_recorder_wrapper.ts → circuit_recording/simulator_recorder_wrapper.ts} +26 -18
- package/src/private/{providers/simulation_provider.ts → circuit_simulator.ts} +3 -3
- package/src/private/{providers/factory.ts → factory.ts} +6 -6
- package/src/public/avm/fixtures/base_avm_simulation_tester.ts +5 -0
- package/src/public/public_tx_simulator/apps_tests/amm_test.ts +49 -44
- package/src/server.ts +6 -3
- package/src/testing.ts +1 -1
- package/dest/private/acvm/oracle/index.d.ts +0 -14
- package/dest/private/acvm/oracle/index.d.ts.map +0 -1
- package/dest/private/acvm/oracle/index.js +0 -2
- package/dest/private/acvm/oracle/oracle.d.ts +0 -52
- package/dest/private/acvm/oracle/oracle.d.ts.map +0 -1
- package/dest/private/acvm/oracle/oracle.js +0 -312
- package/dest/private/acvm/oracle/typed_oracle.d.ts +0 -83
- package/dest/private/acvm/oracle/typed_oracle.d.ts.map +0 -1
- package/dest/private/acvm/oracle/typed_oracle.js +0 -138
- package/dest/private/execution_data_provider.d.ts +0 -301
- package/dest/private/execution_data_provider.d.ts.map +0 -1
- package/dest/private/execution_data_provider.js +0 -14
- package/dest/private/execution_note_cache.d.ts +0 -93
- package/dest/private/execution_note_cache.d.ts.map +0 -1
- package/dest/private/execution_note_cache.js +0 -180
- package/dest/private/hashed_values_cache.d.ts +0 -28
- package/dest/private/hashed_values_cache.d.ts.map +0 -1
- package/dest/private/hashed_values_cache.js +0 -36
- package/dest/private/index.d.ts +0 -16
- package/dest/private/index.d.ts.map +0 -1
- package/dest/private/index.js +0 -15
- package/dest/private/message_load_oracle_inputs.d.ts +0 -19
- package/dest/private/message_load_oracle_inputs.d.ts.map +0 -1
- package/dest/private/message_load_oracle_inputs.js +0 -24
- package/dest/private/pick_notes.d.ts +0 -85
- package/dest/private/pick_notes.d.ts.map +0 -1
- package/dest/private/pick_notes.js +0 -51
- package/dest/private/private_execution.d.ts +0 -25
- package/dest/private/private_execution.d.ts.map +0 -1
- package/dest/private/private_execution.js +0 -95
- package/dest/private/private_execution_oracle.d.ts +0 -187
- package/dest/private/private_execution_oracle.d.ts.map +0 -1
- package/dest/private/private_execution_oracle.js +0 -318
- package/dest/private/providers/acvm_native.d.ts.map +0 -1
- package/dest/private/providers/acvm_wasm.d.ts.map +0 -1
- package/dest/private/providers/acvm_wasm_with_blobs.d.ts.map +0 -1
- package/dest/private/providers/circuit_recording/circuit_recorder.d.ts.map +0 -1
- package/dest/private/providers/circuit_recording/circuit_recorder.js +0 -246
- package/dest/private/providers/circuit_recording/simulation_provider_recorder_wrapper.d.ts.map +0 -1
- package/dest/private/providers/factory.d.ts +0 -12
- package/dest/private/providers/factory.d.ts.map +0 -1
- package/dest/private/providers/simulation_provider.d.ts.map +0 -1
- package/dest/private/simulator.d.ts +0 -36
- package/dest/private/simulator.d.ts.map +0 -1
- package/dest/private/simulator.js +0 -104
- package/dest/private/utility_execution_oracle.d.ts +0 -163
- package/dest/private/utility_execution_oracle.d.ts.map +0 -1
- package/dest/private/utility_execution_oracle.js +0 -257
- package/dest/test/utils.d.ts +0 -13
- package/dest/test/utils.d.ts.map +0 -1
- package/dest/test/utils.js +0 -22
- package/src/private/acvm/oracle/index.ts +0 -16
- package/src/private/acvm/oracle/oracle.ts +0 -523
- package/src/private/acvm/oracle/typed_oracle.ts +0 -273
- package/src/private/execution_data_provider.ts +0 -388
- package/src/private/execution_note_cache.ts +0 -217
- package/src/private/hashed_values_cache.ts +0 -47
- package/src/private/index.ts +0 -19
- package/src/private/message_load_oracle_inputs.ts +0 -23
- package/src/private/pick_notes.ts +0 -141
- package/src/private/private_execution.ts +0 -159
- package/src/private/private_execution_oracle.ts +0 -508
- package/src/private/providers/circuit_recording/circuit_recorder.ts +0 -283
- package/src/private/simulator.ts +0 -170
- package/src/private/utility_execution_oracle.ts +0 -384
- package/src/test/utils.ts +0 -36
- /package/dest/private/{providers/acvm_native.js → acvm_native.js} +0 -0
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
-
import { Fr, Point } from '@aztec/foundation/fields';
|
|
3
|
-
import type { EventSelector, FunctionSelector, NoteSelector } from '@aztec/stdlib/abi';
|
|
4
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
-
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
6
|
-
import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
|
|
7
|
-
import type { ContractClassLog, IndexedTaggingSecret, LogWithTxData } from '@aztec/stdlib/logs';
|
|
8
|
-
import type { Note, NoteStatus } from '@aztec/stdlib/note';
|
|
9
|
-
import { type MerkleTreeId, type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
|
|
10
|
-
import type { BlockHeader, TxHash } from '@aztec/stdlib/tx';
|
|
11
|
-
|
|
12
|
-
import type { MessageLoadOracleInputs } from '../../message_load_oracle_inputs.js';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Information about a note needed during execution.
|
|
16
|
-
*/
|
|
17
|
-
export interface NoteData {
|
|
18
|
-
/** The note. */
|
|
19
|
-
note: Note;
|
|
20
|
-
/** The contract address of the note. */
|
|
21
|
-
contractAddress: AztecAddress;
|
|
22
|
-
/** The storage slot of the note. */
|
|
23
|
-
storageSlot: Fr;
|
|
24
|
-
/** The nonce of the note. */
|
|
25
|
-
nonce: Fr;
|
|
26
|
-
/** A hash of the note. */
|
|
27
|
-
noteHash: Fr;
|
|
28
|
-
/** The corresponding nullifier of the note. Undefined for pending notes. */
|
|
29
|
-
siloedNullifier?: Fr;
|
|
30
|
-
/** The note's leaf index in the note hash tree. Undefined for pending notes. */
|
|
31
|
-
index?: bigint;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
class OracleMethodNotAvailableError extends Error {
|
|
35
|
-
constructor(methodName: string) {
|
|
36
|
-
super(`Oracle method ${methodName} is not available.`);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Oracle with typed parameters and typed return values.
|
|
42
|
-
* Methods that require read and/or write will have to be implemented based on the context (public, private, or view)
|
|
43
|
-
* and are unavailable by default.
|
|
44
|
-
*/
|
|
45
|
-
export abstract class TypedOracle {
|
|
46
|
-
getRandomField(): Fr {
|
|
47
|
-
return Fr.random();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
storeInExecutionCache(_values: Fr[], _hash: Fr): void {
|
|
51
|
-
throw new OracleMethodNotAvailableError('storeInExecutionCache');
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
loadFromExecutionCache(_hash: Fr): Promise<Fr[]> {
|
|
55
|
-
return Promise.reject(new OracleMethodNotAvailableError('loadFromExecutionCache'));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
getBlockNumber(): Promise<number> {
|
|
59
|
-
return Promise.reject(new OracleMethodNotAvailableError('getBlockNumber'));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
getContractAddress(): Promise<AztecAddress> {
|
|
63
|
-
return Promise.reject(new OracleMethodNotAvailableError('getContractAddress'));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
getChainId(): Promise<Fr> {
|
|
67
|
-
return Promise.reject(new OracleMethodNotAvailableError('getChainId'));
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
getVersion(): Promise<Fr> {
|
|
71
|
-
return Promise.reject(new OracleMethodNotAvailableError('getVersion'));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
getKeyValidationRequest(_pkMHash: Fr): Promise<KeyValidationRequest> {
|
|
75
|
-
return Promise.reject(new OracleMethodNotAvailableError('getKeyValidationRequest'));
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
getContractInstance(_address: AztecAddress): Promise<ContractInstance> {
|
|
79
|
-
return Promise.reject(new OracleMethodNotAvailableError('getContractInstance'));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
getMembershipWitness(_blockNumber: number, _treeId: MerkleTreeId, _leafValue: Fr): Promise<Fr[] | undefined> {
|
|
83
|
-
return Promise.reject(new OracleMethodNotAvailableError('getMembershipWitness'));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
getNullifierMembershipWitness(_blockNumber: number, _nullifier: Fr): Promise<NullifierMembershipWitness | undefined> {
|
|
87
|
-
return Promise.reject(new OracleMethodNotAvailableError('getNullifierMembershipWitness'));
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
getPublicDataWitness(_blockNumber: number, _leafSlot: Fr): Promise<PublicDataWitness | undefined> {
|
|
91
|
-
return Promise.reject(new OracleMethodNotAvailableError('getPublicDataWitness'));
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
getLowNullifierMembershipWitness(
|
|
95
|
-
_blockNumber: number,
|
|
96
|
-
_nullifier: Fr,
|
|
97
|
-
): Promise<NullifierMembershipWitness | undefined> {
|
|
98
|
-
return Promise.reject(new OracleMethodNotAvailableError('getLowNullifierMembershipWitness'));
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
getBlockHeader(_blockNumber: number): Promise<BlockHeader | undefined> {
|
|
102
|
-
return Promise.reject(new OracleMethodNotAvailableError('getBlockHeader'));
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
getCompleteAddress(_account: AztecAddress): Promise<CompleteAddress> {
|
|
106
|
-
return Promise.reject(new OracleMethodNotAvailableError('getCompleteAddress'));
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
getAuthWitness(_messageHash: Fr): Promise<Fr[] | undefined> {
|
|
110
|
-
return Promise.reject(new OracleMethodNotAvailableError('getAuthWitness'));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
getNotes(
|
|
114
|
-
_storageSlot: Fr,
|
|
115
|
-
_numSelects: number,
|
|
116
|
-
_selectByIndexes: number[],
|
|
117
|
-
_selectByOffsets: number[],
|
|
118
|
-
_selectByLengths: number[],
|
|
119
|
-
_selectValues: Fr[],
|
|
120
|
-
_selectComparators: number[],
|
|
121
|
-
_sortByIndexes: number[],
|
|
122
|
-
_sortByOffsets: number[],
|
|
123
|
-
_sortByLengths: number[],
|
|
124
|
-
_sortOrder: number[],
|
|
125
|
-
_limit: number,
|
|
126
|
-
_offset: number,
|
|
127
|
-
_status: NoteStatus,
|
|
128
|
-
): Promise<NoteData[]> {
|
|
129
|
-
return Promise.reject(new OracleMethodNotAvailableError('getNotes'));
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
notifyCreatedNote(_storageSlot: Fr, _noteTypeId: NoteSelector, _note: Fr[], _noteHash: Fr, _counter: number): void {
|
|
133
|
-
throw new OracleMethodNotAvailableError('notifyCreatedNote');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
notifyNullifiedNote(_innerNullifier: Fr, _noteHash: Fr, _counter: number): Promise<void> {
|
|
137
|
-
return Promise.reject(new OracleMethodNotAvailableError('notifyNullifiedNote'));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
notifyCreatedNullifier(_innerNullifier: Fr): Promise<void> {
|
|
141
|
-
return Promise.reject(new OracleMethodNotAvailableError('notifyCreatedNullifier'));
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
checkNullifierExists(_innerNullifier: Fr): Promise<boolean> {
|
|
145
|
-
return Promise.reject(new OracleMethodNotAvailableError('checkNullifierExists'));
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
getL1ToL2MembershipWitness(
|
|
149
|
-
_contractAddress: AztecAddress,
|
|
150
|
-
_messageHash: Fr,
|
|
151
|
-
_secret: Fr,
|
|
152
|
-
): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>> {
|
|
153
|
-
return Promise.reject(new OracleMethodNotAvailableError('getL1ToL2MembershipWitness'));
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
storageRead(
|
|
157
|
-
_contractAddress: AztecAddress,
|
|
158
|
-
_startStorageSlot: Fr,
|
|
159
|
-
_blockNumber: number,
|
|
160
|
-
_numberOfElements: number,
|
|
161
|
-
): Promise<Fr[]> {
|
|
162
|
-
return Promise.reject(new OracleMethodNotAvailableError('storageRead'));
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
storageWrite(_startStorageSlot: Fr, _values: Fr[]): Promise<Fr[]> {
|
|
166
|
-
return Promise.reject(new OracleMethodNotAvailableError('storageWrite'));
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
notifyCreatedContractClassLog(_log: ContractClassLog, _counter: number): void {
|
|
170
|
-
throw new OracleMethodNotAvailableError('notifyCreatedContractClassLog');
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
callPrivateFunction(
|
|
174
|
-
_targetContractAddress: AztecAddress,
|
|
175
|
-
_functionSelector: FunctionSelector,
|
|
176
|
-
_argsHash: Fr,
|
|
177
|
-
_sideEffectCounter: number,
|
|
178
|
-
_isStaticCall: boolean,
|
|
179
|
-
): Promise<{ endSideEffectCounter: Fr; returnsHash: Fr }> {
|
|
180
|
-
return Promise.reject(new OracleMethodNotAvailableError('callPrivateFunction'));
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
notifyEnqueuedPublicFunctionCall(
|
|
184
|
-
_targetContractAddress: AztecAddress,
|
|
185
|
-
_calldataHash: Fr,
|
|
186
|
-
_sideEffectCounter: number,
|
|
187
|
-
_isStaticCall: boolean,
|
|
188
|
-
): Promise<void> {
|
|
189
|
-
return Promise.reject(new OracleMethodNotAvailableError('notifyEnqueuedPublicFunctionCall'));
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
notifySetPublicTeardownFunctionCall(
|
|
193
|
-
_targetContractAddress: AztecAddress,
|
|
194
|
-
_calldataHash: Fr,
|
|
195
|
-
_sideEffectCounter: number,
|
|
196
|
-
_isStaticCall: boolean,
|
|
197
|
-
): Promise<void> {
|
|
198
|
-
return Promise.reject(new OracleMethodNotAvailableError('notifySetPublicTeardownFunctionCall'));
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
notifySetMinRevertibleSideEffectCounter(_minRevertibleSideEffectCounter: number): Promise<void> {
|
|
202
|
-
throw new OracleMethodNotAvailableError('notifySetMinRevertibleSideEffectCounter');
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
debugLog(_message: string, _fields: Fr[]): void {
|
|
206
|
-
throw new OracleMethodNotAvailableError('debugLog');
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
getIndexedTaggingSecretAsSender(_sender: AztecAddress, _recipient: AztecAddress): Promise<IndexedTaggingSecret> {
|
|
210
|
-
return Promise.reject(new OracleMethodNotAvailableError('getIndexedTaggingSecretAsSender'));
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
incrementAppTaggingSecretIndexAsSender(_sender: AztecAddress, _recipient: AztecAddress): Promise<void> {
|
|
214
|
-
return Promise.reject(new OracleMethodNotAvailableError('incrementAppTaggingSecretIndexAsSender'));
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
syncPrivateState(_pendingTaggedLogArrayBaseSlot: Fr): Promise<void> {
|
|
218
|
-
return Promise.reject(new OracleMethodNotAvailableError('syncPrivateState'));
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
deliverNote(
|
|
222
|
-
_contractAddress: AztecAddress,
|
|
223
|
-
_storageSlot: Fr,
|
|
224
|
-
_nonce: Fr,
|
|
225
|
-
_content: Fr[],
|
|
226
|
-
_noteHash: Fr,
|
|
227
|
-
_nullifier: Fr,
|
|
228
|
-
_txHash: TxHash,
|
|
229
|
-
_recipient: AztecAddress,
|
|
230
|
-
): Promise<void> {
|
|
231
|
-
return Promise.reject(new OracleMethodNotAvailableError('deliverNote'));
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
getLogByTag(_tag: Fr): Promise<LogWithTxData | null> {
|
|
235
|
-
throw new OracleMethodNotAvailableError('getLogByTag');
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
storeCapsule(_contractAddress: AztecAddress, _key: Fr, _capsule: Fr[]): Promise<void> {
|
|
239
|
-
return Promise.reject(new OracleMethodNotAvailableError('storeCapsule'));
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
loadCapsule(_contractAddress: AztecAddress, _key: Fr): Promise<Fr[] | null> {
|
|
243
|
-
return Promise.reject(new OracleMethodNotAvailableError('loadCapsule'));
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
deleteCapsule(_contractAddress: AztecAddress, _key: Fr): Promise<void> {
|
|
247
|
-
return Promise.reject(new OracleMethodNotAvailableError('deleteCapsule'));
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
copyCapsule(_contractAddress: AztecAddress, _srcKey: Fr, _dstKey: Fr, _numEntries: number): Promise<void> {
|
|
251
|
-
return Promise.reject(new OracleMethodNotAvailableError('copyCapsule'));
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
aes128Decrypt(_ciphertext: Buffer, _iv: Buffer, _symKey: Buffer): Promise<Buffer> {
|
|
255
|
-
return Promise.reject(new OracleMethodNotAvailableError('aes128Decrypt'));
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
getSharedSecret(_address: AztecAddress, _ephPk: Point): Promise<Point> {
|
|
259
|
-
return Promise.reject(new OracleMethodNotAvailableError('getSharedSecret'));
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
storePrivateEventLog(
|
|
263
|
-
_contractAddress: AztecAddress,
|
|
264
|
-
_recipient: AztecAddress,
|
|
265
|
-
_eventSelector: EventSelector,
|
|
266
|
-
_logContent: Fr[],
|
|
267
|
-
_txHash: TxHash,
|
|
268
|
-
_logIndexInTx: number,
|
|
269
|
-
_txIndexInBlock: number,
|
|
270
|
-
): Promise<void> {
|
|
271
|
-
return Promise.reject(new OracleMethodNotAvailableError('storePrivateEventLog'));
|
|
272
|
-
}
|
|
273
|
-
}
|
|
@@ -1,388 +0,0 @@
|
|
|
1
|
-
import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
-
import type { Fr, Point } from '@aztec/foundation/fields';
|
|
3
|
-
import type {
|
|
4
|
-
EventSelector,
|
|
5
|
-
FunctionArtifact,
|
|
6
|
-
FunctionArtifactWithContractName,
|
|
7
|
-
FunctionSelector,
|
|
8
|
-
} from '@aztec/stdlib/abi';
|
|
9
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
10
|
-
import type { L2Block } from '@aztec/stdlib/block';
|
|
11
|
-
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
12
|
-
import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
|
|
13
|
-
import { IndexedTaggingSecret, LogWithTxData } from '@aztec/stdlib/logs';
|
|
14
|
-
import type { NoteStatus } from '@aztec/stdlib/note';
|
|
15
|
-
import { type MerkleTreeId, type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
|
|
16
|
-
import type { BlockHeader, TxHash } from '@aztec/stdlib/tx';
|
|
17
|
-
|
|
18
|
-
import type { NoteData } from './acvm/index.js';
|
|
19
|
-
import type { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Error thrown when a contract is not found in the database.
|
|
23
|
-
*/
|
|
24
|
-
export class ContractNotFoundError extends Error {
|
|
25
|
-
constructor(contractAddress: string) {
|
|
26
|
-
super(`DB has no contract with address ${contractAddress}`);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Error thrown when a contract class is not found in the database.
|
|
32
|
-
*/
|
|
33
|
-
export class ContractClassNotFoundError extends Error {
|
|
34
|
-
constructor(contractClassId: string) {
|
|
35
|
-
super(`DB has no contract class with id ${contractClassId}`);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* The interface for the data layer required to perform private and utility execution.
|
|
41
|
-
*/
|
|
42
|
-
export interface ExecutionDataProvider {
|
|
43
|
-
/**
|
|
44
|
-
* Returns a contract instance associated with an address, if available.
|
|
45
|
-
* @param address - Address.
|
|
46
|
-
* @returns A contract instance.
|
|
47
|
-
*/
|
|
48
|
-
getContractInstance(address: AztecAddress): Promise<ContractInstance>;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Retrieve the complete address associated to a given address.
|
|
52
|
-
* @param account - The account address.
|
|
53
|
-
* @returns A complete address associated with the input address.
|
|
54
|
-
* @throws An error if the account is not registered in the database.
|
|
55
|
-
*/
|
|
56
|
-
getCompleteAddress(account: AztecAddress): Promise<CompleteAddress>;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Retrieve keys associated with a specific master public key and app address.
|
|
60
|
-
* @param pkMHash - The master public key hash.
|
|
61
|
-
* @returns A Promise that resolves to nullifier keys.
|
|
62
|
-
* @throws If the keys are not registered in the key store.
|
|
63
|
-
*/
|
|
64
|
-
getKeyValidationRequest(pkMHash: Fr, contractAddress: AztecAddress): Promise<KeyValidationRequest>;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Retrieves a set of notes stored in the database for a given contract address and storage slot.
|
|
68
|
-
* The query result is paginated using 'limit' and 'offset' values.
|
|
69
|
-
* Returns an object containing an array of note data.
|
|
70
|
-
*
|
|
71
|
-
* @param contractAddress - The contract address of the notes.
|
|
72
|
-
* @param storageSlot - The storage slot of the notes.
|
|
73
|
-
* @param status - The status of notes to fetch.
|
|
74
|
-
* @param scopes - The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
75
|
-
* @returns A Promise that resolves to an array of note data.
|
|
76
|
-
*/
|
|
77
|
-
getNotes(
|
|
78
|
-
contractAddress: AztecAddress,
|
|
79
|
-
storageSlot: Fr,
|
|
80
|
-
status: NoteStatus,
|
|
81
|
-
scopes?: AztecAddress[],
|
|
82
|
-
): Promise<NoteData[]>;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Retrieve the artifact information of a specific function within a contract.
|
|
86
|
-
* The function is identified by its selector, which is a unique identifier generated from the function signature.
|
|
87
|
-
*
|
|
88
|
-
* @param contractAddress - The contract address.
|
|
89
|
-
* @param selector - The corresponding function selector.
|
|
90
|
-
* @returns A Promise that resolves to a FunctionArtifact object.
|
|
91
|
-
*/
|
|
92
|
-
getFunctionArtifact(
|
|
93
|
-
contractAddress: AztecAddress,
|
|
94
|
-
selector: FunctionSelector,
|
|
95
|
-
): Promise<FunctionArtifactWithContractName>;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Generates a stable function name for debug purposes.
|
|
99
|
-
* @param contractAddress - The contract address.
|
|
100
|
-
* @param selector - The corresponding function selector.
|
|
101
|
-
*/
|
|
102
|
-
getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Retrieves the artifact of a specified function within a given contract.
|
|
106
|
-
* The function is identified by its name, which is unique within a contract.
|
|
107
|
-
*
|
|
108
|
-
* @param contractAddress - The AztecAddress representing the contract containing the function.
|
|
109
|
-
* @param functionName - The name of the function.
|
|
110
|
-
* @returns The corresponding function's artifact as an object.
|
|
111
|
-
*/
|
|
112
|
-
getFunctionArtifactByName(contractAddress: AztecAddress, functionName: string): Promise<FunctionArtifact | undefined>;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Gets the index of a nullifier in the nullifier tree.
|
|
116
|
-
* @param nullifier - The nullifier.
|
|
117
|
-
* @returns - The index of the nullifier. Undefined if it does not exist in the tree.
|
|
118
|
-
*/
|
|
119
|
-
getNullifierIndex(nullifier: Fr): Promise<bigint | undefined>;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Gets the index of a nullifier in the nullifier tree.
|
|
123
|
-
* @param nullifier - The nullifier.
|
|
124
|
-
* @returns - The index of the nullifier. Undefined if it does not exist in the tree.
|
|
125
|
-
*/
|
|
126
|
-
getNullifierIndex(nullifier: Fr): Promise<bigint | undefined>;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Returns a nullifier membership witness for the given nullifier or undefined if not found.
|
|
130
|
-
* REFACTOR: Same as getL1ToL2MembershipWitness, can be combined with aztec-node method that does almost the same thing.
|
|
131
|
-
* @param nullifier - Nullifier we're looking for.
|
|
132
|
-
*/
|
|
133
|
-
getNullifierMembershipWitnessAtLatestBlock(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Fetches a message from the db, given its key.
|
|
137
|
-
* @param contractAddress - Address of a contract by which the message was emitted.
|
|
138
|
-
* @param messageHash - Hash of the message.
|
|
139
|
-
* @param secret - Secret used to compute a nullifier.
|
|
140
|
-
* @dev Contract address and secret are only used to compute the nullifier to get non-nullified messages
|
|
141
|
-
* @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
|
|
142
|
-
*/
|
|
143
|
-
getL1ToL2MembershipWitness(
|
|
144
|
-
contractAddress: AztecAddress,
|
|
145
|
-
messageHash: Fr,
|
|
146
|
-
secret: Fr,
|
|
147
|
-
): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* @param leafIndex the leaf to look up
|
|
151
|
-
* @returns The l1 to l2 leaf message hash or undefined if not found.
|
|
152
|
-
*/
|
|
153
|
-
getL1ToL2MessageHash(leafIndex: bigint): Promise<Fr | undefined>;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Retrieve the databases view of the Block Header object.
|
|
157
|
-
* This structure is fed into the circuits simulator and is used to prove against certain historical roots.
|
|
158
|
-
*
|
|
159
|
-
* @returns A Promise that resolves to a Header object.
|
|
160
|
-
*/
|
|
161
|
-
getBlockHeader(): Promise<BlockHeader>;
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Fetches the index and sibling path of a leaf at a given block from a given tree.
|
|
165
|
-
* @param blockNumber - The block number at which to get the membership witness.
|
|
166
|
-
* @param treeId - Id of the tree to get the sibling path from.
|
|
167
|
-
* @param leafValue - The leaf value
|
|
168
|
-
* @returns The index and sibling path concatenated [index, sibling_path]
|
|
169
|
-
*/
|
|
170
|
-
getMembershipWitness(blockNumber: number, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]>;
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Returns a nullifier membership witness for a given nullifier at a given block.
|
|
174
|
-
* @param blockNumber - The block number at which to get the index.
|
|
175
|
-
* @param nullifier - Nullifier we try to find witness for.
|
|
176
|
-
* @returns The nullifier membership witness (if found).
|
|
177
|
-
*/
|
|
178
|
-
getNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Returns a low nullifier membership witness for a given nullifier at a given block.
|
|
182
|
-
* @param blockNumber - The block number at which to get the index.
|
|
183
|
-
* @param nullifier - Nullifier we try to find the low nullifier witness for.
|
|
184
|
-
* @returns The low nullifier membership witness (if found).
|
|
185
|
-
* @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
|
|
186
|
-
* list structure" of leaves and proving that a lower nullifier is pointing to a bigger next value than the nullifier
|
|
187
|
-
* we are trying to prove non-inclusion for.
|
|
188
|
-
*/
|
|
189
|
-
getLowNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Returns a witness for a given slot of the public data tree at a given block.
|
|
193
|
-
* @param blockNumber - The block number at which to get the witness.
|
|
194
|
-
* @param leafSlot - The slot of the public data in the public data tree.
|
|
195
|
-
*/
|
|
196
|
-
getPublicDataWitness(blockNumber: number, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Gets the storage value at the given contract storage slot.
|
|
200
|
-
*
|
|
201
|
-
* @remarks The storage slot here refers to the slot as it is defined in Noir not the index in the merkle tree.
|
|
202
|
-
* Aztec's version of `eth_getStorageAt`.
|
|
203
|
-
*
|
|
204
|
-
* @param blockNumber - The block number at which to get the data.
|
|
205
|
-
* @param contract - Address of the contract to query.
|
|
206
|
-
* @param slot - Slot to query.
|
|
207
|
-
* @returns Storage value at the given contract slot.
|
|
208
|
-
* @throws If the contract is not deployed.
|
|
209
|
-
*/
|
|
210
|
-
getPublicStorageAt(blockNumber: number, contract: AztecAddress, slot: Fr): Promise<Fr>;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Fetch a block corresponding to the given block number.
|
|
214
|
-
* @param blockNumber - The block number of a block to fetch.
|
|
215
|
-
* @returns - The block corresponding to the given block number. Undefined if it does not exist.
|
|
216
|
-
*/
|
|
217
|
-
getBlock(blockNumber: number): Promise<L2Block | undefined>;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Fetches the current block number.
|
|
221
|
-
* @returns The block number.
|
|
222
|
-
*/
|
|
223
|
-
getBlockNumber(): Promise<number>;
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Fetches the current chain id.
|
|
227
|
-
* @returns The chain id.
|
|
228
|
-
*/
|
|
229
|
-
getChainId(): Promise<number>;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Fetches the current chain id.
|
|
233
|
-
* @returns The chain id.
|
|
234
|
-
*/
|
|
235
|
-
getVersion(): Promise<number>;
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Returns the tagging secret for a given sender and recipient pair. For this to work, the ivsk_m of the sender must be known.
|
|
239
|
-
* Includes the next index to be used used for tagging with this secret.
|
|
240
|
-
* @param contractAddress - The contract address to silo the secret for
|
|
241
|
-
* @param sender - The address sending the note
|
|
242
|
-
* @param recipient - The address receiving the note
|
|
243
|
-
* @returns A tagging secret that can be used to tag notes.
|
|
244
|
-
*/
|
|
245
|
-
getIndexedTaggingSecretAsSender(
|
|
246
|
-
contractAddress: AztecAddress,
|
|
247
|
-
sender: AztecAddress,
|
|
248
|
-
recipient: AztecAddress,
|
|
249
|
-
): Promise<IndexedTaggingSecret>;
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Increments the tagging secret for a given sender and recipient pair. For this to work, the ivsk_m of the sender must be known.
|
|
253
|
-
* @param contractAddress - The contract address to silo the secret for
|
|
254
|
-
* @param sender - The address sending the note
|
|
255
|
-
* @param recipient - The address receiving the note
|
|
256
|
-
*/
|
|
257
|
-
incrementAppTaggingSecretIndexAsSender(
|
|
258
|
-
contractAddress: AztecAddress,
|
|
259
|
-
sender: AztecAddress,
|
|
260
|
-
recipient: AztecAddress,
|
|
261
|
-
): Promise<void>;
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Synchronizes the logs tagged with scoped addresses and all the senders in the address book. Stores the found logs
|
|
265
|
-
* in CapsuleArray ready for a later retrieval in Aztec.nr.
|
|
266
|
-
* @param contractAddress - The address of the contract that the logs are tagged for.
|
|
267
|
-
* @param pendingTaggedLogArrayBaseSlot - The base slot of the pending tagged log capsule array in which found logs will be stored.
|
|
268
|
-
* @param scopes - The scoped addresses to sync logs for. If not provided, all accounts in the address book will be
|
|
269
|
-
* synced.
|
|
270
|
-
*/
|
|
271
|
-
syncTaggedLogs(
|
|
272
|
-
contractAddress: AztecAddress,
|
|
273
|
-
pendingTaggedLogArrayBaseSlot: Fr,
|
|
274
|
-
scopes?: AztecAddress[],
|
|
275
|
-
): Promise<void>;
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Delivers the preimage and metadata of a committed note so that it can be later requested via the `getNotes`
|
|
279
|
-
* oracle.
|
|
280
|
-
*
|
|
281
|
-
* @param contractAddress - The address of the contract that created the note (i.e. the siloing contract)
|
|
282
|
-
* @param storageSlot - The storage slot of the note - used for indexing in `getNotes`
|
|
283
|
-
* @param nonce - The nonce of the note used by the kernel to compute the unique note hash
|
|
284
|
-
* @param content - The note's content: this is the primary item to return in `getNotes`
|
|
285
|
-
* @param noteHash - The non-unique non-siloed note hash
|
|
286
|
-
* @param nullifier - The inner (non-siloed) note nullifier
|
|
287
|
-
* @param txHash - The transaction in which the note was added to the note hash tree
|
|
288
|
-
* @param recipient - The account that discovered the note
|
|
289
|
-
*/
|
|
290
|
-
deliverNote(
|
|
291
|
-
contractAddress: AztecAddress,
|
|
292
|
-
storageSlot: Fr,
|
|
293
|
-
nonce: Fr,
|
|
294
|
-
content: Fr[],
|
|
295
|
-
noteHash: Fr,
|
|
296
|
-
nullifier: Fr,
|
|
297
|
-
txHash: TxHash,
|
|
298
|
-
recipient: AztecAddress,
|
|
299
|
-
): Promise<void>;
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Gets note hash in the note hash tree at the given leaf index.
|
|
303
|
-
* @param leafIndex - the leaf to look up.
|
|
304
|
-
* @returns - The note hash at that index. Undefined if leaf index is not found.
|
|
305
|
-
*/
|
|
306
|
-
getNoteHash(leafIndex: bigint): Promise<Fr | undefined>;
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Searches for a log with the corresponding `tag` and returns it along with contextual transaction information.
|
|
310
|
-
* Returns null if no such log exists, and throws if more than one exists.
|
|
311
|
-
*
|
|
312
|
-
* @param tag - The log tag to search for.
|
|
313
|
-
*/
|
|
314
|
-
getLogByTag(tag: Fr): Promise<LogWithTxData | null>;
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Removes all of a contract's notes that have been nullified from the note database.
|
|
318
|
-
*/
|
|
319
|
-
removeNullifiedNotes(contractAddress: AztecAddress): Promise<void>;
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* Stores arbitrary information in a per-contract non-volatile database, which can later be retrieved with `loadCapsule`.
|
|
323
|
-
* * If data was already stored at this slot, it is overwritten.
|
|
324
|
-
* @param contractAddress - The contract address to scope the data under.
|
|
325
|
-
* @param slot - The slot in the database in which to store the value. Slots need not be contiguous.
|
|
326
|
-
* @param capsule - An array of field elements representing the capsule.
|
|
327
|
-
* @remarks A capsule is a "blob" of data that is passed to the contract through an oracle. It works similarly
|
|
328
|
-
* to public contract storage in that it's indexed by the contract address and storage slot but instead of the global
|
|
329
|
-
* network state it's backed by local PXE db.
|
|
330
|
-
*/
|
|
331
|
-
storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[]): Promise<void>;
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Returns data previously stored via `storeCapsule` in the per-contract non-volatile database.
|
|
335
|
-
* @param contractAddress - The contract address under which the data is scoped.
|
|
336
|
-
* @param slot - The slot in the database to read.
|
|
337
|
-
* @returns The stored data or `null` if no data is stored under the slot.
|
|
338
|
-
*/
|
|
339
|
-
loadCapsule(contractAddress: AztecAddress, slot: Fr): Promise<Fr[] | null>;
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Deletes data in the per-contract non-volatile database. Does nothing if no data was present.
|
|
343
|
-
* @param contractAddress - The contract address under which the data is scoped.
|
|
344
|
-
* @param slot - The slot in the database to delete.
|
|
345
|
-
*/
|
|
346
|
-
deleteCapsule(contractAddress: AztecAddress, slot: Fr): Promise<void>;
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* Copies a number of contiguous entries in the per-contract non-volatile database. This allows for efficient data
|
|
350
|
-
* structures by avoiding repeated calls to `loadCapsule` and `storeCapsule`.
|
|
351
|
-
* Supports overlapping source and destination regions (which will result in the overlapped source values being
|
|
352
|
-
* overwritten). All copied slots must exist in the database (i.e. have been stored and not deleted)
|
|
353
|
-
*
|
|
354
|
-
* @param contractAddress - The contract address under which the data is scoped.
|
|
355
|
-
* @param srcSlot - The first slot to copy from.
|
|
356
|
-
* @param dstSlot - The first slot to copy to.
|
|
357
|
-
* @param numEntries - The number of entries to copy.
|
|
358
|
-
*/
|
|
359
|
-
copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number): Promise<void>;
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* Retrieves the shared secret for a given address and ephemeral public key.
|
|
363
|
-
* @param address - The address to get the secret for.
|
|
364
|
-
* @param ephPk - The ephemeral public key to get the secret for.
|
|
365
|
-
* @returns The secret for the given address.
|
|
366
|
-
*/
|
|
367
|
-
getSharedSecret(address: AztecAddress, ephPk: Point): Promise<Point>;
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* Stores an event log in the database.
|
|
371
|
-
* @param contractAddress - The address of the contract that emitted the log.
|
|
372
|
-
* @param recipient - The address of the recipient.
|
|
373
|
-
* @param eventSelector - The event selector of the event.
|
|
374
|
-
* @param msgContent - The content of the private event message.
|
|
375
|
-
* @param txHash - The hash of the transaction that emitted the log.
|
|
376
|
-
* @param logIndexInTx - The index of the log within the transaction.
|
|
377
|
-
* @param txIndexInBlock - The index of the transaction in which the log was emitted in the block.
|
|
378
|
-
*/
|
|
379
|
-
storePrivateEventLog(
|
|
380
|
-
contractAddress: AztecAddress,
|
|
381
|
-
recipient: AztecAddress,
|
|
382
|
-
eventSelector: EventSelector,
|
|
383
|
-
msgContent: Fr[],
|
|
384
|
-
txHash: TxHash,
|
|
385
|
-
logIndexInTx: number,
|
|
386
|
-
txIndexInBlock: number,
|
|
387
|
-
): Promise<void>;
|
|
388
|
-
}
|