@funkit/connect 1.5.0-next.0 → 2.0.0

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 (53) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/components/FunkitProvider/FunkitCheckoutContext.d.ts +2 -1
  3. package/dist/config/getDefaultConfig.d.ts +33 -0
  4. package/dist/dydx-G2CHDMSF.js +6 -0
  5. package/dist/index.js +54 -20
  6. package/dist/utils/checkout.d.ts +1 -1
  7. package/dist/utils/isDydxAddress.d.ts +6 -0
  8. package/dist/wallets/walletConnectors/index.js +59 -59
  9. package/package.json +5 -4
  10. package/dist/wallets/walletConnectors/chunk-2DWBVWFI.js +0 -87
  11. package/dist/wallets/walletConnectors/chunk-32KBKKGT.js +0 -182
  12. package/dist/wallets/walletConnectors/chunk-37MVF2BB.js +0 -94
  13. package/dist/wallets/walletConnectors/chunk-3CLNL7LR.js +0 -73
  14. package/dist/wallets/walletConnectors/chunk-3F5GNHAG.js +0 -182
  15. package/dist/wallets/walletConnectors/chunk-3R3RNCGE.js +0 -100
  16. package/dist/wallets/walletConnectors/chunk-5L2OLU3J.js +0 -102
  17. package/dist/wallets/walletConnectors/chunk-7GGRZNT3.js +0 -96
  18. package/dist/wallets/walletConnectors/chunk-7YDZTPO4.js +0 -100
  19. package/dist/wallets/walletConnectors/chunk-AJKRYTH2.js +0 -92
  20. package/dist/wallets/walletConnectors/chunk-BAFQ33Z6.js +0 -71
  21. package/dist/wallets/walletConnectors/chunk-BCXBFAL4.js +0 -98
  22. package/dist/wallets/walletConnectors/chunk-CMXZK5RR.js +0 -94
  23. package/dist/wallets/walletConnectors/chunk-CVGDYGHA.js +0 -60
  24. package/dist/wallets/walletConnectors/chunk-F4EJ42XO.js +0 -105
  25. package/dist/wallets/walletConnectors/chunk-FGBCIE4L.js +0 -182
  26. package/dist/wallets/walletConnectors/chunk-FL2VIO76.js +0 -71
  27. package/dist/wallets/walletConnectors/chunk-GJ4TYHDI.js +0 -102
  28. package/dist/wallets/walletConnectors/chunk-I5GSQUQN.js +0 -98
  29. package/dist/wallets/walletConnectors/chunk-IIJOJ6AD.js +0 -102
  30. package/dist/wallets/walletConnectors/chunk-KZFAL4RZ.js +0 -27
  31. package/dist/wallets/walletConnectors/chunk-LJRV5JY7.js +0 -95
  32. package/dist/wallets/walletConnectors/chunk-M4SPCKW4.js +0 -66
  33. package/dist/wallets/walletConnectors/chunk-MFS6NY6T.js +0 -105
  34. package/dist/wallets/walletConnectors/chunk-MOAWRDEM.js +0 -95
  35. package/dist/wallets/walletConnectors/chunk-MSRKKVDE.js +0 -98
  36. package/dist/wallets/walletConnectors/chunk-NK3DYIAB.js +0 -92
  37. package/dist/wallets/walletConnectors/chunk-OKZSWAPF.js +0 -60
  38. package/dist/wallets/walletConnectors/chunk-OMKARG6Y.js +0 -94
  39. package/dist/wallets/walletConnectors/chunk-OPO2D6GL.js +0 -102
  40. package/dist/wallets/walletConnectors/chunk-OXWTS7HX.js +0 -98
  41. package/dist/wallets/walletConnectors/chunk-OYKWP3N3.js +0 -60
  42. package/dist/wallets/walletConnectors/chunk-OYW4TIA3.js +0 -81
  43. package/dist/wallets/walletConnectors/chunk-PJRUHFBT.js +0 -71
  44. package/dist/wallets/walletConnectors/chunk-PK46LOWC.js +0 -95
  45. package/dist/wallets/walletConnectors/chunk-QYK7UAJQ.js +0 -96
  46. package/dist/wallets/walletConnectors/chunk-R5GNFRXW.js +0 -96
  47. package/dist/wallets/walletConnectors/chunk-S2IWMXKX.js +0 -94
  48. package/dist/wallets/walletConnectors/chunk-THEL4ZSX.js +0 -105
  49. package/dist/wallets/walletConnectors/chunk-WH7S23VZ.js +0 -73
  50. package/dist/wallets/walletConnectors/chunk-XB2GFXBL.js +0 -107
  51. package/dist/wallets/walletConnectors/chunk-XC7OMZSO.js +0 -73
  52. package/dist/wallets/walletConnectors/chunk-XUXFYTCV.js +0 -96
  53. package/dist/wallets/walletConnectors/chunk-Z4YUZ33O.js +0 -100
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 4c467f2: feat: update minimum node version to v18, use native fetch
8
+
9
+ ### Minor Changes
10
+
11
+ - d50a369: feat: dydx chain and usdc checkout compatibility
12
+
13
+ ### Patch Changes
14
+
15
+ - d50a369: feat: checkout history safeguard across versions
16
+ - Updated dependencies [d50a369]
17
+ - Updated dependencies [d50a369]
18
+ - Updated dependencies [4c467f2]
19
+ - @funkit/core@2.0.0
20
+ - @funkit/api-base@1.0.0
21
+ - @funkit/wagmi-tools@3.0.0
22
+
3
23
  ## 1.5.0-next.0
