Configuration
ClientProps
Configuration object for initializing the Dynamic SDK.Properties
Example
ClientDebugProps
Debug configuration options.Properties
- webview (bool): Log webview messages
- messageTransport (bool): Log message transport events
- loggerLevel (int): Override the logger level by numeric value
Authentication
UserProfile
Represents an authenticated user’s profile.Properties
- userId (String?): Unique user identifier
- email (String?): User’s email address
- phoneNumber (String?): User’s phone number
Example
StreamBuilder Example
PhoneData
Phone number data for SMS authentication.Properties
- dialCode (String): Country dial code with + prefix
- iso2 (String): ISO 3166-1 alpha-2 country code
- phone (String): Phone number without country code
Example
Country Code Examples
SocialProvider
Enum for social authentication providers.Example
Wallets
BaseWallet
Represents a user’s wallet.Properties
- address (String): The wallet’s public address
- chain (String): Blockchain type: “EVM” for Ethereum-compatible chains or “SOL” for Solana
- walletName (String?): Human-readable name of the wallet provider (e.g., “MetaMask”, “Phantom”)
- id (String?): Unique identifier for API operations like setPrimary
Example
Checking Wallet Type
Widget Example
GenericNetwork
Represents a blockchain network.Properties
- name (String): Human-readable network name
- chainId (int?): Chain ID for EVM networks (null for Solana)
- networkId (String?): Network ID for Solana networks (null for EVM)
Example
Common EVM Chain IDs
Common Solana Network IDs
EVM / Blockchain
EthereumTransaction
Transaction data for EVM chains.Properties
- to (String): Recipient address (0x prefixed hex string)
- value (String): Amount to send in Wei (as String to handle large numbers)
- gasLimit (int): Maximum gas units allowed for the transaction
- maxFeePerGas (int?): Maximum total fee per gas unit (optional, for EIP-1559)
- maxPriorityFeePerGas (int?): Maximum priority fee per gas unit (optional, for EIP-1559)
- data (String?): Encoded contract call data (optional)
Example
Converting ETH to Wei
WriteContractInput
Input for writing to a smart contract.Properties
- address (String): Smart contract address
- functionName (String): Name of the function to call
- args (
List<dynamic>): Function arguments in order - abi (
List<Map<String, dynamic>>): Contract ABI definition
Example
ERC20 Transfer Example
GasPrice
Current gas price information for EVM chains.Properties
- maxFeePerGas (int): Maximum total fee per gas unit (in Wei)
- maxPriorityFeePerGas (int): Maximum priority fee per gas unit (in Wei)
Example
Converting Gas Price to Gwei
BlockhashResult
Solana blockhash information.Properties
- blockhash (String): Recent blockhash for transaction creation
- lastValidBlockHeight (int): Last block height at which the blockhash is valid
Example
MFA
MfaDevice
Represents an MFA device.Properties
- id (String?): Unique device identifier
- type (MfaDeviceType?): Type of MFA device (currently only TOTP)
Example
MfaAddDevice
Response when adding an MFA device.Properties
- secret (String): Secret key for TOTP QR code generation
- id (String?): Device identifier
Example
QR Code Generation Example
MfaCreateToken
Parameters for MFA token creation.Properties
- singleUse (bool): Whether the token should be single-use
Example
Passkeys
UserPasskey
Represents a user’s passkey.Properties
- id (String): Unique passkey identifier
- createdAt (String): Creation timestamp in ISO 8601 format
- lastUsedAt (String?): Last usage timestamp in ISO 8601 format (optional)
- isDefault (bool?): Whether this is the default passkey
Example
Formatting Timestamps
Widget Example
PasskeyAuthenticationResponse
Response from passkey MFA authentication.Properties
- jwt (String?): JWT token for MFA operations
Example
Error Handling
All SDK methods that can fail will throw exceptions. Use standard Dart error handling:DynamicSdkException. It preserves the structured fields the JavaScript side attached instead of flattening them into the message text:
String?
The
message of the serialized JavaScript error.String?
The JavaScript error class name, such as
WalletApiError or Error.String?
The JavaScript stack, when the bundle attached one.
String?
A machine-readable error code, such as
NETWORK_ERROR or duplicate_wallet_import.int?
The HTTP status of the underlying request when the bundle attached one. A
0 means the browser received no response, which is what isTransportError keys on.Map<String, dynamic>
Every property of the serialized error, verbatim. Anything the bundle attaches in the future is reachable here without an SDK release.
isTransportError (the request never produced an answer and is safe to retry), isInvalidPassword (the supplied password did not decrypt the key share), isDuplicateImport (the key already backs a wallet), and isRateLimited (HTTP 429).
toString() produces the same text the previous plain Exception wrapping produced, so existing string-based error handling keeps working.