@funkit/connect 5.1.4 → 5.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 (58) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/{chunk-IDAA2OY6.js → chunk-3LR6KLPU.js} +5 -4
  3. package/dist/{chunk-A7G4HZZY.js → chunk-CRPOYQ6X.js} +39 -4
  4. package/dist/{chunk-L55ALBJE.js → chunk-QMPPK7HO.js} +5 -4
  5. package/dist/components/Box/Box.d.ts +29 -29
  6. package/dist/components/Dropdown/BaseDropdown.css.d.ts +1 -1
  7. package/dist/components/Dropdown/ReceiveTokenDropdown.d.ts +3 -3
  8. package/dist/components/FunBadge/FunBadge.d.ts +3 -3
  9. package/dist/components/FunButton/FunRedirectButton.d.ts +6 -0
  10. package/dist/components/FunInput/FunTwoFaInput.d.ts +2 -2
  11. package/dist/components/FunNotification/FunNotification.d.ts +2 -6
  12. package/dist/components/NewTokenDepositAlert/NewTokenDepositAlert.d.ts +7 -0
  13. package/dist/components/YouPayYouReceive/YouPayYouReceive.d.ts +2 -1
  14. package/dist/config/getDefaultConfig.d.ts +291 -150
  15. package/dist/consts/funkit.d.ts +0 -6
  16. package/dist/css/sprinkles.css.d.ts +51 -35
  17. package/dist/domains/quote.d.ts +4 -10
  18. package/dist/domains/relay.d.ts +18 -0
  19. package/dist/hooks/useCheckoutDirectExecution.d.ts +22 -0
  20. package/dist/hooks/useCheckoutTimeEstimate.d.ts +2 -1
  21. package/dist/hooks/useRelayBypass.d.ts +16 -0
  22. package/dist/index.css +2513 -2423
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.js +1369 -1144
  25. package/dist/modals/CheckoutModal/ConfirmationStep/useQuoteRefresh.d.ts +5 -1
  26. package/dist/providers/FunkitCheckoutContext.d.ts +2 -2
  27. package/dist/providers/FunkitThemeProvider.d.ts +33 -9
  28. package/dist/providers/GeneralWalletProvider.d.ts +10 -74
  29. package/dist/themes/baseTheme.js +1 -1
  30. package/dist/themes/darkTheme.js +2 -2
  31. package/dist/themes/lightTheme.js +2 -2
  32. package/dist/utils/checkout.d.ts +11 -16
  33. package/dist/utils/consts.d.ts +1 -0
  34. package/dist/utils/flags/config.d.ts +42 -4
  35. package/dist/utils/flags/types.d.ts +7 -0
  36. package/dist/utils/tokenIconUrl.d.ts +2 -0
  37. package/dist/wallets/walletConnectors/chunk-2UCNRD7H.js +70 -0
  38. package/dist/wallets/walletConnectors/chunk-3S2U24BJ.js +96 -0
  39. package/dist/wallets/walletConnectors/chunk-4WEHDI4Y.js +94 -0
  40. package/dist/wallets/walletConnectors/chunk-63YLN6R5.js +92 -0
  41. package/dist/wallets/walletConnectors/chunk-6ONTSPEY.js +98 -0
  42. package/dist/wallets/walletConnectors/chunk-A5APNTGL.js +99 -0
  43. package/dist/wallets/walletConnectors/chunk-AD2KIJB6.js +103 -0
  44. package/dist/wallets/walletConnectors/chunk-AXWP3GD4.js +100 -0
  45. package/dist/wallets/walletConnectors/chunk-DTRYS3MO.js +96 -0
  46. package/dist/wallets/walletConnectors/chunk-G73C6P5P.js +146 -0
  47. package/dist/wallets/walletConnectors/chunk-GSOYKKIS.js +92 -0
  48. package/dist/wallets/walletConnectors/chunk-HBA36GW3.js +95 -0
  49. package/dist/wallets/walletConnectors/chunk-IDKVN5CF.js +93 -0
  50. package/dist/wallets/walletConnectors/chunk-ISIBREBO.js +106 -0
  51. package/dist/wallets/walletConnectors/chunk-KR6JBW5E.js +87 -0
  52. package/dist/wallets/walletConnectors/chunk-LMZMXEXL.js +66 -0
  53. package/dist/wallets/walletConnectors/chunk-MSFKSQBY.js +110 -0
  54. package/dist/wallets/walletConnectors/chunk-W6N74MS3.js +69 -0
  55. package/dist/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.js +0 -23
  56. package/dist/wallets/walletConnectors/index.js +51 -51
  57. package/package.json +10 -8
  58. package/dist/components/SolanaDepositAlert/SolanaDepositAlert.d.ts +0 -6
