@zerodev/wallet-react-ui 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +38 -7
  2. package/dist/_types/auth/authStoreSlice.d.ts +31 -0
  3. package/dist/_types/auth/authStoreSlice.d.ts.map +1 -1
  4. package/dist/_types/auth/brandAssets.d.ts +2 -0
  5. package/dist/_types/auth/brandAssets.d.ts.map +1 -0
  6. package/dist/_types/auth/components/WalletSheet/index.d.ts +20 -0
  7. package/dist/_types/auth/components/WalletSheet/index.d.ts.map +1 -0
  8. package/dist/_types/auth/hooks/useAuth.d.ts +5 -0
  9. package/dist/_types/auth/hooks/useAuth.d.ts.map +1 -1
  10. package/dist/_types/auth/hooks/useWalletConnectPairing.d.ts +19 -0
  11. package/dist/_types/auth/hooks/useWalletConnectPairing.d.ts.map +1 -0
  12. package/dist/_types/auth/hooks/useWalletInfo.d.ts +32 -0
  13. package/dist/_types/auth/hooks/useWalletInfo.d.ts.map +1 -0
  14. package/dist/_types/auth/index.d.ts.map +1 -1
  15. package/dist/_types/auth/pages/SignUp/InstalledWallets.d.ts.map +1 -1
  16. package/dist/_types/auth/pages/SignUp/MoreWallets.d.ts.map +1 -1
  17. package/dist/_types/auth/pages/SignUp/Wallet.d.ts.map +1 -1
  18. package/dist/_types/auth/pages/SignUp/WalletConnect.d.ts +5 -0
  19. package/dist/_types/auth/pages/SignUp/WalletConnect.d.ts.map +1 -0
  20. package/dist/_types/auth/pages/SignUp/context.d.ts +4 -0
  21. package/dist/_types/auth/pages/SignUp/context.d.ts.map +1 -1
  22. package/dist/_types/auth/pages/SignUp/index.d.ts +2 -0
  23. package/dist/_types/auth/pages/SignUp/index.d.ts.map +1 -1
  24. package/dist/_types/auth/pages/Verifying.d.ts.map +1 -1
  25. package/dist/_types/auth/pages/WalletConnecting.d.ts +11 -0
  26. package/dist/_types/auth/pages/WalletConnecting.d.ts.map +1 -0
  27. package/dist/_types/auth/types.d.ts +1 -1
  28. package/dist/_types/auth/types.d.ts.map +1 -1
  29. package/dist/_types/auth/utils/isCancellationError.d.ts +4 -0
  30. package/dist/_types/auth/utils/isCancellationError.d.ts.map +1 -1
  31. package/dist/_types/auth/utils/isMobile.d.ts +2 -0
  32. package/dist/_types/auth/utils/isMobile.d.ts.map +1 -0
  33. package/dist/_types/auth/utils/isResourceUnavailableError.d.ts +12 -0
  34. package/dist/_types/auth/utils/isResourceUnavailableError.d.ts.map +1 -0
  35. package/dist/_types/auth/utils/isZeroDevWalletConnect.d.ts +6 -0
  36. package/dist/_types/auth/utils/isZeroDevWalletConnect.d.ts.map +1 -0
  37. package/dist/_types/auth/utils/walletDeepLink.d.ts +18 -0
  38. package/dist/_types/auth/utils/walletDeepLink.d.ts.map +1 -0
  39. package/dist/_types/auth/walletGuide.d.ts +21 -3
  40. package/dist/_types/auth/walletGuide.d.ts.map +1 -1
  41. package/dist/_types/connector.d.ts.map +1 -1
  42. package/dist/_types/index.d.ts +3 -0
  43. package/dist/_types/index.d.ts.map +1 -1
  44. package/dist/_types/zeroDevWalletConnect.d.ts +13 -0
  45. package/dist/_types/zeroDevWalletConnect.d.ts.map +1 -0
  46. package/dist/index.cjs +3 -3
  47. package/dist/index.cjs.map +1 -1
  48. package/dist/index.mjs +1228 -729
  49. package/dist/index.mjs.map +1 -1
  50. package/dist/styles.css +1 -1
  51. package/package.json +5 -4
  52. package/src/assets.d.ts +5 -0
  53. package/src/auth/authStoreSlice.ts +72 -3
  54. package/src/auth/brandAssets.ts +5 -0
  55. package/src/auth/components/WalletSheet/index.tsx +211 -0
  56. package/src/auth/hooks/useAuth.ts +7 -0
  57. package/src/auth/hooks/useWalletConnectPairing.ts +134 -0
  58. package/src/auth/hooks/useWalletInfo.ts +145 -0
  59. package/src/auth/index.tsx +3 -0
  60. package/src/auth/pages/SignUp/InstalledWallets.tsx +18 -28
  61. package/src/auth/pages/SignUp/MoreWallets.tsx +53 -30
  62. package/src/auth/pages/SignUp/Wallet.tsx +44 -30
  63. package/src/auth/pages/SignUp/WalletConnect.tsx +32 -0
  64. package/src/auth/pages/SignUp/context.tsx +4 -0
  65. package/src/auth/pages/SignUp/index.tsx +31 -0
  66. package/src/auth/pages/Verifying.tsx +28 -8
  67. package/src/auth/pages/WalletConnecting.tsx +237 -0
  68. package/src/auth/types.ts +1 -0
  69. package/src/auth/utils/isCancellationError.ts +20 -1
  70. package/src/auth/utils/isMobile.ts +9 -0
  71. package/src/auth/utils/isResourceUnavailableError.ts +29 -0
  72. package/src/auth/utils/isZeroDevWalletConnect.ts +8 -0
  73. package/src/auth/utils/walletDeepLink.ts +23 -0
  74. package/src/auth/walletGuide.ts +42 -8
  75. package/src/connector.ts +13 -4
  76. package/src/index.ts +7 -2
  77. package/src/shared/components/StatusScreen/index.tsx +1 -1
  78. package/src/zeroDevWalletConnect.ts +95 -0
  79. package/dist/_types/shared/components/TokenSummary/index.d.ts +0 -18
  80. package/dist/_types/shared/components/TokenSummary/index.d.ts.map +0 -1
  81. package/src/shared/components/TokenSummary/index.tsx +0 -50
