Configuration
DynamicSDK Initialization
Configuration for initializing the Dynamic SDK.Parameters
- environmentId (String) - Your Dynamic environment ID (required)
Example
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