Add pub key to CredentialAdded event (WebauthValidator)#29
Merged
kopy-kat merged 2 commits intorhinestonewtf:mainfrom Sep 15, 2025
Merged
Add pub key to CredentialAdded event (WebauthValidator)#29kopy-kat merged 2 commits intorhinestonewtf:mainfrom
kopy-kat merged 2 commits intorhinestonewtf:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The WebAuth standard does not allow for a
credentialId->pub-keylookup in the browser. Knowing the public key of a credential is essential for any integration with this contract (interacting via rhinestone sdk or any other custom integration)Most people use event indexers as their db, so having this info on the event payload makes it a lot easier to track this state in any off-chain data layer. Ofc you can work around it by doing read-queries as a side effect of the existing event signature, but it's definitely something you always want to avoid if possible (1. it slows down indexing 2. reliance on querying an archive node when back-filling can introduce brittleness in the indexer which is annoying to deal with)
If you ever re-deploy this contract, please include this change.
PS, the
credIdcan easily be derived from the pubY and pubX (but not the other way around). If you'd like, you could probably remove the credId from the event all-together.