ThirdwebCommon
The ThirdwebCommon header file defines several common enums and utility functions that are used across the Thirdweb Unreal SDK. These enums represent various states and outcomes for operations related to wallets, smart contracts, and authentication providers.
Key Components
Enums
EFunctionResult
- Represents the result of a generic function call.
Success: The operation completed successfully.Failed: The operation failed.
ESmartWalletDeployedFunctionResult
- Represents the deployment status of a smart wallet.
Deployed: The smart wallet is deployed.NotDeployed: The smart wallet is not deployed.Failed: The check for deployment status failed.
EOTPVerificationFunctionResult
- Represents the result of an OTP (One-Time Password) verification.
Verified: The OTP was successfully verified.Retry: The OTP verification failed, but can be retried.Failed: The OTP verification failed with no retry available.
EThirdwebOAuthProvider
- Represents the supported OAuth providers.
Google: Represents Google as an OAuth provider.Apple: Represents Apple as an OAuth provider.Facebook: Represents Facebook as an OAuth provider.
Utility Functions
-
ToText(const EThirdwebOAuthProvider Provider):- Converts an
EThirdwebOAuthProviderenum value to a localizedFText. - Parameters:
Provider: The OAuth provider enum value.
- Returns: A localized
FTextrepresenting the provider.
- Converts an
-
ToString(const EThirdwebOAuthProvider Provider):- Converts an
EThirdwebOAuthProviderenum value to aFString. - Parameters:
Provider: The OAuth provider enum value.
- Returns: A
FStringrepresenting the provider.
- Converts an
Internal Implementation Notes
- The
LOCTEXT_NAMESPACEmacro is used to define the localization context for the text related to OAuth providers. - The
ToTextfunction utilizes a staticTMapto map theEThirdwebOAuthProviderenum values to their correspondingFTextrepresentations.