@funkit/connect 3.0.1 → 3.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/components/Dialog/Dialog.css.d.ts +1 -0
  3. package/dist/components/Dialog/Dialog.d.ts +2 -1
  4. package/dist/components/FunButton/FunIconButton.d.ts +1 -0
  5. package/dist/config/getDefaultConfig.d.ts +428 -3148
  6. package/dist/consts/customers.d.ts +1 -0
  7. package/dist/index.css +9 -1
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.js +80 -40
  10. package/dist/providers/FunkitCheckoutContext.d.ts +2 -0
  11. package/dist/utils/flags/config.d.ts +4 -1
  12. package/dist/utils/flags/index.d.ts +1 -0
  13. package/dist/wallets/walletConnectors/chunk-25VW5TZP.js +92 -0
  14. package/dist/wallets/walletConnectors/chunk-4HKPVECK.js +95 -0
  15. package/dist/wallets/walletConnectors/chunk-4K3EKHXR.js +71 -0
  16. package/dist/wallets/walletConnectors/chunk-57UUMOOZ.js +95 -0
  17. package/dist/wallets/walletConnectors/chunk-5MVCKMZT.js +94 -0
  18. package/dist/wallets/walletConnectors/chunk-5NZLWT3Y.js +73 -0
  19. package/dist/wallets/walletConnectors/chunk-B5D7DYVV.js +101 -0
  20. package/dist/wallets/walletConnectors/chunk-HCKLWBE5.js +98 -0
  21. package/dist/wallets/walletConnectors/chunk-HLH777AC.js +108 -0
  22. package/dist/wallets/walletConnectors/chunk-HMDUVRZP.js +98 -0
  23. package/dist/wallets/walletConnectors/chunk-IR3YKU2N.js +103 -0
  24. package/dist/wallets/walletConnectors/chunk-J2BF4L2V.js +87 -0
  25. package/dist/wallets/walletConnectors/chunk-KDGMYRMC.js +102 -0
  26. package/dist/wallets/walletConnectors/chunk-OKUX4BC4.js +66 -0
  27. package/dist/wallets/walletConnectors/chunk-VU6B3HMD.js +96 -0
  28. package/dist/wallets/walletConnectors/chunk-WAMHUVNP.js +96 -0
  29. package/dist/wallets/walletConnectors/chunk-YRK6XWL6.js +149 -0
  30. package/dist/wallets/walletConnectors/chunk-ZCKNEKQQ.js +110 -0
  31. package/dist/wallets/walletConnectors/index.js +67 -67
  32. package/package.json +6 -6
