@funkit/connect 1.1.6 → 1.2.1

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 (124) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/components/CloseButton/CloseButton.d.ts +1 -1
  3. package/dist/components/FunButton/FunIconButton.d.ts +3 -3
  4. package/dist/components/FunkitProvider/GeneralWalletProvider.d.ts +1 -1
  5. package/dist/components/Icons/ClockIcon.d.ts +1 -1
  6. package/dist/components/Icons/CoinIcon.d.ts +1 -1
  7. package/dist/components/Icons/Coinbase.d.ts +1 -1
  8. package/dist/components/Icons/Copied.d.ts +1 -1
  9. package/dist/components/Icons/EditIcon.d.ts +1 -1
  10. package/dist/components/Icons/EthereumIcon.d.ts +1 -1
  11. package/dist/components/Icons/FunkitPaymentsIconLine.d.ts +2 -2
  12. package/dist/components/Icons/LightningIcon.d.ts +1 -1
  13. package/dist/components/Icons/NoAssetsFoundIcon.d.ts +1 -1
  14. package/dist/components/Icons/PaymentMethodIcons.d.ts +1 -1
  15. package/dist/components/Icons/SearchIcon.d.ts +1 -1
  16. package/dist/components/Icons/Spinner.d.ts +2 -2
  17. package/dist/components/InfoButton/InfoButton.d.ts +1 -1
  18. package/dist/components/WalletButton/WalletButton.d.ts +1 -1
  19. package/dist/config/getDefaultConfig.d.ts +204 -62
  20. package/dist/index.js +49 -52
  21. package/dist/types/utils.d.ts +37 -0
  22. package/dist/wallets/Wallet.d.ts +1 -2
  23. package/dist/wallets/connectorsForWallets.d.ts +1 -3
  24. package/dist/wallets/getInjectedConnector.d.ts +3 -2
  25. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  26. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  27. package/dist/wallets/walletConnectors/bitskiWallet/bitskiWallet.js +2 -2
  28. package/dist/wallets/walletConnectors/braveWallet/braveWallet.js +2 -2
  29. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  30. package/dist/wallets/walletConnectors/{chunk-MIWCKFYE.js → chunk-2DWBVWFI.js} +4 -4
  31. package/dist/wallets/walletConnectors/{chunk-IBWFKX7P.js → chunk-32O7HVBJ.js} +4 -4
  32. package/dist/wallets/walletConnectors/{chunk-X255T3C4.js → chunk-3F5GNHAG.js} +9 -5
  33. package/dist/wallets/walletConnectors/{chunk-4FQLUQNA.js → chunk-3QXMJHL4.js} +1 -1
  34. package/dist/wallets/walletConnectors/{chunk-ZNXQ4V6G.js → chunk-3R3RNCGE.js} +4 -4
  35. package/dist/wallets/walletConnectors/{chunk-KGBLSE7L.js → chunk-4PTY6XNU.js} +1 -1
  36. package/dist/wallets/walletConnectors/{chunk-2GAW2UBU.js → chunk-5L2OLU3J.js} +1 -1
  37. package/dist/wallets/walletConnectors/{chunk-XPEBP6XV.js → chunk-5SIHQ5GA.js} +1 -1
  38. package/dist/wallets/walletConnectors/{chunk-NGXIHASN.js → chunk-5ZGE5SN5.js} +1 -1
  39. package/dist/wallets/walletConnectors/{chunk-6LTLPR2Q.js → chunk-AFONKDII.js} +1 -1
  40. package/dist/wallets/walletConnectors/{chunk-ZUAHWUEL.js → chunk-BCXBFAL4.js} +4 -4
  41. package/dist/wallets/walletConnectors/{chunk-OAEJQOAV.js → chunk-BMHNXJZK.js} +4 -4
  42. package/dist/wallets/walletConnectors/{chunk-GW6EF4G2.js → chunk-CNTLU4ZV.js} +4 -4
  43. package/dist/wallets/walletConnectors/{chunk-FDIIMYTB.js → chunk-EXN2ODSI.js} +4 -4
  44. package/dist/wallets/walletConnectors/{chunk-QII6PY2D.js → chunk-F3VCNZXS.js} +8 -6
  45. package/dist/wallets/walletConnectors/{chunk-63NPZXAL.js → chunk-FQDX6QIP.js} +1 -1
  46. package/dist/wallets/walletConnectors/{chunk-7CQPABJG.js → chunk-G4DNQN67.js} +1 -1
  47. package/dist/wallets/walletConnectors/{chunk-KIHCNUU3.js → chunk-GUJHPWTU.js} +1 -1
  48. package/dist/wallets/walletConnectors/{chunk-XXFJVY73.js → chunk-HXGBE5AH.js} +1 -1
  49. package/dist/wallets/walletConnectors/{chunk-C67TQJ6W.js → chunk-IMZRCMZR.js} +1 -1
  50. package/dist/wallets/walletConnectors/{chunk-L734HTUS.js → chunk-JNZ3EYC7.js} +1 -1
  51. package/dist/wallets/walletConnectors/{chunk-ENZLEAG2.js → chunk-JRABHUUZ.js} +1 -1
  52. package/dist/wallets/walletConnectors/{chunk-ABYQAXUX.js → chunk-KJWMF6GZ.js} +1 -1
  53. package/dist/wallets/walletConnectors/{chunk-N3VZE65M.js → chunk-LOEDYNWO.js} +4 -4
  54. package/dist/wallets/walletConnectors/{chunk-Q4RLUJJD.js → chunk-M4SPCKW4.js} +4 -4
  55. package/dist/wallets/walletConnectors/{chunk-Z2DGDHHZ.js → chunk-MFS6NY6T.js} +4 -4
  56. package/dist/wallets/walletConnectors/{chunk-2UXZAUWT.js → chunk-MOAWRDEM.js} +4 -4
  57. package/dist/wallets/walletConnectors/{chunk-T6JVHES7.js → chunk-ND5YG63V.js} +4 -4
  58. package/dist/wallets/walletConnectors/{chunk-LVRXH33E.js → chunk-NK3DYIAB.js} +4 -4
  59. package/dist/wallets/walletConnectors/{chunk-XBUTWYE4.js → chunk-O77H3VWW.js} +14 -18
  60. package/dist/wallets/walletConnectors/{chunk-JLQ5HJYV.js → chunk-OMKARG6Y.js} +4 -4
  61. package/dist/wallets/walletConnectors/{chunk-SQGFKNNZ.js → chunk-OPO2D6GL.js} +4 -4
  62. package/dist/wallets/walletConnectors/{chunk-75A2U7T7.js → chunk-OUQ3ZF2W.js} +4 -4
  63. package/dist/wallets/walletConnectors/{chunk-AM4SSLAP.js → chunk-OXWTS7HX.js} +4 -4
  64. package/dist/wallets/walletConnectors/{chunk-P4JLZ42R.js → chunk-P4C7ZHIS.js} +1 -1
  65. package/dist/wallets/walletConnectors/{chunk-H76YCX2M.js → chunk-PILSRRPJ.js} +1 -1
  66. package/dist/wallets/walletConnectors/{chunk-SL4VH23R.js → chunk-PJRUHFBT.js} +4 -4
  67. package/dist/wallets/walletConnectors/{chunk-RTW6PVQI.js → chunk-PQSJXOGA.js} +4 -4
  68. package/dist/wallets/walletConnectors/{chunk-2PC2XXUH.js → chunk-QGQISKXF.js} +4 -4
  69. package/dist/wallets/walletConnectors/{chunk-4WOV4ITL.js → chunk-QS2J6MWB.js} +1 -1
  70. package/dist/wallets/walletConnectors/{chunk-4XQDKOGF.js → chunk-QUFNIKMV.js} +1 -1
  71. package/dist/wallets/walletConnectors/{chunk-H273OTQA.js → chunk-R2GYJ376.js} +1 -1
  72. package/dist/wallets/walletConnectors/{chunk-Z2HIQYVN.js → chunk-R5GNFRXW.js} +1 -1
  73. package/dist/wallets/walletConnectors/{chunk-V45EXW7A.js → chunk-S2IWMXKX.js} +4 -4
  74. package/dist/wallets/walletConnectors/{chunk-FLY7F4XA.js → chunk-SJWHYD45.js} +1 -1
  75. package/dist/wallets/walletConnectors/{chunk-OKWOB3DN.js → chunk-TKXMLZXG.js} +4 -4
  76. package/dist/wallets/walletConnectors/{chunk-3WZRNEZH.js → chunk-TUK3HNKY.js} +6 -2
  77. package/dist/wallets/walletConnectors/{chunk-OR3PU2W4.js → chunk-UWU574XS.js} +4 -4
  78. package/dist/wallets/walletConnectors/{chunk-O5NKWWEG.js → chunk-WH7S23VZ.js} +4 -4
  79. package/dist/wallets/walletConnectors/{chunk-ZBAQFL6G.js → chunk-WS4EM7AZ.js} +1 -1
  80. package/dist/wallets/walletConnectors/{chunk-SYELB4QO.js → chunk-XB2GFXBL.js} +4 -4
  81. package/dist/wallets/walletConnectors/{chunk-ZOL6ZMTJ.js → chunk-XEZPRJPV.js} +1 -1
  82. package/dist/wallets/walletConnectors/{chunk-XSSD5ZVD.js → chunk-XUXFYTCV.js} +4 -4
  83. package/dist/wallets/walletConnectors/{chunk-DPXMP5KS.js → chunk-Z5QFIFDP.js} +1 -1
  84. package/dist/wallets/walletConnectors/{chunk-CUKVUCIP.js → chunk-ZBQT5PV6.js} +4 -4
  85. package/dist/wallets/walletConnectors/{chunk-PWYTDYBE.js → chunk-ZCSUP7CX.js} +1 -1
  86. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  87. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  88. package/dist/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.d.ts +7 -1
  89. package/dist/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.js +1 -2
  90. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  91. package/dist/wallets/walletConnectors/dawnWallet/dawnWallet.js +2 -2
  92. package/dist/wallets/walletConnectors/desigWallet/desigWallet.js +2 -2
  93. package/dist/wallets/walletConnectors/enkryptWallet/enkryptWallet.js +2 -2
  94. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  95. package/dist/wallets/walletConnectors/frameWallet/frameWallet.js +2 -2
  96. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  97. package/dist/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.d.ts +1 -5
  98. package/dist/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.js +2 -8
  99. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  100. package/dist/wallets/walletConnectors/index.js +76 -76
  101. package/dist/wallets/walletConnectors/injectedWallet/injectedWallet.js +2 -2
  102. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  103. package/dist/wallets/walletConnectors/mewWallet/mewWallet.js +2 -2
  104. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  105. package/dist/wallets/walletConnectors/oneKeyWallet/oneKeyWallet.js +2 -2
  106. package/dist/wallets/walletConnectors/phantomWallet/phantomWallet.js +2 -2
  107. package/dist/wallets/walletConnectors/rabbyWallet/rabbyWallet.js +2 -2
  108. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  109. package/dist/wallets/walletConnectors/ramperWallet/ramperWallet.js +2 -2
  110. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  111. package/dist/wallets/walletConnectors/safeheronWallet/safeheronWallet.js +2 -2
  112. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  113. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  114. package/dist/wallets/walletConnectors/tahoWallet/tahoWallet.js +2 -2
  115. package/dist/wallets/walletConnectors/talismanWallet/talismanWallet.js +2 -2
  116. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  117. package/dist/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.js +2 -2
  118. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  119. package/dist/wallets/walletConnectors/xdefiWallet/xdefiWallet.js +2 -2
  120. package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +2 -2
  121. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  122. package/package.json +4 -4
  123. package/dist/wallets/walletConnectors/chunk-VWZEDVW6.js +0 -27
  124. package/dist/wallets/walletConnectors/chunk-YC7XNS7C.js +0 -98
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-UDJBGTFV.js";
8
5
  import {
9
6
  darkTheme
10
7
  } from "./chunk-RRG76BJM.js";
