> ## 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.

# Embedded Wallets Quickstart

> Give your users an embedded wallet, either automatically at sign up or on demand from your own code.

## Prerequisites

1. [Created Dynamic Client](/docs/javascript/reference/client/create-dynamic-client)
2. [Chain extensions added](/docs/javascript/reference/adding-extensions)
3. [Initialized Dynamic Client](/docs/javascript/reference/client/initialize-dynamic-client)

## Process

<Tabs>
  <Tab title="Automatic creation">
    <Steps>
      <Step title="Enable embedded wallets">
        In the [Dynamic dashboard](https://app.dynamic.xyz/dashboard/embedded-wallets/dynamic), turn on the **Embedded Wallets** feature under **Wallets**. Make sure "Create on sign up" is toggled on.
      </Step>

      <Step title="That is it">
        The next time a user logs in, Dynamic creates their wallet as part of sign up. You do not call anything.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Manual creation">
    Use this when you want the wallet created at a specific moment rather than at sign up, for example after the user finishes onboarding or right before their first transaction.

    <Steps>
      <Step title="Enable embedded wallets">
        In the [Dynamic dashboard](https://app.dynamic.xyz/dashboard/embedded-wallets/dynamic), turn on the **Embedded Wallets** feature under **Wallets**. Make sure "Create on sign up" is toggled off.
      </Step>

      <Step title="Create the wallet as needed">
        Check which chains the user is missing a wallet on, and create only those.

        `getChainsMissingWaasWalletAccounts` returns an empty array when the user already has everything they need, so this is safe to call on every sign in.

        <CodeGroup>
          ```typescript TypeScript theme={"system"}
          import {
            createWaasWalletAccounts,
            getChainsMissingWaasWalletAccounts,
          } from '@dynamic-labs-sdk/client/waas';

          const createWalletIfMissing = async () => {
            const missingChains = getChainsMissingWaasWalletAccounts();

            if (missingChains.length === 0) return;

            await createWaasWalletAccounts({ chains: missingChains });
          };
          ```

          ```tsx React/React Native theme={"system"}
          import { getChainsMissingWaasWalletAccounts } from '@dynamic-labs-sdk/client/waas';
          import { useCreateWaasWalletAccounts, useUser } from '@dynamic-labs-sdk/react-hooks';
          import { useEffect } from 'react';

          function useCreateWalletIfMissing() {
            const { data: user } = useUser();
            const { mutate: createWaasWalletAccounts } = useCreateWaasWalletAccounts();

            useEffect(() => {
              if (!user) return;

              const missingChains = getChainsMissingWaasWalletAccounts();

              if (missingChains.length === 0) return;

              createWaasWalletAccounts({ chains: missingChains });
            }, [user, createWaasWalletAccounts]);
          }
          ```
        </CodeGroup>
      </Step>
    </Steps>
  </Tab>
</Tabs>