@@ -0,0 +1,149 @@
1
+ "use client";
2
+ import {
3
+ isAndroid,
4
+ isIOS
5
+ } from "./chunk-RETKWSKD.js";
6
+ import {
7
+ getInjectedConnector,
8
+ hasInjectedProvider
9
+ } from "./chunk-WRA2DVJ7.js";
10
+ import {
11
+ getWalletConnectConnector
12
+ } from "./chunk-23WIEY36.js";
13
+
14
+ // src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts
15
+ function isMetaMask(ethereum) {
16
+ if (!ethereum?.isMetaMask) return false;
17
+ if (ethereum.isBraveWallet && !ethereum._events && !ethereum._state)
18
+ return false;
19
+ if (ethereum.isApexWallet) return false;
20
+ if (ethereum.isAvalanche) return false;
21
+ if (ethereum.isBackpack) return false;
22
+ if (ethereum.isBifrost) return false;
23
+ if (ethereum.isBitKeep) return false;
24
+ if (ethereum.isBitski) return false;
25
+ if (ethereum.isBlockWallet) return false;
26
+ if (ethereum.isCoinbaseWallet) return false;
27
+ if (ethereum.isDawn) return false;
28
+ if (ethereum.isEnkrypt) return false;
29
+ if (ethereum.isExodus) return false;
30
+ if (ethereum.isFrame) return false;
31
+ if (ethereum.isFrontier) return false;
32
+ if (ethereum.isGamestop) return false;
33
+ if (ethereum.isHyperPay) return false;
34
+ if (ethereum.isImToken) return false;
35
+ if (ethereum.isKuCoinWallet) return false;
36
+ if (ethereum.isMathWallet) return false;
37
+ if (ethereum.isNestWallet) return false;
38
+ if (ethereum.isOkxWallet || ethereum.isOKExWallet) return false;
39
+ if (ethereum.isOneInchIOSWallet || ethereum.isOneInchAndroidWallet)
40
+ return false;
41
+ if (ethereum.isOpera) return false;
42
+ if (ethereum.isPhantom) return false;
43
+ if (ethereum.isPortal) return false;
44
+ if (ethereum.isRabby) return false;
45
+ if (ethereum.isRainbow) return false;
46
+ if (ethereum.isStatus) return false;
47
+ if (ethereum.isTalisman) return false;
48
+ if (ethereum.isTally) return false;
49
+ if (ethereum.isTokenPocket) return false;
50
+ if (ethereum.isTokenary) return false;
51
+ if (ethereum.isTrust || ethereum.isTrustWallet) return false;
52
+ if (ethereum.isXDEFI) return false;
53
+ if (ethereum.isZeal) return false;
54
+ if (ethereum.isZerion) return false;
55
+ return true;
56
+ }
57
+ var metaMaskWallet = ({
58
+ projectId,
59
+ walletConnectParameters
60
+ }) => {
61
+ const isMetaMaskInjected = hasInjectedProvider({ flag: "isMetaMask" });
62
+ const shouldUseWalletConnect = !isMetaMaskInjected;
63
+ const getUri = (uri) => {
64
+ return isAndroid() ? uri : isIOS() ? (
65
+ // currently broken in MetaMask v6.5.0 https://github.com/MetaMask/metamask-mobile/issues/6457
66
+ `metamask://wc?uri=${encodeURIComponent(uri)}`
67
+ ) : `https://metamask.app.link/wc?uri=${encodeURIComponent(uri)}`;
68
+ };
69
+ return {
70
+ id: "metaMask",
71
+ name: "MetaMask",
72
+ rdns: "io.metamask",
73
+ iconUrl: async () => (await import("./metaMaskWallet-YFHEHW7V.js")).default,
74
+ iconAccent: "#f6851a",
75
+ iconBackground: "#fff",
76
+ installed: !shouldUseWalletConnect ? isMetaMaskInjected : void 0,
77
+ downloadUrls: {
78
+ android: "https://play.google.com/store/apps/details?id=io.metamask",
79
+ ios: "https://apps.apple.com/us/app/metamask/id1438144202",
80
+ mobile: "https://metamask.io/download",
81
+ qrCode: "https://metamask.io/download",
82
+ chrome: "https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",
83
+ edge: "https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",
84
+ firefox: "https://addons.mozilla.org/firefox/addon/ether-metamask",
85
+ opera: "https://addons.opera.com/extensions/details/metamask-10",
86
+ browserExtension: "https://metamask.io/download"
87
+ },
88
+ mobile: {
89
+ getUri: shouldUseWalletConnect ? getUri : void 0
90
+ },
91
+ qrCode: shouldUseWalletConnect ? {
92
+ getUri,
93
+ instructions: {
94
+ learnMoreUrl: "https://metamask.io/faqs/",
95
+ steps: [
96
+ {
97
+ description: "wallet_connectors.metamask.qr_code.step1.description",
98
+ step: "install",
99
+ title: "wallet_connectors.metamask.qr_code.step1.title"
100
+ },
101
+ {
102
+ description: "wallet_connectors.metamask.qr_code.step2.description",
103
+ step: "create",
104
+ title: "wallet_connectors.metamask.qr_code.step2.title"
105
+ },
106
+ {
107
+ description: "wallet_connectors.metamask.qr_code.step3.description",
108
+ step: "refresh",
109
+ title: "wallet_connectors.metamask.qr_code.step3.title"
110
+ }
111
+ ]
112
+ }
113
+ } : void 0,
114
+ extension: {
115
+ instructions: {
116
+ learnMoreUrl: "https://metamask.io/faqs/",
117
+ steps: [
118
+ {
119
+ description: "wallet_connectors.metamask.extension.step1.description",
120
+ step: "install",
121
+ title: "wallet_connectors.metamask.extension.step1.title"
122
+ },
123
+ {
124
+ description: "wallet_connectors.metamask.extension.step2.description",
125
+ step: "create",
126
+ title: "wallet_connectors.metamask.extension.step2.title"
127
+ },
128
+ {
129
+ description: "wallet_connectors.metamask.extension.step3.description",
130
+ step: "refresh",
131
+ title: "wallet_connectors.metamask.extension.step3.title"
132
+ }
133
+ ]
134
+ }
135
+ },
136
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
137
+ projectId,
138
+ walletConnectParameters
139
+ }) : getInjectedConnector({
140
+ target: typeof window !== "undefined" ? window.ethereum?.providers?.find(
141
+ isMetaMask
142
+ ) ?? window.ethereum : void 0
143
+ })
144
+ };
145
+ };
146
+
147
+ export {
148
+ metaMaskWallet
149
+ };
@@ -0,0 +1,110 @@
1
+ "use client";
2
+ import {
3
+ getInjectedConnector,
4
+ hasInjectedProvider
5
+ } from "./chunk-WRA2DVJ7.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-23WIEY36.js";
9
+
10
+ // src/wallets/walletConnectors/safepalWallet/safepalWallet.ts
11
+ var safepalWallet = ({
12
+ projectId,
13
+ walletConnectParameters
14
+ }) => {
15
+ const isSafePalWalletInjected = hasInjectedProvider({
16
+ namespace: "safepalProvider",
17
+ flag: "isSafePal"
18
+ });
19
+ const shouldUseWalletConnect = !isSafePalWalletInjected;
20
+ const getUriMobile = (uri) => {
21
+ return `safepalwallet://wc?uri=${encodeURIComponent(uri)}`;
22
+ };
23
+ const getUriQR = async (uri) => {
24
+ return uri;
25
+ };
26
+ const mobileConnector = {
27
+ getUri: shouldUseWalletConnect ? getUriMobile : void 0
28
+ };
29
+ let qrConnector = void 0;
30
+ if (shouldUseWalletConnect) {
31
+ qrConnector = {
32
+ getUri: getUriQR,
33
+ instructions: {
34
+ learnMoreUrl: "https://safepal.com/",
35
+ steps: [
36
+ {
37
+ description: "wallet_connectors.safepal.qr_code.step1.description",
38
+ step: "install",
39
+ title: "wallet_connectors.safepal.qr_code.step1.title"
40
+ },
41
+ {
42
+ description: "wallet_connectors.safepal.qr_code.step2.description",
43
+ step: "create",
44
+ title: "wallet_connectors.safepal.qr_code.step2.title"
45
+ },
46
+ {
47
+ description: "wallet_connectors.safepal.qr_code.step3.description",
48
+ step: "scan",
49
+ title: "wallet_connectors.safepal.qr_code.step3.title"
50
+ }
51
+ ]
52
+ }
53
+ };
54
+ }
55
+ const extensionConnector = {
56
+ instructions: {
57
+ learnMoreUrl: "https://www.safepal.com/download?product=2",
58
+ steps: [
59
+ {
60
+ description: "wallet_connectors.safepal.extension.step1.description",
61
+ step: "install",
62
+ title: "wallet_connectors.safepal.extension.step1.title"
63
+ },
64
+ {
65
+ description: "wallet_connectors.safepal.extension.step2.description",
66
+ step: "create",
67
+ title: "wallet_connectors.safepal.extension.step2.title"
68
+ },
69
+ {
70
+ description: "wallet_connectors.safepal.extension.step3.description",
71
+ step: "refresh",
72
+ title: "wallet_connectors.safepal.extension.step3.title"
73
+ }
74
+ ]
75
+ }
76
+ };
77
+ return {
78
+ id: "safepal",
79
+ name: "SafePal Wallet",
80
+ iconUrl: async () => (await import("./safepalWallet-KQJ4OCNH.js")).default,
81
+ // Note that we never resolve `installed` to `false` because the
82
+ // SafePal Wallet provider falls back to other connection methods if
83
+ // the injected connector isn't available
84
+ installed: isSafePalWalletInjected,
85
+ iconAccent: "#3375BB",
86
+ iconBackground: "#fff",
87
+ downloadUrls: {
88
+ android: "https://play.google.com/store/apps/details?id=io.safepal.wallet&referrer=utm_source%3Drainbowkit%26utm_medium%3Ddisplay%26utm_campaign%3Ddownload",
89
+ ios: "https://apps.apple.com/app/apple-store/id1548297139?pt=122504219&ct=rainbowkit&mt=8",
90
+ mobile: "https://www.safepal.com/en/download",
91
+ qrCode: "https://www.safepal.com/en/download",
92
+ chrome: "https://chrome.google.com/webstore/detail/safepal-extension-wallet/lgmpcpglpngdoalbgeoldeajfclnhafa",
93
+ browserExtension: "https://www.safepal.com/download?product=2"
94
+ },
95
+ mobile: mobileConnector,
96
+ ...qrConnector ? qrConnector : {},
97
+ extension: extensionConnector,
98
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
99
+ projectId,
100
+ walletConnectParameters
101
+ }) : getInjectedConnector({
102
+ namespace: "safepalProvider",
103
+ flag: "isSafePal"
104
+ })
105
+ };
106
+ };
107
+
108
+ export {
109
+ safepalWallet
110
+ };
@@ -1,153 +1,153 @@
1
1
  "use client";
