signer-test-sdk-react 0.0.22 → 0.0.24
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/CHANGELOG.md +29 -0
- package/README.md +4 -0
- package/dist/src/AbstraxnProvider.d.ts +5 -13
- package/dist/src/AbstraxnProvider.js +14 -3126
- package/dist/src/AbstraxnProvider.js.map +1 -1
- package/dist/src/ConnectButton.css +1 -1
- package/dist/src/ExternalWalletButtons.css +1 -1
- package/dist/src/ExternalWalletButtons.js +2 -2
- package/dist/src/ExternalWalletButtons.js.map +1 -1
- package/dist/src/OnboardingUI.d.ts +1 -1
- package/dist/src/WalletModal.css +193 -373
- package/dist/src/WalletModal.d.ts +1 -1
- package/dist/src/WalletModal.js +108 -45
- package/dist/src/WalletModal.js.map +1 -1
- package/dist/src/chains.d.ts +4 -3
- package/dist/src/chains.js +154 -84
- package/dist/src/chains.js.map +1 -1
- package/dist/src/components/AbstraxnProvider/AbstraxnProvider.d.ts +12 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProvider.js +146 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProvider.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderInner.d.ts +25 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderInner.js +3086 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderInner.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderWithWagmi.d.ts +8 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderWithWagmi.js +46 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderWithWagmi.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderWithoutWagmi.d.ts +8 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderWithoutWagmi.js +12 -0
- package/dist/src/components/AbstraxnProvider/AbstraxnProviderWithoutWagmi.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/context.d.ts +2 -0
- package/dist/src/components/AbstraxnProvider/context.js +6 -0
- package/dist/src/components/AbstraxnProvider/context.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/index.d.ts +6 -0
- package/dist/src/components/AbstraxnProvider/index.js +7 -0
- package/dist/src/components/AbstraxnProvider/index.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/useAbstraxnProviderBase.d.ts +30 -0
- package/dist/src/components/AbstraxnProvider/useAbstraxnProviderBase.js +49 -0
- package/dist/src/components/AbstraxnProvider/useAbstraxnProviderBase.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/useAbstraxnWallet.d.ts +2 -0
- package/dist/src/components/AbstraxnProvider/useAbstraxnWallet.js +13 -0
- package/dist/src/components/AbstraxnProvider/useAbstraxnWallet.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/useOAuthCallbacks.d.ts +22 -0
- package/dist/src/components/AbstraxnProvider/useOAuthCallbacks.js +242 -0
- package/dist/src/components/AbstraxnProvider/useOAuthCallbacks.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/useWalletInitialization.d.ts +25 -0
- package/dist/src/components/AbstraxnProvider/useWalletInitialization.js +539 -0
- package/dist/src/components/AbstraxnProvider/useWalletInitialization.js.map +1 -0
- package/dist/src/components/AbstraxnProvider/utils.d.ts +41 -0
- package/dist/src/components/AbstraxnProvider/utils.js +139 -0
- package/dist/src/components/AbstraxnProvider/utils.js.map +1 -0
- package/dist/src/components/OnboardingUI/OnboardingUI.css +8 -5
- package/dist/src/components/OnboardingUI/OnboardingUIReact.d.ts +1 -1
- package/dist/src/components/OnboardingUI/OnboardingUIWeb.d.ts +1 -1
- package/dist/src/components/OnboardingUI/OnboardingUIWeb.js +7 -1
- package/dist/src/components/OnboardingUI/OnboardingUIWeb.js.map +1 -1
- package/dist/src/components/OnboardingUI/components/EmailForm.d.ts +1 -1
- package/dist/src/components/OnboardingUI/components/EmailForm.js +1 -1
- package/dist/src/components/OnboardingUI/components/EmailForm.js.map +1 -1
- package/dist/src/components/OnboardingUI/components/OtpForm.d.ts +1 -1
- package/dist/src/components/OnboardingUI/components/PasskeyButton.d.ts +1 -1
- package/dist/src/components/OnboardingUI/components/SocialButtons.d.ts +1 -1
- package/dist/src/components/OnboardingUI/hooks/useAuthMethods.d.ts +1 -1
- package/dist/src/components/OnboardingUI/hooks/useOnboarding.d.ts +1 -1
- package/dist/src/components/OnboardingUI/index.d.ts +1 -1
- package/dist/src/components/WalletModal/components/ChainSelector.css +249 -102
- package/dist/src/components/WalletModal/components/ChainSelector.d.ts +7 -6
- package/dist/src/components/WalletModal/components/ChainSelector.js +68 -27
- package/dist/src/components/WalletModal/components/ChainSelector.js.map +1 -1
- package/dist/src/components/WalletModal/components/ExportKeyModal.css +89 -88
- package/dist/src/components/WalletModal/components/ExportKeyModal.d.ts +6 -1
- package/dist/src/components/WalletModal/components/ExportKeyModal.js +6 -11
- package/dist/src/components/WalletModal/components/ExportKeyModal.js.map +1 -1
- package/dist/src/components/WalletModal/components/ExportWarningModal.css +107 -2
- package/dist/src/components/WalletModal/components/ExportWarningModal.d.ts +7 -1
- package/dist/src/components/WalletModal/components/ExportWarningModal.js +5 -3
- package/dist/src/components/WalletModal/components/ExportWarningModal.js.map +1 -1
- package/dist/src/components/WalletModal/components/ManageWalletModal.css +90 -4
- package/dist/src/components/WalletModal/components/ManageWalletModal.d.ts +3 -3
- package/dist/src/components/WalletModal/components/ManageWalletModal.js +28 -13
- package/dist/src/components/WalletModal/components/ManageWalletModal.js.map +1 -1
- package/dist/src/components/WalletModal/components/PreviewTransactionModal.css +3 -4
- package/dist/src/components/WalletModal/components/ReceiveModal.css +93 -58
- package/dist/src/components/WalletModal/components/ReceiveModal.js +1 -1
- package/dist/src/components/WalletModal/components/ReceiveModal.js.map +1 -1
- package/dist/src/components/WalletModal/components/SendModal.css +170 -127
- package/dist/src/components/WalletModal/components/SendModal.d.ts +4 -6
- package/dist/src/components/WalletModal/components/SendModal.js +131 -39
- package/dist/src/components/WalletModal/components/SendModal.js.map +1 -1
- package/dist/src/components/WalletModal/components/SuccessModal.css +7 -8
- package/dist/src/components/WalletModal/components/TokenSelectorModal.css +240 -0
- package/dist/src/components/WalletModal/components/TokenSelectorModal.d.ts +21 -0
- package/dist/src/components/WalletModal/components/TokenSelectorModal.js +44 -0
- package/dist/src/components/WalletModal/components/TokenSelectorModal.js.map +1 -0
- package/dist/src/components/WalletModal/components/UserAvatar.d.ts +1 -1
- package/dist/src/components/WalletModal/components/index.d.ts +2 -0
- package/dist/src/components/WalletModal/components/index.js +1 -0
- package/dist/src/components/WalletModal/components/index.js.map +1 -1
- package/dist/src/components/WalletModal/hooks/useSendTransaction.d.ts +1 -1
- package/dist/src/hooks.d.ts +402 -362
- package/dist/src/hooks.js +486 -244
- package/dist/src/hooks.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/types.d.ts +6 -6
- package/dist/src/wagmiConfig.d.ts +2 -2
- package/dist/src/wagmiConfig.js +34 -21
- package/dist/src/wagmiConfig.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for AbstraxnProvider
|
|
3
|
+
*/
|
|
4
|
+
import React, { useState } from "react";
|
|
5
|
+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
6
|
+
/**
|
|
7
|
+
* Check if React Query is available and can be used safely
|
|
8
|
+
* This is a simple check - we can't fully verify React is properly set up
|
|
9
|
+
* without trying to use it, but we can check if the dependencies exist
|
|
10
|
+
*/
|
|
11
|
+
export function canUseReactQuery() {
|
|
12
|
+
try {
|
|
13
|
+
// Check if React is available
|
|
14
|
+
if (typeof React === "undefined" || React === null) {
|
|
15
|
+
return { canUse: false, reason: "React is not available" };
|
|
16
|
+
}
|
|
17
|
+
// Check if React has the version property (indicates it's a valid React object)
|
|
18
|
+
if (!React.version) {
|
|
19
|
+
return { canUse: false, reason: "React version is not available" };
|
|
20
|
+
}
|
|
21
|
+
// Check if QueryClientProvider is available
|
|
22
|
+
if (typeof QueryClientProvider === "undefined" ||
|
|
23
|
+
QueryClientProvider === null) {
|
|
24
|
+
return {
|
|
25
|
+
canUse: false,
|
|
26
|
+
reason: "@tanstack/react-query is not installed. Please install it: npm install @tanstack/react-query@^5.90.16",
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return { canUse: true };
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
return { canUse: false, reason: `Error checking React Query: ${error}` };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Wrapper component that conditionally uses QueryClientProvider
|
|
37
|
+
* Falls back to rendering children directly if React Query is not available
|
|
38
|
+
*/
|
|
39
|
+
export function QueryClientWrapper({ children, queryClient, }) {
|
|
40
|
+
// Check if we can safely use QueryClientProvider
|
|
41
|
+
const queryCheck = canUseReactQuery();
|
|
42
|
+
if (!queryCheck.canUse) {
|
|
43
|
+
console.error("❌ React Query is not available. External wallets are disabled.\n" +
|
|
44
|
+
`Reason: ${queryCheck.reason || "Unknown"}\n` +
|
|
45
|
+
"Please install @tanstack/react-query@^5.90.16 and ensure there is only one React instance.");
|
|
46
|
+
// Return children without QueryClientProvider - external wallets won't work but app won't crash
|
|
47
|
+
return React.createElement(React.Fragment, null, children);
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
return React.createElement(QueryClientProvider, { client: queryClient }, children);
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
console.error("Failed to render QueryClientProvider:", error);
|
|
54
|
+
// Fallback: render children without QueryClientProvider
|
|
55
|
+
return React.createElement(React.Fragment, null, children);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Hook to create QueryClient
|
|
60
|
+
* Creates a QueryClient instance that's only created once per component instance
|
|
61
|
+
* Since @tanstack/react-query is now only in peerDependencies, the app's instance will be used
|
|
62
|
+
* This prevents multiple instances of the package from being bundled
|
|
63
|
+
*/
|
|
64
|
+
export function useQueryClientSafe() {
|
|
65
|
+
// Create QueryClient using useState to ensure it's only created once
|
|
66
|
+
// Since @tanstack/react-query is in peerDependencies, this will use the app's instance
|
|
67
|
+
const [queryClient] = useState(() => {
|
|
68
|
+
return new QueryClient({
|
|
69
|
+
defaultOptions: {
|
|
70
|
+
queries: {
|
|
71
|
+
refetchOnWindowFocus: false,
|
|
72
|
+
retry: false,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
return queryClient;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Check if URL has auth parameters
|
|
81
|
+
*/
|
|
82
|
+
export function hasAuthParams(params) {
|
|
83
|
+
return (params.get("success") === "true" ||
|
|
84
|
+
!!params.get("error") ||
|
|
85
|
+
!!params.get("code") ||
|
|
86
|
+
!!params.get("accessToken"));
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Extract auth provider from JWT token
|
|
90
|
+
*/
|
|
91
|
+
export function getAuthProviderFromToken(token) {
|
|
92
|
+
try {
|
|
93
|
+
const base64Url = token.split(".")[1];
|
|
94
|
+
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
95
|
+
const jsonPayload = decodeURIComponent(window
|
|
96
|
+
.atob(base64)
|
|
97
|
+
.split("")
|
|
98
|
+
.map(function (c) {
|
|
99
|
+
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
|
|
100
|
+
})
|
|
101
|
+
.join(""));
|
|
102
|
+
const payload = JSON.parse(jsonPayload);
|
|
103
|
+
return (payload.authProvider || payload.provider || "").toLowerCase();
|
|
104
|
+
}
|
|
105
|
+
catch (e) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Check if URL params match a specific OAuth provider
|
|
111
|
+
*/
|
|
112
|
+
export function matchesProvider(provider, params) {
|
|
113
|
+
const providerParam = (params.get("provider") ||
|
|
114
|
+
params.get("authProvider") ||
|
|
115
|
+
"").toLowerCase();
|
|
116
|
+
const path = window.location.pathname.toLowerCase();
|
|
117
|
+
if (providerParam) {
|
|
118
|
+
if (provider === "twitter") {
|
|
119
|
+
return providerParam === "twitter" || providerParam === "x";
|
|
120
|
+
}
|
|
121
|
+
return providerParam === provider;
|
|
122
|
+
}
|
|
123
|
+
// Check accessToken for provider
|
|
124
|
+
const accessToken = params.get("accessToken");
|
|
125
|
+
if (accessToken) {
|
|
126
|
+
const tokenProvider = getAuthProviderFromToken(accessToken);
|
|
127
|
+
if (tokenProvider) {
|
|
128
|
+
if (provider === "twitter") {
|
|
129
|
+
return tokenProvider === "twitter" || tokenProvider === "x";
|
|
130
|
+
}
|
|
131
|
+
return tokenProvider === provider;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (provider === "twitter") {
|
|
135
|
+
return path.includes("/twitter") || path.includes("/x");
|
|
136
|
+
}
|
|
137
|
+
return path.includes(`/${provider}`);
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/AbstraxnProvider/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEzE;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,IAAI,CAAC;QACH,8BAA8B;QAC9B,IAAI,OAAO,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,wBAAwB,EAAE,CAAC;QAC7D,CAAC;QAED,gFAAgF;QAChF,I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,CAAC;QAC3B,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -9,9 +9,7 @@
|
|
|
9
9
|
justify-content: center;
|
|
10
10
|
min-height: 100vh;
|
|
11
11
|
padding: 20px;
|
|
12
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
|
|
13
|
-
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
14
|
-
sans-serif;
|
|
12
|
+
font-family: 'GeistSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
|
|
15
13
|
-webkit-font-smoothing: antialiased;
|
|
16
14
|
-moz-osx-font-smoothing: grayscale;
|
|
17
15
|
}
|
|
@@ -205,7 +203,7 @@
|
|
|
205
203
|
|
|
206
204
|
.onboarding-title {
|
|
207
205
|
font-size: 24px;
|
|
208
|
-
font-weight:
|
|
206
|
+
font-weight: 500;
|
|
209
207
|
margin: 0;
|
|
210
208
|
color: inherit;
|
|
211
209
|
text-align: center;
|
|
@@ -792,7 +790,7 @@
|
|
|
792
790
|
|
|
793
791
|
.onboarding-otp-title {
|
|
794
792
|
font-size: 22px;
|
|
795
|
-
font-weight:
|
|
793
|
+
font-weight: 500;
|
|
796
794
|
margin: 0 0 16px 0;
|
|
797
795
|
color: inherit;
|
|
798
796
|
line-height: 1.4;
|
|
@@ -856,6 +854,11 @@
|
|
|
856
854
|
.onboarding-otp-verification .onboarding-button {
|
|
857
855
|
margin-top: 0;
|
|
858
856
|
margin-bottom: 0;
|
|
857
|
+
margin-left: auto;
|
|
858
|
+
margin-right: auto;
|
|
859
|
+
/* Match OTP inputs width: 6 inputs × 44px + 5 gaps × 10px = 314px */
|
|
860
|
+
width: 314px;
|
|
861
|
+
max-width: 314px;
|
|
859
862
|
}
|
|
860
863
|
|
|
861
864
|
.onboarding-otp-input {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Pure React implementation of OnboardingUI
|
|
4
4
|
*/
|
|
5
5
|
import React from "react";
|
|
6
|
-
import type { OnboardingUIConfig } from "signer-
|
|
6
|
+
import type { OnboardingUIConfig } from "@abstraxn/signer-core";
|
|
7
7
|
import "./OnboardingUI.css";
|
|
8
8
|
export interface OnboardingUIReactProps {
|
|
9
9
|
config?: Partial<OnboardingUIConfig>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isValidEmail } from "signer-
|
|
1
|
+
import { isValidEmail } from "@abstraxn/signer-core";
|
|
2
2
|
// CSS styles embedded as string
|
|
3
3
|
const ONBOARDING_UI_STYLES = `
|
|
4
4
|
.onboarding-container {
|
|
@@ -715,6 +715,12 @@ const ONBOARDING_UI_STYLES = `
|
|
|
715
715
|
width: 100%;
|
|
716
716
|
}
|
|
717
717
|
|
|
718
|
+
.onboarding-otp-verification .onboarding-button {
|
|
719
|
+
/* Match OTP inputs width: 6 inputs × 44px + 5 gaps × 10px = 314px */
|
|
720
|
+
width: 314px;
|
|
721
|
+
max-width: 314px;
|
|
722
|
+
}
|
|
723
|
+
|
|
718
724
|
.onboarding-otp-icon-container {
|
|
719
725
|
width: 64px;
|
|
720
726
|
height: 64px;
|