@@ -0,0 +1,110 @@
1
+ "use client";
2
+ import {
3
+ getWalletConnectConnector
4
+ } from "./chunk-23WIEY36.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-WRA2DVJ7.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-7YULGM2L.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
+ };
@@ -0,0 +1,69 @@
1
+ "use client";
2
+ import {
3
+ getWalletConnectConnector
4
+ } from "./chunk-23WIEY36.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-WRA2DVJ7.js";
9
+
10
+ // src/wallets/walletConnectors/bifrostWallet/bifrostWallet.ts
11
+ import { isAndroid } from "@funkit/utils";
12
+ var bifrostWallet = ({
13
+ projectId,
14
+ walletConnectParameters
15
+ }) => {
16
+ const isBifrostInjected = hasInjectedProvider({ flag: "isBifrost" });
17
+ const shouldUseWalletConnect = !isBifrostInjected;
18
+ const getUri = (uri) => {
19
+ return isAndroid() ? uri : `https://app.bifrostwallet.com/wc?uri=${encodeURIComponent(uri)}`;
20
+ };
21
+ return {
22
+ id: "bifrostWallet",
23
+ name: "Bifrost Wallet",
24
+ iconUrl: async () => (await import("./bifrostWallet-5NQVDZ5P.js")).default,
25
+ iconBackground: "#fff",
26
+ installed: !shouldUseWalletConnect ? isBifrostInjected : void 0,
27
+ downloadUrls: {
28
+ android: "https://play.google.com/store/apps/details?id=com.bifrostwallet.app",
29
+ ios: "https://apps.apple.com/us/app/bifrost-wallet/id1577198351",
30
+ qrCode: "https://bifrostwallet.com/#download-app"
31
+ },
32
+ mobile: {
33
+ getUri: shouldUseWalletConnect ? getUri : void 0
34
+ },
35
+ qrCode: shouldUseWalletConnect ? {
36
+ getUri: (uri) => uri,
37
+ instructions: {
38
+ learnMoreUrl: "https://support.bifrostwallet.com/en/articles/6886814-how-to-use-walletconnect",
39
+ steps: [
40
+ {
41
+ description: "wallet_connectors.bifrost.qr_code.step1.description",
42
+ step: "install",
43
+ title: "wallet_connectors.bifrost.qr_code.step1.title"
44
+ },
45
+ {
46
+ description: "wallet_connectors.bifrost.qr_code.step2.description",
47
+ step: "create",
48
+ title: "wallet_connectors.bifrost.qr_code.step2.title"
49
+ },
50
+ {
51
+ description: "wallet_connectors.bifrost.qr_code.step3.description",
52
+ step: "scan",
53
+ title: "wallet_connectors.bifrost.qr_code.step3.title"
54
+ }
55
+ ]
56
+ }
57
+ } : void 0,
58
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
59
+ projectId,
60
+ walletConnectParameters
61
+ }) : getInjectedConnector({
62
+ flag: "isBifrost"
63
+ })
64
+ };
65
+ };
66
+
67
+ export {
68
+ bifrostWallet
69
+ };
@@ -5,31 +5,8 @@ import { funkitWagmiConnectorWallet } from "@funkit/wagmi-tools";
5
5
  import { createConnector } from "wagmi";
6
6
 
7
7
  // src/consts/funkit.ts
8
- import { CheckoutState } from "@funkit/api-base";
9
8
  import { FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS } from "@funkit/chains";
10
9
  var FUNKIT_CONNECT_WALLET_ID = "funkitConnectWallet";
11
- var FROM_PROGRESS_CHECKOUT_STATES = [
12
- CheckoutState.FROM_UNFUNDED,
13
- CheckoutState.FROM_FUNDED,
14
- CheckoutState.FROM_POOLED
15
- ];
16
- var TO_PROGRESS_CHECKOUT_STATES = [
17
- CheckoutState.TO_UNFUNDED,
18
- CheckoutState.TO_FUNDED,
19
- CheckoutState.TO_POOLED,
20
- CheckoutState.TO_READY,
21
- CheckoutState.PENDING_RECEIVAL
22
- ];
23
- var IN_PROGRESS_CHECKOUT_STATES = [
24
- ...TO_PROGRESS_CHECKOUT_STATES,
25
- ...FROM_PROGRESS_CHECKOUT_STATES
26
- ];
27
- var TERMINAL_CHECKOUT_STATES = [
28
- CheckoutState.EXPIRED,
29
- CheckoutState.CHECKOUT_ERROR,
30
- CheckoutState.COMPLETED,
31
- CheckoutState.CANCELLED
32
- ];
33
10
 
34
11
  // src/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.ts
35
12
  var funkitConnectWallet = () => {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
- walletConnectWallet
4
- } from "./chunk-NP5QGWNL.js";
3
+ xdefiWallet
4
+ } from "./chunk-NO7XMBB5.js";
5
5
  import {
6
6
  zealWallet
7
7
  } from "./chunk-JROWU5BP.js";
@@ -11,9 +11,6 @@ import {
11
11
  import {
12
12
  subWallet
13
13
  } from "./chunk-4UM4GTKZ.js";
14
- import {
15
- tokenPocketWallet
16
- } from "./chunk-FRGSRLTS.js";
17
14
  import {
18
15
  tahoWallet
19
16
  } from "./chunk-6P2EMPZI.js";
@@ -21,35 +18,38 @@ import {
21
18
  talismanWallet
22
19
  } from "./chunk-ABFSXBE6.js";
23
20
  import {
24
- tokenaryWallet
25
- } from "./chunk-SLOIIJGP.js";
21
+ tokenPocketWallet
22
+ } from "./chunk-FRGSRLTS.js";
26
23
  import {
27
24
  trustWallet
28
25
  } from "./chunk-IPOC2VJX.js";
26
+ import {
27
+ tokenaryWallet
28
+ } from "./chunk-SLOIIJGP.js";
29
29
  import {
30
30
  uniswapWallet
31
31
  } from "./chunk-LH7BMNFZ.js";
32
32
  import {
33
- xdefiWallet
34
- } from "./chunk-NO7XMBB5.js";
35
- import {
36
- oneKeyWallet
37
- } from "./chunk-4AD7VI2P.js";
38
- import {
39
- rainbowWallet
40
- } from "./chunk-MOOBCMMB.js";
33
+ walletConnectWallet
34
+ } from "./chunk-NP5QGWNL.js";
41
35
  import {
42
- ramperWallet
43
- } from "./chunk-PIUNLQJG.js";
36
+ phantomWallet
37
+ } from "./chunk-ZSVTX6EK.js";
44
38
  import {
45
39
  rabbyWallet
46
40
  } from "./chunk-BVX4XGNP.js";
41
+ import {
42
+ rainbowWallet
43
+ } from "./chunk-MOOBCMMB.js";
47
44
  import {
48
45
  roninWallet
49
46
  } from "./chunk-25VW5TZP.js";
50
47
  import {
51
48
  safeWallet
52
49
  } from "./chunk-BQQQL6UD.js";
50
+ import {
51
+ ramperWallet
52
+ } from "./chunk-PIUNLQJG.js";
53
53
  import {
54
54
  safeheronWallet
55
55
  } from "./chunk-R6RWZRFF.js";
@@ -60,71 +60,71 @@ import {
60
60
  ledgerWallet
61
61
  } from "./chunk-BRBKM4PW.js";
62
62
  import {
63
- mewWallet
64
- } from "./chunk-V57WLZEE.js";
63
+ oktoWallet
64
+ } from "./chunk-ADIXAKUL.js";
65
65
  import {
66
66
  metaMaskWallet
67
67
  } from "./chunk-N2NIIUW6.js";
68
68
  import {
69
- oktoWallet
70
- } from "./chunk-ADIXAKUL.js";
69
+ okxWallet
70
+ } from "./chunk-3U3BMEH5.js";
71
+ import {
72
+ mewWallet
73
+ } from "./chunk-V57WLZEE.js";
71
74
  import {
72
75
  omniWallet
73
76
  } from "./chunk-7CUY5G6R.js";
74
- import {
75
- okxWallet
76
- } from "./chunk-3U3BMEH5.js";
77
77
  import {
78
78
  oneInchWallet
79
79
  } from "./chunk-OESTDX6I.js";
80
80
  import {
81
- phantomWallet
82
- } from "./chunk-ZSVTX6EK.js";
81
+ oneKeyWallet
82
+ } from "./chunk-4AD7VI2P.js";
83
83
  import {
84
- enkryptWallet
85
- } from "./chunk-SJTXS4ZW.js";
84
+ frontierWallet
85
+ } from "./chunk-HKV7EMYZ.js";
86
+ import {
87
+ foxWallet
88
+ } from "./chunk-XYBEMO3C.js";
86
89
  import {
87
90
  frameWallet
88
91
  } from "./chunk-ZMYVTWDF.js";
89
92
  import {
90
- frontierWallet
91
- } from "./chunk-HKV7EMYZ.js";
93
+ gateWallet
94
+ } from "./chunk-3NC26XLM.js";
92
95
  import {
93
96
  imTokenWallet
94
97
  } from "./chunk-COZ7MIQS.js";
95
98
  import {
96
- gateWallet
97
- } from "./chunk-3NC26XLM.js";
99
+ injectedWallet
100
+ } from "./chunk-VCVVV2K7.js";
98
101
  import {
99
102
  kresusWallet
100
103
  } from "./chunk-MJXPRJZT.js";
101
104
  import {
102
- injectedWallet
103
- } from "./chunk-VCVVV2K7.js";
104
- import {
105
- bloomWallet
106
- } from "./chunk-S27IADFU.js";
105
+ clvWallet
106
+ } from "./chunk-LEXSM5KI.js";
107
107
  import {
108
- braveWallet
109
- } from "./chunk-PB254NQ4.js";
108
+ bybitWallet
109
+ } from "./chunk-W5O4YSZN.js";
110
110
  import {
111
111
  coin98Wallet
112
112
  } from "./chunk-KFFJPS5R.js";
113
+ import {
114
+ coreWallet
115
+ } from "./chunk-JXP2QPW7.js";
113
116
  import {
114
117
  coinbaseWallet
115
118
  } from "./chunk-H4IRCEZN.js";
116
- import {
117
- dawnWallet
118
- } from "./chunk-LN7OD5EC.js";
119
119
  import {
120
120
  desigWallet
121
121
  } from "./chunk-CTU6JCOK.js";
