@talken/talkenkit 2.4.4 → 2.4.6
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/Arc-YV22FANA.js +8 -0
- package/dist/Brave-VWDHFYI5.js +8 -0
- package/dist/Browser-2ZOVSFMK.js +8 -0
- package/dist/Chrome-VL7CYHGL.js +8 -0
- package/dist/Edge-6GQGEL5X.js +8 -0
- package/dist/Firefox-SY6PCZK3.js +8 -0
- package/dist/Linux-OP3H6PHU.js +8 -0
- package/dist/Macos-ZENZDYKP.js +8 -0
- package/dist/Opera-H2VDEHSS.js +8 -0
- package/dist/Safari-5BYQNFM3.js +8 -0
- package/dist/Windows-PHGTMIC7.js +8 -0
- package/dist/abcWallet-3CKLCZZC.js +184 -0
- package/dist/abcWallet-6M2KDUY5.js +184 -0
- package/dist/abcWallet-BUUIREII.js +184 -0
- package/dist/abcWallet-H4S47MXU.js +184 -0
- package/dist/abcWallet-KBANX52Y.js +8 -0
- package/dist/abcWallet-KWKFWA2B.js +184 -0
- package/dist/abcWallet-LSRIJG4P.js +184 -0
- package/dist/abcWallet-UHMZ3SBV.js +184 -0
- package/dist/abcWallet-VSM7O7LO.js +184 -0
- package/dist/abcWallet-X2GWIVEI.js +184 -0
- package/dist/abcWallet-X7NZ6VBW.js +180 -0
- package/dist/ar_AR-MAB4J7H2.js +8 -0
- package/dist/arbitrum-27LBECSN.js +8 -0
- package/dist/argentWallet-GX5VSJWF.js +8 -0
- package/dist/assets-GIFIMHMU.js +8 -0
- package/dist/avalanche-KSIA64PC.js +8 -0
- package/dist/base-SIBF7BBU.js +8 -0
- package/dist/berasigWallet-JO4Q4MSU.js +8 -0
- package/dist/bestWallet-LTW5DIP4.js +8 -0
- package/dist/bifrostWallet-JL6ZAC3C.js +8 -0
- package/dist/binanceWallet-ZNNDYS5Q.js +8 -0
- package/dist/bitgetWallet-A4DL5PUY.js +8 -0
- package/dist/bitskiWallet-274FSC74.js +8 -0
- package/dist/bitverseWallet-7DVG7NHE.js +8 -0
- package/dist/blast-RE46OGNS.js +8 -0
- package/dist/bloomWallet-DOYLILHG.js +8 -0
- package/dist/braveWallet-YZYG53SC.js +8 -0
- package/dist/bsc-LKNCKWB7.js +8 -0
- package/dist/bybitWallet-SZ7ZIJOM.js +8 -0
- package/dist/celo-3UGAQ3FA.js +8 -0
- package/dist/chunk-5524HDQP.js +6817 -0
- package/dist/chunk-A73PPSQU.js +6842 -0
- package/dist/chunk-AIBVBASK.js +35 -0
- package/dist/chunk-DFWCI4QG.js +326 -0
- package/dist/chunk-EGN5IX3Q.js +6817 -0
- package/dist/chunk-HSRSDVH7.js +6817 -0
- package/dist/chunk-IAY4522B.js +6894 -0
- package/dist/chunk-J6OAJTP7.js +6818 -0
- package/dist/chunk-JSDMSWIV.js +6631 -0
- package/dist/chunk-JSDVJD3R.js +6834 -0
- package/dist/chunk-L46ONWXN.js +6880 -0
- package/dist/chunk-OJUAVARC.js +6880 -0
- package/dist/clvWallet-AW3FLKWV.js +8 -0
- package/dist/coin98Wallet-O6REX7DQ.js +8 -0
- package/dist/coinbaseWallet-LVQLZHBK.js +8 -0
- package/dist/compassWallet-65OSMTR2.js +8 -0
- package/dist/config/networks.d.ts +15 -0
- package/dist/connect-CICKFS4L.js +8 -0
- package/dist/coreWallet-YSDA53EY.js +8 -0
- package/dist/create-5SJIEM24.js +8 -0
- package/dist/cronos-ZQWFYR7X.js +8 -0
- package/dist/dawnWallet-J36CF4FH.js +8 -0
- package/dist/de_DE-EG7KMNLA.js +8 -0
- package/dist/desigWallet-XGQ7234L.js +8 -0
- package/dist/en_US-FB5NGCIS.js +8 -0
- package/dist/enkryptWallet-ROHOLP4S.js +8 -0
- package/dist/es_419-3B34TR7B.js +8 -0
- package/dist/ethereum-EQ5JF37Q.js +8 -0
- package/dist/flow-SZDAO7RI.js +8 -0
- package/dist/foxWallet-3N4ERZ2Y.js +8 -0
- package/dist/fr_FR-R75UI3J6.js +1356 -0
- package/dist/frameWallet-AIE2VFHW.js +8 -0
- package/dist/frontierWallet-VZSDJHLV.js +8 -0
- package/dist/gateWallet-T2EK3VMK.js +8 -0
- package/dist/gnosis-JNLUBWJA.js +8 -0
- package/dist/hardhat-ZXHXXZ4F.js +8 -0
- package/dist/hi_IN-UE2ZBDLM.js +8 -0
- package/dist/hooks/useBitcoinWallet.d.ts +64 -0
- package/dist/hooks/useSolanaWallet.d.ts +86 -0
- package/dist/id_ID-WQSMTXEJ.js +8 -0
- package/dist/imTokenWallet-EZIOYBYU.js +8 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +10411 -14542
- package/dist/injectedWallet-AKTBXQHX.js +8 -0
- package/dist/iopayWallet-W7H23ECM.js +8 -0
- package/dist/ja_JP-O4XT7PNY.js +8 -0
- package/dist/kaia-LDZMGDTS.js +8 -0
- package/dist/kaiaWallet-IIGUMKV2.js +8 -0
- package/dist/kaikasWallet-XFICIF6T.js +8 -0
- package/dist/ko_KR-7DRM32ZL.js +8 -0
- package/dist/krakenWallet-JQX7ML3V.js +8 -0
- package/dist/kresusWallet-X76YOSCS.js +8 -0
- package/dist/ledgerWallet-LUOIK2NO.js +8 -0
- package/dist/login-L2V76XPP.js +8 -0
- package/dist/magicEden-PNA2N7LE.js +8 -0
- package/dist/manta-AXWSHRGV.js +8 -0
- package/dist/mantle-I27DZFXF.js +8 -0
- package/dist/metaMaskWallet-ZOW7SFN3.js +8 -0
- package/dist/mewWallet-NNOKYJGO.js +8 -0
- package/dist/ms_MY-QJAJAMMS.js +8 -0
- package/dist/nestWallet-PJ4UAPAM.js +8 -0
- package/dist/oktoWallet-IPI4NUPS.js +8 -0
- package/dist/okxWallet-BKIE62N5.js +8 -0
- package/dist/omniWallet-5MXTZQTD.js +8 -0
- package/dist/oneInchWallet-SUMUIBDE.js +8 -0
- package/dist/oneKeyWallet-W7XOJBFP.js +8 -0
- package/dist/optimism-7KW4YXCD.js +8 -0
- package/dist/paraSwapWallet-O7YFTXSA.js +8 -0
- package/dist/phantomWallet-JL7CK5LT.js +8 -0
- package/dist/polygon-O6VNIW2F.js +8 -0
- package/dist/pt_BR-CUVZKVMO.js +8 -0
- package/dist/rabbyWallet-QZAAFNR5.js +8 -0
- package/dist/rainbowWallet-3H5RIOTG.js +8 -0
- package/dist/ramperWallet-PADEB35A.js +8 -0
- package/dist/refresh-HBSYGKAX.js +8 -0
- package/dist/ronin-NIBR3M4Q.js +8 -0
- package/dist/roninWallet-VBWRYBSY.js +8 -0
- package/dist/ru_RU-DLZ46RWL.js +1356 -0
- package/dist/safeWallet-5S6VLRXL.js +8 -0
- package/dist/safeheronWallet-PK6H4FAC.js +8 -0
- package/dist/safepalWallet-OG53AE3J.js +8 -0
- package/dist/scan-QFKMQ54Z.js +8 -0
- package/dist/scroll-7LCBO5E3.js +8 -0
- package/dist/secure-4HM7LOQ7.js +8 -0
- package/dist/secure-I6UQYL5P.js +8 -0
- package/dist/seifWallet-W5POSWSQ.js +8 -0
- package/dist/sign-TGZ6C3LW.js +8 -0
- package/dist/solana/AbcSolanaAutoConnector.d.ts +6 -3
- package/dist/solana/index.d.ts +1 -0
- package/dist/solana/recentSolanaWalletIds.d.ts +22 -0
- package/dist/subWallet-EMI73DDU.js +8 -0
- package/dist/tahoWallet-BI5WGGIE.js +8 -0
- package/dist/talismanWallet-FSJ7PIII.js +8 -0
- package/dist/th_TH-AXZSCUYS.js +1356 -0
- package/dist/tokenPocketWallet-24CJ7CMD.js +8 -0
- package/dist/tokenaryWallet-253RCSOV.js +8 -0
- package/dist/tr_TR-WUMEEWNJ.js +1356 -0
- package/dist/trustWallet-2I5U2KE2.js +8 -0
- package/dist/uk_UA-BVWUMQ6Z.js +1356 -0
- package/dist/uniswapWallet-G4F52I6Y.js +8 -0
- package/dist/valoraWallet-JEACHQB4.js +8 -0
- package/dist/vi_VN-AI2OTA4F.js +8 -0
- package/dist/walletConnectWallet-NRHPTNNN.js +8 -0
- package/dist/wallets/walletConnectors/abcWallet/abcApi.js +4 -3
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinConnector.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +6 -5
- package/dist/wallets/walletConnectors/abcWallet/abcProvider.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.d.ts +83 -0
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.js +9 -0
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaWalletAdapter.js +6 -5
- package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +7 -6
- package/dist/wallets/walletConnectors/abcWallet/api/AuthApi.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/api/BaseApiClient.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/api/BitcoinApi.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/api/SigningApi.d.ts +0 -4
- package/dist/wallets/walletConnectors/abcWallet/api/SigningApi.js +5 -4
- package/dist/wallets/walletConnectors/abcWallet/api/SolanaApi.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/api/TransactionApi.d.ts +0 -4
- package/dist/wallets/walletConnectors/abcWallet/api/TransactionApi.js +5 -4
- package/dist/wallets/walletConnectors/abcWallet/api/WalletApi.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/api/index.js +13 -12
- package/dist/wallets/walletConnectors/abcWallet/index.d.ts +1 -0
- package/dist/wallets/walletConnectors/abcWallet/index.js +26 -19
- package/dist/wallets/walletConnectors/abcWallet/utils.js +2 -2
- package/dist/wallets/walletConnectors/chunk-2HAU36T2.js +330 -0
- package/dist/wallets/walletConnectors/chunk-2QBCWLD2.js +207 -0
- package/dist/wallets/walletConnectors/chunk-3SVPZCA6.js +71 -0
- package/dist/wallets/walletConnectors/chunk-4PCVQBFZ.js +667 -0
- package/dist/wallets/walletConnectors/chunk-4RMNGZR2.js +253 -0
- package/dist/wallets/walletConnectors/chunk-4SAGH6IS.js +63 -0
- package/dist/wallets/walletConnectors/chunk-57YTMSPW.js +63 -0
- package/dist/wallets/walletConnectors/chunk-5QEUEPNY.js +94 -0
- package/dist/wallets/walletConnectors/chunk-664WS6CQ.js +267 -0
- package/dist/wallets/walletConnectors/chunk-6MSXHRIK.js +47 -0
- package/dist/wallets/walletConnectors/chunk-7VZDITAJ.js +330 -0
- package/dist/wallets/walletConnectors/chunk-AGC7JS5M.js +47 -0
- package/dist/wallets/walletConnectors/chunk-B56IHEUP.js +179 -0
- package/dist/wallets/walletConnectors/chunk-B6JLYR3I.js +66 -0
- package/dist/wallets/walletConnectors/chunk-CMJ4DIIQ.js +63 -0
- package/dist/wallets/walletConnectors/chunk-DCW43Y5T.js +190 -0
- package/dist/wallets/walletConnectors/chunk-DJKN2MCI.js +179 -0
- package/dist/wallets/walletConnectors/chunk-F5BORFRG.js +63 -0
- package/dist/wallets/walletConnectors/chunk-FEUW4SKR.js +63 -0
- package/dist/wallets/walletConnectors/chunk-FKPSLKA7.js +63 -0
- package/dist/wallets/walletConnectors/chunk-FTGER5ZB.js +196 -0
- package/dist/wallets/walletConnectors/chunk-GYJYTYIG.js +63 -0
- package/dist/wallets/walletConnectors/chunk-GZFBNALD.js +47 -0
- package/dist/wallets/walletConnectors/chunk-HJFZF4V3.js +276 -0
- package/dist/wallets/walletConnectors/chunk-HKWBR5B7.js +102 -0
- package/dist/wallets/walletConnectors/chunk-IKAN72JZ.js +253 -0
- package/dist/wallets/walletConnectors/chunk-JH2SJPEY.js +63 -0
- package/dist/wallets/walletConnectors/chunk-K4APJ4PE.js +96 -0
- package/dist/wallets/walletConnectors/chunk-KKCRCQNN.js +276 -0
- package/dist/wallets/walletConnectors/chunk-KLQJJI76.js +215 -0
- package/dist/wallets/walletConnectors/chunk-LJ2B47VF.js +108 -0
- package/dist/wallets/walletConnectors/chunk-LQWC2NEM.js +63 -0
- package/dist/wallets/walletConnectors/chunk-LXINMUQC.js +186 -0
- package/dist/wallets/walletConnectors/chunk-MORUEOYX.js +76 -0
- package/dist/wallets/walletConnectors/chunk-MQTXA63X.js +27 -0
- package/dist/wallets/walletConnectors/chunk-NUAZNCMH.js +1590 -0
- package/dist/wallets/walletConnectors/chunk-ODL6WVZK.js +63 -0
- package/dist/wallets/walletConnectors/chunk-OJMVWBYG.js +191 -0
- package/dist/wallets/walletConnectors/chunk-PGMVGAXJ.js +63 -0
- package/dist/wallets/walletConnectors/chunk-PMZJGS7X.js +73 -0
- package/dist/wallets/walletConnectors/chunk-QELXKYHW.js +196 -0
- package/dist/wallets/walletConnectors/chunk-T3KJ4NFX.js +276 -0
- package/dist/wallets/walletConnectors/chunk-URJDAG63.js +190 -0
- package/dist/wallets/walletConnectors/chunk-WZZVA3LW.js +101 -0
- package/dist/wallets/walletConnectors/chunk-XOQNQKZE.js +98 -0
- package/dist/wallets/walletConnectors/chunk-YX4O33NC.js +1590 -0
- package/dist/wallets/walletConnectors/chunk-ZG4ZZVOW.js +63 -0
- package/dist/wallets/walletConnectors/chunk-ZJ6OFFD5.js +95 -0
- package/dist/wallets/walletConnectors/index.js +31 -30
- package/dist/wigwamWallet-R4AVGQ5E.js +8 -0
- package/dist/xdc-KO37AHY2.js +8 -0
- package/dist/xdefiWallet-Y273RRLT.js +8 -0
- package/dist/zealWallet-CQHZEJUT.js +8 -0
- package/dist/zerionWallet-67WXXHBG.js +8 -0
- package/dist/zetachain-CULDO7MF.js +8 -0
- package/dist/zh_CN-HBK3E2T5.js +8 -0
- package/dist/zh_HK-ZQP4TGHU.js +8 -0
- package/dist/zh_TW-DSHZXVLV.js +8 -0
- package/dist/zkSync-VZ5E5WP6.js +8 -0
- package/dist/zora-GXTHZKII.js +8 -0
- package/package.json +2 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-MBBGZGXF.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
|
+
};
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
createAbcEvmProvider
|
|
4
|
+
} from "./chunk-2NVHWZUE.js";
|
|
5
|
+
import {
|
|
6
|
+
createAbcWaasClient
|
|
7
|
+
} from "./chunk-NUAZNCMH.js";
|
|
8
|
+
import {
|
|
9
|
+
setGlobalDefaultBitcoinNetwork,
|
|
10
|
+
setGlobalDefaultChainId,
|
|
11
|
+
setGlobalDefaultSolanaNetwork
|
|
12
|
+
} from "./chunk-A7FIBI6X.js";
|
|
13
|
+
import {
|
|
14
|
+
clearAuthState,
|
|
15
|
+
clearEncryptedTokens,
|
|
16
|
+
clearStorage,
|
|
17
|
+
loadAuthState,
|
|
18
|
+
loadFromStorage,
|
|
19
|
+
saveAuthState
|
|
20
|
+
} from "./chunk-5RSS3SRV.js";
|
|
21
|
+
|
|
22
|
+
// src/wallets/walletConnectors/abcWallet/abcConnector.ts
|
|
23
|
+
import { createConnector } from "wagmi";
|
|
24
|
+
function abcConnector(options) {
|
|
25
|
+
const { config } = options;
|
|
26
|
+
if (config.defaultChainId) {
|
|
27
|
+
setGlobalDefaultChainId(config.defaultChainId);
|
|
28
|
+
}
|
|
29
|
+
if (config.defaultSolanaNetwork) {
|
|
30
|
+
setGlobalDefaultSolanaNetwork(config.defaultSolanaNetwork);
|
|
31
|
+
}
|
|
32
|
+
if (config.defaultBitcoinNetwork) {
|
|
33
|
+
setGlobalDefaultBitcoinNetwork(config.defaultBitcoinNetwork);
|
|
34
|
+
}
|
|
35
|
+
return createConnector((wagmiConfig) => {
|
|
36
|
+
const client = createAbcWaasClient(config);
|
|
37
|
+
const provider = createAbcEvmProvider(client);
|
|
38
|
+
let accountsChangedHandler;
|
|
39
|
+
let chainChangedHandler;
|
|
40
|
+
let disconnectHandler;
|
|
41
|
+
return {
|
|
42
|
+
id: "abc",
|
|
43
|
+
name: "ABC Wallet",
|
|
44
|
+
type: "abc",
|
|
45
|
+
/**
|
|
46
|
+
* Connect wallet
|
|
47
|
+
*/
|
|
48
|
+
async connect() {
|
|
49
|
+
try {
|
|
50
|
+
const authState = loadAuthState();
|
|
51
|
+
if (!authState || !authState.isAuthenticated || !authState.wallet) {
|
|
52
|
+
throw new Error("ABC_LOGIN_REQUIRED");
|
|
53
|
+
}
|
|
54
|
+
provider.setWallet(authState.wallet);
|
|
55
|
+
if (authState.accessToken && authState.refreshToken && authState.expiresAt) {
|
|
56
|
+
client.setTokens(
|
|
57
|
+
authState.accessToken,
|
|
58
|
+
authState.refreshToken,
|
|
59
|
+
authState.expiresAt
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
const accounts = await provider.request({
|
|
63
|
+
method: "eth_requestAccounts"
|
|
64
|
+
});
|
|
65
|
+
const currentChainId = await provider.request({
|
|
66
|
+
method: "eth_chainId"
|
|
67
|
+
});
|
|
68
|
+
if (accountsChangedHandler) {
|
|
69
|
+
provider.removeListener("accountsChanged", accountsChangedHandler);
|
|
70
|
+
}
|
|
71
|
+
accountsChangedHandler = (accounts2) => {
|
|
72
|
+
wagmiConfig.emitter.emit("change", {
|
|
73
|
+
accounts: accounts2
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
provider.on("accountsChanged", accountsChangedHandler);
|
|
77
|
+
if (chainChangedHandler) {
|
|
78
|
+
provider.removeListener("chainChanged", chainChangedHandler);
|
|
79
|
+
}
|
|
80
|
+
chainChangedHandler = (chainId) => {
|
|
81
|
+
wagmiConfig.emitter.emit("change", {
|
|
82
|
+
chainId: Number(chainId)
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
provider.on("chainChanged", chainChangedHandler);
|
|
86
|
+
if (disconnectHandler) {
|
|
87
|
+
provider.removeListener("disconnect", disconnectHandler);
|
|
88
|
+
}
|
|
89
|
+
disconnectHandler = () => {
|
|
90
|
+
wagmiConfig.emitter.emit("disconnect");
|
|
91
|
+
this.onDisconnect();
|
|
92
|
+
};
|
|
93
|
+
provider.on("disconnect", disconnectHandler);
|
|
94
|
+
wagmiConfig.emitter.emit("connect", {
|
|
95
|
+
accounts,
|
|
96
|
+
chainId: Number(currentChainId)
|
|
97
|
+
});
|
|
98
|
+
return {
|
|
99
|
+
accounts,
|
|
100
|
+
chainId: Number(currentChainId)
|
|
101
|
+
};
|
|
102
|
+
} catch (error) {
|
|
103
|
+
console.error("\u274C ABC Connector connect() failed:", {
|
|
104
|
+
message: error.message,
|
|
105
|
+
code: error.code,
|
|
106
|
+
error
|
|
107
|
+
});
|
|
108
|
+
if (error.message === "ABC_LOGIN_REQUIRED") {
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
throw error;
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* Disconnect wallet
|
|
116
|
+
*/
|
|
117
|
+
async disconnect() {
|
|
118
|
+
if (accountsChangedHandler) {
|
|
119
|
+
provider.removeListener("accountsChanged", accountsChangedHandler);
|
|
120
|
+
accountsChangedHandler = void 0;
|
|
121
|
+
}
|
|
122
|
+
if (chainChangedHandler) {
|
|
123
|
+
provider.removeListener("chainChanged", chainChangedHandler);
|
|
124
|
+
chainChangedHandler = void 0;
|
|
125
|
+
}
|
|
126
|
+
if (disconnectHandler) {
|
|
127
|
+
provider.removeListener("disconnect", disconnectHandler);
|
|
128
|
+
disconnectHandler = void 0;
|
|
129
|
+
}
|
|
130
|
+
provider.clearWallet();
|
|
131
|
+
await client.logout();
|
|
132
|
+
let savedPinHash = null;
|
|
133
|
+
let savedEmail = null;
|
|
134
|
+
if (typeof window !== "undefined") {
|
|
135
|
+
savedPinHash = localStorage.getItem("talkenkit_abc_pin_hash");
|
|
136
|
+
savedEmail = localStorage.getItem("talkenkit_abc_saved_email");
|
|
137
|
+
}
|
|
138
|
+
clearAuthState();
|
|
139
|
+
clearEncryptedTokens();
|
|
140
|
+
if (typeof window !== "undefined") {
|
|
141
|
+
localStorage.removeItem("talkenkit_abc_enc_salt");
|
|
142
|
+
localStorage.removeItem("talkenkit_abc_enc_tokens");
|
|
143
|
+
if (savedPinHash) {
|
|
144
|
+
localStorage.setItem("talkenkit_abc_pin_hash", savedPinHash);
|
|
145
|
+
}
|
|
146
|
+
if (savedEmail) {
|
|
147
|
+
localStorage.setItem("talkenkit_abc_saved_email", savedEmail);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
console.log("\u2705 ABC Wallet disconnected (PIN preserved)");
|
|
151
|
+
},
|
|
152
|
+
/**
|
|
153
|
+
* Get accounts
|
|
154
|
+
*/
|
|
155
|
+
async getAccounts() {
|
|
156
|
+
const accounts = await provider.request({
|
|
157
|
+
method: "eth_accounts"
|
|
158
|
+
});
|
|
159
|
+
return accounts.map((account) => account);
|
|
160
|
+
},
|
|
161
|
+
/**
|
|
162
|
+
* Get chain ID
|
|
163
|
+
*/
|
|
164
|
+
async getChainId() {
|
|
165
|
+
const chainId = await provider.request({
|
|
166
|
+
method: "eth_chainId"
|
|
167
|
+
});
|
|
168
|
+
return Number(chainId);
|
|
169
|
+
},
|
|
170
|
+
/**
|
|
171
|
+
* Get provider
|
|
172
|
+
*/
|
|
173
|
+
async getProvider() {
|
|
174
|
+
return provider;
|
|
175
|
+
},
|
|
176
|
+
/**
|
|
177
|
+
* Check if authorized (has valid session)
|
|
178
|
+
* Auto-refreshes access token if expired but refresh token is valid
|
|
179
|
+
*/
|
|
180
|
+
async isAuthorized() {
|
|
181
|
+
try {
|
|
182
|
+
const authState = loadAuthState();
|
|
183
|
+
if (!authState || !authState.isAuthenticated) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
if (!authState.wallet) {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
if (client.isAuthenticated()) {
|
|
190
|
+
return true;
|
|
191
|
+
}
|
|
192
|
+
const refreshToken = loadFromStorage(
|
|
193
|
+
"refresh_token" /* REFRESH_TOKEN */
|
|
194
|
+
);
|
|
195
|
+
if (!refreshToken) {
|
|
196
|
+
clearStorage();
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
try {
|
|
200
|
+
await client.refreshTokens(refreshToken);
|
|
201
|
+
const updatedState = loadAuthState();
|
|
202
|
+
return updatedState?.isAuthenticated ?? false;
|
|
203
|
+
} catch (error) {
|
|
204
|
+
console.error("[AbcConnector] Token refresh failed:", error);
|
|
205
|
+
clearStorage();
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
} catch (error) {
|
|
209
|
+
console.error(
|
|
210
|
+
"[AbcConnector] Unexpected error in isAuthorized:",
|
|
211
|
+
error
|
|
212
|
+
);
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
/**
|
|
217
|
+
* Switch chain
|
|
218
|
+
*/
|
|
219
|
+
async switchChain({ chainId }) {
|
|
220
|
+
await provider.request({
|
|
221
|
+
method: "wallet_switchEthereumChain",
|
|
222
|
+
params: [{ chainId: `0x${chainId.toString(16)}` }]
|
|
223
|
+
});
|
|
224
|
+
const newChainId = await this.getChainId();
|
|
225
|
+
const authState = loadAuthState();
|
|
226
|
+
if (authState?.wallet) {
|
|
227
|
+
authState.wallet.chainId = newChainId;
|
|
228
|
+
saveAuthState(authState);
|
|
229
|
+
}
|
|
230
|
+
return wagmiConfig.chains.find((x) => x.id === chainId) ?? {
|
|
231
|
+
id: chainId,
|
|
232
|
+
name: `Chain ${chainId}`,
|
|
233
|
+
nativeCurrency: {
|
|
234
|
+
name: "Ether",
|
|
235
|
+
decimals: 18,
|
|
236
|
+
symbol: "ETH"
|
|
237
|
+
},
|
|
238
|
+
rpcUrls: {
|
|
239
|
+
default: { http: [""] }
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
},
|
|
243
|
+
/**
|
|
244
|
+
* Handle accounts changed
|
|
245
|
+
*/
|
|
246
|
+
onAccountsChanged(accounts) {
|
|
247
|
+
if (accounts.length === 0) {
|
|
248
|
+
this.onDisconnect();
|
|
249
|
+
} else {
|
|
250
|
+
wagmiConfig.emitter.emit("change", {
|
|
251
|
+
accounts
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
/**
|
|
256
|
+
* Handle chain changed
|
|
257
|
+
*/
|
|
258
|
+
onChainChanged(chain) {
|
|
259
|
+
const chainId = Number(chain);
|
|
260
|
+
wagmiConfig.emitter.emit("change", { chainId });
|
|
261
|
+
},
|
|
262
|
+
/**
|
|
263
|
+
* Handle disconnect
|
|
264
|
+
*/
|
|
265
|
+
onDisconnect(_error) {
|
|
266
|
+
provider.clearWallet();
|
|
267
|
+
clearAuthState();
|
|
268
|
+
wagmiConfig.emitter.emit("disconnect");
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export {
|
|
275
|
+
abcConnector
|
|
276
|
+
};
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/wallets/walletConnectors/abcWallet/abcSolanaProvider.ts
|
|
4
|
+
var EventEmitter = class {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.events = /* @__PURE__ */ new Map();
|
|
7
|
+
}
|
|
8
|
+
on(event, listener) {
|
|
9
|
+
if (!this.events.has(event)) {
|
|
10
|
+
this.events.set(event, []);
|
|
11
|
+
}
|
|
12
|
+
this.events.get(event).push(listener);
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
off(event, listener) {
|
|
16
|
+
const listeners = this.events.get(event);
|
|
17
|
+
if (listeners) {
|
|
18
|
+
const index = listeners.indexOf(listener);
|
|
19
|
+
if (index !== -1) {
|
|
20
|
+
listeners.splice(index, 1);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return this;
|
|
24
|
+
}
|
|
25
|
+
removeListener(event, listener) {
|
|
26
|
+
return this.off(event, listener);
|
|
27
|
+
}
|
|
28
|
+
emit(event, ...args) {
|
|
29
|
+
const listeners = this.events.get(event);
|
|
30
|
+
if (listeners) {
|
|
31
|
+
for (const listener of listeners) {
|
|
32
|
+
listener(...args);
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
removeAllListeners(event) {
|
|
39
|
+
if (event) {
|
|
40
|
+
this.events.delete(event);
|
|
41
|
+
} else {
|
|
42
|
+
this.events.clear();
|
|
43
|
+
}
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var SolanaErrorCode = {
|
|
48
|
+
USER_REJECTED: 4001,
|
|
49
|
+
UNAUTHORIZED: 4100,
|
|
50
|
+
UNSUPPORTED_METHOD: 4200,
|
|
51
|
+
DISCONNECTED: 4900,
|
|
52
|
+
INVALID_PARAMS: -32602,
|
|
53
|
+
INTERNAL_ERROR: -32603
|
|
54
|
+
};
|
|
55
|
+
var SolanaProviderError = class extends Error {
|
|
56
|
+
constructor(code, message, data) {
|
|
57
|
+
super(message);
|
|
58
|
+
this.code = code;
|
|
59
|
+
this.data = data;
|
|
60
|
+
this.name = "SolanaProviderError";
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var AbcSolanaProvider = class extends EventEmitter {
|
|
64
|
+
constructor(client) {
|
|
65
|
+
super();
|
|
66
|
+
this.wallet = null;
|
|
67
|
+
this.connected = false;
|
|
68
|
+
this.client = client;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Set wallet information
|
|
72
|
+
*/
|
|
73
|
+
setWallet(wallet) {
|
|
74
|
+
const previousAddress = this.wallet?.address;
|
|
75
|
+
this.wallet = wallet;
|
|
76
|
+
this.connected = true;
|
|
77
|
+
if (previousAddress !== wallet.address) {
|
|
78
|
+
this.emit("accountsChanged", [wallet.address]);
|
|
79
|
+
}
|
|
80
|
+
this.emit("connect", {
|
|
81
|
+
address: wallet.address,
|
|
82
|
+
network: wallet.network
|
|
83
|
+
});
|
|
84
|
+
console.log(
|
|
85
|
+
"[SolanaProvider] \u2705 Wallet connected:",
|
|
86
|
+
`${wallet.address.substring(0, 6)}...${wallet.address.substring(wallet.address.length - 6)}`
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Clear wallet (disconnect)
|
|
91
|
+
*/
|
|
92
|
+
clearWallet() {
|
|
93
|
+
this.wallet = null;
|
|
94
|
+
this.connected = false;
|
|
95
|
+
this.emit("disconnect");
|
|
96
|
+
this.emit("accountsChanged", []);
|
|
97
|
+
console.log("[SolanaProvider] \u{1F50C} Wallet disconnected");
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Set PIN request callback for transaction signing
|
|
101
|
+
*/
|
|
102
|
+
setRequestPinCallback(callback) {
|
|
103
|
+
this.requestPinCallback = callback;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Request PIN from user
|
|
107
|
+
*/
|
|
108
|
+
async requestPin() {
|
|
109
|
+
const globalRequestPin = window.__TALKENKIT_REQUEST_PIN__;
|
|
110
|
+
if (globalRequestPin && typeof globalRequestPin === "function") {
|
|
111
|
+
return globalRequestPin("transaction");
|
|
112
|
+
}
|
|
113
|
+
if (!this.requestPinCallback) {
|
|
114
|
+
throw new SolanaProviderError(
|
|
115
|
+
SolanaErrorCode.INTERNAL_ERROR,
|
|
116
|
+
"PIN request callback not configured. Make sure RainbowKitProvider is rendered."
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
return this.requestPinCallback();
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Check if connected
|
|
123
|
+
*/
|
|
124
|
+
isConnected() {
|
|
125
|
+
return this.connected && this.wallet !== null;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Get Solana address
|
|
129
|
+
*/
|
|
130
|
+
async getAddress() {
|
|
131
|
+
if (!this.wallet) {
|
|
132
|
+
throw new SolanaProviderError(
|
|
133
|
+
SolanaErrorCode.DISCONNECTED,
|
|
134
|
+
"Wallet not connected"
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
return this.wallet.address;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Get public key
|
|
141
|
+
*/
|
|
142
|
+
async getPublicKey() {
|
|
143
|
+
if (!this.wallet) {
|
|
144
|
+
throw new SolanaProviderError(
|
|
145
|
+
SolanaErrorCode.DISCONNECTED,
|
|
146
|
+
"Wallet not connected"
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
return this.wallet.publicKey;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Sign Solana message (no PIN required)
|
|
153
|
+
* Uses encrypted_share which doesn't require PIN
|
|
154
|
+
*/
|
|
155
|
+
async signMessage(encodedMessage, _display) {
|
|
156
|
+
if (!this.wallet) {
|
|
157
|
+
throw new SolanaProviderError(
|
|
158
|
+
SolanaErrorCode.DISCONNECTED,
|
|
159
|
+
"Wallet not connected"
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
try {
|
|
163
|
+
console.log("[SolanaProvider] \u{1F58A}\uFE0F Signing Solana message...");
|
|
164
|
+
const messageHex = "0x" + Array.from(encodedMessage).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
165
|
+
const result = await this.client.solana.signSolanaMessage({
|
|
166
|
+
message: messageHex,
|
|
167
|
+
encryptedShare: this.wallet.encryptedShare,
|
|
168
|
+
keyId: this.wallet.keyId,
|
|
169
|
+
secretStore: this.wallet.secretStore || ""
|
|
170
|
+
});
|
|
171
|
+
const signatureHex = result.signature.startsWith("0x") ? result.signature.slice(2) : result.signature;
|
|
172
|
+
const signatureBytes = new Uint8Array(
|
|
173
|
+
signatureHex.match(/.{1,2}/g)?.map((byte) => parseInt(byte, 16)) || []
|
|
174
|
+
);
|
|
175
|
+
console.log("[SolanaProvider] \u2705 Message signed");
|
|
176
|
+
return { signature: signatureBytes };
|
|
177
|
+
} catch (error) {
|
|
178
|
+
console.error("[SolanaProvider] \u274C Sign message failed:", error.message);
|
|
179
|
+
this.emit("error", error);
|
|
180
|
+
throw new SolanaProviderError(
|
|
181
|
+
SolanaErrorCode.INTERNAL_ERROR,
|
|
182
|
+
"Failed to sign message",
|
|
183
|
+
error
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Sign Solana transaction (not used - ABC WaaS handles signing server-side)
|
|
189
|
+
* This method is kept for compatibility but not recommended for direct use
|
|
190
|
+
* Use the high-level sendTransaction() flow instead
|
|
191
|
+
*/
|
|
192
|
+
async signTransaction(transaction, params) {
|
|
193
|
+
throw new SolanaProviderError(
|
|
194
|
+
SolanaErrorCode.UNSUPPORTED_METHOD,
|
|
195
|
+
"Direct transaction signing not supported. Use useSolanaWallet.sendTransaction() which handles the full flow via ABC WaaS API."
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Get wallet info
|
|
200
|
+
*/
|
|
201
|
+
getWalletInfo() {
|
|
202
|
+
if (!this.wallet)
|
|
203
|
+
return null;
|
|
204
|
+
return {
|
|
205
|
+
address: this.wallet.address,
|
|
206
|
+
publicKey: this.wallet.publicKey,
|
|
207
|
+
network: this.wallet.network
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export {
|
|
213
|
+
SolanaProviderError,
|
|
214
|
+
AbcSolanaProvider
|
|
215
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-MBBGZGXF.js";
|
|
6
|
+
import {
|
|
7
|
+
isMobile
|
|
8
|
+
} from "./chunk-RETKWSKD.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-E2GVGE4U.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
|
+
};
|