> ## Documentation Index
> Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# JavaScript SDK Reference

> The API surface of the Dynamic JavaScript SDK, grouped by area. Use this page to find the function you need, then follow the link for arguments, return values, and examples.

This reference covers `@dynamic-labs-sdk/client` and its chain and feature packages. Everything here works in any JavaScript environment: React, React Native, Vue, Svelte, or plain JavaScript.

Before calling anything on this page, [create a Dynamic client](/docs/javascript/reference/client/create-dynamic-client) and [initialize it](/docs/javascript/reference/client/initialize-dynamic-client).

<Note>
  Looking to get something running instead? Start with the [JavaScript quickstart](/docs/javascript/reference/quickstart), the [React quickstart](/docs/javascript/reference/react-quickstart), or the [React Native quickstart](/docs/javascript/reference/react-native-quickstart).
</Note>

## Client

Create the client, listen for events, and manage the signed-in user.

<Columns cols={2}>
  <Card title="Creating a Dynamic Client" href="/docs/javascript/reference/client/create-dynamic-client">
    `createDynamicClient` and its options.
  </Card>

  <Card title="Initializing the Dynamic Client" href="/docs/javascript/reference/client/initialize-dynamic-client">
    Start the client and restore an existing session.
  </Card>

  <Card title="Adding Extensions" href="/docs/javascript/reference/adding-extensions">
    Add chain and feature modules to the client.
  </Card>

  <Card title="Events Catalog" href="/docs/javascript/reference/client/events-catalog">
    Every event the client emits, with `onEvent` and `offEvent`.
  </Card>

  <Card title="JWT Scopes & Access Lists" href="/docs/javascript/reference/client/jwt-scopes">
    Read scopes from the session token.
  </Card>

  <Card title="Delete User Account" href="/docs/javascript/reference/client/delete-user">
    Remove a user and their embedded wallets.
  </Card>
</Columns>

## React

Hooks for reading client state in React and React Native.

<Columns cols={3}>
  <Card title="React Hooks" href="/docs/javascript/reference/react-hooks">
    The hooks package and setup.
  </Card>

  <Card title="React Hooks Catalog" href="/docs/javascript/reference/react-hooks-catalog">
    Every hook, with its return type.
  </Card>

  <Card title="How React Hooks Work" href="/docs/javascript/reference/react-hooks-guide">
    Reactivity model and re-render behavior.
  </Card>
</Columns>

## Wallets

Chain-agnostic operations that work across every connected wallet.

<Columns cols={2}>
  <Card title="Getting Wallet Accounts" href="/docs/javascript/reference/wallets/get-wallet-accounts">
    List the accounts available to the signed-in user.
  </Card>

  <Card title="Getting Native Balance" href="/docs/javascript/reference/wallets/get-native-balance">
    Native gas balance for the active network.
  </Card>

  <Card title="Getting Token Balances" href="/docs/javascript/reference/wallets/get-token-balances">
    Token balances for one chain, or [across many](/docs/javascript/reference/wallets/get-multichain-token-balances).
  </Card>

  <Card title="Signing a Message" href="/docs/javascript/reference/wallets/sign-message">
    Sign an arbitrary message with any wallet.
  </Card>

  <Card title="Switching Active Network" href="/docs/javascript/reference/wallets/switch-active-network">
    Change network, and [add one](/docs/javascript/reference/wallets/add-network).
  </Card>

  <Card title="Getting Transaction History" href="/docs/javascript/reference/wallets/get-transaction-history">
    Past transactions for a wallet account.
  </Card>

  <Card title="Connecting and Verifying a Wallet" href="/docs/javascript/reference/wallets/connect-and-verify-wallet">
    Connect an external wallet and prove ownership.
  </Card>

  <Card title="Hardware Wallet Support" href="/docs/javascript/reference/wallets/hardware-wallets">
    Ledger and Trezor through the same interface.
  </Card>
</Columns>

