@talken/talkenkit 2.7.5-beta.1 → 2.7.5-beta.2

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 (111) hide show
  1. package/dist/abcWallet-HKEIJA6T.js +172 -0
  2. package/dist/chunk-CGSOMXYJ.js +5757 -0
  3. package/dist/index.d.ts +2 -2
  4. package/dist/index.js +874 -792
  5. package/dist/providers/SignConfirmationProvider/SuppressSignConfirmation.d.ts +11 -0
  6. package/dist/providers/SignConfirmationProvider/index.d.ts +1 -0
  7. package/dist/providers/TransactionResultProvider/SuppressTransactionResult.d.ts +11 -0
  8. package/dist/providers/TransactionResultProvider/index.d.ts +1 -0
  9. package/dist/providers/TransactionResultProvider/types.d.ts +1 -0
  10. package/dist/wallets/walletConnectors/abcWallet/AbcEvmAutoConnector.js +1 -1
  11. package/dist/wallets/walletConnectors/abcWallet/AbstractChainProvider.d.ts +9 -0
  12. package/dist/wallets/walletConnectors/abcWallet/AbstractChainProvider.js +2 -2
  13. package/dist/wallets/walletConnectors/abcWallet/abcBitcoinConnector.js +2 -2
  14. package/dist/wallets/walletConnectors/abcWallet/abcBitcoinProvider.js +3 -3
  15. package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +13 -13
  16. package/dist/wallets/walletConnectors/abcWallet/abcProvider.js +7 -7
  17. package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.js +9 -9
  18. package/dist/wallets/walletConnectors/abcWallet/abcTronProvider.js +3 -3
  19. package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +14 -14
  20. package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.js +6 -6
  21. package/dist/wallets/walletConnectors/abcWallet/api/index.js +6 -6
  22. package/dist/wallets/walletConnectors/abcWallet/api/modules/auth.js +1 -1
  23. package/dist/wallets/walletConnectors/abcWallet/api/modules/bitcoin.d.ts +1 -1
  24. package/dist/wallets/walletConnectors/abcWallet/index.js +45 -45
  25. package/dist/wallets/walletConnectors/abcWallet/types/api.types.d.ts +10 -10
  26. package/dist/wallets/walletConnectors/abcWallet/types.js +1 -1
  27. package/dist/wallets/walletConnectors/abcWallet/utils.js +1 -1
  28. package/dist/wallets/walletConnectors/abcWallet/walletGeneration.js +4 -4
  29. package/dist/wallets/walletConnectors/berasigWallet/berasigWallet.js +2 -2
  30. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  31. package/dist/wallets/walletConnectors/binanceWallet/binanceWallet.js +2 -2
  32. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  33. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  34. package/dist/wallets/walletConnectors/chunk-25VIZXJZ.js +341 -0
  35. package/dist/wallets/walletConnectors/chunk-26URNKLZ.js +341 -0
  36. package/dist/wallets/walletConnectors/chunk-2H2JI5BJ.js +108 -0
  37. package/dist/wallets/walletConnectors/chunk-3QC567QK.js +94 -0
  38. package/dist/wallets/walletConnectors/chunk-4K2V7RCL.js +96 -0
  39. package/dist/wallets/walletConnectors/chunk-4QNRNDMZ.js +378 -0
  40. package/dist/wallets/walletConnectors/chunk-4V3HRM2R.js +95 -0
  41. package/dist/wallets/walletConnectors/chunk-5QYCHHVB.js +98 -0
  42. package/dist/wallets/walletConnectors/chunk-6P3FYHAH.js +108 -0
  43. package/dist/wallets/walletConnectors/chunk-76M232IF.js +101 -0
  44. package/dist/wallets/walletConnectors/chunk-7IBMHOYD.js +102 -0
  45. package/dist/wallets/walletConnectors/chunk-ACGSFRMZ.js +73 -0
  46. package/dist/wallets/walletConnectors/chunk-BZPKBSWY.js +66 -0
  47. package/dist/wallets/walletConnectors/chunk-CHEPDEJ2.js +73 -0
  48. package/dist/wallets/walletConnectors/chunk-CMETID7A.js +1463 -0
  49. package/dist/wallets/walletConnectors/chunk-DDRPEB2X.js +366 -0
  50. package/dist/wallets/walletConnectors/chunk-DHWJ3552.js +93 -0
  51. package/dist/wallets/walletConnectors/chunk-DPVILLWF.js +492 -0
  52. package/dist/wallets/walletConnectors/chunk-EJALZNAR.js +101 -0
  53. package/dist/wallets/walletConnectors/chunk-FVA6H2VF.js +95 -0
  54. package/dist/wallets/walletConnectors/chunk-G7QF44XS.js +378 -0
  55. package/dist/wallets/walletConnectors/chunk-GCHYGJNO.js +131 -0
  56. package/dist/wallets/walletConnectors/chunk-GNF5CHDQ.js +102 -0
  57. package/dist/wallets/walletConnectors/chunk-GZPGNUNF.js +94 -0
  58. package/dist/wallets/walletConnectors/chunk-HALTGRQW.js +87 -0
  59. package/dist/wallets/walletConnectors/chunk-I2LB6GVH.js +341 -0
  60. package/dist/wallets/walletConnectors/chunk-JL3QLDZK.js +186 -0
  61. package/dist/wallets/walletConnectors/chunk-KLCVXROA.js +71 -0
  62. package/dist/wallets/walletConnectors/chunk-KNNHGFKJ.js +98 -0
  63. package/dist/wallets/walletConnectors/chunk-KQDFRZT4.js +65 -0
  64. package/dist/wallets/walletConnectors/chunk-LKNK2KKU.js +76 -0
  65. package/dist/wallets/walletConnectors/chunk-LLOSDVCH.js +58 -0
  66. package/dist/wallets/walletConnectors/chunk-MQ57XDYK.js +340 -0
  67. package/dist/wallets/walletConnectors/chunk-MUAOEA3O.js +103 -0
  68. package/dist/wallets/walletConnectors/chunk-MVZX47XV.js +366 -0
  69. package/dist/wallets/walletConnectors/chunk-MWHKTQPO.js +71 -0
  70. package/dist/wallets/walletConnectors/chunk-MYQPTETH.js +186 -0
  71. package/dist/wallets/walletConnectors/chunk-NP7RQXKC.js +94 -0
  72. package/dist/wallets/walletConnectors/chunk-OKTFRDOV.js +340 -0
  73. package/dist/wallets/walletConnectors/chunk-PXL5G2PM.js +96 -0
  74. package/dist/wallets/walletConnectors/chunk-QB3QLNSL.js +76 -0
  75. package/dist/wallets/walletConnectors/chunk-QCM7BJYI.js +366 -0
  76. package/dist/wallets/walletConnectors/chunk-QRU6XFHH.js +110 -0
  77. package/dist/wallets/walletConnectors/chunk-RIN5NUVA.js +1463 -0
  78. package/dist/wallets/walletConnectors/chunk-RM3S3BY3.js +58 -0
  79. package/dist/wallets/walletConnectors/chunk-S5XGT2XC.js +131 -0
  80. package/dist/wallets/walletConnectors/chunk-SJ7H7FJB.js +58 -0
  81. package/dist/wallets/walletConnectors/chunk-TA4DDCKN.js +96 -0
  82. package/dist/wallets/walletConnectors/chunk-TWVKSPTP.js +91 -0
  83. package/dist/wallets/walletConnectors/chunk-U5UPCM5V.js +66 -0
  84. package/dist/wallets/walletConnectors/chunk-UZAUWE5E.js +27 -0
  85. package/dist/wallets/walletConnectors/chunk-V2C47DTB.js +66 -0
  86. package/dist/wallets/walletConnectors/chunk-XFUNA24R.js +195 -0
  87. package/dist/wallets/walletConnectors/chunk-XS6GJRRA.js +98 -0
  88. package/dist/wallets/walletConnectors/chunk-XSJUQHR7.js +95 -0
  89. package/dist/wallets/walletConnectors/chunk-XSX5EECZ.js +96 -0
  90. package/dist/wallets/walletConnectors/chunk-YJ5RF7V4.js +492 -0
  91. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  92. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  93. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  94. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  95. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  96. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  97. package/dist/wallets/walletConnectors/index.js +87 -87
  98. package/dist/wallets/walletConnectors/iopayWallet/iopayWallet.js +2 -2
  99. package/dist/wallets/walletConnectors/kaiaWallet/kaiaWallet.js +2 -2
  100. package/dist/wallets/walletConnectors/kaikasWallet/kaikasWallet.js +2 -2
  101. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  102. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  103. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  104. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  105. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  106. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  107. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  108. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  109. package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +2 -2
  110. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  111. package/package.json +2 -2