package/README.md CHANGED
@@ -41,6 +41,25 @@ export const config = createConfig({
41
41
  })
42
42
  ```
43
43
 
44
+ To let users pair mobile wallets over WalletConnect, also add the kit's
45
+ preconfigured connector (one WalletConnect connector per app — the kit drives
46
+ it, so don't run a separate WalletConnect UI of your own alongside it):
47
+
48
+ ```tsx
49
+ import { zeroDevWallet, zeroDevWalletConnect } from '@zerodev/wallet-react-ui'
50
+
51
+ connectors: [
52
+ zeroDevWallet({ ... }),
53
+ zeroDevWalletConnect({ projectId: 'your-reown-project-id' }), // https://dashboard.reown.com
54
+ ],
55
+ ```
56
+
57
+ It wraps wagmi's `walletConnect` connector with `showQrModal: false` baked in
58
+ — required so WalletConnect's own modal never pops over the kit's UI — and
59
+ forwards any other WalletConnect parameters (e.g. `metadata`). The kit only
60
+ pairs through connectors created by this factory; a raw `walletConnect()`
61
+ connector in your config is ignored.
62
+
44
63
  ### 2. Import the stylesheet once at app entry
45
64
 
46
65
  ```tsx
@@ -136,22 +155,33 @@ import { ConnectWallet, SignUp } from '@zerodev/wallet-react-ui'
136
155
  either terms URL is set, a checkbox appears and every method is blocked
137
156
  until the user agrees. `emailAuthMethod` picks the email verification flow.
138
157
  - Units: `SignUp.Passkey`, `SignUp.Google`, `SignUp.Email`, `SignUp.Wallet`,
139
- `SignUp.InstalledWallets`, `SignUp.MoreWallets`, `SignUp.Divider`. Order and
140
- presence are yours; while one method is in flight, the others disable
141
- themselves.
158
+ `SignUp.WalletConnect`, `SignUp.InstalledWallets`, `SignUp.MoreWallets`,
159
+ `SignUp.Divider`. Order and presence are yours; while one method is in
160
+ flight, the others disable themselves.
142
161
  - `SignUp.Wallet` pins one external wallet as its own row. `walletId` is the
143
162
  `WalletId` union (e.g. `'metamask'`, `'coinbase'`, `'rabby'`); the row
144
163
  connects the wallet when a live connector claims it (browser extension or a
145
164
  configured SDK connector) and is a link to the vendor's download page
146
- otherwise.
165
+ otherwise. With WalletConnect configured, the row instead opens the pairing
166
+ sheet — phone pairing on one tab, the browser connect/download on the other.
147
167
  - `SignUp.InstalledWallets` auto-discovers installed wallets: one row with an
148
168
  INSTALLED badge per announced (EIP-6963) browser extension, and nothing when
149
- none are installed. Wallets pinned via `SignUp.Wallet` are excluded
169
+ none are installed. With WalletConnect configured, rows of known wallets
170
+ open the pairing sheet; unknown extensions still connect directly. Wallets pinned via `SignUp.Wallet` are excluded
150
171
  automatically; `excludeWalletIds` hides further wallets by guide id or rdns,
151
172
  and `maxWallets` caps the list (default 4, known wallets ranked first).
173
+ - `SignUp.WalletConnect` renders a "WalletConnect" row that opens a pairing
174
+ sheet: a QR code any mobile wallet can scan, plus a copy-link fallback. The
175
+ pairing preloads when the sign-up page mounts so the QR is ready on open;
176
+ when it expires, WalletConnect's own error shows in the sheet with a
177
+ one-tap Try again. On phones, tapping a known wallet's row deep-links
178
+ straight into its app; the sheet opens behind it as the fallback. The row renders nothing unless a `zeroDevWalletConnect`
179
+ connector is in your wagmi config.
152
180
  - `SignUp.MoreWallets` renders a row that opens an overlay sheet with the full
153
181
  wallet grid — every known wallet plus any other live connector; installed
154
- ones connect, the rest link to the vendor's download page.
182
+ ones connect, the rest link to the vendor's download page. With
183
+ WalletConnect configured, known wallets' tiles open the pairing sheet
184
+ instead.
155
185
  - `SignUp.Default` is the canonical composition; it accepts the same props as
156
186
  the root and forwards them.
157
187
  - Auth success/failure surfaces through wagmi — await `connect`, or watch
@@ -162,8 +192,9 @@ import { ConnectWallet, SignUp } from '@zerodev/wallet-react-ui'
162
192
  | Export | Description |
163
193
  | --- | --- |
164
194
  | `zeroDevWallet` | wagmi connector with kit-specific auth extensions. |
195
+ | `zeroDevWalletConnect` | WalletConnect connector preconfigured for the kit (`showQrModal: false`). |
165
196
  | `<ConnectWallet />` | Renders the current auth step (sign-in, OTP, verifying, etc.). Props: `logo`, `renderSignUp`, `size`, `onClose`. |
166
- | `<SignUp />` | Compound sign-up page: `SignUp.Default` plus the composable units (`Passkey`, `Google`, `Email`, `Wallet`, `InstalledWallets`, `MoreWallets`, `Divider`). |
197
+ | `<SignUp />` | Compound sign-up page: `SignUp.Default` plus the composable units (`Passkey`, `Google`, `Email`, `Wallet`, `WalletConnect`, `InstalledWallets`, `MoreWallets`, `Divider`). |
167
198
  | `useAuth` | Read / drive the auth flow state. |
168
199
 
169
200
  ### Types
@@ -1,5 +1,21 @@
1
1
  import type { StateCreator } from 'zustand';
2
2
  import type { AuthStep } from './types';
