@coinbase/cdp-react 0.0.78 → 0.0.80

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 (164) hide show
  1. package/README.md +5 -0
  2. package/dist/assets/Badge.css +1 -0
  3. package/dist/assets/Banner.css +1 -1
  4. package/dist/assets/CDPReactProvider.css +1 -0
  5. package/dist/assets/CoinbaseFooter.css +1 -1
  6. package/dist/assets/CopyTextField.css +1 -0
  7. package/dist/assets/EnrollMfa.css +1 -0
  8. package/dist/assets/EnrollMfaDescription.css +1 -0
  9. package/dist/assets/EnrollMfaFlow.css +1 -0
  10. package/dist/assets/EnrollMfaFlowBackButton.css +1 -0
  11. package/dist/assets/EnrollMfaItems.css +1 -0
  12. package/dist/assets/EnrollMfaModal.css +1 -0
  13. package/dist/assets/EnrollMfaTitle.css +1 -0
  14. package/dist/assets/ExportWallet.css +1 -1
  15. package/dist/assets/OTPForm.css +1 -1
  16. package/dist/assets/QRCode.css +1 -0
  17. package/dist/assets/ToggleListItem.css +1 -0
  18. package/dist/assets/VerifyMfaDescription.css +1 -0
  19. package/dist/assets/VerifyMfaFlow.css +1 -0
  20. package/dist/assets/VerifyMfaImage.css +1 -0
  21. package/dist/assets/VerifyMfaInline.css +1 -0
  22. package/dist/assets/VerifyMfaTitle.css +1 -0
  23. package/dist/assets/totp.css +1 -0
  24. package/dist/chunks/CDPReactProvider.CIQm4C4z.js +299 -0
  25. package/dist/chunks/{LinkAuthFlow.3HN888DV.js → LinkAuthFlow.BaUSMzGH.js} +1 -1
  26. package/dist/chunks/index.CKQKBoX2.js +9 -0
  27. package/dist/chunks/{index.Bvudzh_y.js → index.C_DV0Ud7.js} +1 -1
  28. package/dist/chunks/index.Dp-lIxM1.js +9 -0
  29. package/dist/components/CDPReactProvider/index.d.ts +4 -1
  30. package/dist/components/CDPReactProvider/index.js +11 -79
  31. package/dist/components/CopyAddress/index.js +24 -60
  32. package/dist/components/EnrollMfa/EnrollMfaDescription.d.ts +6 -0
  33. package/dist/components/EnrollMfa/EnrollMfaDescription.js +21 -0
  34. package/dist/components/EnrollMfa/EnrollMfaFlow.d.ts +12 -0
  35. package/dist/components/EnrollMfa/EnrollMfaFlow.js +46 -0
  36. package/dist/components/EnrollMfa/EnrollMfaFlowBackButton.d.ts +9 -0
  37. package/dist/components/EnrollMfa/EnrollMfaFlowBackButton.js +39 -0
  38. package/dist/components/EnrollMfa/EnrollMfaFlowProvider.d.ts +21 -0
  39. package/dist/components/EnrollMfa/EnrollMfaFlowProvider.js +34 -0
  40. package/dist/components/EnrollMfa/EnrollMfaFooter.d.ts +2 -0
  41. package/dist/components/EnrollMfa/EnrollMfaFooter.js +7 -0
  42. package/dist/components/EnrollMfa/EnrollMfaImage.d.ts +6 -0
  43. package/dist/components/EnrollMfa/EnrollMfaImage.js +19 -0
  44. package/dist/components/EnrollMfa/EnrollMfaItem.d.ts +11 -0
  45. package/dist/components/EnrollMfa/EnrollMfaItem.js +21 -0
  46. package/dist/components/EnrollMfa/EnrollMfaItems.d.ts +9 -0
  47. package/dist/components/EnrollMfa/EnrollMfaItems.js +39 -0
  48. package/dist/components/EnrollMfa/EnrollMfaProvider.d.ts +14 -0
  49. package/dist/components/EnrollMfa/EnrollMfaProvider.js +24 -0
  50. package/dist/components/EnrollMfa/EnrollMfaTitle.d.ts +6 -0
  51. package/dist/components/EnrollMfa/EnrollMfaTitle.js +21 -0
  52. package/dist/components/EnrollMfa/index.d.ts +20 -0
  53. package/dist/components/EnrollMfa/index.js +171 -0
  54. package/dist/components/EnrollMfa/methods/totp.d.ts +6 -0
  55. package/dist/components/EnrollMfa/methods/totp.js +120 -0
  56. package/dist/components/EnrollMfa/types.d.ts +83 -0
  57. package/dist/components/EnrollMfa/types.js +2 -0
  58. package/dist/components/EnrollMfa/useEnrollMfaReducer.d.ts +3 -0
  59. package/dist/components/EnrollMfa/useEnrollMfaReducer.js +111 -0
  60. package/dist/components/EnrollMfaModal/index.d.ts +20 -0
  61. package/dist/components/EnrollMfaModal/index.js +144 -0
  62. package/dist/components/ExportWallet/index.d.ts +2 -1
  63. package/dist/components/ExportWallet/index.js +225 -165
  64. package/dist/components/ExportWalletModal/index.d.ts +7 -4
  65. package/dist/components/ExportWalletModal/index.js +9 -7
  66. package/dist/components/Fund/index.js +5 -5
  67. package/dist/components/FundModal/index.js +14 -14
  68. package/dist/components/LinkAuth/LinkAuthFlow.js +2 -2
  69. package/dist/components/LinkAuth/LinkAuthFlowBackButton.js +2 -2
  70. package/dist/components/LinkAuth/LinkAuthFlowProvider.js +2 -2
  71. package/dist/components/LinkAuth/LinkAuthItem.js +26 -45
  72. package/dist/components/LinkAuth/LinkAuthItems.js +1 -1
  73. package/dist/components/LinkAuth/LinkAuthProvider.js +1 -1
  74. package/dist/components/LinkAuth/index.js +3 -3
  75. package/dist/components/LinkAuth/types.js +1 -1
  76. package/dist/components/LinkAuth/utils.js +1 -1
  77. package/dist/components/LinkAuthModal/index.js +2 -2
  78. package/dist/components/OAuthStatusModal/index.js +1 -1
  79. package/dist/components/SignIn/SignInAuthMethodButtons.js +1 -1
  80. package/dist/components/SignIn/SignInBackButton.js +1 -1
  81. package/dist/components/SignIn/SignInDescription.js +2 -2
  82. package/dist/components/SignIn/SignInForm.js +2 -2
  83. package/dist/components/SignIn/SignInImage.js +5 -5
  84. package/dist/components/SignIn/SignInProvider.js +1 -1
  85. package/dist/components/SignIn/SignInTitle.js +2 -2
  86. package/dist/components/SignIn/flows/SignInWithEmail.js +1 -1
  87. package/dist/components/SignIn/flows/SignInWithOAuth.js +1 -1
  88. package/dist/components/SignIn/flows/SignInWithSms.js +1 -1
  89. package/dist/components/SignIn/index.js +4 -4
  90. package/dist/components/SignIn/types.js +1 -1
  91. package/dist/components/SignIn/useSignInReducer.js +1 -1
  92. package/dist/components/SignInModal/index.js +13 -13
  93. package/dist/components/ThemeProvider/index.d.ts +4 -6
  94. package/dist/components/ThemeProvider/index.js +32 -21
  95. package/dist/components/VerifyMfa/VerifyMfaDescription.d.ts +6 -0
  96. package/dist/components/VerifyMfa/VerifyMfaDescription.js +21 -0
  97. package/dist/components/VerifyMfa/VerifyMfaFlow.d.ts +11 -0
  98. package/dist/components/VerifyMfa/VerifyMfaFlow.js +19 -0
  99. package/dist/components/VerifyMfa/VerifyMfaFooter.d.ts +2 -0
  100. package/dist/components/VerifyMfa/VerifyMfaFooter.js +7 -0
  101. package/dist/components/VerifyMfa/VerifyMfaImage.d.ts +6 -0
  102. package/dist/components/VerifyMfa/VerifyMfaImage.js +21 -0
  103. package/dist/components/VerifyMfa/VerifyMfaProvider.d.ts +15 -0
  104. package/dist/components/VerifyMfa/VerifyMfaProvider.js +28 -0
  105. package/dist/components/VerifyMfa/VerifyMfaTitle.d.ts +6 -0
  106. package/dist/components/VerifyMfa/VerifyMfaTitle.js +21 -0
  107. package/dist/components/VerifyMfa/index.d.ts +16 -0
  108. package/dist/components/VerifyMfa/index.js +20 -0
  109. package/dist/components/VerifyMfa/methods/totp.d.ts +6 -0
  110. package/dist/components/VerifyMfa/methods/totp.js +69 -0
  111. package/dist/components/VerifyMfa/types.d.ts +60 -0
  112. package/dist/components/VerifyMfa/types.js +2 -0
  113. package/dist/components/VerifyMfa/useVerifyMfaReducer.d.ts +2 -0
  114. package/dist/components/VerifyMfa/useVerifyMfaReducer.js +61 -0
  115. package/dist/components/VerifyMfaInline/index.d.ts +40 -0
  116. package/dist/components/VerifyMfaInline/index.js +175 -0
  117. package/dist/components/VerifyMfaModal/index.d.ts +23 -0
  118. package/dist/components/VerifyMfaModal/index.js +19 -0
  119. package/dist/components/forms/AmountInput/index.d.ts +1 -1
  120. package/dist/components/forms/ExchangeAmountInput/index.d.ts +1 -1
  121. package/dist/components/forms/OTPForm/index.d.ts +2 -2
  122. package/dist/components/forms/OTPForm/index.js +81 -64
  123. package/dist/components/ui/Badge/index.d.ts +7 -0
  124. package/dist/components/ui/Badge/index.js +9 -0
  125. package/dist/components/ui/CopyTextField/index.d.ts +10 -0
  126. package/dist/components/ui/CopyTextField/index.js +81 -0
  127. package/dist/components/ui/Modal/index.js +4 -4
  128. package/dist/components/ui/QRCode/QRCodeSvg.d.ts +17 -0
  129. package/dist/components/ui/QRCode/QRCodeSvg.js +57 -0
  130. package/dist/components/ui/QRCode/index.d.ts +5 -0
  131. package/dist/components/ui/QRCode/index.js +31 -0
  132. package/dist/components/ui/QRCode/useCorners.d.ts +1 -0
  133. package/dist/components/ui/QRCode/useCorners.js +72 -0
  134. package/dist/components/ui/QRCode/useDotsPath.d.ts +11 -0
  135. package/dist/components/ui/QRCode/useDotsPath.js +66 -0
  136. package/dist/components/ui/QRCode/useLogo.d.ts +12 -0
  137. package/dist/components/ui/QRCode/useLogo.js +52 -0
  138. package/dist/components/ui/QRCode/useMatrix.d.ts +1 -0
  139. package/dist/components/ui/QRCode/useMatrix.js +17 -0
  140. package/dist/components/ui/ToggleListItem/index.d.ts +15 -0
  141. package/dist/components/ui/ToggleListItem/index.js +52 -0
  142. package/dist/hooks/useKeyExportPostMessage.js +67 -55
  143. package/dist/hooks/useVerifyMfaModal.d.ts +22 -0
  144. package/dist/hooks/useVerifyMfaModal.js +10 -0
  145. package/dist/icons/IconCoinbaseWordmark.js +10 -13
  146. package/dist/icons/IconPinCode.d.ts +2 -0
  147. package/dist/icons/IconPinCode.js +13 -0
  148. package/dist/icons/IconShield.d.ts +2 -0
  149. package/dist/icons/IconShield.js +7 -0
  150. package/dist/icons/IconSmartPhone.d.ts +2 -0
  151. package/dist/icons/IconSmartPhone.js +7 -0
  152. package/dist/icons/index.d.ts +5 -2
  153. package/dist/icons/index.js +22 -16
  154. package/dist/index.d.ts +6 -0
  155. package/dist/index.js +220 -165
  156. package/dist/theme/theme.d.ts +104 -0
  157. package/dist/theme/tokens.d.ts +312 -0
  158. package/dist/theme/tokens.js +70 -0
  159. package/dist/utils/transition.d.ts +2 -2
  160. package/dist/version.d.ts +1 -1
  161. package/dist/version.js +1 -1
  162. package/package.json +9 -7
  163. package/dist/assets/CopyAddress.css +0 -1
  164. package/dist/assets/LinkAuthItem.css +0 -1
