@funkit/connect 1.0.2 → 1.0.4

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 (62) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/{chunk-C2QHNJBG.js → chunk-MQTK22MG.js} +3 -1
  3. package/dist/{chunk-U4FFX2HZ.js → chunk-SWTU7PBZ.js} +3 -1
  4. package/dist/components/FunkitProvider/FunkitCheckoutContext.d.ts +8 -5
  5. package/dist/components/FunkitProvider/FunkitThemeProvider.d.ts +4 -4
  6. package/dist/index.js +29 -16
  7. package/dist/themes/baseTheme.d.ts +1 -0
  8. package/dist/themes/darkTheme.d.ts +5 -5
  9. package/dist/themes/darkTheme.js +1 -1
  10. package/dist/themes/lightTheme.d.ts +3 -3
  11. package/dist/themes/lightTheme.js +1 -1
  12. package/dist/utils/checkout.d.ts +1 -1
  13. package/dist/wallets/walletConnectors/argentWallet/argentWallet.js +2 -2
  14. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  15. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  16. package/dist/wallets/walletConnectors/bloomWallet/bloomWallet.js +2 -2
  17. package/dist/wallets/walletConnectors/chunk-2GAW2UBU.js +102 -0
  18. package/dist/wallets/walletConnectors/chunk-AJKRYTH2.js +92 -0
  19. package/dist/wallets/walletConnectors/chunk-CUKVUCIP.js +98 -0
  20. package/dist/wallets/walletConnectors/chunk-CVGDYGHA.js +60 -0
  21. package/dist/wallets/walletConnectors/chunk-DV3SI63E.js +96 -0
  22. package/dist/wallets/walletConnectors/chunk-GW6EF4G2.js +92 -0
  23. package/dist/wallets/walletConnectors/chunk-IBWFKX7P.js +94 -0
  24. package/dist/wallets/walletConnectors/chunk-MU35GKP3.js +71 -0
  25. package/dist/wallets/walletConnectors/chunk-OKWOB3DN.js +66 -0
  26. package/dist/wallets/walletConnectors/chunk-OKZSWAPF.js +60 -0
  27. package/dist/wallets/walletConnectors/chunk-OYKWP3N3.js +60 -0
  28. package/dist/wallets/walletConnectors/chunk-OYW4TIA3.js +81 -0
  29. package/dist/wallets/walletConnectors/chunk-PPFSHJTA.js +95 -0
  30. package/dist/wallets/walletConnectors/chunk-RCWZ4KBR.js +73 -0
  31. package/dist/wallets/walletConnectors/chunk-RTW6PVQI.js +107 -0
  32. package/dist/wallets/walletConnectors/chunk-RYO26XSK.js +100 -0
  33. package/dist/wallets/walletConnectors/chunk-SPLW3CCH.js +98 -0
  34. package/dist/wallets/walletConnectors/chunk-T6JVHES7.js +87 -0
  35. package/dist/wallets/walletConnectors/chunk-VSZ7PAHS.js +94 -0
  36. package/dist/wallets/walletConnectors/chunk-XNNLZXHE.js +102 -0
  37. package/dist/wallets/walletConnectors/chunk-XRMAVTK7.js +178 -0
  38. package/dist/wallets/walletConnectors/chunk-Z2HIQYVN.js +96 -0
  39. package/dist/wallets/walletConnectors/chunk-ZFXXHGAS.js +105 -0
  40. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  41. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  42. package/dist/wallets/walletConnectors/index.js +76 -76
  43. package/dist/wallets/walletConnectors/ledgerWallet/ledgerWallet.js +2 -2
  44. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  45. package/dist/wallets/walletConnectors/oktoWallet/oktoWallet.js +2 -2
  46. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  47. package/dist/wallets/walletConnectors/omniWallet/omniWallet.js +2 -2
  48. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  49. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  50. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  51. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  52. package/package.json +3 -3
  53. package/dist/wallets/walletConnectors/{chunk-ZNXQ4V6G.js → chunk-2B3SPBRY.js} +3 -3
  54. package/dist/wallets/walletConnectors/{chunk-NGXIHASN.js → chunk-2LY3WMXK.js} +3 -3
  55. package/dist/wallets/walletConnectors/{chunk-3WZRNEZH.js → chunk-2XQJ2NQ4.js} +3 -3
  56. package/dist/wallets/walletConnectors/{chunk-2UXZAUWT.js → chunk-7KDOXASH.js} +3 -3
  57. package/dist/wallets/walletConnectors/{chunk-Z2DGDHHZ.js → chunk-CRSPGVPF.js} +3 -3
  58. package/dist/wallets/walletConnectors/{chunk-O5NKWWEG.js → chunk-DNOEX5NF.js} +3 -3
  59. package/dist/wallets/walletConnectors/{chunk-AM4SSLAP.js → chunk-HD5VYJNC.js} +3 -3
  60. package/dist/wallets/walletConnectors/{chunk-V45EXW7A.js → chunk-HXYRONSJ.js} +3 -3
  61. package/dist/wallets/walletConnectors/{chunk-6LTLPR2Q.js → chunk-KGTZ6E7L.js} +3 -3
  62. package/dist/wallets/walletConnectors/{chunk-7CQPABJG.js → chunk-MCTPLICE.js} +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 1.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - c1a7e76: fix: brokerage additional verifications
