Skip to content

Commit

Permalink
adding dht method to did creation devtool method
Browse files Browse the repository at this point in the history
  • Loading branch information
jiyoontbd committed Jan 22, 2024
1 parent 7f56d82 commit c14d142
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/protocol/src/dev-tools.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import type { OfferingData, QuoteData, RfqData } from './types.js'
import type { PortableDid } from '@web5/dids'
import { DidIonMethod, DidKeyMethod } from '@web5/dids'
import { DidDhtMethod, DidIonMethod, DidKeyMethod } from '@web5/dids'
import { VerifiableCredential } from '@web5/credentials'
import { Offering } from './resource-kinds/index.js'
import { Rfq } from './message-kinds/index.js'
Expand Down Expand Up @@ -65,9 +65,11 @@ export class DevTools {
*/
static async createDid(didMethod: DidMethodOptions = 'key') {
if (didMethod === 'key') {
return DidKeyMethod.create()
return await DidKeyMethod.create()
} else if (didMethod === 'ion') {
return DidIonMethod.create()
return await DidIonMethod.create()
} else if (didMethod === 'dht') {
return await DidDhtMethod.create()
} else {
throw new Error(`${didMethod} method not implemented.`)
}
Expand Down

0 comments on commit c14d142

Please sign in to comment.