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

Communication protocol optimization #492

Merged
merged 23 commits into from
Jan 14, 2025
Merged

Conversation

kkmanos
Copy link
Member

@kkmanos kkmanos commented Jan 8, 2025

  • Removed ContainerContext
  • Removed useCheckUrl hook as it had strong dependency with the "App" component and it was increasing the complexity when dealing the popups which were triggered from other components
  • Adopt an architecture that does not use callbacks for keystore changes
  • Remove events that are emitted when the communication protocol is running which were used to trigger the container reloading to keep up to date with the latest keystore instance

This PR introduces the following top-level components that abstract the core functionality of the communication protocol and are dependent on the rest of the react components architecture

UriHandler: A Higher Order Component which is used for handling all the incoming URI requests

OpenID4VPContext: Isolated context to show the credential selection popup. Exposes an API for the OpenID4VCI protocol

OpenID4VCIContext: Exposes an API for the OpenID4VCI protocol

CredentialParsersContext: Exports credentialParserRegistry dependency which caches all metadata in memory

The following diagram describes the dependency/hierarchy between the different react contexts and Higher Order Components(HOC) in the top level of the React application. The hierarchy of the contexts was selected according to the dependencies of each corresponding hook.

d2(3)

@kkmanos kkmanos requested a review from gkatrakazas January 10, 2025 13:49
@kkmanos kkmanos marked this pull request as ready for review January 14, 2025 15:21
@kkmanos kkmanos merged commit c6d4a78 into master Jan 14, 2025
4 checks passed
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.

2 participants