@@ -0,0 +1,17 @@
1
+ import p from "qrcode";
2
+ import { useMemo as s } from "react";
3
+ function h(r, e) {
4
+ return s(() => {
5
+ const u = Array.prototype.slice.call(
6
+ p.create(r, { errorCorrectionLevel: e }).modules.data,
7
+ 0
8
+ ), n = Math.sqrt(u.length);
9
+ return u.reduce(
10
+ (t, a, o) => (o % n === 0 ? t.push([a]) : t[t.length - 1].push(a)) && t,
11
+ []
12
+ );
13
+ }, [e, r]);
14
+ }
15
+ export {
16
+ h as useMatrix
17
+ };
@@ -0,0 +1,15 @@
1
+ import { MouseEventHandler, ReactNode } from 'react';
2
+ interface ToggleListItemProps {
3
+ icon?: ReactNode;
4
+ label: ReactNode;
5
+ isActive?: boolean;
6
+ isPending?: boolean;
7
+ isDisabled?: boolean;
8
+ onActivate?: MouseEventHandler<HTMLButtonElement>;
9
+ onDeactivate?: MouseEventHandler<HTMLButtonElement>;
10
+ activateAriaLabel?: string;
11
+ deactivateAriaLabel?: string;
12
+ size?: "md" | "sm";
13
+ }
14
+ export declare const ToggleListItem: ({ icon, label, isActive, isPending, isDisabled, onActivate, onDeactivate, activateAriaLabel, deactivateAriaLabel, size, }: ToggleListItemProps) => import("react/jsx-runtime").JSX.Element;
15
+ export type { ToggleListItemProps };
@@ -0,0 +1,52 @@
1
+ import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Button as s } from "../Button/index.js";
4
+ import { IconMinus as g } from "../../../icons/IconMinus.js";
5
+ import { IconPlus as f } from "../../../icons/IconPlus.js";
6
+ import '../../../assets/ToggleListItem.css';const h = "ToggleListItem-module__item___MoMVD", v = "ToggleListItem-module__button___MEFkz", e = {
7
+ item: h,
8
+ "item-icon": "ToggleListItem-module__item-icon___-fk9h",
9
+ "item-text": "ToggleListItem-module__item-text___nFMfG",
10
+ "item-action": "ToggleListItem-module__item-action___G48jL",
11
+ button: v
12
+ }, N = ({
13
+ icon: o,
14
+ label: i,
15
+ isActive: l = !1,
16
+ isPending: m = !1,
17
+ isDisabled: a = !1,
18
+ onActivate: n,
19
+ onDeactivate: r,
20
+ activateAriaLabel: c,
21
+ deactivateAriaLabel: _,
22
+ size: d = "md"
23
+ }) => /* @__PURE__ */ u("div", { className: e.item, "data-size": d, children: [
24
+ o && /* @__PURE__ */ t("div", { className: e["item-icon"], children: o }),
25
+ /* @__PURE__ */ t("div", { className: e["item-text"], children: i }),
26
+ /* @__PURE__ */ t("div", { className: e["item-action"], children: l ? /* @__PURE__ */ t(
27
+ s,
28
+ {
29
+ variant: "secondary",
30
+ className: e.button,
31
+ isPending: m,
32
+ disabled: a,
33
+ onClick: r,
34
+ "aria-label": _ ?? `Deactivate ${i}`,
35
+ children: /* @__PURE__ */ t(g, { "aria-hidden": "true" })
36
+ }
37
+ ) : /* @__PURE__ */ t(
38
+ s,
39
+ {
40
+ variant: "primary",
41
+ className: e.button,
42
+ isPending: m,
43
+ disabled: a,
44
+ onClick: n,
45
+ "aria-label": c ?? `Activate ${i}`,
46
+ children: /* @__PURE__ */ t(f, { "aria-hidden": "true" })
47
+ }
48
+ ) })
49
+ ] });
50
+ export {
51
+ N as ToggleListItem
52
+ };
@@ -1,82 +1,94 @@
1
- import { buildKeyExportIframeUrl as K, getAccessToken as P, getAccessTokenExpiration as L, SECURE_IFRAME_KEY_EXPORT_EVENT_TYPE as n, isSecureIframeKeyExportMessage as C } from "@coinbase/cdp-core";
2
- import { useCurrentUser as N } from "@coinbase/cdp-hooks";
3
- import { useState as w, useRef as Y, useMemo as F, useCallback as A, useEffect as _ } from "react";
1
+ import { buildKeyExportIframeUrl as P, getAccessTokenExpiration as q, SECURE_IFRAME_KEY_EXPORT_EVENT_TYPE as c, getAccessToken as L, isSecureIframeKeyExportMessage as h } from "@coinbase/cdp-core";
2
+ import { useCurrentUser as C } from "@coinbase/cdp-hooks";
3
+ import { useState as w, useRef as N, useMemo as Y, useCallback as A, useEffect as _ } from "react";
4
4
  import "libphonenumber-js";
