Skip to main content

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:// and openid4vp:// 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:

  1. Typed results, not exceptions — expected outcomes (user declined, verification failed, nothing matched) are returned as sealed result types you switch over. Exceptions are reserved for transport and programming errors.
  2. 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 WalletPrompt and awaits your typed response. The SDK never touches the widget tree.
  3. Host-supplied ports — HTTP client, storage encryption key, and optional overrides are injected via WalletSdkOptions at initialization.

Architecture​

Module map​

WalletSdk.initialize() wires the modules once; you then use instance getters:

ModuleEntry pointPurpose
Authenticationsdk.authPasskey register / login / recovery, session persistence
Credential storagesdk.credentialsList, read, save, delete credentials; wallets and DIDs
Offer acceptancesdk.acceptOffer(...) / sdk.offerAcceptanceOID4VCI issuance flow (always wired)
Presentationsdk.present(...) / sdk.presentationOpenID4VP flow (always wired)
Deep linkssdk.handleLink(...)Classify and dispatch inbound wallet URIs
Trustsdk.trustIssuer / verifier trust queries and branding

Package entry points​

ImportContents
package:wallet_sdk/wallet_sdk.dartPrimary public surface (everything documented here)
package:wallet_sdk/dio.dartDioPlatformHttpClient — adapter to reuse your Dio instance
package:wallet_sdk/testing.dartFakes and advanced wiring for unit tests
package:wallet_sdk/platform.dartNative channel types (rarely needed directly)

Requirements​

RequirementValue
Flutter SDK>= 3.4
PlatformsiOS, Android
Backendiden2 Platform API (staging: https://api.stg.iden2.app)
PasskeysApp identity registered with the target environment (associated domains / asset links)

Next steps​