-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add reusable test vectors #130
Conversation
web5-spec-test-vectors.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
he done it! he used the dashes! the thing everyone wants to do but shys away bc presumed go convention. thoughts on just testvectors.go
? are you thinking we may end up adding moar vector loaders? if so, adding web5-spec
def makes sense as prefix. alternatively, could use this file for loading all sorts of vectors and change the function name to LoadWeb5SpecVectors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oop, been in rust hacking land so forgetting golang conventions, change the filename!
thought about making the function specific to web5, but that data structure may be a standard or reusable across different vector sets, so leaving as-is for now
a bit annoying we have the relative file path in the test file but I can't think of an obvious better alternative
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome stuff @KendallWeihe . really like the idea of a reusable vector loader
I've also added one example usage for decoding VC JWT, and had to fix something within the decode function
I originally wrote a test vector for did:jwk resolve but it was failing because we need to finish the work:
Will follow up with subsequent PRs for full coverage