Skip to content

feat: human readable authwits#15378

Merged
Thunkar merged 42 commits intonextfrom
gj/human_readable_authwits_2
Jul 3, 2025
Merged

feat: human readable authwits#15378
Thunkar merged 42 commits intonextfrom
gj/human_readable_authwits_2

Conversation

@Thunkar
Copy link
Copy Markdown
Contributor

@Thunkar Thunkar commented Jun 27, 2025

Initial implementation of human readable authwits. I've tried to separate concepts like follows:

  • Authorization: is the action to be authorized. By definition it's human-readable and contains rich information the user can interpret.
  • Auhtwit: Usually the result of signing the hash of an authorization, but more generally a piece of data that only the authorizer can generate from the human readable authorization.

Authorizations are emitted as offchain effects to be displayed and/or verified. Authwits are validated against the user's account contract.

This PR also introduces the authorize_once macro that replaces a lot of boilerplate authwit code while also capturing the args to be emitted as part of the human readable authorization. Its syntax will be improved (removing the as_ctstring() cast) once noir-lang/noir#9032 is synched to aztec-packages.

@Thunkar Thunkar self-assigned this Jun 27, 2025
@Thunkar Thunkar requested a review from nventuro June 30, 2025 09:23
@Thunkar Thunkar marked this pull request as ready for review June 30, 2025 09:24
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 30, 2025

Docs Preview

You can check your preview here.

@Thunkar Thunkar requested a review from benesjan July 1, 2025 09:49
Copy link
Copy Markdown
Contributor

@benesjan benesjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice but needs more docs

@Thunkar Thunkar requested a review from LeilaWang as a code owner July 2, 2025 13:19
@Thunkar Thunkar removed the request for review from LeilaWang July 2, 2025 14:13
Copy link
Copy Markdown
Contributor

@nventuro nventuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look how quickly they grow 🥹

@Thunkar Thunkar added this pull request to the merge queue Jul 3, 2025
@Thunkar Thunkar removed this pull request from the merge queue due to a manual request Jul 3, 2025
@Thunkar Thunkar enabled auto-merge July 3, 2025 14:37
@Thunkar Thunkar added this pull request to the merge queue Jul 3, 2025
Merged via the queue into next with commit 2791bbe Jul 3, 2025
5 checks passed
@Thunkar Thunkar deleted the gj/human_readable_authwits_2 branch July 3, 2025 15:42
danielntmd pushed a commit to danielntmd/aztec-packages that referenced this pull request Jul 16, 2025
Initial implementation of human readable authwits. I've tried to
separate concepts like follows:

- Authorization: is the action to be authorized. By definition it's
human-readable and contains rich information the user can interpret.
- Auhtwit: Usually the result of signing the hash of an authorization,
but more generally a piece of data that only the authorizer can generate
from the human readable authorization.

Authorizations are emitted as offchain effects to be displayed and/or
verified. Authwits are validated against the user's account contract.

This PR also introduces the `authorize_once` macro that replaces a lot
of boilerplate authwit code while also capturing the args to be emitted
as part of the human readable authorization. Its syntax will be improved
(removing the `as_ctstring()` cast) once
noir-lang/noir#9032 is synched to
aztec-packages.

---------

Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants