@funkit/connect 0.1.7 → 0.1.8
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/dist/{chunk-X5YTL45L.js → chunk-KQXRSMJW.js} +1210 -1223
- package/dist/{chunk-VVHY6TFA.js → chunk-N5FOZIDQ.js} +1210 -1223
- package/dist/components/FunDivider/FunDivider.d.ts +3 -2
- package/dist/components/FunkitProvider/FunkitCheckoutContext.d.ts +1 -1
- package/dist/components/FunkitProvider/FunkitConfigContext.d.ts +9 -4
- package/dist/components/FunkitProvider/FunkitProvider.d.ts +3 -15
- package/dist/components/index.js +1 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.js +57 -113
- package/dist/wallets/walletConnectors/index.js +51 -51
- package/package.json +1 -1
- package/dist/components/ConnectModal/ConnectModalIntro.d.ts +0 -5
- package/dist/components/FunkitProvider/AppContext.d.ts +0 -25
- package/dist/components/FunkitProvider/ShowRecentTransactionsContext.d.ts +0 -2
- package/dist/wallets/walletConnectors/chunk-2T3BP5YM.js +0 -71
- package/dist/wallets/walletConnectors/chunk-3JTRMKJN.js +0 -71
- package/dist/wallets/walletConnectors/chunk-4AGSKVK4.js +0 -105
- package/dist/wallets/walletConnectors/chunk-4HP4HVWX.js +0 -112
- package/dist/wallets/walletConnectors/chunk-6GAD4OSN.js +0 -102
- package/dist/wallets/walletConnectors/chunk-7Q7X4HIR.js +0 -110
- package/dist/wallets/walletConnectors/chunk-CESIYSTD.js +0 -226
- package/dist/wallets/walletConnectors/chunk-DINSZSEC.js +0 -71
- package/dist/wallets/walletConnectors/chunk-MPVMJW2X.js +0 -113
- package/dist/wallets/walletConnectors/chunk-QVJQ2MU7.js +0 -117
- package/dist/wallets/walletConnectors/chunk-RAKDFYVF.js +0 -81
- package/dist/wallets/walletConnectors/chunk-T2DNUVKD.js +0 -114
- package/dist/wallets/walletConnectors/chunk-TM5A4D5D.js +0 -52
- package/dist/wallets/walletConnectors/chunk-VDUTD5UR.js +0 -84
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector,
|
|
4
|
-
getWalletConnectUri
|
|
5
|
-
} from "./chunk-4ACOCJJZ.js";
|
|
6
|
-
import {
|
|
7
|
-
isIOS
|
|
8
|
-
} from "./chunk-ZOLACFTK.js";
|
|
9
|
-
|
|
10
|
-
// src/wallets/walletConnectors/zerionWallet/zerionWallet.ts
|
|
11
|
-
import { InjectedConnector } from "wagmi/connectors/injected";
|
|
12
|
-
var zerionWallet = ({
|
|
13
|
-
chains,
|
|
14
|
-
projectId,
|
|
15
|
-
walletConnectOptions,
|
|
16
|
-
walletConnectVersion = "2",
|
|
17
|
-
...options
|
|
18
|
-
}) => {
|
|
19
|
-
const isZerionInjected = typeof window !== "undefined" && (typeof window.ethereum !== "undefined" && window.ethereum.isZerion || typeof window.zerionWallet !== "undefined");
|
|
20
|
-
const shouldUseWalletConnect = !isZerionInjected;
|
|
21
|
-
return {
|
|
22
|
-
id: "zerion",
|
|
23
|
-
name: "Zerion",
|
|
24
|
-
iconUrl: async () => (await import("./zerionWallet-35GMAYN4.js")).default,
|
|
25
|
-
iconAccent: "#2962ef",
|
|
26
|
-
iconBackground: "#2962ef",
|
|
27
|
-
installed: !shouldUseWalletConnect ? isZerionInjected : void 0,
|
|
28
|
-
downloadUrls: {
|
|
29
|
-
android: "https://play.google.com/store/apps/details?id=io.zerion.android",
|
|
30
|
-
ios: "https://apps.apple.com/app/apple-store/id1456732565",
|
|
31
|
-
mobile: "https://link.zerion.io/pt3gdRP0njb",
|
|
32
|
-
qrCode: "https://link.zerion.io/pt3gdRP0njb",
|
|
33
|
-
chrome: "https://chrome.google.com/webstore/detail/klghhnkeealcohjjanjjdaeeggmfmlpl",
|
|
34
|
-
browserExtension: "https://zerion.io/extension"
|
|
35
|
-
},
|
|
36
|
-
createConnector: () => {
|
|
37
|
-
const connector = shouldUseWalletConnect ? getWalletConnectConnector({
|
|
38
|
-
projectId,
|
|
39
|
-
chains,
|
|
40
|
-
version: walletConnectVersion,
|
|
41
|
-
options: walletConnectOptions
|
|
42
|
-
}) : new InjectedConnector({
|
|
43
|
-
chains,
|
|
44
|
-
options: {
|
|
45
|
-
getProvider: () => typeof window !== "undefined" ? window.zerionWallet || window.ethereum : void 0,
|
|
46
|
-
...options
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
const getUri = async () => {
|
|
50
|
-
const uri = await getWalletConnectUri(connector, walletConnectVersion);
|
|
51
|
-
return isIOS() ? `zerion://wc?uri=${encodeURIComponent(uri)}` : uri;
|
|
52
|
-
};
|
|
53
|
-
return {
|
|
54
|
-
connector,
|
|
55
|
-
mobile: {
|
|
56
|
-
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
57
|
-
},
|
|
58
|
-
qrCode: shouldUseWalletConnect ? {
|
|
59
|
-
getUri,
|
|
60
|
-
instructions: {
|
|
61
|
-
learnMoreUrl: "https://zerion.io/blog/announcing-the-zerion-smart-wallet/",
|
|
62
|
-
steps: [
|
|
63
|
-
{
|
|
64
|
-
description: "wallet_connectors.zerion.qr_code.step1.description",
|
|
65
|
-
step: "install",
|
|
66
|
-
title: "wallet_connectors.zerion.qr_code.step1.title"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
description: "wallet_connectors.zerion.qr_code.step2.description",
|
|
70
|
-
step: "create",
|
|
71
|
-
title: "wallet_connectors.zerion.qr_code.step2.title"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
description: "wallet_connectors.zerion.qr_code.step3.description",
|
|
75
|
-
step: "scan",
|
|
76
|
-
title: "wallet_connectors.zerion.qr_code.step3.title"
|
|
77
|
-
}
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
} : void 0,
|
|
81
|
-
extension: {
|
|
82
|
-
instructions: {
|
|
83
|
-
learnMoreUrl: "https://help.zerion.io/en/",
|
|
84
|
-
steps: [
|
|
85
|
-
{
|
|
86
|
-
description: "wallet_connectors.zerion.extension.step1.description",
|
|
87
|
-
step: "install",
|
|
88
|
-
title: "wallet_connectors.zerion.extension.step1.title"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
description: "wallet_connectors.zerion.extension.step2.description",
|
|
92
|
-
step: "create",
|
|
93
|
-
title: "wallet_connectors.zerion.extension.step2.title"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
description: "wallet_connectors.zerion.extension.step3.description",
|
|
97
|
-
step: "refresh",
|
|
98
|
-
title: "wallet_connectors.zerion.extension.step3.title"
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export {
|
|
109
|
-
zerionWallet
|
|
110
|
-
};
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector,
|
|
4
|
-
getWalletConnectUri
|
|
5
|
-
} from "./chunk-4ACOCJJZ.js";
|
|
6
|
-
import {
|
|
7
|
-
isAndroid,
|
|
8
|
-
isIOS
|
|
9
|
-
} from "./chunk-ZOLACFTK.js";
|
|
10
|
-
|
|
11
|
-
// src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts
|
|
12
|
-
import { MetaMaskConnector } from "wagmi/connectors/metaMask";
|
|
13
|
-
function isMetaMask(ethereum) {
|
|
14
|
-
if (!ethereum?.isMetaMask) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
if (ethereum.isBraveWallet && !ethereum._events && !ethereum._state) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
if (ethereum.isApexWallet) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
if (ethereum.isAvalanche) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
if (ethereum.isBackpack) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
if (ethereum.isBifrost) {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
if (ethereum.isBitKeep) {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
if (ethereum.isBitski) {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
if (ethereum.isBlockWallet) {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
if (ethereum.isCoinbaseWallet) {
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
if (ethereum.isDawn) {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
if (ethereum.isEnkrypt) {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
if (ethereum.isExodus) {
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
if (ethereum.isFrame) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
if (ethereum.isFrontier) {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
if (ethereum.isGamestop) {
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
if (ethereum.isHyperPay) {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
if (ethereum.isImToken) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
if (ethereum.isKuCoinWallet) {
|
|
69
|
-
return false;
|
|
70
|
-
}
|
|
71
|
-
if (ethereum.isMathWallet) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
if (ethereum.isOkxWallet || ethereum.isOKExWallet) {
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
if (ethereum.isOneInchIOSWallet || ethereum.isOneInchAndroidWallet) {
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
if (ethereum.isOpera) {
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
if (ethereum.isPhantom) {
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
if (ethereum.isPortal) {
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
if (ethereum.isRabby) {
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
if (ethereum.isRainbow) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
if (ethereum.isStatus) {
|
|
96
|
-
return false;
|
|
97
|
-
}
|
|
98
|
-
if (ethereum.isTalisman) {
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
if (ethereum.isTally) {
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
if (ethereum.isTokenPocket) {
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
if (ethereum.isTokenary) {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
if (ethereum.isTrust || ethereum.isTrustWallet) {
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
if (ethereum.isXDEFI) {
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
if (ethereum.isZeal) {
|
|
117
|
-
return false;
|
|
118
|
-
}
|
|
119
|
-
if (ethereum.isZerion) {
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
return true;
|
|
123
|
-
}
|
|
124
|
-
var metaMaskWallet = ({
|
|
125
|
-
chains,
|
|
126
|
-
projectId,
|
|
127
|
-
walletConnectOptions,
|
|
128
|
-
walletConnectVersion = "2",
|
|
129
|
-
...options
|
|
130
|
-
}) => {
|
|
131
|
-
const providers = typeof window !== "undefined" && window.ethereum?.providers;
|
|
132
|
-
const isMetaMaskInjected = typeof window !== "undefined" && typeof window.ethereum !== "undefined" && (window.ethereum.providers?.some(isMetaMask) || window.ethereum.isMetaMask);
|
|
133
|
-
const shouldUseWalletConnect = !isMetaMaskInjected;
|
|
134
|
-
return {
|
|
135
|
-
id: "metaMask",
|
|
136
|
-
name: "MetaMask",
|
|
137
|
-
iconUrl: async () => (await import("./metaMaskWallet-ORHUNQRP.js")).default,
|
|
138
|
-
iconAccent: "#f6851a",
|
|
139
|
-
iconBackground: "#fff",
|
|
140
|
-
installed: !shouldUseWalletConnect ? isMetaMaskInjected : void 0,
|
|
141
|
-
downloadUrls: {
|
|
142
|
-
android: "https://play.google.com/store/apps/details?id=io.metamask",
|
|
143
|
-
ios: "https://apps.apple.com/us/app/metamask/id1438144202",
|
|
144
|
-
mobile: "https://metamask.io/download",
|
|
145
|
-
qrCode: "https://metamask.io/download",
|
|
146
|
-
chrome: "https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",
|
|
147
|
-
edge: "https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",
|
|
148
|
-
firefox: "https://addons.mozilla.org/firefox/addon/ether-metamask",
|
|
149
|
-
opera: "https://addons.opera.com/extensions/details/metamask-10",
|
|
150
|
-
browserExtension: "https://metamask.io/download"
|
|
151
|
-
},
|
|
152
|
-
createConnector: () => {
|
|
153
|
-
const connector = shouldUseWalletConnect ? getWalletConnectConnector({
|
|
154
|
-
projectId,
|
|
155
|
-
chains,
|
|
156
|
-
version: walletConnectVersion,
|
|
157
|
-
options: walletConnectOptions
|
|
158
|
-
}) : new MetaMaskConnector({
|
|
159
|
-
chains,
|
|
160
|
-
options: {
|
|
161
|
-
getProvider: () => providers ? providers.find(isMetaMask) : typeof window !== "undefined" ? window.ethereum : void 0,
|
|
162
|
-
...options
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
const getUri = async () => {
|
|
166
|
-
const uri = await getWalletConnectUri(connector, walletConnectVersion);
|
|
167
|
-
return isAndroid() ? uri : isIOS() ? `metamask://wc?uri=${encodeURIComponent(uri)}` : `https://metamask.app.link/wc?uri=${encodeURIComponent(uri)}`;
|
|
168
|
-
};
|
|
169
|
-
return {
|
|
170
|
-
connector,
|
|
171
|
-
mobile: {
|
|
172
|
-
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
173
|
-
},
|
|
174
|
-
qrCode: shouldUseWalletConnect ? {
|
|
175
|
-
getUri,
|
|
176
|
-
instructions: {
|
|
177
|
-
learnMoreUrl: "https://metamask.io/faqs/",
|
|
178
|
-
steps: [
|
|
179
|
-
{
|
|
180
|
-
description: "wallet_connectors.metamask.qr_code.step1.description",
|
|
181
|
-
step: "install",
|
|
182
|
-
title: "wallet_connectors.metamask.qr_code.step1.title"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
description: "wallet_connectors.metamask.qr_code.step2.description",
|
|
186
|
-
step: "create",
|
|
187
|
-
title: "wallet_connectors.metamask.qr_code.step2.title"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
description: "wallet_connectors.metamask.qr_code.step3.description",
|
|
191
|
-
step: "refresh",
|
|
192
|
-
title: "wallet_connectors.metamask.qr_code.step3.title"
|
|
193
|
-
}
|
|
194
|
-
]
|
|
195
|
-
}
|
|
196
|
-
} : void 0,
|
|
197
|
-
extension: {
|
|
198
|
-
instructions: {
|
|
199
|
-
learnMoreUrl: "https://metamask.io/faqs/",
|
|
200
|
-
steps: [
|
|
201
|
-
{
|
|
202
|
-
description: "wallet_connectors.metamask.extension.step1.description",
|
|
203
|
-
step: "install",
|
|
204
|
-
title: "wallet_connectors.metamask.extension.step1.title"
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
description: "wallet_connectors.metamask.extension.step2.description",
|
|
208
|
-
step: "create",
|
|
209
|
-
title: "wallet_connectors.metamask.extension.step2.title"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
description: "wallet_connectors.metamask.extension.step3.description",
|
|
213
|
-
step: "refresh",
|
|
214
|
-
title: "wallet_connectors.metamask.extension.step3.title"
|
|
215
|
-
}
|
|
216
|
-
]
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
export {
|
|
225
|
-
metaMaskWallet
|
|
226
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector,
|
|
4
|
-
getWalletConnectUri
|
|
5
|
-
} from "./chunk-4ACOCJJZ.js";
|
|
6
|
-
import {
|
|
7
|
-
isAndroid
|
|
8
|
-
} from "./chunk-ZOLACFTK.js";
|
|
9
|
-
|
|
10
|
-
// src/wallets/walletConnectors/argentWallet/argentWallet.ts
|
|
11
|
-
var argentWallet = ({
|
|
12
|
-
chains,
|
|
13
|
-
projectId,
|
|
14
|
-
walletConnectOptions,
|
|
15
|
-
walletConnectVersion = "2"
|
|
16
|
-
}) => ({
|
|
17
|
-
id: "argent",
|
|
18
|
-
name: "Argent",
|
|
19
|
-
iconUrl: async () => (await import("./argentWallet-5OEFC7BD.js")).default,
|
|
20
|
-
iconBackground: "#fff",
|
|
21
|
-
downloadUrls: {
|
|
22
|
-
android: "https://play.google.com/store/apps/details?id=im.argent.contractwalletclient",
|
|
23
|
-
ios: "https://apps.apple.com/us/app/argent/id1358741926",
|
|
24
|
-
mobile: "https://argent.xyz/download-argent",
|
|
25
|
-
qrCode: "https://argent.link/app"
|
|
26
|
-
},
|
|
27
|
-
createConnector: () => {
|
|
28
|
-
const connector = getWalletConnectConnector({
|
|
29
|
-
projectId,
|
|
30
|
-
chains,
|
|
31
|
-
version: walletConnectVersion,
|
|
32
|
-
options: walletConnectOptions
|
|
33
|
-
});
|
|
34
|
-
return {
|
|
35
|
-
connector,
|
|
36
|
-
mobile: {
|
|
37
|
-
getUri: async () => {
|
|
38
|
-
const uri = await getWalletConnectUri(connector, walletConnectVersion);
|
|
39
|
-
return isAndroid() ? uri : `argent://app/wc?uri=${encodeURIComponent(uri)}`;
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
qrCode: {
|
|
43
|
-
getUri: async () => getWalletConnectUri(connector, walletConnectVersion),
|
|
44
|
-
instructions: {
|
|
45
|
-
learnMoreUrl: "https://argent.xyz/learn/what-is-a-crypto-wallet/",
|
|
46
|
-
steps: [
|
|
47
|
-
{
|
|
48
|
-
description: "wallet_connectors.argent.qr_code.step1.description",
|
|
49
|
-
step: "install",
|
|
50
|
-
title: "wallet_connectors.argent.qr_code.step1.title"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
description: "wallet_connectors.argent.qr_code.step2.description",
|
|
54
|
-
step: "create",
|
|
55
|
-
title: "wallet_connectors.argent.qr_code.step2.title"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
description: "wallet_connectors.argent.qr_code.step3.description",
|
|
59
|
-
step: "scan",
|
|
60
|
-
title: "wallet_connectors.argent.qr_code.step3.title"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
export {
|
|
70
|
-
argentWallet
|
|
71
|
-
};
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector,
|
|
4
|
-
getWalletConnectUri
|
|
5
|
-
} from "./chunk-4ACOCJJZ.js";
|
|
6
|
-
import {
|
|
7
|
-
isAndroid
|
|
8
|
-
} from "./chunk-ZOLACFTK.js";
|
|
9
|
-
|
|
10
|
-
// src/wallets/walletConnectors/okxWallet/okxWallet.ts
|
|
11
|
-
import { InjectedConnector } from "wagmi/connectors/injected";
|
|
12
|
-
var okxWallet = ({
|
|
13
|
-
chains,
|
|
14
|
-
projectId,
|
|
15
|
-
walletConnectOptions,
|
|
16
|
-
walletConnectVersion = "2",
|
|
17
|
-
...options
|
|
18
|
-
}) => {
|
|
19
|
-
const isOKXInjected = typeof window !== "undefined" && typeof window.okxwallet !== "undefined";
|
|
20
|
-
const shouldUseWalletConnect = !isOKXInjected;
|
|
21
|
-
return {
|
|
22
|
-
id: "okx",
|
|
23
|
-
name: "OKX 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
|
-
createConnector: () => {
|
|
38
|
-
const connector = shouldUseWalletConnect ? getWalletConnectConnector({
|
|
39
|
-
projectId,
|
|
40
|
-
chains,
|
|
41
|
-
version: walletConnectVersion,
|
|
42
|
-
options: walletConnectOptions
|
|
43
|
-
}) : new InjectedConnector({
|
|
44
|
-
chains,
|
|
45
|
-
options: {
|
|
46
|
-
getProvider: () => window.okxwallet,
|
|
47
|
-
...options
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
return {
|
|
51
|
-
connector,
|
|
52
|
-
mobile: {
|
|
53
|
-
getUri: shouldUseWalletConnect ? async () => {
|
|
54
|
-
const uri = await getWalletConnectUri(
|
|
55
|
-
connector,
|
|
56
|
-
walletConnectVersion
|
|
57
|
-
);
|
|
58
|
-
return isAndroid() ? uri : `okex://main/wc?uri=${encodeURIComponent(uri)}`;
|
|
59
|
-
} : void 0
|
|
60
|
-
},
|
|
61
|
-
qrCode: shouldUseWalletConnect ? {
|
|
62
|
-
getUri: async () => getWalletConnectUri(connector, walletConnectVersion),
|
|
63
|
-
instructions: {
|
|
64
|
-
learnMoreUrl: "https://okx.com/web3/",
|
|
65
|
-
steps: [
|
|
66
|
-
{
|
|
67
|
-
description: "wallet_connectors.okx.qr_code.step1.description",
|
|
68
|
-
step: "install",
|
|
69
|
-
title: "wallet_connectors.okx.qr_code.step1.title"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
description: "wallet_connectors.okx.qr_code.step2.description",
|
|
73
|
-
step: "create",
|
|
74
|
-
title: "wallet_connectors.okx.qr_code.step2.title"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
description: "wallet_connectors.okx.qr_code.step3.description",
|
|
78
|
-
step: "scan",
|
|
79
|
-
title: "wallet_connectors.okx.qr_code.step3.title"
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
} : void 0,
|
|
84
|
-
extension: {
|
|
85
|
-
instructions: {
|
|
86
|
-
learnMoreUrl: "https://okx.com/web3/",
|
|
87
|
-
steps: [
|
|
88
|
-
{
|
|
89
|
-
description: "wallet_connectors.okx.extension.step1.description",
|
|
90
|
-
step: "install",
|
|
91
|
-
title: "wallet_connectors.okx.extension.step1.title"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
description: "wallet_connectors.okx.extension.step2.description",
|
|
95
|
-
step: "create",
|
|
96
|
-
title: "wallet_connectors.okx.extension.step2.title"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
description: "wallet_connectors.okx.extension.step3.description",
|
|
100
|
-
step: "refresh",
|
|
101
|
-
title: "wallet_connectors.okx.extension.step3.title"
|
|
102
|
-
}
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export {
|
|
112
|
-
okxWallet
|
|
113
|
-
};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getWalletConnectConnector,
|
|
4
|
-
getWalletConnectUri
|
|
5
|
-
} from "./chunk-4ACOCJJZ.js";
|
|
6
|
-
import {
|
|
7
|
-
getInjectedConnector,
|
|
8
|
-
hasInjectedProvider
|
|
9
|
-
} from "./chunk-UZ5XLPAW.js";
|
|
10
|
-
import {
|
|
11
|
-
isMobile
|
|
12
|
-
} from "./chunk-ZOLACFTK.js";
|
|
13
|
-
|
|
14
|
-
// src/wallets/walletConnectors/trustWallet/trustWallet.ts
|
|
15
|
-
var trustWallet = ({
|
|
16
|
-
chains,
|
|
17
|
-
projectId,
|
|
18
|
-
walletConnectOptions,
|
|
19
|
-
walletConnectVersion = "2",
|
|
20
|
-
...options
|
|
21
|
-
}) => {
|
|
22
|
-
const isTrustWalletInjected = isMobile() ? hasInjectedProvider("isTrust") : hasInjectedProvider("isTrustWallet");
|
|
23
|
-
const shouldUseWalletConnect = !isTrustWalletInjected;
|
|
24
|
-
return {
|
|
25
|
-
id: "trust",
|
|
26
|
-
name: "Trust Wallet",
|
|
27
|
-
iconUrl: async () => (await import("./trustWallet-XIQD5AVI.js")).default,
|
|
28
|
-
installed: isTrustWalletInjected || void 0,
|
|
29
|
-
iconAccent: "#3375BB",
|
|
30
|
-
iconBackground: "#fff",
|
|
31
|
-
downloadUrls: {
|
|
32
|
-
android: "https://play.google.com/store/apps/details?id=com.wallet.crypto.trustapp",
|
|
33
|
-
ios: "https://apps.apple.com/us/app/trust-crypto-bitcoin-wallet/id1288339409",
|
|
34
|
-
mobile: "https://trustwallet.com/download",
|
|
35
|
-
qrCode: "https://trustwallet.com/download",
|
|
36
|
-
chrome: "https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph",
|
|
37
|
-
browserExtension: "https://trustwallet.com/browser-extension"
|
|
38
|
-
},
|
|
39
|
-
createConnector: () => {
|
|
40
|
-
const getUriMobile = async () => {
|
|
41
|
-
const uri = await getWalletConnectUri(connector, walletConnectVersion);
|
|
42
|
-
return `trust://wc?uri=${encodeURIComponent(uri)}`;
|
|
43
|
-
};
|
|
44
|
-
const getUriQR = async () => {
|
|
45
|
-
const uri = await getWalletConnectUri(connector, walletConnectVersion);
|
|
46
|
-
return uri;
|
|
47
|
-
};
|
|
48
|
-
const connector = shouldUseWalletConnect ? getWalletConnectConnector({
|
|
49
|
-
projectId,
|
|
50
|
-
chains,
|
|
51
|
-
version: walletConnectVersion,
|
|
52
|
-
options: walletConnectOptions
|
|
53
|
-
}) : isMobile() ? getInjectedConnector({ flag: "isTrust", chains, options }) : getInjectedConnector({ flag: "isTrustWallet", chains, options });
|
|
54
|
-
const mobileConnector = {
|
|
55
|
-
getUri: shouldUseWalletConnect ? getUriMobile : void 0
|
|
56
|
-
};
|
|
57
|
-
let qrConnector = void 0;
|
|
58
|
-
if (shouldUseWalletConnect) {
|
|
59
|
-
qrConnector = {
|
|
60
|
-
getUri: getUriQR,
|
|
61
|
-
instructions: {
|
|
62
|
-
learnMoreUrl: "https://trustwallet.com/",
|
|
63
|
-
steps: [
|
|
64
|
-
{
|
|
65
|
-
description: "wallet_connectors.trust.qr_code.step1.description",
|
|
66
|
-
step: "install",
|
|
67
|
-
title: "wallet_connectors.trust.qr_code.step1.title"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
description: "wallet_connectors.trust.qr_code.step2.description",
|
|
71
|
-
step: "create",
|
|
72
|
-
title: "wallet_connectors.trust.qr_code.step2.title"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
description: "wallet_connectors.trust.qr_code.step3.description",
|
|
76
|
-
step: "scan",
|
|
77
|
-
title: "wallet_connectors.trust.qr_code.step3.title"
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
const extensionConnector = {
|
|
84
|
-
instructions: {
|
|
85
|
-
learnMoreUrl: "https://trustwallet.com/browser-extension",
|
|
86
|
-
steps: [
|
|
87
|
-
{
|
|
88
|
-
description: "wallet_connectors.trust.extension.step1.description",
|
|
89
|
-
step: "install",
|
|
90
|
-
title: "wallet_connectors.trust.extension.step1.title"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
description: "wallet_connectors.trust.extension.step2.description",
|
|
94
|
-
step: "create",
|
|
95
|
-
title: "wallet_connectors.trust.extension.step2.title"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
description: "wallet_connectors.trust.extension.step3.description",
|
|
99
|
-
step: "refresh",
|
|
100
|
-
title: "wallet_connectors.trust.extension.step3.title"
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
return {
|
|
106
|
-
connector,
|
|
107
|
-
mobile: mobileConnector,
|
|
108
|
-
qrCode: qrConnector,
|
|
109
|
-
extension: extensionConnector
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
export {
|
|
116
|
-
trustWallet
|
|
117
|
-
};
|