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

Add @aries-framework/browser package #1319

Open
TimoGlastra opened this issue Feb 17, 2023 · 4 comments
Open

Add @aries-framework/browser package #1319

TimoGlastra opened this issue Feb 17, 2023 · 4 comments

Comments

@TimoGlastra
Copy link
Contributor

I think we're finally ready!

Probably want a LocalStorageWallet,and LocalStorageStorageService

We may even be able to use the browser kms

@alberto-instnt
Copy link

alberto-instnt commented Feb 22, 2024

Hello @TimoGlastra was there ever a consensus on this? Was exploring recently the possibility of taking some of the original code base from Rust and using Wasm to construct a browser module and store it in IndexedDB. But was wondering whether Credo has a current Typerscript implementation. Thanks

@TimoGlastra
Copy link
Contributor Author

Hey @alberto-instnt, we never finished the browser package, but with the modularity of the framework it should be quite straightforward to implement the needed agent dependencies yourself. We could support a browser package by default, but you'd still have to provide a wallet and storage implementation compatible in the browser (these have been extracted from core and must now be provided by another package).

If you'd wnat to use Askar we need to work on separating the crypto from the storage, but you may also be able to create a custom wallet implementation based on other available modules (depending on which crypto you need)

@berendsliedrecht
Copy link
Contributor

berendsliedrecht commented Feb 26, 2024

A bit of an old one, but you could use this to setup some of it up. Mainly the webpack items were a bit annoying to configure.

https://github.com/berendsliedrecht/afj-browser

It is rather hacky and likely won't work with the current credo-ts, but it might be useful for some inspiration.

I also have this branch of anoncreds-rs (https://github.com/berendsliedrecht/anoncreds-rs/tree/wasm) to make it work with WebAssembly.

@alberto-instnt
Copy link

@TimoGlastra Thanks for your response. Why would the current implementation not be compatible with browser? My current understanding from @berendsliedrecht is that there is no CL signature in Credo. Is there more to it? I can always maybe use JSON-LD as a alternative format for credential definition?

Also im not expert in Credo source code, but in an overly simplified way, I am thinking something like this:

  • Create credo-ts/browser package
  • Under this package implement credo-ts/core -> use this to do the basics
  • Implement storage for browser -> maybe something like indexedDB as alternative to askar (for now)?
  • Implement wallet for browser -> I see a module called wallet under credo-ts/core/src/wallet - would I be able to use this for browser or do I need to do some dev work on this?

Also would I have an issue with Indy-vdr for browser?

Im trying to create a roadmap of the effort needed. Also evaluating WASM.

Thanks :)

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