@coinbase/cdp-react 0.0.87 → 0.0.89
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.
- package/dist/chunks/{CDPReactProvider.C38bKQ2x.js → CDPReactProvider.BkmtXUv1.js} +1 -1
- package/dist/chunks/{LinkAuthFlow.CLubKoY0.js → LinkAuthFlow.B4FAtf4V.js} +1 -1
- package/dist/chunks/{index.BN39qScu.js → index.DgrgIsTX.js} +1 -1
- package/dist/chunks/useSendComponentCallOnce.DGjALrnZ.js +278 -0
- package/dist/components/AuthButton/index.js +1 -1
- package/dist/components/CDPReactProvider/index.js +1 -1
- package/dist/components/CopyEvmKeyButton/index.js +1 -1
- package/dist/components/CopySolanaKeyButton/index.js +1 -1
- package/dist/components/EnrollMfa/index.js +2 -2
- package/dist/components/EnrollMfaModal/index.js +2 -2
- package/dist/components/ExportWallet/index.js +6 -5
- package/dist/components/ExportWalletModal/index.js +2 -2
- package/dist/components/Fund/index.js +2 -2
- package/dist/components/FundModal/index.js +2 -2
- package/dist/components/LinkAuth/LinkAuthFlow.js +2 -2
- package/dist/components/LinkAuth/LinkAuthFlowBackButton.js +2 -2
- package/dist/components/LinkAuth/LinkAuthFlowProvider.js +2 -2
- package/dist/components/LinkAuth/LinkAuthItem.js +1 -1
- package/dist/components/LinkAuth/LinkAuthItems.js +30 -28
- package/dist/components/LinkAuth/LinkAuthProvider.js +28 -23
- package/dist/components/LinkAuth/index.js +57 -57
- package/dist/components/LinkAuth/types.js +1 -1
- package/dist/components/LinkAuth/utils.js +1 -1
- package/dist/components/LinkAuthModal/index.js +3 -3
- package/dist/components/OAuthStatusModal/index.d.ts +1 -0
- package/dist/components/OAuthStatusModal/index.js +74 -70
- package/dist/components/SendEvmTransactionButton/index.js +1 -1
- package/dist/components/SendSolanaTransactionButton/index.js +1 -1
- package/dist/components/SignIn/SignInAuthMethodButtons.js +30 -25
- package/dist/components/SignIn/SignInBackButton.js +1 -1
- package/dist/components/SignIn/SignInDescription.js +2 -2
- package/dist/components/SignIn/SignInForm.js +2 -2
- package/dist/components/SignIn/SignInImage.js +1 -1
- package/dist/components/SignIn/SignInProvider.js +1 -1
- package/dist/components/SignIn/SignInTitle.js +2 -2
- package/dist/components/SignIn/flows/SignInWithEmail.js +1 -1
- package/dist/components/SignIn/flows/SignInWithOAuth.js +1 -1
- package/dist/components/SignIn/flows/SignInWithSms.js +1 -1
- package/dist/components/SignIn/hooks/useSignInWithOAuth.js +16 -13
- package/dist/components/SignIn/index.js +2 -2
- package/dist/components/SignIn/types.js +1 -1
- package/dist/components/SignIn/useSignInReducer.js +1 -1
- package/dist/components/SignInModal/index.js +2 -2
- package/dist/components/SignOutButton/index.js +1 -1
- package/dist/components/VerifyMfa/index.js +2 -2
- package/dist/components/VerifyMfaInline/index.js +2 -2
- package/dist/components/VerifyMfaModal/index.js +2 -2
- package/dist/components/forms/PhoneNumberForm/index.d.ts +1 -1
- package/dist/components/forms/PhoneNumberInput/index.d.ts +1 -1
- package/dist/components/ui/Badge/index.d.ts +1 -2
- package/dist/components/ui/Banner/index.d.ts +1 -2
- package/dist/hooks/useVerifyMfaModal.js +2 -2
- package/dist/icons/IconTelegramLogo.d.ts +2 -0
- package/dist/icons/IconTelegramLogo.js +13 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +107 -105
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -5
- package/dist/chunks/useSendComponentCallOnce.BHZMuo6E.js +0 -273
|
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as h, Fragment as x } from "react/jsx-runtime";
|
|
|
2
2
|
import { OAuth2ProviderType as ee, CDPContext as te, CDPHooksProvider as oe } from "@coinbase/cdp-hooks";
|
|
3
3
|
import { useRef as g, useEffect as O, useCallback as d, useLayoutEffect as re, createContext as D, useState as B, useMemo as T, useContext as S, useId as $, lazy as ne } from "react";
|
|
4
4
|
import { registerMfaListener as se, cancelMfaVerification as ie } from "@coinbase/cdp-core";
|
|
5
|
-
import { A as ae, u as j } from "./useSendComponentCallOnce.
|
|
5
|
+
import { A as ae, u as j } from "./useSendComponentCallOnce.DGjALrnZ.js";
|
|
6
6
|
import { ThemeProvider as ce } from "../components/ThemeProvider/index.js";
|
|
7
7
|
import { c as le } from "./lite.1fxw3LjI.js";
|
|
8
8
|
import { Button as J } from "../components/ui/Button/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as i, jsxs as m, Fragment as p } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as I, useContext as S, useMemo as v, forwardRef as A, useRef as L, useImperativeHandle as x, useEffect as N } from "react";
|
|
3
|
-
import { u as C } from "./CDPReactProvider.
|
|
3
|
+
import { u as C } from "./CDPReactProvider.BkmtXUv1.js";
|
|
4
4
|
import { SignIn as _ } from "../components/SignIn/index.js";
|
|
5
5
|
import "@coinbase/cdp-hooks";
|
|
6
6
|
import { SwitchSlideTransition as T } from "../components/ui/SwitchSlideTransition/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OAuth2ProviderType as t } from "@coinbase/cdp-hooks";
|
|
2
|
-
import "./CDPReactProvider.
|
|
2
|
+
import "./CDPReactProvider.BkmtXUv1.js";
|
|
3
3
|
import { config as i } from "../components/SignIn/flows/SignInWithEmail.js";
|
|
4
4
|
import { config as m } from "../components/SignIn/flows/SignInWithSms.js";
|
|
5
5
|
import "react";
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { useRef as L, useEffect as M } from "react";
|
|
2
|
+
function N(f) {
|
|
3
|
+
return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
|
|
4
|
+
}
|
|
5
|
+
var w = { exports: {} }, T = { exports: {} }, C;
|
|
6
|
+
function q() {
|
|
7
|
+
return C || (C = 1, function() {
|
|
8
|
+
var f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", d = {
|
|
9
|
+
// Bit-wise rotation left
|
|
10
|
+
rotl: function(c, u) {
|
|
11
|
+
return c << u | c >>> 32 - u;
|
|
12
|
+
},
|
|
13
|
+
// Bit-wise rotation right
|
|
14
|
+
rotr: function(c, u) {
|
|
15
|
+
return c << 32 - u | c >>> u;
|
|
16
|
+
},
|
|
17
|
+
// Swap big-endian to little-endian and vice versa
|
|
18
|
+
endian: function(c) {
|
|
19
|
+
if (c.constructor == Number)
|
|
20
|
+
return d.rotl(c, 8) & 16711935 | d.rotl(c, 24) & 4278255360;
|
|
21
|
+
for (var u = 0; u < c.length; u++)
|
|
22
|
+
c[u] = d.endian(c[u]);
|
|
23
|
+
return c;
|
|
24
|
+
},
|
|
25
|
+
// Generate an array of any length of random bytes
|
|
26
|
+
randomBytes: function(c) {
|
|
27
|
+
for (var u = []; c > 0; c--)
|
|
28
|
+
u.push(Math.floor(Math.random() * 256));
|
|
29
|
+
return u;
|
|
30
|
+
},
|
|
31
|
+
// Convert a byte array to big-endian 32-bit words
|
|
32
|
+
bytesToWords: function(c) {
|
|
33
|
+
for (var u = [], a = 0, s = 0; a < c.length; a++, s += 8)
|
|
34
|
+
u[s >>> 5] |= c[a] << 24 - s % 32;
|
|
35
|
+
return u;
|
|
36
|
+
},
|
|
37
|
+
// Convert big-endian 32-bit words to a byte array
|
|
38
|
+
wordsToBytes: function(c) {
|
|
39
|
+
for (var u = [], a = 0; a < c.length * 32; a += 8)
|
|
40
|
+
u.push(c[a >>> 5] >>> 24 - a % 32 & 255);
|
|
41
|
+
return u;
|
|
42
|
+
},
|
|
43
|
+
// Convert a byte array to a hex string
|
|
44
|
+
bytesToHex: function(c) {
|
|
45
|
+
for (var u = [], a = 0; a < c.length; a++)
|
|
46
|
+
u.push((c[a] >>> 4).toString(16)), u.push((c[a] & 15).toString(16));
|
|
47
|
+
return u.join("");
|
|
48
|
+
},
|
|
49
|
+
// Convert a hex string to a byte array
|
|
50
|
+
hexToBytes: function(c) {
|
|
51
|
+
for (var u = [], a = 0; a < c.length; a += 2)
|
|
52
|
+
u.push(parseInt(c.substr(a, 2), 16));
|
|
53
|
+
return u;
|
|
54
|
+
},
|
|
55
|
+
// Convert a byte array to a base-64 string
|
|
56
|
+
bytesToBase64: function(c) {
|
|
57
|
+
for (var u = [], a = 0; a < c.length; a += 3)
|
|
58
|
+
for (var s = c[a] << 16 | c[a + 1] << 8 | c[a + 2], l = 0; l < 4; l++)
|
|
59
|
+
a * 8 + l * 6 <= c.length * 8 ? u.push(f.charAt(s >>> 6 * (3 - l) & 63)) : u.push("=");
|
|
60
|
+
return u.join("");
|
|
61
|
+
},
|
|
62
|
+
// Convert a base-64 string to a byte array
|
|
63
|
+
base64ToBytes: function(c) {
|
|
64
|
+
c = c.replace(/[^A-Z0-9+\/]/ig, "");
|
|
65
|
+
for (var u = [], a = 0, s = 0; a < c.length; s = ++a % 4)
|
|
66
|
+
s != 0 && u.push((f.indexOf(c.charAt(a - 1)) & Math.pow(2, -2 * s + 8) - 1) << s * 2 | f.indexOf(c.charAt(a)) >>> 6 - s * 2);
|
|
67
|
+
return u;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
T.exports = d;
|
|
71
|
+
}()), T.exports;
|
|
72
|
+
}
|
|
73
|
+
var F, m;
|
|
74
|
+
function x() {
|
|
75
|
+
if (m) return F;
|
|
76
|
+
m = 1;
|
|
77
|
+
var f = {
|
|
78
|
+
// UTF-8 encoding
|
|
79
|
+
utf8: {
|
|
80
|
+
// Convert a string to a byte array
|
|
81
|
+
stringToBytes: function(d) {
|
|
82
|
+
return f.bin.stringToBytes(unescape(encodeURIComponent(d)));
|
|
83
|
+
},
|
|
84
|
+
// Convert a byte array to a string
|
|
85
|
+
bytesToString: function(d) {
|
|
86
|
+
return decodeURIComponent(escape(f.bin.bytesToString(d)));
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
// Binary encoding
|
|
90
|
+
bin: {
|
|
91
|
+
// Convert a string to a byte array
|
|
92
|
+
stringToBytes: function(d) {
|
|
93
|
+
for (var c = [], u = 0; u < d.length; u++)
|
|
94
|
+
c.push(d.charCodeAt(u) & 255);
|
|
95
|
+
return c;
|
|
96
|
+
},
|
|
97
|
+
// Convert a byte array to a string
|
|
98
|
+
bytesToString: function(d) {
|
|
99
|
+
for (var c = [], u = 0; u < d.length; u++)
|
|
100
|
+
c.push(String.fromCharCode(d[u]));
|
|
101
|
+
return c.join("");
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
return F = f, F;
|
|
106
|
+
}
|
|
107
|
+
/*!
|
|
108
|
+
* Determine if an object is a Buffer
|
|
109
|
+
*
|
|
110
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
111
|
+
* @license MIT
|
|
112
|
+
*/
|
|
113
|
+
var S, O;
|
|
114
|
+
function H() {
|
|
115
|
+
if (O) return S;
|
|
116
|
+
O = 1, S = function(c) {
|
|
117
|
+
return c != null && (f(c) || d(c) || !!c._isBuffer);
|
|
118
|
+
};
|
|
119
|
+
function f(c) {
|
|
120
|
+
return !!c.constructor && typeof c.constructor.isBuffer == "function" && c.constructor.isBuffer(c);
|
|
121
|
+
}
|
|
122
|
+
function d(c) {
|
|
123
|
+
return typeof c.readFloatLE == "function" && typeof c.slice == "function" && f(c.slice(0, 0));
|
|
124
|
+
}
|
|
125
|
+
return S;
|
|
126
|
+
}
|
|
127
|
+
var A;
|
|
128
|
+
function V() {
|
|
129
|
+
return A || (A = 1, function() {
|
|
130
|
+
var f = q(), d = x().utf8, c = H(), u = x().bin, a = function(s, l) {
|
|
131
|
+
s.constructor == String ? l && l.encoding === "binary" ? s = u.stringToBytes(s) : s = d.stringToBytes(s) : c(s) ? s = Array.prototype.slice.call(s, 0) : !Array.isArray(s) && s.constructor !== Uint8Array && (s = s.toString());
|
|
132
|
+
for (var o = f.bytesToWords(s), y = s.length * 8, e = 1732584193, n = -271733879, r = -1732584194, t = 271733878, i = 0; i < o.length; i++)
|
|
133
|
+
o[i] = (o[i] << 8 | o[i] >>> 24) & 16711935 | (o[i] << 24 | o[i] >>> 8) & 4278255360;
|
|
134
|
+
o[y >>> 5] |= 128 << y % 32, o[(y + 64 >>> 9 << 4) + 14] = y;
|
|
135
|
+
for (var p = a._ff, h = a._gg, v = a._hh, _ = a._ii, i = 0; i < o.length; i += 16) {
|
|
136
|
+
var P = e, k = n, D = r, U = t;
|
|
137
|
+
e = p(e, n, r, t, o[i + 0], 7, -680876936), t = p(t, e, n, r, o[i + 1], 12, -389564586), r = p(r, t, e, n, o[i + 2], 17, 606105819), n = p(n, r, t, e, o[i + 3], 22, -1044525330), e = p(e, n, r, t, o[i + 4], 7, -176418897), t = p(t, e, n, r, o[i + 5], 12, 1200080426), r = p(r, t, e, n, o[i + 6], 17, -1473231341), n = p(n, r, t, e, o[i + 7], 22, -45705983), e = p(e, n, r, t, o[i + 8], 7, 1770035416), t = p(t, e, n, r, o[i + 9], 12, -1958414417), r = p(r, t, e, n, o[i + 10], 17, -42063), n = p(n, r, t, e, o[i + 11], 22, -1990404162), e = p(e, n, r, t, o[i + 12], 7, 1804603682), t = p(t, e, n, r, o[i + 13], 12, -40341101), r = p(r, t, e, n, o[i + 14], 17, -1502002290), n = p(n, r, t, e, o[i + 15], 22, 1236535329), e = h(e, n, r, t, o[i + 1], 5, -165796510), t = h(t, e, n, r, o[i + 6], 9, -1069501632), r = h(r, t, e, n, o[i + 11], 14, 643717713), n = h(n, r, t, e, o[i + 0], 20, -373897302), e = h(e, n, r, t, o[i + 5], 5, -701558691), t = h(t, e, n, r, o[i + 10], 9, 38016083), r = h(r, t, e, n, o[i + 15], 14, -660478335), n = h(n, r, t, e, o[i + 4], 20, -405537848), e = h(e, n, r, t, o[i + 9], 5, 568446438), t = h(t, e, n, r, o[i + 14], 9, -1019803690), r = h(r, t, e, n, o[i + 3], 14, -187363961), n = h(n, r, t, e, o[i + 8], 20, 1163531501), e = h(e, n, r, t, o[i + 13], 5, -1444681467), t = h(t, e, n, r, o[i + 2], 9, -51403784), r = h(r, t, e, n, o[i + 7], 14, 1735328473), n = h(n, r, t, e, o[i + 12], 20, -1926607734), e = v(e, n, r, t, o[i + 5], 4, -378558), t = v(t, e, n, r, o[i + 8], 11, -2022574463), r = v(r, t, e, n, o[i + 11], 16, 1839030562), n = v(n, r, t, e, o[i + 14], 23, -35309556), e = v(e, n, r, t, o[i + 1], 4, -1530992060), t = v(t, e, n, r, o[i + 4], 11, 1272893353), r = v(r, t, e, n, o[i + 7], 16, -155497632), n = v(n, r, t, e, o[i + 10], 23, -1094730640), e = v(e, n, r, t, o[i + 13], 4, 681279174), t = v(t, e, n, r, o[i + 0], 11, -358537222), r = v(r, t, e, n, o[i + 3], 16, -722521979), n = v(n, r, t, e, o[i + 6], 23, 76029189), e = v(e, n, r, t, o[i + 9], 4, -640364487), t = v(t, e, n, r, o[i + 12], 11, -421815835), r = v(r, t, e, n, o[i + 15], 16, 530742520), n = v(n, r, t, e, o[i + 2], 23, -995338651), e = _(e, n, r, t, o[i + 0], 6, -198630844), t = _(t, e, n, r, o[i + 7], 10, 1126891415), r = _(r, t, e, n, o[i + 14], 15, -1416354905), n = _(n, r, t, e, o[i + 5], 21, -57434055), e = _(e, n, r, t, o[i + 12], 6, 1700485571), t = _(t, e, n, r, o[i + 3], 10, -1894986606), r = _(r, t, e, n, o[i + 10], 15, -1051523), n = _(n, r, t, e, o[i + 1], 21, -2054922799), e = _(e, n, r, t, o[i + 8], 6, 1873313359), t = _(t, e, n, r, o[i + 15], 10, -30611744), r = _(r, t, e, n, o[i + 6], 15, -1560198380), n = _(n, r, t, e, o[i + 13], 21, 1309151649), e = _(e, n, r, t, o[i + 4], 6, -145523070), t = _(t, e, n, r, o[i + 11], 10, -1120210379), r = _(r, t, e, n, o[i + 2], 15, 718787259), n = _(n, r, t, e, o[i + 9], 21, -343485551), e = e + P >>> 0, n = n + k >>> 0, r = r + D >>> 0, t = t + U >>> 0;
|
|
138
|
+
}
|
|
139
|
+
return f.endian([e, n, r, t]);
|
|
140
|
+
};
|
|
141
|
+
a._ff = function(s, l, o, y, e, n, r) {
|
|
142
|
+
var t = s + (l & o | ~l & y) + (e >>> 0) + r;
|
|
143
|
+
return (t << n | t >>> 32 - n) + l;
|
|
144
|
+
}, a._gg = function(s, l, o, y, e, n, r) {
|
|
145
|
+
var t = s + (l & y | o & ~y) + (e >>> 0) + r;
|
|
146
|
+
return (t << n | t >>> 32 - n) + l;
|
|
147
|
+
}, a._hh = function(s, l, o, y, e, n, r) {
|
|
148
|
+
var t = s + (l ^ o ^ y) + (e >>> 0) + r;
|
|
149
|
+
return (t << n | t >>> 32 - n) + l;
|
|
150
|
+
}, a._ii = function(s, l, o, y, e, n, r) {
|
|
151
|
+
var t = s + (o ^ (l | ~y)) + (e >>> 0) + r;
|
|
152
|
+
return (t << n | t >>> 32 - n) + l;
|
|
153
|
+
}, a._blocksize = 16, a._digestsize = 16, w.exports = function(s, l) {
|
|
154
|
+
if (s == null)
|
|
155
|
+
throw new Error("Illegal argument " + s);
|
|
156
|
+
var o = f.wordsToBytes(a(s, l));
|
|
157
|
+
return l && l.asBytes ? o : l && l.asString ? u.bytesToString(o) : f.bytesToHex(o);
|
|
158
|
+
};
|
|
159
|
+
}()), w.exports;
|
|
160
|
+
}
|
|
161
|
+
var G = V();
|
|
162
|
+
const J = /* @__PURE__ */ N(G);
|
|
163
|
+
function K() {
|
|
164
|
+
try {
|
|
165
|
+
return typeof navigator < "u" && navigator.product === "ReactNative";
|
|
166
|
+
} catch {
|
|
167
|
+
return !1;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function $() {
|
|
171
|
+
try {
|
|
172
|
+
if (typeof window > "u")
|
|
173
|
+
return typeof process < "u" && process.env && "__NEXT_PROCESSED_ENV" in process.env;
|
|
174
|
+
const f = window;
|
|
175
|
+
return !!(f.__NEXT_DATA__ || f.next || document.getElementById("__next"));
|
|
176
|
+
} catch {
|
|
177
|
+
return !1;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
function z() {
|
|
181
|
+
try {
|
|
182
|
+
if (typeof window > "u")
|
|
183
|
+
return !1;
|
|
184
|
+
const f = window;
|
|
185
|
+
return !!(f.__VUE__ || f.__VUE_DEVTOOLS_GLOBAL_HOOK__ || document.querySelector("[data-v-]"));
|
|
186
|
+
} catch {
|
|
187
|
+
return !1;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
function W() {
|
|
191
|
+
try {
|
|
192
|
+
if (typeof window > "u")
|
|
193
|
+
return !1;
|
|
194
|
+
const f = window;
|
|
195
|
+
return f.__REACT_DEVTOOLS_GLOBAL_HOOK__ || f.React ? !0 : !!document.querySelector(
|
|
196
|
+
"[data-reactroot], [data-reactid], ._reactRoot, ._reactRootContainer"
|
|
197
|
+
);
|
|
198
|
+
} catch {
|
|
199
|
+
return !1;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function X() {
|
|
203
|
+
return W() ? "react" : K() ? "react-native" : $() ? "nextjs" : z() ? "vue" : "unknown";
|
|
204
|
+
}
|
|
205
|
+
let R = null;
|
|
206
|
+
function Y() {
|
|
207
|
+
return R === null && (R = X()), R;
|
|
208
|
+
}
|
|
209
|
+
const Z = "1f8d3e558f493e38a037dbfadb8ba344", b = "d473b1dcc969105adab157226cd9cf63", B = Symbol.for("@coinbase/cdp-analytics");
|
|
210
|
+
function Q() {
|
|
211
|
+
const f = globalThis;
|
|
212
|
+
return f[B] || (f[B] = {
|
|
213
|
+
developerIdentifier: "",
|
|
214
|
+
endUserIdentifier: "",
|
|
215
|
+
enabled: !0,
|
|
216
|
+
isProduction: !1,
|
|
217
|
+
isUsingMocks: !1,
|
|
218
|
+
sendEvent: E,
|
|
219
|
+
sendActionCallEvent: (d) => E({ ...d, type: "action_call" }),
|
|
220
|
+
sendHookCallEvent: (d) => E({ ...d, type: "hook_call" }),
|
|
221
|
+
sendComponentCallEvent: (d) => E({ ...d, type: "component_call" }),
|
|
222
|
+
sendSessionRefreshEvent: (d) => E({ ...d, type: "session_refresh" }),
|
|
223
|
+
versionRegistry: {},
|
|
224
|
+
registerPackageVersion: (d, c) => {
|
|
225
|
+
g.versionRegistry[d] = c;
|
|
226
|
+
}
|
|
227
|
+
}), f[B];
|
|
228
|
+
}
|
|
229
|
+
const g = Q(), j = /* @__PURE__ */ new Set(["session_refresh"]);
|
|
230
|
+
async function E(f) {
|
|
231
|
+
if (!g.enabled)
|
|
232
|
+
return;
|
|
233
|
+
const c = j.has(f.type) ? g.endUserIdentifier : g.developerIdentifier;
|
|
234
|
+
if (!c)
|
|
235
|
+
return;
|
|
236
|
+
const u = Date.now(), s = [{
|
|
237
|
+
user_id: c,
|
|
238
|
+
event_type: f.type,
|
|
239
|
+
platform: I() ? "web" : "native",
|
|
240
|
+
timestamp: u,
|
|
241
|
+
event_properties: {
|
|
242
|
+
project_name: "cdp-embedded-wallet",
|
|
243
|
+
framework: Y(),
|
|
244
|
+
isLocalHost: nn(),
|
|
245
|
+
isUsingMocks: g.isUsingMocks,
|
|
246
|
+
package_versions: g.versionRegistry,
|
|
247
|
+
...f
|
|
248
|
+
}
|
|
249
|
+
}], l = JSON.stringify(s), o = u.toString(), y = J(l + o), e = {
|
|
250
|
+
client: g.isProduction ? b : Z,
|
|
251
|
+
e: l,
|
|
252
|
+
checksum: y
|
|
253
|
+
};
|
|
254
|
+
await fetch("https://cca-lite.coinbase.com/amp", {
|
|
255
|
+
method: "POST",
|
|
256
|
+
mode: "no-cors",
|
|
257
|
+
headers: {
|
|
258
|
+
"Content-Type": "application/json"
|
|
259
|
+
},
|
|
260
|
+
body: JSON.stringify(e)
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
function I() {
|
|
264
|
+
return typeof window < "u" && typeof document < "u";
|
|
265
|
+
}
|
|
266
|
+
function nn() {
|
|
267
|
+
return I() ? window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" : !1;
|
|
268
|
+
}
|
|
269
|
+
function en(f) {
|
|
270
|
+
const d = L(!1);
|
|
271
|
+
M(() => {
|
|
272
|
+
d.current || (g.sendComponentCallEvent({ name: f }), d.current = !0);
|
|
273
|
+
}, [f]);
|
|
274
|
+
}
|
|
275
|
+
export {
|
|
276
|
+
g as A,
|
|
277
|
+
en as u
|
|
278
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as u, jsxs as j, Fragment as k } from "react/jsx-runtime";
|
|
2
2
|
import { useIsInitialized as y, useIsSignedIn as z } from "@coinbase/cdp-hooks";
|
|
3
|
-
import { u as D } from "../../chunks/useSendComponentCallOnce.
|
|
3
|
+
import { u as D } from "../../chunks/useSendComponentCallOnce.DGjALrnZ.js";
|
|
4
4
|
import { useState as m, useRef as M, useCallback as x, useEffect as f } from "react";
|
|
5
5
|
import { SignInModal as N } from "../SignInModal/index.js";
|
|
6
6
|
import { SignOutButton as $ } from "../SignOutButton/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@coinbase/cdp-hooks";
|
|
3
3
|
import "react";
|
|
4
|
-
import { c as p, A as m, C as t, O as A, u as H, a as T } from "../../chunks/CDPReactProvider.
|
|
4
|
+
import { c as p, A as m, C as t, O as A, u as H, a as T } from "../../chunks/CDPReactProvider.BkmtXUv1.js";
|
|
5
5
|
import "../ThemeProvider/index.js";
|
|
6
6
|
export {
|
|
7
7
|
p as ALL_AUTH_METHODS,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as B } from "react/jsx-runtime";
|
|
2
2
|
import { useConfig as S } from "@coinbase/cdp-hooks";
|
|
3
|
-
import { u as _ } from "../../chunks/useSendComponentCallOnce.
|
|
3
|
+
import { u as _ } from "../../chunks/useSendComponentCallOnce.DGjALrnZ.js";
|
|
4
4
|
import { useRef as j, useState as i, useCallback as E } from "react";
|
|
5
5
|
import "../ui/Button/index.js";
|
|
6
6
|
import { IframeButton as K } from "../ui/IframeButton/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as B } from "react/jsx-runtime";
|
|
2
2
|
import { useConfig as _ } from "@coinbase/cdp-hooks";
|
|
3
|
-
import { u as j } from "../../chunks/useSendComponentCallOnce.
|
|
3
|
+
import { u as j } from "../../chunks/useSendComponentCallOnce.DGjALrnZ.js";
|
|
4
4
|
import { useRef as K, useState as i, useCallback as T } from "react";
|
|
5
5
|
import "../ui/Button/index.js";
|
|
6
6
|
import { IframeButton as U } from "../ui/IframeButton/index.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as r, jsxs as s, Fragment as u } from "react/jsx-runtime";
|
|
2
2
|
import { getEnabledMfaMethods as $, getEnrolledMfaMethods as k } from "@coinbase/cdp-core";
|
|
3
3
|
import { useCurrentUser as w, useIsInitialized as V, useInitiateMfaEnrollment as j, useSubmitMfaEnrollment as z, useRecordMfaEnrollmentPrompted as q } from "@coinbase/cdp-hooks";
|
|
4
|
-
import { u as J } from "../../chunks/useSendComponentCallOnce.
|
|
4
|
+
import { u as J } from "../../chunks/useSendComponentCallOnce.DGjALrnZ.js";
|
|
5
5
|
import { useMemo as C, useRef as _, useEffect as v, useCallback as p, useLayoutEffect as K } from "react";
|
|
6
6
|
import { c as G } from "../../chunks/lite.1fxw3LjI.js";
|
|
7
|
-
import { u as X } from "../../chunks/CDPReactProvider.
|
|
7
|
+
import { u as X } from "../../chunks/CDPReactProvider.BkmtXUv1.js";
|
|
8
8
|
import { useTimeout as Y } from "../../hooks/useTimeout.js";
|
|
9
9
|
import { isApiError as Z } from "../../utils/isApiError.js";
|
|
10
10
|
import "libphonenumber-js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as o, jsxs as r, Fragment as s } from "react/jsx-runtime";
|
|
2
|
-
import { u as v } from "../../chunks/useSendComponentCallOnce.
|
|
2
|
+
import { u as v } from "../../chunks/useSendComponentCallOnce.DGjALrnZ.js";
|
|
3
3
|
import { createContext as b, useMemo as w, useContext as y } from "react";
|
|
4
4
|
import { c as p } from "../../chunks/lite.1fxw3LjI.js";
|
|
5
|
-
import { u as F } from "../../chunks/CDPReactProvider.
|
|
5
|
+
import { u as F } from "../../chunks/CDPReactProvider.BkmtXUv1.js";
|
|
6
6
|
import { EnrollMfa as T, EnrollMfaError as B } from "../EnrollMfa/index.js";
|
|
7
7
|
import { Button as h } from "../ui/Button/index.js";
|
|
8
8
|
import { Modal as A, ModalContent as O, ModalTitle as S, ModalDescription as $, ModalClose as E, ModalTrigger as D } from "../ui/Modal/index.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { u as S, A as D } from "../../chunks/useSendComponentCallOnce.
|
|
1
|
+
import { u as S, A as D } from "../../chunks/useSendComponentCallOnce.DGjALrnZ.js";
|
|
2
2
|
import { createContext as A, useContext as k, useMemo as h, useState as L, useCallback as U } from "react";
|
|
3
3
|
import { VERSION as q } from "../../version.js";
|
|
4
4
|
import "../AuthButton/index.js";
|
|
5
|
-
import { u as b } from "../../chunks/CDPReactProvider.
|
|
5
|
+
import { u as b } from "../../chunks/CDPReactProvider.BkmtXUv1.js";
|
|
6
6
|
import { CopyAddress as H } from "../CopyAddress/index.js";
|
|
7
7
|
import { CopyEvmKeyButton as J } from "../CopyEvmKeyButton/index.js";
|
|
8
8
|
import { CopySolanaKeyButton as X } from "../CopySolanaKeyButton/index.js";
|
|
@@ -57,6 +57,7 @@ import "../../utils/isApiError.js";
|
|
|
57
57
|
import "../../utils/isEmailInvalid.js";
|
|
58
58
|
import "../../utils/parseValuesFromPhoneNumber.js";
|
|
59
59
|
import "../../utils/sendIframeMessage.js";
|
|
60
|
+
import "../../hooks/usePhoneNumberState.js";
|
|
60
61
|
import "@coinbase/cdp-core";
|
|
61
62
|
import "../EnrollMfa/EnrollMfaDescription.js";
|
|
62
63
|
import "../EnrollMfa/EnrollMfaFlow.js";
|
|
@@ -71,7 +72,7 @@ import "../EnrollMfa/EnrollMfaFlowProvider.js";
|
|
|
71
72
|
import "../Fund/FundForm.js";
|
|
72
73
|
import "../Fund/FundTitle.js";
|
|
73
74
|
import "../Fund/FundProvider.js";
|
|
74
|
-
import "../../chunks/LinkAuthFlow.
|
|
75
|
+
import "../../chunks/LinkAuthFlow.B4FAtf4V.js";
|
|
75
76
|
import "../LinkAuth/LinkAuthFlowBackButton.js";
|
|
76
77
|
import "../LinkAuth/LinkAuthItem.js";
|
|
77
78
|
import "../LinkAuth/LinkAuthItems.js";
|
|
@@ -332,7 +333,7 @@ import '../../assets/ExportWallet.css';const at = "ExportWallet-module__footer__
|
|
|
332
333
|
]
|
|
333
334
|
}
|
|
334
335
|
) });
|
|
335
|
-
},
|
|
336
|
+
}, se = ({
|
|
336
337
|
address: o,
|
|
337
338
|
children: e,
|
|
338
339
|
onIframeReady: r,
|
|
@@ -365,7 +366,7 @@ import '../../assets/ExportWallet.css';const at = "ExportWallet-module__footer__
|
|
|
365
366
|
};
|
|
366
367
|
D.registerPackageVersion("react", q);
|
|
367
368
|
export {
|
|
368
|
-
|
|
369
|
+
se as E,
|
|
369
370
|
pt as ExportWallet,
|
|
370
371
|
j as ExportWalletCopyAddress,
|
|
371
372
|
B as ExportWalletCopyKeyButton,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "../../chunks/useSendComponentCallOnce.
|
|
2
|
+
import "../../chunks/useSendComponentCallOnce.DGjALrnZ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../../chunks/lite.1fxw3LjI.js";
|
|
5
|
-
import "../../chunks/CDPReactProvider.
|
|
5
|
+
import "../../chunks/CDPReactProvider.BkmtXUv1.js";
|
|
6
6
|
import { E as W, a as g, b as n, c as C, d as T } from "../ExportWallet/index.js";
|
|
7
7
|
import "../ui/Banner/index.js";
|
|
8
8
|
import "../ui/Button/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n, jsxs as i, Fragment as f } from "react/jsx-runtime";
|
|
2
|
-
import { u as p } from "../../chunks/useSendComponentCallOnce.
|
|
2
|
+
import { u as p } from "../../chunks/useSendComponentCallOnce.DGjALrnZ.js";
|
|
3
3
|
import { useId as a } from "react";
|
|
4
|
-
import { u as c } from "../../chunks/CDPReactProvider.
|
|
4
|
+
import { u as c } from "../../chunks/CDPReactProvider.BkmtXUv1.js";
|
|
5
5
|
import { CoinbaseFooter as F } from "../ui/CoinbaseFooter/index.js";
|
|
6
6
|
import { FundForm as l } from "./FundForm.js";
|
|
7
7
|
import { FundProvider as C, useFundContext as _ } from "./FundProvider.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as o, jsxs as u, Fragment as p } from "react/jsx-runtime";
|
|
2
|
-
import { u as w } from "../../chunks/useSendComponentCallOnce.
|
|
2
|
+
import { u as w } from "../../chunks/useSendComponentCallOnce.DGjALrnZ.js";
|
|
3
3
|
import { createContext as j, useState as A, useCallback as F, useMemo as S, useId as $, useContext as z } from "react";
|
|
4
4
|
import { c as x } from "../../chunks/lite.1fxw3LjI.js";
|
|
5
|
-
import { u as V } from "../../chunks/CDPReactProvider.
|
|
5
|
+
import { u as V } from "../../chunks/CDPReactProvider.BkmtXUv1.js";
|
|
6
6
|
import { Fund as k, FundFooter as D } from "../Fund/index.js";
|
|
7
7
|
import { Button as v } from "../ui/Button/index.js";
|
|
8
8
|
import { Modal as H, ModalContent as L, ModalTitle as R, ModalClose as U, ModalTrigger as W } from "../ui/Modal/index.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "../../chunks/CDPReactProvider.
|
|
3
|
+
import "../../chunks/CDPReactProvider.BkmtXUv1.js";
|
|
4
4
|
import "../SignIn/index.js";
|
|
5
5
|
import "@coinbase/cdp-hooks";
|
|
6
6
|
import "../ui/SwitchSlideTransition/index.js";
|
|
7
7
|
import "../ui/VisuallyHidden/index.js";
|
|
8
|
-
import { a as A } from "../../chunks/LinkAuthFlow.
|
|
8
|
+
import { a as A } from "../../chunks/LinkAuthFlow.B4FAtf4V.js";
|
|
9
9
|
import "./LinkAuthItems.js";
|
|
10
10
|
import "./types.js";
|
|
11
11
|
import "../SignIn/SignInProvider.js";
|
|
@@ -3,9 +3,9 @@ import { c as k } from "../../chunks/lite.1fxw3LjI.js";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { Button as p } from "../ui/Button/index.js";
|
|
5
5
|
import { IconArrowLeft as f } from "../../icons/IconArrowLeft.js";
|
|
6
|
-
import { b as w } from "../../chunks/LinkAuthFlow.
|
|
6
|
+
import { b as w } from "../../chunks/LinkAuthFlow.B4FAtf4V.js";
|
|
7
7
|
import { useLinkAuthContext as _ } from "./LinkAuthProvider.js";
|
|
8
|
-
import "../../chunks/CDPReactProvider.
|
|
8
|
+
import "../../chunks/CDPReactProvider.BkmtXUv1.js";
|
|
9
9
|
import { methodToView as b } from "./utils.js";
|
|
10
10
|
import '../../assets/LinkAuthFlowBackButton.css';const h = "LinkAuthFlowBackButton-module__button___wPKfW", B = "LinkAuthFlowBackButton-module__icon___OUmzY", o = {
|
|
11
11
|
button: h,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import "../../chunks/CDPReactProvider.
|
|
4
|
-
import { L as e, u as n, b as s } from "../../chunks/LinkAuthFlow.
|
|
3
|
+
import "../../chunks/CDPReactProvider.BkmtXUv1.js";
|
|
4
|
+
import { L as e, u as n, b as s } from "../../chunks/LinkAuthFlow.B4FAtf4V.js";
|
|
5
5
|
export {
|
|
6
6
|
e as LinkAuthFlowProvider,
|
|
7
7
|
n as useLinkAuthFlow,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { ToggleListItem as s } from "../ui/ToggleListItem/index.js";
|
|
4
|
-
import "../../chunks/CDPReactProvider.
|
|
4
|
+
import "../../chunks/CDPReactProvider.BkmtXUv1.js";
|
|
5
5
|
const u = ({
|
|
6
6
|
authMethod: n,
|
|
7
7
|
userAlias: e,
|
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as u } from "../../chunks/lite.1fxw3LjI.js";
|
|
3
3
|
import { useMemo as b } from "react";
|
|
4
|
-
import "../../chunks/CDPReactProvider.
|
|
5
|
-
import { IconAppleLogo as
|
|
6
|
-
import { IconEnvelope as
|
|
7
|
-
import { IconGoogleColorLogo as
|
|
8
|
-
import { IconPhone as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
4
|
+
import "../../chunks/CDPReactProvider.BkmtXUv1.js";
|
|
5
|
+
import { IconAppleLogo as g } from "../../icons/IconAppleLogo.js";
|
|
6
|
+
import { IconEnvelope as d } from "../../icons/IconEnvelope.js";
|
|
7
|
+
import { IconGoogleColorLogo as f } from "../../icons/IconGoogleColorLogo.js";
|
|
8
|
+
import { IconPhone as L } from "../../icons/IconPhone.js";
|
|
9
|
+
import { IconTelegramLogo as _ } from "../../icons/IconTelegramLogo.js";
|
|
10
|
+
import { IconXLogo as A } from "../../icons/IconXLogo.js";
|
|
11
|
+
import { LinkAuthItem as P } from "./LinkAuthItem.js";
|
|
12
|
+
import { useLinkAuthContext as T } from "./LinkAuthProvider.js";
|
|
12
13
|
import '../../assets/LinkAuthItems.css';const k = "LinkAuthItems-module__list___5AimM", x = {
|
|
13
14
|
list: k
|
|
14
15
|
}, M = {
|
|
15
|
-
email: { Icon: /* @__PURE__ */ l(
|
|
16
|
-
sms: { Icon: /* @__PURE__ */ l(
|
|
17
|
-
"oauth:google": { Icon: /* @__PURE__ */ l(
|
|
18
|
-
"oauth:apple": { Icon: /* @__PURE__ */ l(
|
|
19
|
-
"oauth:x": { Icon: /* @__PURE__ */ l(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
email: { Icon: /* @__PURE__ */ l(d, { "aria-label": "Email" }), label: "Email" },
|
|
17
|
+
sms: { Icon: /* @__PURE__ */ l(L, { "aria-label": "Phone" }), label: "Phone" },
|
|
18
|
+
"oauth:google": { Icon: /* @__PURE__ */ l(f, { "aria-label": "Google" }), label: "Google" },
|
|
19
|
+
"oauth:apple": { Icon: /* @__PURE__ */ l(g, { "aria-label": "Apple" }), label: "Apple" },
|
|
20
|
+
"oauth:x": { Icon: /* @__PURE__ */ l(A, { "aria-label": "X" }), label: "X" },
|
|
21
|
+
"oauth:telegram": { Icon: /* @__PURE__ */ l(_, { "aria-label": "Telegram" }), label: "Telegram" }
|
|
22
|
+
}, O = ({ children: m, className: s = "", onLink: t, ...c }) => {
|
|
23
|
+
const { state: p, dispatch: a } = T(), { authMethods: i, isPending: r, methodToLink: n } = p, h = b(() => i.map((o) => {
|
|
24
|
+
const { Icon: e, label: I } = M[o.method];
|
|
23
25
|
return {
|
|
24
26
|
...o,
|
|
25
|
-
icon:
|
|
26
|
-
label:
|
|
27
|
+
icon: e,
|
|
28
|
+
label: I,
|
|
27
29
|
onLink: async () => {
|
|
28
|
-
|
|
30
|
+
a({ type: "LINK_AUTH_METHOD", payload: { method: o.method } }), await t?.(o.method);
|
|
29
31
|
}
|
|
30
32
|
};
|
|
31
|
-
}), [
|
|
32
|
-
return /* @__PURE__ */ l("ul", { className:
|
|
33
|
-
...
|
|
33
|
+
}), [i, a, t]);
|
|
34
|
+
return /* @__PURE__ */ l("ul", { className: u(x.list, s), ...c, children: h.map(({ method: o, ...e }) => /* @__PURE__ */ l("li", { children: m?.({
|
|
35
|
+
...e,
|
|
34
36
|
authMethod: o,
|
|
35
|
-
isPending:
|
|
37
|
+
isPending: r && n === o
|
|
36
38
|
}) || /* @__PURE__ */ l(
|
|
37
|
-
|
|
39
|
+
P,
|
|
38
40
|
{
|
|
39
|
-
...
|
|
41
|
+
...e,
|
|
40
42
|
authMethod: o,
|
|
41
|
-
isPending:
|
|
43
|
+
isPending: r && n === o
|
|
42
44
|
}
|
|
43
45
|
) }, o)) });
|
|
44
46
|
};
|
|
45
47
|
export {
|
|
46
|
-
|
|
48
|
+
O as LinkAuthItems
|
|
47
49
|
};
|