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

What goes in "Serialized VC goes here"? #447

Open
alberto-instnt opened this issue Jun 7, 2023 · 3 comments
Open

What goes in "Serialized VC goes here"? #447

alberto-instnt opened this issue Jun 7, 2023 · 3 comments

Comments

@alberto-instnt
Copy link

Hello im trying to understand how to grab a VC. I have an invitation link that generated by a ISSUER and I usually grab on to this link on other wallet apps. I want to be able to grab on to it through the wallet sdk.


import Walletsdk

var error: NSError?
let vc = VerifiableParseCredential("Serialized VC goes here", nil, &error)

How can I then also prove that I have the VC?
Thank you

@DRK3
Copy link
Collaborator

DRK3 commented Jun 16, 2023

Hi @alberto-instnt, if you have an invitation link, and you're trying to get some credentials from an issuer, you'll want to create an Opendi4ciInteraction object and pass it in there. See https://github.com/trustbloc/wallet-sdk/blob/main/cmd/wallet-sdk-gomobile/docs/usage.md#creating-the-interaction-object for more info, including examples.

The VerifiableParseCredential function you have in your code block is for parsing a credential you already have in serialized form. If you already have a VC, you can pass it in (as a string) to VerifiableParseCredential in place of "Serialized VC goes here".

@alberto-instnt
Copy link
Author

@DRK3 Thank you for this update, this is very good information we have been looking for. Do you know whether this repo has any relation to aries-go on hyperledger? These seem similar.

@DRK3
Copy link
Collaborator

DRK3 commented Jun 21, 2023

@alberto-instnt This repo imports Aries-Framework-Go and uses it for various lower-level operations (e.g. parsing Verifiable Credentials). Wallet-SDK and Aries-Framework-Go have support for different protocols and expose their implementations in different ways. Currently, Wallet-SDK is mainly focused on the OpenID4CI and OpenID4VP specifications, as well as other functionality to make using those protocols more convenient.

The other difference is in the approach used by both repos. Aries-Framework-Go is both a library and also an "agent" application (with different controllers), where in your code you'd create an "agent" and execute commands on the agent using your chosen controller. Aries-Framework-Go also has gomobile bindings for it, but I believe the bindings are only for the agent side of things. Wallet-SDK is more like a pure library instead (and has its functionality exposed via gomobile as well).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants