Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Beneš <[email protected]>
  • Loading branch information
rahul-kothari and benesjan authored Jun 26, 2024
1 parent b533e1f commit eb11f88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ In the snippet below, this is done as a separate contract call, but can also be

We have cases where we need a non-wallet contract to approve an action to be executed by another contract. One of the cases could be when making more complex defi where funds are passed along. When doing so, we need the intermediate contracts to support approving of actions on their behalf.

This is fairly straight forward to do using the `auth` library which include logic for updating values in the public auth registry. Namely, you can prepare the `message_hash` using `compute_authwit_message_hash_from_call` and then simply feed it into the `set_authorized` function (both are in `auth` library) to update the value.
This is fairly straight forward to do using the `auth` library which includes logic for updating values in the public auth registry. Namely, you can prepare the `message_hash` using `compute_authwit_message_hash_from_call` and then simply feed it into the `set_authorized` function (both are in `auth` library) to update the value.

When another contract later is consuming the authwit using `assert_current_call_valid_authwit_public` it will be calling the registry, and spend that authwit.

Expand Down
2 changes: 1 addition & 1 deletion noir-projects/aztec-nr/authwit/src/auth.nr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use dep::aztec::{prelude::Deserialize, context::{PrivateContext, PublicContext,
* Authenticaion witness helper library
*
* Authentication Witness is a scheme for authenticating actions on Aztec, so users can allow third-parties
* (eg protocols or other users) to execute an action on their behalf.
* (e.g. protocols or other users) to execute an action on their behalf.
*
* This library provides helper functions to manage such witnesses.
* The authentication witness, is some "witness" (data) that authenticates a `message_hash`.
Expand Down

0 comments on commit eb11f88

Please sign in to comment.