2
2
  import {
3
- safeheronWallet
4
- } from "./chunk-FCIRHRFH.js";
3
+ uniswapWallet
4
+ } from "./chunk-QFRZGNNV.js";
5
+ import {
6
+ zealWallet
7
+ } from "./chunk-BUUV6BS4.js";
5
8
  import {
6
9
  zerionWallet
7
10
  } from "./chunk-DBP432DI.js";
8
11
  import {
9
- xdefiWallet
10
- } from "./chunk-RVIZMVFR.js";
12
+ safepalWallet
13
+ } from "./chunk-AKAT37SI.js";
11
14
  import {
12
- tahoWallet
13
- } from "./chunk-6AYBA6IH.js";
15
+ tokenPocketWallet
16
+ } from "./chunk-ISJYPD3T.js";
14
17
  import {
15
18
  talismanWallet
16
19
  } from "./chunk-OTXHQMSG.js";
17
- import {
18
- tokenPocketWallet
19
- } from "./chunk-ISJYPD3T.js";
20
20
  import {
21
21
  tokenaryWallet
22
22
  } from "./chunk-FAYEL4JP.js";
23
23
  import {
24
- uniswapWallet
25
- } from "./chunk-QFRZGNNV.js";
24
+ trustWallet
25
+ } from "./chunk-X45WXZDO.js";
26
+ import {
27
+ tahoWallet
28
+ } from "./chunk-6AYBA6IH.js";
26
29
  import {
27
30
  walletConnectWallet
28
31
  } from "./chunk-OFU3PEVT.js";