## Chains

Each chain ships as its own extension. Add the extension, then call the chain's functions.

<Columns cols={3}>
  <Card title="EVM" href="/docs/javascript/reference/evm/adding-evm-extensions">
    Viem clients, EIP-712, EIP-5792, EIP-7702, fee estimation.
  </Card>

  <Card title="Solana" href="/docs/javascript/reference/solana/adding-solana-extensions">
    Connections, signing, sending, simulation.
  </Card>

  <Card title="Bitcoin" href="/docs/javascript/reference/bitcoin/adding-bitcoin-extension">
    PSBTs and Bitcoin signing.
  </Card>

  <Card title="Sui" href="/docs/javascript/reference/sui/adding-sui-extension">
    Sui transactions and signing.
  </Card>

  <Card title="TON" href="/docs/javascript/reference/ton/adding-ton-extension">
    TON transactions and signing.
  </Card>

  <Card title="Aptos" href="/docs/javascript/reference/aptos/adding-aptos-extension">
    Aptos transactions and signing.
  </Card>

  <Card title="Tron" href="/docs/javascript/reference/tron/adding-tron-extension">
    Tron transactions and signing.
  </Card>

  <Card title="Stellar" href="/docs/javascript/reference/stellar/adding-stellar-extension">
    Stellar transactions and signing.
  </Card>

  <Card title="Starknet" href="/docs/javascript/reference/starknet/adding-starknet-extension">
    Starknet transactions and signing.
  </Card>
</Columns>

For chains with tier 2 support, see [the tier 2 chain list](/docs/javascript/reference/tier-2-chains/algorand). Network shapes are documented in [Network Transformers](/docs/javascript/reference/networks/network-transformers).

## Gas sponsorship

<Columns cols={2}>
  <Card title="EVM Gas Sponsorship" href="/docs/javascript/reference/evm/evm-gas-sponsorship">
    Native sponsorship, and [sendSponsoredTransaction](/docs/javascript/reference/evm/send-sponsored-transaction).
  </Card>

  <Card title="SVM Gas Sponsorship" href="/docs/javascript/reference/solana/svm-gas-sponsorship">
    Sponsored transactions on Solana.
  </Card>

  <Card title="ZeroDev (ERC-4337)" href="/docs/javascript/reference/zerodev/adding-zerodev-extension">
    Smart accounts through ZeroDev.
  </Card>

  <Card title="Wallet as a Service" href="/docs/javascript/reference/waas/checking-if-waas-is-enabled">
    Server-backed embedded wallet operations.
  </Card>
</Columns>

## Money movement

<Columns cols={3}>
  <Card title="Swaps" href="/docs/javascript/reference/client/get-swap-quote">
    `getSwapQuote`, [`executeSwapTransaction`](/docs/javascript/reference/client/execute-swap-transaction), [`getSwapStatus`](/docs/javascript/reference/client/get-swap-status).
  </Card>

  <Card title="Earn" href="/docs/javascript/reference/client/list-yield-vaults">
    List vaults, [deposit](/docs/javascript/reference/client/deposit-to-yield-vault), [withdraw](/docs/javascript/reference/client/withdraw-from-yield-vault), [claim rewards](/docs/javascript/reference/client/claim-yield-rewards).
  </Card>

  <Card title="Flow" href="/docs/javascript/reference/client/get-flow-quote">
    Quote, [submit](/docs/javascript/reference/client/submit-flow-transaction), and [broadcast](/docs/javascript/reference/client/broadcast-flow) a stablecoin payment.
  </Card>
</Columns>

## Business accounts

<Columns cols={2}>
  <Card title="Business Accounts" href="/docs/javascript/reference/business-accounts/create-a-business-account">
    Shared wallets with their own signers and roles.
  </Card>

  <Card title="Creating Extensions" href="/docs/javascript/reference/creating-extensions">
    Build your own extension against the client.
  </Card>
</Columns>
