@aztec/pxe 0.0.1-commit.27d773e65 → 0.0.1-commit.2c85e299c
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/config/index.d.ts +2 -2
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +3 -3
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +49 -45
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.d.ts +44 -44
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +132 -89
- package/dest/contract_function_simulator/oracle/private_execution.js +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +20 -20
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +28 -28
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +36 -34
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +42 -41
- package/dest/oracle_version.d.ts +2 -2
- package/dest/oracle_version.js +3 -3
- package/dest/pxe.d.ts +3 -2
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +8 -5
- package/package.json +16 -16
- package/src/config/index.ts +1 -1
- package/src/contract_function_simulator/contract_function_simulator.ts +3 -3
- package/src/contract_function_simulator/oracle/interfaces.ts +47 -44
- package/src/contract_function_simulator/oracle/oracle.ts +135 -107
- package/src/contract_function_simulator/oracle/private_execution.ts +1 -1
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +28 -28
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +43 -50
- package/src/oracle_version.ts +3 -3
- package/src/pxe.ts +6 -3
|
@@ -6,8 +6,9 @@ import { MembershipWitness } from '@aztec/foundation/trees';
|
|
|
6
6
|
import type { FunctionSelector, NoteSelector } from '@aztec/stdlib/abi';
|
|
7
7
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
8
8
|
import { BlockHash } from '@aztec/stdlib/block';
|
|
9
|
-
import type {
|
|
9
|
+
import type { ContractInstance, PartialAddress } from '@aztec/stdlib/contract';
|
|
10
10
|
import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
|
|
11
|
+
import type { PublicKeys } from '@aztec/stdlib/keys';
|
|
11
12
|
import type { ContractClassLog, Tag } from '@aztec/stdlib/logs';
|
|
12
13
|
import type { Note, NoteStatus } from '@aztec/stdlib/note';
|
|
13
14
|
import { type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
|
|
@@ -52,9 +53,9 @@ export interface NoteData {
|
|
|
52
53
|
export interface IMiscOracle {
|
|
53
54
|
isMisc: true;
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
getRandomField(): Fr;
|
|
57
|
+
assertCompatibleOracleVersion(version: number): void;
|
|
58
|
+
log(level: number, message: string, fields: Fr[]): Promise<void>;
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
/**
|
|
@@ -64,30 +65,32 @@ export interface IMiscOracle {
|
|
|
64
65
|
export interface IUtilityExecutionOracle {
|
|
65
66
|
isUtility: true;
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
getUtilityContext(): UtilityContext;
|
|
69
|
+
getKeyValidationRequest(pkMHash: Fr): Promise<KeyValidationRequest>;
|
|
70
|
+
getContractInstance(address: AztecAddress): Promise<ContractInstance>;
|
|
71
|
+
getNoteHashMembershipWitness(
|
|
71
72
|
anchorBlockHash: BlockHash,
|
|
72
73
|
noteHash: Fr,
|
|
73
74
|
): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT> | undefined>;
|
|
74
|
-
|
|
75
|
+
getBlockHashMembershipWitness(
|
|
75
76
|
anchorBlockHash: BlockHash,
|
|
76
77
|
blockHash: BlockHash,
|
|
77
78
|
): Promise<MembershipWitness<typeof ARCHIVE_HEIGHT> | undefined>;
|
|
78
|
-
|
|
79
|
+
getNullifierMembershipWitness(
|
|
79
80
|
anchorBlockHash: BlockHash,
|
|
80
81
|
nullifier: Fr,
|
|
81
82
|
): Promise<NullifierMembershipWitness | undefined>;
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
getPublicDataWitness(anchorBlockHash: BlockHash, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
|
|
84
|
+
getLowNullifierMembershipWitness(
|
|
84
85
|
anchorBlockHash: BlockHash,
|
|
85
86
|
nullifier: Fr,
|
|
86
87
|
): Promise<NullifierMembershipWitness | undefined>;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
getBlockHeader(blockNumber: BlockNumber): Promise<BlockHeader | undefined>;
|
|
89
|
+
tryGetPublicKeysAndPartialAddress(
|
|
90
|
+
account: AztecAddress,
|
|
91
|
+
): Promise<{ publicKeys: PublicKeys; partialAddress: PartialAddress } | undefined>;
|
|
92
|
+
getAuthWitness(messageHash: Fr): Promise<Fr[] | undefined>;
|
|
93
|
+
getNotes(
|
|
91
94
|
owner: AztecAddress | undefined,
|
|
92
95
|
storageSlot: Fr,
|
|
93
96
|
numSelects: number,
|
|
@@ -104,35 +107,35 @@ export interface IUtilityExecutionOracle {
|
|
|
104
107
|
offset: number,
|
|
105
108
|
status: NoteStatus,
|
|
106
109
|
): Promise<NoteData[]>;
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
checkNullifierExists(innerNullifier: Fr): Promise<boolean>;
|
|
111
|
+
getL1ToL2MembershipWitness(
|
|
109
112
|
contractAddress: AztecAddress,
|
|
110
113
|
messageHash: Fr,
|
|
111
114
|
secret: Fr,
|
|
112
115
|
): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
|
|
113
|
-
|
|
116
|
+
storageRead(
|
|
114
117
|
anchorBlockHash: BlockHash,
|
|
115
118
|
contractAddress: AztecAddress,
|
|
116
119
|
startStorageSlot: Fr,
|
|
117
120
|
numberOfElements: number,
|
|
118
121
|
): Promise<Fr[]>;
|
|
119
|
-
|
|
120
|
-
|
|
122
|
+
fetchTaggedLogs(pendingTaggedLogArrayBaseSlot: Fr): Promise<void>;
|
|
123
|
+
validateAndStoreEnqueuedNotesAndEvents(
|
|
121
124
|
contractAddress: AztecAddress,
|
|
122
125
|
noteValidationRequestsArrayBaseSlot: Fr,
|
|
123
126
|
eventValidationRequestsArrayBaseSlot: Fr,
|
|
124
127
|
): Promise<void>;
|
|
125
|
-
|
|
128
|
+
bulkRetrieveLogs(
|
|
126
129
|
contractAddress: AztecAddress,
|
|
127
130
|
logRetrievalRequestsArrayBaseSlot: Fr,
|
|
128
131
|
logRetrievalResponsesArrayBaseSlot: Fr,
|
|
129
132
|
): Promise<void>;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
storeCapsule(contractAddress: AztecAddress, key: Fr, capsule: Fr[]): Promise<void>;
|
|
134
|
+
loadCapsule(contractAddress: AztecAddress, key: Fr): Promise<Fr[] | null>;
|
|
135
|
+
deleteCapsule(contractAddress: AztecAddress, key: Fr): Promise<void>;
|
|
136
|
+
copyCapsule(contractAddress: AztecAddress, srcKey: Fr, dstKey: Fr, numEntries: number): Promise<void>;
|
|
137
|
+
aes128Decrypt(ciphertext: Buffer, iv: Buffer, symKey: Buffer): Promise<Buffer>;
|
|
138
|
+
getSharedSecret(address: AztecAddress, ephPk: Point): Promise<Point>;
|
|
136
139
|
}
|
|
137
140
|
|
|
138
141
|
/**
|
|
@@ -142,9 +145,9 @@ export interface IUtilityExecutionOracle {
|
|
|
142
145
|
export interface IPrivateExecutionOracle {
|
|
143
146
|
isPrivate: true;
|
|
144
147
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
+
storeInExecutionCache(values: Fr[], hash: Fr): void;
|
|
149
|
+
loadFromExecutionCache(hash: Fr): Promise<Fr[]>;
|
|
150
|
+
notifyCreatedNote(
|
|
148
151
|
owner: AztecAddress,
|
|
149
152
|
storageSlot: Fr,
|
|
150
153
|
randomness: Fr,
|
|
@@ -153,33 +156,33 @@ export interface IPrivateExecutionOracle {
|
|
|
153
156
|
noteHash: Fr,
|
|
154
157
|
counter: number,
|
|
155
158
|
): void;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
notifyNullifiedNote(innerNullifier: Fr, noteHash: Fr, counter: number): Promise<void>;
|
|
160
|
+
notifyCreatedNullifier(innerNullifier: Fr): Promise<void>;
|
|
161
|
+
isNullifierPending(innerNullifier: Fr, contractAddress: AztecAddress): Promise<boolean>;
|
|
162
|
+
notifyCreatedContractClassLog(log: ContractClassLog, counter: number): void;
|
|
163
|
+
callPrivateFunction(
|
|
161
164
|
targetContractAddress: AztecAddress,
|
|
162
165
|
functionSelector: FunctionSelector,
|
|
163
166
|
argsHash: Fr,
|
|
164
167
|
sideEffectCounter: number,
|
|
165
168
|
isStaticCall: boolean,
|
|
166
169
|
): Promise<{ endSideEffectCounter: Fr; returnsHash: Fr }>;
|
|
167
|
-
|
|
170
|
+
notifyEnqueuedPublicFunctionCall(
|
|
168
171
|
targetContractAddress: AztecAddress,
|
|
169
172
|
calldataHash: Fr,
|
|
170
173
|
sideEffectCounter: number,
|
|
171
174
|
isStaticCall: boolean,
|
|
172
175
|
): Promise<void>;
|
|
173
|
-
|
|
176
|
+
notifySetPublicTeardownFunctionCall(
|
|
174
177
|
targetContractAddress: AztecAddress,
|
|
175
178
|
calldataHash: Fr,
|
|
176
179
|
sideEffectCounter: number,
|
|
177
180
|
isStaticCall: boolean,
|
|
178
181
|
): Promise<void>;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
notifySetMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter: number): Promise<void>;
|
|
183
|
+
isSideEffectCounterRevertible(sideEffectCounter: number): Promise<boolean>;
|
|
184
|
+
getSenderForTags(): Promise<AztecAddress | undefined>;
|
|
185
|
+
setSenderForTags(senderForTags: AztecAddress): Promise<void>;
|
|
186
|
+
getNextAppTagAsSender(sender: AztecAddress, recipient: AztecAddress): Promise<Tag>;
|
|
187
|
+
emitOffchainEffect(data: Fr[]): Promise<void>;
|
|
185
188
|
}
|