5
- import { sendIframeMessage as x } from "../utils/sendIframeMessage.js";
6
- const k = "https://secure-wallet.cdp.coinbase.com", G = (o, s) => {
7
- x(o, s);
5
+ import { sendIframeMessage as I } from "../utils/sendIframeMessage.js";
6
+ const x = "https://secure-wallet.cdp.coinbase.com";
7
+ let i = null;
8
+ const v = async () => (i || (i = L({ forceRefresh: !0 }).finally(() => {
9
+ i = null;
10
+ })), i), F = (o, t) => {
11
+ I(o, t);
8
12
  }, O = ({
9
13
  address: o,
10
- basePath: s = k,
11
- copiedLabel: E,
12
- icon: d,
13
- iframeRef: t,
14
+ basePath: t = x,
15
+ copiedLabel: l,
16
+ icon: y,
17
+ iframeRef: s,
14
18
  label: p,
15
- onStatusUpdate: g,
16
- projectId: y,
17
- theme: a,
19
+ onStatusUpdate: a,
20
+ projectId: d,
21
+ theme: n,
18
22
  type: T
19
23
  }) => {
20
- const { currentUser: c } = N(), [I, M] = w(!0), [i, R] = w(!1), l = Y(!1), S = F(() => K({
21
- projectId: y,
24
+ const { currentUser: u } = C(), [M, R] = w(!0), [E, K] = w(!1), f = N(!1), S = Y(() => P({
25
+ projectId: d,
22
26
  label: p,
23
- copiedLabel: E,
24
- icon: d,
25
- basePath: s
26
- }), [y, p, E, d, s]), f = A(async () => {
27
- if (!c || !t.current) return;
28
- const r = await P({ forceRefresh: !0 }), e = await L();
29
- G(t.current, {
30
- type: n.GET_PRIVATE_KEY,
31
- payload: {
32
- address: o,
33
- type: T,
34
- authState: {
35
- accessToken: r || "",
36
- expiresAt: e || 0,
37
- user: c
38
- },
39
- theme: a
27
+ copiedLabel: l,
28
+ icon: y,
29
+ basePath: t
30
+ }), [d, p, l, y, t]), k = A(async () => {
31
+ if (!(!u || !s.current))
32
+ try {
33
+ const e = await v(), r = await q();
34
+ F(s.current, {
35
+ type: c.GET_PRIVATE_KEY,
36
+ payload: {
37
+ address: o,
38
+ type: T,
39
+ authState: {
40
+ accessToken: e || "",
41
+ expiresAt: r || 0,
42
+ user: u
43
+ },
44
+ theme: n
45
+ }
46
+ });
47
+ } catch (e) {
48
+ console.error("Error requesting private key:", e), a?.(
49
+ "error",
50
+ e instanceof Error ? "Error requesting private key: " + e.message : "Error requesting private key"
51
+ );
40
52
  }
41
- });
42
- }, [c, o, T, a, t]), m = A(
43
- (r, e) => {
44
- g?.(r, e), M(!1);
53
+ }, [u, o, T, n, s, a]), m = A(
54
+ (e, r) => {
55
+ a?.(e, r), R(!1);
45
56
  },
46
- [g]
57
+ [a]
47
58
  );
48
59
  return _(() => {
49
- const r = l.current;
50
- l.current = i, r && i && a && x(t.current, {
51
- type: n.THEME,
60
+ const e = f.current;
61
+ f.current = E, e && E && n && I(s.current, {
62
+ type: c.THEME,
52
63
  payload: {
53
- theme: a
64
+ theme: n
54
65
  }
55
66
  });
56
- }, [a, i, t]), _(() => {
57
- const r = (e) => {
58
- let u = "";
67
+ }, [n, E, s]), _(() => {
68
+ const e = (r) => {
69
+ if (r.source !== s.current?.contentWindow) return;
70
+ let g = "";
59
71
  try {
60
- u = new URL(s || k).origin;
72
+ g = new URL(t || x).origin;
61
73
  } catch (U) {
62
74
  console.error("Error parsing iframe origin", U);
63
75
  }
64
- if (!(!u || e.origin !== u) && C(e.data))
65
- switch (e.data?.type) {
66
- case n.LISTENING:
67
- R(!0), f();
76
+ if (!(!g || r.origin !== g) && h(r.data))
77
+ switch (r.data?.type) {
78
+ case c.LISTENING:
79
+ K(!0), k();
68
80
  break;
69
- case n.STATUS:
70
- m(e.data.payload.status, e.data.payload.message);
81
+ case c.STATUS:
82
+ m(r.data.payload.status, r.data.payload.message);
71
83
  break;
72
84
  }
73
85
  };
74
- return window.addEventListener("message", r), () => {
75
- window.removeEventListener("message", r);
86
+ return window.addEventListener("message", e), () => {
87
+ window.removeEventListener("message", e);
76
88
  };
77
- }, [f, m, s]), { iframeUrl: S, isPending: I };
89
+ }, [k, m, t, s]), { iframeUrl: S, isPending: M };
78
90
  };
79
91
  export {
80
- G as sendKeyExportMessage,
92
+ F as sendKeyExportMessage,
81
93
  O as useKeyExportPostMessage
82
94
  };
@@ -0,0 +1,22 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ import { VerifyMfaModalProps } from '../components/VerifyMfaModal';
3
+ export interface UseVerifyMfaModalOptions extends Pick<VerifyMfaModalProps, "onCancel" | "onError" | "onSuccess"> {
4
+ closeOnSuccessDelay?: number | null;
5
+ }
6
+ export interface UseVerifyMfaModalReturn {
7
+ open: () => boolean;
8
+ close: () => void;
9
+ }
10
+ interface VerifyMfaModalContextValue {
11
+ register: (id: string, optionsRef: RefObject<UseVerifyMfaModalOptions>) => void;
12
+ unregister: (id: string) => void;
13
+ open: (id: string) => boolean;
14
+ close: () => void;
15
+ }
16
+ interface MfaVerificationProviderProps {
17
+ children: ReactNode;
18
+ }
19
+ export declare const VerifyMfaModalProvider: ({ children }: MfaVerificationProviderProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const useVerifyMfaModal: (options?: UseVerifyMfaModalOptions) => UseVerifyMfaModalReturn;
21
+ export declare const useMfaVerification: () => VerifyMfaModalContextValue;
22
+ export {};
@@ -0,0 +1,10 @@
1
+ import "react/jsx-runtime";
2
+ import "@coinbase/cdp-core";
3
+ import "../chunks/useSendComponentCallOnce.BHZMuo6E.js";
4
+ import { g as t, h as m, b as p } from "../chunks/CDPReactProvider.CIQm4C4z.js";
5
+ import "react";
6
+ export {
7
+ t as VerifyMfaModalProvider,
8
+ m as useMfaVerification,
9
+ p as useVerifyMfaModal
10
+ };
@@ -1,16 +1,13 @@
1
- import { jsxs as r, jsx as C } from "react/jsx-runtime";
1
+ import { jsx as C } from "react/jsx-runtime";
2
2
  import "react";
3
- import { SvgIcon as H } from "./SvgIcon.js";
4
- const o = (i) => /* @__PURE__ */ r(H, { width: "67", height: "13", viewBox: "0 0 67 13", fill: "none", ...i, children: [
5
- /* @__PURE__ */ C("g", { clipPath: "url(#clip0_7507_87)", children: /* @__PURE__ */ C(
6
- "path",
7
- {
8
- d: "M13.5224 3.8526C11.0884 3.8526 9.18662 5.70351 9.18662 8.18134C9.18662 10.6592 11.0404 12.4942 13.5224 12.4942C16.0044 12.4942 17.8903 10.6275 17.8903 8.1655C17.8903 5.71935 16.0366 3.8526 13.5224 3.8526ZM13.5388 10.7085C12.1527 10.7085 11.1371 9.63014 11.1371 8.18195C11.1371 6.71731 12.1363 5.63954 13.5224 5.63954C14.9248 5.63954 15.9399 6.73376 15.9399 8.18195C15.9399 9.63014 14.9248 10.7085 13.5388 10.7085ZM18.4219 5.7358H19.631V12.334H21.565V4.01344H18.4219V5.7358ZM4.31932 5.63893C5.33499 5.63893 6.14083 6.26646 6.44675 7.19983H8.4939C8.12291 5.20453 6.47899 3.8526 4.33574 3.8526C1.90179 3.8526 0 5.70351 0 8.18195C0 10.6604 1.85375 12.4948 4.33574 12.4948C6.43094 12.4948 8.10709 11.1429 8.47809 9.13116H6.44675C6.15665 10.0645 5.3508 10.7085 4.33514 10.7085C2.93266 10.7085 1.94984 9.63014 1.94984 8.18195C1.95045 6.71731 2.91746 5.63893 4.31932 5.63893ZM55.1696 7.37713L53.7513 7.16815C53.0744 7.07189 52.5909 6.84647 52.5909 6.3152C52.5909 5.7358 53.2198 5.44641 54.0736 5.44641C55.0084 5.44641 55.6051 5.84851 55.734 6.50833H57.6035C57.3937 4.83472 56.1044 3.85321 54.1223 3.85321C52.0752 3.85321 50.7213 4.8993 50.7213 6.37978C50.7213 7.79568 51.6081 8.61695 53.3967 8.87406L54.815 9.08303C55.5084 9.17929 55.8952 9.45346 55.8952 9.96828C55.8952 10.6281 55.2182 10.9016 54.2835 10.9016C53.1389 10.9016 52.4942 10.435 52.3975 9.72701H50.4957C50.6733 11.3525 51.9462 12.4948 54.2671 12.4948C56.3787 12.4948 57.7805 11.5292 57.7805 9.8714C57.7805 8.39092 56.7655 7.61839 55.1696 7.37713ZM20.598 0.585792C19.8888 0.585792 19.3567 1.10061 19.3567 1.80856C19.3567 2.51651 19.8882 3.03133 20.598 3.03133C21.3071 3.03133 21.8393 2.51651 21.8393 1.80856C21.8393 1.10061 21.3071 0.585792 20.598 0.585792ZM48.9807 6.86231C48.9807 5.06014 47.8848 3.85321 45.5639 3.85321C43.372 3.85321 42.1472 4.96388 41.9051 6.66978H43.8233C43.92 6.00996 44.4358 5.46286 45.5317 5.46286C46.5151 5.46286 46.9986 5.89725 46.9986 6.42852C46.9986 7.12063 46.1119 7.29731 45.016 7.41003C43.5332 7.57087 41.6959 8.08569 41.6959 10.017C41.6959 11.5139 42.8083 12.479 44.5811 12.479C45.9672 12.479 46.8375 11.8996 47.2729 10.9821C47.3374 11.8027 47.9498 12.334 48.8043 12.334H49.9325V10.6123H48.9813V6.86231H48.9807ZM47.0789 8.95448C47.0789 10.0651 46.1119 10.8858 44.9351 10.8858C44.2095 10.8858 43.5971 10.58 43.5971 9.93659C43.5971 9.11593 44.5805 8.89051 45.483 8.79425C46.3534 8.71383 46.8369 8.52069 47.0789 8.15027V8.95448ZM36.8122 3.8526C35.732 3.8526 34.8295 4.30345 34.1848 5.05953V0.505371H32.2508V12.334H34.1526V11.2398C34.7973 12.0282 35.7162 12.4948 36.8122 12.4948C39.133 12.4948 40.89 10.6604 40.89 8.18195C40.89 5.70351 39.1008 3.8526 36.8122 3.8526ZM36.5221 10.7085C35.136 10.7085 34.1203 9.63014 34.1203 8.18195C34.1203 6.73376 35.1518 5.63954 36.5379 5.63954C37.9403 5.63954 38.9232 6.71792 38.9232 8.18195C38.9232 9.63014 37.9081 10.7085 36.5221 10.7085ZM27.6249 3.8526C26.3678 3.8526 25.5456 4.36742 25.062 5.09182V4.01344H23.1438V12.3334H25.0779V7.81152C25.0779 6.54001 25.8837 5.63893 27.0764 5.63893C28.1887 5.63893 28.8814 6.4273 28.8814 7.57026V12.334H30.8155V7.42587C30.8161 5.33308 29.7366 3.8526 27.6249 3.8526ZM67 7.90839C67 5.52683 65.2594 3.85321 62.9221 3.85321C60.4401 3.85321 58.6186 5.71996 58.6186 8.18195C58.6186 10.7731 60.5691 12.4948 62.9544 12.4948C64.9693 12.4948 66.5487 11.3038 66.9513 9.6143H64.9364C64.6463 10.3545 63.9372 10.7731 62.986 10.7731C61.7447 10.7731 60.8099 10.0006 60.6007 8.64863H66.9994V7.90839H67ZM60.7138 7.26441C61.0203 6.10562 61.8906 5.54267 62.8899 5.54267C63.9858 5.54267 64.8239 6.1702 65.0173 7.26441H60.7138Z",
9
- fill: "currentColor"
10
- }
11
- ) }),
12
- /* @__PURE__ */ C("defs", { children: /* @__PURE__ */ C("clipPath", { id: "clip0_7507_87", children: /* @__PURE__ */ C("rect", { width: "67", height: "11.9895", fill: "white", transform: "translate(0 0.505371)" }) }) })
13
- ] });
3
+ import { SvgIcon as o } from "./SvgIcon.js";
4
+ const Z = (H) => /* @__PURE__ */ C(o, { width: "65", height: "12", viewBox: "0 0 65 12", fill: "none", ...H, children: /* @__PURE__ */ C(
5
+ "path",
6
+ {
7
+ d: "M13.1187 3.24731C10.7574 3.24731 8.91239 5.04297 8.91239 7.44683C8.91239 9.8507 10.7108 11.631 13.1187 11.631C15.5266 11.631 17.3563 9.81996 17.3563 7.43147C17.3563 5.05834 15.5579 3.24731 13.1187 3.24731ZM13.1346 9.89857C11.79 9.89857 10.8046 8.85239 10.8046 7.44742C10.8046 6.0265 11.774 4.98091 13.1187 4.98091C14.4793 4.98091 15.4641 6.04246 15.4641 7.44742C15.4641 8.85239 14.4793 9.89857 13.1346 9.89857ZM17.872 5.0743H19.045V11.4755H20.9213V3.40336H17.872V5.0743ZM4.19039 4.98032C5.17574 4.98032 5.95753 5.58912 6.25431 6.49463H8.24035C7.88043 4.55889 6.28558 3.24731 4.20632 3.24731C1.84502 3.24731 0 5.04297 0 7.44742C0 9.85188 1.79841 11.6316 4.20632 11.6316C6.23897 11.6316 7.86509 10.32 8.22501 8.3683H6.25431C5.97287 9.27382 5.19108 9.89857 4.20573 9.89857C2.84512 9.89857 1.89163 8.85239 1.89163 7.44742C1.89222 6.0265 2.83037 4.98032 4.19039 4.98032ZM53.5227 6.66663L52.1468 6.46389C51.4901 6.3705 51.021 6.15181 51.021 5.6364C51.021 5.0743 51.6311 4.79354 52.4595 4.79354C53.3664 4.79354 53.9452 5.18364 54.0703 5.82377H55.884C55.6805 4.20011 54.4296 3.2479 52.5067 3.2479C50.5207 3.2479 49.2073 4.26276 49.2073 5.69905C49.2073 7.07269 50.0675 7.86945 51.8028 8.11888L53.1788 8.32161C53.8514 8.415 54.2266 8.68098 54.2266 9.18043C54.2266 9.82055 53.5699 10.0859 52.6631 10.0859C51.5526 10.0859 50.9272 9.63319 50.8334 8.94637H48.9884C49.1607 10.5233 50.3956 11.6316 52.6471 11.6316C54.6957 11.6316 56.0557 10.6947 56.0557 9.08645C56.0557 7.65016 55.071 6.90069 53.5227 6.66663ZM19.9831 0.0780206C19.2951 0.0780206 18.7789 0.577471 18.7789 1.26429C18.7789 1.95111 19.2945 2.45056 19.9831 2.45056C20.6711 2.45056 21.1874 1.95111 21.1874 1.26429C21.1874 0.577471 20.6711 0.0780206 19.9831 0.0780206ZM47.5186 6.16718C47.5186 4.41881 46.4554 3.2479 44.2038 3.2479C42.0774 3.2479 40.889 4.32542 40.6542 5.9804H42.5152C42.609 5.34028 43.1093 4.8095 44.1726 4.8095C45.1266 4.8095 45.5957 5.23093 45.5957 5.74634C45.5957 6.41779 44.7354 6.5892 43.6722 6.69855C42.2337 6.85459 40.4512 7.35404 40.4512 9.22771C40.4512 10.68 41.5304 11.6162 43.2503 11.6162C44.595 11.6162 45.4393 11.0541 45.8618 10.164C45.9243 10.9601 46.5185 11.4755 47.3475 11.4755H48.442V9.80519H47.5192V6.16718H47.5186ZM45.6736 8.19689C45.6736 9.27441 44.7354 10.0706 43.5937 10.0706C42.8898 10.0706 42.2957 9.77386 42.2957 9.14969C42.2957 8.35353 43.2497 8.13483 44.1253 8.04145C44.9697 7.96343 45.4388 7.77606 45.6736 7.41669V8.19689ZM35.7133 3.24731C34.6654 3.24731 33.7898 3.6847 33.1644 4.41821V0H31.2881V11.4755H33.1331V10.414C33.7585 11.1788 34.6501 11.6316 35.7133 11.6316C37.9649 11.6316 39.6694 9.85188 39.6694 7.44742C39.6694 5.04297 37.9336 3.24731 35.7133 3.24731ZM35.4319 9.89857C34.0872 9.89857 33.1018 8.85239 33.1018 7.44742C33.1018 6.04246 34.1025 4.98091 35.4472 4.98091C36.8078 4.98091 37.7613 6.02709 37.7613 7.44742C37.7613 8.85239 36.7765 9.89857 35.4319 9.89857ZM26.8003 3.24731C25.5807 3.24731 24.783 3.74676 24.3139 4.44954V3.40336H22.453V11.4749H24.3293V7.08806C24.3293 5.8545 25.1111 4.98032 26.2681 4.98032C27.3473 4.98032 28.0193 5.74516 28.0193 6.85399V11.4755H29.8956V6.71391C29.8962 4.6836 28.8489 3.24731 26.8003 3.24731ZM65 7.18204C65 4.87156 63.3113 3.2479 61.0438 3.2479C58.6359 3.2479 56.8688 5.05893 56.8688 7.44742C56.8688 9.96123 58.761 11.6316 61.0751 11.6316C63.0299 11.6316 64.5622 10.476 64.9528 8.83702H62.998C62.7166 9.55516 62.0286 9.96123 61.1058 9.96123C59.9016 9.96123 58.9947 9.21176 58.7917 7.90018H64.9994V7.18204H65ZM58.9015 6.55728C59.1988 5.43307 60.0432 4.88693 61.0126 4.88693C62.0758 4.88693 62.8889 5.49573 63.0765 6.55728H58.9015Z",
8
+ fill: "currentColor"
9
+ }
10
+ ) });
14
11
  export {
15
- o as IconCoinbaseWordmark
12
+ Z as IconCoinbaseWordmark
16
13
  };
@@ -0,0 +1,2 @@
1
+ import { SVGProps } from 'react';
2
+ export declare const IconPinCode: (props: Omit<SVGProps<SVGSVGElement>, "viewBox">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { jsxs as o, jsx as C } from "react/jsx-runtime";
2
+ import "react";
3
+ import { SvgIcon as r } from "./SvgIcon.js";
4
+ const i = (t) => /* @__PURE__ */ o(r, { width: "20", height: "20", viewBox: "0 0 16 16", fill: "currentColor", ...t, children: [
5
+ /* @__PURE__ */ C("path", { d: "M2.82585 7.66341C4.02246 7.66341 4.99251 6.69336 4.99251 5.49674C4.99251 4.30013 4.02246 3.33008 2.82585 3.33008C1.62923 3.33008 0.65918 4.30013 0.65918 5.49674C0.65918 6.69336 1.62923 7.66341 2.82585 7.66341ZM2.82585 6.33008C2.36561 6.33008 1.99251 5.95698 1.99251 5.49674C1.99251 5.03651 2.36561 4.66341 2.82585 4.66341C3.28608 4.66341 3.65918 5.03651 3.65918 5.49674C3.65918 5.95698 3.28608 6.33008 2.82585 6.33008Z" }),
6
+ /* @__PURE__ */ C("path", { d: "M13.1592 7.66341C14.3558 7.66341 15.3258 6.69336 15.3258 5.49674C15.3258 4.30013 14.3558 3.33008 13.1592 3.33008C11.9626 3.33008 10.9925 4.30013 10.9925 5.49674C10.9925 6.69336 11.9626 7.66341 13.1592 7.66341ZM13.1592 6.33008C12.6989 6.33008 12.3258 5.95698 12.3258 5.49674C12.3258 5.03651 12.6989 4.66341 13.1592 4.66341C13.6194 4.66341 13.9925 5.03651 13.9925 5.49674C13.9925 5.95698 13.6194 6.33008 13.1592 6.33008Z" }),
7
+ /* @__PURE__ */ C("path", { d: "M10.1592 5.49674C10.1592 6.69336 9.18913 7.66341 7.99251 7.66341C6.7959 7.66341 5.82585 6.69336 5.82585 5.49674C5.82585 4.30013 6.7959 3.33008 7.99251 3.33008C9.18913 3.33008 10.1592 4.30013 10.1592 5.49674ZM8.82585 5.49674C8.82585 5.03651 8.45275 4.66341 7.99251 4.66341C7.53228 4.66341 7.15918 5.03651 7.15918 5.49674C7.15918 5.95698 7.53228 6.33008 7.99251 6.33008C8.45275 6.33008 8.82585 5.95698 8.82585 5.49674Z" }),
8
+ /* @__PURE__ */ C("path", { d: "M10.6592 12.6634C9.46256 12.6634 8.49251 11.6934 8.49251 10.4967C8.49251 9.30013 9.46256 8.33008 10.6592 8.33008C11.8558 8.33008 12.8258 9.30013 12.8258 10.4967C12.8258 11.6934 11.8558 12.6634 10.6592 12.6634ZM10.6592 11.3301C11.1194 11.3301 11.4925 10.957 11.4925 10.4967C11.4925 10.0365 11.1194 9.66341 10.6592 9.66341C10.1989 9.66341 9.82585 10.0365 9.82585 10.4967C9.82585 10.957 10.1989 11.3301 10.6592 11.3301Z" }),
9
+ /* @__PURE__ */ C("path", { d: "M7.49251 10.4967C7.49251 11.6934 6.52246 12.6634 5.32585 12.6634C4.12923 12.6634 3.15918 11.6934 3.15918 10.4967C3.15918 9.30013 4.12923 8.33008 5.32585 8.33008C6.52246 8.33008 7.49251 9.30013 7.49251 10.4967ZM6.15918 10.4967C6.15918 10.0365 5.78608 9.66341 5.32585 9.66341C4.86561 9.66341 4.49251 10.0365 4.49251 10.4967C4.49251 10.957 4.86561 11.3301 5.32585 11.3301C5.78608 11.3301 6.15918 10.957 6.15918 10.4967Z" })
10
+ ] });
11
+ export {
12
+ i as IconPinCode
13
+ };
@@ -0,0 +1,2 @@
1
+ import { SVGProps } from 'react';
2
+ export declare const IconShield: (props: Omit<SVGProps<SVGSVGElement>, "viewBox">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import "react";
3
+ import { SvgIcon as t } from "./SvgIcon.js";
4
+ const h = (r) => /* @__PURE__ */ o(t, { width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", ...r, children: /* @__PURE__ */ o("path", { d: "M1.99997 3.99512L2.03005 11.9951C2.92005 20.0868 12.0001 22.9951 12.0001 22.9951C12.0001 22.9951 21.1101 20.2785 22.0001 12.1868V3.99512L12.0001 0.995117L1.99997 3.99512ZM10.9702 20.39C10.2594 20.0375 9.39941 19.5503 8.52813 18.9142C6.41552 17.3718 4.41951 15.0988 4.02962 11.8765L4.00557 5.4815L10.9702 3.39213V20.39ZM15.5109 18.9928C14.5994 19.6379 13.6998 20.1206 12.9702 20.4605V3.37422L20.0001 5.48318V12.0717C19.6103 15.2799 17.6195 17.5005 15.5109 18.9928Z" }) });
5
+ export {
6
+ h as IconShield
7
+ };
@@ -0,0 +1,2 @@
1
+ import { SVGProps } from 'react';
2
+ export declare const IconSmartPhone: (props: Omit<SVGProps<SVGSVGElement>, "viewBox">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import "react";
3
+ import { SvgIcon as t } from "./SvgIcon.js";
4
+ const e = (r) => /* @__PURE__ */ o(t, { width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", ...r, children: /* @__PURE__ */ o("path", { d: "M3.98877 0V24H19.9888V0H3.98877ZM17.9888 2V4H5.98877V2H17.9888ZM17.9888 6V18H5.98877V6H17.9888ZM5.98877 22V20H17.9888V22H5.98877Z" }) });
5
+ export {
6
+ e as IconSmartPhone
7
+ };
@@ -10,7 +10,10 @@ export * from './IconExclamationCircle';
10
10
  export * from './IconExclamationTriangle';
11
11
  export * from './IconGoogleLogo';
12
12
  export * from './IconLock';
13
- export * from './IconPhone';
14
- export * from './IconXMark';
15
13
  export * from './IconMinus';
14
+ export * from './IconPhone';
15
+ export * from './IconPinCode';
16
16
  export * from './IconPlus';
17
+ export * from './IconShield';
18
+ export * from './IconSmartPhone';
19
+ export * from './IconXMark';
@@ -3,32 +3,38 @@ import { IconArrowLeft as c } from "./IconArrowLeft.js";
3
3
  import { IconArrowsUpDown as t } from "./IconArrowsUpDown.js";
4
4
  import { IconCheck as x } from "./IconCheck.js";
5
5
  import { IconCheckCircle as I } from "./IconCheckCircle.js";
6
- import { IconChevronDown as a } from "./IconChevronDown.js";
6
+ import { IconChevronDown as i } from "./IconChevronDown.js";
7
7
  import { IconCopy as C } from "./IconCopy.js";
8
- import { IconEnvelope as h } from "./IconEnvelope.js";
8
+ import { IconEnvelope as g } from "./IconEnvelope.js";
9
9
  import { IconExclamationCircle as w } from "./IconExclamationCircle.js";
10
- import { IconExclamationTriangle as s } from "./IconExclamationTriangle.js";
11
- import { IconGoogleLogo as E } from "./IconGoogleLogo.js";
12
- import { IconLock as v } from "./IconLock.js";
10
+ import { IconExclamationTriangle as P } from "./IconExclamationTriangle.js";
11
+ import { IconGoogleLogo as A } from "./IconGoogleLogo.js";
12
+ import { IconLock as d } from "./IconLock.js";
13
+ import { IconMinus as v } from "./IconMinus.js";
13
14
  import { IconPhone as M } from "./IconPhone.js";
14
- import { IconXMark as y } from "./IconXMark.js";
15
- import { IconMinus as T } from "./IconMinus.js";
16
- import { IconPlus as X } from "./IconPlus.js";
15
+ import { IconPinCode as y } from "./IconPinCode.js";
16
+ import { IconPlus as T } from "./IconPlus.js";
17
+ import { IconShield as X } from "./IconShield.js";
18
+ import { IconSmartPhone as j } from "./IconSmartPhone.js";
19
+ import { IconXMark as z } from "./IconXMark.js";
17
20
  export {
18
21
  e as IconAppleLogo,
19
22
  c as IconArrowLeft,
20
23
  t as IconArrowsUpDown,
21
24
  x as IconCheck,
22
25
  I as IconCheckCircle,
23
- a as IconChevronDown,
26
+ i as IconChevronDown,
24
27
  C as IconCopy,
25
- h as IconEnvelope,
28
+ g as IconEnvelope,
26
29
  w as IconExclamationCircle,
27
- s as IconExclamationTriangle,
28
- E as IconGoogleLogo,
29
- v as IconLock,
30
- T as IconMinus,
30
+ P as IconExclamationTriangle,
31
+ A as IconGoogleLogo,
32
+ d as IconLock,
33
+ v as IconMinus,
31
34
  M as IconPhone,
32
- X as IconPlus,
33
- y as IconXMark
35
+ y as IconPinCode,
36
+ T as IconPlus,
37
+ X as IconShield,
38
+ j as IconSmartPhone,
39
+ z as IconXMark
34
40
  };
package/dist/index.d.ts CHANGED
@@ -3,6 +3,8 @@ export * from './components/CDPReactProvider';
3
3
  export * from './components/CopyAddress';
4
4
  export * from './components/CopyEvmKeyButton';
5
5
  export * from './components/CopySolanaKeyButton';
6
+ export * from './components/EnrollMfa';
7
+ export * from './components/EnrollMfaModal';
6
8
  export * from './components/ExportWallet';
7
9
  export * from './components/ExportWalletModal';
8
10
  export * from './components/Fund';
@@ -15,9 +17,13 @@ export * from './components/SignIn';
15
17
  export * from './components/SignInModal';
16
18
  export * from './components/SignOutButton';
17
19
  export * from './components/ThemeProvider';
20
+ export * from './components/VerifyMfa';
21
+ export * from './components/VerifyMfaModal';
22
+ export * from './components/VerifyMfaInline';
18
23
  export * from './components/ui/Button';
19
24
  export * from './components/ui/Modal';
20
25
  export * from './theme';
21
26
  export * from './icons';
22
27
  export * from './utils';
28
+ export { useVerifyMfaModal, type UseVerifyMfaModalOptions, type UseVerifyMfaModalReturn, } from './hooks/useVerifyMfaModal';
23
29
  export { type IframeTheme } from './types/secureIframe';