Update wallet docs#76
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Restructure the wallets intro around GTM positioning and competitor best practices: smart-account-first lead, how-it-works flow with key security, capabilities, "Why ZeroDev Wallet" value props with a roadmap subsection, first-party SDK framing, and a pricing section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the standalone wallet SDK reference from the sidebar and delete the page; nothing else links to it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the subtitle, frame the kit as drop-in UI for faster time to market with flexible adoption, note upcoming screens (transaction confirmation, portfolio, history, balances), and inline the custom-UI auth links. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # docs/pages/wallets/auth/passkeys.mdx # docs/pages/wallets/auth/wallet-ui-kit.mdx # docs/pages/wallets/quickstart.mdx # docs/pages/wallets/session-management.mdx
| The Wallet UI Kit gives you prebuilt React UI for ZeroDev Wallet. Use it when you want to get started faster with a ready-made login flow instead of building every authentication screen yourself. | ||
|
|
||
| The kit uses a Wagmi-compatible ZeroDev connector, so after the user signs in you can use standard Wagmi hooks such as `useAccount`, `useSignMessage`, and `useSendTransaction`. | ||
|
|
There was a problem hiding this comment.
"The current kit covers login and an experimental confirmation screen for signature signing and transaction confirmations that is currently in beta." - wasn't signing out of scope in general? We assumed it won't be part of this version of the package at all.
There was a problem hiding this comment.
Agreed, removing and will put in "coming soon"
|
|
||
| The current kit covers login and an experimental confirmation screen for signature signing and transaction confirmations that is currently in beta. This confirmation UI will improve over time. More wallet UI components are coming, including onramps, asset management and portfolio views, transaction history, and chain-abstracted balances. | ||
|
|
||
| For a fully custom UI, use the hook-based authentication pages instead: [Passkeys](/wallets/auth/passkeys), [Email OTP](/wallets/auth/email-otp), [Magic Link](/wallets/auth/magic-link), or [Google OAuth](/wallets/auth/google-oauth). |
There was a problem hiding this comment.
For fully custom UI, they can also use https://github.com/zerodevapp/zerodev-wallet-sdk/blob/main/packages/react-wallet-ui/src/auth/hooks/useAuth.ts
| :::code-group | ||
|
|
||
| ```bash [npm] | ||
| npm i @zerodev/react-wallet-ui @zerodev/wallet-react @zerodev/wallet-core wagmi viem @tanstack/react-query |
There was a problem hiding this comment.
npm i @zerodev/react-wallet-ui @zerodev/wallet-core @zerodev/wallet-react wagmi viem @wagmi/core @tanstack/react-query zustand
Needs to be adjusted for all install examples
| ``` | ||
|
|
||
| ```bash [pnpm] | ||
| pnpm i @zerodev/react-wallet-ui @zerodev/wallet-react @zerodev/wallet-core wagmi viem @tanstack/react-query |
There was a problem hiding this comment.
nit: pnpm i works but pnpm add is the correct idiomatic command here
|
|
||
| ## Size the container | ||
|
|
||
| `AuthFlow` renders into the space you give it. Put it in a constrained wallet-sized container, modal, or drawer instead of letting it stretch across the full page on large screens. |
There was a problem hiding this comment.
Currently this is incorrect. AuthFlow has fixed size based on the designs, and no wrapper is going to modify it.
| </div> | ||
| ``` | ||
|
|
||
| The `onClose` prop is optional. Use it when your app owns surrounding UI state, such as closing a modal after the user clicks the kit's close button. |
There was a problem hiding this comment.
This is not the current behavior but I remember you asked us to add it. We will adjust on our end.
There was a problem hiding this comment.
ty let me know if this changes will leave for now.
| @@ -2,10 +2,6 @@ import QueryResult from '../shared/query-result.mdx' | |||
|
|
|||
| # useGetUserEmail [Hook for getting the authenticated user's email] | |||
There was a problem hiding this comment.
@SahilVasava is this file still relevant? This hook doesn't exist anymore does it?
There was a problem hiding this comment.
We also have a useAuthenticators now. Should that be documented?
There was a problem hiding this comment.
That's right. useGetUserEmail deprecated. useAuthenticators should be documented now
There was a problem hiding this comment.
@srinjoyc I'll add that on my PR and you can modify it later
…serEmail refs, align magic-link keys
|
@srinjoyc one item from reviewing this PR that needs a decision rather than a mechanical edit: Orphaned hook reference pages. The small mechanical fixes I found (stale |
docs(wallets): fix stale OTP params, deprecated useGetUserEmail refs, magic-link keys
…native-focused-documentation docs(wallets): add React Native focused documentation
Going to delete the references and will be incrporated into specific contexual pages in the "Authentication" and "Wallet API" sections. |
|
|
||
| A magic link needs a verified `https` callback — an **App Link** on Android, a **Universal Link** on iOS — so that tapping the link in the email opens the app. Email clients (e.g. Gmail) don't render custom-scheme links, so a plain `https` link on your verified domain is required. | ||
|
|
||
| The flow: send → the backend emails `${redirectURL}?code=<otp>` → the user taps it → the app opens at `/verify-email` → the route pairs the `code` from the URL with the persisted `otpId`/`otpEncryptionTargetBundle` and verifies. |
There was a problem hiding this comment.
We have dropped redirectURL, is it correctly mentioned here?
| disabled={send.isPending || !email} | ||
| onPress={() => | ||
| send.mutate( | ||
| { email, redirectURL: `https://${RP_ID}/verify-email` }, |
There was a problem hiding this comment.
Same here, should redirectURL be dropped?
There was a problem hiding this comment.
Correct, updating all these
Summary