@talken/talkenkit 2.3.4 → 2.3.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.
Files changed (99) hide show
  1. package/dist/index.js +21 -27
  2. package/dist/wallets/walletConnectors/abcWallet/abcApi.js +1 -1
  3. package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +2 -2
  4. package/dist/wallets/walletConnectors/abcWallet/abcSolanaWallet.js +2 -2
  5. package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +3 -3
  6. package/dist/wallets/walletConnectors/abcWallet/api/index.js +4 -4
  7. package/dist/wallets/walletConnectors/abcWallet/index.js +6 -6
  8. package/dist/wallets/walletConnectors/chunk-2J66VMY5.js +152 -0
  9. package/dist/wallets/walletConnectors/chunk-2J6LHJAF.js +228 -0
  10. package/dist/wallets/walletConnectors/chunk-2W6UBYKX.js +66 -0
  11. package/dist/wallets/walletConnectors/chunk-2ZPGPZCP.js +228 -0
  12. package/dist/wallets/walletConnectors/chunk-3DPCIDW6.js +1730 -0
  13. package/dist/wallets/walletConnectors/chunk-3IVTKZ7V.js +87 -0
  14. package/dist/wallets/walletConnectors/chunk-47TQ23J4.js +63 -0
  15. package/dist/wallets/walletConnectors/chunk-4HKJ53H3.js +1742 -0
  16. package/dist/wallets/walletConnectors/chunk-4T3UOJYR.js +76 -0
  17. package/dist/wallets/walletConnectors/chunk-53IBFGVW.js +102 -0
  18. package/dist/wallets/walletConnectors/chunk-5EARL7FN.js +39 -0
  19. package/dist/wallets/walletConnectors/chunk-5NM2LK2G.js +95 -0
  20. package/dist/wallets/walletConnectors/chunk-66SCJ77O.js +63 -0
  21. package/dist/wallets/walletConnectors/chunk-6JKWIEGA.js +228 -0
  22. package/dist/wallets/walletConnectors/chunk-7L33BY4P.js +44 -0
  23. package/dist/wallets/walletConnectors/chunk-7SXCH5TL.js +1752 -0
  24. package/dist/wallets/walletConnectors/chunk-7UZBDZZZ.js +599 -0
  25. package/dist/wallets/walletConnectors/chunk-AKLKCDXT.js +186 -0
  26. package/dist/wallets/walletConnectors/chunk-ATQWOE4J.js +110 -0
  27. package/dist/wallets/walletConnectors/chunk-B6DM7J4N.js +71 -0
  28. package/dist/wallets/walletConnectors/chunk-BHMMHU7Y.js +228 -0
  29. package/dist/wallets/walletConnectors/chunk-BJYSWRV6.js +93 -0
  30. package/dist/wallets/walletConnectors/chunk-BRM4ZVXZ.js +44 -0
  31. package/dist/wallets/walletConnectors/chunk-BUDWZAL7.js +44 -0
  32. package/dist/wallets/walletConnectors/chunk-C7S72VGD.js +93 -0
  33. package/dist/wallets/walletConnectors/chunk-CSWWNAYR.js +44 -0
  34. package/dist/wallets/walletConnectors/chunk-CULIWWLV.js +101 -0
  35. package/dist/wallets/walletConnectors/chunk-D7U5WEH2.js +96 -0
  36. package/dist/wallets/walletConnectors/chunk-E4N7SPPU.js +39 -0
  37. package/dist/wallets/walletConnectors/chunk-ENU7XLF5.js +44 -0
  38. package/dist/wallets/walletConnectors/chunk-ESRU5KCF.js +151 -0
  39. package/dist/wallets/walletConnectors/chunk-FBI7UGNO.js +95 -0
  40. package/dist/wallets/walletConnectors/chunk-FF7ZIXKD.js +39 -0
  41. package/dist/wallets/walletConnectors/chunk-FJCL2YPU.js +1737 -0
  42. package/dist/wallets/walletConnectors/chunk-FSU3WBH3.js +63 -0
  43. package/dist/wallets/walletConnectors/chunk-G2IHR6PW.js +63 -0
  44. package/dist/wallets/walletConnectors/chunk-GILMNC3J.js +96 -0
  45. package/dist/wallets/walletConnectors/chunk-HDYBRMYW.js +194 -0
  46. package/dist/wallets/walletConnectors/chunk-HIZCIW5L.js +228 -0
  47. package/dist/wallets/walletConnectors/chunk-JBVBQUCS.js +73 -0
  48. package/dist/wallets/walletConnectors/chunk-JCMXNOQ5.js +63 -0
  49. package/dist/wallets/walletConnectors/chunk-JWO4ZQLK.js +98 -0
  50. package/dist/wallets/walletConnectors/chunk-K6GEK4JB.js +66 -0
  51. package/dist/wallets/walletConnectors/chunk-K6UZPSBG.js +94 -0
  52. package/dist/wallets/walletConnectors/chunk-KIQDE4N6.js +39 -0
  53. package/dist/wallets/walletConnectors/chunk-KM55XFBI.js +65 -0
  54. package/dist/wallets/walletConnectors/chunk-KOT7JYJR.js +39 -0
  55. package/dist/wallets/walletConnectors/chunk-KRAIITU7.js +39 -0
  56. package/dist/wallets/walletConnectors/chunk-KZOSE2PI.js +228 -0
  57. package/dist/wallets/walletConnectors/chunk-L7I5I4CZ.js +44 -0
  58. package/dist/wallets/walletConnectors/chunk-LNZJLKFB.js +39 -0
  59. package/dist/wallets/walletConnectors/chunk-LTBQU2GW.js +63 -0
  60. package/dist/wallets/walletConnectors/chunk-LV765WZL.js +1748 -0
  61. package/dist/wallets/walletConnectors/chunk-MSI2BPP5.js +1722 -0
  62. package/dist/wallets/walletConnectors/chunk-MX2IY5CD.js +44 -0
  63. package/dist/wallets/walletConnectors/chunk-NLX2EV7O.js +44 -0
  64. package/dist/wallets/walletConnectors/chunk-NVAZ3B3V.js +228 -0
  65. package/dist/wallets/walletConnectors/chunk-OEB7MRS5.js +39 -0
  66. package/dist/wallets/walletConnectors/chunk-OEWU3ZMN.js +39 -0
  67. package/dist/wallets/walletConnectors/chunk-P2E4LSYH.js +1678 -0
  68. package/dist/wallets/walletConnectors/chunk-P2MTINFI.js +280 -0
  69. package/dist/wallets/walletConnectors/chunk-PNMSIVVT.js +44 -0
  70. package/dist/wallets/walletConnectors/chunk-PZNYT2HC.js +1722 -0
  71. package/dist/wallets/walletConnectors/chunk-QZRNNI3E.js +39 -0
  72. package/dist/wallets/walletConnectors/chunk-R4UYVU5X.js +1721 -0
  73. package/dist/wallets/walletConnectors/chunk-R6JCHV55.js +39 -0
  74. package/dist/wallets/walletConnectors/chunk-RLBGBBIO.js +309 -0
  75. package/dist/wallets/walletConnectors/chunk-RSZS2RMC.js +44 -0
  76. package/dist/wallets/walletConnectors/chunk-S2PY4MDO.js +108 -0
  77. package/dist/wallets/walletConnectors/chunk-SCOX5RF4.js +91 -0
  78. package/dist/wallets/walletConnectors/chunk-TUUNSVKZ.js +345 -0
  79. package/dist/wallets/walletConnectors/chunk-U2CUEL35.js +240 -0
  80. package/dist/wallets/walletConnectors/chunk-V6NRLREB.js +44 -0
  81. package/dist/wallets/walletConnectors/chunk-V7E5KRXJ.js +103 -0
  82. package/dist/wallets/walletConnectors/chunk-VCBVYFLJ.js +63 -0
  83. package/dist/wallets/walletConnectors/chunk-VM7AEC7H.js +39 -0
  84. package/dist/wallets/walletConnectors/chunk-VPNKJ7PB.js +1674 -0
  85. package/dist/wallets/walletConnectors/chunk-W2VDZD74.js +478 -0
  86. package/dist/wallets/walletConnectors/chunk-WAO3KL5U.js +285 -0
  87. package/dist/wallets/walletConnectors/chunk-WPHTIILX.js +228 -0
  88. package/dist/wallets/walletConnectors/chunk-WR7HSVMH.js +228 -0
  89. package/dist/wallets/walletConnectors/chunk-WSCJY2QD.js +228 -0
  90. package/dist/wallets/walletConnectors/chunk-WSLFMQIG.js +98 -0
  91. package/dist/wallets/walletConnectors/chunk-X3JQB5QL.js +44 -0
  92. package/dist/wallets/walletConnectors/chunk-X4CDP7L7.js +228 -0
  93. package/dist/wallets/walletConnectors/chunk-XETOVXYM.js +228 -0
  94. package/dist/wallets/walletConnectors/chunk-XYPR4BAF.js +436 -0
  95. package/dist/wallets/walletConnectors/chunk-YZBFKVTX.js +1675 -0
  96. package/dist/wallets/walletConnectors/chunk-Z2E65XSS.js +96 -0
  97. package/dist/wallets/walletConnectors/chunk-Z2ZRPTPX.js +1726 -0
  98. package/dist/wallets/walletConnectors/index.js +13 -13
  99. package/package.json +1 -1
