Create the client in a module that loads once (for example dynamicClient.ts in a React app) and share that instance across your app. The API is the same in React and plain JavaScript.
On React Native, set both nativeLink and universalLink. universalLink is required for passkeys and matches the window.location polyfill; nativeLink must match the deep link scheme you register in your native projects. Set up polyfills and native configuration first — see React Native Setup.
import { createDynamicClient } from '@dynamic-labs-sdk/client';const dynamicClient = createDynamicClient({ environmentId: 'YOUR_ENVIRONMENT_ID', metadata: { name: 'YOUR_APP_NAME', nativeLink: 'myapp://', // Must match the scheme registered in Info.plist / AndroidManifest.xml universalLink: 'https://yourapp.com', // Required for passkeys; same value as the window.location polyfill iconUrl: 'YOUR_APP_ICON_URL', },});
environmentId (required): Your Dynamic environment ID
autoInitialize (optional): Whether to automatically initialize the client (default: true)
metadata (optional): Your app’s metadata
name: The name of your app
universalLink: The official domain/URL of your app (e.g., https://yourapp.com). Used for deep link redirects and as the domain in sign-in message signatures.
iconUrl: The URL of the icon of your app
nativeLink: Native deep link for your app (e.g., myapp://). Used for app-to-app communication on mobile devices.
Use coreConfig to override low-level SDK behavior such as the API base URL, custom fetch implementation, and platform-specific handlers. Most apps only need this for the apiBaseUrl used by cookie-based authentication.
loadTimeoutMs (optional, default 20000): Per-attempt timeout, in milliseconds, for loading the embedded wallet’s secure container. Must be a number between 1000 and 60000; values outside that range are rejected with an InvalidParamError at client creation.
maxLoadRetries (optional, default 1): Extra load attempts (after the first) before the wallet gives up and embedded wallet operations reject with WaasLoadFailedError. Must be an integer between 0 and 10; values outside that range are rejected with an InvalidParamError at client creation.
additionalTrustedOrigins (optional): Extra origins allowed when the WaaS iframe validates postMessage sources — for example, when your app is embedded in another trusted origin.
Lower loadTimeoutMs and maxLoadRetries together to fail fast and drive your own retry cadence on a caught WaasLoadFailedError. The worst-case time until that error is (maxLoadRetries + 1) * loadTimeoutMs + maxLoadRetries * 1000 for the first load cycle.
This tuning applies process-wide. All chains — and all Dynamic clients on the same page — share one embedded wallet container, and the values are written to shared state whenever a client with an explicit override is constructed. A later client without an override inherits the last explicitly-set values, not the defaults. After an exhausted load cycle, the effective timeout doubles for subsequent cycles (capped at 60000 ms) and never resets for the page’s lifetime.
android.strongBox (optional, default false): Whether the device and session signing keys on Android are backed by the StrongBox secure element instead of the device’s TEE. When StrongBox is unavailable, the SDK creates a TEE-backed key instead. iOS ignores the option. Requires @dynamic-labs-sdk/client version 1.49.1 or later, and a rebuilt native app. See Device key storage for the trade-offs.
Last modified on November 2, 2026
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Dynamic","colors":{"primary":"#4779FF","light":"#A0BFFF","dark":"#69A5FF"},"logo":{"light":"https://mintcdn.com/dynamic-docs-testing/CXYm3HK725eun9ev/logo/dynamic-fireblocks-icon-light.svg?fit=max\u0026auto=format\u0026n=CXYm3HK725eun9ev\u0026q=85\u0026s=c050cd8c41715aa71119f91c19221cb3","dark":"https://mintcdn.com/dynamic-docs-testing/CXYm3HK725eun9ev/logo/dynamic-fireblocks-icon-dark.svg?fit=max\u0026auto=format\u0026n=CXYm3HK725eun9ev\u0026q=85\u0026s=434fa110e5847b7a23adc1abd636719e"},"favicon":"https://mintcdn.com/dynamic-docs-testing/C-CltRmvvkSqoMFQ/assets/favicon.png?fit=max\u0026auto=format\u0026n=C-CltRmvvkSqoMFQ\u0026q=85\u0026s=2bbf17fee49c1d60434f1fd77a2d8f38","api":{"mdx":{"auth":{"method":"bearer"}}},"background":{"image":"https://mintcdn.com/dynamic-docs-testing/C-CltRmvvkSqoMFQ/assets/images/general/background-image.png?fit=max\u0026auto=format\u0026n=C-CltRmvvkSqoMFQ\u0026q=85\u0026s=67a354a23840d92de3d1cb25c24ff27c","decoration":"gradient"},"navbar":{"links":[{"href":"https://www.dynamic.xyz/get-started","label":"Start Free"}],"primary":{"type":"button","label":"See it in action","href":"https://demo.dynamic.xyz/"}},"footer":{"socials":{"x":"https://x.com/dynamic_xyz","linkedin":"https://www.linkedin.com/company/dynamiclabs","slack":"https://www.dynamic.xyz/join-slack"}},"styling":{"eyebrows":"breadcrumbs","codeblocks":"system","latex":true},"integrations":{"gtm":{"tagId":"GTM-K9NXSDK"},"cookies":{"key":"dynamic-docs-cookie-consent","value":"accepted"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dynamic-docs-testing","hasAudioNarration":false,"actualSubdomain":"dynamic-docs-testing","customDomains":["www.dynamic.xyz"],"gitSource":{"type":"github","owner":"dynamic-labs","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aeca4c6754501e0c6b682aa","collectionId":"ea23aa8b-d710-42bc-b27c-e7fa0a546b58","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aeca4c6754501e0c6b682aa"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeca4c6754501e0c6b682aa","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"Reference","count":1964},{"language":"default","tag":"REST API","count":1181},{"language":"default","tag":"Schemas","count":636},{"language":"default","tag":"Endpoints","count":541},{"language":"default","tag":"Javascript, React \u0026 React Native","count":307},{"language":"default","tag":"Legacy React","count":287},{"language":"default","tag":"SDK","count":238},{"language":"default","tag":"JavaScript SDK Reference","count":230},{"language":"default","tag":"Implement","count":212},{"language":"default","tag":"Wallets","count":186}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".dynamic-demos-link{position:relative;overflow:hidden;margin:0.5rem 0 2rem;padding:2rem 1.75rem;border-radius:16px;border:1px solid rgba(148, 163, 184, 0.14);background:rgba(148, 163, 184, 0.04);text-align:center}html.dark .dynamic-demos-link{border-color:rgba(148, 163, 184, 0.12);background:rgba(148, 163, 184, 0.03)}.ddl-glow{position:absolute;inset:-40% auto auto 50%;width:28rem;height:28rem;transform:translateX(-50%);border-radius:50%;background:radial-gradient(circle, rgba(71, 121, 255, 0.18), transparent 70%);pointer-events:none}html.dark .ddl-glow{background:radial-gradient(circle, rgba(71, 121, 255, 0.22), transparent 70%)}.ddl-content{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;max-width:32rem;margin:0 auto}.ddl-icon{display:inline-flex;align-items:center;justify-content:center;width:3rem;height:3rem;margin-bottom:1rem;border-radius:999px;background:rgba(71, 121, 255, 0.12);color:#4779ff}html.dark .ddl-icon{background:rgba(71, 121, 255, 0.18);color:#93b4ff}.ddl-icon svg{width:1.25rem;height:1.25rem}.ddl-title{margin:0 0 0.65rem;font-size:1.5rem;font-weight:700;line-height:1.25;letter-spacing:-0.02em;color:#0f172a}html.dark .ddl-title{color:#f1f5f9}.ddl-copy{margin:0 0 1.35rem;font-size:1rem;line-height:1.65;color:#64748b}html.dark .ddl-copy{color:#94a3b8}.ddl-copy strong{color:#4779ff;font-weight:600}html.dark .ddl-copy strong{color:#93b4ff}.ddl-button{display:inline-flex;align-items:center;gap:0.45rem;padding:0.75rem 1.15rem;border-radius:10px;background:#4779ff;color:#fff;font-size:0.95rem;font-weight:600;line-height:1;text-decoration:none;transition:background-color 160ms cubic-bezier(0.2, 0, 0, 1),\n transform 160ms cubic-bezier(0.2, 0, 0, 1)}.ddl-button:hover{background:#2f5fe0;transform:translateY(-1px)}.ddl-button:focus-visible{outline:2px solid #4779ff;outline-offset:3px}.ddl-button-icon{width:1rem;height:1rem}@media (prefers-reduced-motion: reduce){.ddl-button{transition:none}.ddl-button:hover{transform:none}}.welcome-section{padding:1.3rem 1.5rem 0;border-radius:14px;border:1px solid rgba(148, 163, 184, 0.12);background:rgba(148, 163, 184, 0.04);margin-bottom:2rem}html.dark .welcome-section{border-color:rgba(148, 163, 184, 0.1);background:rgba(148, 163, 184, 0.03)}.welcome-word-rotator{margin:0 0 1rem;padding:0 0 1rem;border-bottom:1px dashed rgba(148, 163, 184, 0.2)}html.dark .welcome-word-rotator{border-bottom-color:rgba(148, 163, 184, 0.15)}.welcome-section h3{margin-top:1.75rem;margin-bottom:-1rem}.wwr-title{margin:0;font-size:2rem;font-weight:700;line-height:1.3;letter-spacing:-0.02em;color:#0f172a}html.dark .wwr-title{color:#f1f5f9}.wwr-line{display:block}.wwr-line+.wwr-line{margin-top:0.1rem}.wwr-word{white-space:nowrap}.wwr-char{display:inline-block;will-change:transform, opacity, filter;transform-style:preserve-3d;backface-visibility:hidden}.wwr-accent{color:#4779ff;font-weight:550;perspective:400px}html.dark .wwr-accent{color:#93b4ff}#banner{background-color:#4779ff}.event-hero{margin:0 0 1.5rem}.event-hero-banner{width:100%;height:auto;display:block;border-radius:14px;box-shadow:0 10px 32px rgba(15, 23, 42, 0.22)}.event-hero-meta{display:flex;flex-wrap:wrap;gap:0.5rem;margin-top:0.9rem}.event-tag{display:inline-flex;align-items:center;gap:0.4rem;padding:0.35rem 0.85rem;border-radius:999px;font-size:0.85rem;font-weight:600;color:#2f5fe0;background:rgba(71, 121, 255, 0.12);border:1px solid rgba(71, 121, 255, 0.25)}html.dark .event-tag{color:#93b4ff;background:rgba(71, 121, 255, 0.16);border-color:rgba(71, 121, 255, 0.32)}@media (min-width: 768px){.nav-logo{height:2.25rem!important;max-width:18rem!important}}.mcp-install-button{pointer-events:none!important;user-select:none!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important}.before\\:bg-background-light::before,.chat-assistant-floating-input::before{content:none!important;display:none!important;background:none!important;background-color:transparent!important;height:0!important}.rn-qs-dark{display:none}.rn-qs-light{display:block}html.dark .rn-qs-dark{display:block}html.dark .rn-qs-light{display:none}html.light .rn-qs-dark{display:none}html.light .rn-qs-light{display:block}.llm-copy-btn{display:inline-flex;align-items:center;gap:6px;margin-bottom:12px;padding:7px 14px;background-color:#4779ff;color:#fff;font-size:13px;font-weight:500;border:none;border-radius:6px;cursor:pointer;transition:background-color 0.15s ease, opacity 0.15s ease}.llm-copy-btn:hover{background-color:#2f5fe0}.llm-copy-btn--copied{background-color:#16a34a}.llm-copy-btn--copied:hover{background-color:#15803d}html.dark{--ds-bg: #0c0e13;--ds-elevated: #1b1d22;--ds-border: #282b33;--ds-text: #ececec;--ds-muted: #6f7177;--ds-subtitle: #8f93ab;--ds-primary: #5c89ff}html.light{--ds-bg: #ffffff;--ds-elevated: #fafafb;--ds-border: #e9ecf2;--ds-text: #26272e;--ds-muted: #5f6478;--ds-subtitle: #8f93ab;--ds-primary: #5c89ff}html:is(.light,.dark) .DocSearch-Container,html:is(.light,.dark) .DocSearch-Modal{--docsearch-primary-color: var(--ds-primary);--docsearch-highlight-color: var(--ds-primary);--docsearch-logo-color: var(--ds-muted);--docsearch-text-color: var(--ds-text);--docsearch-muted-color: var(--ds-muted);--docsearch-hit-color: var(--ds-text);--docsearch-hit-active-color: var(--ds-text);--docsearch-container-background: rgb(0 0 0 / 0.6);--docsearch-modal-background: var(--ds-bg);--docsearch-searchbox-background: transparent;--docsearch-searchbox-focus-background: transparent;--docsearch-hit-background: transparent;--docsearch-footer-background: var(--ds-bg);--docsearch-modal-shadow: 0 4px 8px -6px rgb(24 39 75 / 0.02),\n 0 8px 24px -4px rgb(24 39 75 / 0.05),\n 0 0 0 1px var(--ds-border);--docsearch-hit-shadow: none;--docsearch-footer-shadow: 0 -1px 0 0 var(--ds-border);--docsearch-searchbox-shadow: none;--docsearch-key-gradient: var(--ds-bg);--docsearch-key-shadow: inset 0 0 0 1px var(--ds-border),\n 0 2px 0 0 var(--ds-border);--docsearch-key-pressed-shadow: inset 0 0 0 1px var(--ds-border),\n 0 1px 0 0 var(--ds-border);--docsearch-hit-height: auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}html:is(.light,.dark) .DocSearch-Modal{max-width:558px;height:auto;max-height:min(80vh, 720px);border-radius:12px;overflow:hidden}html:is(.light,.dark) .DocSearch-Dropdown{height:auto;padding:12px 16px;max-height:calc(min(80vh, 720px) - 56px - 54px)}html:is(.light,.dark) .DocSearch-Dropdown-Container{display:flex;flex-direction:column;gap:17px}html:is(.light,.dark) .DocSearch-Hits ul{display:flex;flex-direction:column;gap:2px}html:is(.light,.dark) .DocSearch-SearchBar{padding:12px;border-bottom:1px solid var(--ds-border)}html:is(.light,.dark) .DocSearch-SearchBar:has(.DocSearch-Input:not(:placeholder-shown)){background:var(--ds-elevated)}html:is(.light,.dark) .DocSearch-Form{height:auto;padding:0;gap:8px;background:transparent;box-shadow:none}html:is(.light,.dark) .DocSearch-Input{padding:0;font-size:14px;font-weight:400;line-height:20px;color:var(--ds-text)}html:is(.light,.dark) .DocSearch-Input::placeholder{color:var(--ds-muted);opacity:1}html:is(.light,.dark) .DocSearch-Hit-source{height:auto;margin:0 0 6px;padding:0;background:transparent;font-size:12px;font-weight:500;line-height:18px;letter-spacing:0;text-transform:none;color:var(--ds-primary)}html:is(.light,.dark) .DocSearch-Hit{height:auto;padding:0}html:is(.light,.dark) .DocSearch-Hit a{height:54px;padding:8px 10px;border:1px solid transparent;border-radius:8px;background:transparent;display:flex;align-items:center;transition-property:background-color, border-color;transition-duration:120ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1)}html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] a{background:var(--ds-elevated);border-color:var(--ds-border)}html:is(.light,.dark) .DocSearch-Hit-Container{display:flex;align-items:center;width:100%;height:auto;min-height:0;gap:8px}html:is(.light,.dark) .DocSearch-Hit-content-wrapper{flex:1 1 auto;min-width:0}html:is(.light,.dark) .DocSearch-Hit-action{margin-left:auto;flex-shrink:0}html:is(.light,.dark) .DocSearch-Hit-title{font-size:14px;font-weight:500;line-height:20px;color:var(--ds-text)}html:is(.light,.dark) .DocSearch-Hit-path{font-size:12px;font-weight:400;line-height:18px;color:var(--ds-muted)}html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] .DocSearch-Hit-path{color:var(--ds-subtitle)}html:is(.light,.dark) .DocSearch-Hit--Result.DocSearch-Hit--Lvl1 .DocSearch-Hit-title,html:is(.light,.dark) .DocSearch-Hit--Result.DocSearch-Hit--Child .DocSearch-Hit-title,html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] .DocSearch-Hit-title,html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] mark{color:var(--ds-primary)}html:is(.light,.dark) .DocSearch-Hit-action{display:none}html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] .DocSearch-Hit-action{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:2px;border-radius:4px;background:var(--ds-bg);box-shadow:inset 0 0 0 1px var(--ds-border),\n 0 2px 0 0 var(--ds-border);flex-shrink:0}html:is(.light,.dark) .DocSearch-Footer{height:auto;padding:16px;background:var(--ds-bg);border-top:1px solid var(--ds-border);border-radius:0 0 12px 12px;box-shadow:none}html:is(.light,.dark) .DocSearch-Commands{gap:20px}html:is(.light,.dark) .DocSearch-Commands li{gap:6px}html:is(.light,.dark) .DocSearch-Commands-Key{position:relative;width:22px;height:22px;min-width:22px;margin:0;padding:2px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:500;color:var(--ds-muted)}html:is(.light,.dark) .DocSearch-Label{font-size:14px;font-weight:400;line-height:20px;color:var(--ds-muted)}html:is(.light,.dark) .DocSearch-Logo a>*{display:none}html:is(.light,.dark) .DocSearch-Logo a{font-size:11px;font-weight:400;line-height:1;color:var(--ds-muted);text-decoration:none;border-radius:2px;opacity:0.6;transition-property:opacity;transition-duration:150ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1)}html:is(.light,.dark) .DocSearch-Logo a::before{content:'Search by Algolia'}html:is(.light,.dark) .DocSearch-MagnifierLabel>*,html:is(.light,.dark) .DocSearch-Reset>*,html:is(.light,.dark) .DocSearch-Hit-icon>*,html:is(.light,.dark) .DocSearch-Hit-action>*{display:none!important}html:is(.light,.dark) .DocSearch-Commands li:nth-child(1) .DocSearch-Commands-Key>*,html:is(.light,.dark) .DocSearch-Commands li:nth-child(2) .DocSearch-Commands-Key>*{display:none!important}html:is(.light,.dark) .DocSearch-Hit-Tree,html:is(.light,.dark) .DocSearch-Hit-action-button,html:is(.light,.dark) .DocSearch-Hit-action~.DocSearch-Hit-action{display:none!important}html:is(.light,.dark) .DocSearch-MagnifierLabel,html:is(.light,.dark) .DocSearch-Reset,html:is(.light,.dark) .DocSearch-Hit-icon{display:inline-block;width:16px;height:16px;padding:0;background-color:var(--ds-muted);-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}html:is(.light,.dark) .DocSearch-MagnifierLabel{-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1zZWFyY2giIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiA+IDxwYXRoIGQ9Im0yMSAyMS00LjM0LTQuMzQiIC8+IDxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiIC8+IDwvc3ZnPg==\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1zZWFyY2giIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiA+IDxwYXRoIGQ9Im0yMSAyMS00LjM0LTQuMzQiIC8+IDxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiIC8+IDwvc3ZnPg==\")}html:is(.light,.dark) .DocSearch-Reset{position:relative;width:16px;height:16px;border:0;border-radius:2px;cursor:pointer;transition-property:transform, opacity;transition-duration:100ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1);-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS14IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8cGF0aCBkPSJNMTggNiA2IDE4IiAvPiA8cGF0aCBkPSJtNiA2IDEyIDEyIiAvPiA8L3N2Zz4=\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS14IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8cGF0aCBkPSJNMTggNiA2IDE4IiAvPiA8cGF0aCBkPSJtNiA2IDEyIDEyIiAvPiA8L3N2Zz4=\")}html:is(.light,.dark) .DocSearch-Reset[hidden]{display:none}html:is(.light,.dark) .DocSearch-Reset::after{content:'';position:absolute;inset:-12px}html:is(.light,.dark) .DocSearch-Hit-icon{-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1maWxlLXRleHQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiA+IDxwYXRoIGQ9Ik02IDIyYTIgMiAwIDAgMS0yLTJWNGEyIDIgMCAwIDEgMi0yaDhhMi40IDIuNCAwIDAgMSAxLjcwNC43MDZsMy41ODggMy41ODhBMi40IDIuNCAwIDAgMSAyMCA4djEyYTIgMiAwIDAgMS0yIDJ6IiAvPiA8cGF0aCBkPSJNMTQgMnY1YTEgMSAwIDAgMCAxIDFoNSIgLz4gPHBhdGggZD0iTTEwIDlIOCIgLz4gPHBhdGggZD0iTTE2IDEzSDgiIC8+IDxwYXRoIGQ9Ik0xNiAxN0g4IiAvPiA8L3N2Zz4=\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1maWxlLXRleHQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiA+IDxwYXRoIGQ9Ik02IDIyYTIgMiAwIDAgMS0yLTJWNGEyIDIgMCAwIDEgMi0yaDhhMi40IDIuNCAwIDAgMSAxLjcwNC43MDZsMy41ODggMy41ODhBMi40IDIuNCAwIDAgMSAyMCA4djEyYTIgMiAwIDAgMS0yIDJ6IiAvPiA8cGF0aCBkPSJNMTQgMnY1YTEgMSAwIDAgMCAxIDFoNSIgLz4gPHBhdGggZD0iTTEwIDlIOCIgLz4gPHBhdGggZD0iTTE2IDEzSDgiIC8+IDxwYXRoIGQ9Ik0xNiAxN0g4IiAvPiA8L3N2Zz4=\")}html:is(.light,.dark) .DocSearch-Hit--Result.DocSearch-Hit--Lvl1 .DocSearch-Hit-icon,html:is(.light,.dark) .DocSearch-Hit--Result.DocSearch-Hit--Child .DocSearch-Hit-icon{-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1oYXNoIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8bGluZSB4MT0iNCIgeDI9IjIwIiB5MT0iOSIgeTI9IjkiIC8+IDxsaW5lIHgxPSI0IiB4Mj0iMjAiIHkxPSIxNSIgeTI9IjE1IiAvPiA8bGluZSB4MT0iMTAiIHgyPSI4IiB5MT0iMyIgeTI9IjIxIiAvPiA8bGluZSB4MT0iMTYiIHgyPSIxNCIgeTE9IjMiIHkyPSIyMSIgLz4gPC9zdmc+\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1oYXNoIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8bGluZSB4MT0iNCIgeDI9IjIwIiB5MT0iOSIgeTI9IjkiIC8+IDxsaW5lIHgxPSI0IiB4Mj0iMjAiIHkxPSIxNSIgeTI9IjE1IiAvPiA8bGluZSB4MT0iMTAiIHgyPSI4IiB5MT0iMyIgeTI9IjIxIiAvPiA8bGluZSB4MT0iMTYiIHgyPSIxNCIgeTE9IjMiIHkyPSIyMSIgLz4gPC9zdmc+\")}html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] .DocSearch-Hit-icon{background-color:var(--ds-text)}html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] .DocSearch-Hit-action::before{content:'';width:16px;height:16px;background-color:var(--ds-text);-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1jb3JuZXItZG93bi1sZWZ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8cGF0aCBkPSJNMjAgNHY3YTQgNCAwIDAgMS00IDRINCIgLz4gPHBhdGggZD0ibTkgMTAtNSA1IDUgNSIgLz4gPC9zdmc+\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1jb3JuZXItZG93bi1sZWZ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8cGF0aCBkPSJNMjAgNHY3YTQgNCAwIDAgMS00IDRINCIgLz4gPHBhdGggZD0ibTkgMTAtNSA1IDUgNSIgLz4gPC9zdmc+\")}html:is(.light,.dark) .DocSearch-Commands li:nth-child(1) .DocSearch-Commands-Key::before,html:is(.light,.dark) .DocSearch-Commands li:nth-child(2) .DocSearch-Commands-Key:nth-child(1)::before,html:is(.light,.dark) .DocSearch-Commands li:nth-child(2) .DocSearch-Commands-Key:nth-child(2)::before{content:'';width:16px;height:16px;background-color:var(--ds-muted);-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}html:is(.light,.dark) .DocSearch-Commands li:nth-child(1) .DocSearch-Commands-Key::before{-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1jb3JuZXItZG93bi1sZWZ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8cGF0aCBkPSJNMjAgNHY3YTQgNCAwIDAgMS00IDRINCIgLz4gPHBhdGggZD0ibTkgMTAtNSA1IDUgNSIgLz4gPC9zdmc+\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1jb3JuZXItZG93bi1sZWZ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8cGF0aCBkPSJNMjAgNHY3YTQgNCAwIDAgMS00IDRINCIgLz4gPHBhdGggZD0ibTkgMTAtNSA1IDUgNSIgLz4gPC9zdmc+\")}html:is(.light,.dark) .DocSearch-Commands li:nth-child(2) .DocSearch-Commands-Key:nth-child(1)::before{-webkit-mask-image:url(\"data:image/svg+xml;utf8,\u003csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\u003cpath d='m5 12 7-7 7 7'/>\u003cpath d='M12 19V5'/>\u003c/svg>\");mask-image:url(\"data:image/svg+xml;utf8,\u003csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\u003cpath d='m5 12 7-7 7 7'/>\u003cpath d='M12 19V5'/>\u003c/svg>\")}html:is(.light,.dark) .DocSearch-Commands li:nth-child(2) .DocSearch-Commands-Key:nth-child(2)::before{-webkit-mask-image:url(\"data:image/svg+xml;utf8,\u003csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\u003cpath d='M12 5v14'/>\u003cpath d='m19 12-7 7-7-7'/>\u003c/svg>\");mask-image:url(\"data:image/svg+xml;utf8,\u003csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\u003cpath d='M12 5v14'/>\u003cpath d='m19 12-7 7-7-7'/>\u003c/svg>\")}html:is(.light,.dark) .DocSearch-Reset:focus-visible,html:is(.light,.dark) .DocSearch-Logo a:focus-visible{outline:2px solid var(--ds-primary);outline-offset:4px}html:is(.light,.dark) .DocSearch-Logo a:focus-visible{opacity:1;outline-offset:3px}html:is(.light,.dark) .DocSearch-Reset:active{transform:scale(0.96)}@media (hover: hover){html:is(.light,.dark) .DocSearch-Reset:hover{opacity:0.8}html:is(.light,.dark) .DocSearch-Logo a:hover{opacity:1}}@media (prefers-reduced-motion: reduce){html:is(.light,.dark) .DocSearch-Hit a,html:is(.light,.dark) .DocSearch-Logo a,html:is(.light,.dark) .DocSearch-Reset{transition:none}html:is(.light,.dark) .DocSearch-Reset:active{transform:none}}.nav-tabs{flex:1 1 auto;min-width:0;align-items:center;gap:0.25rem!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none;scroll-padding-inline:0.625rem}.nav-tabs::-webkit-scrollbar{display:none}.nav-tabs-item{flex:0 0 auto}.nav-tabs-item{white-space:nowrap;height:auto;padding:0.375rem 0.625rem;border-radius:0.5rem;gap:0!important;color:#5f6478;transition:background-color 0.15s ease,\n color 0.15s ease}.nav-tabs-item>svg,.nav-tabs-item>div>svg{display:none}.nav-tabs-item>div.absolute{display:none!important}.nav-tabs-item[data-active=\"true\"]{background-color:#edf1fe;color:#2b55c7}.nav-tabs-item:focus-visible{outline:2px solid #4779ff;outline-offset:2px;color:#26272e}html.dark .nav-tabs-item{color:#8f93ab}html.dark .nav-tabs-item:focus-visible{outline-color:#69a5ff;color:#ececec}html.dark .nav-tabs-item[data-active=\"true\"]{background-color:rgb(105 165 255 / 14%);color:#a0bfff}@media (hover: hover){.nav-tabs-item:hover{background-color:#f4f5f8;color:#26272e}.nav-tabs-item[data-active=\"true\"]:hover{background-color:#e4ebfd;color:#2b55c7}html.dark .nav-tabs-item:hover{background-color:#1b1d22;color:#ececec}html.dark .nav-tabs-item[data-active=\"true\"]:hover{background-color:rgb(105 165 255 / 20%);color:#a0bfff}}@media (prefers-reduced-motion: reduce){.nav-tabs-item{transition:none}}div:has(>.nav-tabs){border-bottom:1px solid #e9ecf2}html.dark div:has(>.nav-tabs){border-bottom-color:#282b33}a[href$=\"demo.dynamic.xyz/\"]>span[class*=\"bg-primary-dark\"]{background-color:#2e57d1}@media (hover: hover){a[href$=\"demo.dynamic.xyz/\"]:hover>span[class*=\"bg-primary-dark\"]{background-color:#22409e}}div:has(>.nav-tabs){height:auto!important;padding-block:0.4375rem}#sidebar-content .sidebar-group li:has(>button>div:first-child:not(.flex-1))>ul{margin-left:1.5rem}"}],"page":{"pagePath":"javascript/reference/client/create-dynamic-client","slug":"/javascript/reference/client/create-dynamic-client","pageMetadata":{"title":"Creating a Dynamic Client","description":"The first step in using the JavaScript SDK is to create a Dynamic Client","docType":"guide","href":"/javascript/reference/client/create-dynamic-client"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"The first step in using the JavaScript SDK is to create a Dynamic Client\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tab,Tabs,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(`strong`,{children:`Important:`}),` All other methods in the JavaScript SDK require a Dynamic client to be created first.`]}),`\n`,_jsx(Heading,{level:`2`,id:`installation`,children:`Installation`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @dynamic-labs-sdk/client`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`usage`,children:`Usage`}),`\n`,_jsxs(_components.p,{children:[`Create the client in a module that loads once (for example `,_jsx(_components.code,{children:`dynamicClient.ts`}),` in a React app) and share that instance across your app. The API is the same in React and plain JavaScript.`]}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Web`,id:`web`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createDynamicClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@dynamic-labs-sdk/client'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` dynamicClient`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createDynamicClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` environmentId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_ENVIRONMENT_ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` metadata:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_APP_NAME'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` universalLink:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://yourapp.com'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` iconUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_APP_ICON_URL'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})})}),_jsxs(Tab,{title:`React Native`,id:`react-native`,children:[_jsxs(_components.p,{children:[`On React Native, set both `,_jsx(_components.code,{children:`nativeLink`}),` and `,_jsx(_components.code,{children:`universalLink`}),`. `,_jsx(_components.code,{children:`universalLink`}),` is required for passkeys and matches the `,_jsx(_components.code,{children:`window.location`}),` polyfill; `,_jsx(_components.code,{children:`nativeLink`}),` must match the deep link scheme you register in your native projects. Set up polyfills and native configuration first — see `,_jsx(_components.a,{href:`/javascript/react-native/setup`,children:`React Native Setup`}),`.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createDynamicClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@dynamic-labs-sdk/client'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` dynamicClient`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createDynamicClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` environmentId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_ENVIRONMENT_ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` metadata:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_APP_NAME'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` nativeLink:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'myapp://'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Must match the scheme registered in Info.plist / AndroidManifest.xml`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` universalLink:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://yourapp.com'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Required for passkeys; same value as the window.location polyfill`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` iconUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_APP_ICON_URL'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})})]})]}),`\n`,_jsxs(_components.p,{children:[`You can get your environment ID from the `,_jsx(_components.a,{href:`https://console.dynamic.xyz/dashboard/developer/api`,children:`Dynamic Console`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`configuration-options`,children:`Configuration Options`}),`\n`,_jsx(Heading,{level:`3`,id:`basic-options`,children:`Basic Options`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`environmentId`}),` (required): Your Dynamic environment ID`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`autoInitialize`}),` (optional): Whether to automatically initialize the client (default: `,_jsx(_components.code,{children:`true`}),`)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`metadata`}),` (optional): Your app’s metadata`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`name`}),`: The name of your app`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`universalLink`}),`: The official domain/URL of your app (e.g., `,_jsx(_components.code,{children:`https://yourapp.com`}),`). Used for deep link redirects and as the domain in sign-in message signatures.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`iconUrl`}),`: The URL of the icon of your app`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`nativeLink`}),`: Native deep link for your app (e.g., `,_jsx(_components.code,{children:`myapp://`}),`). Used for app-to-app communication on mobile devices.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`logLevel`}),` (optional): Logging level for the SDK`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`core-configuration`,children:`Core configuration`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`coreConfig`}),` to override low-level SDK behavior such as the API base URL, custom fetch implementation, and platform-specific handlers. Most apps only need this for the `,_jsx(_components.code,{children:`apiBaseUrl`}),` used by cookie-based authentication.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createDynamicClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@dynamic-labs-sdk/client'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` dynamicClient`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createDynamicClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` environmentId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_ENVIRONMENT_ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` coreConfig:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiBaseUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://auth.example.io/api/v0'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`apiBaseUrl`}),` (optional): Override the Dynamic API base URL. Required when using cookie-based authentication with a custom hostname.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`advanced-options`,children:`Advanced Options`}),`\n`,_jsx(Heading,{level:`4`,id:`transformers`,children:`Transformers`}),`\n`,_jsx(_components.p,{children:`Customize SDK data before it’s used throughout your application:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createDynamicClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@dynamic-labs-sdk/client'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` dynamicClient`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createDynamicClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` environmentId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_ENVIRONMENT_ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` transformers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` networksData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`networksData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` networksData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`network`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Override RPC URLs`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`network`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`networkId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '1'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`network`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rpcUrls:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` http:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://eth-mainnet.g.alchemy.com/v2/YOUR-KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` network`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/javascript/reference/networks/network-transformers`,children:`Network Transformers`}),` for more details.`]}),`\n`,_jsx(Heading,{level:`4`,id:`waas-options`,children:`WaaS Options`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`waas`}),` object tunes the embedded wallet (MPC / Wallet-as-a-Service) behavior. Every option is optional.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createDynamicClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@dynamic-labs-sdk/client'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` dynamicClient`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createDynamicClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` environmentId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_ENVIRONMENT_ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` waas:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` loadTimeoutMs:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxLoadRetries:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`loadTimeoutMs`}),` (optional, default `,_jsx(_components.code,{children:`20000`}),`): Per-attempt timeout, in milliseconds, for loading the embedded wallet’s secure container. Must be a number between `,_jsx(_components.code,{children:`1000`}),` and `,_jsx(_components.code,{children:`60000`}),`; values outside that range are rejected with an `,_jsx(_components.code,{children:`InvalidParamError`}),` at client creation.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`maxLoadRetries`}),` (optional, default `,_jsx(_components.code,{children:`1`}),`): Extra load attempts (after the first) before the wallet gives up and embedded wallet operations reject with `,_jsx(_components.code,{children:`WaasLoadFailedError`}),`. Must be an integer between `,_jsx(_components.code,{children:`0`}),` and `,_jsx(_components.code,{children:`10`}),`; values outside that range are rejected with an `,_jsx(_components.code,{children:`InvalidParamError`}),` at client creation.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`additionalTrustedOrigins`}),` (optional): Extra origins allowed when the WaaS iframe validates `,_jsx(_components.code,{children:`postMessage`}),` sources — for example, when your app is embedded in another trusted origin.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Lower `,_jsx(_components.code,{children:`loadTimeoutMs`}),` and `,_jsx(_components.code,{children:`maxLoadRetries`}),` together to fail fast and drive your own retry cadence on a caught `,_jsx(_components.code,{children:`WaasLoadFailedError`}),`. The worst-case time until that error is `,_jsx(_components.code,{children:`(maxLoadRetries + 1) * loadTimeoutMs + maxLoadRetries * 1000`}),` for the first load cycle.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`This tuning applies process-wide. All chains — and all Dynamic clients on the same page — share one embedded wallet container, and the values are written to shared state whenever a client with an explicit override is constructed. A later client without an override inherits the last explicitly-set values, not the defaults. After an exhausted load cycle, the effective timeout doubles for subsequent cycles (capped at `,_jsx(_components.code,{children:`60000`}),` ms) and never resets for the page’s lifetime.`]})}),`\n`,_jsx(Heading,{level:`4`,id:`react-native-options`,children:`React Native options`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`reactNative`}),` object holds options that apply only when the client runs in React Native. Every option is optional, and the web ignores the object.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createDynamicClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@dynamic-labs-sdk/client'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` dynamicClient`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createDynamicClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` environmentId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_ENVIRONMENT_ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` reactNative:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` android:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` strongBox:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`android.strongBox`}),` (optional, default `,_jsx(_components.code,{children:`false`}),`): Whether the device and session signing keys on Android are backed by the StrongBox secure element instead of the device’s TEE. When StrongBox is unavailable, the SDK creates a TEE-backed key instead. iOS ignores the option. Requires `,_jsx(_components.code,{children:`@dynamic-labs-sdk/client`}),` version 1.49.1 or later, and a rebuilt native app. See `,_jsx(_components.a,{href:`/javascript/react-native/device-key-storage`,children:`Device key storage`}),` for the trade-offs.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Creating a Dynamic Client","description":"The first step in using the JavaScript SDK is to create a Dynamic Client","docType":"guide","href":"/javascript/reference/client/create-dynamic-client"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Installation","slug":"installation","depth":2,"children":[]},{"title":"Usage","slug":"usage","depth":2,"children":[]},{"title":"Configuration Options","slug":"configuration-options","depth":2,"children":[{"title":"Basic Options","slug":"basic-options","depth":3,"children":[]},{"title":"Core configuration","slug":"core-configuration","depth":3,"children":[]},{"title":"Advanced Options","slug":"advanced-options","depth":3,"children":[]},{"title":"Transformers","slug":"transformers","depth":4,"children":[]},{"title":"WaaS Options","slug":"waas-options","depth":4,"children":[]},{"title":"React Native options","slug":"react-native-options","depth":4,"children":[]}]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/dynamic-docs-testing/fd6becaed25bf0d8/algolia-docsearch.js","/docs/_mintlify/custom/dynamic-docs-testing/078be96a1e454d1f/generate-llms.js","/docs/_mintlify/custom/dynamic-docs-testing/14f3898c5e985cd5/snippets/gsap-text-plugin.js","/docs/_mintlify/custom/dynamic-docs-testing/c174bfce53a72941/snippets/gsap.js","/docs/_mintlify/custom/dynamic-docs-testing/ea6028ffcc794f21/llm-copy-button.js","/docs/_mintlify/custom/dynamic-docs-testing/c071bd14c4f40dfd/onetrust.js"],"subdomain":"dynamic-docs-testing","siteName":"Dynamic","title":"Creating a Dynamic Client - Dynamic","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-02T20:59:33.892Z","gitLastModified":"2026-11-02T20:58:36.000Z","originalFileLocation":"javascript/reference/client/create-dynamic-client.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"The first step in using the JavaScript SDK is to create a Dynamic Client\">\u003cmeta data-mint-head name=\"application-name\" content=\"Dynamic\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Creating a Dynamic Client - Dynamic\">\u003cmeta data-mint-head property=\"og:description\" content=\"The first step in using the JavaScript SDK is to create a Dynamic Client\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Dynamic\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.dynamic.xyz/docs/javascript/reference/client/create-dynamic-client\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dynamic-docs-testing.mintlify.app/_mintlify/api/og/v2?division=Agnostic\u0026amp;title=Creating+a+Dynamic+Client\u0026amp;description=The+first+step+in+using+the+JavaScript+SDK+is+to+create+a+Dynamic+Client\u0026amp;theme=9bec92bca96868fc0aaaeb3b\u0026amp;signature=84f401b5bfafb757f9b730b18b81a01886f414c5165b22afd5a74852183c3c8b\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Creating a Dynamic Client - Dynamic\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"The first step in using the JavaScript SDK is to create a Dynamic Client\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dynamic-docs-testing.mintlify.app/_mintlify/api/og/v2?division=Agnostic\u0026amp;title=Creating+a+Dynamic+Client\u0026amp;description=The+first+step+in+using+the+JavaScript+SDK+is+to+create+a+Dynamic+Client\u0026amp;theme=9bec92bca96868fc0aaaeb3b\u0026amp;signature=84f401b5bfafb757f9b730b18b81a01886f414c5165b22afd5a74852183c3c8b\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Dynamic\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4779FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.dynamic.xyz/docs/javascript/reference/client/create-dynamic-client\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/javascript/reference/client/create-dynamic-client.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.dynamic.xyz/#organization\",\"name\":\"Dynamic\",\"url\":\"https://www.dynamic.xyz\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/dynamic-docs-testing/CXYm3HK725eun9ev/logo/dynamic-fireblocks-icon-light.svg?fit=max\u0026auto=format\u0026n=CXYm3HK725eun9ev\u0026q=85\u0026s=c050cd8c41715aa71119f91c19221cb3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.dynamic.xyz/docs#website\",\"name\":\"Dynamic\",\"url\":\"https://www.dynamic.xyz/docs\",\"publisher\":{\"@id\":\"https://www.dynamic.xyz/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.dynamic.xyz/docs/javascript/reference/client/create-dynamic-client#webpage\",\"url\":\"https://www.dynamic.xyz/docs/javascript/reference/client/create-dynamic-client\",\"name\":\"Creating a Dynamic Client\",\"description\":\"The first step in using the JavaScript SDK is to create a Dynamic Client\",\"dateModified\":\"2026-11-02T20:58:36.000Z\",\"isPartOf\":{\"@id\":\"https://www.dynamic.xyz/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.dynamic.xyz/docs/javascript/reference/client/create-dynamic-client#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.dynamic.xyz/docs/javascript/reference/client/create-dynamic-client#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Build with\",\"item\":\"https://www.dynamic.xyz/docs/javascript/reference/quickstart\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Javascript, React \u0026 React Native\",\"item\":\"https://www.dynamic.xyz/docs/javascript/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Agnostic\",\"item\":\"https://www.dynamic.xyz/docs/javascript/reference/quickstart\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Creating a Dynamic Client\",\"item\":\"https://www.dynamic.xyz/docs/javascript/reference/client/create-dynamic-client\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.dynamic.xyz/docs/javascript/reference/client/create-dynamic-client#article\",\"headline\":\"Creating a Dynamic Client\",\"name\":\"Creating a Dynamic Client\",\"description\":\"The first step in using the JavaScript SDK is to create a Dynamic Client\",\"url\":\"https://www.dynamic.xyz/docs/javascript/reference/client/create-dynamic-client\",\"mainEntityOfPage\":{\"@id\":\"https://www.dynamic.xyz/docs/javascript/reference/client/create-dynamic-client#webpage\"},\"dateModified\":\"2026-11-02T20:58:36.000Z\",\"publisher\":{\"@id\":\"https://www.dynamic.xyz/#organization\"},\"isPartOf\":{\"@id\":\"https://www.dynamic.xyz/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Dynamic\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Dynamic","nav":{"global":null,"tabs":[{"tab":"Get Started","icon":"rocket","groups":[{"group":"Learn","boost":2,"icon":"book","expanded":false,"pages":[{"group":"Getting Started","expanded":false,"pages":[{"title":"Welcome","icon":"hand-wave","href":"/get-started/welcome"},{"title":"Live Demos","icon":"play","href":"/get-started/demos"}]},{"group":"Dynamic Console","expanded":false,"pages":[{"title":"SDK and API Keys","href":"/platform/console/tokens-api-keys"},{"title":"Set Up SSO","href":"/platform/console/sso"},{"title":"API Token Permissions","href":"/platform/console/api-token-permissions"},{"title":"Analytics","href":"/platform/console/analytics"},{"title":"Users \u0026 Visitors","href":"/platform/console/users-visitors"},{"title":"Test Accounts","href":"/platform/console/test-accounts"},{"title":"Admin Action Approvals","href":"/platform/console/admin-action-approvals"},{"group":"Organization","pages":[{"title":"Sandbox vs Live","href":"/platform/console/sandbox-vs-live"},{"title":"Invite Members","href":"/platform/console/invite-members"},{"title":"Projects vs Organizations","href":"/platform/console/projects-vs-orgs"}]},{"group":"Settings","pages":[{"title":"General Settings","href":"/platform/console/general"},{"title":"Privacy Settings","href":"/platform/console/privacy"},{"title":"Security Settings","href":"/platform/console/security"},{"title":"End-User MFA","href":"/platform/console/end-user-mfa"},{"title":"Console MFA","href":"/platform/console/mfa"}]},{"group":"Social Providers","pages":[{"title":"Social Providers Overview","href":"/platform/social-providers/overview"},{"title":"Apple","href":"/platform/social-providers/apple"},{"title":"Coinbase","href":"/platform/social-providers/coinbase"},{"title":"Discord","href":"/platform/social-providers/discord"},{"title":"Epic Games","href":"/platform/social-providers/epicgames"},{"title":"Facebook","href":"/platform/social-providers/facebook"},{"title":"Gemini","href":"/platform/social-providers/gemini"},{"title":"Farcaster","href":"/platform/social-providers/farcaster"},{"title":"Github","href":"/platform/social-providers/github"},{"title":"Google","href":"/platform/social-providers/google"},{"title":"Kraken","href":"/platform/social-providers/kraken"},{"title":"LINE","href":"/platform/social-providers/line"},{"title":"Microsoft","href":"/platform/social-providers/microsoft"},{"title":"Shopify","href":"/platform/social-providers/shopify"},{"title":"Spotify","href":"/platform/social-providers/spotify"},{"title":"Telegram","href":"/platform/social-providers/telegram"},{"title":"TikTok","href":"/platform/social-providers/tiktok"},{"title":"Twitch","href":"/platform/social-providers/twitch"},{"title":"Twitter/X","href":"/platform/social-providers/twitter"}]}]},{"group":"Webhooks","expanded":false,"pages":[{"title":"Webhooks Overview","href":"/platform/console/webhooks/overview"},{"title":"Webhook events","href":"/platform/console/webhooks/event-types"},{"title":"Admin and environment events","href":"/platform/console/webhooks/events"},{"title":"Setting up Webhooks","href":"/platform/console/webhooks/setup"},{"title":"Event Delivery \u0026 Best Practices","href":"/platform/console/webhooks/delivery-best-practices"}]},{"group":"Going Live","expanded":false,"pages":[{"title":"Go Live Checklist","icon":"check","href":"/get-started/go-live-checklist"}]},{"group":"Chain support","expanded":false,"pages":[{"title":"Chains Overview","sidebarTitle":"Overview","href":"/get-started/chains/overview"}]},{"group":"Security","expanded":false,"pages":[{"title":"Overview","href":"/get-started/security/overview"},{"title":"Address Screening","href":"/get-started/security/address-screening"},{"title":"Device Registration","href":"/get-started/security/device-registration"},{"title":"Best Practices","href":"/get-started/security/recommendedpaths"},{"title":"Mitigating Attack Vectors","href":"/get-started/security/threatvectors"},{"title":"Content Security Policy (CSP)","href":"/get-started/security/content-security-policy"}]},{"group":"Rate Limits","expanded":false,"pages":[{"title":"Rate Limits","href":"/platform/rate-limits"}]},{"group":"API Upgrades","expanded":false,"pages":[{"title":"2026_01_01","href":"/get-started/migrations/api/2026_01_01"},{"group":"2026_04_01","pages":[{"title":"Upgrading the API to 2026_04_01","href":"/get-started/migrations/api/2026_04_01"},{"title":"Migrating from action-based MFA to step-up authentication","href":"/get-started/migrations/api/2026_04_01-mfa-migration"}]}]},{"group":"Migrations","expanded":false,"pages":[{"title":"Migrating to Dynamic","href":"/get-started/migrations/migration-guide"},{"title":"Migrating from ZeroDev to native EVM gas sponsorship","href":"/get-started/migrations/zerodev-to-native-gas-sponsorship"},{"title":"Migrate React Native from expo-secure-store to react-native-keychain","href":"/get-started/migrations/react-native-expo-secure-store-to-keychain"},{"title":"Migrate legacy React Native SDK packages to v5","href":"/get-started/migrations/react-native-legacy-package-rename"},{"title":"Migrating Users via CSV","href":"/get-started/migrations/tutorials/importing"},{"title":"Migration from RainbowKit","href":"/get-started/migrations/tutorials/rainbowkit"}]},{"group":"Troubleshooting","expanded":false,"pages":[{"title":"Initial Steps","href":"/get-started/troubleshooting/general"},{"title":"Dynamic Doctor","href":"/get-started/troubleshooting/dynamic-doctor"},{"title":"Generating a HAR file","href":"/get-started/troubleshooting/generating-har-file"},{"title":"Email OTP delivery","href":"/get-started/troubleshooting/email-otp-delivery"},{"group":"Embedded Wallets","pages":[{"title":"InvalidPasswordError: Decryption failed","href":"/get-started/troubleshooting/wallets/invalid-password-error-decryption-failed"}]},{"group":"React / Vite","pages":[{"title":"Vite.js polyfills necessary for Dynamic SDK","href":"/get-started/troubleshooting/react/vitejs-polyfills-necessary-for-dynamic-sdk"},{"title":"Vite.js - Starknet module export error","href":"/get-started/troubleshooting/react/vitejs-starknet-module-export-error"},{"title":"Vite.js - MetaMask QR code connection errors","href":"/get-started/troubleshooting/react/vitejs-metamask-qr-code-connection-errors"},{"title":"Failed to parse source map warnings","href":"/get-started/troubleshooting/react/failed-to-parse-source-map-warnings"},{"title":"Cannot resolve rpc-websockets","href":"/get-started/troubleshooting/react/cannot-resolve-rpc-websockets"},{"title":"Cannot convert a BigInt value to a number","href":"/get-started/troubleshooting/react/cannot-convert-a-bigInt-value-to-a-number"},{"title":"Jest Error: SyntaxError: Cannot use import statement outside a module","href":"/get-started/troubleshooting/react/jest-error-syntaxerror-unexpected-token-export"},{"title":"Modal pop up isn't visible","href":"/get-started/troubleshooting/react/pop-up-isnt-visible-on-some-devices"},{"title":"Input Cannot Be Focused","href":"/get-started/troubleshooting/react/input-cannot-be-focused"}]},{"group":"Next.js","pages":[{"title":"Module not found: Can't resolve 'encoding'","href":"/get-started/troubleshooting/next/module-not-found"},{"title":"FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed","href":"/get-started/troubleshooting/next/javascript-heap-out-of-memory"},{"title":"Hydration failed because initial UI does not match what was rendered on the server","href":"/get-started/troubleshooting/next/hydration-failed"}]},{"group":"Solana","pages":[{"title":"Can't resolve 'crypto'","href":"/get-started/troubleshooting/solana/cannot-resolve-crypto"}]},{"group":"Mobile","pages":[{"title":"Wallet is redirecting to the App Store","href":"/get-started/troubleshooting/mobile/wallet-is-redirecting-to-the-app-store"}]},{"group":"WalletConnect","pages":[{"title":"WalletConnect Unsupported Chain","href":"/get-started/troubleshooting/walletconnect/walletconnect-unsupported-chain"}]},{"group":"Browser Extension","pages":[{"title":"Store Approval Issues","href":"/get-started/troubleshooting/browser-extension/browser-extension-approval-issues"}]},{"group":"Browser Storage","pages":[{"title":"IndexedDB is unavailable or closing","href":"/get-started/troubleshooting/browser-storage/indexeddb-unavailable"}]},{"group":"TypeScript","pages":[{"title":"TypeScript Compilation Errors","href":"/get-started/troubleshooting/typescript/typescript-compilation-error"}]}]},{"title":"Changelog","mode":"custom","href":"/changelog"}]},{"group":"Build with","boost":2,"icon":"code","pages":[{"group":"Javascript, React \u0026 React Native","boost":1.5,"icon":"js","root":{"title":"JavaScript SDK Overview","href":"/javascript/overview"},"expanded":false,"pages":[{"group":"Agnostic","icon":"js","pages":[{"title":"JavaScript Quickstart","description":null,"href":"/javascript/reference/quickstart"},{"title":"Creating a Dynamic Client","href":"/javascript/reference/client/create-dynamic-client"},{"title":"Adding Extensions","description":"Add chain wallet and addon support to your Dynamic client with extensions","href":"/javascript/reference/adding-extensions"},{"title":"Initializing the Dynamic Client","href":"/javascript/reference/client/initialize-dynamic-client"}]},{"group":"React","icon":"react","pages":[{"title":"React Quickstart (JS SDK)","href":"/javascript/reference/react-quickstart"},{"title":"Next.js App Router setup","href":"/javascript/reference/nextjs-app-router"},{"title":"How React Hooks Work","href":"/javascript/reference/react-hooks-guide"},{"title":"React Hooks","href":"/javascript/reference/react-hooks"},{"title":"React Hooks Catalog","href":"/javascript/reference/react-hooks-catalog"}]},{"group":"React Native","icon":"mobile-screen","pages":[{"title":"React Native Quickstart (JS SDK)","href":"/javascript/reference/react-native-quickstart"},{"title":"React Native Setup","href":"/javascript/react-native/setup"},{"title":"Setup on Expo","href":"/javascript/react-native/expo"},{"title":"Setup on Bare React Native","href":"/javascript/react-native/bare-react-native"},{"title":"React Native Passkeys","href":"/javascript/react-native/passkeys"},{"title":"Device key storage","href":"/javascript/react-native/device-key-storage"},{"title":"React Native Business Accounts","href":"/javascript/react-native/business-accounts"}]}]},{"group":"Swift","boost":1,"icon":"swift","root":{"title":"Swift SDK Introduction","href":"/swift/introduction"},"expanded":false,"pages":[{"title":"Swift Quickstart","href":"/swift/quickstart"}]},{"group":"Kotlin","boost":1,"icon":"android","root":{"title":"Kotlin SDK Introduction","href":"/kotlin/introduction"},"expanded":false,"pages":[{"title":"Kotlin Quickstart","href":"/kotlin/quickstart"}]},{"group":"Flutter","boost":1,"icon":"flutter","root":{"title":"Flutter SDK Introduction","href":"/flutter/introduction"},"expanded":false,"pages":[{"title":"Flutter Quickstart","href":"/flutter/quickstart"},{"title":"Go Router Integration","href":"/flutter/go-router-integration"}]},{"group":"Unity","boost":0.8,"icon":"unity","root":{"title":"Unity SDK Introduction","href":"/unity/introduction"},"expanded":false,"pages":[{"title":"Installation Guide","href":"/unity/installation-guide"}]},{"group":"Node","boost":1,"icon":"node","expanded":false,"pages":[{"title":"Node SDK Quickstart","href":"/node/quickstart"}]},{"group":"Python","boost":0.8,"icon":"python","expanded":false,"pages":[{"title":"Python SDK Quickstart","href":"/python/quickstart"}]},{"group":"Rust","boost":0.7,"icon":"rust","expanded":false,"pages":[{"title":"Rust SDK Quickstart","href":"/rust/quickstart"}]},{"group":"Java","boost":0.7,"icon":"java","expanded":false,"pages":[{"title":"Java SDK Quickstart","href":"/java/quickstart"}]},{"group":"CLI","boost":0.7,"icon":"terminal","root":{"title":"Dynamic CLI","icon":"rectangle-terminal","href":"/cli/index"},"expanded":false,"pages":[{"title":"Getting started","icon":"rocket","href":"/cli/getting-started"},{"title":"Config as code","icon":"file-code","href":"/cli/guides/config-as-code"},{"title":"Migrate sandbox to live","icon":"arrow-up-right","href":"/cli/guides/migrate-sandbox-to-live"},{"title":"Project settings","icon":"sliders","href":"/cli/guides/project-settings"},{"title":"Authentication \u0026 CI","icon":"key","href":"/cli/guides/authentication"}]},{"group":"API","boost":2,"icon":"code","expanded":false,"pages":[{"title":"API Quickstart","sidebarTitle":"Quickstart","href":"/api-reference/quickstart"}]}]}]},{"tab":"Embedded Wallets","icon":"wallet","pages":[{"title":"Embedded Wallets","href":"/embedded-wallets/mpc/overview"}]},{"tab":"Business Accounts","icon":"building","pages":[{"title":"Business Accounts","href":"/business-accounts/accounts"}]},{"tab":"Policies","icon":"shield-check","pages":[{"title":"Policies","href":"/embedded-wallets/mpc/policies/overview"}]},{"tab":"Auth","icon":"door-open","pages":[{"title":"Auth","href":"/auth/overview"}]},{"tab":"Agents","icon":"server","pages":[{"title":"Agents","href":"/agents/overview"}]},{"tab":"Fireblocks Flow","icon":"coins","pages":[{"title":"Fireblocks Flow","href":"/flow/overview"}]},{"tab":"Earn","icon":"chart-line","pages":[{"title":"Earn","href":"/earn/overview"}]},{"tab":"Funding","icon":"money-bill-transfer","pages":[{"title":"Funding","href":"/funding/overview"}]},{"tab":"Reference","icon":"book-open","menu":[{"item":"Javascript, React \u0026 React Native","icon":"js","pages":[{"title":"Javascript, React \u0026 React Native","href":"/javascript/reference/overview"}]},{"item":"Swift","icon":"swift","pages":[{"title":"Swift","href":"/swift/sdk-reference/overview"}]},{"item":"Kotlin","icon":"android","pages":[{"title":"Kotlin","href":"/kotlin/sdk-reference/overview"}]},{"item":"Flutter","icon":"flutter","pages":[{"title":"Flutter","href":"/flutter/sdk-reference/overview"}]},{"item":"Unity","icon":"unity","pages":[{"title":"Unity","href":"/unity/sdk-reference/overview"}]},{"item":"Node","icon":"node","pages":[{"title":"Node","href":"/node/reference/auth/authenticate-jwt"}]},{"item":"REST API","icon":"code","pages":[{"title":"REST API","href":"/api-reference/overview"}]},{"item":"Legacy React","icon":"react","pages":[{"title":"Legacy React","href":"/react/reference/quickstart"}]},{"item":"Legacy React Native","icon":"mobile-screen","pages":[{"title":"Legacy React Native","href":"/react-native/reference/introduction"}]}],"pages":[{"title":"Reference","href":"/javascript/reference/overview"}]},{"tab":"Recipes","icon":"book-open","pages":[{"title":"Recipes","href":"/recipes/recipes"}]}]},"basePath":"","title":"Creating a Dynamic Client - Dynamic","buildId":"dpl_9yaRmq8qi7yyMZn9oEWmKEdYMvGZ","deploymentId":"dpl_9yaRmq8qi7yyMZn9oEWmKEdYMvGZ","dynamics":[],"chunks":[]}