-
Notifications
You must be signed in to change notification settings - Fork 198
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
Registration of Wallet and Storage classes other than Indy in Agent constructor #1235
Comments
I'm not too familiar with Askar, so forgive me for asking mildly uninformed questions... How pluggable is the database backend from the perspective of AFJ? Looking at #1211 I can see that this works with both SQLite and Postgres, nice! But let's say I'd like to use MySQL or maybe even a NoSQL backend. Would that be possible without touching the Rust layer (e.g. providing some FFI callbacks)? |
My understanding is that currently Askar supports those two 'fixed' backends. I'm not completely sure but AFAIK there is not yet a plug-in interface to register external backends. But I do think that it would be very interesting to be able to plug a custom backend by using FFI callbacks (something like the one for the custom logger). Not sure how good it might be in terms of performance but it will be interesting to see it working. Surely @andrewwhitehead and @blu3beri can give us good ideas about this possibility (and how feasible) it is. |
Yes I believe Ariel is correct that they are fixed. However I doubt it would ever be possible with some FFI callbacks for the storing and such. I think if we really need that, Askar Storage and Askar Crypto have to become separate modules. Afterwards we can use Askar Crypto for the secure part of the secure storage and implement askar storage in pure js for the storage part of secure storage. Does that make sense? |
I think this is done, If I misunderstood please reopen @genaris |
Currently,
Agent
class provides a way of registeringWallet
andStorageService
instances not based on Indy: this can be achieved by creating aDependencyManager
before Agent constructor and register there the one we want. Something like:As it can be seen, this is not very evident, so now we are working on extracting IndyWallet class from the core and make use of extension modules like @aries-framework/indy-sdk and @aries-framework/askar, we can simplify this procedure. For instance, we can leave the extension module to register the instances it needs and throw an error if another module has already done so.
The text was updated successfully, but these errors were encountered: