Skip to content

Instantly share code, notes, and snippets.

@blackgirlbytes
Created November 13, 2023 17:10
Show Gist options
  • Save blackgirlbytes/bbf8fd7b71d9035567aae10675cc93c1 to your computer and use it in GitHub Desktop.
Save blackgirlbytes/bbf8fd7b71d9035567aae10675cc93c1 to your computer and use it in GitHub Desktop.
How to create a DID not tied to a browser session
import { DidIonMethod, DidKeyMethod, DidDhtMethod } from '@web5/dids';
async function main() {
// const myDid = await DidIonMethod.create('ion');
const myDidKey = await DidKeyMethod.create('key');
const myDidDht = await DidDhtMethod.create('dht');
console.log(myDidKey);
console.log(myDidDht);
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment