Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import { MembershipWitness } from '@aztec/foundation/trees';
import type { FunctionSelector, NoteSelector } from '@aztec/stdlib/abi';
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
import { BlockHash } from '@aztec/stdlib/block';
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
import type { ContractInstance, PartialAddress } from '@aztec/stdlib/contract';
import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
import type { PublicKeys } from '@aztec/stdlib/keys';
import type { ContractClassLog, Tag } from '@aztec/stdlib/logs';
import type { Note, NoteStatus } from '@aztec/stdlib/note';
import { type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
Expand Down Expand Up @@ -85,7 +86,9 @@ export interface IUtilityExecutionOracle {
nullifier: Fr,
): Promise<NullifierMembershipWitness | undefined>;
utilityGetBlockHeader(blockNumber: BlockNumber): Promise<BlockHeader | undefined>;
utilityTryGetPublicKeysAndPartialAddress(account: AztecAddress): Promise<CompleteAddress | undefined>;
utilityTryGetPublicKeysAndPartialAddress(
account: AztecAddress,
): Promise<{ publicKeys: PublicKeys; partialAddress: PartialAddress } | undefined>;
utilityGetAuthWitness(messageHash: Fr): Promise<Fr[] | undefined>;
utilityGetNotes(
owner: AztecAddress | undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import type { KeyStore } from '@aztec/key-store';
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
import { AztecAddress } from '@aztec/stdlib/aztec-address';
import { BlockHash } from '@aztec/stdlib/block';
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
import type { CompleteAddress, ContractInstance, PartialAddress } from '@aztec/stdlib/contract';
import { siloNullifier } from '@aztec/stdlib/hash';
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
import { computeAddressSecret } from '@aztec/stdlib/keys';
import { type PublicKeys, computeAddressSecret } from '@aztec/stdlib/keys';
import { deriveEcdhSharedSecret } from '@aztec/stdlib/logs';
import { getNonNullifiedL1ToL2MessageWitness } from '@aztec/stdlib/messaging';
import type { NoteStatus } from '@aztec/stdlib/note';
Expand Down Expand Up @@ -232,12 +232,18 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
}

/**
* Retrieve the complete address associated to a given address.
* Retrieve the public keys and partial address associated to a given address.
* @param account - The account address.
* @returns A complete address associated with the input address, or `undefined` if not registered.
* @returns The public keys and partial address, or `undefined` if the account is not registered.
*/
public utilityTryGetPublicKeysAndPartialAddress(account: AztecAddress): Promise<CompleteAddress | undefined> {
return this.addressStore.getCompleteAddress(account);
public async utilityTryGetPublicKeysAndPartialAddress(
account: AztecAddress,
): Promise<{ publicKeys: PublicKeys; partialAddress: PartialAddress } | undefined> {
const completeAddress = await this.addressStore.getCompleteAddress(account);
if (!completeAddress) {
return undefined;
}
return { publicKeys: completeAddress.publicKeys, partialAddress: completeAddress.partialAddress };
}

protected async getCompleteAddressOrFail(account: AztecAddress): Promise<CompleteAddress> {
Expand Down
Loading