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

schema and pkh refactor #224

Merged
merged 4 commits into from
Oct 12, 2022
Merged

schema and pkh refactor #224

merged 4 commits into from
Oct 12, 2022

Conversation

decentralgabe
Copy link
Member

@codecov-commenter
Copy link

codecov-commenter commented Oct 11, 2022

Codecov Report

Merging #224 (5c0242b) into main (d911e62) will increase coverage by 0.38%.
The diff coverage is 80.77%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
did/did.go 100.00% <ø> (ø)
did/peer.go 51.51% <0.00%> (ø)
did/web.go 74.02% <33.33%> (ø)
did/pkh.go 73.10% <80.70%> (+0.30%) ⬆️
dwn/model.go 78.57% <93.75%> (+37.83%) ⬆️
did/key.go 65.36% <100.00%> (ø)

did/pkh.go Outdated
EcdsaSecp256k1RecoveryMethod2020 = "EcdsaSecp256k1RecoveryMethod2020"
)

// GetDIDPKHContext returns a context which should be manually inserted into each did:pkh document. This will likely
Copy link
Contributor

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) {
Copy link
Contributor

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

Copy link
Member Author

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
Copy link
Contributor

Choose a reason for hiding this comment

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

forget to remove comment?

Copy link
Member Author

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

Copy link
Contributor

@nitro-neal nitro-neal left a comment

Choose a reason for hiding this comment

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

Looks good!

@decentralgabe decentralgabe merged commit 99a9a91 into main Oct 12, 2022
@decentralgabe decentralgabe deleted the update-cm-schemas branch October 12, 2022 16:36
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.

None yet

3 participants