3
+ /**
4
+ * Why the connecting page stopped waiting. Not always a failure: a request the
5
+ * wallet still holds (EIP-1193 `-32002`) renders as waiting.
6
+ */
7
+ export type ConnectFailure = {
8
+ title: string;
9
+ message: string;
10
+ /** The wallet still has the request open; render as waiting. */
11
+ pending: boolean;
12
+ };
13
+ export type PendingWallet = {
14
+ /** wagmi connector uid, resolved via useConnectors. */
15
+ connectorUid: string;
16
+ name: string;
17
+ icon?: string | undefined;
18
+ };
3
19
  export interface AuthStoreSlice {
4
20
  auth: {
5
21
  step: AuthStep | null;
@@ -19,6 +35,21 @@ export interface AuthStoreSlice {
19
35
  }) => void;
20
36
  /** Clear the persisted OTP session after a successful verify. */
21
37
  clearOtpSession: () => void;
38
+ /**
39
+ * External wallet the `wallet-connecting` step is driving. That page owns
40
+ * the wagmi connect() call; the wallet button only records intent.
41
+ */
42
+ pendingWallet: PendingWallet | null;
43
+ /** Null while the page is still waiting on the wallet. */
44
+ connectError: ConnectFailure | null;
45
+ /** Record the wallet and move to `wallet-connecting`. */
46
+ startWalletConnection: (wallet: PendingWallet) => void;
47
+ setConnectError: (failure: ConnectFailure | null) => void;
48
+ /**
49
+ * Forget the pending wallet. Called on success and by reset(), not when
50
+ * the user leaves: the open request may still be approved later.
51
+ */
52
+ clearPendingWallet: () => void;
22
53
  /** Restore a persisted OTP session (survives reloads mid-email-flow). */
23
54
  initialize: () => void;
24
55
  goToStep: (step: AuthStep | null) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"authStoreSlice.d.ts","sourceRoot":"","sources":["../../../src/auth/authStoreSlice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AA2CvC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE;QAEJ,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAA;QACrB,WAAW,EAAE,QAAQ,EAAE,CAAA;QACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;QACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;QACjC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;QACpB;;;WAGG;QACH,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAA;QACxC,sDAAsD;QACtD,aAAa,EAAE,CAAC,KAAK,EAAE;YACrB,KAAK,EAAE,MAAM,CAAA;YACb,yBAAyB,EAAE,MAAM,CAAA;SAClC,KAAK,IAAI,CAAA;QACV,iEAAiE;QACjE,eAAe,EAAE,MAAM,IAAI,CAAA;QAG3B,yEAAyE;QACzE,UAAU,EAAE,MAAM,IAAI,CAAA;QACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAA;QACzC,MAAM,EAAE,MAAM,IAAI,CAAA;QAClB,KAAK,EAAE,MAAM,IAAI,CAAA;KAClB,CAAA;CACF;AAED,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAC7C,cAAc,EACd;CAAE,EACF;CAAE,EACF,cAAc,CA+Fd,CAAA"}
1
+ {"version":3,"file":"authStoreSlice.d.ts","sourceRoot":"","sources":["../../../src/auth/authStoreSlice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AA2CvC;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,gEAAgE;IAChE,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,uDAAuD;IACvD,YAAY,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,CAAA;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE;QAEJ,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAA;QACrB,WAAW,EAAE,QAAQ,EAAE,CAAA;QACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;QACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;QACjC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;QACpB;;;WAGG;QACH,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAA;QACxC,sDAAsD;QACtD,aAAa,EAAE,CAAC,KAAK,EAAE;YACrB,KAAK,EAAE,MAAM,CAAA;YACb,yBAAyB,EAAE,MAAM,CAAA;SAClC,KAAK,IAAI,CAAA;QACV,iEAAiE;QACjE,eAAe,EAAE,MAAM,IAAI,CAAA;QAE3B;;;WAGG;QACH,aAAa,EAAE,aAAa,GAAG,IAAI,CAAA;QACnC,0DAA0D;QAC1D,YAAY,EAAE,cAAc,GAAG,IAAI,CAAA;QACnC,yDAAyD;QACzD,qBAAqB,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAA;QACtD,eAAe,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAA;QACzD;;;WAGG;QACH,kBAAkB,EAAE,MAAM,IAAI,CAAA;QAG9B,yEAAyE;QACzE,UAAU,EAAE,MAAM,IAAI,CAAA;QACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAA;QACzC,MAAM,EAAE,MAAM,IAAI,CAAA;QAClB,KAAK,EAAE,MAAM,IAAI,CAAA;KAClB,CAAA;CACF;AAED,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAC7C,cAAc,EACd;CAAE,EACF;CAAE,EACF,cAAc,CAkId,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const walletConnectLogo: string;
2
+ //# sourceMappingURL=brandAssets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brandAssets.d.ts","sourceRoot":"","sources":["../../../src/auth/brandAssets.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,EAAE,MAAY,CAAA"}
@@ -0,0 +1,20 @@
1
+ import type { WalletConnectPairing } from '../../hooks/useWalletConnectPairing';
2
+ import { type WalletGuideEntry } from '../../walletGuide';
3
+ export type WalletSheetProps = {
4
+ open: boolean;
5
+ onOpenChange: (open: boolean) => void;
6
+ /** Absent = generic WalletConnect mode (raw-URI QR, no tabs). */
7
+ wallet?: WalletGuideEntry | undefined;
8
+ /** Page-level pairing (preloaded by the SignUp root) shared by every wallet
9
+ * surface. */
10
+ pairing: WalletConnectPairing;
11
+ };
12
+ /**
13
+ * Bottom sheet with the connection paths for one wallet (or the generic
14
+ * WalletConnect pairing). The pairing is preloaded at page level so the QR is
15
+ * ready on open and mobile row taps can deep-link synchronously; when the
16
+ * proposal expires, WalletConnect rejects the pending connect and the error
17
+ * branch offers Try again.
18
+ */
19
+ export declare function WalletSheet({ open, onOpenChange, wallet, pairing, }: WalletSheetProps): import("react").JSX.Element;
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/auth/components/WalletSheet/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAC/E,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAExE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,iEAAiE;IACjE,MAAM,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACrC;kBACc;IACd,OAAO,EAAE,oBAAoB,CAAA;CAC9B,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,OAAO,GACR,EAAE,gBAAgB,+BAWlB"}
@@ -3,6 +3,11 @@ export declare function useAuth(): {
3
3
  email: string | null;
4
4
  otpId: string | null;
5
5
  otpEncryptionTargetBundle: string | null;
6
+ pendingWallet: import("../authStoreSlice").PendingWallet | null;
7
+ connectError: import("../authStoreSlice").ConnectFailure | null;
8
+ startWalletConnection: (wallet: import("../authStoreSlice").PendingWallet) => void;
9
+ setConnectError: (failure: import("../authStoreSlice").ConnectFailure | null) => void;
10
+ clearPendingWallet: () => void;
6
11
  goToStep: (step: import("../types").AuthStep | null) => void;
7
12
  goBack: (() => void) | null;
8
13
  reset: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../../src/auth/hooks/useAuth.ts"],"names":[],"mappings":"AAGA,wBAAgB,OAAO;;;;;;;;;;;;;;EAuBtB"}
1
+ {"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../../src/auth/hooks/useAuth.ts"],"names":[],"mappings":"AAGA,wBAAgB,OAAO;;;;;;;;;;;;;;;;;;;EA8BtB"}
@@ -0,0 +1,19 @@
1
+ import type { WalletGuideEntry } from '../walletGuide';
2
+ export type WalletConnectPairing = {
3
+ /** Pairing URI from the connector's `display_uri` event; null until it
4
+ * arrives (or after a retry reset). */
5
+ uri: string | null;
6
+ error: string | null;
7
+ retry: () => void;
8
+ /** Wrapped deep link for the one-tap mobile redirect into `wallet`'s app,
9
+ * or null when the tap should just open the sheet (desktop, claiming
10
+ * installed connector, no usable URI). An errored pairing — including
11
+ * WalletConnect's own proposal expiry — never redirects. */
12
+ deepLinkFor: (wallet: WalletGuideEntry) => string | null;
13
+ };
14
+ /**
15
+ * Runs one WalletConnect pairing for the lifetime of the mounting component —
16
+ * mount kicks it, unmount abandons it.
17
+ */
18
+ export declare function useWalletConnectPairing(): WalletConnectPairing;
19
+ //# sourceMappingURL=useWalletConnectPairing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWalletConnectPairing.d.ts","sourceRoot":"","sources":["../../../../src/auth/hooks/useWalletConnectPairing.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAkBtD,MAAM,MAAM,oBAAoB,GAAG;IACjC;2CACuC;IACvC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB;;;gEAG4D;IAC5D,WAAW,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,MAAM,GAAG,IAAI,CAAA;CACzD,CAAA;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,oBAAoB,CAuF9D"}
@@ -0,0 +1,32 @@
1
+ import { type WalletId } from '../walletGuide';
2
+ /** How the active connection reaches the wallet. */
3
+ export type WalletSource = 'injected' | 'walletconnect' | 'embedded' | 'other';
4
+ export type WalletInfo = {
5
+ /** Human-readable wallet name ('MetaMask', 'Trust Wallet', …). */
6
+ name?: string | undefined;
7
+ /** Wallet icon URL or data: URI, when one is known. */
8
+ icon?: string | undefined;
9
+ /** Guide id when the wallet matches the kit's wallet guide. */
10
+ walletId?: WalletId | undefined;
11
+ source: WalletSource;
12
+ };
13
+ /**
14
+ * Identity of the wallet behind the active wagmi connection, for
15
+ * wallet-specific handling and analytics attribution. Call-compatible with
16
+ * AppKit's `useWalletInfo` — same name, same `{ walletInfo }` return shape,
17
+ * so migrating is an import swap; `walletId` and `source` are kit extras.
18
+ *
19
+ * wagmi's `useAccount().connector` already names injected wallets, but a
20
+ * WalletConnect connection only reports "WalletConnect" — the actual wallet
21
+ * on the other end (Trust, Rainbow, … on a phone) is in the session's peer
22
+ * metadata, which this hook reads from the provider. `walletInfo` is
23
+ * `undefined` while disconnected, and the WalletConnect case resolves
24
+ * asynchronously (briefly `name: undefined` after connect/reload).
25
+ *
26
+ * @param _namespace - Accepted for AppKit call-compatibility ('eip155');
27
+ * ignored — the kit is EVM-only.
28
+ */
29
+ export declare function useWalletInfo(_namespace?: string): {
30
+ walletInfo: WalletInfo | undefined;
31
+ };
32
+ //# sourceMappingURL=useWalletInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWalletInfo.d.ts","sourceRoot":"","sources":["../../../../src/auth/hooks/useWalletInfo.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAA;AAEvB,oDAAoD;AACpD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,eAAe,GAAG,UAAU,GAAG,OAAO,CAAA;AAE9E,MAAM,MAAM,UAAU,GAAG;IACvB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC/B,MAAM,EAAE,YAAY,CAAA;CACrB,CAAA;AAqGD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG;IAClD,UAAU,EAAE,UAAU,GAAG,SAAS,CAAA;CACnC,CAKA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAA;AAuDjD,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EAAE,WAAW,EACpB,IAAI,EACJ,YAAY,EACZ,IAAI,GACL,GAAE;IACD,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAA;IAClC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAA;IACrC;2EACuE;IACvE,YAAY,CAAC,EAAE,CAAC,MAAM,SAAS,CAAC,GAAG,SAAS,CAAA;IAC5C;;wBAEoB;IACpB,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CACxB,sCAqCL"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAA;AA0DjD,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EAAE,WAAW,EACpB,IAAI,EACJ,YAAY,EACZ,IAAI,GACL,GAAE;IACD,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAA;IAClC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAA;IACrC;2EACuE;IACvE,YAAY,CAAC,EAAE,CAAC,MAAM,SAAS,CAAC,GAAG,SAAS,CAAA;IAC5C;;wBAEoB;IACpB,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CACxB,sCAqCL"}
@@ -1 +1 @@
1
- {"version":3,"file":"InstalledWallets.d.ts","sourceRoot":"","sources":["../../../../../src/auth/pages/SignUp/InstalledWallets.tsx"],"names":[],"mappings":"AAOA;qEACqE;AACrE,wBAAgB,sBAAsB,CAAC,EACrC,gBAAqB,EACrB,UAAc,GACf,EAAE;IACD;iEAC6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B;;uBAEmB;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,+BA0EA"}
1
+ {"version":3,"file":"InstalledWallets.d.ts","sourceRoot":"","sources":["../../../../../src/auth/pages/SignUp/InstalledWallets.tsx"],"names":[],"mappings":"AAMA;qEACqE;AACrE,wBAAgB,sBAAsB,CAAC,EACrC,gBAAqB,EACrB,UAAc,GACf,EAAE;IACD;iEAC6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B;;uBAEmB;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,+BAiEA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MoreWallets.d.ts","sourceRoot":"","sources":["../../../../../src/auth/pages/SignUp/MoreWallets.tsx"],"names":[],"mappings":"AAYA,wDAAwD;AACxD,wBAAgB,iBAAiB,CAAC,EAChC,KAAsB,GACvB,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,+BAuFA"}
1
+ {"version":3,"file":"MoreWallets.d.ts","sourceRoot":"","sources":["../../../../../src/auth/pages/SignUp/MoreWallets.tsx"],"names":[],"mappings":"AAaA,wDAAwD;AACxD,wBAAgB,iBAAiB,CAAC,EAChC,KAAsB,GACvB,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,+BA6GA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Wallet.d.ts","sourceRoot":"","sources":["../../../../../src/auth/pages/SignUp/Wallet.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA+B,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG9E;gFACgF;AAChF,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,+BAsEhE"}
1
+ {"version":3,"file":"Wallet.d.ts","sourceRoot":"","sources":["../../../../../src/auth/pages/SignUp/Wallet.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,QAAQ,EACd,MAAM,mBAAmB,CAAA;AAG1B;gFACgF;AAChF,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,+BA+EhE"}
@@ -0,0 +1,5 @@
1
+ /** Generic WalletConnect row — opens the pairing sheet with a raw-URI QR any
2
+ * wallet's scanner can claim. Renders nothing unless a `zeroDevWalletConnect`
3
+ * connector is in the wagmi config. */
4
+ export declare function SignUpWalletConnect(): import("react").JSX.Element | null;
5
+ //# sourceMappingURL=WalletConnect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WalletConnect.d.ts","sourceRoot":"","sources":["../../../../../src/auth/pages/SignUp/WalletConnect.tsx"],"names":[],"mappings":"AAMA;;uCAEuC;AACvC,wBAAgB,mBAAmB,uCAsBlC"}
@@ -1,4 +1,5 @@
1
1
  import type { EmailAuthMethod } from '../../types';
2
+ import type { WalletGuideEntry } from '../../walletGuide';
2
3
  export type SignUpContextValue = {
3
4
  /** True while any method's auth attempt is in flight — used to disable
4
5
  * sibling methods so two flows can't run at once. */
@@ -19,6 +20,9 @@ export type SignUpContextValue = {
19
20
  registeredWallets: readonly string[];
20
21
  /** Returns the unregister function. */
21
22
  registerWallet: (walletId: string) => () => void;
23
+ /** Opens the root's single WalletSheet — a wallet's connection paths, or
24
+ * the generic WalletConnect pairing when called without one. */
25
+ openWalletSheet: (wallet?: WalletGuideEntry) => void;
22
26
  };
23
27
  export declare const SignUpContext: import("react").Context<SignUpContextValue | null>;
24
28
  export declare function useSignUpContext(): SignUpContextValue;
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/auth/pages/SignUp/context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAC/B;yDACqD;IACrD,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IAC1C;+EAC2E;IAC3E,eAAe,EAAE,eAAe,CAAA;IAChC;4EACwE;IACxE,cAAc,EAAE,OAAO,CAAA;IACvB;+DAC2D;IAC3D,cAAc,EAAE,MAAM,OAAO,CAAA;IAC7B,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC1C;sDACkD;IAClD,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,uCAAuC;IACvC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,IAAI,CAAA;CACjD,CAAA;AAED,eAAO,MAAM,aAAa,oDAAiD,CAAA;AAE3E,wBAAgB,gBAAgB,IAAI,kBAAkB,CAMrD;AAED;;;oCAGoC;AACpC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,QAMhD"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/auth/pages/SignUp/context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEzD,MAAM,MAAM,kBAAkB,GAAG;IAC/B;yDACqD;IACrD,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IAC1C;+EAC2E;IAC3E,eAAe,EAAE,eAAe,CAAA;IAChC;4EACwE;IACxE,cAAc,EAAE,OAAO,CAAA;IACvB;+DAC2D;IAC3D,cAAc,EAAE,MAAM,OAAO,CAAA;IAC7B,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC1C;sDACkD;IAClD,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,uCAAuC;IACvC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,IAAI,CAAA;IAChD;oEACgE;IAChE,eAAe,EAAE,CAAC,MAAM,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAA;CACrD,CAAA;AAED,eAAO,MAAM,aAAa,oDAAiD,CAAA;AAE3E,wBAAgB,gBAAgB,IAAI,kBAAkB,CAMrD;AAED;;;oCAGoC;AACpC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,QAMhD"}
@@ -6,6 +6,7 @@ import { SignUpInstalledWallets } from './InstalledWallets';
6
6
  import { SignUpMoreWallets } from './MoreWallets';
7
7
  import { SignUpPasskey } from './Passkey';
8
8
  import { SignUpWallet } from './Wallet';
9
+ import { SignUpWalletConnect } from './WalletConnect';
9
10
  type SignUpRootProps = {
10
11
  children: ReactNode;
11
12
  /** Enable the consent gate: linked from the footer checkbox, and every
@@ -29,6 +30,7 @@ export declare const SignUp: typeof SignUpRoot & {
29
30
  Google: typeof SignUpGoogle;
30
31
  Email: typeof SignUpEmail;
31
32
  Wallet: typeof SignUpWallet;
33
+ WalletConnect: typeof SignUpWalletConnect;
32
34
  InstalledWallets: typeof SignUpInstalledWallets;
33
35
  MoreWallets: typeof SignUpMoreWallets;
34
36
  Divider: typeof SignUpDivider;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/auth/pages/SignUp/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAyB,MAAM,OAAO,CAAA;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,SAAS,CAAA;IACnB;yEACqE;IACrE,qBAAqB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1C,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,yDAAyD;IACzD,eAAe,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;CAC9C,CAAA;AAED,iBAAS,UAAU,CAAC,EAClB,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,EAChB,eAA6B,GAC9B,EAAE,eAAe,+BAoGjB;AAED,iBAAS,aAAa,CAAC,EAAE,KAAY,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,+BAQ1D;AAED;;yCAEyC;AACzC,iBAAS,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,+BAS9D;AAED,eAAO,MAAM,MAAM;;;;;;;;;CASjB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/auth/pages/SignUp/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAyB,MAAM,OAAO,CAAA;AAK7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAErD,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,SAAS,CAAA;IACnB;yEACqE;IACrE,qBAAqB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1C,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,yDAAyD;IACzD,eAAe,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;CAC9C,CAAA;AAED,iBAAS,UAAU,CAAC,EAClB,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,EAChB,eAA6B,GAC9B,EAAE,eAAe,+BA8HjB;AAED,iBAAS,aAAa,CAAC,EAAE,KAAY,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,+BAQ1D;AAED;;yCAEyC;AACzC,iBAAS,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,+BAS9D;AAED,eAAO,MAAM,MAAM;;;;;;;;;;CAUjB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Verifying.d.ts","sourceRoot":"","sources":["../../../../src/auth/pages/Verifying.tsx"],"names":[],"mappings":"AAYA,wBAAgB,SAAS,gCAuFxB"}
1
+ {"version":3,"file":"Verifying.d.ts","sourceRoot":"","sources":["../../../../src/auth/pages/Verifying.tsx"],"names":[],"mappings":"AAYA,wBAAgB,SAAS,gCA2GxB"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The `wallet-connecting` step: shown from picking an external wallet until it
3
+ * answers, which a locked or dismissed wallet never does — so leaving must
4
+ * always be possible.
5
+ *
6
+ * This page owns the connect() call, since React Query drops per-call
7
+ * callbacks when the sign-up page unmounts on the step change. The wallet
8
+ * button only records intent (`startWalletConnection`).
9
+ */
10
+ export declare function WalletConnecting(): import("react").JSX.Element;
11
+ //# sourceMappingURL=WalletConnecting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WalletConnecting.d.ts","sourceRoot":"","sources":["../../../../src/auth/pages/WalletConnecting.tsx"],"names":[],"mappings":"AAgFA;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,gCAmJ/B"}
@@ -1,4 +1,4 @@
1
1
  export type AuthMethod = 'email' | 'google' | 'passkey' | 'external-wallet';
2
- export type AuthStep = 'sign-up' | 'email-verification' | 'otp-input' | 'verifying-otp' | 'passkey-prompt' | 'oauth-in-progress' | 'authenticated' | 'error';
2
+ export type AuthStep = 'sign-up' | 'email-verification' | 'otp-input' | 'verifying-otp' | 'passkey-prompt' | 'wallet-connecting' | 'oauth-in-progress' | 'authenticated' | 'error';
3
3
  export type EmailAuthMethod = 'magicLink' | 'otp';
4
4
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/auth/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,iBAAiB,CAAA;AAE3E,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,oBAAoB,GACpB,WAAW,GACX,eAAe,GACf,gBAAgB,GAChB,mBAAmB,GACnB,eAAe,GACf,OAAO,CAAA;AAEX,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,KAAK,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/auth/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,iBAAiB,CAAA;AAE3E,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,oBAAoB,GACpB,WAAW,GACX,eAAe,GACf,gBAAgB,GAChB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,GACf,OAAO,CAAA;AAEX,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,KAAK,CAAA"}
@@ -1,2 +1,6 @@
1
+ /**
2
+ * The user cancelled, rather than something failed: passkey prompt dismissed,
3
+ * OAuth popup closed, or a wallet connection request rejected.
4
+ */
1
5
  export declare function isCancellationError(err: unknown): boolean;
2
6
  //# sourceMappingURL=isCancellationError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isCancellationError.d.ts","sourceRoot":"","sources":["../../../../src/auth/utils/isCancellationError.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CASzD"}
1
+ {"version":3,"file":"isCancellationError.d.ts","sourceRoot":"","sources":["../../../../src/auth/utils/isCancellationError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAkBzD"}
@@ -0,0 +1,2 @@
1
+ export declare function isMobile(): boolean;
2
+ //# sourceMappingURL=isMobile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMobile.d.ts","sourceRoot":"","sources":["../../../../src/auth/utils/isMobile.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,YAQvB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * EIP-1474 `-32002` "Resource unavailable". Injected wallets send it when a
3
+ * request for this origin is already open (popup closed without answering,
4
+ * then clicked again) and they will not prompt again until it is answered —
5
+ * wagmi's injected connector reads the code the same way ("prompt is already
6
+ * open").
7
+ *
8
+ * viem wraps it as `ResourceUnavailableRpcError`; wagmi's injected connector
9
+ * rethrows the raw JSON-RPC object. Accept both and walk `.cause`.
10
+ */
11
+ export declare function isResourceUnavailableError(err: unknown): boolean;
12
+ //# sourceMappingURL=isResourceUnavailableError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isResourceUnavailableError.d.ts","sourceRoot":"","sources":["../../../../src/auth/utils/isResourceUnavailableError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAYhE"}
@@ -0,0 +1,6 @@
1
+ import type { Connector } from 'wagmi';
2
+ /** True for connectors created by `zeroDevWalletConnect` — the only ones the
3
+ * kit pairs through. A raw `walletConnect()` may have `showQrModal` enabled
4
+ * (its default), which can't be read back, so it's ignored. */
5
+ export declare function isZeroDevWalletConnect(connector: Connector): boolean;
6
+ //# sourceMappingURL=isZeroDevWalletConnect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isZeroDevWalletConnect.d.ts","sourceRoot":"","sources":["../../../../src/auth/utils/isZeroDevWalletConnect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC;;+DAE+D;AAC/D,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,SAAS,WAE1D"}
@@ -0,0 +1,18 @@
1
+ import { type WalletGuideEntry } from '../walletGuide';
2
+ /**
3
+ * Wrapped deep link for the one-tap mobile redirect into `wallet`'s app, or
4
+ * null when the tap should just open the sheet: desktop, a claiming installed
5
+ * connector (direct connect wins), or no pairing URI.
6
+ */
7
+ export declare function walletDeepLink(params: {
8
+ wallet: WalletGuideEntry;
9
+ connectors: readonly {
10
+ id: string;
11
+ name?: string;
12
+ type?: string;
13
+ rdns?: string | readonly string[] | undefined;
14
+ }[];
15
+ uri: string | null;
16
+ mobile: boolean;
17
+ }): string | null;
18
+ //# sourceMappingURL=walletDeepLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walletDeepLink.d.ts","sourceRoot":"","sources":["../../../../src/auth/utils/walletDeepLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAErE;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACrC,MAAM,EAAE,gBAAgB,CAAA;IACxB,UAAU,EAAE,SAAS;QACnB,EAAE,EAAE,MAAM,CAAA;QACV,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;KAC9C,EAAE,CAAA;IACH,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,MAAM,EAAE,OAAO,CAAA;CAChB,GAAG,MAAM,GAAG,IAAI,CAKhB"}
@@ -25,12 +25,29 @@ export type WalletGuideEntry = {
25
25
  downloadUrl: string;
26
26
  };
27
27
  /**
28
- * A live connector "claims" a guide wallet by rdns: announced (6963)
29
- * connectors carry `id === rdns`, explicit ones (e.g. `metaMask()`) declare
30
- * `rdns` as a string or array.
28
+ * A live 6963 announcement claiming a guide wallet. Announced connectors
29
+ * carry `id === rdns`; wallets' in-app browsers announce a variant rdns
30
+ * (MetaMask mobile is `io.metamask.mobile`) but keep the wallet's exact
31
+ * name, so an announced connector matching the guide name also counts —
32
+ * the same fallback Reown AppKit and Dynamic use. The generic `injected()`
33
+ * connector (id "injected") and our embedded connector also claim type
34
+ * "injected" without being announcements.
35
+ */
36
+ export declare function announcesWallet(connector: {
37
+ id: string;
38
+ name?: string;
39
+ type?: string;
40
+ rdns?: string | readonly string[] | undefined;
41
+ }, wallet: WalletGuideEntry): boolean;
42
+ /**
43
+ * A live connector "claims" a guide wallet: it announces it (see
44
+ * `announcesWallet`), or is an explicit connector (e.g. `metaMask()`)
45
+ * declaring the wallet's rdns as a string or array.
31
46
  */
32
47
  export declare function matchesWallet(connector: {
33
48
  id: string;
49
+ name?: string;
50
+ type?: string;
34
51
  rdns?: string | readonly string[] | undefined;
35
52
  }, wallet: WalletGuideEntry): boolean;
36
53
  declare const guide: readonly [{
@@ -65,6 +82,7 @@ declare const guide: readonly [{
65
82
  readonly name: "Rabby Wallet";
66
83
  readonly rdns: "io.rabby";
67
84
  readonly icon: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2028%2028%22%3E%3Cg%20clip-path%3D%22url(%23a)%22%3E%3Cpath%20fill%3D%22%238697FF%22%20d%3D%22M28%200H0v28h28V0Z%22%2F%3E%3Cpath%20fill%3D%22url(%23b)%22%20d%3D%22M22.54%2015.078c.677-1.514-2.673-5.744-5.874-7.506-2.017-1.365-4.12-1.178-4.545-.579-.935%201.316%203.094%202.43%205.788%203.731-.58.252-1.125.703-1.446%201.28-1.004-1.096-3.209-2.04-5.796-1.28-1.743.513-3.191%201.721-3.751%203.546a1.097%201.097%200%201%200-.445%202.1c.112%200%20.463-.075.463-.075l5.612.041c-2.244%203.56-4.018%204.081-4.018%204.698s1.697.45%202.335.22c3.05-1.1%206.327-4.531%206.89-5.519%202.36.295%204.345.33%204.786-.657Z%22%2F%3E%3Cpath%20fill%3D%22url(%23c)%22%20fill-rule%3D%22evenodd%22%20d%3D%22m17.885%2010.713.025.01c.125-.049.105-.233.07-.378-.078-.333-1.438-1.676-2.715-2.277-1.743-.82-3.025-.777-3.212-.398.356.726%201.998%201.408%203.714%202.12.723.3%201.46.606%202.118.923Z%22%20clip-rule%3D%22evenodd%22%2F%3E%3Cpath%20fill%3D%22url(%23d)%22%20fill-rule%3D%22evenodd%22%20d%3D%22M15.701%2018.036a10.296%2010.296%200%200%200-1.2-.37c.482-.862.583-2.138.128-2.945-.639-1.133-1.44-1.736-3.304-1.736-1.024%200-3.783.346-3.832%202.648-.005.242%200%20.464.017.667l5.036.037a17.264%2017.264%200%200%201-1.871%202.483c.669.172%201.221.316%201.728.448.48.125.92.24%201.38.357a21.003%2021.003%200%200%200%201.918-1.59Z%22%20clip-rule%3D%22evenodd%22%2F%3E%3Cpath%20fill%3D%22url(%23e)%22%20d%3D%22M6.848%2016.063c.206%201.75%201.2%202.435%203.232%202.638%202.032.203%203.197.067%204.749.208%201.296.118%202.453.778%202.882.55.386-.205.17-.947-.347-1.423-.67-.617-1.597-1.046-3.229-1.199.325-.89.234-2.138-.27-2.817-.731-.982-2.079-1.426-3.785-1.232-1.782.202-3.49%201.08-3.232%203.275Z%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22b%22%20x1%3D%2210.464%22%20x2%3D%2222.394%22%20y1%3D%2213.737%22%20y2%3D%2217.12%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23fff%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23fff%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22c%22%20x1%3D%2220.386%22%20x2%3D%2211.779%22%20y1%3D%2213.509%22%20y2%3D%224.879%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%237258DC%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23797DEA%22%20stop-opacity%3D%220%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22d%22%20x1%3D%2215.94%22%20x2%3D%227.673%22%20y1%3D%2218.337%22%20y2%3D%2213.584%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%237461EA%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23BFC2FF%22%20stop-opacity%3D%220%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22e%22%20x1%3D%2211.177%22%20x2%3D%2216.765%22%20y1%3D%2213.648%22%20y2%3D%2220.749%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23fff%22%2F%3E%3Cstop%20offset%3D%22.984%22%20stop-color%3D%22%23D5CEFF%22%2F%3E%3C%2FlinearGradient%3E%3CclipPath%20id%3D%22a%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M0%200h28v28H0z%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E";
85
+ readonly mobileLink: "rabby://wc?uri=";
68
86
  readonly downloadUrl: "https://rabby.io";
69
87
  }, {
70
88
  readonly id: "okx";
@@ -1 +1 @@
1
- {"version":3,"file":"walletGuide.d.ts","sourceRoot":"","sources":["../../../src/auth/walletGuide.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;CAAE,EACxE,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAQT;AAED,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8EqC,CAAA;AAEhD,8EAA8E;AAC9E,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAA;AAInD,eAAO,MAAM,YAAY,EAAE,SAAS,gBAAgB,EAAU,CAAA"}
1
+ {"version":3,"file":"walletGuide.d.ts","sourceRoot":"","sources":["../../../src/auth/walletGuide.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE;IACT,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;CAC9C,EACD,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAST;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE;IACT,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;CAC9C,EACD,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAQT;AAED,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+EqC,CAAA;AAEhD,8EAA8E;AAC9E,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAA;AAInD,eAAO,MAAM,YAAY,EAAE,SAAS,gBAAgB,EAAU,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../src/connector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAEV,4BAA4B,EAC7B,MAAM,uBAAuB,CAAA;AAgB9B;2CAC2C;AAC3C,MAAM,MAAM,yBAAyB,GAAG,4BAA4B,CAAA;AAuCpE,wBAAgB,aAAa,CAC3B,MAAM,EAAE,yBAAyB,GAChC,iBAAiB,CAsGnB"}
1
+ {"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../src/connector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAEV,4BAA4B,EAC7B,MAAM,uBAAuB,CAAA;AAgB9B;2CAC2C;AAC3C,MAAM,MAAM,yBAAyB,GAAG,4BAA4B,CAAA;AAuCpE,wBAAgB,aAAa,CAC3B,MAAM,EAAE,yBAAyB,GAChC,iBAAiB,CA+GnB"}
@@ -4,6 +4,8 @@
4
4
  */
5
5
  export { ConnectWallet } from './auth';
6
6
  export { useAuth } from './auth/hooks/useAuth';
7
+ export type { WalletInfo, WalletSource, } from './auth/hooks/useWalletInfo.js';
8
+ export { useWalletInfo } from './auth/hooks/useWalletInfo.js';
7
9
  export { SignUp } from './auth/pages/SignUp';
8
10
  export type { AuthMethod, AuthStep, EmailAuthMethod } from './auth/types';
9
11
  export type { WalletId } from './auth/walletGuide';
@@ -11,4 +13,5 @@ export type { ZeroDevKitConnectorParams, } from './connector.js';
11
13
  export { zeroDevWallet } from './connector.js';
12
14
  export { TxHistory, type TxHistoryProps, type TxHistoryStep, } from './history/pages';
13
15
  export type { TxHistoryEntry } from './history/types';
16
+ export { zeroDevWalletConnect } from './zeroDevWalletConnect.js';
14
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACzE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAGlD,YAAY,EAEV,yBAAyB,GAC1B,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAG9C,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,iBAAiB,CAAA;AACxB,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE9C,YAAY,EACV,UAAU,EACV,YAAY,GACb,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACzE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAElD,YAAY,EAEV,yBAAyB,GAC1B,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE9C,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,iBAAiB,CAAA;AACxB,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA"}
@@ -0,0 +1,13 @@
1
+ import type { CreateConnectorFn } from 'wagmi';
2
+ import { type WalletConnectParameters } from 'wagmi/connectors';
3
+ /**
4
+ * WalletConnect connector preconfigured for the kit. `showQrModal: false` is
5
+ * required — the kit renders its own pairing UI, and WalletConnect's bundled
6
+ * Reown modal would pop over it otherwise. All other WalletConnect
7
+ * parameters (e.g. `metadata`) are forwarded as-is.
8
+ *
9
+ * The kit only pairs through connectors created here — a raw `walletConnect()`
10
+ * in the config is ignored, since its `showQrModal` can't be read back.
11
+ */
12
+ export declare function zeroDevWalletConnect(params: Omit<WalletConnectParameters, 'showQrModal'>): CreateConnectorFn;
13
+ //# sourceMappingURL=zeroDevWalletConnect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zeroDevWalletConnect.d.ts","sourceRoot":"","sources":["../../src/zeroDevWalletConnect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,EAAE,KAAK,uBAAuB,EAAiB,MAAM,kBAAkB,CAAA;AAgE9E;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,IAAI,CAAC,uBAAuB,EAAE,aAAa,CAAC,GACnD,iBAAiB,CAkBnB"}