29
32
  import {
30
- trustWallet
31
- } from "./chunk-X45WXZDO.js";
32
- import {
33
- zealWallet
34
- } from "./chunk-BUUV6BS4.js";
33
+ xdefiWallet
34
+ } from "./chunk-RVIZMVFR.js";
35
35
  import {
36
- roninWallet
37
- } from "./chunk-63YLN6R5.js";
36
+ phantomWallet
37
+ } from "./chunk-KEVUI6AA.js";
38
38
  import {
39
39
  ramperWallet
40
40
  } from "./chunk-TKXQYHWJ.js";
41
41
  import {
42
- phantomWallet
43
- } from "./chunk-KEVUI6AA.js";
42
+ oneKeyWallet
43
+ } from "./chunk-ZP2SV6KN.js";
44
44
  import {
45
45
  rainbowWallet
46
46
  } from "./chunk-OHJBALD3.js";
47
+ import {
48
+ safeheronWallet
49
+ } from "./chunk-FCIRHRFH.js";
47
50
  import {
48
51
  safeWallet
49
52
  } from "./chunk-Z2QCE6O6.js";
50
53
  import {
51
- safepalWallet
52
- } from "./chunk-AKAT37SI.js";
53
- import {
54
- rabbyWallet
55
- } from "./chunk-H5LLXNOI.js";
54
+ roninWallet
55
+ } from "./chunk-63YLN6R5.js";
56
56
  import {
57
57
  subWallet
58
58
  } from "./chunk-N3ELQYCY.js";
