@funkit/connect 1.1.5 → 1.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.
- package/CHANGELOG.md +29 -0
- package/dist/components/CloseButton/CloseButton.d.ts +1 -1
- package/dist/components/ConnectButton/ConnectButton.d.ts +3 -1
- package/dist/components/FunButton/FunIconButton.d.ts +3 -3
- package/dist/components/FunCheckoutHistoryModal/FunCheckoutHistoryHelp.d.ts +1 -1
- package/dist/components/FunkitProvider/FunkitCheckoutContext.d.ts +1 -1
- package/dist/components/FunkitProvider/GeneralWalletProvider.d.ts +1 -1
- package/dist/components/Icons/ClockIcon.d.ts +1 -1
- package/dist/components/Icons/CoinIcon.d.ts +1 -1
- package/dist/components/Icons/Coinbase.d.ts +3 -1
- package/dist/components/Icons/Copied.d.ts +1 -1
- package/dist/components/Icons/EditIcon.d.ts +1 -1
- package/dist/components/Icons/EthereumIcon.d.ts +1 -1
- package/dist/components/Icons/FunkitPaymentsIconLine.d.ts +6 -0
- package/dist/components/Icons/LightningIcon.d.ts +1 -1
- package/dist/components/Icons/NoAssetsFoundIcon.d.ts +1 -1
- package/dist/components/Icons/PaymentMethodIcons.d.ts +1 -1
- package/dist/components/Icons/SearchIcon.d.ts +1 -1
- package/dist/components/Icons/Spinner.d.ts +2 -2
- package/dist/components/InfoButton/InfoButton.d.ts +1 -1
- package/dist/components/WalletButton/WalletButton.d.ts +1 -1
- package/dist/config/getDefaultConfig.d.ts +204 -60
- package/dist/hooks/useMesh.d.ts +6 -3
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +455 -164
- package/dist/types/utils.d.ts +37 -0
- package/dist/utils/mesh.d.ts +4 -27
- package/dist/wallets/getInjectedConnector.d.ts +3 -2
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitskiWallet/bitskiWallet.js +2 -2
- package/dist/wallets/walletConnectors/braveWallet/braveWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/{chunk-MIWCKFYE.js → chunk-2DWBVWFI.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-3WZRNEZH.js → chunk-32KBKKGT.js} +9 -5
- package/dist/wallets/walletConnectors/{chunk-JLQ5HJYV.js → chunk-32O7HVBJ.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-O5NKWWEG.js → chunk-3CLNL7LR.js} +4 -4
- package/dist/wallets/walletConnectors/chunk-3F5GNHAG.js +182 -0
- package/dist/wallets/walletConnectors/{chunk-4FQLUQNA.js → chunk-3QXMJHL4.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-ZNXQ4V6G.js → chunk-3R3RNCGE.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-KGBLSE7L.js → chunk-4PTY6XNU.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-ZBAQFL6G.js → chunk-5L2OLU3J.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-XPEBP6XV.js → chunk-5SIHQ5GA.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-NGXIHASN.js → chunk-5ZGE5SN5.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-7GGRZNT3.js +96 -0
- package/dist/wallets/walletConnectors/chunk-7YDZTPO4.js +100 -0
- package/dist/wallets/walletConnectors/{chunk-6LTLPR2Q.js → chunk-AFONKDII.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-ZUAHWUEL.js → chunk-BCXBFAL4.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-Z2DGDHHZ.js → chunk-BMHNXJZK.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-V45EXW7A.js → chunk-CMXZK5RR.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-LVRXH33E.js → chunk-CNTLU4ZV.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-EXN2ODSI.js +73 -0
- package/dist/wallets/walletConnectors/{chunk-QII6PY2D.js → chunk-F3VCNZXS.js} +8 -6
- package/dist/wallets/walletConnectors/chunk-F4EJ42XO.js +105 -0
- package/dist/wallets/walletConnectors/chunk-FL2VIO76.js +71 -0
- package/dist/wallets/walletConnectors/{chunk-63NPZXAL.js → chunk-FQDX6QIP.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-7CQPABJG.js → chunk-G4DNQN67.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-KIHCNUU3.js → chunk-GUJHPWTU.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-XXFJVY73.js → chunk-HXGBE5AH.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-IIJOJ6AD.js +102 -0
- package/dist/wallets/walletConnectors/{chunk-C67TQJ6W.js → chunk-IMZRCMZR.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-L734HTUS.js → chunk-JNZ3EYC7.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-ENZLEAG2.js → chunk-JRABHUUZ.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-ABYQAXUX.js → chunk-KJWMF6GZ.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-4XQDKOGF.js → chunk-KZFAL4RZ.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-2UXZAUWT.js → chunk-LJRV5JY7.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-AM4SSLAP.js → chunk-LOEDYNWO.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-Q4RLUJJD.js → chunk-M4SPCKW4.js} +4 -4
- package/dist/wallets/walletConnectors/chunk-MFS6NY6T.js +105 -0
- package/dist/wallets/walletConnectors/chunk-MOAWRDEM.js +95 -0
- package/dist/wallets/walletConnectors/chunk-MSRKKVDE.js +98 -0
- package/dist/wallets/walletConnectors/chunk-ND5YG63V.js +87 -0
- package/dist/wallets/walletConnectors/chunk-NK3DYIAB.js +92 -0
- package/dist/wallets/walletConnectors/{chunk-XBUTWYE4.js → chunk-O77H3VWW.js} +14 -18
- package/dist/wallets/walletConnectors/chunk-OMKARG6Y.js +94 -0
- package/dist/wallets/walletConnectors/chunk-OPO2D6GL.js +102 -0
- package/dist/wallets/walletConnectors/chunk-OUQ3ZF2W.js +100 -0
- package/dist/wallets/walletConnectors/chunk-OXWTS7HX.js +98 -0
- package/dist/wallets/walletConnectors/{chunk-P4JLZ42R.js → chunk-P4C7ZHIS.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-H76YCX2M.js → chunk-PILSRRPJ.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-PJRUHFBT.js +71 -0
- package/dist/wallets/walletConnectors/{chunk-SYELB4QO.js → chunk-PQSJXOGA.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-QGQISKXF.js +94 -0
- package/dist/wallets/walletConnectors/{chunk-4WOV4ITL.js → chunk-QS2J6MWB.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-QUFNIKMV.js +27 -0
- package/dist/wallets/walletConnectors/{chunk-H273OTQA.js → chunk-R2GYJ376.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-R5GNFRXW.js +96 -0
- package/dist/wallets/walletConnectors/chunk-S2IWMXKX.js +94 -0
- package/dist/wallets/walletConnectors/{chunk-FLY7F4XA.js → chunk-SJWHYD45.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-TKXMLZXG.js +66 -0
- package/dist/wallets/walletConnectors/chunk-TUK3HNKY.js +182 -0
- package/dist/wallets/walletConnectors/chunk-UWU574XS.js +95 -0
- package/dist/wallets/walletConnectors/chunk-WH7S23VZ.js +73 -0
- package/dist/wallets/walletConnectors/chunk-WS4EM7AZ.js +102 -0
- package/dist/wallets/walletConnectors/chunk-XB2GFXBL.js +107 -0
- package/dist/wallets/walletConnectors/{chunk-ZOL6ZMTJ.js → chunk-XEZPRJPV.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-XUXFYTCV.js +96 -0
- package/dist/wallets/walletConnectors/{chunk-DPXMP5KS.js → chunk-Z5QFIFDP.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-ZBQT5PV6.js +98 -0
- package/dist/wallets/walletConnectors/{chunk-PWYTDYBE.js → chunk-ZCSUP7CX.js} +1 -1
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.d.ts +7 -1
- package/dist/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.js +1 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/dawnWallet/dawnWallet.js +2 -2
- package/dist/wallets/walletConnectors/desigWallet/desigWallet.js +2 -2
- package/dist/wallets/walletConnectors/enkryptWallet/enkryptWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frameWallet/frameWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +80 -80
- package/dist/wallets/walletConnectors/injectedWallet/injectedWallet.js +2 -2
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/mewWallet/mewWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/oneKeyWallet/oneKeyWallet.js +2 -2
- package/dist/wallets/walletConnectors/phantomWallet/phantomWallet.js +2 -2
- package/dist/wallets/walletConnectors/rabbyWallet/rabbyWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/ramperWallet/ramperWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safeheronWallet/safeheronWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tahoWallet/tahoWallet.js +2 -2
- package/dist/wallets/walletConnectors/talismanWallet/talismanWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/xdefiWallet/xdefiWallet.js +2 -2
- package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +5 -4
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type EIP1193Provider } from 'viem';
|
|
2
|
+
/** Combines members of an intersection into a readable type. */
|
|
3
|
+
export type Evaluate<type> = {
|
|
4
|
+
[key in keyof type]: type[key];
|
|
5
|
+
} & unknown;
|
|
6
|
+
/** Removes `readonly` from all properties of an object. */
|
|
7
|
+
export type Mutable<type extends object> = {
|
|
8
|
+
-readonly [key in keyof type]: type[key];
|
|
9
|
+
};
|
|
10
|
+
/** Strict version of built-in Omit type */
|
|
11
|
+
export type Omit<type, keys extends keyof type> = Pick<type, Exclude<keyof type, keys>>;
|
|
12
|
+
export type WalletProviderFlags = 'isApexWallet' | 'isAvalanche' | 'isBackpack' | 'isBifrost' | 'isBitKeep' | 'isBitski' | 'isBlockWallet' | 'isBraveWallet' | 'isCoinbaseWallet' | 'isDawn' | 'isEnkrypt' | 'isExodus' | 'isFrame' | 'isFrontier' | 'isGamestop' | 'isHyperPay' | 'isImToken' | 'isKuCoinWallet' | 'isMathWallet' | 'isMetaMask' | 'isNestWallet' | 'isOkxWallet' | 'isOKExWallet' | 'isOneInchAndroidWallet' | 'isOneInchIOSWallet' | 'isOpera' | 'isPhantom' | 'isPortal' | 'isRabby' | 'isRainbow' | 'isStatus' | 'isTally' | 'isTokenPocket' | 'isTokenary' | 'isTrust' | 'isTrustWallet' | 'isXDEFI' | 'isZerion' | 'isTalisman' | 'isZeal' | 'isCoin98' | 'isMEWwallet' | 'isSafeheron' | 'isSafePal';
|
|
13
|
+
export type WalletProvider = Evaluate<EIP1193Provider & {
|
|
14
|
+
[key in WalletProviderFlags]?: true | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
providers?: any[] | undefined;
|
|
17
|
+
/** Only exists in MetaMask as of 2022/04/03 */
|
|
18
|
+
_events?: {
|
|
19
|
+
connect?: (() => void) | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
/** Only exists in MetaMask as of 2022/04/03 */
|
|
22
|
+
_state?: {
|
|
23
|
+
accounts?: string[];
|
|
24
|
+
initialized?: boolean;
|
|
25
|
+
isConnected?: boolean;
|
|
26
|
+
isPermanentlyDisconnected?: boolean;
|
|
27
|
+
isUnlocked?: boolean;
|
|
28
|
+
} | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
export type WindowProvider = {
|
|
31
|
+
coinbaseWalletExtension?: WalletProvider | undefined;
|
|
32
|
+
ethereum?: WalletProvider | undefined;
|
|
33
|
+
phantom?: {
|
|
34
|
+
ethereum: WalletProvider;
|
|
35
|
+
} | undefined;
|
|
36
|
+
providers?: any[] | undefined;
|
|
37
|
+
};
|
package/dist/utils/mesh.d.ts
CHANGED
|
@@ -35,30 +35,7 @@ export declare enum MeshExchanges {
|
|
|
35
35
|
export declare const EXCHANGE_NAME_TO_TYPE: {
|
|
36
36
|
[x: string]: string;
|
|
37
37
|
};
|
|
38
|
-
export declare function fetchMeshLinkToken(funkitUserId: string, selectedExchange: MeshExchanges, funApiKey: string): Promise<
|
|
39
|
-
export declare enum MeshExecuteTransferStatus {
|
|
40
|
-
succeeded = "succeeded",
|
|
41
|
-
failed = "failed",
|
|
42
|
-
mfaRequired = "mfaRequired",
|
|
43
|
-
emailConfirmationRequired = "emailConfirmationRequired",
|
|
44
|
-
deviceConfirmationRequired = "deviceConfirmationRequired",
|
|
45
|
-
mfaFailed = "mfaFailed",
|
|
46
|
-
addressWhitelistRequired = "addressWhitelistRequired",
|
|
47
|
-
secondMfaRequired = "secondMfaRequired"
|
|
48
|
-
}
|
|
49
|
-
export declare enum MeshExecuteTransferMfaType {
|
|
50
|
-
unspecified = "unspecified",
|
|
51
|
-
phone = "phone",
|
|
52
|
-
email = "email",
|
|
53
|
-
otp = "otp"
|
|
54
|
-
}
|
|
55
|
-
export interface MeshExecuteTransferContent {
|
|
56
|
-
status: MeshExecuteTransferStatus;
|
|
57
|
-
mfaType: MeshExecuteTransferMfaType;
|
|
58
|
-
errorMessage: string | null;
|
|
59
|
-
executeTransferResult: object | null;
|
|
60
|
-
}
|
|
61
|
-
export declare function executeBrokerageDeposit(fromAuthToken: string, fromType: string, previewId: string, apiKey: string, mfaCode?: string): Promise<MeshExecuteTransferContent>;
|
|
38
|
+
export declare function fetchMeshLinkToken(funkitUserId: string, selectedExchange: MeshExchanges, funApiKey: string): Promise<import("@funkit/api-base").GetLinkTokenResponse>;
|
|
62
39
|
export declare function fetchMeshAccountCryptoHoldings({ authToken, apiKey, exchange, }: {
|
|
63
40
|
authToken: string;
|
|
64
41
|
apiKey: string;
|
|
@@ -67,12 +44,12 @@ export declare function fetchMeshAccountCryptoHoldings({ authToken, apiKey, exch
|
|
|
67
44
|
export declare function fetchMeshSupportedTokensByBrokerageAndSupportedFunkitChains({ exchange, apiKey, }: {
|
|
68
45
|
exchange: MeshExchanges;
|
|
69
46
|
apiKey: string;
|
|
70
|
-
}): Promise<
|
|
47
|
+
}): Promise<import("@funkit/api-base").IntegrationNetworkInfo[]>;
|
|
71
48
|
export declare function fetchMeshSupportedTokensAndIdByChainIdAndBrokerage({ chainId, exchange, apiKey, }: {
|
|
72
49
|
chainId: string;
|
|
73
50
|
exchange: MeshExchanges;
|
|
74
51
|
apiKey: string;
|
|
75
52
|
}): Promise<{
|
|
76
|
-
meshSupportedTokens:
|
|
77
|
-
meshNetworkId:
|
|
53
|
+
meshSupportedTokens: string[];
|
|
54
|
+
meshNetworkId: string | undefined;
|
|
78
55
|
}>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { WalletProviderFlags } from '../types/utils';
|
|
1
2
|
import { CreateConnector } from './Wallet';
|
|
2
3
|
export declare function hasInjectedProvider({ flag, namespace, }: {
|
|
3
|
-
flag?:
|
|
4
|
+
flag?: WalletProviderFlags;
|
|
4
5
|
namespace?: string;
|
|
5
6
|
}): boolean;
|
|
6
7
|
export declare function getInjectedConnector({ flag, namespace, target, }: {
|
|
7
|
-
flag?:
|
|
8
|
+
flag?: WalletProviderFlags;
|
|
8
9
|
namespace?: string;
|
|
9
10
|
target?: any;
|
|
10
11
|
}): CreateConnector;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bifrostWallet
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-PJRUHFBT.js";
|
|
5
5
|
import "../chunk-ZOLACFTK.js";
|
|
6
|
+
import "../chunk-F3VCNZXS.js";
|
|
6
7
|
import "../chunk-ZDU3JFGR.js";
|
|
7
|
-
import "../chunk-QII6PY2D.js";
|
|
8
8
|
export {
|
|
9
9
|
bifrostWallet
|
|
10
10
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bitgetWallet
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-3R3RNCGE.js";
|
|
5
5
|
import "../chunk-ZOLACFTK.js";
|
|
6
|
+
import "../chunk-F3VCNZXS.js";
|
|
6
7
|
import "../chunk-ZDU3JFGR.js";
|
|
7
|
-
import "../chunk-QII6PY2D.js";
|
|
8
8
|
export {
|
|
9
9
|
bitgetWallet
|
|
10
10
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-ZDU3JFGR.js";
|
|
5
2
|
import {
|
|
6
3
|
getInjectedConnector,
|
|
7
4
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-F3VCNZXS.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-ZDU3JFGR.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/clvWallet/clvWallet.ts
|
|
11
11
|
var clvWallet = ({
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-F3VCNZXS.js";
|
|
2
6
|
import {
|
|
3
7
|
isAndroid,
|
|
4
8
|
isIOS
|
|
@@ -6,10 +10,6 @@ import {
|
|
|
6
10
|
import {
|
|
7
11
|
getWalletConnectConnector
|
|
8
12
|
} from "./chunk-ZDU3JFGR.js";
|
|
9
|
-
import {
|
|
10
|
-
getInjectedConnector,
|
|
11
|
-
hasInjectedProvider
|
|
12
|
-
} from "./chunk-QII6PY2D.js";
|
|
13
13
|
|
|
14
14
|
// src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts
|
|
15
15
|
function isMetaMask(ethereum) {
|
|
@@ -53,6 +53,8 @@ function isMetaMask(ethereum) {
|
|
|
53
53
|
return false;
|
|
54
54
|
if (ethereum.isMathWallet)
|
|
55
55
|
return false;
|
|
56
|
+
if (ethereum.isNestWallet)
|
|
57
|
+
return false;
|
|
56
58
|
if (ethereum.isOkxWallet || ethereum.isOKExWallet)
|
|
57
59
|
return false;
|
|
58
60
|
if (ethereum.isOneInchIOSWallet || ethereum.isOneInchAndroidWallet)
|
|
@@ -168,7 +170,9 @@ var metaMaskWallet = ({
|
|
|
168
170
|
projectId,
|
|
169
171
|
walletConnectParameters
|
|
170
172
|
}) : getInjectedConnector({
|
|
171
|
-
target: typeof window !== "undefined" ? (_c = (_b = (_a = window.ethereum) == null ? void 0 : _a.providers) == null ? void 0 : _b.find(
|
|
173
|
+
target: typeof window !== "undefined" ? (_c = (_b = (_a = window.ethereum) == null ? void 0 : _a.providers) == null ? void 0 : _b.find(
|
|
174
|
+
isMetaMask
|
|
175
|
+
)) != null ? _c : window.ethereum : void 0
|
|
172
176
|
})
|
|
173
177
|
};
|
|
174
178
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-F3VCNZXS.js";
|
|
2
6
|
import {
|
|
3
7
|
isAndroid,
|
|
4
8
|
isIOS
|
|
@@ -6,10 +10,6 @@ import {
|
|
|
6
10
|
import {
|
|
7
11
|
getWalletConnectConnector
|
|
8
12
|
} from "./chunk-ZDU3JFGR.js";
|
|
9
|
-
import {
|
|
10
|
-
getInjectedConnector,
|
|
11
|
-
hasInjectedProvider
|
|
12
|
-
} from "./chunk-QII6PY2D.js";
|
|
13
13
|
|
|
14
14
|
// src/wallets/walletConnectors/rainbowWallet/rainbowWallet.ts
|
|
15
15
|
var rainbowWallet = ({
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
isAndroid,
|
|
4
|
+
isIOS
|
|
5
|
+
} from "./chunk-ZOLACFTK.js";
|
|
6
|
+
import {
|
|
7
|
+
getInjectedConnector,
|
|
8
|
+
hasInjectedProvider
|
|
9
|
+
} from "./chunk-F3VCNZXS.js";
|
|
10
|
+
import {
|
|
11
|
+
getWalletConnectConnector
|
|
12
|
+
} from "./chunk-ZDU3JFGR.js";
|
|
13
|
+
|
|
14
|
+
// src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts
|
|
15
|
+
function isMetaMask(ethereum) {
|
|
16
|
+
if (!(ethereum == null ? void 0 : ethereum.isMetaMask))
|
|
17
|
+
return false;
|
|
18
|
+
if (ethereum.isBraveWallet && !ethereum._events && !ethereum._state)
|
|
19
|
+
return false;
|
|
20
|
+
if (ethereum.isApexWallet)
|
|
21
|
+
return false;
|
|
22
|
+
if (ethereum.isAvalanche)
|
|
23
|
+
return false;
|
|
24
|
+
if (ethereum.isBackpack)
|
|
25
|
+
return false;
|
|
26
|
+
if (ethereum.isBifrost)
|
|
27
|
+
return false;
|
|
28
|
+
if (ethereum.isBitKeep)
|
|
29
|
+
return false;
|
|
30
|
+
if (ethereum.isBitski)
|
|
31
|
+
return false;
|
|
32
|
+
if (ethereum.isBlockWallet)
|
|
33
|
+
return false;
|
|
34
|
+
if (ethereum.isCoinbaseWallet)
|
|
35
|
+
return false;
|
|
36
|
+
if (ethereum.isDawn)
|
|
37
|
+
return false;
|
|
38
|
+
if (ethereum.isEnkrypt)
|
|
39
|
+
return false;
|
|
40
|
+
if (ethereum.isExodus)
|
|
41
|
+
return false;
|
|
42
|
+
if (ethereum.isFrame)
|
|
43
|
+
return false;
|
|
44
|
+
if (ethereum.isFrontier)
|
|
45
|
+
return false;
|
|
46
|
+
if (ethereum.isGamestop)
|
|
47
|
+
return false;
|
|
48
|
+
if (ethereum.isHyperPay)
|
|
49
|
+
return false;
|
|
50
|
+
if (ethereum.isImToken)
|
|
51
|
+
return false;
|
|
52
|
+
if (ethereum.isKuCoinWallet)
|
|
53
|
+
return false;
|
|
54
|
+
if (ethereum.isMathWallet)
|
|
55
|
+
return false;
|
|
56
|
+
if (ethereum.isNestWallet)
|
|
57
|
+
return false;
|
|
58
|
+
if (ethereum.isOkxWallet || ethereum.isOKExWallet)
|
|
59
|
+
return false;
|
|
60
|
+
if (ethereum.isOneInchIOSWallet || ethereum.isOneInchAndroidWallet)
|
|
61
|
+
return false;
|
|
62
|
+
if (ethereum.isOpera)
|
|
63
|
+
return false;
|
|
64
|
+
if (ethereum.isPhantom)
|
|
65
|
+
return false;
|
|
66
|
+
if (ethereum.isPortal)
|
|
67
|
+
return false;
|
|
68
|
+
if (ethereum.isRabby)
|
|
69
|
+
return false;
|
|
70
|
+
if (ethereum.isRainbow)
|
|
71
|
+
return false;
|
|
72
|
+
if (ethereum.isStatus)
|
|
73
|
+
return false;
|
|
74
|
+
if (ethereum.isTalisman)
|
|
75
|
+
return false;
|
|
76
|
+
if (ethereum.isTally)
|
|
77
|
+
return false;
|
|
78
|
+
if (ethereum.isTokenPocket)
|
|
79
|
+
return false;
|
|
80
|
+
if (ethereum.isTokenary)
|
|
81
|
+
return false;
|
|
82
|
+
if (ethereum.isTrust || ethereum.isTrustWallet)
|
|
83
|
+
return false;
|
|
84
|
+
if (ethereum.isXDEFI)
|
|
85
|
+
return false;
|
|
86
|
+
if (ethereum.isZeal)
|
|
87
|
+
return false;
|
|
88
|
+
if (ethereum.isZerion)
|
|
89
|
+
return false;
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
var metaMaskWallet = ({
|
|
93
|
+
projectId,
|
|
94
|
+
walletConnectParameters
|
|
95
|
+
}) => {
|
|
96
|
+
var _a, _b, _c;
|
|
97
|
+
const isMetaMaskInjected = hasInjectedProvider({ flag: "isMetaMask" });
|
|
98
|
+
const shouldUseWalletConnect = !isMetaMaskInjected;
|
|
99
|
+
const getUri = (uri) => {
|
|
100
|
+
return isAndroid() ? uri : isIOS() ? `metamask://wc?uri=${encodeURIComponent(uri)}` : `https://metamask.app.link/wc?uri=${encodeURIComponent(uri)}`;
|
|
101
|
+
};
|
|
102
|
+
return {
|
|
103
|
+
id: "metaMask",
|
|
104
|
+
name: "MetaMask",
|
|
105
|
+
rdns: "io.metamask",
|
|
106
|
+
iconUrl: async () => (await import("./metaMaskWallet-ORHUNQRP.js")).default,
|
|
107
|
+
iconAccent: "#f6851a",
|
|
108
|
+
iconBackground: "#fff",
|
|
109
|
+
installed: !shouldUseWalletConnect ? isMetaMaskInjected : void 0,
|
|
110
|
+
downloadUrls: {
|
|
111
|
+
android: "https://play.google.com/store/apps/details?id=io.metamask",
|
|
112
|
+
ios: "https://apps.apple.com/us/app/metamask/id1438144202",
|
|
113
|
+
mobile: "https://metamask.io/download",
|
|
114
|
+
qrCode: "https://metamask.io/download",
|
|
115
|
+
chrome: "https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",
|
|
116
|
+
edge: "https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",
|
|
117
|
+
firefox: "https://addons.mozilla.org/firefox/addon/ether-metamask",
|
|
118
|
+
opera: "https://addons.opera.com/extensions/details/metamask-10",
|
|
119
|
+
browserExtension: "https://metamask.io/download"
|
|
120
|
+
},
|
|
121
|
+
mobile: {
|
|
122
|
+
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
123
|
+
},
|
|
124
|
+
qrCode: shouldUseWalletConnect ? {
|
|
125
|
+
getUri,
|
|
126
|
+
instructions: {
|
|
127
|
+
learnMoreUrl: "https://metamask.io/faqs/",
|
|
128
|
+
steps: [
|
|
129
|
+
{
|
|
130
|
+
description: "wallet_connectors.metamask.qr_code.step1.description",
|
|
131
|
+
step: "install",
|
|
132
|
+
title: "wallet_connectors.metamask.qr_code.step1.title"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
description: "wallet_connectors.metamask.qr_code.step2.description",
|
|
136
|
+
step: "create",
|
|
137
|
+
title: "wallet_connectors.metamask.qr_code.step2.title"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
description: "wallet_connectors.metamask.qr_code.step3.description",
|
|
141
|
+
step: "refresh",
|
|
142
|
+
title: "wallet_connectors.metamask.qr_code.step3.title"
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
} : void 0,
|
|
147
|
+
extension: {
|
|
148
|
+
instructions: {
|
|
149
|
+
learnMoreUrl: "https://metamask.io/faqs/",
|
|
150
|
+
steps: [
|
|
151
|
+
{
|
|
152
|
+
description: "wallet_connectors.metamask.extension.step1.description",
|
|
153
|
+
step: "install",
|
|
154
|
+
title: "wallet_connectors.metamask.extension.step1.title"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
description: "wallet_connectors.metamask.extension.step2.description",
|
|
158
|
+
step: "create",
|
|
159
|
+
title: "wallet_connectors.metamask.extension.step2.title"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
description: "wallet_connectors.metamask.extension.step3.description",
|
|
163
|
+
step: "refresh",
|
|
164
|
+
title: "wallet_connectors.metamask.extension.step3.title"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
170
|
+
projectId,
|
|
171
|
+
walletConnectParameters
|
|
172
|
+
}) : getInjectedConnector({
|
|
173
|
+
target: typeof window !== "undefined" ? (_c = (_b = (_a = window.ethereum) == null ? void 0 : _a.providers) == null ? void 0 : _b.find(
|
|
174
|
+
isMetaMask
|
|
175
|
+
)) != null ? _c : window.ethereum : void 0
|
|
176
|
+
})
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export {
|
|
181
|
+
metaMaskWallet
|
|
182
|
+
};
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
isAndroid
|
|
4
4
|
} from "./chunk-ZOLACFTK.js";
|
|
5
|
-
import {
|
|
6
|
-
getWalletConnectConnector
|
|
7
|
-
} from "./chunk-ZDU3JFGR.js";
|
|
8
5
|
import {
|
|
9
6
|
getInjectedConnector,
|
|
10
7
|
hasInjectedProvider
|
|
11
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-F3VCNZXS.js";
|
|
9
|
+
import {
|
|
10
|
+
getWalletConnectConnector
|
|
11
|
+
} from "./chunk-ZDU3JFGR.js";
|
|
12
12
|
|
|
13
13
|
// src/wallets/walletConnectors/bitgetWallet/bitgetWallet.ts
|
|
14
14
|
var bitgetWallet = ({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-ZDU3JFGR.js";
|
|
5
2
|
import {
|
|
6
3
|
getInjectedConnector,
|
|
7
4
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-F3VCNZXS.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-ZDU3JFGR.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/subWallet/subWallet.ts
|
|
11
11
|
var subWallet = ({
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-F3VCNZXS.js";
|
|
6
|
+
import {
|
|
7
|
+
isAndroid
|
|
8
|
+
} from "./chunk-ZOLACFTK.js";
|
|
9
|
+
import {
|
|
10
|
+
getWalletConnectConnector
|
|
11
|
+
} from "./chunk-ZDU3JFGR.js";
|
|
12
|
+
|
|
13
|
+
// src/wallets/walletConnectors/okxWallet/okxWallet.ts
|
|
14
|
+
var okxWallet = ({
|
|
15
|
+
projectId,
|
|
16
|
+
walletConnectParameters
|
|
17
|
+
}) => {
|
|
18
|
+
const isOKXInjected = hasInjectedProvider({ namespace: "okxwallet" });
|
|
19
|
+
const shouldUseWalletConnect = !isOKXInjected;
|
|
20
|
+
return {
|
|
21
|
+
id: "okx",
|
|
22
|
+
name: "OKX Wallet",
|
|
23
|
+
rdns: "com.okex.wallet",
|
|
24
|
+
iconUrl: async () => (await import("./okxWallet-GKYMI2XW.js")).default,
|
|
25
|
+
iconAccent: "#000",
|
|
26
|
+
iconBackground: "#000",
|
|
27
|
+
downloadUrls: {
|
|
28
|
+
android: "https://play.google.com/store/apps/details?id=com.okinc.okex.gp",
|
|
29
|
+
ios: "https://itunes.apple.com/app/id1327268470?mt=8",
|
|
30
|
+
mobile: "https://okx.com/download",
|
|
31
|
+
qrCode: "https://okx.com/download",
|
|
32
|
+
chrome: "https://chrome.google.com/webstore/detail/okx-wallet/mcohilncbfahbmgdjkbpemcciiolgcge",
|
|
33
|
+
edge: "https://microsoftedge.microsoft.com/addons/detail/okx-wallet/pbpjkcldjiffchgbbndmhojiacbgflha",
|
|
34
|
+
firefox: "https://addons.mozilla.org/firefox/addon/okexwallet/",
|
|
35
|
+
browserExtension: "https://okx.com/download"
|
|
36
|
+
},
|
|
37
|
+
mobile: {
|
|
38
|
+
getUri: shouldUseWalletConnect ? (uri) => {
|
|
39
|
+
return isAndroid() ? uri : `okex://main/wc?uri=${encodeURIComponent(uri)}`;
|
|
40
|
+
} : void 0
|
|
41
|
+
},
|
|
42
|
+
qrCode: shouldUseWalletConnect ? {
|
|
43
|
+
getUri: (uri) => uri,
|
|
44
|
+
instructions: {
|
|
45
|
+
learnMoreUrl: "https://okx.com/web3/",
|
|
46
|
+
steps: [
|
|
47
|
+
{
|
|
48
|
+
description: "wallet_connectors.okx.qr_code.step1.description",
|
|
49
|
+
step: "install",
|
|
50
|
+
title: "wallet_connectors.okx.qr_code.step1.title"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
description: "wallet_connectors.okx.qr_code.step2.description",
|
|
54
|
+
step: "create",
|
|
55
|
+
title: "wallet_connectors.okx.qr_code.step2.title"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
description: "wallet_connectors.okx.qr_code.step3.description",
|
|
59
|
+
step: "scan",
|
|
60
|
+
title: "wallet_connectors.okx.qr_code.step3.title"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
} : void 0,
|
|
65
|
+
extension: {
|
|
66
|
+
instructions: {
|
|
67
|
+
learnMoreUrl: "https://okx.com/web3/",
|
|
68
|
+
steps: [
|
|
69
|
+
{
|
|
70
|
+
description: "wallet_connectors.okx.extension.step1.description",
|
|
71
|
+
step: "install",
|
|
72
|
+
title: "wallet_connectors.okx.extension.step1.title"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
description: "wallet_connectors.okx.extension.step2.description",
|
|
76
|
+
step: "create",
|
|
77
|
+
title: "wallet_connectors.okx.extension.step2.title"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
description: "wallet_connectors.okx.extension.step3.description",
|
|
81
|
+
step: "refresh",
|
|
82
|
+
title: "wallet_connectors.okx.extension.step3.title"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
88
|
+
projectId,
|
|
89
|
+
walletConnectParameters
|
|
90
|
+
}) : getInjectedConnector({ namespace: "okxwallet" })
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export {
|
|
95
|
+
okxWallet
|
|
96
|
+
};
|