8
+
9
+ ## 1.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - fc3ab0d: feat: allow customization of all theme colors
14
+ - 48caeec: refactor: optional checkout config
15
+ - Updated dependencies [6c91a63]
16
+ - @funkit/core@1.0.1
17
+ - @funkit/wagmi-tools@1.0.2
18
+
3
19
  ## 1.0.2
4
20
 
5
21
  ### 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
- /** @required the checkout config object **/
70
- config: FunkitCheckoutConfig;
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
- /** Settings the checkout was init-ed with **/
107
- initSettings: useFunkitCheckoutProps;
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?: useFunkitCheckoutProps['config']) => Promise<void>;
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
- standby: string;
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
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-SW6GAS7K.js";
5
5
  import {
6
6
  lightTheme
7
- } from "./chunk-C2QHNJBG.js";
7
+ } from "./chunk-MQTK22MG.js";
8
8
  import {
9
9
  darkTheme
10
- } from "./chunk-U4FFX2HZ.js";
10
+ } from "./chunk-SWTU7PBZ.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,
@@ -2658,7 +2664,8 @@ var useFunkitAllPostCheckoutsInternal = () => {
2658
2664
  };
2659
2665
  };
2660
2666
  var useFunkitCheckout = (props) => {
2661
- const { config, onValidation, onError } = props;
2667
+ const { onValidation, onError } = props;
2668
+ const propsConfig = useMemo6(() => (props == null ? void 0 : props.config) || {}, [props == null ? void 0 : props.config]);
2662
2669
  const actualWagmiConfig = useConfig2();
2663
2670
  const { _initNewCheckout } = useContext9(FunkitCheckoutContext);
2664
2671
  const { openFunCheckoutModal } = useFunCheckoutModal();
@@ -2681,25 +2688,30 @@ var useFunkitCheckout = (props) => {
2681
2688
  [openFunCheckoutModal, props]
2682
2689
  );
2683
2690
  const beginCheckout = useCallback5(
2684
- async (inputConfig = config) => {
2685
- const validationResult = validateCheckoutConfig(inputConfig);
2691
+ async (inputConfig) => {
2692
+ const combinedConfig = {
2693
+ ...propsConfig || {},
2694
+ ...inputConfig || {}
2695
+ };
2696
+ const validationResult = validateCheckoutConfig(combinedConfig);
2686
2697
  onValidation == null ? void 0 : onValidation(validationResult);
2687
2698
  if (validationResult.isValid) {
2688
- let newId = _initNewCheckout == null ? void 0 : _initNewCheckout({ ...props, config: inputConfig }, false);
2689
- if (isUserLoggedIn || !!inputConfig.customRecipient) {
2699
+ const finalConfig = combinedConfig;
2700
+ let newId = _initNewCheckout == null ? void 0 : _initNewCheckout({ ...props, config: finalConfig }, false);
2701
+ if (isUserLoggedIn || !!finalConfig.customRecipient) {
2690
2702
  if (isUserLoggedIn) {
2691
2703
  const { result, tokenTicker } = await testAutoExecutionDuringCheckout(
2692
- inputConfig,
2704
+ finalConfig,
2693
2705
  walletAddress,
2694
2706
  actualWagmiConfig
2695
2707
  );
2696
2708
  if (result) {
2697
2709
  newId = _initNewCheckout == null ? void 0 : _initNewCheckout(
2698
- { ...props, config: inputConfig },
2710
+ { ...props, config: finalConfig },
2699
2711
  true,
2700
2712
  tokenTicker
2701
2713
  );
2702
- } else if (!FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO3[inputConfig.targetChain].isFiatCheckoutSupported) {
2714
+ } else if (!FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO3[finalConfig.targetChain].isFiatCheckoutSupported) {
2703
2715
  onErrorWrapper == null ? void 0 : onErrorWrapper({
2704
2716
  type: "error",
2705
2717
  message: "Unable to begin a new checkout: Insufficient funds on testnet account",
@@ -2711,7 +2723,7 @@ var useFunkitCheckout = (props) => {
2711
2723
  onOpenWrapper == null ? void 0 : onOpenWrapper(newId);
2712
2724
  } else {
2713
2725
  openConnectModal == null ? void 0 : openConnectModal();
2714
- setWaitingLogin(inputConfig);
2726
+ setWaitingLogin(finalConfig);
2715
2727
  }
2716
2728
  } else {
2717
2729
  onErrorWrapper == null ? void 0 : onErrorWrapper({
@@ -2722,7 +2734,7 @@ var useFunkitCheckout = (props) => {
2722
2734
  }
2723
2735
  },
2724
2736
  [
2725
- config,
2737
+ propsConfig,
2726
2738
  onValidation,
2727
2739
  _initNewCheckout,
2728
2740
  props,
@@ -5646,6 +5658,7 @@ function FunMeshVerificationStep({
5646
5658
  setExecutionError("Invalid payment method configuration.");
5647
5659
  return;
5648
5660
  }
5661
+ logger.log("inputs", { finalOtpInput });
5649
5662
  const res = await executeBrokerageDeposit(
5650
5663
  accessToken,
5651
5664
  exchange,
@@ -5782,7 +5795,7 @@ function FunMeshVerificationStep({
5782
5795
  height: 16,
5783
5796
  width: 16
5784
5797
  })) : null,
5785
- onClick: handleCompletion,
5798
+ onClick: async () => await handleCompletion(),
5786
5799
  title: "Continue"
5787
5800
  })) : null);
5788
5801
  }
@@ -12438,7 +12451,7 @@ function FunCheckoutHistoryDetail({
12438
12451
  step: isCheckoutSpecialCrFlow ? 2 : isTerminal ? 3 : 2,
12439
12452
  totalSteps: timelineLabels.length,
12440
12453
  labels: timelineLabels
12441
- }), isCheckoutSpecialCrFlow || isTerminal ? null : /* @__PURE__ */ React132.createElement(Box, {
12454
+ }), isTerminal ? null : /* @__PURE__ */ React132.createElement(Box, {
12442
12455
  display: "flex",
12443
12456
  flexDirection: "column",
12444
12457
  alignItems: "center",
@@ -12446,7 +12459,7 @@ function FunCheckoutHistoryDetail({
12446
12459
  }, /* @__PURE__ */ React132.createElement(Text, {
12447
12460
  size: "12",
12448
12461
  color: "modalTextDim"
12449
- }, "You will receive a notification when your order has finished."))), isFailedFinal ? /* @__PURE__ */ React132.createElement(FunToast, {
12462
+ }, isCheckoutSpecialCrFlow ? "Funds may take up to 10 minutes to arrive." : "You will receive a notification when your order has finished."))), isFailedFinal ? /* @__PURE__ */ React132.createElement(FunToast, {
12450
12463
  type: 1 /* ERROR */,
12451
12464
  title: "Order Failed",
12452
12465
  isDescriptionText: false,
@@ -14731,7 +14744,7 @@ function setFunkitConnectVersion({ version }) {
14731
14744
  localStorage.setItem(storageKey4, version);
14732
14745
  }
14733
14746
  function getCurrentSdkVersion() {
14734
- return "1.0.2";
14747
+ return "1.0.4";
14735
14748
  }
14736
14749
  function useFingerprint() {
14737
14750
  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
- standby: string;
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: {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  darkTheme
4
- } from "../chunk-U4FFX2HZ.js";
4
+ } from "../chunk-SWTU7PBZ.js";
5
5
  import "../chunk-VP4CAK4A.js";
6
6
  export {
7
7
  darkTheme
@@ -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
- standby: string;
35
+ rightTranslucentLine: string;
36
36
  loadingBase: string;
37
37
  loadingAccent: string;
38
38
  modalBackdrop: string;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  lightTheme
4
- } from "../chunk-C2QHNJBG.js";
4
+ } from "../chunk-MQTK22MG.js";
5
5
  import "../chunk-VP4CAK4A.js";
6
6
  export {
7
7
  lightTheme
@@ -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,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  argentWallet
4
- } from "../chunk-NZ5G23JP.js";
5
- import "../chunk-ZOLACFTK.js";
4
+ } from "../chunk-CVGDYGHA.js";
6
5
  import "../chunk-ZDU3JFGR.js";
6
+ import "../chunk-ZOLACFTK.js";
7
7
  export {
8
8
  argentWallet
9
9
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bifrostWallet
4
- } from "../chunk-6LTLPR2Q.js";
5
- import "../chunk-ZOLACFTK.js";
4
+ } from "../chunk-MU35GKP3.js";
6
5
  import "../chunk-ZDU3JFGR.js";
6
+ import "../chunk-ZOLACFTK.js";
7
7
  import "../chunk-QII6PY2D.js";
8
8
  export {
9
9
  bifrostWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bitgetWallet
4
- } from "../chunk-ZNXQ4V6G.js";
5
- import "../chunk-ZOLACFTK.js";
4
+ } from "../chunk-RYO26XSK.js";
6
5
  import "../chunk-ZDU3JFGR.js";
6
+ import "../chunk-ZOLACFTK.js";
7
7
  import "../chunk-QII6PY2D.js";
8
8
  export {
9
9
  bitgetWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bloomWallet
4
- } from "../chunk-NTGZF5BY.js";
5
- import "../chunk-ZOLACFTK.js";
4
+ } from "../chunk-OYW4TIA3.js";
6
5
  import "../chunk-ZDU3JFGR.js";
6
+ import "../chunk-ZOLACFTK.js";
7
7
  export {
8
8
  bloomWallet
9
9
  };
@@ -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,92 @@
1
+ "use client";
2
+ import {
3
+ getWalletConnectConnector
4
+ } from "./chunk-ZDU3JFGR.js";
5
+ import {
6
+ isAndroid
7
+ } from "./chunk-ZOLACFTK.js";
8
+
9
+ // src/wallets/walletConnectors/ledgerWallet/ledgerWallet.ts
10
+ var ledgerWallet = ({
11
+ projectId,
12
+ walletConnectParameters
13
+ }) => ({
14
+ id: "ledger",
15
+ iconBackground: "#000",
16
+ iconAccent: "#000",
17
+ name: "Ledger",
18
+ iconUrl: async () => (await import("./ledgerWallet-DIS4VM6H.js")).default,
19
+ downloadUrls: {
20
+ android: "https://play.google.com/store/apps/details?id=com.ledger.live",
21
+ ios: "https://apps.apple.com/us/app/ledger-live-web3-wallet/id1361671700",
22
+ mobile: "https://www.ledger.com/ledger-live",
23
+ qrCode: "https://r354.adj.st/?adj_t=t2esmlk",
24
+ windows: "https://www.ledger.com/ledger-live/download",
25
+ macos: "https://www.ledger.com/ledger-live/download",
26
+ linux: "https://www.ledger.com/ledger-live/download",
27
+ desktop: "https://www.ledger.com/ledger-live"
28
+ },
29
+ mobile: {
30
+ getUri: (uri) => {
31
+ return isAndroid() ? uri : `ledgerlive://wc?uri=${encodeURIComponent(uri)}`;
32
+ }
33
+ },
34
+ desktop: {
35
+ getUri: (uri) => {
36
+ return `ledgerlive://wc?uri=${encodeURIComponent(uri)}`;
37
+ },
38
+ instructions: {
39
+ learnMoreUrl: "https://support.ledger.com/hc/en-us/articles/4404389503889-Getting-started-with-Ledger-Live",
40
+ steps: [
41
+ {
42
+ description: "wallet_connectors.ledger.desktop.step1.description",
43
+ step: "install",
44
+ title: "wallet_connectors.ledger.desktop.step1.title"
45
+ },
46
+ {
47
+ description: "wallet_connectors.ledger.desktop.step2.description",
48
+ step: "create",
49
+ title: "wallet_connectors.ledger.desktop.step2.title"
50
+ },
51
+ {
52
+ description: "wallet_connectors.ledger.desktop.step3.description",
53
+ step: "connect",
54
+ title: "wallet_connectors.ledger.desktop.step3.title"
55
+ }
56
+ ]
57
+ }
58
+ },
59
+ qrCode: {
60
+ getUri: (uri) => {
61
+ return `ledgerlive://wc?uri=${encodeURIComponent(uri)}`;
62
+ },
63
+ instructions: {
64
+ learnMoreUrl: "https://support.ledger.com/hc/en-us/articles/4404389503889-Getting-started-with-Ledger-Live",
65
+ steps: [
66
+ {
67
+ description: "wallet_connectors.ledger.qr_code.step1.description",
68
+ step: "install",
69
+ title: "wallet_connectors.ledger.qr_code.step1.title"
70
+ },
71
+ {
72
+ description: "wallet_connectors.ledger.qr_code.step2.description",
73
+ step: "create",
74
+ title: "wallet_connectors.ledger.qr_code.step2.title"
75
+ },
76
+ {
77
+ description: "wallet_connectors.ledger.qr_code.step3.description",
78
+ step: "scan",
79
+ title: "wallet_connectors.ledger.qr_code.step3.title"
80
+ }
81
+ ]
82
+ }
83
+ },
84
+ createConnector: getWalletConnectConnector({
85
+ projectId,
86
+ walletConnectParameters
87
+ })
88
+ });
89
+
90
+ export {
91
+ ledgerWallet
92
+ };