11import type { ARCHIVE_HEIGHT , L1_TO_L2_MSG_TREE_HEIGHT , NOTE_HASH_TREE_HEIGHT } from '@aztec/constants' ;
22import type { BlockNumber } from '@aztec/foundation/branded-types' ;
3- import { Fr } from '@aztec/foundation/curves/bn254' ;
4- import { MembershipWitness } from '@aztec/foundation/trees' ;
3+ import type { Fr } from '@aztec/foundation/curves/bn254' ;
4+ import type { MembershipWitness } from '@aztec/foundation/trees' ;
55import type { FunctionSelector , NoteSelector } from '@aztec/stdlib/abi' ;
66import type { AztecAddress } from '@aztec/stdlib/aztec-address' ;
7- import { BlockHash } from '@aztec/stdlib/block' ;
7+ import type { BlockHash } from '@aztec/stdlib/block' ;
88import type { ContractInstance , PartialAddress } from '@aztec/stdlib/contract' ;
99import type { KeyValidationRequest } from '@aztec/stdlib/kernel' ;
1010import type { PublicKeys } from '@aztec/stdlib/keys' ;
1111import type { ContractClassLog , Tag } from '@aztec/stdlib/logs' ;
1212import type { Note , NoteStatus } from '@aztec/stdlib/note' ;
13- import { type NullifierMembershipWitness , PublicDataWitness } from '@aztec/stdlib/trees' ;
13+ import type { NullifierMembershipWitness , PublicDataWitness } from '@aztec/stdlib/trees' ;
1414import type { BlockHeader , TxEffect , TxHash } from '@aztec/stdlib/tx' ;
1515
16+ import type { BoundedVec } from '../noir-structs/bounded_vec.js' ;
17+ import type { Option } from '../noir-structs/option.js' ;
1618import type { UtilityContext } from '../noir-structs/utility_context.js' ;
1719import type { MessageLoadOracleInputs } from './message_load_oracle_inputs.js' ;
1820
@@ -74,17 +76,17 @@ export interface IUtilityExecutionOracle {
7476 getBlockHashMembershipWitness (
7577 anchorBlockHash : BlockHash ,
7678 blockHash : BlockHash ,
77- ) : Promise < MembershipWitness < typeof ARCHIVE_HEIGHT > | undefined > ;
79+ ) : Promise < Option < MembershipWitness < typeof ARCHIVE_HEIGHT > > > ;
7880 getNullifierMembershipWitness ( anchorBlockHash : BlockHash , nullifier : Fr ) : Promise < NullifierMembershipWitness > ;
7981 getPublicDataWitness ( anchorBlockHash : BlockHash , leafSlot : Fr ) : Promise < PublicDataWitness > ;
8082 getLowNullifierMembershipWitness ( anchorBlockHash : BlockHash , nullifier : Fr ) : Promise < NullifierMembershipWitness > ;
8183 getBlockHeader ( blockNumber : BlockNumber ) : Promise < BlockHeader > ;
8284 getPublicKeysAndPartialAddress (
8385 account : AztecAddress ,
84- ) : Promise < { publicKeys : PublicKeys ; partialAddress : PartialAddress } | undefined > ;
86+ ) : Promise < Option < { publicKeys : PublicKeys ; partialAddress : PartialAddress } > > ;
8587 getAuthWitness ( messageHash : Fr ) : Promise < Fr [ ] > ;
8688 getNotes (
87- owner : AztecAddress | undefined ,
89+ owner : Option < AztecAddress > ,
8890 storageSlot : Fr ,
8991 numSelects : number ,
9092 selectByIndexes : number [ ] ,
@@ -99,7 +101,9 @@ export interface IUtilityExecutionOracle {
99101 limit : number ,
100102 offset : number ,
101103 status : NoteStatus ,
102- ) : Promise < NoteData [ ] > ;
104+ maxNotes : number ,
105+ packedHintedNoteLength : number ,
106+ ) : Promise < BoundedVec < NoteData > > ;
103107 doesNullifierExist ( innerNullifier : Fr ) : Promise < boolean > ;
104108 getL1ToL2MembershipWitness (
105109 contractAddress : AztecAddress ,
@@ -122,9 +126,9 @@ export interface IUtilityExecutionOracle {
122126 ) : Promise < void > ;
123127 getLogsByTag ( requestArrayBaseSlot : Fr ) : Promise < Fr > ;
124128 getMessageContextsByTxHash ( requestArrayBaseSlot : Fr ) : Promise < Fr > ;
125- getTxEffect ( txHash : TxHash ) : Promise < TxEffect | null > ;
129+ getTxEffect ( txHash : TxHash ) : Promise < Option < TxEffect > > ;
126130 setCapsule ( contractAddress : AztecAddress , key : Fr , capsule : Fr [ ] , scope : AztecAddress ) : void ;
127- getCapsule ( contractAddress : AztecAddress , key : Fr , scope : AztecAddress ) : Promise < Fr [ ] | null > ;
131+ getCapsule ( contractAddress : AztecAddress , key : Fr , tSize : number , scope : AztecAddress ) : Promise < Option < Fr [ ] > > ;
128132 deleteCapsule ( contractAddress : AztecAddress , key : Fr , scope : AztecAddress ) : void ;
129133 copyCapsule (
130134 contractAddress : AztecAddress ,
@@ -133,9 +137,9 @@ export interface IUtilityExecutionOracle {
133137 numEntries : number ,
134138 scope : AztecAddress ,
135139 ) : Promise < void > ;
136- decryptAes128 ( ciphertext : Buffer , iv : Buffer , symKey : Buffer ) : Promise < Buffer | undefined > ;
140+ decryptAes128 ( ciphertext : BoundedVec < number > , iv : Buffer , symKey : Buffer ) : Promise < Option < BoundedVec < number > > > ;
137141 getSharedSecrets ( address : AztecAddress , ephPksSlot : Fr , contractAddress : AztecAddress ) : Promise < Fr > ;
138- setContractSyncCacheInvalid ( contractAddress : AztecAddress , scopes : AztecAddress [ ] ) : void ;
142+ setContractSyncCacheInvalid ( contractAddress : AztecAddress , scopes : BoundedVec < AztecAddress > ) : void ;
139143 emitOffchainEffect ( data : Fr [ ] ) : Promise < void > ;
140144 callUtilityFunction (
141145 targetContractAddress : AztecAddress ,
@@ -190,7 +194,7 @@ export interface IPrivateExecutionOracle {
190194 assertValidPublicCalldata ( calldataHash : Fr ) : Promise < void > ;
191195 notifyRevertiblePhaseStart ( minRevertibleSideEffectCounter : number ) : Promise < void > ;
192196 isExecutionInRevertiblePhase ( sideEffectCounter : number ) : Promise < boolean > ;
193- getSenderForTags ( ) : Promise < AztecAddress | undefined > ;
197+ getSenderForTags ( ) : Promise < Option < AztecAddress > > ;
194198 setSenderForTags ( senderForTags : AztecAddress ) : Promise < void > ;
195199 getNextAppTagAsSender ( sender : AztecAddress , recipient : AztecAddress ) : Promise < Tag > ;
196200}
0 commit comments