Skip to content

Commit

Permalink
refactor: making getNoteNonces private
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Nov 2, 2023
1 parent 9ba5c22 commit 03b916e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 7 additions & 1 deletion yarn-project/pxe/src/pxe_service/pxe_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,13 @@ export class PXEService implements PXE {
}
}

public async getNoteNonces(note: ExtendedNote): Promise<Fr[]> {
/**
* Finds the nonce(s) for a given note.
* @param note - The note to find the nonces for.
* @returns The nonces of the note.
* @remarks More than a single nonce may be returned since there might be more than one nonce for a given note.
*/
private async getNoteNonces(note: ExtendedNote): Promise<Fr[]> {
const tx = await this.node.getTx(note.txHash);
if (!tx) {
throw new Error(`Unknown tx: ${note.txHash}`);
Expand Down
8 changes: 0 additions & 8 deletions yarn-project/types/src/interfaces/pxe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,6 @@ export interface PXE {
*/
addNote(note: ExtendedNote): Promise<void>;

/**
* Finds the nonce(s) for a given note.
* @param note - The note to find the nonces for.
* @returns The nonces of the note.
* @remarks More than a single nonce may be returned since there might be more than one nonce for a given note.
*/
getNoteNonces(note: ExtendedNote): Promise<Fr[]>;

/**
* Get the given block.
* @param number - The block number being requested.
Expand Down

0 comments on commit 03b916e

Please sign in to comment.