A wallet your users share. One team, many signers.
Give a company an embedded MPC wallet instead of giving it to one employee. Every teammate holds their own share, and managing the roster stays separate from signing with it - built entirely on Dynamic.
Create the client
DocsOne Dynamic client per app, created at module scope. Chain extensions register which networks a business account can mint wallets on.
lib/dynamic/client.tsimport { createDynamicClient } from "@dynamic-labs-sdk/client"; import { addEvmExtension } from "@dynamic-labs-sdk/evm"; import { addSolanaExtension } from "@dynamic-labs-sdk/solana"; export const client = createDynamicClient({ environmentId: process.env.NEXT_PUBLIC_DYNAMIC_ENVIRONMENT_ID!, }); addEvmExtension(client); addSolanaExtension(client);Wrap your app for hooks
DocsThe react-hooks package reads the client from context and uses TanStack Query underneath, so mount
QueryClientProvideroutsideDynamicProvideronce - every hook below works anywhere inside.app/providers.tsximport { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { DynamicProvider } from "@dynamic-labs-sdk/react-hooks"; import { client } from "@/lib/dynamic/client"; const queryClient = new QueryClient(); export function Providers({ children }: { children: React.ReactNode }) { return ( <QueryClientProvider client={queryClient}> <DynamicProvider client={client}>{children}</DynamicProvider> </QueryClientProvider> ); }Sign in with an email code
DocsSend a one-time passcode and verify it. The signed-in user is who every call below is authorized as - their membership decides what they can see and do.
components/screens/auth-screen.tsximport { useSendEmailOTP, useVerifyOTP } from "@dynamic-labs-sdk/react-hooks"; const { mutate: sendOtp, data: otpVerification } = useSendEmailOTP(); const { mutate: verifyOtp } = useVerifyOTP(); sendOtp({ email }); // User types the 6-digit code from their inbox: verifyOtp({ otp: code, otpVerification });List the accounts they belong to
Scoped to the signed-in user and the active environment - a user only ever sees accounts they are a member of. This is the first call after sign-in.
hooks/use-business-accounts.tsimport { listBusinessAccounts } from "@dynamic-labs-sdk/client/waas"; const { items = [], nextCursor } = await listBusinessAccounts(); for (const account of items) { console.log(account.id, account.name, account.externalRef); }