@@ -0,0 +1,341 @@
1
+ "use client";
2
+ import {
3
+ resolveTalkenApiUrl
4
+ } from "./chunk-GFWUFYT2.js";
5
+ import {
6
+ setGlobalDefaultBitcoinNetwork,
7
+ setGlobalDefaultChainId,
8
+ setGlobalDefaultSolanaNetwork
9
+ } from "./chunk-O4AU63LK.js";
10
+ import {
11
+ createAbcEvmProvider
12
+ } from "./chunk-CMETID7A.js";
13
+ import {
14
+ clearAuthState,
15
+ clearStorage,
16
+ loadAuthState,
17
+ loadFromStorage,
18
+ saveAuthState
19
+ } from "./chunk-MEKVFRPV.js";
20
+ import {
21
+ createTalkenApiClient
22
+ } from "./chunk-QCM7BJYI.js";
23
+ import {
24
+ setTalkenApiClient
25
+ } from "./chunk-R6ZE7JAZ.js";
26
+ import {
27
+ createLogger
28
+ } from "./chunk-762I67R6.js";
29
+ import {
30
+ getCredentialManager
31
+ } from "./chunk-P6KWAOFF.js";
32
+ import {
33
+ STORAGE_NS,
34
+ get,
35
+ remove
36
+ } from "./chunk-GZSL7NIQ.js";
37
+ import {
38
+ loadTgAccessKey
39
+ } from "./chunk-6KRX73ED.js";
40
+
41
+ // src/wallets/walletConnectors/abcWallet/abcConnector.ts
42
+ import { getTalkenApiClient } from "@talken/talkenkit";
43
+ import { createConnector } from "wagmi";
44
+ var logger = createLogger("AbcConnector");
45
+ function abcConnector(options) {
46
+ const { config } = options;
47
+ if (config.defaultChainId) {
48
+ setGlobalDefaultChainId(config.defaultChainId);
49
+ }
50
+ if (config.defaultSolanaNetwork) {
51
+ setGlobalDefaultSolanaNetwork(config.defaultSolanaNetwork);
52
+ }
53
+ if (config.defaultBitcoinNetwork) {
54
+ setGlobalDefaultBitcoinNetwork(config.defaultBitcoinNetwork);
55
+ }
56
+ return createConnector((wagmiConfig) => {
57
+ const talkenApi = getTalkenApiClient() || createTalkenApiClient({
58
+ baseUrl: resolveTalkenApiUrl(config.talkenApiUrl),
59
+ environment: config.environment,
60
+ debug: config.environment === "development",
61
+ defaultChainId: config.defaultChainId
62
+ });
63
+ setTalkenApiClient(talkenApi);
64
+ const storedAccessKey = get(STORAGE_NS.API, "access_key_raw");
65
+ const effectiveAccessKey = config.accessKey || storedAccessKey;
66
+ const isAccessKeyMode = !!effectiveAccessKey;
67
+ if (isAccessKeyMode && effectiveAccessKey) {
68
+ talkenApi.setAccessKey(effectiveAccessKey);
69
+ }
70
+ const provider = createAbcEvmProvider(talkenApi);
71
+ let accountsChangedHandler;
72
+ let chainChangedHandler;
73
+ let disconnectHandler;
74
+ return {
75
+ id: "abc",
76
+ name: "ABC Wallet",
77
+ type: "abc",
78
+ /**
79
+ * Connect wallet
80
+ */
81
+ async connect() {
82
+ try {
83
+ const authState = loadAuthState();
84
+ if (!authState || !authState.isAuthenticated || !authState.wallet) {
85
+ throw new Error("ABC_LOGIN_REQUIRED");
86
+ }
87
+ if (isAccessKeyMode) {
88
+ const w = authState.wallet;
89
+ provider.setWallet({
90
+ address: w.address,
91
+ chainId: w.chainId || config.defaultChainId || 1,
92
+ uid: w.uid || "",
93
+ sessionId: w.sessionId || w.sid || "",
94
+ keyId: w.keyId || "",
95
+ encryptedShare: w.encryptedShare || "",
96
+ sid: w.sessionId || w.sid || "",
97
+ type: "evm",
98
+ email: w.email || authState.user?.email || ""
99
+ });
100
+ } else {
101
+ provider.setWallet(authState.wallet);
102
+ if (authState.accessToken && authState.refreshToken && authState.expiresAt) {
103
+ talkenApi.setTokens(
104
+ authState.accessToken,
105
+ authState.refreshToken,
106
+ authState.expiresAt
107
+ );
108
+ }
109
+ }
110
+ const accounts = await provider.request({
111
+ method: "eth_requestAccounts"
112
+ });
113
+ let currentChainId = await provider.request({
114
+ method: "eth_chainId"
115
+ });
116
+ const currentChainIdNumber = Number(currentChainId);
117
+ const isChainSupported = wagmiConfig.chains.some(
118
+ (c) => c.id === currentChainIdNumber
119
+ );
120
+ if (!isChainSupported && wagmiConfig.chains.length > 0) {
121
+ const fallbackChainId = wagmiConfig.chains[0].id;
122
+ await provider.request({
123
+ method: "wallet_switchEthereumChain",
124
+ params: [{ chainId: `0x${fallbackChainId.toString(16)}` }]
125
+ });
126
+ currentChainId = `0x${fallbackChainId.toString(16)}`;
127
+ if (authState.wallet) {
128
+ authState.wallet.chainId = fallbackChainId;
129
+ saveAuthState(authState);
130
+ }
131
+ }
132
+ if (accountsChangedHandler) {
133
+ provider.removeListener("accountsChanged", accountsChangedHandler);
134
+ }
135
+ accountsChangedHandler = (accounts2) => {
136
+ wagmiConfig.emitter.emit("change", {
137
+ accounts: accounts2
138
+ });
139
+ };
140
+ provider.on("accountsChanged", accountsChangedHandler);
141
+ if (chainChangedHandler) {
142
+ provider.removeListener("chainChanged", chainChangedHandler);
143
+ }
144
+ chainChangedHandler = (chainId) => {
145
+ wagmiConfig.emitter.emit("change", {
146
+ chainId: Number(chainId)
147
+ });
148
+ };
149
+ provider.on("chainChanged", chainChangedHandler);
150
+ if (disconnectHandler) {
151
+ provider.removeListener("disconnect", disconnectHandler);
152
+ }
153
+ disconnectHandler = () => {
154
+ wagmiConfig.emitter.emit("disconnect");
155
+ this.onDisconnect();
156
+ };
157
+ provider.on("disconnect", disconnectHandler);
158
+ wagmiConfig.emitter.emit("connect", {
159
+ accounts,
160
+ chainId: Number(currentChainId)
161
+ });
162
+ return {
163
+ accounts,
164
+ chainId: Number(currentChainId)
165
+ };
166
+ } catch (error) {
167
+ logger.error("connect() failed:", {
168
+ message: error.message,
169
+ code: error.code,
170
+ error
171
+ });
172
+ if (error.message === "ABC_LOGIN_REQUIRED") {
173
+ throw error;
174
+ }
175
+ throw error;
176
+ }
177
+ },
178
+ /**
179
+ * Disconnect wallet
180
+ */
181
+ async disconnect() {
182
+ if (accountsChangedHandler) {
183
+ provider.removeListener("accountsChanged", accountsChangedHandler);
184
+ accountsChangedHandler = void 0;
185
+ }
186
+ if (chainChangedHandler) {
187
+ provider.removeListener("chainChanged", chainChangedHandler);
188
+ chainChangedHandler = void 0;
189
+ }
190
+ if (disconnectHandler) {
191
+ provider.removeListener("disconnect", disconnectHandler);
192
+ disconnectHandler = void 0;
193
+ }
194
+ provider.clearWallet();
195
+ talkenApi.auth.logout();
196
+ remove(STORAGE_NS.API, "access_key_raw");
197
+ clearAuthState();
198
+ getCredentialManager().clear();
199
+ },
200
+ /**
201
+ * Get accounts
202
+ */
203
+ async getAccounts() {
204
+ const accounts = await provider.request({
205
+ method: "eth_accounts"
206
+ });
207
+ return accounts.map((account) => account);
208
+ },
209
+ /**
210
+ * Get chain ID
211
+ */
212
+ async getChainId() {
213
+ const chainId = await provider.request({
214
+ method: "eth_chainId"
215
+ });
216
+ return Number(chainId);
217
+ },
218
+ /**
219
+ * Get provider
220
+ */
221
+ async getProvider() {
222
+ return provider;
223
+ },
224
+ /**
225
+ * Check if authorized (has valid session)
226
+ * Auto-refreshes access token if expired but refresh token is valid
227
+ */
228
+ async isAuthorized() {
229
+ try {
230
+ if (isAccessKeyMode) {
231
+ if (provider.isConnected())
232
+ return true;
233
+ const hasKey = !!effectiveAccessKey || !!get(STORAGE_NS.API, "access_key_raw") || !!loadTgAccessKey();
234
+ const authState2 = loadAuthState();
235
+ return hasKey && !!authState2?.wallet?.address;
236
+ }
237
+ const authState = loadAuthState();
238
+ if (!authState || !authState.isAuthenticated) {
239
+ return false;
240
+ }
241
+ if (!authState.wallet) {
242
+ return false;
243
+ }
244
+ if (talkenApi.isAuthenticated()) {
245
+ return true;
246
+ }
247
+ if (talkenApi.isAccessKeyMode()) {
248
+ return true;
249
+ }
250
+ const refreshToken = loadFromStorage(
251
+ "refresh_token" /* REFRESH_TOKEN */
252
+ );
253
+ if (!refreshToken) {
254
+ clearStorage();
255
+ return false;
256
+ }
257
+ try {
258
+ const api = getTalkenApiClient();
259
+ if (!api) {
260
+ clearStorage();
261
+ return false;
262
+ }
263
+ const res = await api.auth.refresh();
264
+ talkenApi.setTokens(
265
+ res.accessToken,
266
+ res.refreshToken,
267
+ Date.now() + res.expiresIn * 1e3
268
+ );
269
+ const updatedState = loadAuthState();
270
+ return updatedState?.isAuthenticated ?? false;
271
+ } catch (error) {
272
+ logger.error("Token refresh failed:", error);
273
+ clearStorage();
274
+ return false;
275
+ }
276
+ } catch (error) {
277
+ logger.error("Unexpected error in isAuthorized:", error);
278
+ return false;
279
+ }
280
+ },
281
+ /**
282
+ * Switch chain
283
+ */
284
+ async switchChain({ chainId }) {
285
+ await provider.request({
286
+ method: "wallet_switchEthereumChain",
287
+ params: [{ chainId: `0x${chainId.toString(16)}` }]
288
+ });
289
+ const newChainId = await this.getChainId();
290
+ const authState = loadAuthState();
291
+ if (authState?.wallet) {
292
+ authState.wallet.chainId = newChainId;
293
+ saveAuthState(authState);
294
+ }
295
+ return wagmiConfig.chains.find((x) => x.id === chainId) ?? {
296
+ id: chainId,
297
+ name: `Chain ${chainId}`,
298
+ nativeCurrency: {
299
+ name: "Ether",
300
+ decimals: 18,
301
+ symbol: "ETH"
302
+ },
303
+ rpcUrls: {
304
+ default: { http: [""] }
305
+ }
306
+ };
307
+ },
308
+ /**
309
+ * Handle accounts changed
310
+ */
311
+ onAccountsChanged(accounts) {
312
+ if (accounts.length === 0) {
313
+ this.onDisconnect();
314
+ } else {
315
+ wagmiConfig.emitter.emit("change", {
316
+ accounts
317
+ });
318
+ }
319
+ },
320
+ /**
321
+ * Handle chain changed
322
+ */
323
+ onChainChanged(chain) {
324
+ const chainId = Number(chain);
325
+ wagmiConfig.emitter.emit("change", { chainId });
326
+ },
327
+ /**
328
+ * Handle disconnect
329
+ */
330
+ onDisconnect(_error) {
331
+ provider.clearWallet();
332
+ clearAuthState();
333
+ wagmiConfig.emitter.emit("disconnect");
334
+ }
335
+ };
336
+ });
337
+ }
338
+
339
+ export {
340
+ abcConnector
341
+ };
@@ -0,0 +1,108 @@
1
+ "use client";
2
+ import {
3
+ isMobile
4
+ } from "./chunk-RETKWSKD.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-PONHGUSY.js";
9
+ import {
10
+ getWalletConnectConnector
11
+ } from "./chunk-PODFK4OS.js";
12
+
13
+ // src/wallets/walletConnectors/trustWallet/trustWallet.ts
14
+ var trustWallet = ({
15
+ projectId,
16
+ walletConnectParameters
17
+ }) => {
18
+ const isTrustWalletInjected = isMobile() ? hasInjectedProvider({ flag: "isTrust" }) : hasInjectedProvider({ flag: "isTrustWallet" });
19
+ const shouldUseWalletConnect = !isTrustWalletInjected;
20
+ const getUriMobile = (uri) => {
21
+ return `trust://wc?uri=${encodeURIComponent(uri)}`;
22
+ };
23
+ const getUriQR = (uri) => {
24
+ return uri;
25
+ };
26
+ const mobileConnector = {
27
+ getUri: shouldUseWalletConnect ? getUriMobile : void 0
28
+ };
29
+ let qrConnector = void 0;
30
+ if (shouldUseWalletConnect) {
31
+ qrConnector = {
32
+ getUri: getUriQR,
33
+ instructions: {
34
+ learnMoreUrl: "https://trustwallet.com/",
35
+ steps: [
36
+ {
37
+ description: "wallet_connectors.trust.qr_code.step1.description",
38
+ step: "install",
39
+ title: "wallet_connectors.trust.qr_code.step1.title"
40
+ },
41
+ {
42
+ description: "wallet_connectors.trust.qr_code.step2.description",
43
+ step: "create",
44
+ title: "wallet_connectors.trust.qr_code.step2.title"
45
+ },
46
+ {
47
+ description: "wallet_connectors.trust.qr_code.step3.description",
48
+ step: "scan",
49
+ title: "wallet_connectors.trust.qr_code.step3.title"
50
+ }
51
+ ]
52
+ }
53
+ };
54
+ }
55
+ const extensionConnector = {
56
+ instructions: {
57
+ learnMoreUrl: "https://trustwallet.com/browser-extension",
58
+ steps: [
59
+ {
60
+ description: "wallet_connectors.trust.extension.step1.description",
61
+ step: "install",
62
+ title: "wallet_connectors.trust.extension.step1.title"
63
+ },
64
+ {
65
+ description: "wallet_connectors.trust.extension.step2.description",
66
+ step: "create",
67
+ title: "wallet_connectors.trust.extension.step2.title"
68
+ },
69
+ {
70
+ description: "wallet_connectors.trust.extension.step3.description",
71
+ step: "refresh",
72
+ title: "wallet_connectors.trust.extension.step3.title"
73
+ }
74
+ ]
75
+ }
76
+ };
77
+ return {
78
+ id: "trust",
79
+ name: "Trust Wallet",
80
+ rdns: "com.trustwallet.app",
81
+ iconUrl: async () => (await import("./trustWallet-NRSE43DO.js")).default,
82
+ // Note that we never resolve `installed` to `false` because the
83
+ // Trust Wallet provider falls back to other connection methods if
84
+ // the injected connector isn't available
85
+ installed: isTrustWalletInjected || void 0,
86
+ iconAccent: "#3375BB",
87
+ iconBackground: "#fff",
88
+ downloadUrls: {
89
+ android: "https://play.google.com/store/apps/details?id=com.wallet.crypto.trustapp",
90
+ ios: "https://apps.apple.com/us/app/trust-crypto-bitcoin-wallet/id1288339409",
91
+ mobile: "https://trustwallet.com/download",
92
+ qrCode: "https://trustwallet.com/download",
93
+ chrome: "https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph",
94
+ browserExtension: "https://trustwallet.com/browser-extension"
95
+ },
96
+ mobile: mobileConnector,
97
+ qrCode: qrConnector,
98
+ extension: extensionConnector,
99
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
100
+ projectId,
101
+ walletConnectParameters
102
+ }) : isMobile() ? getInjectedConnector({ flag: "isTrust" }) : getInjectedConnector({ flag: "isTrustWallet" })
103
+ };
104
+ };
105
+
106
+ export {
107
+ trustWallet
108
+ };
@@ -0,0 +1,94 @@
1
+ "use client";
2
+ import {
3
+ isAndroid
4
+ } from "./chunk-RETKWSKD.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-PONHGUSY.js";
9
+ import {
10
+ getWalletConnectConnector
11
+ } from "./chunk-PODFK4OS.js";
12
+
13
+ // src/wallets/walletConnectors/gateWallet/gateWallet.ts
14
+ var gateWallet = ({
15
+ projectId,
16
+ walletConnectParameters
17
+ }) => {
18
+ const isGateInjected = hasInjectedProvider({ namespace: "gatewallet" });
19
+ const shouldUseWalletConnect = !isGateInjected;
20
+ return {
21
+ id: "gate",
22
+ name: "Gate Wallet",
23
+ rdns: "io.gate.wallet",
24
+ iconUrl: async () => (await import("./gateWallet-ZVEZILRP.js")).default,
25
+ iconAccent: "#fff",
26
+ iconBackground: "#fff",
27
+ downloadUrls: {
28
+ android: "https://play.google.com/store/apps/details?id=com.gateio.gateio",
29
+ ios: "https://apps.apple.com/us/app/gate-io-buy-bitcoin-crypto/id1294998195",
30
+ mobile: "https://www.gate.io/mobileapp",
31
+ qrCode: "https://www.gate.io/web3",
32
+ chrome: "https://chromewebstore.google.com/detail/gate-wallet/cpmkedoipcpimgecpmgpldfpohjplkpp",
33
+ browserExtension: "https://www.gate.io/web3"
34
+ },
35
+ mobile: {
36
+ getUri: shouldUseWalletConnect ? (uri) => {
37
+ return isAndroid() ? uri : `gtweb3wallet://wc?uri=${encodeURIComponent(uri)}`;
38
+ } : void 0
39
+ },
40
+ qrCode: shouldUseWalletConnect ? {
41
+ getUri: (uri) => uri,
42
+ instructions: {
43
+ learnMoreUrl: "https://www.gate.io/learn",
44
+ steps: [
45
+ {
46
+ description: "wallet_connectors.gate.qr_code.step1.description",
47
+ step: "install",
48
+ title: "wallet_connectors.gate.qr_code.step1.title"
49
+ },
50
+ {
51
+ description: "wallet_connectors.gate.qr_code.step2.description",
52
+ step: "create",
53
+ title: "wallet_connectors.gate.qr_code.step2.title"
54
+ },
55
+ {
56
+ description: "wallet_connectors.gate.qr_code.step3.description",
57
+ step: "scan",
58
+ title: "wallet_connectors.gate.qr_code.step3.title"
59
+ }
60
+ ]
61
+ }
62
+ } : void 0,
63
+ extension: {
64
+ instructions: {
65
+ learnMoreUrl: "https://www.gate.io/learn",
66
+ steps: [
67
+ {
68
+ description: "wallet_connectors.gate.extension.step1.description",
69
+ step: "install",
70
+ title: "wallet_connectors.gate.extension.step1.title"
71
+ },
72
+ {
73
+ description: "wallet_connectors.gate.extension.step2.description",
74
+ step: "create",
75
+ title: "wallet_connectors.gate.extension.step2.title"
76
+ },
77
+ {
78
+ description: "wallet_connectors.gate.extension.step3.description",
79
+ step: "refresh",
80
+ title: "wallet_connectors.gate.extension.step3.title"
81
+ }
82
+ ]
83
+ }
84
+ },
85
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
86
+ projectId,
87
+ walletConnectParameters
88
+ }) : getInjectedConnector({ namespace: "gatewallet" })
89
+ };
90
+ };
91
+
92
+ export {
93
+ gateWallet
94
+ };
@@ -0,0 +1,96 @@
1
+ "use client";
2
+ import {
3
+ getInjectedConnector,
4
+ hasInjectedProvider
5
+ } from "./chunk-PONHGUSY.js";
6
+ import {
7
+ isAndroid
8
+ } from "./chunk-RETKWSKD.js";
9
+ import {
10
+ getWalletConnectConnector
11
+ } from "./chunk-PODFK4OS.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-GJMKZIND.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
+ };