Skip to content

Instantly share code, notes, and snippets.

@frankhinek
Last active February 16, 2024 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frankhinek/665b1603c5f86a3ca8ed82a1e57793ba to your computer and use it in GitHub Desktop.
Save frankhinek/665b1603c5f86a3ca8ed82a1e57793ba to your computer and use it in GitHub Desktop.
Test Transitive Dependency
import { DidDht } from '@web5/dids';
(async () => {
const did = await DidDht.create();
console.log(did);
})();

Output of node test.js:

node test.js
BearerDid {
  uri: 'did:dht:5mbfn6pzwdxzmp6zzghqrk8tmo7j8mqahhf3cmtggfjsrjgdfouo',
  document: {
    id: 'did:dht:5mbfn6pzwdxzmp6zzghqrk8tmo7j8mqahhf3cmtggfjsrjgdfouo',
    verificationMethod: [ [Object] ],
    authentication: [
      'did:dht:5mbfn6pzwdxzmp6zzghqrk8tmo7j8mqahhf3cmtggfjsrjgdfouo#0'
    ],
    assertionMethod: [
      'did:dht:5mbfn6pzwdxzmp6zzghqrk8tmo7j8mqahhf3cmtggfjsrjgdfouo#0'
    ],
    capabilityDelegation: [
      'did:dht:5mbfn6pzwdxzmp6zzghqrk8tmo7j8mqahhf3cmtggfjsrjgdfouo#0'
    ],
    capabilityInvocation: [
      'did:dht:5mbfn6pzwdxzmp6zzghqrk8tmo7j8mqahhf3cmtggfjsrjgdfouo#0'
    ]
  },
  metadata: { published: true, versionId: '1708117295' },
  keyManager: LocalKeyManager {
    _algorithmInstances: Map(1) {
      [class EdDsaAlgorithm extends CryptoAlgorithm] => EdDsaAlgorithm {}
    },
    _keyStore: MemoryStore { store: [Map] }
  }
}
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"@tbdex/http-client": "^0.26.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment