Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Add JS binding to return bootstrap data from agent-js-worker #392

Open
Tracked by #1806
Moopli opened this issue Aug 3, 2022 · 0 comments
Open
Tracked by #1806

Add JS binding to return bootstrap data from agent-js-worker #392

Moopli opened this issue Aug 3, 2022 · 0 comments

Comments

@Moopli
Copy link
Contributor

Moopli commented Aug 3, 2022

When the wasm agent initializes, it is either given a number of parameters containing bootstrap data, or it must onboard a new user. In either case, it will have a set of bootstrap parameters at the end, that it uses for initializing its vaults, keystores, etc. Since trustbloc/wallet needs the bootstrap data after wasm agent initialization, and since the wasm agent can change bootstrap data when onboarding, wallet currently needs to make a bootstrap GET call after agent initialization, despite the wasm agent having had all the up-to-date bootstrap data moments before.

The wasm agent should save its bootstrap data (once onboarding is complete, if onboarding is necessary), and should have a JS API function that returns the bootstrap data, so wallet can just fetch the bootstrap data from its own wasm agent instance instead of fetching the bootstrap data from the auth server.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant