Wallet SDK Overview
The iden2 Wallet SDK is a Flutter/Dart package (wallet_sdk) that embeds the full iden2 holder-wallet capability set into your own mobile app:
- Passkey authentication — register, sign in, and recover users with platform passkeys (FIDO2 on Android, Keychain passkeys on iOS).
- Encrypted credential storage — SD-JWT verifiable credentials persisted in an SQLCipher database owned by the SDK.
- Credential issuance — accept OID4VCI credential offers end to end with a single call.
- Credential presentation — answer OpenID4VP presentation requests with selective disclosure and holder binding.
- Deep-link dispatch — route
openid-credential-offer://andopenid4vp://URIs to the right flow. - Trust Network integration — issuer and verifier trust checks, branding, and enforcement modes.
Early access
The Wallet SDK is available to partners as an early-access preview. APIs may change before general availability. Contact support for access to the package and a staging sandbox.
Design principles
The SDK owns flow orchestration and wallet-domain persistence; your app owns all UI. Three contracts make this split work:
- Typed results, not exceptions — expected outcomes (user declined, verification failed, nothing matched) are returned as sealed result types you
switchover. Exceptions are reserved for transport and programming errors. - The prompt contract — whenever a flow reaches a user decision (consent to store a credential, pick a credential to present, choose fields to disclose), the SDK emits a typed
WalletPromptand awaits your typed response. The SDK never touches the widget tree. - Host-supplied ports — HTTP client, storage encryption key, and optional overrides are injected via
WalletSdkOptionsat initialization.
Architecture
Module map
WalletSdk.initialize() wires the modules once; you then use instance getters:
| Module | Entry point | Purpose |
|---|---|---|
| Authentication | sdk.auth | Passkey register / login / recovery, session persistence |
| Credential storage | sdk.credentials | List, read, save, delete credentials; wallets and DIDs |
| Offer acceptance | sdk.acceptOffer(...) / sdk.offerAcceptance | OID4VCI issuance flow (always wired) |
| Presentation | sdk.present(...) / sdk.presentation | OpenID4VP flow (always wired) |
| Deep links | sdk.handleLink(...) | Classify and dispatch inbound wallet URIs |
| Trust | sdk.trust | Issuer / verifier trust queries and branding |
Package entry points
| Import | Contents |
|---|---|
package:wallet_sdk/wallet_sdk.dart | Primary public surface (everything documented here) |
package:wallet_sdk/dio.dart | DioPlatformHttpClient — adapter to reuse your Dio instance |
package:wallet_sdk/testing.dart | Fakes and advanced wiring for unit tests |
package:wallet_sdk/platform.dart | Native channel types (rarely needed directly) |
Requirements
| Requirement | Value |
|---|---|
| Flutter SDK | >= 3.4 |
| Platforms | iOS, Android |
| Backend | iden2 Platform API (staging: https://api.stg.iden2.app) |
| Passkeys | App identity registered with the target environment (associated domains / asset links) |
Next steps
- Getting Started — install, initialize, and run your first flow
- Configuration — every
WalletSdkOptionsfield - API Reference — the complete public surface