@funkit/connect 5.1.4 → 5.2.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 (50) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/{chunk-A7G4HZZY.js → chunk-2C7D5NQG.js} +19 -4
  3. package/dist/{chunk-L55ALBJE.js → chunk-PKXUTXYG.js} +4 -4
  4. package/dist/{chunk-IDAA2OY6.js → chunk-QBCQK5KX.js} +4 -4
  5. package/dist/components/Box/Box.d.ts +29 -29
  6. package/dist/components/Dropdown/ReceiveTokenDropdown.d.ts +3 -3
  7. package/dist/components/FunBadge/FunBadge.d.ts +3 -3
  8. package/dist/components/FunButton/FunRedirectButton.d.ts +6 -0
  9. package/dist/components/FunInput/FunTwoFaInput.d.ts +2 -2
  10. package/dist/components/FunNotification/FunNotification.d.ts +2 -6
  11. package/dist/components/NewTokenDepositAlert/NewTokenDepositAlert.d.ts +7 -0
  12. package/dist/components/YouPayYouReceive/YouPayYouReceive.d.ts +2 -1
  13. package/dist/consts/funkit.d.ts +0 -5
  14. package/dist/css/sprinkles.css.d.ts +41 -35
  15. package/dist/hooks/useCheckoutAccountBalanceTransfer.d.ts +1 -1
  16. package/dist/hooks/useRelayBypass.d.ts +12 -0
  17. package/dist/index.css +2432 -2423
  18. package/dist/index.js +772 -729
  19. package/dist/providers/FunkitCheckoutContext.d.ts +1 -1
  20. package/dist/providers/FunkitThemeProvider.d.ts +18 -9
  21. package/dist/providers/GeneralWalletProvider.d.ts +8 -8
  22. package/dist/themes/baseTheme.js +1 -1
  23. package/dist/themes/darkTheme.js +2 -2
  24. package/dist/themes/lightTheme.js +2 -2
  25. package/dist/utils/checkout.d.ts +11 -9
  26. package/dist/utils/consts.d.ts +1 -0
  27. package/dist/utils/flags/config.d.ts +20 -4
  28. package/dist/utils/flags/types.d.ts +7 -0
  29. package/dist/wallets/walletConnectors/chunk-2UCNRD7H.js +70 -0
  30. package/dist/wallets/walletConnectors/chunk-3S2U24BJ.js +96 -0
  31. package/dist/wallets/walletConnectors/chunk-4WEHDI4Y.js +94 -0
  32. package/dist/wallets/walletConnectors/chunk-63YLN6R5.js +92 -0
  33. package/dist/wallets/walletConnectors/chunk-6ONTSPEY.js +98 -0
  34. package/dist/wallets/walletConnectors/chunk-A5APNTGL.js +99 -0
  35. package/dist/wallets/walletConnectors/chunk-AD2KIJB6.js +103 -0
  36. package/dist/wallets/walletConnectors/chunk-AXWP3GD4.js +100 -0
  37. package/dist/wallets/walletConnectors/chunk-DTRYS3MO.js +96 -0
  38. package/dist/wallets/walletConnectors/chunk-G73C6P5P.js +146 -0
  39. package/dist/wallets/walletConnectors/chunk-GSOYKKIS.js +92 -0
  40. package/dist/wallets/walletConnectors/chunk-HBA36GW3.js +95 -0
  41. package/dist/wallets/walletConnectors/chunk-IDKVN5CF.js +93 -0
  42. package/dist/wallets/walletConnectors/chunk-ISIBREBO.js +106 -0
  43. package/dist/wallets/walletConnectors/chunk-KR6JBW5E.js +87 -0
  44. package/dist/wallets/walletConnectors/chunk-LMZMXEXL.js +66 -0
  45. package/dist/wallets/walletConnectors/chunk-MSFKSQBY.js +110 -0
  46. package/dist/wallets/walletConnectors/chunk-W6N74MS3.js +69 -0
  47. package/dist/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.js +0 -23
  48. package/dist/wallets/walletConnectors/index.js +62 -62
  49. package/package.json +7 -6
  50. package/dist/components/SolanaDepositAlert/SolanaDepositAlert.d.ts +0 -6
