Wallet Service
The current project uses Dhiway Wallet as the active wallet service for credential import.
It is included to demonstrate how DPG can fetch user-linked credentials from an external wallet and map them into project profile schemas, but the surrounding UI architecture is designed so another wallet implementation can be substituted later.
Responsibility
Section titled “Responsibility”The wallet service is responsible for:
- accepting an identifier such as email or phone number
- sending a verification code to that identifier
- verifying the returned code
- returning verified credentials associated with that user
The DPG UI remains responsible for:
- deciding when credential import is available
- presenting provider selection
- mapping external payloads into the active schema form
- allowing users to review and submit the resulting profile data
Current User Flow
Section titled “Current User Flow”- The user signs in to DPG.
- The profile form exposes
Import Credentialswhen at least one provider is configured. - The user selects Dhiway Wallet.
- The UI offers the signed-in user’s email or phone number as the identifier.
- The wallet service sends a verification code.
- The user verifies the code.
- The wallet service returns verified credentials.
- The user selects one credential to import.
- The UI maps credential fields into the active schema.
Integration Surface
Section titled “Integration Surface”Current UI client:
apps/ui/src/lib/wallet-api.ts
Current provider UI:
apps/ui/src/components/wallet/providers/dhiway-wallet-provider.tsx
Current endpoints:
POST /api/v1/auth/request-codePOST /api/v1/auth/verify-codeGET /api/v1/verified-credentials
Current env:
VITE_VC_WALLET_URLVITE_VC_WALLET_API_KEY
Replaceability
Section titled “Replaceability”The wallet integration is replaceable because the form page only depends on the provider contract and normalized import result.
To replace Dhiway Wallet with another provider:
- implement a new provider component
- implement a client for the new service’s endpoints
- return the shared import result shape
- register the provider in the wallet registry
No profile-form rewrite should be required.
Project Recommendation
Section titled “Project Recommendation”Treat wallet integration as a capability service owned by deployment and product requirements, not by the DPG core model.
That keeps the project open to:
- national or regional wallet providers
- enterprise credential brokers
- issuer-specific retrieval flows
- deployments that do not use wallet import at all