@dogeos/dogeos-sdk 1.0.6-alpha.1 → 2.0.0-beta.4

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 (67) hide show
  1. package/README.md +0 -20
  2. package/dist/components/AccountModal/AccountModal.d.ts +1 -1
  3. package/dist/components/AccountModal/AccountModal.d.ts.map +1 -1
  4. package/dist/components/AllChainsAddressModal/AllChainsAddressModal.d.ts.map +1 -1
  5. package/dist/components/ConnectModal/socialLoginTypeSL.d.ts +1 -1
  6. package/dist/components/ConnectModal/socialLoginTypeSL.d.ts.map +1 -1
  7. package/dist/components/RainbowKitProvider/RainbowKitProvider.d.ts +2 -0
  8. package/dist/components/RainbowKitProvider/RainbowKitProvider.d.ts.map +1 -1
  9. package/dist/components/useNetworkOptions/index.d.ts +2 -1
  10. package/dist/components/useNetworkOptions/index.d.ts.map +1 -1
  11. package/dist/config/getDefaultConfig.d.ts +6 -5
  12. package/dist/config/getDefaultConfig.d.ts.map +1 -1
  13. package/dist/css/reset.css.d.ts.map +1 -1
  14. package/dist/index.css +920 -900
  15. package/dist/index.d.ts +2 -2
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +121 -96
  18. package/dist/utils/customChains.d.ts +0 -3
  19. package/dist/utils/customChains.d.ts.map +1 -1
  20. package/dist/wallets/walletConnectors/berasigWallet/berasigWallet.js +2 -2
  21. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  22. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  23. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  24. package/dist/wallets/walletConnectors/chunk-23BTDHWT.js +68 -0
  25. package/dist/wallets/walletConnectors/chunk-3RV2PDNU.js +90 -0
  26. package/dist/wallets/walletConnectors/chunk-5AA45G6G.js +68 -0
  27. package/dist/wallets/walletConnectors/chunk-5Z7ZXXRR.js +98 -0
  28. package/dist/wallets/walletConnectors/chunk-BH3DH43L.js +92 -0
  29. package/dist/wallets/walletConnectors/chunk-C77FT77Y.js +93 -0
  30. package/dist/wallets/walletConnectors/chunk-DSSAT3NI.js +99 -0
  31. package/dist/wallets/walletConnectors/chunk-EU6OLW4A.js +95 -0
  32. package/dist/wallets/walletConnectors/chunk-FWKF7LPD.js +107 -0
  33. package/dist/wallets/walletConnectors/chunk-HKLLWUHG.js +63 -0
  34. package/dist/wallets/walletConnectors/chunk-IQZBD6M4.js +63 -0
  35. package/dist/wallets/walletConnectors/chunk-JY4IF5AQ.js +84 -0
  36. package/dist/wallets/walletConnectors/chunk-LKBXEGOJ.js +92 -0
  37. package/dist/wallets/walletConnectors/chunk-MD4POIVS.js +93 -0
  38. package/dist/wallets/walletConnectors/chunk-NBPDTYTT.js +93 -0
  39. package/dist/wallets/walletConnectors/chunk-OP7MZATO.js +100 -0
  40. package/dist/wallets/walletConnectors/chunk-PE2OUMNV.js +91 -0
  41. package/dist/wallets/walletConnectors/chunk-PTIPKDP7.js +143 -0
  42. package/dist/wallets/walletConnectors/chunk-RQLI2RTW.js +105 -0
  43. package/dist/wallets/walletConnectors/chunk-U37MS2YB.js +88 -0
  44. package/dist/wallets/walletConnectors/chunk-VFRUWZVT.js +62 -0
  45. package/dist/wallets/walletConnectors/chunk-XAQXLPKN.js +90 -0
  46. package/dist/wallets/walletConnectors/chunk-XVUM5YFT.js +93 -0
  47. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  48. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  49. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  50. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  51. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  52. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  53. package/dist/wallets/walletConnectors/index.js +38 -38
  54. package/dist/wallets/walletConnectors/iopayWallet/iopayWallet.js +2 -2
  55. package/dist/wallets/walletConnectors/kaiaWallet/kaiaWallet.js +2 -2
  56. package/dist/wallets/walletConnectors/kaikasWallet/kaikasWallet.js +2 -2
  57. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  58. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  59. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  60. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  61. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  62. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  63. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  64. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  65. package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +2 -2
  66. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  67. package/package.json +4 -4