@@ -19,7 +19,7 @@ export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'gen
19
19
  generateActionsParams?: (targetAssetAmount: number, config?: {
20
20
  targetAsset: Address;
21
21
  targetChain: string;
22
- }) => FunkitCheckoutActionParams[];
22
+ }) => Promise<FunkitCheckoutActionParams[]>;
23
23
  /** 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. **/
24
24
  customRecipient?: FunAddress;
25
25
  /** ****************************************
@@ -88,9 +88,9 @@ export declare const useActiveTheme: () => {
88
88
  badgeBackgroundSuccess: string;
89
89
  badgeBorderSuccess: string;
90
90
  badgeTextSuccess: string;
91
- badgeBackgroundSolana: string;
92
- badgeBorderSolana: string;
93
- badgeTextSolana: string;
91
+ newBadgeBackground: string;
92
+ newBadgeBorder: string;
93
+ newBadgeText: string;
94
94
  inputAmountQuickOptionBaseBackground: string;
95
95
  inputAmountQuickOptionHoverBackground: string;
96
96
  inputAmountQuickOptionActiveBackground: string;
@@ -169,6 +169,9 @@ export declare const useActiveTheme: () => {
169
169
  modalActionButton: string;
170
170
  modalActionButtonMobile: string;
171
171
  summaryBox: string;
172
+ youPayYouReceive: string;
173
+ inputAmountSwitcher: string;
174
+ qrCode: string;
172
175
  };
173
176
  shadows: {
174
177
  connectButton: string;
@@ -256,9 +259,9 @@ export declare const useActiveTheme: () => {
256
259
  badgeBackgroundSuccess: string;
257
260
  badgeBorderSuccess: string;
258
261
  badgeTextSuccess: string;
259
- badgeBackgroundSolana: string;
260
- badgeBorderSolana: string;
261
- badgeTextSolana: string;
262
+ newBadgeBackground: string;
263
+ newBadgeBorder: string;
264
+ newBadgeText: string;
262
265
  inputAmountQuickOptionBaseBackground: string;
263
266
  inputAmountQuickOptionHoverBackground: string;
264
267
  inputAmountQuickOptionActiveBackground: string;
@@ -337,6 +340,9 @@ export declare const useActiveTheme: () => {
337
340
  modalActionButton: string;
338
341
  modalActionButtonMobile: string;
339
342
  summaryBox: string;
343
+ youPayYouReceive: string;
344
+ inputAmountSwitcher: string;
345
+ qrCode: string;
340
346
  };
341
347
  shadows: {
342
348
  connectButton: string;
@@ -422,9 +428,9 @@ export declare const useActiveTheme: () => {
422
428
  badgeBackgroundSuccess: string;
423
429
  badgeBorderSuccess: string;
424
430
  badgeTextSuccess: string;
425
- badgeBackgroundSolana: string;
426
- badgeBorderSolana: string;
427
- badgeTextSolana: string;
431
+ newBadgeBackground: string;
432
+ newBadgeBorder: string;
433
+ newBadgeText: string;
428
434
  inputAmountQuickOptionBaseBackground: string;
429
435
  inputAmountQuickOptionHoverBackground: string;
430
436
  inputAmountQuickOptionActiveBackground: string;
@@ -503,6 +509,9 @@ export declare const useActiveTheme: () => {
503
509
  modalActionButton: string;
504
510
  modalActionButtonMobile: string;
505
511
  summaryBox: string;
512
+ youPayYouReceive: string;
513
+ inputAmountSwitcher: string;
514
+ qrCode: string;
506
515
  };
507
516
  shadows: {
508
517
  connectButton: string;
@@ -96,15 +96,15 @@ export declare const useFunkitDisconnect: () => {
96
96
  error: null;
97
97
  data: undefined;
98
98
  status: "idle";
99
+ isPaused: boolean;
100
+ context: unknown;
99
101
  isError: false;
100
102
  isPending: false;
101
103
  isSuccess: false;
102
104
  failureCount: number;
103
105
  failureReason: import("@wagmi/core").DisconnectErrorType | null;
104
- isPaused: boolean;
105
106
  variables: undefined;
106
107
  isIdle: true;
107
- context: unknown;
108
108
  submittedAt: number;
109
109
  connectors: readonly import("wagmi").Connector[];
110
110
  } | {
@@ -114,15 +114,15 @@ export declare const useFunkitDisconnect: () => {
114
114
  error: null;
115
115
  data: undefined;
116
116
  status: "pending";
117
+ isPaused: boolean;
118
+ context: unknown;
117
119
  isError: false;
118
120
  isPending: true;
119
121
  isSuccess: false;
120
122
  failureCount: number;
121
123
  failureReason: import("@wagmi/core").DisconnectErrorType | null;
122
- isPaused: boolean;
123
124
  variables: import("wagmi/query").DisconnectVariables;
124
125
  isIdle: false;
125
- context: unknown;
126
126
  submittedAt: number;
127
127
  connectors: readonly import("wagmi").Connector[];
128
128
  } | {
@@ -132,15 +132,15 @@ export declare const useFunkitDisconnect: () => {
132
132
  error: import("@wagmi/core").DisconnectErrorType;
133
133
  data: undefined;
134
134
  status: "error";
135
+ isPaused: boolean;
136
+ context: unknown;
135
137
  isError: true;
136
138
  isPending: false;
137
139
  isSuccess: false;
138
140
  failureCount: number;
139
141
  failureReason: import("@wagmi/core").DisconnectErrorType | null;
140
- isPaused: boolean;
141
142
  variables: import("wagmi/query").DisconnectVariables;
142
143
  isIdle: false;
143
- context: unknown;
144
144
  submittedAt: number;
145
145
  connectors: readonly import("wagmi").Connector[];
146
146
  } | {
@@ -150,15 +150,15 @@ export declare const useFunkitDisconnect: () => {
150
150
  error: null;
151
151
  data: void;
152
152
  status: "success";
153
+ isPaused: boolean;
154
+ context: unknown;
153
155
  isError: false;
154
156
  isPending: false;
155
157
  isSuccess: true;
156
158
  failureCount: number;
157
159
  failureReason: import("@wagmi/core").DisconnectErrorType | null;
158
- isPaused: boolean;
159
160
  variables: import("wagmi/query").DisconnectVariables;
160
161
  isIdle: false;
161
- context: unknown;
162
162
  submittedAt: number;
163
163
  connectors: readonly import("wagmi").Connector[];
164
164
  };
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  baseTheme,
4
4
  systemFontStack
5
- } from "../chunk-A7G4HZZY.js";
5
+ } from "../chunk-2C7D5NQG.js";
6
6
  export {
7
7
  baseTheme,
8
8
  systemFontStack
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  darkTheme
4
- } from "../chunk-L55ALBJE.js";
5
- import "../chunk-A7G4HZZY.js";
4
+ } from "../chunk-PKXUTXYG.js";
5
+ import "../chunk-2C7D5NQG.js";
6
6
  export {
7
7
  darkTheme
8
8
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  lightTheme
4
- } from "../chunk-IDAA2OY6.js";
5
- import "../chunk-A7G4HZZY.js";
4
+ } from "../chunk-QBCQK5KX.js";
5
+ import "../chunk-2C7D5NQG.js";
6
6
  export {
7
7
  lightTheme
8
8
  };
@@ -11,19 +11,20 @@ export declare const DUMMY_TRANSFER_PARAMS: {
11
11
  toAddress: "0x000000000000000000000000000000000000dEaD";
12
12
  tokenAmount: number;
13
13
  };
14
- /**
15
- * Validates the checkout configuration.
16
- * @param config - The checkout configuration to validate.
17
- * @returns An object indicating whether the configuration is valid and a message if it is not.
18
- */
19
- export declare function validateCheckoutConfig(config: Partial<FunkitCheckoutConfig>): {
14
+ type ValidateCheckoutConfigReturn = Promise<{
20
15
  config: FunkitCheckoutConfig;
21
16
  isValid: true;
22
17
  message: string;
23
18
  } | {
24
19
  isValid: false;
25
20
  message: string;
26
- };
21
+ }>;
22
+ /**
23
+ * Validates the checkout configuration.
24
+ * @param config - The checkout configuration to validate.
25
+ * @returns An object indicating whether the configuration is valid and a message if it is not.
26
+ */
27
+ export declare function validateCheckoutConfig(config: Partial<FunkitCheckoutConfig>): ValidateCheckoutConfigReturn;
27
28
  export declare const hasSufficientBalance: (wagmiConfig: UseConfigReturnType, walletAddress: string, tokenAddress: string, tokenChainId: string, requiredAssetAmount: number) => Promise<{
28
29
  balance: number;
29
30
  result: boolean;
@@ -51,6 +52,7 @@ export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalle
51
52
  bypassInit: boolean;
52
53
  apiKey?: string;
53
54
  nonce?: bigint | undefined;
55
+ logger?: import("@funkit/api-base").Logger | undefined;
54
56
  fee?: {
55
57
  token?: string;
56
58
  amount?: number;
@@ -58,7 +60,6 @@ export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalle
58
60
  recipient: Address;
59
61
  } | undefined;
60
62
  skipDBAction?: boolean | undefined;
61
- logger?: import("@funkit/api-base").Logger | undefined;
62
63
  };
