Skip to content

Commit

Permalink
did:dht Republish Warning (#1400)
Browse files Browse the repository at this point in the history
* Adding temporary republish warning (did:dht)

* fix snippet
  • Loading branch information
EbonyLouis committed Apr 24, 2024
1 parent ca10000 commit 9afe58a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
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
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
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

0 comments on commit 9afe58a

Please sign in to comment.