Skip to main content
The JavaScript SDK (@dynamic-labs-sdk/client) works in any environment that runs JavaScript — React, React Native, Vue, Svelte, vanilla JS, or another framework. It 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.

Choose your quickstart

Pick the path that matches how you build:

React

Vite React apps with @dynamic-labs-sdk/react-hooks.

React Native

Expo or bare React Native with the same client and hooks.

Vanilla JavaScript

Framework-free or any other JS environment.

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
  • Earn — let users deposit into curated yield vaults, track positions, and claim rewards (EVM only)

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.

Use with React and React Native

For React (web), @dynamic-labs-sdk/react-hooks wraps client functions as hooks so components re-render when state changes. See the React Hooks guide. For React Native (Expo or bare), you add polyfills, native modules, and deep-link metadata — then auth, wallets, and signing match the web guides. See React Native Setup for Expo vs bare details.

Common mistakes

What’s next

Wallets

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

Fireblocks Flow

Accept crypto payments and settle in any token or chain.

Earn

Let users deposit into yield vaults, track positions, and claim rewards.
Last modified on August 26, 2026