> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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](https://docs.dynamic.xyz/docs/javascript/reference/client/create-dynamic-client.md)
2. [Chain extensions added](https://docs.dynamic.xyz/docs/javascript/reference/adding-extensions.md)
3. [Initialized Dynamic Client](https://docs.dynamic.xyz/docs/javascript/reference/client/initialize-dynamic-client.md)

## Process

> [tab] Automatic creation
>
> **1. Enable embedded wallets**
>
> In the [Dynamic Console](https://console.dynamic.xyz/dashboard/embedded-wallets/dynamic), turn on the **Embedded Wallets** feature under **Wallets**. Make sure "Create on sign up" is toggled on.
>
> **2. That is it**
>
> The next time a user logs in, Dynamic creates their wallet as part of sign up. You do not call anything.

> [tab] 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.
>
> **1. Enable embedded wallets**
>
> In the [Dynamic Console](https://console.dynamic.xyz/dashboard/embedded-wallets/dynamic), turn on the **Embedded Wallets** feature under **Wallets**. Make sure "Create on sign up" is toggled off.
>
> **2. 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.
>
> ```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]);
> }
> ```


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