59
- import {
60
- mewWallet
61
- } from "./chunk-CVYXTHZ6.js";
62
- import {
63
- kresusWallet
64
- } from "./chunk-QQJKQCII.js";
65
59
  import {
66
60
  ledgerWallet
67
61
  } from "./chunk-ZMHCZCGS.js";
68
62
  import {
69
- oneInchWallet
70
- } from "./chunk-I7MKK24W.js";
63
+ mewWallet
64
+ } from "./chunk-CVYXTHZ6.js";
71
65
  import {
72
- omniWallet
73
- } from "./chunk-II6YBG2B.js";
66
+ metaMaskWallet
67
+ } from "./chunk-ODRDT73B.js";
74
68
  import {
75
69
  oktoWallet
76
70
  } from "./chunk-MBQTOALG.js";
77
71
  import {
78
- oneKeyWallet
79
- } from "./chunk-ZP2SV6KN.js";
72
+ omniWallet
73
+ } from "./chunk-II6YBG2B.js";
80
74
  import {
81
75
  okxWallet
82
76
  } from "./chunk-5HXH52SO.js";
83
77
  import {
84
- frameWallet
85
- } from "./chunk-KPVNJO3R.js";
78
+ rabbyWallet
79
+ } from "./chunk-H5LLXNOI.js";
80
+ import {
81
+ oneInchWallet
82
+ } from "./chunk-I7MKK24W.js";
86
83
  import {
87
84
  foxWallet
88
85
  } from "./chunk-WAOREEBE.js";
86
+ import {
87
+ frontierWallet
88
+ } from "./chunk-LCOUKF2U.js";
89
+ import {
90
+ frameWallet
91
+ } from "./chunk-KPVNJO3R.js";
89
92
  import {
90
93
  gateWallet
91
94
  } from "./chunk-YIJ5ULO3.js";
92
95
  import {
93
96
  imTokenWallet
94
97
  } from "./chunk-BMJOLT2N.js";
95
- import {
96
- frontierWallet
97
- } from "./chunk-LCOUKF2U.js";
98
98
  import {
99
99
  injectedWallet
100
100
  } from "./chunk-E5NYR4SS.js";
101
101
  import {
102
- metaMaskWallet
103
- } from "./chunk-ODRDT73B.js";
102
+ kresusWallet
103
+ } from "./chunk-QQJKQCII.js";
104
104
  import {
105
105
  bybitWallet
106
106
  } from "./chunk-3AZNOY75.js";
107
+ import {
108
+ coin98Wallet
109
+ } from "./chunk-ZXGMW3OS.js";
110
+ import {
111
+ clvWallet
112
+ } from "./chunk-UHHA5V52.js";
107
113
  import {
108
114
  coinbaseWallet
109
115
  } from "./chunk-PNEDRY6O.js";
