DCIDClient
The DCIDClient is the main entry point for the DCID SDK. It provides access to all SDK functionality through a unified interface.
Constructor
Configuration Options
Example Configuration
Methods
initialize()
Initializes the SDK and all internal services.
setMkHSM(sdk)
Sets the native HSM SDK for React Native.
setWebViewBridge(bridge)
Sets the WebView bridge for React Native HSM operations.
getState()
Returns the current SDK state.
getPlatform()
Returns the detected or configured platform.
isInitialized()
Checks if the SDK has been initialized.
getCryptoProvider()
Returns the platform-specific crypto provider.
Properties
auth
Access to authentication functionality.
See AuthManager for details.
identity
Access to identity management.
See IdentityManager for details.
credentials
Access to credential management.
See CredentialManager for details.
proofs
Access to proof generation.
See ProofGenerator for details.
analytics
Access to analytics tracking.
See Analytics for details.
api
Direct access to the API client.
webSocket
Access to WebSocket functionality for MTP credentials.
Platform Detection
The SDK automatically detects the runtime platform if not specified:
Detection logic:
- mobile — React Native environment detected
- extension — Browser extension APIs available
- web — Standard browser environment
Custom Storage
Override the default storage adapter:
Custom Logger
Implement custom logging:
Error Handling
The client throws typed errors:
TypeScript Support
The SDK is written in TypeScript and includes full type definitions: