Skip to content

Commit

Permalink
feat: Note tagging oracle (#9429)
Browse files Browse the repository at this point in the history
Closes: AztecProtocol/aztec-packages#9378

Creates an exposes an oracle call that allows a sender to create a
tagging secret for a recipient, siloing it for the current app.
  • Loading branch information
Thunkar authored and AztecBot committed Oct 26, 2024
1 parent 02a8199 commit 595d2ed
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions aztec/src/oracle/notes.nr
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,19 @@ pub unconstrained fn check_nullifier_exists(inner_nullifier: Field) -> bool {

#[oracle(checkNullifierExists)]
unconstrained fn check_nullifier_exists_oracle(_inner_nullifier: Field) -> Field {}

/// Returns the tagging secret for a given sender and recipient pair, siloed for the current contract address.
/// For this to work, PXE must know the ivpsk_m of the sender.
/// For the recipient's side, only the address is needed.
pub unconstrained fn get_app_tagging_secret(
sender: AztecAddress,
recipient: AztecAddress,
) -> Field {
get_app_tagging_secret_oracle(sender, recipient)
}

#[oracle(getAppTaggingSecret)]
unconstrained fn get_app_tagging_secret_oracle(
_sender: AztecAddress,
_recipient: AztecAddress,
) -> Field {}

0 comments on commit 595d2ed

Please sign in to comment.