110
- import {
111
- enkryptWallet
112
- } from "./chunk-JJ4DXD7R.js";
113
116
  import {
114
117
  coreWallet
115
118
  } from "./chunk-MOOW2AOC.js";
116
119
  import {
117
- bloomWallet
118
- } from "./chunk-J64P6XK3.js";
119
- import {
120
- bitskiWallet
121
- } from "./chunk-OCCT5PIN.js";
120
+ dawnWallet
121
+ } from "./chunk-KCTWDMQP.js";
122
122
  import {
123
123
  desigWallet
124
124
  } from "./chunk-44CHUPEQ.js";
125
125
  import {
126
- dawnWallet
127
- } from "./chunk-KCTWDMQP.js";
126
+ enkryptWallet
127
+ } from "./chunk-JJ4DXD7R.js";
128
+ import {
129
+ bifrostWallet
130
+ } from "./chunk-KL5Z3XHJ.js";
131
+ import {
132
+ bitgetWallet
133
+ } from "./chunk-IEVZW3XR.js";
128
134
  import {
129
135
  argentWallet
130
136
  } from "./chunk-ZHFISYEQ.js";
137
+ import {
138
+ bitskiWallet
139
+ } from "./chunk-OCCT5PIN.js";
131
140
  import {
132
141
  bitverseWallet
133
142
  } from "./chunk-BQEOIDHP.js";
134
143
  import {
135
- clvWallet
136
- } from "./chunk-UHHA5V52.js";
137
- import {
138
- coin98Wallet
139
- } from "./chunk-ZXGMW3OS.js";
144
+ bloomWallet
145
+ } from "./chunk-J64P6XK3.js";
146
+ import "./chunk-RETKWSKD.js";
147
+ import "./chunk-23WIEY36.js";
140
148
  import {
141
149
  braveWallet
142
150
  } from "./chunk-NUEOWEZS.js";
143
- import {
144
- bifrostWallet
145
- } from "./chunk-KL5Z3XHJ.js";
146
- import {
147
- bitgetWallet
148
- } from "./chunk-IEVZW3XR.js";
149
- import "./chunk-RETKWSKD.js";
150
- import "./chunk-23WIEY36.js";
151
151
  import "./chunk-WRA2DVJ7.js";
152
152
  export {
153
153
  argentWallet,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -66,12 +66,12 @@
66
66
  "@meshconnect/web-link-sdk": "2.1.1",
67
67
  "@moonpay/moonpay-react": "^1.6.1",
68
68
  "@privy-io/js-sdk-core": "^0.21.0",
69
- "@tanstack/react-query": "^5.28.8",
69
+ "@tanstack/react-query": "^5.51.11",
70
70
  "@types/uuid": "^9.0.8",
71
71
  "@vanilla-extract/css": "1.15.3",
72
72
  "@vanilla-extract/dynamic": "2.1.0",
73
73
  "@vanilla-extract/sprinkles": "1.6.1",
74
- "@wagmi/core": "^2.10.2",
74
+ "@wagmi/core": "^2.13.0",
75
75
  "bech32": "^2.0.0",
76
76
  "clsx": "2.1.1",
77
77
  "qrcode": "1.5.3",
@@ -79,9 +79,9 @@
79
79
  "react-virtuoso": "4.10.1",
80
80
  "ua-parser-js": "^1.0.37",
81
81
  "uuid": "^9.0.1",
82
- "@funkit/api-base": "1.0.3",
83
- "@funkit/wagmi-tools": "3.0.5",
84
- "@funkit/core": "2.1.3"
82
+ "@funkit/api-base": "1.1.0",
83
+ "@funkit/core": "2.1.5",
84
+ "@funkit/wagmi-tools": "3.0.7"
85
85
  },
86
86
  "repository": {
87
87
  "type": "git",