> ## 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](https://www.dynamic.xyz/docs/javascript/reference/client/create-dynamic-client.md) and [initialize it](https://www.dynamic.xyz/docs/javascript/reference/client/initialize-dynamic-client.md).

> [!NOTE]
>
> Looking to get something running instead? Start with the [JavaScript quickstart](https://www.dynamic.xyz/docs/javascript/reference/quickstart.md), the [React quickstart](https://www.dynamic.xyz/docs/javascript/reference/react-quickstart.md), or the [React Native quickstart](https://www.dynamic.xyz/docs/javascript/reference/react-native-quickstart.md).

## Client

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

> [card] [Creating a Dynamic Client](https://www.dynamic.xyz/docs/javascript/reference/client/create-dynamic-client.md)
>
> `createDynamicClient` and its options.

> [card] [Initializing the Dynamic Client](https://www.dynamic.xyz/docs/javascript/reference/client/initialize-dynamic-client.md)
>
> Start the client and restore an existing session.

> [card] [Adding Extensions](https://www.dynamic.xyz/docs/javascript/reference/adding-extensions.md)
>
> Add chain and feature modules to the client.

> [card] [Events Catalog](https://www.dynamic.xyz/docs/javascript/reference/client/events-catalog.md)
>
> Every event the client emits, with `onEvent` and `offEvent`.

> [card] [JWT Scopes & Access Lists](https://www.dynamic.xyz/docs/javascript/reference/client/jwt-scopes.md)
>
> Read scopes from the session token.

> [card] [Delete User Account](https://www.dynamic.xyz/docs/javascript/reference/client/delete-user.md)
>
> Remove a user and their embedded wallets.

## React

Hooks for reading client state in React and React Native.

> [card] [React Hooks](https://www.dynamic.xyz/docs/javascript/reference/react-hooks.md)
>
> The hooks package and setup.

> [card] [React Hooks Catalog](https://www.dynamic.xyz/docs/javascript/reference/react-hooks-catalog.md)
>
> Every hook, with its return type.

> [card] [How React Hooks Work](https://www.dynamic.xyz/docs/javascript/reference/react-hooks-guide.md)
>
> Reactivity model and re-render behavior.

## Wallets

Chain-agnostic operations that work across every connected wallet.

> [card] [Getting Wallet Accounts](https://www.dynamic.xyz/docs/javascript/reference/wallets/get-wallet-accounts.md)
>
> List the accounts available to the signed-in user.

> [card] [Getting Native Balance](https://www.dynamic.xyz/docs/javascript/reference/wallets/get-native-balance.md)
>
> Native gas balance for the active network.

> [card] [Getting Token Balances](https://www.dynamic.xyz/docs/javascript/reference/wallets/get-token-balances.md)
>
> Token balances for one chain, or [across many](https://www.dynamic.xyz/docs/javascript/reference/wallets/get-multichain-token-balances.md).

> [card] [Signing a Message](https://www.dynamic.xyz/docs/javascript/reference/wallets/sign-message.md)
>
> Sign an arbitrary message with any wallet.

> [card] [Switching Active Network](https://www.dynamic.xyz/docs/javascript/reference/wallets/switch-active-network.md)
>
> Change network, and [add one](https://www.dynamic.xyz/docs/javascript/reference/wallets/add-network.md).

> [card] [Getting Transaction History](https://www.dynamic.xyz/docs/javascript/reference/wallets/get-transaction-history.md)
>
> Past transactions for a wallet account.

> [card] [Connecting and Verifying a Wallet](https://www.dynamic.xyz/docs/javascript/reference/wallets/connect-and-verify-wallet.md)
>
> Connect an external wallet and prove ownership.

> [card] [Hardware Wallet Support](https://www.dynamic.xyz/docs/javascript/reference/wallets/hardware-wallets.md)
>
> Ledger and Trezor through the same interface.

## Chains

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

> [card] [EVM](https://www.dynamic.xyz/docs/javascript/reference/evm/adding-evm-extensions.md)
>
> Viem clients, EIP-712, EIP-5792, EIP-7702, fee estimation.

> [card] [Solana](https://www.dynamic.xyz/docs/javascript/reference/solana/adding-solana-extensions.md)
>
> Connections, signing, sending, simulation.

> [card] [Bitcoin](https://www.dynamic.xyz/docs/javascript/reference/bitcoin/adding-bitcoin-extension.md)
>
> PSBTs and Bitcoin signing.

> [card] [Sui](https://www.dynamic.xyz/docs/javascript/reference/sui/adding-sui-extension.md)
>
> Sui transactions and signing.

> [card] [TON](https://www.dynamic.xyz/docs/javascript/reference/ton/adding-ton-extension.md)
>
> TON transactions and signing.

> [card] [Aptos](https://www.dynamic.xyz/docs/javascript/reference/aptos/adding-aptos-extension.md)
>
> Aptos transactions and signing.

> [card] [Tron](https://www.dynamic.xyz/docs/javascript/reference/tron/adding-tron-extension.md)
>
> Tron transactions and signing.

> [card] [Stellar](https://www.dynamic.xyz/docs/javascript/reference/stellar/adding-stellar-extension.md)
>
> Stellar transactions and signing.

> [card] [Starknet](https://www.dynamic.xyz/docs/javascript/reference/starknet/adding-starknet-extension.md)
>
> Starknet transactions and signing.

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

## Gas sponsorship

> [card] [EVM Gas Sponsorship](https://www.dynamic.xyz/docs/javascript/reference/evm/evm-gas-sponsorship.md)
>
> Native sponsorship, and [sendSponsoredTransaction](https://www.dynamic.xyz/docs/javascript/reference/evm/send-sponsored-transaction.md).

> [card] [SVM Gas Sponsorship](https://www.dynamic.xyz/docs/javascript/reference/solana/svm-gas-sponsorship.md)
>
> Sponsored transactions on Solana.

> [card] [ZeroDev (ERC-4337)](https://www.dynamic.xyz/docs/javascript/reference/zerodev/adding-zerodev-extension.md)
>
> Smart accounts through ZeroDev.

> [card] [Wallet as a Service](https://www.dynamic.xyz/docs/javascript/reference/waas/checking-if-waas-is-enabled.md)
>
> Server-backed embedded wallet operations.

## Money movement

> [card] [Swaps](https://www.dynamic.xyz/docs/javascript/reference/client/get-swap-quote.md)
>
> `getSwapQuote`, [`executeSwapTransaction`](https://www.dynamic.xyz/docs/javascript/reference/client/execute-swap-transaction), [`getSwapStatus`](https://www.dynamic.xyz/docs/javascript/reference/client/get-swap-status).

> [card] [Earn](https://www.dynamic.xyz/docs/javascript/reference/client/list-yield-vaults.md)
>
> List vaults, [deposit](https://www.dynamic.xyz/docs/javascript/reference/client/deposit-to-yield-vault.md), [withdraw](https://www.dynamic.xyz/docs/javascript/reference/client/withdraw-from-yield-vault.md), [claim rewards](https://www.dynamic.xyz/docs/javascript/reference/client/claim-yield-rewards.md).

> [card] [Flow](https://www.dynamic.xyz/docs/javascript/reference/client/get-flow-quote.md)
>
> Quote, [submit](https://www.dynamic.xyz/docs/javascript/reference/client/submit-flow-transaction.md), and [broadcast](https://www.dynamic.xyz/docs/javascript/reference/client/broadcast-flow.md) a stablecoin payment.

## Business accounts

> [card] [Business Accounts](https://www.dynamic.xyz/docs/javascript/reference/business-accounts/create-a-business-account.md)
>
> Shared wallets with their own signers and roles.

> [card] [Creating Extensions](https://www.dynamic.xyz/docs/javascript/reference/creating-extensions.md)
>
> Build your own extension against the client.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.