122
122
  import {
123
- coreWallet
124
- } from "./chunk-JXP2QPW7.js";
123
+ enkryptWallet
124
+ } from "./chunk-SJTXS4ZW.js";
125
125
  import {
126
- foxWallet
127
- } from "./chunk-XYBEMO3C.js";
126
+ dawnWallet
127
+ } from "./chunk-LN7OD5EC.js";
128
128
  import {
129
129
  argentWallet
130
130
  } from "./chunk-WSQ2YJO2.js";
@@ -141,12 +141,12 @@ import {
141
141
  bitverseWallet
142
142
  } from "./chunk-3HZRRP4Y.js";
143
143
  import {
144
- clvWallet
145
- } from "./chunk-LEXSM5KI.js";
146
- import {
147
- bybitWallet
148
- } from "./chunk-W5O4YSZN.js";
144
+ braveWallet
145
+ } from "./chunk-PB254NQ4.js";
149
146
  import "./chunk-WRA2DVJ7.js";
147
+ import {
148
+ bloomWallet
149
+ } from "./chunk-S27IADFU.js";
150
150
  import "./chunk-23WIEY36.js";
151
151
  export {
152
152
  argentWallet,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "5.1.4",
3
+ "version": "5.2.1",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -44,7 +44,8 @@
44
44
  "wagmi": "2.x"
45
45
  },
46
46
  "devDependencies": {
47
- "@aws-sdk/client-s3": "^3.600.0",
47
+ "@aws-sdk/client-s3": "3.645.0",
48
+ "@aws-sdk/client-cloudfront": "3.645.0",
48
49
  "@chromatic-com/storybook": "^3.2.6",
49
50
  "@meshconnect/node-api": "2.0.14",
50
51
  "@storybook/addon-essentials": "^8.6.7",
@@ -65,7 +66,7 @@
65
66
  "@vitejs/plugin-react": "^4.3.1",
66
67
  "autoprefixer": "^10.4.16",
67
68
  "jsdom": "^25.0.1",
68
- "postcss": "^8.4.32",
69
+ "postcss": "^8.4.33",
69
70
  "react": "^18.3.0",
70
71
  "storybook": "^8.6.7",
71
72
  "tsx": "^4.19.2",
@@ -77,11 +78,12 @@
77
78
  "@moonpay/moonpay-react": "^1.6.1",
78
79
  "@number-flow/react": "^0.5.5",
79
80
  "@privy-io/js-sdk-core": "^0.21.0",
81
+ "@reservoir0x/relay-sdk": "^2.0.1",
80
82
  "@types/uuid": "^9.0.8",
81
83
  "@vanilla-extract/css": "1.15.3",
82
84
  "@vanilla-extract/dynamic": "2.1.0",
83
85
  "@vanilla-extract/sprinkles": "1.6.1",
84
- "@wagmi/core": "^2.13.0",
86
+ "@wagmi/core": "2.17.2",
85
87
  "bech32": "^2.0.0",
86
88
  "clsx": "2.1.1",
87
89
  "motion": "^12.0.11",
@@ -90,11 +92,11 @@
90
92
  "react-virtuoso": "4.10.1",
91
93
  "ua-parser-js": "^1.0.37",
92
94
  "uuid": "^9.0.1",
93
- "@funkit/api-base": "1.7.0",
95
+ "@funkit/api-base": "1.7.2",
94
96
  "@funkit/chains": "0.2.1",
95
- "@funkit/core": "2.3.14",
96
- "@funkit/utils": "1.0.10",
97
- "@funkit/wagmi-tools": "3.0.36"
97
+ "@funkit/utils": "1.0.11",
98
+ "@funkit/core": "2.3.16",
99
+ "@funkit/wagmi-tools": "3.0.38"
98
100
  },
99
101
  "repository": {
100
102
  "type": "git",
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface SolanaDepositAlertProps {
3
- onClick: () => void;
4
- }
5
- export declare const SolanaDepositAlert: ({ onClick }: SolanaDepositAlertProps) => React.JSX.Element | null;
6
- export {};