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

did:dht Republish Warning #1400

Merged
merged 2 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ The following DID methods are supported:
]}
/>

:::danger Important: Weekly Republishing Required for `did:dht` DIDs
**Temporarily** DIDs created using the `did:dht` method **must** be republished weekly to prevent them from becoming unresolvable. An automatic republishing feature will be integrated into the SDK in the coming weeks.
:::

### did\:jwk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ import { DidJwk } from '@web5/dids'
// DID Document
const didDocument = JSON.stringify(didDht.document);

// Republish DID
const republishedDid = await DidDht.publish({did: didDht});

// :snippet-end:

expect(did).toMatch(/^did:dht:/);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ internal class HowToCreateDidTest {

//DID Document
val didDocument = portableDid.didDocument

//Republish Did
DidDht.publish( didDht.keyManager, didDht.document )


// :snippet-end:

assertNotNull(did, "DID should not be null")
Expand Down