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

[alpha122] Cannot determine schemaId and credentialDefinitionId of V1 credential (offer-received) #868

Closed
Iskander508 opened this issue Jun 15, 2022 · 2 comments · Fixed by #877
Milestone

Comments

@Iskander508
Copy link
Contributor

When receiving a credential offer, it would be useful to have access to the schemaId and credentialDefinitionId values, eg. via getTags().

I think these two places have removed the possibility @TimoGlastra:

2fe0f18#r76179993
2fe0f18#r76182648

I have reproduced the issue in the version alpha.122

@TimoGlastra
Copy link
Contributor

TimoGlastra commented Jun 15, 2022

We've discussed this during the AFJ WG call. It's a bit tricky because we don't want to always override the metadata with the latest value. If I send a proposal and then receive an offer (so not accepted it yet), what should the value in the metadata be? The proposal I sent, or the offer I received.

During the WG call we agreed the record should contain the truth from our perspective.

We decided to add convenience methods to the api that would allow to retrieve the attachments, from which you can extract the data

So if the state is offer received I can do something like:

const { offer } = agent.credentials.getAttachmentData({ credentialRecordId: credentialRecord.id })

offer.indy.cred_def_id
offer.jsonld.credential.credentialSubject

@Iskander508
Copy link
Contributor Author

Iskander508 commented Jun 15, 2022

OK, that makes sense. I haven't noticed any getAttachmentData method, though. Is it planned to be added soon?

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

Successfully merging a pull request may close this issue.

2 participants