-
Notifications
You must be signed in to change notification settings - Fork 57
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
Fixed DID DHT library regression where kid
becomes undefined
#575
Conversation
🦋 Changeset detectedLatest commit: 49a931e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
dnsPacket : dnsPacket | ||
}); | ||
|
||
expect(didResolutionResult.didDocument).to.deep.equal(inputDidDocument); |
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 call
@@ -1038,13 +1038,14 @@ export class DidDhtDocument { | |||
publicKey.alg = parsedAlg || KeyTypeToDefaultAlgorithmMap[Number(t) as DidDhtRegisteredKeyType]; | |||
|
|||
// Determine the Key ID (kid): '0' for the identity key or JWK thumbprint for others. | |||
publicKey.kid = dnsRecordId.endsWith('0') ? '0' : await computeJwkThumbprint({ jwk: publicKey }); | |||
const kid = dnsRecordId.endsWith('0') ? '0' : await computeJwkThumbprint({ jwk: publicKey }); | |||
publicKey.kid = kid; | |||
|
|||
// Initialize the `verificationMethod` array if it does not already exist. | |||
didDocument.verificationMethod ??= []; | |||
|
|||
// Prepend the DID URI to the ID fragment to form the full verification method ID. |
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.
update 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.
What would you like me to update the comment to? I'll do it!
TBDocs Report ✅ No errors or warnings @web5/api
@web5/crypto
@web5/crypto-aws-kms
@web5/dids
@web5/credentials
TBDocs Report Updated at 2024-05-16T18:18:25Z |
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.
🎸
Co-authored-by: Liran Cohen <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #575 +/- ##
==========================================
+ Coverage 91.10% 91.12% +0.02%
==========================================
Files 116 116
Lines 29664 29665 +1
Branches 2199 2200 +1
==========================================
+ Hits 27024 27033 +9
+ Misses 2605 2597 -8
Partials 35 35
|
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.
👍
kid
becomesundefined