Key Features

πŸ” Seamless Authentication

Users can sign in using familiar methods like email or phone number verification. The SDK handles all the complexity of OTP generation, verification, and session management.

πŸ’° Embedded Wallets

Create non-custodial wallets for your users instantly. These wallets are secured by advanced MPC (Multi-Party Computation) technology and can be used for transactions, signing, and more.

⛓️ Blockchain Integration

Full Ethereum integration with support for custom networks, gas management, and transaction handling. Users can send ETH, sign messages, and interact with smart contracts.

πŸ›‘οΈ Enterprise Security

Built with security-first principles, including SOC2 compliance, regular audits, and advanced key management through TSS-MPC technology.

πŸ“± SwiftUI Integration

Native SwiftUI support with automatic session state management, making it easy to build reactive user interfaces that respond to authentication state changes.

Architecture Overview

The Dynamic Swift SDK is built with modern Swift practices:
  • Type Safety - Full Swift type safety with comprehensive error handling
  • Async/Await - Modern Swift concurrency for smooth user experiences
  • Memory Management - Efficient memory usage with automatic cleanup
  • Network Layer - Robust networking with retry logic and offline support
  • SwiftUI Integration - Observable state management for reactive UIs

Quick Start

Here’s a quick example of what you can build:
import DynamicSwiftSDK
import SwiftUI

// Initialize the SDK with session state
let config = DynamicClientConfig(environmentId: "<your env id>")
let client = createDynamicClient(config: config)
let sessionState = DynamicSessionState()
bindSessionState(sessionState, to: client)

// Add Ethereum connector
try await addEthereumConnector(
    to: client,
    networkConfigProvider: GenericNetworkConfigurationProvider(),
    initialChainId: 84532
)

// Authenticate a user with email OTP
let otpVerification = try await sendEmailOtp(
    client: client,
    email: "[email protected]"
)

let authenticatedUser = try await verifyOtp(
    otpVerification: otpVerification,
    verificationToken: "123456"
)

// Create a wallet for the user
let accountAddress = try await createWalletAccount(client: client)

// Initialize the wallet for transactions
let wallet = try EthereumWallet(address: accountAddress, client: client)

// Send a transaction
let transaction = EthereumTransaction(
    from: wallet.address,
    to: recipient,
    value: amount,
    data: Data(),
    nonce: nil,
    gasPrice: gasPrice,
    gasLimit: gasLimit,
    chainId: chainId
)

let txHash = try await wallet.sendTransaction(transaction)
print("Transaction sent: \(txHash)")

// Export private key (for backup)
let privateKey = try await wallet.exportPrivateKey()
print("Private key exported: \(privateKey)")

Prerequisites

Getting Started

Wallet & Blockchain

Advanced Features

πŸ“± Complete Example App: Check out our Swift Example Repository for a fully functional iOS app demonstrating all SDK features including authentication, wallet creation, and Ethereum transactions with SwiftUI.