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

Support copying individual profiles or a whole Store #159

Merged
merged 9 commits into from
Aug 10, 2023

Conversation

andrewwhitehead
Copy link
Member

Fixes #18

Also adds methods to get and set the default profile (opened when none is specified).

TimoGlastra
TimoGlastra previously approved these changes Aug 3, 2023
Copy link
Member

@TimoGlastra TimoGlastra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes seem very useful!

Need to make sure we also add these changes to the JS wrapper, but the changes surface of API seems quite small.

One question: Something in noticed with profile is that if I open a session for a profile that does not exist, it will not throw an error until a record is actually inserted of fetched from that session. This means I have to check whether a profile exists before opening, which is possible by calling createProfile. Or we have to fetch something to see if it works. I see some changes to the implementation of profiles, does this PR affect that behvaiour in any way?

What we do with normal wallets is that we try to open them, and if it fails we create them. This allows us to open it directly in all cases except the first time. While now we have to do a check every time that will fail everytime except the first time. It would be useful if opening a session would fail if the profile does not exist yet.

If this PR does not affect this at all, I can also open a separate issue for it

@andrewwhitehead
Copy link
Member Author

andrewwhitehead commented Aug 3, 2023

@TimoGlastra Thanks for opening the issue. This PR doesn't change that behaviour (although it adds some profile-related methods) but it's a good one to fix for 0.3.

…py profiles between stores

Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
askar-storage/src/backend/mod.rs Outdated Show resolved Hide resolved
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
@andrewwhitehead andrewwhitehead merged commit 9172fe2 into hyperledger:main Aug 10, 2023
26 checks passed
@andrewwhitehead andrewwhitehead deleted the import-api branch August 10, 2023 17:11
jamshale pushed a commit to jamshale/aries-askar that referenced this pull request Aug 18, 2024
Support copying individual profiles or a whole Store
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 this pull request may close these issues.

Askar different import/export capability
3 participants