@funkit/connect 1.0.2 → 1.0.3
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 +10 -0
- package/dist/{chunk-C2QHNJBG.js → chunk-MQTK22MG.js} +3 -1
- package/dist/{chunk-U4FFX2HZ.js → chunk-SWTU7PBZ.js} +3 -1
- package/dist/components/FunkitProvider/FunkitCheckoutContext.d.ts +8 -5
- package/dist/components/FunkitProvider/FunkitThemeProvider.d.ts +4 -4
- package/dist/index.js +27 -16
- package/dist/themes/baseTheme.d.ts +1 -0
- package/dist/themes/darkTheme.d.ts +5 -5
- package/dist/themes/darkTheme.js +1 -1
- package/dist/themes/lightTheme.d.ts +3 -3
- package/dist/themes/lightTheme.js +1 -1
- package/dist/utils/checkout.d.ts +1 -1
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/chunk-2GAW2UBU.js +102 -0
- package/dist/wallets/walletConnectors/chunk-2PC2XXUH.js +94 -0
- package/dist/wallets/walletConnectors/chunk-75A2U7T7.js +100 -0
- package/dist/wallets/walletConnectors/chunk-CUKVUCIP.js +98 -0
- package/dist/wallets/walletConnectors/chunk-FDIIMYTB.js +73 -0
- package/dist/wallets/walletConnectors/chunk-GW6EF4G2.js +92 -0
- package/dist/wallets/walletConnectors/chunk-IBWFKX7P.js +94 -0
- package/dist/wallets/walletConnectors/chunk-N3VZE65M.js +98 -0
- package/dist/wallets/walletConnectors/chunk-OAEJQOAV.js +105 -0
- package/dist/wallets/walletConnectors/chunk-OKWOB3DN.js +66 -0
- package/dist/wallets/walletConnectors/chunk-OR3PU2W4.js +95 -0
- package/dist/wallets/walletConnectors/chunk-RTW6PVQI.js +107 -0
- package/dist/wallets/walletConnectors/chunk-SL4VH23R.js +71 -0
- package/dist/wallets/walletConnectors/chunk-SQGFKNNZ.js +102 -0
- package/dist/wallets/walletConnectors/chunk-T6JVHES7.js +87 -0
- package/dist/wallets/walletConnectors/chunk-VWZEDVW6.js +27 -0
- package/dist/wallets/walletConnectors/chunk-X255T3C4.js +178 -0
- package/dist/wallets/walletConnectors/chunk-XSSD5ZVD.js +96 -0
- package/dist/wallets/walletConnectors/chunk-YC7XNS7C.js +98 -0
- package/dist/wallets/walletConnectors/chunk-Z2HIQYVN.js +96 -0
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/dawnWallet/dawnWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +72 -72
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 1.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fc3ab0d: feat: allow customization of all theme colors
|
|
8
|
+
- 48caeec: refactor: optional checkout config
|
|
9
|
+
- Updated dependencies [6c91a63]
|
|
10
|
+
- @funkit/core@1.0.1
|
|
11
|
+
- @funkit/wagmi-tools@1.0.2
|
|
12
|
+
|
|
3
13
|
## 1.0.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -17,6 +17,7 @@ var defaultAccentColor = accentColors.white;
|
|
|
17
17
|
var lightTheme = ({
|
|
18
18
|
accentColor = defaultAccentColor.accentColor,
|
|
19
19
|
accentColorForeground = defaultAccentColor.accentColorForeground,
|
|
20
|
+
customColors,
|
|
20
21
|
...baseThemeOptions
|
|
21
22
|
} = {}) => ({
|
|
22
23
|
...baseTheme(baseThemeOptions),
|
|
@@ -76,7 +77,8 @@ var lightTheme = ({
|
|
|
76
77
|
buttonTextPrimary: "#FFFFFF",
|
|
77
78
|
buttonTextSecondary: "#000000",
|
|
78
79
|
buttonTextDisabled: "#FFF",
|
|
79
|
-
transparent: "transparent"
|
|
80
|
+
transparent: "transparent",
|
|
81
|
+
...customColors || {}
|
|
80
82
|
},
|
|
81
83
|
shadows: {
|
|
82
84
|
connectButton: "0px 4px 12px rgba(0, 0, 0, 0.1)",
|
|
@@ -17,6 +17,7 @@ var defaultAccentColor = accentColors.white;
|
|
|
17
17
|
var darkTheme = ({
|
|
18
18
|
accentColor = defaultAccentColor.accentColor,
|
|
19
19
|
accentColorForeground = defaultAccentColor.accentColorForeground,
|
|
20
|
+
customColors,
|
|
20
21
|
...baseThemeOptions
|
|
21
22
|
} = {}) => ({
|
|
22
23
|
...baseTheme(baseThemeOptions),
|
|
@@ -76,7 +77,8 @@ var darkTheme = ({
|
|
|
76
77
|
buttonTextDisabled: "#000000",
|
|
77
78
|
buttonWarning: "#C60000",
|
|
78
79
|
buttonTextWarning: "#FFF",
|
|
79
|
-
transparent: "transparent"
|
|
80
|
+
transparent: "transparent",
|
|
81
|
+
...customColors || {}
|
|
80
82
|
},
|
|
81
83
|
shadows: {
|
|
82
84
|
connectButton: "0px 4px 12px rgba(0, 0, 0, 0.1)",
|
|
@@ -66,8 +66,8 @@ export type FunkitCheckoutResult = {
|
|
|
66
66
|
metadata: object | Error;
|
|
67
67
|
};
|
|
68
68
|
interface useFunkitCheckoutProps {
|
|
69
|
-
/** @
|
|
70
|
-
config
|
|
69
|
+
/** @optional the checkout config object **/
|
|
70
|
+
config?: FunkitCheckoutConfig;
|
|
71
71
|
/** @optional fires when the checkout modal is opened **/
|
|
72
72
|
onOpen?: () => void;
|
|
73
73
|
/** @optional fires when the checkout modal is closed **/
|
|
@@ -83,6 +83,9 @@ interface useFunkitCheckoutProps {
|
|
|
83
83
|
/** @optional fires if the checkout fails at any point **/
|
|
84
84
|
onSuccess?: (result: FunkitCheckoutResult) => void;
|
|
85
85
|
}
|
|
86
|
+
type useFunkitCheckoutPropsFinal = Omit<useFunkitCheckoutProps, 'config'> & {
|
|
87
|
+
config: FunkitCheckoutConfig;
|
|
88
|
+
};
|
|
86
89
|
/**
|
|
87
90
|
* Checkout Item for frontend use
|
|
88
91
|
*/
|
|
@@ -103,8 +106,8 @@ export interface FunkitActiveCheckoutItem {
|
|
|
103
106
|
quoteErrorMessage: string;
|
|
104
107
|
/** The deposit address provided by server after the checkout is confirmed. If `null`, it is not confirmed yet. **/
|
|
105
108
|
depositAddress: null | Address;
|
|
106
|
-
/**
|
|
107
|
-
initSettings:
|
|
109
|
+
/** Final settings the checkout was init-ed with **/
|
|
110
|
+
initSettings: useFunkitCheckoutPropsFinal;
|
|
108
111
|
/** User's selected payment method information */
|
|
109
112
|
selectedPaymentMethodInfo: PaymentMethodInfo | null;
|
|
110
113
|
/** User's choice of source asset to fund the checkout operation **/
|
|
@@ -155,6 +158,6 @@ export declare const useFunkitAllPostCheckoutsInternal: () => {
|
|
|
155
158
|
* External hook for user to kickstart a checkout in their app
|
|
156
159
|
*/
|
|
157
160
|
export declare const useFunkitCheckout: (props: useFunkitCheckoutProps) => {
|
|
158
|
-
beginCheckout: (inputConfig?:
|
|
161
|
+
beginCheckout: (inputConfig?: FunkitCheckoutConfig) => Promise<void>;
|
|
159
162
|
};
|
|
160
163
|
export {};
|
|
@@ -29,10 +29,10 @@ export declare const defaultTheme: {
|
|
|
29
29
|
profileActionHover: string;
|
|
30
30
|
profileForeground: string;
|
|
31
31
|
selectedOptionBorder: string;
|
|
32
|
+
standby: string;
|
|
32
33
|
solidLine: string;
|
|
33
|
-
rightTranslucentLine: string;
|
|
34
34
|
leftTranslucentLine: string;
|
|
35
|
-
|
|
35
|
+
rightTranslucentLine: string;
|
|
36
36
|
loadingBase: string;
|
|
37
37
|
loadingAccent: string;
|
|
38
38
|
modalBackdrop: string;
|
|
@@ -52,11 +52,11 @@ export declare const defaultTheme: {
|
|
|
52
52
|
buttonPrimary: string;
|
|
53
53
|
buttonProcessing: string;
|
|
54
54
|
buttonDisabled: string;
|
|
55
|
+
buttonWarning: string;
|
|
56
|
+
buttonTextWarning: string;
|
|
55
57
|
buttonTextPrimary: string;
|
|
56
58
|
buttonTextSecondary: string;
|
|
57
59
|
buttonTextDisabled: string;
|
|
58
|
-
buttonWarning: string;
|
|
59
|
-
buttonTextWarning: string;
|
|
60
60
|
transparent: string;
|
|
61
61
|
};
|
|
62
62
|
shadows: {
|
package/dist/index.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
en_US_default
|
|
4
4
|
} from "./chunk-SW6GAS7K.js";
|
|
5
|
-
import {
|
|
6
|
-
lightTheme
|
|
7
|
-
} from "./chunk-C2QHNJBG.js";
|
|
8
5
|
import {
|
|
9
6
|
darkTheme
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SWTU7PBZ.js";
|
|
8
|
+
import {
|
|
9
|
+
lightTheme
|
|
10
|
+
} from "./chunk-MQTK22MG.js";
|
|
11
11
|
import "./chunk-VP4CAK4A.js";
|
|
12
12
|
|
|
13
13
|
// src/components/ConnectButton/ConnectButton.tsx
|
|
@@ -1791,6 +1791,12 @@ function validateCheckoutConfig(config) {
|
|
|
1791
1791
|
message: "Invalid targetAssetAmount configuration: Has to be a number greater than 0"
|
|
1792
1792
|
};
|
|
1793
1793
|
}
|
|
1794
|
+
if (!config.actionsParams) {
|
|
1795
|
+
return {
|
|
1796
|
+
isValid: false,
|
|
1797
|
+
message: "Invalid actionsParams configuration: Has to be an array. If no actions are required, please specify an empty array ([]) instead."
|
|
1798
|
+
};
|
|
1799
|
+
}
|
|
1794
1800
|
if (!FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO[config.targetChain]) {
|
|
1795
1801
|
return {
|
|
1796
1802
|
isValid: false,
|
|
@@ -2071,7 +2077,6 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
2071
2077
|
apiKey: funkitConfig.apiKey
|
|
2072
2078
|
});
|
|
2073
2079
|
}
|
|
2074
|
-
logger.log("newCheckoutHistoryList", newCheckoutHistoryList);
|
|
2075
2080
|
setCheckoutHistoryList(
|
|
2076
2081
|
newCheckoutHistoryList.sort((a, b) => b.createdTimeMs - a.createdTimeMs)
|
|
2077
2082
|
);
|
|
@@ -2658,7 +2663,8 @@ var useFunkitAllPostCheckoutsInternal = () => {
|
|
|
2658
2663
|
};
|
|
2659
2664
|
};
|
|
2660
2665
|
var useFunkitCheckout = (props) => {
|
|
2661
|
-
const {
|
|
2666
|
+
const { onValidation, onError } = props;
|
|
2667
|
+
const propsConfig = useMemo6(() => (props == null ? void 0 : props.config) || {}, [props == null ? void 0 : props.config]);
|
|
2662
2668
|
const actualWagmiConfig = useConfig2();
|
|
2663
2669
|
const { _initNewCheckout } = useContext9(FunkitCheckoutContext);
|
|
2664
2670
|
const { openFunCheckoutModal } = useFunCheckoutModal();
|
|
@@ -2681,25 +2687,30 @@ var useFunkitCheckout = (props) => {
|
|
|
2681
2687
|
[openFunCheckoutModal, props]
|
|
2682
2688
|
);
|
|
2683
2689
|
const beginCheckout = useCallback5(
|
|
2684
|
-
async (inputConfig
|
|
2685
|
-
const
|
|
2690
|
+
async (inputConfig) => {
|
|
2691
|
+
const combinedConfig = {
|
|
2692
|
+
...propsConfig || {},
|
|
2693
|
+
...inputConfig || {}
|
|
2694
|
+
};
|
|
2695
|
+
const validationResult = validateCheckoutConfig(combinedConfig);
|
|
2686
2696
|
onValidation == null ? void 0 : onValidation(validationResult);
|
|
2687
2697
|
if (validationResult.isValid) {
|
|
2688
|
-
|
|
2689
|
-
|
|
2698
|
+
const finalConfig = combinedConfig;
|
|
2699
|
+
let newId = _initNewCheckout == null ? void 0 : _initNewCheckout({ ...props, config: finalConfig }, false);
|
|
2700
|
+
if (isUserLoggedIn || !!finalConfig.customRecipient) {
|
|
2690
2701
|
if (isUserLoggedIn) {
|
|
2691
2702
|
const { result, tokenTicker } = await testAutoExecutionDuringCheckout(
|
|
2692
|
-
|
|
2703
|
+
finalConfig,
|
|
2693
2704
|
walletAddress,
|
|
2694
2705
|
actualWagmiConfig
|
|
2695
2706
|
);
|
|
2696
2707
|
if (result) {
|
|
2697
2708
|
newId = _initNewCheckout == null ? void 0 : _initNewCheckout(
|
|
2698
|
-
{ ...props, config:
|
|
2709
|
+
{ ...props, config: finalConfig },
|
|
2699
2710
|
true,
|
|
2700
2711
|
tokenTicker
|
|
2701
2712
|
);
|
|
2702
|
-
} else if (!FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO3[
|
|
2713
|
+
} else if (!FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO3[finalConfig.targetChain].isFiatCheckoutSupported) {
|
|
2703
2714
|
onErrorWrapper == null ? void 0 : onErrorWrapper({
|
|
2704
2715
|
type: "error",
|
|
2705
2716
|
message: "Unable to begin a new checkout: Insufficient funds on testnet account",
|
|
@@ -2711,7 +2722,7 @@ var useFunkitCheckout = (props) => {
|
|
|
2711
2722
|
onOpenWrapper == null ? void 0 : onOpenWrapper(newId);
|
|
2712
2723
|
} else {
|
|
2713
2724
|
openConnectModal == null ? void 0 : openConnectModal();
|
|
2714
|
-
setWaitingLogin(
|
|
2725
|
+
setWaitingLogin(finalConfig);
|
|
2715
2726
|
}
|
|
2716
2727
|
} else {
|
|
2717
2728
|
onErrorWrapper == null ? void 0 : onErrorWrapper({
|
|
@@ -2722,7 +2733,7 @@ var useFunkitCheckout = (props) => {
|
|
|
2722
2733
|
}
|
|
2723
2734
|
},
|
|
2724
2735
|
[
|
|
2725
|
-
|
|
2736
|
+
propsConfig,
|
|
2726
2737
|
onValidation,
|
|
2727
2738
|
_initNewCheckout,
|
|
2728
2739
|
props,
|
|
@@ -14731,7 +14742,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
14731
14742
|
localStorage.setItem(storageKey4, version);
|
|
14732
14743
|
}
|
|
14733
14744
|
function getCurrentSdkVersion() {
|
|
14734
|
-
return "1.0.
|
|
14745
|
+
return "1.0.3";
|
|
14735
14746
|
}
|
|
14736
14747
|
function useFingerprint() {
|
|
14737
14748
|
const fingerprint = useCallback26(() => {
|
|
@@ -21,5 +21,6 @@ export type AccentColorPreset = 'blue' | 'green' | 'red' | 'purple' | 'pink' | '
|
|
|
21
21
|
export interface ThemeOptions extends BaseThemeOptions {
|
|
22
22
|
accentColor?: string;
|
|
23
23
|
accentColorForeground?: string;
|
|
24
|
+
customColors?: Partial<ThemeVars['colors']>;
|
|
24
25
|
}
|
|
25
26
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AccentColor, AccentColorPreset, ThemeOptions } from './baseTheme';
|
|
2
2
|
export declare const darkTheme: {
|
|
3
|
-
({ accentColor, accentColorForeground, ...baseThemeOptions }?: ThemeOptions): {
|
|
3
|
+
({ accentColor, accentColorForeground, customColors, ...baseThemeOptions }?: ThemeOptions): {
|
|
4
4
|
colors: {
|
|
5
5
|
accentColor: string;
|
|
6
6
|
accentColorForeground: string;
|
|
@@ -29,10 +29,10 @@ export declare const darkTheme: {
|
|
|
29
29
|
profileActionHover: string;
|
|
30
30
|
profileForeground: string;
|
|
31
31
|
selectedOptionBorder: string;
|
|
32
|
+
standby: string;
|
|
32
33
|
solidLine: string;
|
|
33
|
-
rightTranslucentLine: string;
|
|
34
34
|
leftTranslucentLine: string;
|
|
35
|
-
|
|
35
|
+
rightTranslucentLine: string;
|
|
36
36
|
loadingBase: string;
|
|
37
37
|
loadingAccent: string;
|
|
38
38
|
modalBackdrop: string;
|
|
@@ -52,11 +52,11 @@ export declare const darkTheme: {
|
|
|
52
52
|
buttonPrimary: string;
|
|
53
53
|
buttonProcessing: string;
|
|
54
54
|
buttonDisabled: string;
|
|
55
|
+
buttonWarning: string;
|
|
56
|
+
buttonTextWarning: string;
|
|
55
57
|
buttonTextPrimary: string;
|
|
56
58
|
buttonTextSecondary: string;
|
|
57
59
|
buttonTextDisabled: string;
|
|
58
|
-
buttonWarning: string;
|
|
59
|
-
buttonTextWarning: string;
|
|
60
60
|
transparent: string;
|
|
61
61
|
};
|
|
62
62
|
shadows: {
|
package/dist/themes/darkTheme.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AccentColor, AccentColorPreset, ThemeOptions } from './baseTheme';
|
|
2
2
|
export declare const lightTheme: {
|
|
3
|
-
({ accentColor, accentColorForeground, ...baseThemeOptions }?: ThemeOptions): {
|
|
3
|
+
({ accentColor, accentColorForeground, customColors, ...baseThemeOptions }?: ThemeOptions): {
|
|
4
4
|
colors: {
|
|
5
5
|
accentColor: string;
|
|
6
6
|
accentColorForeground: string;
|
|
@@ -29,10 +29,10 @@ export declare const lightTheme: {
|
|
|
29
29
|
profileActionHover: string;
|
|
30
30
|
profileForeground: string;
|
|
31
31
|
selectedOptionBorder: string;
|
|
32
|
+
standby: string;
|
|
32
33
|
solidLine: string;
|
|
33
|
-
rightTranslucentLine: string;
|
|
34
34
|
leftTranslucentLine: string;
|
|
35
|
-
|
|
35
|
+
rightTranslucentLine: string;
|
|
36
36
|
loadingBase: string;
|
|
37
37
|
loadingAccent: string;
|
|
38
38
|
modalBackdrop: string;
|
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const DUMMY_TRANSFER_PARAMS: {
|
|
|
13
13
|
* @param config - The checkout configuration to validate.
|
|
14
14
|
* @returns An object indicating whether the configuration is valid and a message if it is not.
|
|
15
15
|
*/
|
|
16
|
-
export declare function validateCheckoutConfig(config: FunkitCheckoutConfig): {
|
|
16
|
+
export declare function validateCheckoutConfig(config: Partial<FunkitCheckoutConfig>): {
|
|
17
17
|
isValid: boolean;
|
|
18
18
|
message: string;
|
|
19
19
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bifrostWallet
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-SL4VH23R.js";
|
|
5
|
+
import "../chunk-QII6PY2D.js";
|
|
5
6
|
import "../chunk-ZOLACFTK.js";
|
|
6
7
|
import "../chunk-ZDU3JFGR.js";
|
|
7
|
-
import "../chunk-QII6PY2D.js";
|
|
8
8
|
export {
|
|
9
9
|
bifrostWallet
|
|
10
10
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bitgetWallet
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-75A2U7T7.js";
|
|
5
|
+
import "../chunk-QII6PY2D.js";
|
|
5
6
|
import "../chunk-ZOLACFTK.js";
|
|
6
7
|
import "../chunk-ZDU3JFGR.js";
|
|
7
|
-
import "../chunk-QII6PY2D.js";
|
|
8
8
|
export {
|
|
9
9
|
bitgetWallet
|
|
10
10
|
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-QII6PY2D.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-ZDU3JFGR.js";
|
|
9
|
+
|
|
10
|
+
// src/wallets/walletConnectors/subWallet/subWallet.ts
|
|
11
|
+
var subWallet = ({
|
|
12
|
+
projectId,
|
|
13
|
+
walletConnectParameters
|
|
14
|
+
}) => {
|
|
15
|
+
const isSubWalletInjected = hasInjectedProvider({ namespace: "SubWallet" });
|
|
16
|
+
const shouldUseWalletConnect = !isSubWalletInjected;
|
|
17
|
+
const getUriMobile = (uri) => {
|
|
18
|
+
return `subwallet://wc?uri=${encodeURIComponent(uri)}`;
|
|
19
|
+
};
|
|
20
|
+
const getUriQR = (uri) => {
|
|
21
|
+
return uri;
|
|
22
|
+
};
|
|
23
|
+
const mobileConnector = {
|
|
24
|
+
getUri: shouldUseWalletConnect ? getUriMobile : void 0
|
|
25
|
+
};
|
|
26
|
+
let qrConnector = void 0;
|
|
27
|
+
if (shouldUseWalletConnect) {
|
|
28
|
+
qrConnector = {
|
|
29
|
+
getUri: getUriQR,
|
|
30
|
+
instructions: {
|
|
31
|
+
learnMoreUrl: "https://www.subwallet.app/",
|
|
32
|
+
steps: [
|
|
33
|
+
{
|
|
34
|
+
description: "wallet_connectors.subwallet.qr_code.step1.description",
|
|
35
|
+
step: "install",
|
|
36
|
+
title: "wallet_connectors.subwallet.qr_code.step1.title"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
description: "wallet_connectors.subwallet.qr_code.step2.description",
|
|
40
|
+
step: "create",
|
|
41
|
+
title: "wallet_connectors.subwallet.qr_code.step2.title"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
description: "wallet_connectors.subwallet.qr_code.step3.description",
|
|
45
|
+
step: "scan",
|
|
46
|
+
title: "wallet_connectors.subwallet.qr_code.step3.title"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
const extensionConnector = {
|
|
53
|
+
instructions: {
|
|
54
|
+
learnMoreUrl: "https://www.subwallet.app/",
|
|
55
|
+
steps: [
|
|
56
|
+
{
|
|
57
|
+
description: "wallet_connectors.subwallet.extension.step1.description",
|
|
58
|
+
step: "install",
|
|
59
|
+
title: "wallet_connectors.subwallet.extension.step1.title"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
description: "wallet_connectors.subwallet.extension.step2.description",
|
|
63
|
+
step: "create",
|
|
64
|
+
title: "wallet_connectors.subwallet.extension.step2.title"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
description: "wallet_connectors.subwallet.extension.step3.description",
|
|
68
|
+
step: "refresh",
|
|
69
|
+
title: "wallet_connectors.subwallet.extension.step3.title"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return {
|
|
75
|
+
id: "subwallet",
|
|
76
|
+
name: "SubWallet",
|
|
77
|
+
iconUrl: async () => (await import("./subWallet-ELA2UJOS.js")).default,
|
|
78
|
+
iconBackground: "#fff",
|
|
79
|
+
installed: isSubWalletInjected || void 0,
|
|
80
|
+
downloadUrls: {
|
|
81
|
+
browserExtension: "https://www.subwallet.app/download",
|
|
82
|
+
chrome: "https://chrome.google.com/webstore/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn",
|
|
83
|
+
firefox: "https://addons.mozilla.org/en-US/firefox/addon/subwallet/",
|
|
84
|
+
edge: "https://chrome.google.com/webstore/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn",
|
|
85
|
+
mobile: "https://www.subwallet.app/download",
|
|
86
|
+
android: "https://play.google.com/store/apps/details?id=app.subwallet.mobile",
|
|
87
|
+
ios: "https://apps.apple.com/us/app/subwallet-polkadot-wallet/id1633050285",
|
|
88
|
+
qrCode: "https://www.subwallet.app/download"
|
|
89
|
+
},
|
|
90
|
+
mobile: mobileConnector,
|
|
91
|
+
qrCode: qrConnector,
|
|
92
|
+
extension: extensionConnector,
|
|
93
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
94
|
+
projectId,
|
|
95
|
+
walletConnectParameters
|
|
96
|
+
}) : getInjectedConnector({ namespace: "SubWallet" })
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export {
|
|
101
|
+
subWallet
|
|
102
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-QII6PY2D.js";
|
|
6
|
+
import {
|
|
7
|
+
isAndroid
|
|
8
|
+
} from "./chunk-ZOLACFTK.js";
|
|
9
|
+
import {
|
|
10
|
+
getWalletConnectConnector
|
|
11
|
+
} from "./chunk-ZDU3JFGR.js";
|
|
12
|
+
|
|
13
|
+
// src/wallets/walletConnectors/gateWallet/gateWallet.ts
|
|
14
|
+
var gateWallet = ({
|
|
15
|
+
projectId,
|
|
16
|
+
walletConnectParameters
|
|
17
|
+
}) => {
|
|
18
|
+
const isGateInjected = hasInjectedProvider({ namespace: "gatewallet" });
|
|
19
|
+
const shouldUseWalletConnect = !isGateInjected;
|
|
20
|
+
return {
|
|
21
|
+
id: "gate",
|
|
22
|
+
name: "Gate Wallet",
|
|
23
|
+
rdns: "io.gate.wallet",
|
|
24
|
+
iconUrl: async () => (await import("./gateWallet-GFLHFAGG.js")).default,
|
|
25
|
+
iconAccent: "#fff",
|
|
26
|
+
iconBackground: "#fff",
|
|
27
|
+
downloadUrls: {
|
|
28
|
+
android: "https://play.google.com/store/apps/details?id=com.gateio.gateio",
|
|
29
|
+
ios: "https://apps.apple.com/us/app/gate-io-buy-bitcoin-crypto/id1294998195",
|
|
30
|
+
mobile: "https://www.gate.io/mobileapp",
|
|
31
|
+
qrCode: "https://www.gate.io/web3",
|
|
32
|
+
chrome: "https://chromewebstore.google.com/detail/gate-wallet/cpmkedoipcpimgecpmgpldfpohjplkpp",
|
|
33
|
+
browserExtension: "https://www.gate.io/web3"
|
|
34
|
+
},
|
|
35
|
+
mobile: {
|
|
36
|
+
getUri: shouldUseWalletConnect ? (uri) => {
|
|
37
|
+
return isAndroid() ? uri : `gtweb3wallet://wc?uri=${encodeURIComponent(uri)}`;
|
|
38
|
+
} : void 0
|
|
39
|
+
},
|
|
40
|
+
qrCode: shouldUseWalletConnect ? {
|
|
41
|
+
getUri: (uri) => uri,
|
|
42
|
+
instructions: {
|
|
43
|
+
learnMoreUrl: "https://www.gate.io/learn",
|
|
44
|
+
steps: [
|
|
45
|
+
{
|
|
46
|
+
description: "wallet_connectors.gate.qr_code.step1.description",
|
|
47
|
+
step: "install",
|
|
48
|
+
title: "wallet_connectors.gate.qr_code.step1.title"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
description: "wallet_connectors.gate.qr_code.step2.description",
|
|
52
|
+
step: "create",
|
|
53
|
+
title: "wallet_connectors.gate.qr_code.step2.title"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
description: "wallet_connectors.gate.qr_code.step3.description",
|
|
57
|
+
step: "scan",
|
|
58
|
+
title: "wallet_connectors.gate.qr_code.step3.title"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
} : void 0,
|
|
63
|
+
extension: {
|
|
64
|
+
instructions: {
|
|
65
|
+
learnMoreUrl: "https://www.gate.io/learn",
|
|
66
|
+
steps: [
|
|
67
|
+
{
|
|
68
|
+
description: "wallet_connectors.gate.extension.step1.description",
|
|
69
|
+
step: "install",
|
|
70
|
+
title: "wallet_connectors.gate.extension.step1.title"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
description: "wallet_connectors.gate.extension.step2.description",
|
|
74
|
+
step: "create",
|
|
75
|
+
title: "wallet_connectors.gate.extension.step2.title"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
description: "wallet_connectors.gate.extension.step3.description",
|
|
79
|
+
step: "refresh",
|
|
80
|
+
title: "wallet_connectors.gate.extension.step3.title"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
86
|
+
projectId,
|
|
87
|
+
walletConnectParameters
|
|
88
|
+
}) : getInjectedConnector({ namespace: "gatewallet" })
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export {
|
|
93
|
+
gateWallet
|
|
94
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-QII6PY2D.js";
|
|
6
|
+
import {
|
|
7
|
+
isAndroid
|
|
8
|
+
} from "./chunk-ZOLACFTK.js";
|
|
9
|
+
import {
|
|
10
|
+
getWalletConnectConnector
|
|
11
|
+
} from "./chunk-ZDU3JFGR.js";
|
|
12
|
+
|
|
13
|
+
// src/wallets/walletConnectors/bitgetWallet/bitgetWallet.ts
|
|
14
|
+
var bitgetWallet = ({
|
|
15
|
+
projectId,
|
|
16
|
+
walletConnectParameters
|
|
17
|
+
}) => {
|
|
18
|
+
const isBitKeepInjected = hasInjectedProvider({
|
|
19
|
+
namespace: "bitkeep.ethereum",
|
|
20
|
+
flag: "isBitKeep"
|
|
21
|
+
});
|
|
22
|
+
const shouldUseWalletConnect = !isBitKeepInjected;
|
|
23
|
+
return {
|
|
24
|
+
id: "bitget",
|
|
25
|
+
name: "Bitget Wallet",
|
|
26
|
+
iconUrl: async () => (await import("./bitgetWallet-JVNCB4EB.js")).default,
|
|
27
|
+
iconAccent: "#f6851a",
|
|
28
|
+
iconBackground: "#fff",
|
|
29
|
+
installed: !shouldUseWalletConnect ? isBitKeepInjected : void 0,
|
|
30
|
+
downloadUrls: {
|
|
31
|
+
android: "https://web3.bitget.com/en/wallet-download?type=0",
|
|
32
|
+
ios: "https://apps.apple.com/app/bitkeep/id1395301115",
|
|
33
|
+
mobile: "https://web3.bitget.com/en/wallet-download?type=2",
|
|
34
|
+
qrCode: "https://web3.bitget.com/en/wallet-download",
|
|
35
|
+
chrome: "https://chrome.google.com/webstore/detail/bitkeep-crypto-nft-wallet/jiidiaalihmmhddjgbnbgdfflelocpak",
|
|
36
|
+
browserExtension: "https://web3.bitget.com/en/wallet-download"
|
|
37
|
+
},
|
|
38
|
+
extension: {
|
|
39
|
+
instructions: {
|
|
40
|
+
learnMoreUrl: "https://web3.bitget.com/en/academy",
|
|
41
|
+
steps: [
|
|
42
|
+
{
|
|
43
|
+
description: "wallet_connectors.bitget.extension.step1.description",
|
|
44
|
+
step: "install",
|
|
45
|
+
title: "wallet_connectors.bitget.extension.step1.title"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
description: "wallet_connectors.bitget.extension.step2.description",
|
|
49
|
+
step: "create",
|
|
50
|
+
title: "wallet_connectors.bitget.extension.step2.title"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
description: "wallet_connectors.bitget.extension.step3.description",
|
|
54
|
+
step: "refresh",
|
|
55
|
+
title: "wallet_connectors.bitget.extension.step3.description"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
mobile: {
|
|
61
|
+
getUri: shouldUseWalletConnect ? (uri) => {
|
|
62
|
+
return isAndroid() ? uri : `bitkeep://wc?uri=${encodeURIComponent(uri)}`;
|
|
63
|
+
} : void 0
|
|
64
|
+
},
|
|
65
|
+
qrCode: shouldUseWalletConnect ? {
|
|
66
|
+
getUri: (uri) => uri,
|
|
67
|
+
instructions: {
|
|
68
|
+
learnMoreUrl: "https://web3.bitget.com/en/academy",
|
|
69
|
+
steps: [
|
|
70
|
+
{
|
|
71
|
+
description: "wallet_connectors.bitget.qr_code.step1.description",
|
|
72
|
+
step: "install",
|
|
73
|
+
title: "wallet_connectors.bitget.qr_code.step1.title"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
description: "wallet_connectors.bitget.qr_code.step2.description",
|
|
77
|
+
step: "create",
|
|
78
|
+
title: "wallet_connectors.bitget.qr_code.step2.title"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
description: "wallet_connectors.bitget.qr_code.step3.description",
|
|
82
|
+
step: "scan",
|
|
83
|
+
title: "wallet_connectors.bitget.qr_code.step3.title"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
} : void 0,
|
|
88
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
89
|
+
projectId,
|
|
90
|
+
walletConnectParameters
|
|
91
|
+
}) : getInjectedConnector({
|
|
92
|
+
namespace: "bitkeep.ethereum",
|
|
93
|
+
flag: "isBitKeep"
|
|
94
|
+
})
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export {
|
|
99
|
+
bitgetWallet
|
|
100
|
+
};
|