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

change PortableDid's did property to uri #329

Closed
mistermoe opened this issue Dec 4, 2023 · 1 comment · Fixed by #393
Closed

change PortableDid's did property to uri #329

mistermoe opened this issue Dec 4, 2023 · 1 comment · Fixed by #393
Assignees
Labels
package: dids @web5/dids package

Comments

@mistermoe
Copy link
Member

PortableDid is returned by every DidMethod.create implementation. e.g.

const did: PortableDid = await DidDhtMethod.create({ publish: true })

when writing code where you want to use the actual did's URI, it ends up looking something like this:

const vc = await VerifiableCredential.create({
  type    : 'TBDeveloperCredential',
  subject : did.did,
  issuer  : did.did,
  data    : {
    username: 'moegrammer'
  }
})

did.did can be a bit confusing. i think changing did.uri would make things a bit more clear with respect to when someone is referring the string representation of a did

@mistermoe
Copy link
Member Author

web5-kt and web5-rs have snapped to using uri

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: dids @web5/dids package
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants