@funkit/connect 12.4.0 → 12.5.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 (75) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/backpack-HHGWJLWB.js +7 -0
  3. package/dist/clients/backpack-HHGWJLWB.js +7 -0
  4. package/dist/clients/{chunk-27VBRE7W.js → chunk-7GPRX32F.js} +8 -0
  5. package/dist/clients/{chunk-R6UAC2TB.js → chunk-A2WBB3UO.js} +1 -1
  6. package/dist/clients/{chunk-A5JW3UI6.js → chunk-ATNOIBW2.js} +1 -1
  7. package/dist/clients/{chunk-DYV3LRSE.js → chunk-B5KCBBSV.js} +1 -1
  8. package/dist/clients/{chunk-ECGTOMZQ.js → chunk-XOLUUA5B.js} +2 -2
  9. package/dist/clients/fanatics.js +2 -2
  10. package/dist/clients/internal/nado/withdrawalCallback.js +3 -3
  11. package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
  12. package/dist/clients/internal/nado/withdrawalForm.js +4 -4
  13. package/dist/clients/internal/nado/withdrawalStatus.js +3 -3
  14. package/dist/clients/jupiter-ICN4DJIL.js +7 -0
  15. package/dist/clients/lighter.js +3 -3
  16. package/dist/clients/mallard.js +2 -2
  17. package/dist/clients/nado.js +3 -3
  18. package/dist/clients/solflare-M46C72WA.js +7 -0
  19. package/dist/components/FunCheckoutHistory/AddTokenToWalletButton.d.ts +3 -3
  20. package/dist/components/FunTransactionSummary/PaymentRouteSummary.d.ts +2 -1
  21. package/dist/components/ModalErrorState/ModalErrorState.d.ts +8 -1
  22. package/dist/config/getDefaultConfig.d.ts +1 -1
  23. package/dist/consts/walletIcons.d.ts +7 -0
  24. package/dist/hooks/track/analytics/mappers.d.ts +4 -2
  25. package/dist/hooks/useCheckoutDirectExecution.d.ts +1 -2
  26. package/dist/hooks/useConnectedWalletIcons.d.ts +6 -0
  27. package/dist/hooks/useConnectedWallets.d.ts +12 -0
  28. package/dist/hooks/usePaymentMethodIcon.d.ts +11 -2
  29. package/dist/index.js +2962 -2539
  30. package/dist/interfaces/solanaWallet.d.ts +10 -0
  31. package/dist/jupiter-ICN4DJIL.js +7 -0
  32. package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +3 -1
  33. package/dist/modals/CheckoutModal/VirtualFiatAccount/ErrorScreen.d.ts +2 -2
  34. package/dist/modals/WithdrawalModal/WithdrawalMethodSelect.d.ts +2 -1
  35. package/dist/providers/GeneralWalletProvider.d.ts +15 -3
  36. package/dist/solflare-M46C72WA.js +7 -0
  37. package/dist/utils/solanaRelayWallet.d.ts +6 -0
  38. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  39. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  40. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  41. package/dist/wallets/walletConnectors/chunk-53MYTA42.js +94 -0
  42. package/dist/wallets/walletConnectors/chunk-65ULY6OC.js +70 -0
  43. package/dist/wallets/walletConnectors/chunk-A5POD5SV.js +103 -0
  44. package/dist/wallets/walletConnectors/chunk-ANODOMIN.js +218 -0
  45. package/dist/wallets/walletConnectors/chunk-ASTCNVJC.js +96 -0
  46. package/dist/wallets/walletConnectors/chunk-F45CUFRR.js +66 -0
  47. package/dist/wallets/walletConnectors/chunk-FYPQ3HP4.js +92 -0
  48. package/dist/wallets/walletConnectors/chunk-IWPW26AL.js +98 -0
  49. package/dist/wallets/walletConnectors/chunk-JJBLW4IU.js +87 -0
  50. package/dist/wallets/walletConnectors/chunk-KE4CWI3A.js +93 -0
  51. package/dist/wallets/walletConnectors/chunk-MWB6LFSG.js +110 -0
  52. package/dist/wallets/walletConnectors/chunk-OVDCDVFX.js +100 -0
  53. package/dist/wallets/walletConnectors/chunk-PPQ6L4K2.js +106 -0
  54. package/dist/wallets/walletConnectors/chunk-RJF2YEZ5.js +92 -0
  55. package/dist/wallets/walletConnectors/chunk-RQYEGJKL.js +96 -0
  56. package/dist/wallets/walletConnectors/chunk-TIHTQ3OB.js +95 -0
  57. package/dist/wallets/walletConnectors/chunk-TM7UBV3Q.js +69 -0
  58. package/dist/wallets/walletConnectors/chunk-USLZMUJ3.js +99 -0
  59. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  60. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  61. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  62. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  63. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  64. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  65. package/dist/wallets/walletConnectors/index.js +66 -66
  66. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  67. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  68. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  69. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  70. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  71. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  72. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  73. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  74. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  75. package/package.json +5 -5
@@ -5,6 +5,16 @@ interface SolanaWalletBase {
5
5
  * isn't a valid Solana address.
6
6
  */
7
7
  address: string;
8
+ /**
9
+ * Wallet name, e.g. `Phantom`. Picks the icon when none is supplied, and is
10
+ * how funkit recognises the same wallet connected on both ecosystems.
11
+ */
12
+ name: string;
13
+ /**
14
+ * Icon to show for this wallet, as a URL or data URI. Falls back to a
15
+ * bundled icon for wallets funkit recognises by name, then to a generic one.
16
+ */
17
+ icon?: string;
8
18
  /**
9
19
  * The RPC connection funkit submits and confirms through. Use an endpoint
10
20
  * you trust for write traffic — Solana's public RPC rejects browser origins.
@@ -0,0 +1,7 @@
1
+ "use client";
2
+
3
+ // src/wallets/walletIcons/jupiter.svg
4
+ var jupiter_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 33 32"><g clip-path="url(%23a)" filter="url(%23b)"><path fill="url(%23c)" d="M3.09 25.167a16.43 16.43 0 0 0 11.621 6.75c-1.185-1.784-2.907-3.424-5.057-4.673s-4.428-1.931-6.563-2.077Z"/><path fill="url(%23d)" d="M12.543 22.27C8.4 19.864 3.916 19.25.708 20.334c.31 1.024.718 2.015 1.22 2.96 2.787-.065 5.83.692 8.663 2.337 2.832 1.645 4.998 3.915 6.323 6.369 1.07-.033 2.134-.17 3.177-.407-.648-3.323-3.406-6.915-7.548-9.323"/><path fill="url(%23e)" d="M32.285 12.5A16.42 16.42 0 0 0 11.846.627c3.546.434 7.48 1.765 11.34 4.007s6.967 5.001 9.1 7.868Z"/><path fill="url(%23f)" d="M27.127 20.358c-1.815-3.013-4.923-5.9-8.753-8.124s-7.875-3.495-11.389-3.58C3.894 8.582 1.574 9.48.622 11.12l-.02.028q-.126.462-.226.925c1.33-.525 2.87-.817 4.584-.85 3.81-.071 8.073 1.147 12.008 3.433s7.108 5.388 8.932 8.732c.818 1.506 1.329 2.99 1.53 4.407q.355-.315.691-.654l.016-.032c.952-1.641.584-4.101-1.01-6.75Z"/><path fill="url(%23g)" d="M15.46 17.248C9.598 13.842 3.117 13.309 0 15.685q.01 1.119.17 2.224a13 13 0 0 1 2.817-.522c3.483-.262 7.322.709 10.806 2.734s6.23 4.88 7.728 8.033c.414.864.73 1.771.941 2.706a16.4 16.4 0 0 0 2.017-.953c.522-3.886-3.152-9.251-9.018-12.659Z"/><path fill="url(%23h)" d="M30.143 15.314c-1.835-3.01-4.97-5.904-8.827-8.144-3.857-2.239-7.918-3.53-11.443-3.633-2.688-.078-4.77.574-5.848 1.804 4.48-.76 10.392.517 16.121 3.845 5.73 3.329 9.767 7.832 11.326 12.1.534-1.545.07-3.676-1.329-5.972"/></g><defs><linearGradient id="c" x1="21.5" x2="6.667" y1="6.5" y2="32" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="%23c7f284"/><stop offset="1" stop-color="%2300bef0"/></linearGradient><linearGradient id="d" x1="21.5" x2="6.667" y1="6.5" y2="32" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="%23c7f284"/><stop offset="1" stop-color="%2300bef0"/></linearGradient><linearGradient id="e" x1="21.5" x2="6.667" y1="6.5" y2="32" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="%23c7f284"/><stop offset="1" stop-color="%2300bef0"/></linearGradient><linearGradient id="f" x1="21.5" x2="6.667" y1="6.5" y2="32" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="%23c7f284"/><stop offset="1" stop-color="%2300bef0"/></linearGradient><linearGradient id="g" x1="21.5" x2="6.667" y1="6.5" y2="32" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="%23c7f284"/><stop offset="1" stop-color="%2300bef0"/></linearGradient><linearGradient id="h" x1="21.5" x2="6.667" y1="6.5" y2="32" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="%23c7f284"/><stop offset="1" stop-color="%2300bef0"/></linearGradient><clipPath id="a"><path fill="%23fff" d="M0 0h32.285v32H0z"/></clipPath><filter id="b" width="77.775" height="77.49" x="-22.745" y="-20.47" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="2.274"/><feGaussianBlur stdDeviation="11.372"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_11565_169621"/><feBlend in="SourceGraphic" in2="effect1_dropShadow_11565_169621" result="shape"/></filter></defs></svg>';
5
+ export {
6
+ jupiter_default as default
7
+ };
@@ -8,7 +8,9 @@ interface ListFopsData {
8
8
  }
9
9
  interface FormOfPaymentsListProps {
10
10
  fopsData?: GetFopsResponse;
11
+ isCashier?: boolean;
11
12
  isLoading: boolean;
13
+ isWithdrawal?: boolean;
12
14
  selectedFop?: ListFormOfPayment | null;
13
15
  /**
14
16
  * Non-Swapped methods (e.g. Cash App Lightning) to interleave into the list.
@@ -45,5 +47,5 @@ export declare function getFormOfPaymentSections(fopsData: ListFopsData, fopPrio
45
47
  primary: FormOfPaymentSection;
46
48
  secondary: FormOfPaymentSection;
47
49
  };
48
- export declare function FormOfPaymentsList({ fopsData, isLoading, selectedFop, syntheticFops, onSelect, exchangeRatesData, getDisclaimerLimit, enableSourceGroupLabels, isDisabled, isBelowMinimumBalance, cryptoPaymentMethodItem, }: FormOfPaymentsListProps): React.JSX.Element;
50
+ export declare function FormOfPaymentsList({ fopsData, isCashier, isLoading, isWithdrawal, selectedFop, syntheticFops, onSelect, exchangeRatesData, getDisclaimerLimit, enableSourceGroupLabels, isDisabled, isBelowMinimumBalance, cryptoPaymentMethodItem, }: FormOfPaymentsListProps): React.JSX.Element;
49
51
  export {};
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import type { CheckoutModalCommonState, FunCheckoutStep, ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
2
+ import { CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
3
3
  export type ErrorScreenState = CheckoutModalCommonState & {
4
4
  errorCode: string;
5
5
  };
6
- export declare const ErrorScreen: () => React.JSX.Element;
6
+ export declare const ErrorScreen: ({ modalState, }: ModalStepComponentProps<FunCheckoutStep.ERROR_SCREEN>) => React.JSX.Element;
7
7
  export declare const ErrorScreenInfo: ModalStepInfo<FunCheckoutStep.ERROR_SCREEN>;
@@ -1,6 +1,7 @@
1
1
  import type { SwappedFormOfPayment } from '@funkit/api-base';
2
2
  import React from 'react';
3
3
  interface WithdrawalMethodSelectProps {
4
+ isCashier?: boolean;
4
5
  onCryptoSelect: () => void;
5
6
  onCashFopSelect: (fop: SwappedFormOfPayment) => void;
6
7
  sourceChainId: string;
@@ -16,5 +17,5 @@ interface WithdrawalMethodSelectProps {
16
17
  */
17
18
  hideSectionLabels?: boolean;
18
19
  }
19
- export declare function WithdrawalMethodSelect({ onCryptoSelect, onCashFopSelect, sourceChainId, sourceTokenAddress, usdBalance, hideSectionLabels, }: WithdrawalMethodSelectProps): React.JSX.Element;
20
+ export declare function WithdrawalMethodSelect({ isCashier, onCryptoSelect, onCashFopSelect, sourceChainId, sourceTokenAddress, usdBalance, hideSectionLabels, }: WithdrawalMethodSelectProps): React.JSX.Element;
20
21
  export {};
@@ -1,6 +1,7 @@
1
1
  import type { AssetBalanceInfo, SolanaAddress } from '@funkit/api-base';
2
2
  import React, { type ReactNode } from 'react';
3
3
  import type { Address } from 'viem';
4
+ import type { AsyncImageSrc } from '../components/AsyncImage/useAsyncImage';
4
5
  import type { IdentityProvider } from '../interfaces/identity';
5
6
  import { type UseDisconnectReturnType, type UseReconnectReturnType } from '../wagmi/hooks';
6
7
  import { type FunkitUserInfo } from '../consts/funkit';
@@ -11,12 +12,23 @@ export interface KnownAssetBalanceInfo extends AssetBalanceInfo {
11
12
  totalUsdValue: number;
12
13
  }
13
14
  export { LoginType } from '../utils/userInfo';
15
+ /**
16
+ * A wallet that can pay, with the vendor identity a row needs to name and
17
+ * depict it. Recorded checkouts widen the address, having stored what paid
18
+ * rather than validated it.
19
+ */
20
+ export interface PayerWallet<TAddress extends string = string> {
21
+ address: TAddress;
22
+ name?: string;
23
+ icon?: string | AsyncImageSrc;
24
+ }
25
+ /** One entry per ecosystem: two entries mean two addresses. */
14
26
  export interface CheckoutPayer {
15
- walletAddress: Address | '';
16
- solanaWalletAddress: SolanaAddress | undefined;
27
+ evmWallet: PayerWallet<Address | ''>;
28
+ solanaWallet: PayerWallet<SolanaAddress> | undefined;
17
29
  }
18
30
  export interface GeneralWalletContextProps {
19
- walletAddress: CheckoutPayer['walletAddress'];
31
+ walletAddress: CheckoutPayer['evmWallet']['address'];
20
32
  payerWallets: CheckoutPayer;
21
33
  isUserLoggedIn: boolean;
22
34
  loginType: LoginType;
@@ -0,0 +1,7 @@
1
+ "use client";
2
+
3
+ // src/wallets/walletIcons/solflare.svg
4
+ var solflare_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><rect width="50" height="50" rx="12" ry="12" style="fill:%23ffef46"/><path d="m24.23 26.42 2.46-2.38 4.59 1.5c3.01 1 4.51 2.84 4.51 5.43 0 1.96-.75 3.26-2.25 4.93l-.46.5.17-1.17c.67-4.26-.58-6.09-4.72-7.43l-4.3-1.38Zm-6.18-14.57 12.52 4.17-2.71 2.59-6.51-2.17c-2.25-.75-3.01-1.96-3.3-4.51v-.08Zm-.75 21.21 2.84-2.71 5.34 1.75c2.8.92 3.76 2.13 3.46 5.18l-11.65-4.22Zm-3.59-12.11c0-.79.42-1.54 1.13-2.17.75 1.09 2.05 2.05 4.09 2.71l4.42 1.46-2.46 2.38-4.34-1.42c-2-.67-2.84-1.67-2.84-2.96m13.11 21.92C36 36.78 40.93 32.64 40.93 27.55c0-3.38-2-5.26-6.43-6.72l-3.34-1.13 9.14-8.77-1.84-1.96-2.71 2.38-12.81-4.22c-3.97 1.29-8.97 5.09-8.97 8.89 0 .42.04.83.17 1.29-3.3 1.88-4.63 3.63-4.63 5.8 0 2.05 1.09 4.09 4.55 5.22l2.75.92-9.52 9.14 1.84 1.96 2.96-2.71 14.73 5.22Z" style="fill:%2302050a;stroke:%23ffef46;stroke-miterlimit:10;stroke-width:.5px"/></svg>';
5
+ export {
6
+ solflare_default as default
7
+ };
@@ -7,3 +7,9 @@ export declare function resolveSigner(wallet: SolanaWalletConnection): SolanaSig
7
7
  * adapter types the payer as a base58 address, not the host's bare string.
8
8
  */
9
9
  export declare function createSolanaRelayWallet(wallet: ValidatedSolanaWallet): SolanaWallet;
10
+ /** The relay wallet for a Solana source, or undefined for an EVM one. */
11
+ export declare function resolveSolanaRelayWallet({ sourceChainId, solanaWallet, logPrefix, }: {
12
+ sourceChainId: string;
13
+ solanaWallet: ValidatedSolanaWallet | undefined;
14
+ logPrefix: string;
15
+ }): SolanaWallet | undefined;
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bifrostWallet
4
- } from "../chunk-ALGPGI6V.js";
5
- import "../chunk-AALSJCUR.js";
4
+ } from "../chunk-TM7UBV3Q.js";
6
5
  import "../chunk-EYWGX5LT.js";
6
+ import "../chunk-AALSJCUR.js";
7
7
  import "../chunk-B454LLKJ.js";
8
8
  export {
9
9
  bifrostWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bitgetWallet
4
- } from "../chunk-HOCKAU5H.js";
5
- import "../chunk-AALSJCUR.js";
4
+ } from "../chunk-USLZMUJ3.js";
6
5
  import "../chunk-EYWGX5LT.js";
6
+ import "../chunk-AALSJCUR.js";
7
7
  import "../chunk-B454LLKJ.js";
8
8
  export {
9
9
  bitgetWallet
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bybitWallet
4
- } from "../chunk-BBDNB5TQ.js";
5
- import "../chunk-AALSJCUR.js";
4
+ } from "../chunk-IWPW26AL.js";
6
5
  import "../chunk-EYWGX5LT.js";
6
+ import "../chunk-AALSJCUR.js";
7
7
  import "../chunk-B454LLKJ.js";
8
8
  export {
9
9
  bybitWallet
@@ -0,0 +1,94 @@
1
+ "use client";
2
+ import {
3
+ getInjectedConnector,
4
+ hasInjectedProvider
5
+ } from "./chunk-EYWGX5LT.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-AALSJCUR.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,70 @@
1
+ "use client";
2
+ import {
3
+ getInjectedConnector,
4
+ hasInjectedProvider
5
+ } from "./chunk-EYWGX5LT.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-AALSJCUR.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,103 @@
1
+ "use client";
2
+ import {
3
+ getInjectedConnector,
4
+ hasInjectedProvider
5
+ } from "./chunk-EYWGX5LT.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-AALSJCUR.js";
9
+
10
+ // src/wallets/walletConnectors/subWallet/subWallet.ts
11
+ var subWallet = ({
12
+ projectId,
13
+ walletConnectParameters
14
+ }) => {
15
+ const isSubWalletInjected = hasInjectedProvider({ namespace: "SubWallet" });
16
+ const shouldUseWalletConnect = !isSubWalletInjected;
17
+ const getUriMobile = (uri) => {
18
+ return `subwallet://wc?uri=${encodeURIComponent(uri)}`;
19
+ };
20
+ const getUriQR = (uri) => {
21
+ return uri;
22
+ };
23
+ const mobileConnector = {
24
+ getUri: shouldUseWalletConnect ? getUriMobile : void 0
25
+ };
26
+ let qrConnector = void 0;
27
+ if (shouldUseWalletConnect) {
28
+ qrConnector = {
29
+ getUri: getUriQR,
30
+ instructions: {
31
+ learnMoreUrl: "https://www.subwallet.app/",
32
+ steps: [
33
+ {
34
+ description: "wallet_connectors.subwallet.qr_code.step1.description",
35
+ step: "install",
36
+ title: "wallet_connectors.subwallet.qr_code.step1.title"
37
+ },
38
+ {
39
+ description: "wallet_connectors.subwallet.qr_code.step2.description",
40
+ step: "create",
41
+ title: "wallet_connectors.subwallet.qr_code.step2.title"
42
+ },
43
+ {
44
+ description: "wallet_connectors.subwallet.qr_code.step3.description",
45
+ step: "scan",
46
+ title: "wallet_connectors.subwallet.qr_code.step3.title"
47
+ }
48
+ ]
49
+ }
50
+ };
51
+ }
52
+ const extensionConnector = {
53
+ instructions: {
54
+ learnMoreUrl: "https://www.subwallet.app/",
55
+ steps: [
56
+ {
57
+ description: "wallet_connectors.subwallet.extension.step1.description",
58
+ step: "install",
59
+ title: "wallet_connectors.subwallet.extension.step1.title"
60
+ },
61
+ {
62
+ description: "wallet_connectors.subwallet.extension.step2.description",
63
+ step: "create",
64
+ title: "wallet_connectors.subwallet.extension.step2.title"
65
+ },
66
+ {
67
+ description: "wallet_connectors.subwallet.extension.step3.description",
68
+ step: "refresh",
69
+ title: "wallet_connectors.subwallet.extension.step3.title"
70
+ }
71
+ ]
72
+ }
73
+ };
74
+ return {
75
+ id: "subwallet",
76
+ name: "SubWallet",
77
+ rdns: "app.subwallet",
78
+ iconUrl: async () => (await import("./subWallet-5WUZ4IIO.js")).default,
79
+ iconBackground: "#fff",
80
+ installed: isSubWalletInjected || void 0,
81
+ downloadUrls: {
82
+ browserExtension: "https://www.subwallet.app/download",
83
+ chrome: "https://chrome.google.com/webstore/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn",
84
+ firefox: "https://addons.mozilla.org/en-US/firefox/addon/subwallet/",
85
+ edge: "https://chrome.google.com/webstore/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn",
86
+ mobile: "https://www.subwallet.app/download",
87
+ android: "https://play.google.com/store/apps/details?id=app.subwallet.mobile",
88
+ ios: "https://apps.apple.com/us/app/subwallet-polkadot-wallet/id1633050285",
89
+ qrCode: "https://www.subwallet.app/download"
90
+ },
91
+ mobile: mobileConnector,
92
+ qrCode: qrConnector,
93
+ extension: extensionConnector,
94
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
95
+ projectId,
96
+ walletConnectParameters
97
+ }) : getInjectedConnector({ namespace: "SubWallet" })
98
+ };
99
+ };
100
+
101
+ export {
102
+ subWallet
103
+ };
@@ -0,0 +1,218 @@
1
+ "use client";
2
+ import {
3
+ getInjectedConnector,
4
+ hasInjectedProvider
5
+ } from "./chunk-EYWGX5LT.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-AALSJCUR.js";
9
+
10
+ // src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts
11
+ import { isAndroid, isIOS } from "@funkit/utils";
12
+ function isMetaMask(ethereum) {
13
+ if (!ethereum?.isMetaMask) {
14
+ return false;
15
+ }
16
+ if (ethereum.isBraveWallet && !ethereum._events && !ethereum._state) {
17
+ return false;
18
+ }
19
+ if (ethereum.isApexWallet) {
20
+ return false;
21
+ }
22
+ if (ethereum.isAvalanche) {
23
+ return false;
24
+ }
25
+ if (ethereum.isBackpack) {
26
+ return false;
27
+ }
28
+ if (ethereum.isBifrost) {
29
+ return false;
30
+ }
31
+ if (ethereum.isBitKeep) {
32
+ return false;
33
+ }
34
+ if (ethereum.isBitski) {
35
+ return false;
36
+ }
37
+ if (ethereum.isBlockWallet) {
38
+ return false;
39
+ }
40
+ if (ethereum.isCoinbaseWallet) {
41
+ return false;
42
+ }
43
+ if (ethereum.isDawn) {
44
+ return false;
45
+ }
46
+ if (ethereum.isEnkrypt) {
47
+ return false;
48
+ }
49
+ if (ethereum.isExodus) {
50
+ return false;
51
+ }
52
+ if (ethereum.isFrame) {
53
+ return false;
54
+ }
55
+ if (ethereum.isFrontier) {
56
+ return false;
57
+ }
58
+ if (ethereum.isGamestop) {
59
+ return false;
60
+ }
61
+ if (ethereum.isHyperPay) {
62
+ return false;
63
+ }
64
+ if (ethereum.isImToken) {
65
+ return false;
66
+ }
67
+ if (ethereum.isKuCoinWallet) {
68
+ return false;
69
+ }
70
+ if (ethereum.isMathWallet) {
71
+ return false;
72
+ }
73
+ if (ethereum.isNestWallet) {
74
+ return false;
75
+ }
76
+ if (ethereum.isOkxWallet || ethereum.isOKExWallet) {
77
+ return false;
78
+ }
79
+ if (ethereum.isOneInchIOSWallet || ethereum.isOneInchAndroidWallet) {
80
+ return false;
81
+ }
82
+ if (ethereum.isOpera) {
83
+ return false;
84
+ }
85
+ if (ethereum.isPhantom) {
86
+ return false;
87
+ }
88
+ if (ethereum.isPortal) {
89
+ return false;
90
+ }
91
+ if (ethereum.isRabby) {
92
+ return false;
93
+ }
94
+ if (ethereum.isRainbow) {
95
+ return false;
96
+ }
97
+ if (ethereum.isStatus) {
98
+ return false;
99
+ }
100
+ if (ethereum.isTalisman) {
101
+ return false;
102
+ }
103
+ if (ethereum.isTally) {
104
+ return false;
105
+ }
106
+ if (ethereum.isTokenPocket) {
107
+ return false;
108
+ }
109
+ if (ethereum.isTokenary) {
110
+ return false;
111
+ }
112
+ if (ethereum.isTrust || ethereum.isTrustWallet) {
113
+ return false;
114
+ }
115
+ if (ethereum.isXDEFI) {
116
+ return false;
117
+ }
118
+ if (ethereum.isZeal) {
119
+ return false;
120
+ }
121
+ if (ethereum.isZerion) {
122
+ return false;
123
+ }
124
+ return true;
125
+ }
126
+ var metaMaskWallet = ({
127
+ projectId,
128
+ walletConnectParameters
129
+ }) => {
130
+ const isMetaMaskInjected = hasInjectedProvider({ flag: "isMetaMask" });
131
+ const shouldUseWalletConnect = !isMetaMaskInjected;
132
+ const getUri = (uri) => {
133
+ return isAndroid() ? uri : isIOS() ? (
134
+ // currently broken in MetaMask v6.5.0 https://github.com/MetaMask/metamask-mobile/issues/6457
135
+ `metamask://wc?uri=${encodeURIComponent(uri)}`
136
+ ) : `https://metamask.app.link/wc?uri=${encodeURIComponent(uri)}`;
137
+ };
138
+ return {
139
+ id: "metaMask",
140
+ name: "MetaMask",
141
+ rdns: "io.metamask",
142
+ iconUrl: async () => (await import("./metaMaskWallet-RMHEKBDR.js")).default,
143
+ iconAccent: "#f6851a",
144
+ iconBackground: "#fff",
145
+ installed: !shouldUseWalletConnect ? isMetaMaskInjected : void 0,
146
+ downloadUrls: {
147
+ android: "https://play.google.com/store/apps/details?id=io.metamask",
148
+ ios: "https://apps.apple.com/us/app/metamask/id1438144202",
149
+ mobile: "https://metamask.io/download",
150
+ qrCode: "https://metamask.io/download",
151
+ chrome: "https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",
152
+ edge: "https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",
153
+ firefox: "https://addons.mozilla.org/firefox/addon/ether-metamask",
154
+ opera: "https://addons.opera.com/extensions/details/metamask-10",
155
+ browserExtension: "https://metamask.io/download"
156
+ },
157
+ mobile: {
158
+ getUri: shouldUseWalletConnect ? getUri : void 0
159
+ },
160
+ qrCode: shouldUseWalletConnect ? {
161
+ getUri,
162
+ instructions: {
163
+ learnMoreUrl: "https://metamask.io/faqs/",
164
+ steps: [
165
+ {
166
+ description: "wallet_connectors.metamask.qr_code.step1.description",
167
+ step: "install",
168
+ title: "wallet_connectors.metamask.qr_code.step1.title"
169
+ },
170
+ {
171
+ description: "wallet_connectors.metamask.qr_code.step2.description",
172
+ step: "create",
173
+ title: "wallet_connectors.metamask.qr_code.step2.title"
174
+ },
175
+ {
176
+ description: "wallet_connectors.metamask.qr_code.step3.description",
177
+ step: "refresh",
178
+ title: "wallet_connectors.metamask.qr_code.step3.title"
179
+ }
180
+ ]
181
+ }
182
+ } : void 0,
183
+ extension: {
184
+ instructions: {
185
+ learnMoreUrl: "https://metamask.io/faqs/",
186
+ steps: [
187
+ {
188
+ description: "wallet_connectors.metamask.extension.step1.description",
189
+ step: "install",
190
+ title: "wallet_connectors.metamask.extension.step1.title"
191
+ },
192
+ {
193
+ description: "wallet_connectors.metamask.extension.step2.description",
194
+ step: "create",
195
+ title: "wallet_connectors.metamask.extension.step2.title"
196
+ },
197
+ {
198
+ description: "wallet_connectors.metamask.extension.step3.description",
199
+ step: "refresh",
200
+ title: "wallet_connectors.metamask.extension.step3.title"
201
+ }
202
+ ]
203
+ }
204
+ },
205
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
206
+ projectId,
207
+ walletConnectParameters
208
+ }) : getInjectedConnector({
209
+ target: typeof window !== "undefined" ? window.ethereum?.providers?.find(
210
+ isMetaMask
211
+ ) ?? window.ethereum : void 0
212
+ })
213
+ };
214
+ };
215
+
216
+ export {
217
+ metaMaskWallet
218
+ };