-
Notifications
You must be signed in to change notification settings - Fork 17
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
Bearer Did Impl #247
Bearer Did Impl #247
Conversation
* @return ResolutionResult The result of the DID resolution. | ||
*/ | ||
@JvmStatic | ||
suspend fun resolve(uri: String): ResolutionResult { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's your thinking with this function? This isn't in the APID, is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, I think got influenced by current impl in web5-kt.
That does beg the question though, how would we resovle a bearer did:
It would have to be like:
DidDht.resolve(bearerDid.did.uri)
But how would you know the type, (the bearer did could be JWK..)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bearer DID could be resolvable via the CONSTRUCTOR(uri: string, key_manager: KeyManager)
, because internal to that constructor would be three things:
- A call to
ResolutionResult(uri)
to resolve theDocument
- A call to
Did(uri)
to parse theDid
- Assignment of the
key_manager
to the data member
I'm doing this in web5-r
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLASS BearerDid
PUBLIC DATA did: Did
PUBLIC DATA document: Document
CONSTRUCTOR(uri: string, key_manager: KeyManager)
METHOD get_signer(): Signer
Right genius, its already resolved basically and we have document right there :duhh: I'll update it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
This is the implementation for bearer dids
Usage is here: