diff --git a/yarn-project/aztec.js/src/wallet/base_wallet.ts b/yarn-project/aztec.js/src/wallet/base_wallet.ts index 680f270d965..a97c0445304 100644 --- a/yarn-project/aztec.js/src/wallet/base_wallet.ts +++ b/yarn-project/aztec.js/src/wallet/base_wallet.ts @@ -121,9 +121,6 @@ export abstract class BaseWallet implements Wallet { getIncomingNotes(filter: IncomingNotesFilter): Promise { return this.pxe.getIncomingNotes(filter); } - getOutgoingNotes(filter: OutgoingNotesFilter): Promise { - return this.pxe.getOutgoingNotes(filter); - } getPublicStorageAt(contract: AztecAddress, storageSlot: Fr): Promise { return this.pxe.getPublicStorageAt(contract, storageSlot); } diff --git a/yarn-project/circuit-types/src/interfaces/pxe.test.ts b/yarn-project/circuit-types/src/interfaces/pxe.test.ts index b31ec0bb003..93fb1f32332 100644 --- a/yarn-project/circuit-types/src/interfaces/pxe.test.ts +++ b/yarn-project/circuit-types/src/interfaces/pxe.test.ts @@ -203,11 +203,6 @@ describe('PXESchema', () => { expect(result).toEqual([expect.any(BigInt), expect.any(SiblingPath)]); }); - it('getOutgoingNotes', async () => { - const result = await context.client.getOutgoingNotes({ contractAddress: address }); - expect(result).toEqual([expect.any(UniqueNote)]); - }); - it('addNote', async () => { await context.client.addNote(ExtendedNote.random(), address); }); @@ -424,10 +419,6 @@ class MockPXE implements PXE { expect(secret).toBeInstanceOf(Fr); return Promise.resolve([1n, SiblingPath.random(L1_TO_L2_MSG_TREE_HEIGHT)]); } - getOutgoingNotes(filter: OutgoingNotesFilter): Promise { - expect(filter.contractAddress).toEqual(this.address); - return Promise.resolve([UniqueNote.random()]); - } addNote(note: ExtendedNote, scope?: AztecAddress | undefined): Promise { expect(note).toBeInstanceOf(ExtendedNote); expect(scope).toEqual(this.address); diff --git a/yarn-project/circuit-types/src/interfaces/pxe.ts b/yarn-project/circuit-types/src/interfaces/pxe.ts index d371dd8ec27..7e422af8b82 100644 --- a/yarn-project/circuit-types/src/interfaces/pxe.ts +++ b/yarn-project/circuit-types/src/interfaces/pxe.ts @@ -245,13 +245,6 @@ export interface PXE { secret: Fr, ): Promise<[bigint, SiblingPath]>; - /** - * Gets outgoing notes of accounts registered in this PXE based on the provided filter. - * @param filter - The filter to apply to the notes. - * @returns The requested notes. - */ - getOutgoingNotes(filter: OutgoingNotesFilter): Promise; - /** * Adds a note to the database. * @throws If the note hash of the note doesn't exist in the tree. @@ -510,7 +503,6 @@ export const PXESchema: ApiSchemaFor = { .function() .args(schemas.AztecAddress, schemas.Fr, schemas.Fr) .returns(z.tuple([schemas.BigInt, SiblingPath.schemaFor(L1_TO_L2_MSG_TREE_HEIGHT)])), - getOutgoingNotes: z.function().args(OutgoingNotesFilterSchema).returns(z.array(UniqueNote.schema)), addNote: z.function().args(ExtendedNote.schema, optional(schemas.AztecAddress)).returns(z.void()), addNullifiedNote: z.function().args(ExtendedNote.schema).returns(z.void()), getBlock: z diff --git a/yarn-project/end-to-end/src/e2e_2_pxes.test.ts b/yarn-project/end-to-end/src/e2e_2_pxes.test.ts index d3dded0788d..654fbf24da1 100644 --- a/yarn-project/end-to-end/src/e2e_2_pxes.test.ts +++ b/yarn-project/end-to-end/src/e2e_2_pxes.test.ts @@ -256,13 +256,8 @@ describe('e2e_2_pxes', () => { .wait(); await testContract.methods.sync_notes().simulate(); const incomingNotes = await walletA.getIncomingNotes({ txHash: receipt.txHash }); - const outgoingNotes = await walletA.getOutgoingNotes({ txHash: receipt.txHash }); expect(incomingNotes).toHaveLength(1); note = incomingNotes[0]; - - // Since owner is the same as outgoing viewer the incoming and outgoing notes should be the same - expect(outgoingNotes).toHaveLength(1); - expect(outgoingNotes[0]).toEqual(note); } // 3. Nullify the note diff --git a/yarn-project/pxe/src/pxe_service/pxe_service.ts b/yarn-project/pxe/src/pxe_service/pxe_service.ts index 21e05880b9e..03f66f939e5 100644 --- a/yarn-project/pxe/src/pxe_service/pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/pxe_service.ts @@ -330,33 +330,6 @@ export class PXEService implements PXE { return Promise.all(extendedNotes); } - public async getOutgoingNotes(filter: OutgoingNotesFilter): Promise { - const noteDaos = await this.db.getOutgoingNotes(filter); - - const extendedNotes = noteDaos.map(async dao => { - let owner = filter.owner; - if (owner === undefined) { - const completeAddresses = (await this.db.getCompleteAddresses()).find(address => - address.publicKeys.masterOutgoingViewingPublicKey.equals(dao.ovpkM), - ); - if (completeAddresses === undefined) { - throw new Error(`Cannot find complete address for OvpkM ${dao.ovpkM.toString()}`); - } - owner = completeAddresses.address; - } - return new UniqueNote( - dao.note, - owner, - dao.contractAddress, - dao.storageSlot, - dao.noteTypeId, - dao.txHash, - dao.nonce, - ); - }); - return Promise.all(extendedNotes); - } - public async getL1ToL2MembershipWitness( contractAddress: AztecAddress, messageHash: Fr,