Skip to main content
The JavaScript SDK (@dynamic-labs-sdk/client) gives you full control over authentication, wallet connections, and transaction signing without any built-in UI. You create a Dynamic client, add extensions for the chains you support, and call functions directly — rendering every screen, button, and input yourself.
This SDK is headless. There is no built-in modal, wallet picker, or login form. You are responsible for building all user-facing UI.

How it works

1

Create a client

Call createDynamicClient() with your environment ID from the Dynamic dashboard. This is the single entry point for the SDK.
2

Add extensions

Register chain extensions (e.g. addEvmExtension(), addSolanaExtension()) to enable wallet discovery and signing for each chain you support.
3

Initialize

The client initializes automatically by default. Wait for initialization to complete before calling other SDK functions.
4

Build your UI

Use SDK functions to authenticate users, connect wallets, and sign transactions. You decide what the UI looks like — the SDK provides the logic.

What you need to build

Because the SDK is headless, your app handles these screens:
  • Login — collect an email/phone, trigger OTP or social auth, and verify the response
  • Wallet picker — list available wallet providers and let the user choose one
  • MFA prompts — prompt for TOTP codes or passkey verification when MFA is enabled
  • Step-up authentication — re-verify identity before sensitive actions
  • Device registration — verify the user’s email when they sign in from an unrecognized device
See Authentication screens for the full list with implementation guides.

What the SDK handles

You call functions; the SDK manages the rest:
  • Authentication — email OTP, SMS, social login, passkeys, external JWTs, and MFA
  • Wallet management — embedded wallets (MPC-backed, user-owned) and external wallets (MetaMask, Phantom, etc.)
  • Transaction signing — chain-specific signing, typed data, and message signing
  • Session management — JWTs, token refresh, and logout
  • Events — subscribe to auth, wallet, and session state changes with onEvent()
  • Multi-chain — EVM, Solana, Bitcoin, Aptos, Sui, TON, Tron, and Starknet via extensions
  • Gasless transactions — sponsor gas so users don’t pay, on both EVM (via ZeroDev) and Solana
  • Fireblocks Flow — accept crypto from any wallet or exchange and settle in a token and chain you choose

Architecture

The SDK creates and manages a hidden iframe internally for WaaS/MPC key operations. You do not need to configure or install a separate iframe host package.
┌─────────────────────────────────────────────┐
│  Your web app (any framework or none)       │
│                                             │
│  @dynamic-labs-sdk/client                   │
│  @dynamic-labs-sdk/evm (or /solana, etc.)   │
│                                             │
│  ┌─────────────────────────────────────┐    │
│  │  Hidden iframe (MPC key operations) │    │
│  │  Managed internally by the SDK      │    │
│  └─────────────────────────────────────┘    │
└─────────────────────────────────────────────┘

Use with React

The JavaScript SDK works in any JavaScript environment, including React. The @dynamic-labs-sdk/react-hooks package wraps client functions as React hooks so your components re-render automatically when state changes. See the React Quickstart (JS SDK) to get started, or the React Hooks guide for details on how hooks map to client functions.

Common mistakes

MistakeFix
Using @dynamic-labs/sdk-react-core without ReactUse @dynamic-labs-sdk/client instead
Adding @dynamic-labs/web-extensionNot needed — that package is for React Native on web
Loading SDK via <script> tag without a bundlerUse Vite, webpack, or another bundler
Expecting a built-in modal or wallet pickerThe JS SDK is headless — build your own UI
Calling createDynamicClient inside a render loopCreate the client once at app startup

What’s next

Quickstart

Install the SDK, create a client, and authenticate a user.

Wallets

Build a wallet picker, connect wallets, and manage accounts.

Fireblocks Flow

Accept crypto payments and settle in any token or chain.

User & Session Management

Check sign-in state, read user data, and manage sessions.