-
Notifications
You must be signed in to change notification settings - Fork 54
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
schema and pkh refactor #224
Conversation
decentralgabe
commented
Oct 11, 2022
- update credential manifest schema from remove uri json schema constraint decentralized-identity/credential-manifest#122
- minor pkh refactor
- moved out non-schemas from schema dir
Codecov Report
@@ Coverage Diff @@
## main #224 +/- ##
==========================================
+ Coverage 57.83% 58.21% +0.38%
==========================================
Files 36 36
Lines 4053 4085 +32
==========================================
+ Hits 2344 2378 +34
+ Misses 1320 1319 -1
+ Partials 389 388 -1
|
did/pkh.go
Outdated
EcdsaSecp256k1RecoveryMethod2020 = "EcdsaSecp256k1RecoveryMethod2020" | ||
) | ||
|
||
// GetDIDPKHContext returns a context which should be manually inserted into each did:pkh document. This will likely |
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.
two spaces between context and which
} | ||
|
||
// GetVerificationTypeForNetwork returns the verification key type for a given network | ||
func GetVerificationTypeForNetwork(n Network) (string, error) { |
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.
Nice, we don't have to have a mapping anymore, there could be a case where we add a new pkh but forget to add it here in the GetVerificationTypeForNetwork function, thats why I opt to have one source of truth mapping. But this works good too
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.
good point, let me see how to define this once
dwn/model.go
Outdated
return nil | ||
// IsValidDWNMessage validates a given dwn message object against its known JSON schema | ||
func IsValidDWNMessage(msg DWNMessage) error { | ||
// TODO: add a schema when there is one |
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.
forget to remove comment?
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.
changing this to link to #62 to re-add schemas
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.
Looks good!