Reference implementation for integrating the Dynamic JavaScript SDK (@dynamic-labs-sdk/*) in a React app: authentication, multi-chain wallets, WalletConnect, checkout, and related UI patterns.
- Node.js 18.18+
- A Dynamic project and Environment ID from the Dynamic dashboard
npm install
cp .env.example .envEdit .env and set VITE_DYNAMIC_ENVIRONMENT_ID to your Environment ID.
npm run devThe dev server listens on http://localhost:5200.
| Variable | Required | Description |
|---|---|---|
VITE_DYNAMIC_ENVIRONMENT_ID |
Yes | Your Dynamic Environment ID |
See .env.example for copy-paste templates.
| Command | Description |
|---|---|
npm run dev |
Start Vite dev server |
npm run build |
Production build to dist/ |
npm run preview |
Serve the production build locally |
npm run lint |
Run ESLint |
The Checkout route (/checkout) demonstrates the full on-chain payment flow: create a transaction, select a source token, review the quote, submit, and poll for settlement status.
To use it, navigate to Checkout in the sidebar after signing in and enter your Checkout ID in the form. The ID is saved to localStorage so you only need to enter it once. Checkout IDs are created in the Dynamic dashboard.
- Dynamic docs
- JavaScript SDK packages are published under the
@dynamic-labs-sdkscope on npm.
MIT — see LICENSE.