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

Improve JS Api #103

Open
TimoGlastra opened this issue Feb 9, 2023 · 3 comments
Open

Improve JS Api #103

TimoGlastra opened this issue Feb 9, 2023 · 3 comments

Comments

@TimoGlastra
Copy link
Member

TimoGlastra commented Feb 9, 2023

As @genaris has highlighted in # the API for parsing objects could be improved.

currently you have to do the following to load a credential definition:

rsCredentialDefinitions[credDefId] = CredentialDefinition.load(JSON.stringify(credentialDefinitions[credDefId]))

It would be nice if load took a json object instead of a string. We also discussed that e.g. Presentation.create could just take json objects as input, and do the loading in the Presentation class so the user doesn't need to care about the object handles etc..

I think we should make the API just json objects wherever we can

@genaris
Copy link
Contributor

genaris commented Feb 22, 2023

I think it will be useful to implement these improvements before openwallet-foundation/credo-ts#1331, as otherwise users will need to care about freeing a lot object handles that most likely will not be useful other than being inputs as some classes like Presentation.

I'll pick these changes up if nobody is working on that yet.

@berendsliedrecht
Copy link
Contributor

@genaris did #129 and #130 fix this?

@genaris
Copy link
Contributor

genaris commented Mar 7, 2023

Yes, mostly. For some few cases the handle clearing by the app will still be needed (for instance the one of the resulting presentation in the example)

@genaris genaris moved this from Todo to In Progress in Ledger Agnostic AnonCreds Mar 10, 2023
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

3 participants