63
64
  export type TokenInfo = {
64
65
  symbol: string;
@@ -112,7 +113,7 @@ export declare function getCheckoutItemDisplay({ checkoutConfig, hideAmount, }:
112
113
  */
113
114
  export declare function getMaxTargetAssetAmountEstimate(sourceAssetBalance: number, config: FunkitCheckoutConfig, quoteResult: FunkitCheckoutQuoteResult): number;
114
115
  export declare function getTokenDecimals(wagmiConfig: Config, chainId: string, tokenAddress: Address): Promise<number>;
115
- export declare function evaluateCheckoutGenerateActionsParams(config: FunkitCheckoutConfig | ServerCheckoutConfig): FunkitCheckoutActionParams[];
116
+ export declare function evaluateCheckoutGenerateActionsParams(config: FunkitCheckoutConfig | ServerCheckoutConfig): Promise<FunkitCheckoutActionParams[]>;
116
117
  export declare function isCheckoutCrFlow(config: FunkitCheckoutConfig): boolean;
117
118
  /**
118
119
  * @param config can be either be a config from live checkoutItem OR from checkout history's clientMetadata
@@ -130,3 +131,4 @@ export declare const isDirectExecutionFlow: ({ checkoutItem, apiKey, }: {
130
131
  apiKey: string;
131
132
  }) => boolean;
132
133
  export declare const isCheckoutHistoryDirectExecution: (checkoutId: string) => boolean;
134
+ export {};
@@ -1,2 +1,3 @@
1
1
  export declare const MIN_CHECKOUT_AMOUNT_USD = 1;
2
2
  export declare const LOW_BALANCE = "Low Balance";
3
+ export declare const CONTACT_US_LINK = "https://intercom.help/funxyz/en/articles/10732578-contact-us";
@@ -122,10 +122,6 @@ export declare const flagConfig: {
122
122
  type: "string";
123
123
  default_value: string;
124
124
  };
125
- enable_vertex_swap_bypass: {
126
- type: "boolean";
127
- default_value: true;
128
- };
129
125
  display_solana_new_badge: {
130
126
  type: "boolean";
131
127
  default_value: true;
@@ -134,4 +130,24 @@ export declare const flagConfig: {
134
130
  type: "boolean";
135
131
  default_value: true;
136
132
  };
133
+ token_transfer_new_tokens: {
134
+ type: "string";
135
+ default_value: string;
136
+ };
137
+ new_token_asset_selection_banner: {
138
+ type: "string";
139
+ default_value: string;
140
+ };
141
+ is_relay_bypass_enabled: {
142
+ type: "boolean";
143
+ default_value: false;
144
+ };
145
+ relay_bypass_source_chains_and_assets: {
146
+ type: "string";
147
+ default_value: string;
148
+ };
149
+ relay_bypass_target_chains_and_assets: {
150
+ type: "string";
151
+ default_value: string;
152
+ };
137
153
  };
@@ -36,4 +36,11 @@ export type Condition = {
36
36
  values: string[];
37
37
  };
38
38
  export type AbstractFlags = Record<string, FlagConfig>;
39
+ export type AssetSelectionBannerConfig = {
40
+ chainId: number;
41
+ symbol: string;
42
+ name: string;
43
+ isChainNew?: boolean;
44
+ };
45
+ export type TokenTransferNewBadgeConfig = Record<number, string[]>;
39
46
  export {};
@@ -0,0 +1,70 @@
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/rainbowWallet/rainbowWallet.ts
11
+ import { isAndroid, isIOS } from "@funkit/utils";
12
+ var rainbowWallet = ({
13
+ projectId,
14
+ walletConnectParameters
15
+ }) => {
16
+ const isRainbowInjected = hasInjectedProvider({ flag: "isRainbow" });
17
+ const shouldUseWalletConnect = !isRainbowInjected;
18
+ const getUri = (uri) => {
19
+ return isAndroid() ? uri : isIOS() ? `rainbow://wc?uri=${encodeURIComponent(uri)}&connector=rainbowkit` : `https://rnbwapp.com/wc?uri=${encodeURIComponent(
20
+ uri
21
+ )}&connector=rainbowkit`;
22
+ };
23
+ return {
24
+ id: "rainbow",
25
+ name: "Rainbow",
26
+ rdns: "me.rainbow",
27
+ iconUrl: async () => (await import("./rainbowWallet-MFJQCICF.js")).default,
28
+ iconBackground: "#0c2f78",
29
+ installed: !shouldUseWalletConnect ? isRainbowInjected : void 0,
30
+ downloadUrls: {
31
+ android: "https://play.google.com/store/apps/details?id=me.rainbow&referrer=utm_source%3Drainbowkit&utm_source=rainbowkit",
32
+ ios: "https://apps.apple.com/app/apple-store/id1457119021?pt=119997837&ct=rainbowkit&mt=8",
33
+ mobile: "https://rainbow.download?utm_source=rainbowkit",
34
+ qrCode: "https://rainbow.download?utm_source=rainbowkit&utm_medium=qrcode",
35
+ browserExtension: "https://rainbow.me/extension?utm_source=rainbowkit"
36
+ },
37
+ mobile: { getUri: shouldUseWalletConnect ? getUri : void 0 },
38
+ qrCode: shouldUseWalletConnect ? {
39
+ getUri,
40
+ instructions: {
41
+ learnMoreUrl: "https://learn.rainbow.me/connect-to-a-website-or-app?utm_source=rainbowkit&utm_medium=connector&utm_campaign=learnmore",
42
+ steps: [
43
+ {
44
+ description: "wallet_connectors.rainbow.qr_code.step1.description",
45
+ step: "install",
46
+ title: "wallet_connectors.rainbow.qr_code.step1.title"
47
+ },
48
+ {
49
+ description: "wallet_connectors.rainbow.qr_code.step2.description",
50
+ step: "create",
51
+ title: "wallet_connectors.rainbow.qr_code.step2.title"
52
+ },
53
+ {
54
+ description: "wallet_connectors.rainbow.qr_code.step3.description",
55
+ step: "scan",
56
+ title: "wallet_connectors.rainbow.qr_code.step3.title"
57
+ }
58
+ ]
59
+ }
60
+ } : void 0,
61
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
62
+ projectId,
63
+ walletConnectParameters
64
+ }) : getInjectedConnector({ flag: "isRainbow" })
65
+ };
66
+ };
67
+
68
+ export {
69
+ rainbowWallet
70
+ };
@@ -0,0 +1,96 @@
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/frontierWallet/frontierWallet.ts
11
+ import { isAndroid } from "@funkit/utils";
12
+ var frontierWallet = ({
13
+ projectId,
14
+ walletConnectParameters
15
+ }) => {
16
+ const isFrontierInjected = hasInjectedProvider({
17
+ namespace: "frontier.ethereum",
18
+ flag: "isFrontier"
19
+ });
20
+ const shouldUseWalletConnect = !isFrontierInjected;
21
+ return {
22
+ id: "frontier",
23
+ name: "Frontier Wallet",
24
+ rdns: "xyz.frontier.wallet",
25
+ installed: isFrontierInjected,
26
+ iconUrl: async () => (await import("./frontierWallet-5QV7ZACT.js")).default,
27
+ iconBackground: "#CC703C",
28
+ downloadUrls: {
29
+ android: "https://play.google.com/store/apps/details?id=com.frontierwallet",
30
+ ios: "https://apps.apple.com/us/app/frontier-crypto-defi-wallet/id1482380988",
31
+ qrCode: "https://www.frontier.xyz/download",
32
+ chrome: "https://chrome.google.com/webstore/detail/frontier-wallet/kppfdiipphfccemcignhifpjkapfbihd",
33
+ browserExtension: "https://www.frontier.xyz/download"
34
+ },
35
+ mobile: {
36
+ getUri: shouldUseWalletConnect ? (uri) => {
37
+ return isAndroid() ? `frontier://wc?uri=${encodeURIComponent(uri)}` : uri;
38
+ } : void 0
39
+ },
40
+ qrCode: shouldUseWalletConnect ? {
41
+ getUri: (uri) => {
42
+ return isAndroid() ? `frontier://wc?uri=${encodeURIComponent(uri)}` : uri;
43
+ },
44
+ instructions: {
45
+ learnMoreUrl: "https://help.frontier.xyz/en/",
46
+ steps: [
47
+ {
48
+ description: "wallet_connectors.im_token.qr_code.step1.description",
49
+ step: "install",
50
+ title: "wallet_connectors.im_token.qr_code.step1.title"
51
+ },
52
+ {
53
+ description: "wallet_connectors.im_token.qr_code.step2.description",
54
+ step: "create",
55
+ title: "wallet_connectors.im_token.qr_code.step2.title"
56
+ },
57
+ {
58
+ description: "wallet_connectors.im_token.qr_code.step3.description",
59
+ step: "scan",
60
+ title: "wallet_connectors.im_token.qr_code.step3.title"
61
+ }
62
+ ]
63
+ }
64
+ } : void 0,
65
+ extension: {
66
+ instructions: {
67
+ learnMoreUrl: "https://help.frontier.xyz/en/articles/6967236-setting-up-frontier-on-your-device",
68
+ steps: [
69
+ {
70
+ description: "wallet_connectors.frontier.extension.step1.description",
71
+ step: "install",
72
+ title: "wallet_connectors.frontier.extension.step1.title"
73
+ },
74
+ {
75
+ description: "wallet_connectors.frontier.extension.step2.description",
76
+ step: "create",
77
+ title: "wallet_connectors.frontier.extension.step2.title"
78
+ },
79
+ {
80
+ description: "wallet_connectors.frontier.extension.step3.description",
81
+ step: "refresh",
82
+ title: "wallet_connectors.frontier.extension.step3.title"
83
+ }
84
+ ]
85
+ }
86
+ },
87
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({ projectId, walletConnectParameters }) : getInjectedConnector({
88
+ namespace: "frontier.ethereum",
89
+ flag: "isFrontier"
90
+ })
91
+ };
92
+ };
93
+
94
+ export {
95
+ frontierWallet
96
+ };
@@ -0,0 +1,94 @@
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/okxWallet/okxWallet.ts
11
+ import { isAndroid } from "@funkit/utils";
12
+ var okxWallet = ({
13
+ projectId,
14
+ walletConnectParameters
15
+ }) => {
16
+ const isOKXInjected = hasInjectedProvider({ namespace: "okxwallet" });
17
+ const shouldUseWalletConnect = !isOKXInjected;
18
+ return {
19
+ id: "okx",
20
+ name: "OKX Wallet",
21
+ rdns: "com.okex.wallet",
22
+ iconUrl: async () => (await import("./okxWallet-GJMKZIND.js")).default,
23
+ iconAccent: "#000",
24
+ iconBackground: "#000",
25
+ downloadUrls: {
26
+ android: "https://play.google.com/store/apps/details?id=com.okinc.okex.gp",
27
+ ios: "https://itunes.apple.com/app/id1327268470?mt=8",
28
+ mobile: "https://okx.com/download",
29
+ qrCode: "https://okx.com/download",
30
+ chrome: "https://chrome.google.com/webstore/detail/okx-wallet/mcohilncbfahbmgdjkbpemcciiolgcge",
31
+ edge: "https://microsoftedge.microsoft.com/addons/detail/okx-wallet/pbpjkcldjiffchgbbndmhojiacbgflha",
32
+ firefox: "https://addons.mozilla.org/firefox/addon/okexwallet/",
33
+ browserExtension: "https://okx.com/download"
34
+ },
35
+ mobile: {
36
+ getUri: shouldUseWalletConnect ? (uri) => {
37
+ return isAndroid() ? uri : `okex://main/wc?uri=${encodeURIComponent(uri)}`;
38
+ } : void 0
39
+ },
40
+ qrCode: shouldUseWalletConnect ? {
41
+ getUri: (uri) => uri,
42
+ instructions: {
43
+ learnMoreUrl: "https://okx.com/web3/",
44
+ steps: [
45
+ {
46
+ description: "wallet_connectors.okx.qr_code.step1.description",
47
+ step: "install",
48
+ title: "wallet_connectors.okx.qr_code.step1.title"
49
+ },
50
+ {
51
+ description: "wallet_connectors.okx.qr_code.step2.description",
52
+ step: "create",
53
+ title: "wallet_connectors.okx.qr_code.step2.title"
54
+ },
55
+ {
56
+ description: "wallet_connectors.okx.qr_code.step3.description",
57
+ step: "scan",
58
+ title: "wallet_connectors.okx.qr_code.step3.title"
59
+ }
60
+ ]
61
+ }
62
+ } : void 0,
63
+ extension: {
64
+ instructions: {
65
+ learnMoreUrl: "https://okx.com/web3/",
66
+ steps: [
67
+ {
68
+ description: "wallet_connectors.okx.extension.step1.description",
69
+ step: "install",
70
+ title: "wallet_connectors.okx.extension.step1.title"
71
+ },
72
+ {
73
+ description: "wallet_connectors.okx.extension.step2.description",
74
+ step: "create",
75
+ title: "wallet_connectors.okx.extension.step2.title"
76
+ },
77
+ {
78
+ description: "wallet_connectors.okx.extension.step3.description",
79
+ step: "refresh",
80
+ title: "wallet_connectors.okx.extension.step3.title"
81
+ }
82
+ ]
83
+ }
84
+ },
85
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
86
+ projectId,
87
+ walletConnectParameters
88
+ }) : getInjectedConnector({ namespace: "okxwallet" })
89
+ };
90
+ };
91
+
92
+ export {
93
+ okxWallet
94
+ };
@@ -0,0 +1,92 @@
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/roninWallet/roninWallet.ts
11
+ var roninWallet = ({
12
+ projectId,
13
+ walletConnectParameters
14
+ }) => {
15
+ const isRoninInjected = hasInjectedProvider({
16
+ namespace: "ronin.provider"
17
+ });
18
+ return {
19
+ id: "ronin",
20
+ name: "Ronin Wallet",
21
+ iconUrl: async () => (await import("./roninWallet-SAB5ESVK.js")).default,
22
+ iconBackground: "#ffffff",
23
+ rdns: "com.roninchain.wallet",
24
+ installed: isRoninInjected || void 0,
25
+ downloadUrls: {
26
+ android: "https://play.google.com/store/apps/details?id=com.skymavis.genesis",
27
+ ios: "https://apps.apple.com/us/app/ronin-wallet/id1592675001",
28
+ mobile: "https://wallet.roninchain.com",
29
+ chrome: "https://chrome.google.com/webstore/detail/ronin-wallet/fnjhmkhhmkbjkkabndcnnogagogbneec",
30
+ edge: "https://microsoftedge.microsoft.com/addons/detail/ronin-wallet/kjmoohlgokccodicjjfebfomlbljgfhk",
31
+ firefox: "https://addons.mozilla.org/firefox/addon/ronin-wallet",
32
+ browserExtension: "https://wallet.roninchain.com/",
33
+ qrCode: "https://wallet.roninchain.com/"
34
+ },
35
+ mobile: {
36
+ getUri: (uri) => `roninwallet://wc?uri=${encodeURIComponent(uri)}`
37
+ },
38
+ qrCode: {
39
+ getUri: (uri) => uri,
40
+ instructions: {
41
+ learnMoreUrl: "https://wallet.roninchain.com/",
42
+ steps: [
43
+ {
44
+ description: "wallet_connectors.ronin.qr_code.step1.description",
45
+ step: "install",
46
+ title: "wallet_connectors.ronin.qr_code.step1.title"
47
+ },
48
+ {
49
+ description: "wallet_connectors.ronin.qr_code.step2.description",
50
+ step: "create",
51
+ title: "wallet_connectors.ronin.qr_code.step2.title"
52
+ },
53
+ {
54
+ description: "wallet_connectors.ronin.qr_code.step3.description",
55
+ step: "scan",
56
+ title: "wallet_connectors.ronin.qr_code.step3.title"
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ extension: {
62
+ instructions: {
63
+ learnMoreUrl: "https://wallet.roninchain.com/",
64
+ steps: [
65
+ {
66
+ description: "wallet_connectors.ronin.extension.step1.description",
67
+ step: "install",
68
+ title: "wallet_connectors.ronin.extension.step1.title"
69
+ },
70
+ {
71
+ description: "wallet_connectors.ronin.extension.step2.description",
72
+ step: "create",
73
+ title: "wallet_connectors.ronin.extension.step2.title"
74
+ },
75
+ {
76
+ description: "wallet_connectors.ronin.extension.step3.description",
77
+ step: "refresh",
78
+ title: "wallet_connectors.ronin.extension.step3.title"
79
+ }
80
+ ]
81
+ }
82
+ },
83
+ createConnector: isRoninInjected ? getInjectedConnector({ namespace: "ronin.provider" }) : getWalletConnectConnector({
84
+ projectId,
85
+ walletConnectParameters
86
+ })
87
+ };
88
+ };
89
+
90
+ export {
91
+ roninWallet
92
+ };