@@ -0,0 +1,76 @@
1
+ "use client";
2
+ import {
3
+ isAndroid
4
+ } from "./chunk-RETKWSKD.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-MBBGZGXF.js";
9
+ import {
10
+ getWalletConnectConnector
11
+ } from "./chunk-PODFK4OS.js";
12
+
13
+ // src/wallets/walletConnectors/binanceWallet/binanceWallet.ts
14
+ var binanceWallet = ({
15
+ projectId,
16
+ walletConnectParameters
17
+ }) => {
18
+ const isBinanceInjected = hasInjectedProvider({
19
+ flag: "isBinance"
20
+ });
21
+ const shouldUseWalletConnect = !isBinanceInjected;
22
+ return {
23
+ id: "binance",
24
+ name: "Binance Wallet",
25
+ rdns: "com.binance.wallet",
26
+ iconUrl: async () => (await import("./binanceWallet-BCWLBY3Q.js")).default,
27
+ iconBackground: "#000000",
28
+ installed: !shouldUseWalletConnect ? isBinanceInjected : void 0,
29
+ downloadUrls: {
30
+ android: "https://play.google.com/store/apps/details?id=com.binance.dev",
31
+ ios: "https://apps.apple.com/us/app/id1436799971",
32
+ mobile: "https://www.binance.com/en/download",
33
+ qrCode: "https://www.binance.com/en/web3wallet"
34
+ },
35
+ mobile: shouldUseWalletConnect ? {
36
+ getUri: (uri) => {
37
+ return isAndroid() ? uri : `bnc://app.binance.com/cedefi/wc?uri=${encodeURIComponent(
38
+ uri
39
+ )}`;
40
+ }
41
+ } : void 0,
42
+ qrCode: shouldUseWalletConnect ? {
43
+ getUri: (uri) => uri,
44
+ instructions: {
45
+ learnMoreUrl: "https://www.binance.com/en/web3wallet",
46
+ steps: [
47
+ {
48
+ description: "wallet_connectors.binance.qr_code.step1.description",
49
+ step: "install",
50
+ title: "wallet_connectors.binance.qr_code.step1.title"
51
+ },
52
+ {
53
+ description: "wallet_connectors.binance.qr_code.step2.description",
54
+ step: "create",
55
+ title: "wallet_connectors.binance.qr_code.step2.title"
56
+ },
57
+ {
58
+ description: "wallet_connectors.binance.qr_code.step3.description",
59
+ step: "scan",
60
+ title: "wallet_connectors.binance.qr_code.step3.title"
61
+ }
62
+ ]
63
+ }
64
+ } : void 0,
65
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
66
+ projectId,
67
+ walletConnectParameters
68
+ }) : getInjectedConnector({
69
+ flag: "isBinance"
70
+ })
71
+ };
72
+ };
73
+
74
+ export {
75
+ binanceWallet
76
+ };
@@ -0,0 +1,102 @@
1
+ "use client";
2
+ import {
3
+ isIOS
4
+ } from "./chunk-RETKWSKD.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-MBBGZGXF.js";
9
+ import {
10
+ getWalletConnectConnector
11
+ } from "./chunk-PODFK4OS.js";
12
+
13
+ // src/wallets/walletConnectors/zerionWallet/zerionWallet.ts
14
+ var zerionWallet = ({
15
+ projectId,
16
+ walletConnectParameters
17
+ }) => {
18
+ const isZerionInjected = hasInjectedProvider({
19
+ namespace: "zerionWallet",
20
+ flag: "isZerion"
21
+ });
22
+ const shouldUseWalletConnect = !isZerionInjected;
23
+ const getUri = (uri) => {
24
+ return isIOS() ? `zerion://wc?uri=${encodeURIComponent(uri)}` : uri;
25
+ };
26
+ return {
27
+ id: "zerion",
28
+ name: "Zerion",
29
+ rdns: "io.zerion.wallet",
30
+ iconUrl: async () => (await import("./zerionWallet-CYFHB5PA.js")).default,
31
+ iconAccent: "#2962ef",
32
+ iconBackground: "#2962ef",
33
+ installed: !shouldUseWalletConnect ? isZerionInjected : void 0,
34
+ downloadUrls: {
35
+ android: "https://play.google.com/store/apps/details?id=io.zerion.android",
36
+ ios: "https://apps.apple.com/app/apple-store/id1456732565",
37
+ mobile: "https://link.zerion.io/pt3gdRP0njb",
38
+ qrCode: "https://link.zerion.io/pt3gdRP0njb",
39
+ chrome: "https://chrome.google.com/webstore/detail/klghhnkeealcohjjanjjdaeeggmfmlpl",
40
+ browserExtension: "https://zerion.io/extension"
41
+ },
42
+ mobile: {
43
+ getUri: shouldUseWalletConnect ? getUri : void 0
44
+ },
45
+ qrCode: shouldUseWalletConnect ? {
46
+ getUri,
47
+ instructions: {
48
+ learnMoreUrl: "https://zerion.io/blog/announcing-the-zerion-smart-wallet/",
49
+ steps: [
50
+ {
51
+ description: "wallet_connectors.zerion.qr_code.step1.description",
52
+ step: "install",
53
+ title: "wallet_connectors.zerion.qr_code.step1.title"
54
+ },
55
+ {
56
+ description: "wallet_connectors.zerion.qr_code.step2.description",
57
+ step: "create",
58
+ title: "wallet_connectors.zerion.qr_code.step2.title"
59
+ },
60
+ {
61
+ description: "wallet_connectors.zerion.qr_code.step3.description",
62
+ step: "scan",
63
+ title: "wallet_connectors.zerion.qr_code.step3.title"
64
+ }
65
+ ]
66
+ }
67
+ } : void 0,
68
+ extension: {
69
+ instructions: {
70
+ learnMoreUrl: "https://help.zerion.io/en/",
71
+ steps: [
72
+ {
73
+ description: "wallet_connectors.zerion.extension.step1.description",
74
+ step: "install",
75
+ title: "wallet_connectors.zerion.extension.step1.title"
76
+ },
77
+ {
78
+ description: "wallet_connectors.zerion.extension.step2.description",
79
+ step: "create",
80
+ title: "wallet_connectors.zerion.extension.step2.title"
81
+ },
82
+ {
83
+ description: "wallet_connectors.zerion.extension.step3.description",
84
+ step: "refresh",
85
+ title: "wallet_connectors.zerion.extension.step3.title"
86
+ }
87
+ ]
88
+ }
89
+ },
90
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
91
+ projectId,
92
+ walletConnectParameters
93
+ }) : getInjectedConnector({
94
+ namespace: "zerionWallet",
95
+ flag: "isZerion"
96
+ })
97
+ };
98
+ };
99
+
100
+ export {
101
+ zerionWallet
102
+ };
@@ -0,0 +1,39 @@
1
+ "use client";
2
+ import {
3
+ createAbcSolanaConnector
4
+ } from "./chunk-AEQOPQL6.js";
5
+ import {
6
+ createAbcSolanaProvider
7
+ } from "./chunk-MY5YIDOB.js";
8
+ import {
9
+ createAbcWaasClient
10
+ } from "./chunk-7SXCH5TL.js";
11
+
12
+ // src/wallets/walletConnectors/abcWallet/abcSolanaWallet.ts
13
+ var abcSolanaWallet = (options) => ({
14
+ id: "abc-solana",
15
+ name: "ABC Solana Wallet",
16
+ iconUrl: async () => (await import("./abcWallet-AYWSIGAG.js")).default,
17
+ iconBackground: "#fff",
18
+ // Embedded wallet - no download URLs needed
19
+ installed: void 0,
20
+ createConnector: () => {
21
+ console.log("[abcSolanaWallet] Creating Solana connector with options:", {
22
+ hasConfig: !!options.config,
23
+ waasUrl: options.config.waasUrl,
24
+ environment: options.config.environment
25
+ });
26
+ const client = createAbcWaasClient(options.config);
27
+ const provider = createAbcSolanaProvider(client);
28
+ const connector = createAbcSolanaConnector({
29
+ client,
30
+ provider
31
+ });
32
+ console.log("[abcSolanaWallet] Solana connector created successfully");
33
+ return connector;
34
+ }
35
+ });
36
+
37
+ export {
38
+ abcSolanaWallet
39
+ };
@@ -0,0 +1,95 @@
1
+ "use client";
2
+ import {
3
+ isMobile
4
+ } from "./chunk-RETKWSKD.js";
5
+ import {
6
+ getInjectedConnector,
7
+ hasInjectedProvider
8
+ } from "./chunk-MBBGZGXF.js";
9
+ import {
10
+ getWalletConnectConnector
11
+ } from "./chunk-PODFK4OS.js";
12
+
13
+ // src/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.ts
14
+ var tokenPocketWallet = ({
15
+ projectId,
16
+ walletConnectParameters
17
+ }) => {
18
+ const isTokenPocketInjected = hasInjectedProvider({ flag: "isTokenPocket" });
19
+ const shouldUseWalletConnect = !isTokenPocketInjected;
20
+ const getUri = (uri) => {
21
+ return isMobile() ? `tpoutside://wc?uri=${encodeURIComponent(uri)}` : uri;
22
+ };
23
+ return {
24
+ id: "tokenPocket",
25
+ name: "TokenPocket",
26
+ rdns: "pro.tokenpocket",
27
+ iconUrl: async () => (await import("./tokenPocketWallet-BVMBOYTC.js")).default,
28
+ iconBackground: "#2980FE",
29
+ installed: !shouldUseWalletConnect ? isTokenPocketInjected : void 0,
30
+ downloadUrls: {
31
+ chrome: "https://chrome.google.com/webstore/detail/tokenpocket/mfgccjchihfkkindfppnaooecgfneiii",
32
+ browserExtension: "https://extension.tokenpocket.pro/",
33
+ android: "https://play.google.com/store/apps/details?id=vip.mytokenpocket",
34
+ ios: "https://apps.apple.com/us/app/tp-global-wallet/id6444625622",
35
+ qrCode: "https://tokenpocket.pro/en/download/app",
36
+ mobile: "https://tokenpocket.pro/en/download/app"
37
+ },
38
+ mobile: {
39
+ getUri: shouldUseWalletConnect ? getUri : void 0
40
+ },
41
+ qrCode: shouldUseWalletConnect ? {
42
+ getUri,
43
+ instructions: {
44
+ learnMoreUrl: "https://help.tokenpocket.pro/en/",
45
+ steps: [
46
+ {
47
+ description: "wallet_connectors.token_pocket.qr_code.step1.description",
48
+ step: "install",
49
+ title: "wallet_connectors.token_pocket.qr_code.step1.title"
50
+ },
51
+ {
52
+ description: "wallet_connectors.token_pocket.qr_code.step2.description",
53
+ step: "create",
54
+ title: "wallet_connectors.token_pocket.qr_code.step2.title"
55
+ },
56
+ {
57
+ description: "wallet_connectors.token_pocket.qr_code.step3.description",
58
+ step: "scan",
59
+ title: "wallet_connectors.token_pocket.qr_code.step3.title"
60
+ }
61
+ ]
62
+ }
63
+ } : void 0,
64
+ extension: {
65
+ instructions: {
66
+ learnMoreUrl: "https://help.tokenpocket.pro/en/extension-wallet/faq/installation-tutorial",
67
+ steps: [
68
+ {
69
+ description: "wallet_connectors.token_pocket.extension.step1.description",
70
+ step: "install",
71
+ title: "wallet_connectors.token_pocket.extension.step1.title"
72
+ },
73
+ {
74
+ description: "wallet_connectors.token_pocket.extension.step2.description",
75
+ step: "create",
76
+ title: "wallet_connectors.token_pocket.extension.step2.title"
77
+ },
78
+ {
79
+ description: "wallet_connectors.token_pocket.extension.step3.description",
80
+ step: "refresh",
81
+ title: "wallet_connectors.token_pocket.extension.step3.title"
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
87
+ projectId,
88
+ walletConnectParameters
89
+ }) : getInjectedConnector({ flag: "isTokenPocket" })
90
+ };
91
+ };
92
+
93
+ export {
94
+ tokenPocketWallet
95
+ };
@@ -0,0 +1,63 @@
1
+ "use client";
2
+ import {
3
+ WalletApi
4
+ } from "./chunk-JBRW4UTW.js";
5
+ import {
6
+ AuthApi
7
+ } from "./chunk-W7R3JGSC.js";
8
+ import {
9
+ BitcoinApi
10
+ } from "./chunk-BXCOGV3N.js";
11
+ import {
12
+ SolanaApi
13
+ } from "./chunk-DMRM7XAS.js";
14
+ import {
15
+ SigningApi
16
+ } from "./chunk-4UGXLYKP.js";
17
+ import {
18
+ TransactionApi
19
+ } from "./chunk-KD2OAMDA.js";
20
+
21
+ // src/wallets/walletConnectors/abcWallet/api/index.ts
22
+ var AbcWaasApiClient = class {
23
+ constructor(config) {
24
+ this.auth = new AuthApi(config);
25
+ this.wallet = new WalletApi(config);
26
+ this.transaction = new TransactionApi(config);
27
+ this.signing = new SigningApi(config);
28
+ this.solana = new SolanaApi(config);
29
+ this.bitcoin = new BitcoinApi(config);
30
+ }
31
+ /**
32
+ * Check if user is authenticated
33
+ */
34
+ isAuthenticated() {
35
+ return this.auth.isAuthenticated();
36
+ }
37
+ /**
38
+ * Check if access token is expired
39
+ */
40
+ isTokenExpired() {
41
+ return this.auth.isTokenExpired();
42
+ }
43
+ /**
44
+ * Get current access token
45
+ */
46
+ getAccessToken() {
47
+ return this.auth.getAccessToken();
48
+ }
49
+ /**
50
+ * Logout (clear tokens)
51
+ */
52
+ async logout() {
53
+ await this.auth.logout();
54
+ }
55
+ };
56
+ function createAbcWaasApiClient(config) {
57
+ return new AbcWaasApiClient(config);
58
+ }
59
+
60
+ export {
61
+ AbcWaasApiClient,
62
+ createAbcWaasApiClient
63
+ };
@@ -0,0 +1,228 @@
1
+ "use client";
2
+ import {
3
+ createAbcWaasClient
4
+ } from "./chunk-Z2ZRPTPX.js";
5
+ import {
6
+ createAbcEvmProvider
7
+ } from "./chunk-73B7HWCT.js";
8
+ import {
9
+ clearAuthState,
10
+ clearEncryptedTokens,
11
+ loadAuthState,
12
+ saveAuthState
13
+ } from "./chunk-W23N7VC4.js";
14
+
15
+ // src/wallets/walletConnectors/abcWallet/abcConnector.ts
16
+ import { createConnector } from "wagmi";
17
+ function abcConnector(options) {
18
+ const { config } = options;
19
+ return createConnector((wagmiConfig) => {
20
+ const client = createAbcWaasClient(config);
21
+ const provider = createAbcEvmProvider(client);
22
+ let accountsChangedHandler;
23
+ let chainChangedHandler;
24
+ let disconnectHandler;
25
+ return {
26
+ id: "abc",
27
+ name: "ABC Wallet",
28
+ type: "abc",
29
+ /**
30
+ * Connect wallet
31
+ */
32
+ async connect() {
33
+ try {
34
+ const authState = loadAuthState();
35
+ console.log("\u{1F527} ABC Connector connect() called:", {
36
+ hasAuthState: !!authState,
37
+ isAuthenticated: authState?.isAuthenticated,
38
+ hasWallet: !!authState?.wallet,
39
+ walletAddress: authState?.wallet?.address
40
+ });
41
+ if (!authState || !authState.isAuthenticated || !authState.wallet) {
42
+ throw new Error("ABC_LOGIN_REQUIRED");
43
+ }
44
+ provider.setWallet(authState.wallet);
45
+ console.log("\u2705 Provider wallet set:", {
46
+ address: authState.wallet.address,
47
+ hasPIN: !!authState.pin
48
+ });
49
+ const accounts = await provider.request({
50
+ method: "eth_requestAccounts"
51
+ });
52
+ const currentChainId = await provider.request({
53
+ method: "eth_chainId"
54
+ });
55
+ if (accountsChangedHandler) {
56
+ provider.removeListener("accountsChanged", accountsChangedHandler);
57
+ }
58
+ accountsChangedHandler = (accounts2) => {
59
+ wagmiConfig.emitter.emit("change", {
60
+ accounts: accounts2
61
+ });
62
+ };
63
+ provider.on("accountsChanged", accountsChangedHandler);
64
+ if (chainChangedHandler) {
65
+ provider.removeListener("chainChanged", chainChangedHandler);
66
+ }
67
+ chainChangedHandler = (chainId) => {
68
+ wagmiConfig.emitter.emit("change", {
69
+ chainId: Number(chainId)
70
+ });
71
+ };
72
+ provider.on("chainChanged", chainChangedHandler);
73
+ if (disconnectHandler) {
74
+ provider.removeListener("disconnect", disconnectHandler);
75
+ }
76
+ disconnectHandler = () => {
77
+ wagmiConfig.emitter.emit("disconnect");
78
+ this.onDisconnect();
79
+ };
80
+ provider.on("disconnect", disconnectHandler);
81
+ return {
82
+ accounts,
83
+ chainId: Number(currentChainId)
84
+ };
85
+ } catch (error) {
86
+ if (error.message === "ABC_LOGIN_REQUIRED") {
87
+ throw error;
88
+ }
89
+ throw error;
90
+ }
91
+ },
92
+ /**
93
+ * Disconnect wallet
94
+ */
95
+ async disconnect() {
96
+ if (accountsChangedHandler) {
97
+ provider.removeListener("accountsChanged", accountsChangedHandler);
98
+ accountsChangedHandler = void 0;
99
+ }
100
+ if (chainChangedHandler) {
101
+ provider.removeListener("chainChanged", chainChangedHandler);
102
+ chainChangedHandler = void 0;
103
+ }
104
+ if (disconnectHandler) {
105
+ provider.removeListener("disconnect", disconnectHandler);
106
+ disconnectHandler = void 0;
107
+ }
108
+ provider.clearWallet();
109
+ await client.logout();
110
+ let savedPinHash = null;
111
+ let savedEmail = null;
112
+ if (typeof window !== "undefined") {
113
+ savedPinHash = localStorage.getItem("talkenkit_abc_pin_hash");
114
+ savedEmail = localStorage.getItem("talkenkit_abc_saved_email");
115
+ }
116
+ clearAuthState();
117
+ clearEncryptedTokens();
118
+ if (typeof window !== "undefined") {
119
+ localStorage.removeItem("talkenkit_abc_enc_salt");
120
+ localStorage.removeItem("talkenkit_abc_enc_tokens");
121
+ if (savedPinHash) {
122
+ localStorage.setItem("talkenkit_abc_pin_hash", savedPinHash);
123
+ }
124
+ if (savedEmail) {
125
+ localStorage.setItem("talkenkit_abc_saved_email", savedEmail);
126
+ }
127
+ }
128
+ console.log("\u2705 ABC Wallet disconnected (PIN preserved)");
129
+ },
130
+ /**
131
+ * Get accounts
132
+ */
133
+ async getAccounts() {
134
+ const accounts = await provider.request({
135
+ method: "eth_accounts"
136
+ });
137
+ return accounts.map((account) => account);
138
+ },
139
+ /**
140
+ * Get chain ID
141
+ */
142
+ async getChainId() {
143
+ const chainId = await provider.request({
144
+ method: "eth_chainId"
145
+ });
146
+ return Number(chainId);
147
+ },
148
+ /**
149
+ * Get provider
150
+ */
151
+ async getProvider() {
152
+ return provider;
153
+ },
154
+ /**
155
+ * Check if authorized (has valid session)
156
+ */
157
+ async isAuthorized() {
158
+ try {
159
+ const authState = loadAuthState();
160
+ if (!authState || !authState.isAuthenticated) {
161
+ return false;
162
+ }
163
+ return client.isAuthenticated();
164
+ } catch {
165
+ return false;
166
+ }
167
+ },
168
+ /**
169
+ * Switch chain
170
+ */
171
+ async switchChain({ chainId }) {
172
+ await provider.request({
173
+ method: "wallet_switchEthereumChain",
174
+ params: [{ chainId: `0x${chainId.toString(16)}` }]
175
+ });
176
+ const newChainId = await this.getChainId();
177
+ const authState = loadAuthState();
178
+ if (authState?.wallet) {
179
+ authState.wallet.chainId = newChainId;
180
+ saveAuthState(authState);
181
+ }
182
+ return wagmiConfig.chains.find((x) => x.id === chainId) ?? {
183
+ id: chainId,
184
+ name: `Chain ${chainId}`,
185
+ nativeCurrency: {
186
+ name: "Ether",
187
+ decimals: 18,
188
+ symbol: "ETH"
189
+ },
190
+ rpcUrls: {
191
+ default: { http: [""] }
192
+ }
193
+ };
194
+ },
195
+ /**
196
+ * Handle accounts changed
197
+ */
198
+ onAccountsChanged(accounts) {
199
+ if (accounts.length === 0) {
200
+ this.onDisconnect();
201
+ } else {
202
+ wagmiConfig.emitter.emit("change", {
203
+ accounts
204
+ });
205
+ }
206
+ },
207
+ /**
208
+ * Handle chain changed
209
+ */
210
+ onChainChanged(chain) {
211
+ const chainId = Number(chain);
212
+ wagmiConfig.emitter.emit("change", { chainId });
213
+ },
214
+ /**
215
+ * Handle disconnect
216
+ */
217
+ onDisconnect(_error) {
218
+ provider.clearWallet();
219
+ clearAuthState();
220
+ wagmiConfig.emitter.emit("disconnect");
221
+ }
222
+ };
223
+ });
224
+ }
225
+
226
+ export {
227
+ abcConnector
228
+ };
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import {
3
+ abcConnector
4
+ } from "./chunk-WR7HSVMH.js";
5
+ import {
6
+ ABC_WALLET_METADATA
7
+ } from "./chunk-VETRBBA2.js";
8
+
9
+ // src/wallets/walletConnectors/abcWallet/abcWallet.ts
10
+ var abcWallet = (specificOptions) => ({ projectId }) => {
11
+ const waasUrl = specificOptions?.waasUrl || process.env.NEXT_PUBLIC_ABC_WAAS_URL || process.env.VITE_ABC_WAAS_URL;
12
+ if (!waasUrl) {
13
+ throw new Error(
14
+ 'ABC WaaS URL is required. Please provide it via:\n1. abcWallet({ waasUrl: "..." }) options, or\n2. NEXT_PUBLIC_ABC_WAAS_URL environment variable, or\n3. VITE_ABC_WAAS_URL environment variable'
15
+ );
16
+ }
17
+ const config = {
18
+ waasUrl,
19
+ apiKey: specificOptions?.apiKey,
20
+ plain: specificOptions?.plain || "",
21
+ // Deprecated - not used (secure.ts uses random generation)
22
+ environment: specificOptions?.environment || "development",
23
+ projectId
24
+ };
25
+ return {
26
+ id: ABC_WALLET_METADATA.id,
27
+ name: ABC_WALLET_METADATA.name,
28
+ rdns: ABC_WALLET_METADATA.rdns,
29
+ iconUrl: async () => (await import("./abcWallet-AYWSIGAG.js")).default,
30
+ iconBackground: ABC_WALLET_METADATA.iconBackground,
31
+ // Embedded wallet - no installation required
32
+ installed: void 0,
33
+ // No download URLs for embedded wallet
34
+ downloadUrls: void 0,
35
+ // Create connector - wrapper function required by Wallet type
36
+ createConnector: (_walletDetails) => abcConnector({ config }),
37
+ // Embedded wallet always available
38
+ hidden: () => false
39
+ };
40
+ };
41
+
42
+ export {
43
+ abcWallet
44
+ };