How hirokazu-kobayashi-koba-hiro/vc-wallet-android-app works
• Wallet App (Frontend): Represent all major Android components inside “app” (Activities such as LauncherActivity, custom & library activities, ViewModels) which directly interact with the user.
• Verifiable Credentials Library (Business Logic Layer): This module encapsulates protocols (OID4VC, OID4VP), domain logic (packages like domain, repository, UI, util), and configuration management. It covers functions from key and account management to issuance and presentation.
• Domain/Business Logic Components: Break down the library into its functional areas:
– Domain: Contains protocol logic, error handling (e.g., classes for OIDC flows, credential issuance results, token handling, error classes).
– Repository: Handles data persistence like AppDatabase, data sources for credentials and user management.
– UI & Activity Components: Library-provided UI screens that help in credential issuance, presentation, and account management.
– Utility Layers: Helper classes for HTTP clients, JSON processing, hash functions, secure storage, and crypto utilities.
• External Services: Mark integrations with external identity providers (OIDC endpoints, Authlete service, eudi issuer) and blockchain services for key/pair generation and operations.
• Continuous Integration/Deployment: Note the existence of a GitHub workflows folder (.github/workflows) and build configuration files. These are supporting components for build and release management.
• Data Flow Direction:
– Start at the User interacting with the Wallet App UI.
– Flow from activities (e.g., LauncherActivity and custom credentials activities) through ViewModels to the verifiable credentials client (initialized via VerifiableCredentialsClient.initialize() in the library).
– Data flows from the library’s business logic (protocol handling, key generation, issuance flows) to external services (OIDC provider, blockchain services) via HTTP/secure communication.
– Repository components persist and retrieve user data, credential records, and wallet configurations.
– From the Wallet App to the Verifiable Credentials Library (highlighting the integration via build.gradle dependencies).
– From the Verifiable Credentials Library’s UI and domain layers to its own underlying utility and repository layers.
– From external services (OIDC endpoints, Authlete trial, eudi issuer) into the library’s network and protocol management parts.
Architectural Patterns and Technologies
• MVVM Pattern: Indicate the separation of UI (Activities, Fragments) from ViewModels and the domain logic within the library.
• Modular Architecture: Clearly separate the wallet app from the verifiable credentials library, showing how the app “depends” on the library.
• Protocol Handling: Detail the key OIDC flows (Authorization Code Flow, Pre-authorization flow, Deferred issuing), and the multi-method issuing support for different credential formats (sd-jwt-vc, jwt_vc_json, etc.).
• Technology Notes:
– Android SDK/API usage (minimum Android 8, API level 26).
– Use of Gradle build scripts for module configuration.
– Integration with external services (OIDC providers and blockchain via web3).
– Custom activities in the library for various credential issuance and presentation workflows.