API Reference
This section provides a comprehensive reference for all the major TypeScript types used throughout the @arcblock/did-connect-react library. Understanding these data structures is crucial for effectively using components like SessionProvider and hooks like useConnect.
Connection Types#
These types are primarily used when configuring and interacting with the DID Connect modal.
ConnectProps#
This is the main configuration object passed to the open function from the useConnect hook or the openDidConnect function from the session context. It allows for extensive customization of the connection flow's behavior and appearance.
Additional configuration options.
ConnectMessages#
Object to customize the text displayed within the DID Connect UI.
OpenDidConnect#
This function type defines the signature for opening the DID Connect flow with advanced requirements, often used for progressive authorization.
Session and User Types#
These types define the structure of the user and session data managed by SessionProvider.
SessionProps#
The main session object, accessible via the useSession hook. It contains the user's state, session information, and methods to manage the session.
User#
Represents the detailed profile of an authenticated user.
UserSession#
Represents a single active session for a user, typically retrieved from getUserSessions.
Core Data Types#
These are fundamental string union types used across various other interfaces.
Type | Description | Possible Values |
|---|---|---|
| Identifies the authentication method or provider. |
|
| Represents the operating system of the DID Wallet. |
|
| Defines the role of a user within the application. |
|
| The base set of supported languages. |
|
| The user's locale, can be a base locale or a more specific one. |
|