@@ -0,0 +1,93 @@
1
+ "use client";
2
+ import {
3
+ getInjectedConnector,
4
+ hasInjectedProvider
5
+ } from "./chunk-PJCRXY6L.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-75A5A7MH.js";
9
+
10
+ // src/wallets/walletConnectors/roninWallet/roninWallet.ts
11
+ var roninWallet = ({ projectId, walletConnectParameters }) => {
12
+ const isRoninInjected = hasInjectedProvider({
13
+ namespace: "ronin.provider"
14
+ });
15
+ const shouldUseWalletConnect = !isRoninInjected;
16
+ const getUri = (uri) => {
17
+ return `roninwallet://wc?uri=${encodeURIComponent(uri)}`;
18
+ };
19
+ return {
20
+ id: "ronin",
21
+ name: "Ronin Wallet",
22
+ iconUrl: async () => (await import("./roninWallet-SAB5ESVK.js")).default,
23
+ iconBackground: "#ffffff",
24
+ rdns: "com.roninchain.wallet",
25
+ installed: isRoninInjected || void 0,
26
+ downloadUrls: {
27
+ android: "https://play.google.com/store/apps/details?id=com.skymavis.genesis",
28
+ ios: "https://apps.apple.com/us/app/ronin-wallet/id1592675001",
29
+ mobile: "https://wallet.roninchain.com",
30
+ chrome: "https://chrome.google.com/webstore/detail/ronin-wallet/fnjhmkhhmkbjkkabndcnnogagogbneec",
31
+ edge: "https://microsoftedge.microsoft.com/addons/detail/ronin-wallet/kjmoohlgokccodicjjfebfomlbljgfhk",
32
+ firefox: "https://addons.mozilla.org/firefox/addon/ronin-wallet",
33
+ browserExtension: "https://wallet.roninchain.com/",
34
+ qrCode: "https://wallet.roninchain.com/"
35
+ },
36
+ mobile: {
37
+ getUri: shouldUseWalletConnect ? getUri : void 0
38
+ },
39
+ qrCode: shouldUseWalletConnect ? {
40
+ getUri: (uri) => uri,
41
+ instructions: {
42
+ learnMoreUrl: "https://wallet.roninchain.com/",
43
+ steps: [
44
+ {
45
+ description: "wallet_connectors.ronin.qr_code.step1.description",
46
+ step: "install",
47
+ title: "wallet_connectors.ronin.qr_code.step1.title"
48
+ },
49
+ {
50
+ description: "wallet_connectors.ronin.qr_code.step2.description",
51
+ step: "create",
52
+ title: "wallet_connectors.ronin.qr_code.step2.title"
53
+ },
54
+ {
55
+ description: "wallet_connectors.ronin.qr_code.step3.description",
56
+ step: "scan",
57
+ title: "wallet_connectors.ronin.qr_code.step3.title"
58
+ }
59
+ ]
60
+ }
61
+ } : void 0,
62
+ extension: {
63
+ instructions: {
64
+ learnMoreUrl: "https://wallet.roninchain.com/",
65
+ steps: [
66
+ {
67
+ description: "wallet_connectors.ronin.extension.step1.description",
68
+ step: "install",
69
+ title: "wallet_connectors.ronin.extension.step1.title"
70
+ },
71
+ {
72
+ description: "wallet_connectors.ronin.extension.step2.description",
73
+ step: "create",
74
+ title: "wallet_connectors.ronin.extension.step2.title"
75
+ },
76
+ {
77
+ description: "wallet_connectors.ronin.extension.step3.description",
78
+ step: "refresh",
79
+ title: "wallet_connectors.ronin.extension.step3.title"
80
+ }
81
+ ]
82
+ }
83
+ },
84
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
85
+ projectId,
86
+ walletConnectParameters
87
+ }) : getInjectedConnector({ namespace: "ronin.provider" })
88
+ };
89
+ };
90
+
91
+ export {
92
+ roninWallet
93
+ };
@@ -0,0 +1,93 @@
1
+ "use client";
2
+ import {
3
+ isAndroid
4
+ } from "./chunk-RETKWSKD.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-PJCRXY6L.js";
9
+ import {
10
+ getWalletConnectConnector
11
+ } from "./chunk-75A5A7MH.js";
12
+
13
+ // src/wallets/walletConnectors/okxWallet/okxWallet.ts
14
+ var okxWallet = ({ projectId, walletConnectParameters }) => {
15
+ const isOKXInjected = hasInjectedProvider({ namespace: "okxwallet" });
16
+ const shouldUseWalletConnect = !isOKXInjected;
17
+ return {
18
+ id: "okx",
19
+ name: "OKX Wallet",
20
+ rdns: "com.okex.wallet",
21
+ iconUrl: async () => (await import("./okxWallet-GJMKZIND.js")).default,
22
+ iconAccent: "#000",
23
+ iconBackground: "#000",
24
+ downloadUrls: {
25
+ android: "https://play.google.com/store/apps/details?id=com.okinc.okex.gp",
26
+ ios: "https://itunes.apple.com/app/id1327268470?mt=8",
27
+ mobile: "https://okx.com/download",
28
+ qrCode: "https://okx.com/download",
29
+ chrome: "https://chrome.google.com/webstore/detail/okx-wallet/mcohilncbfahbmgdjkbpemcciiolgcge",
30
+ edge: "https://microsoftedge.microsoft.com/addons/detail/okx-wallet/pbpjkcldjiffchgbbndmhojiacbgflha",
31
+ firefox: "https://addons.mozilla.org/firefox/addon/okexwallet/",
32
+ browserExtension: "https://okx.com/download"
33
+ },
34
+ mobile: {
35
+ getUri: shouldUseWalletConnect ? (uri) => {
36
+ return isAndroid() ? uri : `okex://main/wc?uri=${encodeURIComponent(uri)}`;
37
+ } : void 0
38
+ },
39
+ qrCode: shouldUseWalletConnect ? {
40
+ getUri: (uri) => uri,
41
+ instructions: {
42
+ learnMoreUrl: "https://okx.com/web3/",
43
+ steps: [
44
+ {
45
+ description: "wallet_connectors.okx.qr_code.step1.description",
46
+ step: "install",
47
+ title: "wallet_connectors.okx.qr_code.step1.title"
48
+ },
49
+ {
50
+ description: "wallet_connectors.okx.qr_code.step2.description",
51
+ step: "create",
52
+ title: "wallet_connectors.okx.qr_code.step2.title"
53
+ },
54
+ {
55
+ description: "wallet_connectors.okx.qr_code.step3.description",
56
+ step: "scan",
57
+ title: "wallet_connectors.okx.qr_code.step3.title"
58
+ }
59
+ ]
60
+ }
61
+ } : void 0,
62
+ extension: {
63
+ instructions: {
64
+ learnMoreUrl: "https://okx.com/web3/",
65
+ steps: [
66
+ {
67
+ description: "wallet_connectors.okx.extension.step1.description",
68
+ step: "install",
69
+ title: "wallet_connectors.okx.extension.step1.title"
70
+ },
71
+ {
72
+ description: "wallet_connectors.okx.extension.step2.description",
73
+ step: "create",
74
+ title: "wallet_connectors.okx.extension.step2.title"
75
+ },
76
+ {
77
+ description: "wallet_connectors.okx.extension.step3.description",
78
+ step: "refresh",
79
+ title: "wallet_connectors.okx.extension.step3.title"
80
+ }
81
+ ]
82
+ }
83
+ },
84
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
85
+ projectId,
86
+ walletConnectParameters
87
+ }) : getInjectedConnector({ namespace: "okxwallet" })
88
+ };
89
+ };
90
+
91
+ export {
92
+ okxWallet
93
+ };
@@ -0,0 +1,100 @@
1
+ "use client";
2
+ import {
3
+ getInjectedConnector,
4
+ hasInjectedProvider
5
+ } from "./chunk-PJCRXY6L.js";
6
+ import {
7
+ getWalletConnectConnector
8
+ } from "./chunk-75A5A7MH.js";
9
+
10
+ // src/wallets/walletConnectors/subWallet/subWallet.ts
11
+ var subWallet = ({ projectId, walletConnectParameters }) => {
12
+ const isSubWalletInjected = hasInjectedProvider({ namespace: "SubWallet" });
13
+ const shouldUseWalletConnect = !isSubWalletInjected;
14
+ const getUriMobile = (uri) => {
15
+ return `subwallet://wc?uri=${encodeURIComponent(uri)}`;
16
+ };
17
+ const getUriQR = (uri) => {
18
+ return uri;
19
+ };
20
+ const mobileConnector = {
21
+ getUri: shouldUseWalletConnect ? getUriMobile : void 0
22
+ };
23
+ let qrConnector = void 0;
24
+ if (shouldUseWalletConnect) {
25
+ qrConnector = {
26
+ getUri: getUriQR,
27
+ instructions: {
28
+ learnMoreUrl: "https://www.subwallet.app/",
29
+ steps: [
30
+ {
31
+ description: "wallet_connectors.subwallet.qr_code.step1.description",
32
+ step: "install",
33
+ title: "wallet_connectors.subwallet.qr_code.step1.title"
34
+ },
35
+ {
36
+ description: "wallet_connectors.subwallet.qr_code.step2.description",
37
+ step: "create",
38
+ title: "wallet_connectors.subwallet.qr_code.step2.title"
39
+ },
40
+ {
41
+ description: "wallet_connectors.subwallet.qr_code.step3.description",
42
+ step: "scan",
43
+ title: "wallet_connectors.subwallet.qr_code.step3.title"
44
+ }
45
+ ]
46
+ }
47
+ };
48
+ }
49
+ const extensionConnector = {
50
+ instructions: {
51
+ learnMoreUrl: "https://www.subwallet.app/",
52
+ steps: [
53
+ {
54
+ description: "wallet_connectors.subwallet.extension.step1.description",
55
+ step: "install",
56
+ title: "wallet_connectors.subwallet.extension.step1.title"
57
+ },
58
+ {
59
+ description: "wallet_connectors.subwallet.extension.step2.description",
60
+ step: "create",
61
+ title: "wallet_connectors.subwallet.extension.step2.title"
62
+ },
63
+ {
64
+ description: "wallet_connectors.subwallet.extension.step3.description",
65
+ step: "refresh",
66
+ title: "wallet_connectors.subwallet.extension.step3.title"
67
+ }
68
+ ]
69
+ }
70
+ };
71
+ return {
72
+ id: "subwallet",
73
+ name: "SubWallet",
74
+ rdns: "app.subwallet",
75
+ iconUrl: async () => (await import("./subWallet-LOZELSAO.js")).default,
76
+ iconBackground: "#fff",
77
+ installed: isSubWalletInjected || void 0,
78
+ downloadUrls: {
79
+ browserExtension: "https://www.subwallet.app/download",
80
+ chrome: "https://chrome.google.com/webstore/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn",
81
+ firefox: "https://addons.mozilla.org/en-US/firefox/addon/subwallet/",
82
+ edge: "https://chrome.google.com/webstore/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn",
83
+ mobile: "https://www.subwallet.app/download",
84
+ android: "https://play.google.com/store/apps/details?id=app.subwallet.mobile",
85
+ ios: "https://apps.apple.com/us/app/subwallet-polkadot-wallet/id1633050285",
86
+ qrCode: "https://www.subwallet.app/download"
87
+ },
88
+ mobile: mobileConnector,
89
+ qrCode: qrConnector,
90
+ extension: extensionConnector,
91
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
92
+ projectId,
93
+ walletConnectParameters
94
+ }) : getInjectedConnector({ namespace: "SubWallet" })
95
+ };
96
+ };
97
+
98
+ export {
99
+ subWallet
100
+ };
@@ -0,0 +1,91 @@
1
+ "use client";
2
+ import {
3
+ isAndroid
4
+ } from "./chunk-RETKWSKD.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-PJCRXY6L.js";
9
+ import {
10
+ getWalletConnectConnector
11
+ } from "./chunk-75A5A7MH.js";
12
+
13
+ // src/wallets/walletConnectors/gateWallet/gateWallet.ts
14
+ var gateWallet = ({ projectId, walletConnectParameters }) => {
15
+ const isGateInjected = hasInjectedProvider({ namespace: "gatewallet" });
16
+ const shouldUseWalletConnect = !isGateInjected;
17
+ return {
18
+ id: "gate",
19
+ name: "Gate Wallet",
20
+ rdns: "io.gate.wallet",
21
+ iconUrl: async () => (await import("./gateWallet-ZVEZILRP.js")).default,
22
+ iconAccent: "#fff",
23
+ iconBackground: "#fff",
24
+ downloadUrls: {
25
+ android: "https://play.google.com/store/apps/details?id=com.gateio.gateio",
26
+ ios: "https://apps.apple.com/us/app/gate-io-buy-bitcoin-crypto/id1294998195",
27
+ mobile: "https://www.gate.io/mobileapp",
28
+ qrCode: "https://www.gate.io/web3",
29
+ chrome: "https://chromewebstore.google.com/detail/gate-wallet/cpmkedoipcpimgecpmgpldfpohjplkpp",
30
+ browserExtension: "https://www.gate.io/web3"
31
+ },
32
+ mobile: {
33
+ getUri: shouldUseWalletConnect ? (uri) => {
34
+ return isAndroid() ? uri : `gtweb3wallet://wc?uri=${encodeURIComponent(uri)}`;
35
+ } : void 0
36
+ },
37
+ qrCode: shouldUseWalletConnect ? {
38
+ getUri: (uri) => uri,
39
+ instructions: {
40
+ learnMoreUrl: "https://www.gate.io/learn",
41
+ steps: [
42
+ {
43
+ description: "wallet_connectors.gate.qr_code.step1.description",
44
+ step: "install",
45
+ title: "wallet_connectors.gate.qr_code.step1.title"
46
+ },
47
+ {
48
+ description: "wallet_connectors.gate.qr_code.step2.description",
49
+ step: "create",
50
+ title: "wallet_connectors.gate.qr_code.step2.title"
51
+ },
52
+ {
53
+ description: "wallet_connectors.gate.qr_code.step3.description",
54
+ step: "scan",
55
+ title: "wallet_connectors.gate.qr_code.step3.title"
56
+ }
57
+ ]
58
+ }
59
+ } : void 0,
60
+ extension: {
61
+ instructions: {
62
+ learnMoreUrl: "https://www.gate.io/learn",
63
+ steps: [
64
+ {
65
+ description: "wallet_connectors.gate.extension.step1.description",
66
+ step: "install",
67
+ title: "wallet_connectors.gate.extension.step1.title"
68
+ },
69
+ {
70
+ description: "wallet_connectors.gate.extension.step2.description",
71
+ step: "create",
72
+ title: "wallet_connectors.gate.extension.step2.title"
73
+ },
74
+ {
75
+ description: "wallet_connectors.gate.extension.step3.description",
76
+ step: "refresh",
77
+ title: "wallet_connectors.gate.extension.step3.title"
78
+ }
79
+ ]
80
+ }
81
+ },
82
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
83
+ projectId,
84
+ walletConnectParameters
85
+ }) : getInjectedConnector({ namespace: "gatewallet" })
86
+ };
87
+ };
88
+
89
+ export {
90
+ gateWallet
91
+ };
@@ -0,0 +1,143 @@
1
+ "use client";
2
+ import {
3
+ isAndroid,
4
+ isIOS
5
+ } from "./chunk-RETKWSKD.js";
6
+ import {
7
+ getInjectedConnector,
8
+ hasInjectedProvider
9
+ } from "./chunk-PJCRXY6L.js";
10
+ import {
11
+ getWalletConnectConnector
12
+ } from "./chunk-75A5A7MH.js";
13
+
14
+ // src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts
15
+ function isMetaMask(ethereum) {
16
+ if (!ethereum?.isMetaMask) return false;
17
+ if (ethereum.isBraveWallet && !ethereum._events && !ethereum._state) return false;
18
+ if (ethereum.isApexWallet) return false;
19
+ if (ethereum.isAvalanche) return false;
20
+ if (ethereum.isBackpack) return false;
21
+ if (ethereum.isBifrost) return false;
22
+ if (ethereum.isBitKeep) return false;
23
+ if (ethereum.isBitski) return false;
24
+ if (ethereum.isBlockWallet) return false;
25
+ if (ethereum.isCoinbaseWallet) return false;
26
+ if (ethereum.isDawn) return false;
27
+ if (ethereum.isEnkrypt) return false;
28
+ if (ethereum.isExodus) return false;
29
+ if (ethereum.isFrame) return false;
30
+ if (ethereum.isFrontier) return false;
31
+ if (ethereum.isGamestop) return false;
32
+ if (ethereum.isHyperPay) return false;
33
+ if (ethereum.isImToken) return false;
34
+ if (ethereum.isKuCoinWallet) return false;
35
+ if (ethereum.isMathWallet) return false;
36
+ if (ethereum.isNestWallet) return false;
37
+ if (ethereum.isOkxWallet || ethereum.isOKExWallet) return false;
38
+ if (ethereum.isOneInchIOSWallet || ethereum.isOneInchAndroidWallet) return false;
39
+ if (ethereum.isOpera) return false;
40
+ if (ethereum.isPhantom) return false;
41
+ if (ethereum.isPortal) return false;
42
+ if (ethereum.isRabby) return false;
43
+ if (ethereum.isRainbow) return false;
44
+ if (ethereum.isStatus) return false;
45
+ if (ethereum.isTalisman) return false;
46
+ if (ethereum.isTally) return false;
47
+ if (ethereum.isTokenPocket) return false;
48
+ if (ethereum.isTokenary) return false;
49
+ if (ethereum.isTrust || ethereum.isTrustWallet) return false;
50
+ if (ethereum.isXDEFI) return false;
51
+ if (ethereum.isZeal) return false;
52
+ if (ethereum.isZerion) return false;
53
+ if (ethereum.__seif) return false;
54
+ return true;
55
+ }
56
+ var metaMaskWallet = ({ projectId, walletConnectParameters }) => {
57
+ const isMetaMaskInjected = hasInjectedProvider({ flag: "isMetaMask" });
58
+ const shouldUseWalletConnect = !isMetaMaskInjected;
59
+ const getUri = (uri) => {
60
+ return isAndroid() ? uri : isIOS() ? (
61
+ // currently broken in MetaMask v6.5.0 https://github.com/MetaMask/metamask-mobile/issues/6457
62
+ `metamask://wc?uri=${encodeURIComponent(uri)}`
63
+ ) : `https://metamask.app.link/wc?uri=${encodeURIComponent(uri)}`;
64
+ };
65
+ return {
66
+ id: "metaMask",
67
+ name: "MetaMask",
68
+ rdns: "io.metamask",
69
+ iconUrl: async () => (await import("./metaMaskWallet-YFHEHW7V.js")).default,
70
+ iconAccent: "#f6851a",
71
+ iconBackground: "#fff",
72
+ installed: !shouldUseWalletConnect ? isMetaMaskInjected : void 0,
73
+ downloadUrls: {
74
+ android: "https://play.google.com/store/apps/details?id=io.metamask",
75
+ ios: "https://apps.apple.com/us/app/metamask/id1438144202",
76
+ mobile: "https://metamask.io/download",
77
+ qrCode: "https://metamask.io/download",
78
+ chrome: "https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",
79
+ edge: "https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm",
80
+ firefox: "https://addons.mozilla.org/firefox/addon/ether-metamask",
81
+ opera: "https://addons.opera.com/extensions/details/metamask-10",
82
+ browserExtension: "https://metamask.io/download"
83
+ },
84
+ mobile: {
85
+ getUri: shouldUseWalletConnect ? getUri : void 0
86
+ },
87
+ qrCode: shouldUseWalletConnect ? {
88
+ getUri,
89
+ instructions: {
90
+ learnMoreUrl: "https://metamask.io/faqs/",
91
+ steps: [
92
+ {
93
+ description: "wallet_connectors.metamask.qr_code.step1.description",
94
+ step: "install",
95
+ title: "wallet_connectors.metamask.qr_code.step1.title"
96
+ },
97
+ {
98
+ description: "wallet_connectors.metamask.qr_code.step2.description",
99
+ step: "create",
100
+ title: "wallet_connectors.metamask.qr_code.step2.title"
101
+ },
102
+ {
103
+ description: "wallet_connectors.metamask.qr_code.step3.description",
104
+ step: "refresh",
105
+ title: "wallet_connectors.metamask.qr_code.step3.title"
106
+ }
107
+ ]
108
+ }
109
+ } : void 0,
110
+ extension: {
111
+ instructions: {
112
+ learnMoreUrl: "https://metamask.io/faqs/",
113
+ steps: [
114
+ {
115
+ description: "wallet_connectors.metamask.extension.step1.description",
116
+ step: "install",
117
+ title: "wallet_connectors.metamask.extension.step1.title"
118
+ },
119
+ {
120
+ description: "wallet_connectors.metamask.extension.step2.description",
121
+ step: "create",
122
+ title: "wallet_connectors.metamask.extension.step2.title"
123
+ },
124
+ {
125
+ description: "wallet_connectors.metamask.extension.step3.description",
126
+ step: "refresh",
127
+ title: "wallet_connectors.metamask.extension.step3.title"
128
+ }
129
+ ]
130
+ }
131
+ },
132
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
133
+ projectId,
134
+ walletConnectParameters
135
+ }) : getInjectedConnector({
136
+ target: typeof window !== "undefined" ? window.ethereum?.providers?.find(isMetaMask) ?? window.ethereum : void 0
137
+ })
138
+ };
139
+ };
140
+
141
+ export {
142
+ metaMaskWallet
143
+ };
@@ -0,0 +1,105 @@
1
+ "use client";
2
+ import {
3
+ isMobile
4
+ } from "./chunk-RETKWSKD.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-PJCRXY6L.js";
9
+ import {
10
+ getWalletConnectConnector
11
+ } from "./chunk-75A5A7MH.js";
12
+
13
+ // src/wallets/walletConnectors/trustWallet/trustWallet.ts
14
+ var trustWallet = ({ projectId, walletConnectParameters }) => {
15
+ const isTrustWalletInjected = isMobile() ? hasInjectedProvider({ flag: "isTrust" }) : hasInjectedProvider({ flag: "isTrustWallet" });
16
+ const shouldUseWalletConnect = !isTrustWalletInjected;
17
+ const getUriMobile = (uri) => {
18
+ return `trust://wc?uri=${encodeURIComponent(uri)}`;
19
+ };
20
+ const getUriQR = (uri) => {
21
+ return uri;
22
+ };
23
+ const mobileConnector = {
24
+ getUri: shouldUseWalletConnect ? getUriMobile : void 0
25
+ };
26
+ let qrConnector = void 0;
27
+ if (shouldUseWalletConnect) {
28
+ qrConnector = {
29
+ getUri: getUriQR,
30
+ instructions: {
31
+ learnMoreUrl: "https://trustwallet.com/",
32
+ steps: [
33
+ {
34
+ description: "wallet_connectors.trust.qr_code.step1.description",
35
+ step: "install",
36
+ title: "wallet_connectors.trust.qr_code.step1.title"
37
+ },
38
+ {
39
+ description: "wallet_connectors.trust.qr_code.step2.description",
40
+ step: "create",
41
+ title: "wallet_connectors.trust.qr_code.step2.title"
42
+ },
43
+ {
44
+ description: "wallet_connectors.trust.qr_code.step3.description",
45
+ step: "scan",
46
+ title: "wallet_connectors.trust.qr_code.step3.title"
47
+ }
48
+ ]
49
+ }
50
+ };
51
+ }
52
+ const extensionConnector = {
53
+ instructions: {
54
+ learnMoreUrl: "https://trustwallet.com/browser-extension",
55
+ steps: [
56
+ {
57
+ description: "wallet_connectors.trust.extension.step1.description",
58
+ step: "install",
59
+ title: "wallet_connectors.trust.extension.step1.title"
60
+ },
61
+ {
62
+ description: "wallet_connectors.trust.extension.step2.description",
63
+ step: "create",
64
+ title: "wallet_connectors.trust.extension.step2.title"
65
+ },
66
+ {
67
+ description: "wallet_connectors.trust.extension.step3.description",
68
+ step: "refresh",
69
+ title: "wallet_connectors.trust.extension.step3.title"
70
+ }
71
+ ]
72
+ }
73
+ };
74
+ return {
75
+ id: "trust",
76
+ name: "Trust Wallet",
77
+ rdns: "com.trustwallet.app",
78
+ iconUrl: async () => (await import("./trustWallet-E2GVGE4U.js")).default,
79
+ // Note that we never resolve `installed` to `false` because the
80
+ // Trust Wallet provider falls back to other connection methods if
81
+ // the injected connector isn't available
82
+ installed: isTrustWalletInjected || void 0,
83
+ iconAccent: "#3375BB",
84
+ iconBackground: "#fff",
85
+ downloadUrls: {
86
+ android: "https://play.google.com/store/apps/details?id=com.wallet.crypto.trustapp",
87
+ ios: "https://apps.apple.com/us/app/trust-crypto-bitcoin-wallet/id1288339409",
88
+ mobile: "https://trustwallet.com/download",
89
+ qrCode: "https://trustwallet.com/download",
90
+ chrome: "https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph",
91
+ browserExtension: "https://trustwallet.com/browser-extension"
92
+ },
93
+ mobile: mobileConnector,
94
+ qrCode: qrConnector,
95
+ extension: extensionConnector,
96
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
97
+ projectId,
98
+ walletConnectParameters
99
+ }) : isMobile() ? getInjectedConnector({ flag: "isTrust" }) : getInjectedConnector({ flag: "isTrustWallet" })
100
+ };
101
+ };
102
+
103
+ export {
104
+ trustWallet
105
+ };