Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add tests for eip55 cacaos #636

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

chore: add tests for eip55 cacaos #636

wants to merge 3 commits into from

Conversation

dav1do
Copy link
Contributor

@dav1do dav1do commented Dec 20, 2024

Added tests using two events from the recent gitcoin signature failures. One is a full carfile parsed as an event, the second uses the envelope/cacao strings and parses them to demonstrate how one could swap in new envelope/cacao strings and make sure it passes (or fails).

Refactored a bit to make it easier to pass in data from a dag-json envelope downloaded from IPFS. I'd like to use the Signature type instead of passing protected/signature bytes directly, but I didn't get the deserialization right while testing. There might be an easy way I'm just missing, but for now this is just an internal wrapper.

@dav1do dav1do requested review from a team and nathanielc as code owners December 20, 2024 18:03
@dav1do dav1do requested review from smrz2001 and removed request for a team December 20, 2024 18:03
"p": {
"aud": "did:key:zDnaeU3z6wJKYcxdeQdNB1b6bgnUZBtNy6u8W7AT3rVPdwj2f",
"domain": "app.passport.xyz",
"exp": "2024-12-24T20:27:13.330Z",
Copy link
Contributor Author

@dav1do dav1do Dec 21, 2024

Choose a reason for hiding this comment

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

TODO: update these tests to use an explicit time check before the exp date so these don't start failing next week when now > 12/24

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.

1 participant