8
+ import {
9
+ lightTheme
10
+ } from "./chunk-UDJBGTFV.js";
11
11
  import "./chunk-FECCKVZV.js";
12
12
 
13
13
  // src/components/ConnectButton/ConnectButton.tsx
@@ -2701,7 +2701,10 @@ function FunkitCheckoutProvider({ children }) {
2701
2701
  config: {
2702
2702
  ...initSettings.config,
2703
2703
  targetAsset: initSettings.config.targetAsset.toLowerCase(),
2704
- targetAssetAmount: parseFloat(initSettings.config.targetAssetAmount.toString()) || 0
2704
+ targetChain: initSettings.config.targetChain.toString(),
2705
+ targetAssetAmount: parseFloat(
2706
+ (initSettings.config.targetAssetAmount || 0).toString()
2707
+ ) || 0
2705
2708
  }
2706
2709
  },
2707
2710
  isFastForwarded
@@ -3875,7 +3878,10 @@ var ASSET_LOGO_SRCS = {
3875
3878
  PENDLE: "https://assets.coingecko.com/coins/images/15069/large/Pendle_Logo_Normal-03.png?1696514728",
3876
3879
  WEETH: "https://assets.coingecko.com/coins/images/33033/large/weETH.png?1701438396",
3877
3880
  GMX: "https://raw.githubusercontent.com/Uniswap/assets/master/blockchains/arbitrum/assets/0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a/logo.png",
3878
- TYBG: "https://assets.coingecko.com/coins/images/34563/large/tybg.png?1705400778"
3881
+ TYBG: "https://assets.coingecko.com/coins/images/34563/large/tybg.png?1705400778",
3882
+ LUCK: "https://pbs.twimg.com/profile_images/1798811045005516800/6UGU4Mjm_400x400.jpg",
3883
+ WSTETH: "https://assets.coingecko.com/coins/images/18834/large/wstETH.png?1696518295",
3884
+ WETH: "https://www.cryptocompare.com/media/38553079/weth.png"
3879
3885
  };