4
24
 
5
25
  ### Minor Changes
@@ -11,6 +11,7 @@ export interface FunkitCheckoutActionParams {
11
11
  functionArgs: any[];
12
12
  value?: bigint;
13
13
  }
14
+ export type DydxAddress = `dydx${string}`;
14
15
  export interface FunkitCheckoutConfig {
15
16
  /** ****************************
16
17
  * Api-related configurations *
@@ -28,7 +29,7 @@ export interface FunkitCheckoutConfig {
28
29
  /** Timestamp (in milliseconds) after which the checkout should not be performed, and the funds will become rescuable. Min: 300000 (5 mins), Max: 3600000 (1 hour). **/
29
30
  expirationTimestampMs: number;
30
31
  /** Custom recipient address of the checkout. If specified, a different checkout flow will be executed. It is not recommended to set this unless the Fun.xyz team advises it. **/
31
- customRecipient?: Address;
32
+ customRecipient?: Address | DydxAddress;
32
33
  /** ****************************************
33
34
  * Checkout ModalUI-related configurations *
34
35
  *******************************************/
@@ -3761,6 +3761,39 @@ export declare const getDefaultChains: () => ({
3761
3761
  formatters?: undefined;
3762
3762
  serializers?: import("viem").ChainSerializers<undefined> | undefined;
3763
3763
  fees?: import("viem").ChainFees<undefined> | undefined;
3764
+ } | {
3765
+ id: number;
3766
+ name: string;
3767
+ nativeCurrency: {
3768
+ symbol: string;
3769
+ decimals: number;
3770
+ name: string;
3771
+ };
3772
+ rpcUrls: {
3773
+ default: {
3774
+ http: string[];
3775
+ };
3776
+ };
3777
+ blockExplorers: {
3778
+ default: {
3779
+ name: string;
3780
+ url: string;
3781
+ apiUrl: string;
3782
+ };
3783
+ };
3784
+ contracts: {
3785
+ ensRegistry: {
3786
+ address: `0x${string}`;
3787
+ };
3788
+ ensUniversalResolver: {
3789
+ address: `0x${string}`;
3790
+ blockCreated: number;
3791
+ };
3792
+ multicall3: {
3793
+ address: `0x${string}`;
3794
+ blockCreated: number;
3795
+ };
3796
+ };
3764
3797
  } | {
3765
3798
  blockExplorers: {
3766
3799
  readonly default: {
@@ -0,0 +1,6 @@
1
+ "use client";
2
+ // src/components/FunkitProvider/chainIcons/dydx.svg
3
+ var dydx_default = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgzIiBoZWlnaHQ9IjE4MyIgdmlld0JveD0iMCAwIDE4MyAxODMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHg9IjEiIHk9IjEiIHdpZHRoPSIxODEiIGhlaWdodD0iMTgxIiByeD0iMzciIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcikiLz4KPHBhdGggZD0iTTExNS4zMTYgNDNMNDUgMTQxLjk5Mkg2Ni41ODg1TDEzNy4yNjkgNDNIMTE1LjMxNloiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik02OC44Mzc1IDQzTDg5LjUyNjUgNzIuMTY5Nkw3OC43MzIyIDg4LjA4MDRMNDYuNzk5MiA0M0g2OC44Mzc1WiIgZmlsbD0idXJsKCNwYWludDFfbGluZWFyKSIvPgo8cGF0aCBkPSJNMTE3LjQxMSAxNDJMOTQuNDczNyAxMDkuNzM3TDEwNS4yNjggOTQuMjY3OUwxMzkgMTQySDExNy40MTFaIiBmaWxsPSJ1cmwoI3BhaW50Ml9saW5lYXIpIi8+CjxyZWN0IHg9IjEiIHk9IjEiIHdpZHRoPSIxODEiIGhlaWdodD0iMTgxIiByeD0iMzciIHN0cm9rZT0iIzJEMkQzRCIgc3Ryb2tlLXdpZHRoPSIyIi8+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXIiIHgxPSIxNDcuNSIgeTE9Ii0yNC41IiB4Mj0iMTAzIiB5Mj0iMTYwLjUiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iIzJDMkMzRCIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMxYTFhMjciLz4KPC9saW5lYXJHcmFkaWVudD4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDFfbGluZWFyIiB4MT0iNjMuODkwMSIgeTE9IjQ5LjE4NzUiIHgyPSI5Mi44OTUxIiB5Mj0iODQuODIwNSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSJ3aGl0ZSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIiBzdG9wLW9wYWNpdHk9IjAuNTUiLz4KPC9saW5lYXJHcmFkaWVudD4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDJfbGluZWFyIiB4MT0iMTIyLjM1OSIgeTE9IjEzNC40ODciIHgyPSI4Ni43ODczIiB5Mj0iODUuNjg2MyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjNjk2NkZGIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzY5NjZGRiIgc3RvcC1vcGFjaXR5PSIwLjM2Ii8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";
4
+ export {
5
+ dydx_default as default
6
+ };
package/dist/index.js CHANGED
@@ -944,6 +944,7 @@ function useFunkitConfig() {
944
944
  }
945
945
 
946
946
  // src/components/FunkitProvider/provideFunkitConnectChains.ts
947
+ import { DYDX_MAINNET_CHAIN_ID } from "@funkit/core";
947
948
  var arbitrumIcon = {
948
949
  iconBackground: "#96bedc",
949
950
  iconUrl: async () => (await import("./arbitrum-U5YFKKLG.js")).default
@@ -968,6 +969,10 @@ var cronosIcon = {
968
969
  iconBackground: "#002D74",
969
970
  iconUrl: async () => (await import("./cronos-2XRBT4RE.js")).default
970
971
  };
972
+ var dydxIcon = {
973
+ iconBackground: "#2C2C3D",
974
+ iconUrl: async () => (await import("./dydx-G2CHDMSF.js")).default
975
+ };
971
976
  var ethereumIcon = {
972
977
  iconBackground: "#484c50",
973
978
  iconUrl: async () => (await import("./ethereum-H5XMTX4V.js")).default
@@ -1031,6 +1036,7 @@ var chainMetadataByName = {
1031
1036
  bscTestnet: { chainId: 97, ...bscIcon },
1032
1037
  cronos: { chainId: 25, ...cronosIcon },
1033
1038
  cronosTestnet: { chainId: 338, ...cronosIcon },
1039
+ dydxMainnet: { chainId: DYDX_MAINNET_CHAIN_ID, ...dydxIcon },
1034
1040
  goerli: { chainId: 5, ...ethereumIcon },
1035
1041
  hardhat: { chainId: 31337, ...hardhatIcon },
1036
1042
  holesky: { chainId: 17e3, ...ethereumIcon },
@@ -2558,6 +2564,18 @@ function normalizeSmallUsdNumber(usdNumber) {
2558
2564
  return parsedNumber;
2559
2565
  }
2560
2566
 
2567
+ // src/utils/isDydxAddress.ts
2568
+ function verifyIsBech32(address) {
2569
+ try {
2570
+ } catch (error) {
2571
+ return error;
2572
+ }
2573
+ return void 0;
2574
+ }
2575
+ function isDydxAddress(address) {
2576
+ return address.startsWith("dydx1") && verifyIsBech32(address) === void 0;
2577
+ }
2578
+
2561
2579
  // src/utils/checkout.ts
2562
2580
  var CHECKOUT_EXPIRATION_TIMESTAMP_UPPERBOUND = 36e5;
2563
2581
  var CHECKOUT_EXPIRATION_TIMESTAMP_LOWERBOUND = 3e5;
@@ -2567,7 +2585,7 @@ var DUMMY_TRANSFER_PARAMS = {
2567
2585
  toAddress: "0x000000000000000000000000000000000000dEaD",
2568
2586
  tokenAmount: 5
2569
2587
  };
2570
- function validateCheckoutConfig(config, isUserLoggedIn) {
2588
+ function validateCheckoutConfig(config) {
2571
2589
  var _a, _b;
2572
2590
  logger.log("validateCheckoutConfig_input", config);
2573
2591
  if (!config.checkoutItemTitle) {
@@ -2619,7 +2637,19 @@ function validateCheckoutConfig(config, isUserLoggedIn) {
2619
2637
  message: `Invalid targetChain configuration: Unsupported chain id ${config.targetChain} for checkout.`
2620
2638
  };
2621
2639
  }
2622
- if (config.customRecipient && !isAddress(config.customRecipient)) {
2640
+ const chainCheckoutAssetWhitelist = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO3[config.targetChain].checkoutAssetWhitelist || [];
2641
+ if ((chainCheckoutAssetWhitelist == null ? void 0 : chainCheckoutAssetWhitelist[0]) !== "*" && !chainCheckoutAssetWhitelist.some(
2642
+ (asset) => {
2643
+ var _a2;
2644
+ return asset.toLowerCase() === ((_a2 = config.targetAsset) == null ? void 0 : _a2.toLowerCase());
2645
+ }
2646
+ )) {
2647
+ return {
2648
+ isValid: false,
2649
+ message: `Invalid targetAsset ${config.targetAsset} for targetChain ${config.targetChain}.`
2650
+ };
2651
+ }
2652
+ if (config.customRecipient && !isAddress(config.customRecipient) && !isDydxAddress(config.customRecipient)) {
2623
2653
  return {
2624
2654
  isValid: false,
2625
2655
  message: `Invalid customRecipient configuration: Has to be a valid address.`
@@ -2918,7 +2948,12 @@ function FunkitCheckoutProvider({ children }) {
2918
2948
  newCheckoutHistoryList = singleCheckoutHistory ? [singleCheckoutHistory] : [];
2919
2949
  }
2920
2950
  setCheckoutHistoryList(
2921
- newCheckoutHistoryList.filter((item) => item.state !== CheckoutState3.CANCELLED).sort((a, b) => b.createdTimeMs - a.createdTimeMs)
2951
+ newCheckoutHistoryList.filter(
2952
+ (item) => {
2953
+ var _a, _b;
2954
+ return item.state !== CheckoutState3.CANCELLED && !!((_a = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO5) == null ? void 0 : _a[item.fromChainId]) && !!((_b = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO5) == null ? void 0 : _b[item.toChainId]);
2955
+ }
2956
+ ).sort((a, b) => b.createdTimeMs - a.createdTimeMs)
2922
2957
  );
2923
2958
  setIsCheckoutHistoryInited(true);
2924
2959
  } catch (err) {
@@ -3599,13 +3634,15 @@ function FunkitCheckoutProvider({ children }) {
3599
3634
  [
3600
3635
  funkitConfig.apiKey,
3601
3636
  _getAndValidateCheckoutItemByCheckoutId,
3602
- isWeb3Login,
3603
3637
  isWeb2Login,
3638
+ isWeb3Login,
3604
3639
  walletAddress,
3605
3640
  _generateClientMetadataForBackend,
3606
3641
  activeCheckouts,
3607
3642
  triggerRefreshSymbol,
3608
- _generateSignedBatchOperation
3643
+ connector,
3644
+ _generateSignedBatchOperation,
3645
+ switchChainAsync
3609
3646
  ]
3610
3647
  );
3611
3648
  const contextValue = {
@@ -3781,10 +3818,7 @@ var useFunkitCheckout = (props) => {
3781
3818
  ...propsConfig || {},
3782
3819
  ...inputConfig || {}
3783
3820
  };
3784
- const validationResult = validateCheckoutConfig(
3785
- combinedConfig,
3786
- isUserLoggedIn
3787
- );
3821
+ const validationResult = validateCheckoutConfig(combinedConfig);
3788
3822
  onValidation == null ? void 0 : onValidation(validationResult);
3789
3823
  if (validationResult.isValid) {
3790
3824
  const finalConfig = combinedConfig;
@@ -3794,15 +3828,13 @@ var useFunkitCheckout = (props) => {
3794
3828
  );
3795
3829
  if (isUserLoggedIn || !!finalConfig.customRecipient) {
3796
3830
  setPendingCheckoutConfig(void 0);
3797
- if (isUserLoggedIn) {
3798
- if (!((_b = (_a = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO5) == null ? void 0 : _a[finalConfig.targetChain]) == null ? void 0 : _b.isMainnet)) {
3799
- onErrorWrapper == null ? void 0 : onErrorWrapper({
3800
- type: "error",
3801
- message: "Unable to begin a new checkout: Insufficient funds on testnet account",
3802
- metadata: {}
3803
- });
3804
- return;
3805
- }
3831
+ if (isUserLoggedIn && !((_b = (_a = FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO5) == null ? void 0 : _a[finalConfig.targetChain]) == null ? void 0 : _b.isMainnet)) {
3832
+ onErrorWrapper == null ? void 0 : onErrorWrapper({
3833
+ type: "error",
3834
+ message: "Unable to begin a new checkout: Insufficient funds on testnet account",
3835
+ metadata: {}
3836
+ });
3837
+ return;
3806
3838
  }
3807
3839
  onOpenWrapper == null ? void 0 : onOpenWrapper(newId);
3808
3840
  } else {
@@ -4657,6 +4689,7 @@ var EditIcon = ({ size = "24" }) => /* @__PURE__ */ React32.createElement("svg",
4657
4689
 
4658
4690
  // src/components/FunCheckoutModal/FunCheckoutModal.tsx
4659
4691
  import {
4692
+ dydxChain,
4660
4693
  FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO8,
4661
4694
  getTokenInfo as getTokenInfo2
4662
4695
  } from "@funkit/core";
@@ -9666,7 +9699,8 @@ function FunCheckoutModal({
9666
9699
  const originalTargetChainId = checkoutItem == null ? void 0 : checkoutItem.initSettings.config.targetChain.toString();
9667
9700
  const moonpayChainId = [
9668
9701
  zkSync2.id.toString(),
9669
- mantle2.id.toString()
9702
+ mantle2.id.toString(),
9703
+ dydxChain.id.toString()
9670
9704
  ].includes(originalTargetChainId) ? arbitrum.id.toString() : originalTargetChainId;
9671
9705
  const wethAddrOnTargetChain = (await getTokenInfo2("weth", moonpayChainId)).toLowerCase();
9672
9706
  const isTargetAssetEthOrWeth = [NATIVE_TOKEN, wethAddrOnTargetChain].includes(
@@ -15984,7 +16018,7 @@ function setFunkitConnectVersion({ version }) {
15984
16018
  localStorage.setItem(storageKey6, version);
15985
16019
  }
15986
16020
  function getCurrentSdkVersion() {
15987
- return "1.5.0-next.0";
16021
+ return "2.0.0";
15988
16022
  }
15989
16023
  function useFingerprint() {
15990
16024
  const fingerprint = useCallback33(() => {
@@ -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: Partial<FunkitCheckoutConfig>, isUserLoggedIn: boolean): {
16
+ export declare function validateCheckoutConfig(config: Partial<FunkitCheckoutConfig>): {
17
17
  isValid: boolean;
18
18
  message: string;
19
19
  };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Replicated from @dydxprotocol/v4-client-js https://github.com/dydxprotocol/v4-clients/blob/main/v4-client-js/src/lib/validation.ts#L145C1-L158
3
+ * Not importing the sdk in the interest of space.
4
+ */
5
+ export declare function verifyIsBech32(address: string): Error | undefined;
6
+ export declare function isDydxAddress(address: string): boolean;
@@ -1,55 +1,52 @@
1
1
  "use client";
2
2
  import {
3
- xdefiWallet
4
- } from "./chunk-JNZ3EYC7.js";
3
+ zerionWallet
4
+ } from "./chunk-G4DNQN67.js";
5
5
  import {
6
6
  zealWallet
7
7
  } from "./chunk-Z5QFIFDP.js";
8
8
  import {
9
- zerionWallet
10
- } from "./chunk-G4DNQN67.js";
9
+ walletConnectWallet
10
+ } from "./chunk-ASPRR7T3.js";
11
+ import {
12
+ roninWallet
13
+ } from "./chunk-CNTLU4ZV.js";
11
14
  import {
12
15
  safeheronWallet
13
16
  } from "./chunk-FQDX6QIP.js";
14
- import {
15
- talismanWallet
16
- } from "./chunk-R2GYJ376.js";
17
- import {
18
- tahoWallet
19
- } from "./chunk-PILSRRPJ.js";
20
17
  import {
21
18
  tokenPocketWallet
22
19
  } from "./chunk-UWU574XS.js";
23
20
  import {
24
- uniswapWallet
25
- } from "./chunk-XRSY4JVH.js";
26
- import {
27
- trustWallet
28
- } from "./chunk-BMHNXJZK.js";
21
+ talismanWallet
22
+ } from "./chunk-R2GYJ376.js";
29
23
  import {
30
24
  tokenaryWallet
31
25
  } from "./chunk-MD5OPFAT.js";
32
26
  import {
33
- walletConnectWallet
34
- } from "./chunk-ASPRR7T3.js";
27
+ trustWallet
28
+ } from "./chunk-BMHNXJZK.js";
35
29
  import {
36
- phantomWallet
37
- } from "./chunk-4PTY6XNU.js";
30
+ uniswapWallet
31
+ } from "./chunk-XRSY4JVH.js";
38
32
  import {
39
- rabbyWallet
40
- } from "./chunk-5SIHQ5GA.js";
33
+ xdefiWallet
34
+ } from "./chunk-JNZ3EYC7.js";
41
35
  import {
42
36
  rainbowWallet
43
37
  } from "./chunk-EXN2ODSI.js";
38
+ import {
39
+ rabbyWallet
40
+ } from "./chunk-5SIHQ5GA.js";
44
41
  import {
45
42
  ramperWallet
46
43
  } from "./chunk-XEZPRJPV.js";
47
- import {
48
- roninWallet
49
- } from "./chunk-CNTLU4ZV.js";
50
44
  import {
51
45
  safeWallet
52
46
  } from "./chunk-D3DCQ72J.js";
47
+ import {
48
+ oneInchWallet
49
+ } from "./chunk-LCPIZUR3.js";
53
50
  import {
54
51
  safepalWallet
55
52
  } from "./chunk-PQSJXOGA.js";
@@ -57,77 +54,83 @@ import {
57
54
  subWallet
58
55
  } from "./chunk-WS4EM7AZ.js";
59
56
  import {
60
- kresusWallet
61
- } from "./chunk-X6T3CICZ.js";
57
+ tahoWallet
58
+ } from "./chunk-PILSRRPJ.js";
62
59
  import {
63
- metaMaskWallet
64
- } from "./chunk-TUK3HNKY.js";
60
+ injectedWallet
61
+ } from "./chunk-GUJHPWTU.js";
65
62
  import {
66
63
  mewWallet
67
64
  } from "./chunk-ZCSUP7CX.js";
68
65
  import {
69
- oktoWallet
70
- } from "./chunk-WKHTUEF5.js";
66
+ metaMaskWallet
67
+ } from "./chunk-TUK3HNKY.js";
68
+ import {
69
+ omniWallet
70
+ } from "./chunk-SVN7OEQR.js";
71
71
  import {
72
72
  okxWallet
73
73
  } from "./chunk-5ZGE5SN5.js";
74
74
  import {
75
- oneInchWallet
76
- } from "./chunk-LCPIZUR3.js";
77
- import {
78
- omniWallet
79
- } from "./chunk-SVN7OEQR.js";
75
+ oktoWallet
76
+ } from "./chunk-WKHTUEF5.js";
80
77
  import {
81
78
  oneKeyWallet
82
79
  } from "./chunk-QS2J6MWB.js";
83
80
  import {
84
- desigWallet
85
- } from "./chunk-P4C7ZHIS.js";
81
+ phantomWallet
82
+ } from "./chunk-4PTY6XNU.js";
86
83
  import {
87
84
  enkryptWallet
88
85
  } from "./chunk-SJWHYD45.js";
86
+ import {
87
+ frameWallet
88
+ } from "./chunk-HXGBE5AH.js";
89
89
  import {
90
90
  frontierWallet
91
91
  } from "./chunk-LOEDYNWO.js";
92
- import {
93
- gateWallet
94
- } from "./chunk-QGQISKXF.js";
95
92
  import {
96
93
  imTokenWallet
97
94
  } from "./chunk-5MVV7OVS.js";
98
95
  import {
99
- injectedWallet
100
- } from "./chunk-GUJHPWTU.js";
96
+ gateWallet
97
+ } from "./chunk-QGQISKXF.js";
101
98
  import {
102
99
  ledgerWallet
103
100
  } from "./chunk-Y6VY6E3L.js";
104
101
  import {
105
- clvWallet
106
- } from "./chunk-ND5YG63V.js";
102
+ kresusWallet
103
+ } from "./chunk-X6T3CICZ.js";
104
+ import {
105
+ bybitWallet
106
+ } from "./chunk-ZBQT5PV6.js";
107
107
  import {
108
108
  coin98Wallet
109
109
  } from "./chunk-3QXMJHL4.js";
110
110
  import {
111
- coinbaseWallet
112
- } from "./chunk-O77H3VWW.js";
111
+ bitgetWallet
112
+ } from "./chunk-OUQ3ZF2W.js";
113
113
  import {
114
114
  coreWallet
115
115
  } from "./chunk-32O7HVBJ.js";
116
116
  import {
117
- braveWallet
118
- } from "./chunk-KJWMF6GZ.js";
117
+ coinbaseWallet
118
+ } from "./chunk-O77H3VWW.js";
119
119
  import {
120
120
  dawnWallet
121
121
  } from "./chunk-QUFNIKMV.js";
122
+ import {
123
+ desigWallet
124
+ } from "./chunk-P4C7ZHIS.js";
122
125
  import {
123
126
  foxWallet
124
127
  } from "./chunk-TKXMLZXG.js";
125
- import {
126
- frameWallet
127
- } from "./chunk-HXGBE5AH.js";
128
128
  import {
129
129
  bifrostWallet
130
130
  } from "./chunk-AFONKDII.js";
131
+ import {
132
+ bitskiWallet
133
+ } from "./chunk-IMZRCMZR.js";
131
134
  import {
132
135
  argentWallet
133
136
  } from "./chunk-NZ5G23JP.js";
@@ -137,16 +140,13 @@ import {
137
140
  import {
138
141
  bloomWallet
139
142
  } from "./chunk-NTGZF5BY.js";
140
- import {
141
- bitskiWallet
142
- } from "./chunk-IMZRCMZR.js";
143
- import {
144
- bitgetWallet
145
- } from "./chunk-OUQ3ZF2W.js";
146
143
  import "./chunk-ZOLACFTK.js";
147
144
  import {
148
- bybitWallet
149
- } from "./chunk-ZBQT5PV6.js";
145
+ braveWallet
146
+ } from "./chunk-KJWMF6GZ.js";
147
+ import {
148
+ clvWallet
149
+ } from "./chunk-ND5YG63V.js";
150
150
  import "./chunk-ZDU3JFGR.js";
151
151
  import "./chunk-F3VCNZXS.js";
152
152
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "1.5.0-next.0",
3
+ "version": "2.0.0",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -72,14 +72,15 @@
72
72
  "@vanilla-extract/dynamic": "2.1.0",
73
73
  "@vanilla-extract/sprinkles": "1.6.1",
74
74
  "@wagmi/core": "^2.10.2",
75
+ "bech32": "^2.0.0",
75
76
  "clsx": "2.1.1",
76
77
  "qrcode": "1.5.3",
77
78
  "react-remove-scroll": "2.5.7",
78
79
  "ua-parser-js": "^1.0.37",
79
80
  "uuid": "^9.0.1",
80
- "@funkit/core": "1.1.0-next.0",
81
- "@funkit/api-base": "0.1.0-next.0",
82
- "@funkit/wagmi-tools": "2.1.0-next.0"
81
+ "@funkit/api-base": "1.0.0",
82
+ "@funkit/core": "2.0.0",
83
+ "@funkit/wagmi-tools": "3.0.0"
83
84
  },
84
85
  "repository": {
85
86
  "type": "git",
@@ -1,87 +0,0 @@
1
- "use client";
2
- import {
3
- getInjectedConnector,
4
- hasInjectedProvider
5
- } from "./chunk-F3VCNZXS.js";
6
- import {
7
- getWalletConnectConnector
8
- } from "./chunk-ZDU3JFGR.js";
9
-
10
- // src/wallets/walletConnectors/clvWallet/clvWallet.ts
11
- var clvWallet = ({
12
- projectId,
13
- walletConnectParameters
14
- }) => {
15
- const isCLVInjected = hasInjectedProvider({ namespace: "clover" });
16
- const shouldUseWalletConnect = !isCLVInjected;
17
- return {
18
- id: "clv",
19
- name: "CLV",
20
- iconUrl: async () => (await import("./clvWallet-RM4V57ZB.js")).default,
21
- iconBackground: "#fff",
22
- iconAccent: "#BDFDE2",
23
- installed: isCLVInjected,
24
- downloadUrls: {
25
- chrome: "https://chrome.google.com/webstore/detail/clv-wallet/nhnkbkgjikgcigadomkphalanndcapjk",
26
- ios: "https://apps.apple.com/app/clover-wallet/id1570072858",
27
- mobile: "https://apps.apple.com/app/clover-wallet/id1570072858",
28
- qrCode: "https://clv.org/"
29
- },
30
- extension: {
31
- instructions: {
32
- learnMoreUrl: "https://clv.org/",
33
- steps: [
34
- {
35
- description: "wallet_connectors.clv.extension.step1.description",
36
- step: "install",
37
- title: "wallet_connectors.clv.extension.step1.title"
38
- },
39
- {
40
- description: "wallet_connectors.clv.extension.step2.description",
41
- step: "create",
42
- title: "wallet_connectors.clv.extension.step2.title"
43
- },
44
- {
45
- description: "wallet_connectors.clv.extension.step3.description",
46
- step: "refresh",
47
- title: "wallet_connectors.clv.extension.step3.title"
48
- }
49
- ]
50
- }
51
- },
52
- mobile: {
53
- getUri: shouldUseWalletConnect ? (uri) => uri : void 0
54
- },
55
- qrCode: shouldUseWalletConnect ? {
56
- getUri: (uri) => uri,
57
- instructions: {
58
- learnMoreUrl: "https://clv.org/",
59
- steps: [
60
- {
61
- description: "wallet_connectors.clv.qr_code.step1.description",
62
- step: "install",
63
- title: "wallet_connectors.clv.qr_code.step1.title"
64
- },
65
- {
66
- description: "wallet_connectors.clv.qr_code.step2.description",
67
- step: "create",
68
- title: "wallet_connectors.clv.qr_code.step2.title"
69
- },
70
- {
71
- description: "wallet_connectors.clv.qr_code.step3.description",
72
- step: "scan",
73
- title: "wallet_connectors.clv.qr_code.step3.title"
74
- }
75
- ]
76
- }
77
- } : void 0,
78
- createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
79
- projectId,
80
- walletConnectParameters
81
- }) : getInjectedConnector({ namespace: "clover" })
82
- };
83
- };
84
-
85
- export {
86
- clvWallet
87
- };