3880
3886
 
3881
3887
  // src/components/AsyncImage/AsyncImage.tsx
@@ -15274,8 +15280,10 @@ var FunkitWeb2Provider = ({
15274
15280
  const funkitConnectWallet2 = wallets.find(
15275
15281
  (wallet) => wallet.id === FUNKIT_CONNECT_WALLET_ID
15276
15282
  );
15277
- if (!funkitConnectWallet2)
15278
- throw new Error("FunkitConnect wallet connector not found");
15283
+ if (!funkitConnectWallet2) {
15284
+ setLoginMethodAndCache(null);
15285
+ return false;
15286
+ }
15279
15287
  logger.log("privyChainSwitch", { provider, chainId });
15280
15288
  await provider.request({
15281
15289
  method: "wallet_switchEthereumChain",
@@ -16198,9 +16206,7 @@ var connectorsForWallets = (walletList, {
16198
16206
  appName,
16199
16207
  appDescription,
16200
16208
  appUrl,
16201
- appIcon,
16202
- funkitApiKey,
16203
- initialChainId
16209
+ appIcon
16204
16210
  }) => {
16205
16211
  let index = -1;
16206
16212
  const connectors = [];
@@ -16226,9 +16232,7 @@ var connectorsForWallets = (walletList, {
16226
16232
  walletConnectParameters: {
16227
16233
  metadata: walletConnectMetaData,
16228
16234
  ...walletConnectParameters
16229
- },
16230
- funkitApiKey,
16231
- initialChainId
16235
+ }
16232
16236
  });
16233
16237
  if ((wallet == null ? void 0 : wallet.iconAccent) && !isHexString(wallet == null ? void 0 : wallet.iconAccent)) {
16234
16238
  throw new Error(
@@ -16357,10 +16361,11 @@ function getWalletConnectConnector({
16357
16361
  import { createConnector as createConnector2 } from "wagmi";
16358
16362
  import { injected } from "wagmi/connectors";
16359
16363
  function getExplicitInjectedProvider(flag) {
16360
- if (typeof window === "undefined" || typeof window.ethereum === "undefined")
16364
+ const _window = typeof window !== "undefined" ? window : void 0;
16365
+ if (typeof _window === "undefined" || typeof _window.ethereum === "undefined")
16361
16366
  return;
16362
- const providers = window.ethereum.providers;
16363
- return providers ? providers.find((provider) => provider[flag]) : window.ethereum[flag] ? window.ethereum : void 0;
16367
+ const providers = _window.ethereum.providers;
16368
+ return providers ? providers.find((provider) => provider[flag]) : _window.ethereum[flag] ? _window.ethereum : void 0;
16364
16369
  }
16365
16370
  function getWindowProviderNamespace(namespace) {
16366
16371
  const providerSearch = (provider, namespace2) => {
@@ -16390,14 +16395,15 @@ function getInjectedProvider({
16390
16395
  namespace
16391
16396
  }) {
16392
16397
  var _a;
16393
- if (typeof window === "undefined")
16398
+ const _window = typeof window !== "undefined" ? window : void 0;
16399
+ if (typeof _window === "undefined")
16394
16400
  return;
16395
16401
  if (namespace) {
16396
16402
  const windowProvider = getWindowProviderNamespace(namespace);
16397
16403
  if (windowProvider)
16398
16404
  return windowProvider;
16399
16405
  }
16400
- const providers = (_a = window.ethereum) == null ? void 0 : _a.providers;
16406
+ const providers = (_a = _window.ethereum) == null ? void 0 : _a.providers;
16401
16407
  if (flag) {
16402
16408
  const provider = getExplicitInjectedProvider(flag);
16403
16409
  if (provider)
@@ -16405,7 +16411,7 @@ function getInjectedProvider({
16405
16411
  }
16406
16412
  if (typeof providers !== "undefined" && providers.length > 0)
16407
16413
  return providers[0];
16408
- return window.ethereum;
16414
+ return _window.ethereum;
16409
16415
  }
16410
16416
  function createInjectedConnector(provider) {
16411
16417
  return (walletDetails) => {
@@ -16433,14 +16439,10 @@ function getInjectedConnector({
16433
16439
 
16434
16440
  // src/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.ts
16435
16441
  import { createConnector as createConnector3 } from "wagmi";
16436
- import { coinbaseWallet as coinbaseWagmiWallet } from "wagmi/connectors";
16437
- var coinbaseWallet = ({
16438
- appName,
16439
- appIcon
16440
- }) => {
16441
- const isCoinbaseWalletInjected = hasInjectedProvider({
16442
- flag: "isCoinbaseWallet"
16443
- });
16442
+ import {
16443
+ coinbaseWallet as coinbaseConnector
16444
+ } from "wagmi/connectors";
16445
+ var coinbaseWallet = ({ appName, appIcon }) => {
16444
16446
  const getUri = (uri) => uri;
16445
16447
  const ios = isIOS();
16446
16448
  return {
@@ -16451,7 +16453,7 @@ var coinbaseWallet = ({
16451
16453
  iconUrl: async () => (await import("./coinbaseWallet-2OUR5TUP.js")).default,
16452
16454
  iconAccent: "#2c5ff6",
16453
16455
  iconBackground: "#2c5ff6",
16454
- installed: isCoinbaseWalletInjected || void 0,
16456
+ installed: true,
16455
16457
  downloadUrls: {
16456
16458
  android: "https://play.google.com/store/apps/details?id=org.toshi",
16457
16459
  ios: "https://apps.apple.com/us/app/coinbase-wallet-store-crypto/id1278383455",
@@ -16507,14 +16509,17 @@ var coinbaseWallet = ({
16507
16509
  }
16508
16510
  }
16509
16511
  },
16510
- createConnector: (walletDetails) => createConnector3((config) => ({
16511
- ...coinbaseWagmiWallet({
16512
+ createConnector: (walletDetails) => {
16513
+ const connector = coinbaseConnector({
16512
16514
  appName,
16513
16515
  appLogoUrl: appIcon,
16514
- headlessMode: true
16515
- })(config),
16516
- ...walletDetails
16517
- }))
16516
+ preference: coinbaseWallet.preference
16517
+ });
16518
+ return createConnector3((config) => ({
16519
+ ...connector(config),
16520
+ ...walletDetails
16521
+ }));
16522
+ }
16518
16523
  };
16519
16524
  };
16520
16525
 
@@ -16560,6 +16565,8 @@ function isMetaMask(ethereum) {
16560
16565
  return false;
16561
16566
  if (ethereum.isMathWallet)
16562
16567
  return false;
16568
+ if (ethereum.isNestWallet)
16569
+ return false;
16563
16570
  if (ethereum.isOkxWallet || ethereum.isOKExWallet)
16564
16571
  return false;
16565
16572
  if (ethereum.isOneInchIOSWallet || ethereum.isOneInchAndroidWallet)
@@ -16675,7 +16682,9 @@ var metaMaskWallet = ({
16675
16682
  projectId,
16676
16683
  walletConnectParameters
16677
16684
  }) : getInjectedConnector({
16678
- target: typeof window !== "undefined" ? (_c = (_b = (_a = window.ethereum) == null ? void 0 : _a.providers) == null ? void 0 : _b.find(isMetaMask)) != null ? _c : window.ethereum : void 0
16685
+ target: typeof window !== "undefined" ? (_c = (_b = (_a = window.ethereum) == null ? void 0 : _a.providers) == null ? void 0 : _b.find(
16686
+ isMetaMask
16687
+ )) != null ? _c : window.ethereum : void 0
16679
16688
  })
16680
16689
  };
16681
16690
  };
@@ -16760,10 +16769,7 @@ var walletConnectWallet = ({
16760
16769
  // src/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.ts
16761
16770
  import { funkitWagmiConnectorWallet } from "@funkit/wagmi-tools";
16762
16771
  import { createConnector as createConnector4 } from "wagmi";
16763
- var funkitConnectWallet = ({
16764
- funkitApiKey,
16765
- initialChainId
16766
- }) => {
16772
+ var funkitConnectWallet = () => {
16767
16773
  return {
16768
16774
  id: FUNKIT_CONNECT_WALLET_ID,
16769
16775
  name: "FunkitConnect Wallet",
@@ -16774,10 +16780,7 @@ var funkitConnectWallet = ({
16774
16780
  downloadUrls: void 0,
16775
16781
  createConnector: (walletDetails) => {
16776
16782
  return createConnector4((config) => ({
16777
- ...funkitWagmiConnectorWallet({
16778
- funkitApiKey,
16779
- chainId: initialChainId
16780
- })(config),
16783
+ ...funkitWagmiConnectorWallet()(config),
16781
16784
  ...walletDetails
16782
16785
  }));
16783
16786
  }
@@ -16819,8 +16822,6 @@ var getDefaultConfig = ({
16819
16822
  appIcon,
16820
16823
  wallets,
16821
16824
  projectId,
16822
- funkitApiKey,
16823
- initialChainId,
16824
16825
  ...wagmiParameters
16825
16826
  }) => {
16826
16827
  const { transports, connectors, chains, ...restWagmiParameters } = wagmiParameters;
@@ -16854,9 +16855,7 @@ var getDefaultConfig = ({
16854
16855
  appDescription,
16855
16856
  appUrl,
16856
16857
  appIcon,
16857
- walletConnectParameters: { metadata },
16858
- funkitApiKey,
16859
- initialChainId: initialChainId.toString()
16858
+ walletConnectParameters: { metadata }
16860
16859
  }
16861
16860
  );
16862
16861
  }
@@ -16987,7 +16986,7 @@ function setFunkitConnectVersion({ version }) {
16987
16986
  localStorage.setItem(storageKey6, version);
16988
16987
  }
16989
16988
  function getCurrentSdkVersion() {
16990
- return "1.1.6";
16989
+ return "1.2.1";
16991
16990
  }
16992
16991
  function useFingerprint() {
16993
16992
  const fingerprint = useCallback33(() => {
@@ -17039,9 +17038,7 @@ function FunkitProvider(props) {
17039
17038
  if (props.wagmiConfig && initialChainId) {
17040
17039
  finalWagmiConfig = createFunkitWagmiConfig({
17041
17040
  ...props.wagmiConfig,
17042
- appName: props.funkitConfig.appName,
17043
- funkitApiKey: props.funkitConfig.apiKey,
17044
- initialChainId: initialChainId.toString()
17041
+ appName: props.funkitConfig.appName
17045
17042
  });
17046
17043
  }
17047
17044
  let finalQueryClient;
@@ -0,0 +1,37 @@
1
+ import { type EIP1193Provider } from 'viem';
2
+ /** Combines members of an intersection into a readable type. */
3
+ export type Evaluate<type> = {
4
+ [key in keyof type]: type[key];
5
+ } & unknown;
6
+ /** Removes `readonly` from all properties of an object. */
7
+ export type Mutable<type extends object> = {
8
+ -readonly [key in keyof type]: type[key];
9
+ };
10
+ /** Strict version of built-in Omit type */
11
+ export type Omit<type, keys extends keyof type> = Pick<type, Exclude<keyof type, keys>>;
12
+ export type WalletProviderFlags = 'isApexWallet' | 'isAvalanche' | 'isBackpack' | 'isBifrost' | 'isBitKeep' | 'isBitski' | 'isBlockWallet' | 'isBraveWallet' | 'isCoinbaseWallet' | 'isDawn' | 'isEnkrypt' | 'isExodus' | 'isFrame' | 'isFrontier' | 'isGamestop' | 'isHyperPay' | 'isImToken' | 'isKuCoinWallet' | 'isMathWallet' | 'isMetaMask' | 'isNestWallet' | 'isOkxWallet' | 'isOKExWallet' | 'isOneInchAndroidWallet' | 'isOneInchIOSWallet' | 'isOpera' | 'isPhantom' | 'isPortal' | 'isRabby' | 'isRainbow' | 'isStatus' | 'isTally' | 'isTokenPocket' | 'isTokenary' | 'isTrust' | 'isTrustWallet' | 'isXDEFI' | 'isZerion' | 'isTalisman' | 'isZeal' | 'isCoin98' | 'isMEWwallet' | 'isSafeheron' | 'isSafePal';
13
+ export type WalletProvider = Evaluate<EIP1193Provider & {
14
+ [key in WalletProviderFlags]?: true | undefined;
15
+ } & {
16
+ providers?: any[] | undefined;
17
+ /** Only exists in MetaMask as of 2022/04/03 */
18
+ _events?: {
19
+ connect?: (() => void) | undefined;
20
+ } | undefined;
21
+ /** Only exists in MetaMask as of 2022/04/03 */
22
+ _state?: {
23
+ accounts?: string[];
24
+ initialized?: boolean;
25
+ isConnected?: boolean;
26
+ isPermanentlyDisconnected?: boolean;
27
+ isUnlocked?: boolean;
28
+ } | undefined;
29
+ }>;
30
+ export type WindowProvider = {
31
+ coinbaseWalletExtension?: WalletProvider | undefined;
32
+ ethereum?: WalletProvider | undefined;
33
+ phantom?: {
34
+ ethereum: WalletProvider;
35
+ } | undefined;
36
+ providers?: any[] | undefined;
37
+ };
@@ -1,7 +1,6 @@
1
1
  import { Connector, CreateConnectorFn } from 'wagmi';
2
2
  import { WalletConnectParameters } from 'wagmi/connectors';
3
3
  import { CoinbaseWalletOptions } from './walletConnectors/coinbaseWallet/coinbaseWallet';
4
- import { FunkitConnectWalletConfig } from './walletConnectors/funkitConnectWallet/funkitConnectWallet';
5
4
  import { WalletConnectWalletOptions } from './walletConnectors/walletConnectWallet/walletConnectWallet';
6
5
  export type InstructionStepName = 'install' | 'create' | 'scan' | 'connect' | 'refresh';
7
6
  type FunkitSdkConnector = {
@@ -73,7 +72,7 @@ export interface DefaultWalletOptions {
73
72
  projectId: string;
74
73
  walletConnectParameters?: FunkitConnectWalletConnectParameters;
75
74
  }
76
- export type CreateWalletFn = (createWalletParams: CoinbaseWalletOptions & Omit<WalletConnectWalletOptions, 'projectId'> & DefaultWalletOptions & FunkitConnectWalletConfig) => Wallet;
75
+ export type CreateWalletFn = (createWalletParams: CoinbaseWalletOptions & Omit<WalletConnectWalletOptions, 'projectId'> & DefaultWalletOptions) => Wallet;
77
76
  export type WalletList = {
78
77
  groupName: string;
79
78
  wallets: CreateWalletFn[];
@@ -7,7 +7,5 @@ export interface ConnectorsForWalletsParameters {
7
7
  appUrl?: string;
8
8
  appIcon?: string | undefined;
9
9
  walletConnectParameters?: FunkitConnectWalletConnectParameters;
10
- funkitApiKey: string;
11
- initialChainId: string;
12
10
  }
13
- export declare const connectorsForWallets: (walletList: WalletList, { projectId, walletConnectParameters, appName, appDescription, appUrl, appIcon, funkitApiKey, initialChainId, }: ConnectorsForWalletsParameters) => CreateConnectorFn[];
11
+ export declare const connectorsForWallets: (walletList: WalletList, { projectId, walletConnectParameters, appName, appDescription, appUrl, appIcon, }: ConnectorsForWalletsParameters) => CreateConnectorFn[];
@@ -1,10 +1,11 @@
1
+ import { WalletProviderFlags } from '../types/utils';
1
2
  import { CreateConnector } from './Wallet';
2
3
  export declare function hasInjectedProvider({ flag, namespace, }: {
3
- flag?: string;
4
+ flag?: WalletProviderFlags;
4
5
  namespace?: string;
5
6
  }): boolean;
6
7
  export declare function getInjectedConnector({ flag, namespace, target, }: {
7
- flag?: string;
8
+ flag?: WalletProviderFlags;
8
9
  namespace?: string;
9
10
  target?: any;
10
11
  }): CreateConnector;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  bifrostWallet
4
- } from "../chunk-6LTLPR2Q.js";
4
+ } from "../chunk-AFONKDII.js";
5
5
  import "../chunk-ZOLACFTK.js";
6
6
  import "../chunk-ZDU3JFGR.js";
7
- import "../chunk-QII6PY2D.js";
7
+ import "../chunk-F3VCNZXS.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-ZNXQ4V6G.js";
4
+ } from "../chunk-OUQ3ZF2W.js";
5
5
  import "../chunk-ZOLACFTK.js";
6
6
  import "../chunk-ZDU3JFGR.js";
7
- import "../chunk-QII6PY2D.js";
7
+ import "../chunk-F3VCNZXS.js";
8
8
  export {
9
9
  bitgetWallet
10
10
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  bitskiWallet
4
- } from "../chunk-C67TQJ6W.js";
5
- import "../chunk-QII6PY2D.js";
4
+ } from "../chunk-IMZRCMZR.js";
5
+ import "../chunk-F3VCNZXS.js";
6
6
  export {
7
7
  bitskiWallet
8
8
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  braveWallet
4
- } from "../chunk-ABYQAXUX.js";
5
- import "../chunk-QII6PY2D.js";
4
+ } from "../chunk-KJWMF6GZ.js";
5
+ import "../chunk-F3VCNZXS.js";
6
6
  export {
7
7
  braveWallet
8
8
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bybitWallet
4
- } from "../chunk-ZUAHWUEL.js";
4
+ } from "../chunk-ZBQT5PV6.js";
5
5
  import "../chunk-ZDU3JFGR.js";
6
- import "../chunk-QII6PY2D.js";
6
+ import "../chunk-F3VCNZXS.js";
7
7
  export {
8
8
  bybitWallet
9
9
  };
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import {
3
- getWalletConnectConnector
4
- } from "./chunk-ZDU3JFGR.js";
5
2
  import {
6
3
  getInjectedConnector,
7
4
  hasInjectedProvider
8
- } from "./chunk-QII6PY2D.js";
5
+ } from "./chunk-F3VCNZXS.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-ZDU3JFGR.js";
9
9
 
10
10
  // src/wallets/walletConnectors/clvWallet/clvWallet.ts
11
11
  var clvWallet = ({
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import {
3
- getInjectedConnector,
4
- hasInjectedProvider
5
- } from "./chunk-QII6PY2D.js";
6
2
  import {
7
3
  getWalletConnectConnector
8
4
  } from "./chunk-ZDU3JFGR.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-F3VCNZXS.js";
9
9
 
10
10
  // src/wallets/walletConnectors/coreWallet/coreWallet.ts
11
11
  var coreWallet = ({
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import {
3
- getInjectedConnector,
4
- hasInjectedProvider
5
- } from "./chunk-QII6PY2D.js";
6
2
  import {
7
3
  isAndroid,
8
4
  isIOS
9
5
  } from "./chunk-ZOLACFTK.js";
6
+ import {
7
+ getInjectedConnector,
8
+ hasInjectedProvider
9
+ } from "./chunk-F3VCNZXS.js";
10
10
  import {
11
11
  getWalletConnectConnector
12
12
  } from "./chunk-ZDU3JFGR.js";
@@ -53,6 +53,8 @@ function isMetaMask(ethereum) {
53
53
  return false;
54
54
  if (ethereum.isMathWallet)
55
55
  return false;
56
+ if (ethereum.isNestWallet)
57
+ return false;
56
58
  if (ethereum.isOkxWallet || ethereum.isOKExWallet)
57
59
  return false;
58
60
  if (ethereum.isOneInchIOSWallet || ethereum.isOneInchAndroidWallet)
@@ -168,7 +170,9 @@ var metaMaskWallet = ({
168
170
  projectId,
169
171
  walletConnectParameters
170
172
  }) : getInjectedConnector({
171
- target: typeof window !== "undefined" ? (_c = (_b = (_a = window.ethereum) == null ? void 0 : _a.providers) == null ? void 0 : _b.find(isMetaMask)) != null ? _c : window.ethereum : void 0
173
+ target: typeof window !== "undefined" ? (_c = (_b = (_a = window.ethereum) == null ? void 0 : _a.providers) == null ? void 0 : _b.find(
174
+ isMetaMask
175
+ )) != null ? _c : window.ethereum : void 0
172
176
  })
173
177
  };
174
178
  };
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  getInjectedConnector,
7
7
  hasInjectedProvider
8
- } from "./chunk-QII6PY2D.js";
8
+ } from "./chunk-F3VCNZXS.js";
9
9
 
10
10
  // src/wallets/walletConnectors/coin98Wallet/coin98Wallet.ts
11
11
  var coin98Wallet = ({
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  isAndroid
4
4
  } from "./chunk-ZOLACFTK.js";
5
- import {
6
- getWalletConnectConnector
7
- } from "./chunk-ZDU3JFGR.js";
8
5
  import {
9
6
  getInjectedConnector,
10
7
  hasInjectedProvider
11
- } from "./chunk-QII6PY2D.js";
8
+ } from "./chunk-F3VCNZXS.js";
9
+ import {
10
+ getWalletConnectConnector
11
+ } from "./chunk-ZDU3JFGR.js";
12
12
 
13
13
  // src/wallets/walletConnectors/bitgetWallet/bitgetWallet.ts
14
14
  var bitgetWallet = ({
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getInjectedConnector,
4
4
  hasInjectedProvider
5
- } from "./chunk-QII6PY2D.js";
5
+ } from "./chunk-F3VCNZXS.js";
6
6
 
7
7
  // src/wallets/walletConnectors/phantomWallet/phantomWallet.ts
8
8
  var phantomWallet = () => {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getInjectedConnector,
4
4
  hasInjectedProvider
5
- } from "./chunk-QII6PY2D.js";
5
+ } from "./chunk-F3VCNZXS.js";
6
6
  import {
7
7
  getWalletConnectConnector
8
8
  } from "./chunk-ZDU3JFGR.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getInjectedConnector,
4
4
  hasInjectedProvider
5
- } from "./chunk-QII6PY2D.js";
5
+ } from "./chunk-F3VCNZXS.js";
6
6
 
7
7
  // src/wallets/walletConnectors/rabbyWallet/rabbyWallet.ts
8
8
  var rabbyWallet = () => ({
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  getInjectedConnector,
10
10
  hasInjectedProvider
11
- } from "./chunk-QII6PY2D.js";
11
+ } from "./chunk-F3VCNZXS.js";
12
12
 
13
13
  // src/wallets/walletConnectors/okxWallet/okxWallet.ts
14
14
  var okxWallet = ({
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  getInjectedConnector,
10
10
  hasInjectedProvider
11
- } from "./chunk-QII6PY2D.js";
11
+ } from "./chunk-F3VCNZXS.js";
12
12
 
13
13
  // src/wallets/walletConnectors/bifrostWallet/bifrostWallet.ts
14
14
  var bifrostWallet = ({
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import {
3
- getWalletConnectConnector
4
- } from "./chunk-ZDU3JFGR.js";
5
2
  import {
6
3
  getInjectedConnector,
7
4
  hasInjectedProvider
8
- } from "./chunk-QII6PY2D.js";
5
+ } from "./chunk-F3VCNZXS.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-ZDU3JFGR.js";
9
9
 
10
10
  // src/wallets/walletConnectors/bybitWallet/bybitWallet.ts
11
11
  var bybitWallet = ({
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import {
3
- getInjectedConnector,
4
- hasInjectedProvider
5
- } from "./chunk-QII6PY2D.js";
6
2
  import {
7
3
  isMobile
8
4
  } from "./chunk-ZOLACFTK.js";
9
5
  import {
10
6
  getWalletConnectConnector
11
7
  } from "./chunk-ZDU3JFGR.js";
8
+ import {
9
+ getInjectedConnector,
10
+ hasInjectedProvider
11
+ } from "./chunk-F3VCNZXS.js";
12
12
 
13
13
  // src/wallets/walletConnectors/trustWallet/trustWallet.ts
14
14
  var trustWallet = ({
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import {
3
- getInjectedConnector,
4
- hasInjectedProvider
5
- } from "./chunk-QII6PY2D.js";
6
2
  import {
7
3
  getWalletConnectConnector
8
4
  } from "./chunk-ZDU3JFGR.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-F3VCNZXS.js";
9
9
 
10
10
  // src/wallets/walletConnectors/roninWallet/roninWallet.ts
11
11
  var roninWallet = ({
@@ -1,8 +1,4 @@
1
1
  "use client";
2
- import {
3
- getInjectedConnector,
4
- hasInjectedProvider
5
- } from "./chunk-QII6PY2D.js";
6
2
  import {
7
3
  isAndroid,
8
4
  isIOS
@@ -10,6 +6,10 @@ import {
10
6
  import {
11
7
  getWalletConnectConnector
12
8
  } from "./chunk-ZDU3JFGR.js";
9
+ import {
10
+ getInjectedConnector,
11
+ hasInjectedProvider
12
+ } from "./chunk-F3VCNZXS.js";
13
13
 
14
14
  // src/wallets/walletConnectors/rainbowWallet/rainbowWallet.ts
15
15
  var rainbowWallet = ({
@@ -3,10 +3,11 @@
3
3
  import { createConnector } from "wagmi";
4
4
  import { injected } from "wagmi/connectors";
5
5
  function getExplicitInjectedProvider(flag) {
6
- if (typeof window === "undefined" || typeof window.ethereum === "undefined")
6
+ const _window = typeof window !== "undefined" ? window : void 0;
7
+ if (typeof _window === "undefined" || typeof _window.ethereum === "undefined")
7
8
  return;
8
- const providers = window.ethereum.providers;
9
- return providers ? providers.find((provider) => provider[flag]) : window.ethereum[flag] ? window.ethereum : void 0;
9
+ const providers = _window.ethereum.providers;
10
+ return providers ? providers.find((provider) => provider[flag]) : _window.ethereum[flag] ? _window.ethereum : void 0;
10
11
  }
11
12
  function getWindowProviderNamespace(namespace) {
12
13
  const providerSearch = (provider, namespace2) => {
@@ -36,14 +37,15 @@ function getInjectedProvider({
36
37
  namespace
37
38
  }) {
38
39
  var _a;
39
- if (typeof window === "undefined")
40
+ const _window = typeof window !== "undefined" ? window : void 0;
41
+ if (typeof _window === "undefined")
40
42
  return;
41
43
  if (namespace) {
42
44
  const windowProvider = getWindowProviderNamespace(namespace);
43
45
  if (windowProvider)
44
46
  return windowProvider;
45
47
  }
46
- const providers = (_a = window.ethereum) == null ? void 0 : _a.providers;
48
+ const providers = (_a = _window.ethereum) == null ? void 0 : _a.providers;
47
49
  if (flag) {
48
50
  const provider = getExplicitInjectedProvider(flag);
49
51
  if (provider)
@@ -51,7 +53,7 @@ function getInjectedProvider({
51
53
  }
52
54
  if (typeof providers !== "undefined" && providers.length > 0)
53
55
  return providers[0];
54
- return window.ethereum;
56
+ return _window.ethereum;
55
57
  }
56
58
  function createInjectedConnector(provider) {
57
59
  return (walletDetails) => {