@talken/talkenkit 2.3.8 → 2.3.10

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 (65) hide show
  1. package/dist/chunk-M2CMB5B2.js +93 -0
  2. package/dist/components/AbcLoginModal/AbcAuthModal.d.ts +11 -1
  3. package/dist/components/ConnectOptions/CompactMobileOptions.css.d.ts +26 -0
  4. package/dist/components/ConnectOptions/CompactMobileOptions.d.ts +19 -0
  5. package/dist/components/ConnectOptions/DesktopOptions.d.ts +9 -2
  6. package/dist/components/RainbowKitProvider/RainbowKitConfigProvider.d.ts +20 -0
  7. package/dist/components/RainbowKitProvider/RainbowKitProvider.d.ts +16 -1
  8. package/dist/encryption-3YHRI3PA.js +14 -0
  9. package/dist/hooks/useDeviceType.d.ts +9 -0
  10. package/dist/index.d.ts +4 -0
  11. package/dist/index.js +896 -687
  12. package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +2 -2
  13. package/dist/wallets/walletConnectors/abcWallet/abcSolanaWallet.js +2 -2
  14. package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +3 -3
  15. package/dist/wallets/walletConnectors/abcWallet/api/index.js +8 -8
  16. package/dist/wallets/walletConnectors/abcWallet/index.js +17 -17
  17. package/dist/wallets/walletConnectors/berasigWallet/berasigWallet.js +2 -2
  18. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  19. package/dist/wallets/walletConnectors/binanceWallet/binanceWallet.js +2 -2
  20. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  21. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  22. package/dist/wallets/walletConnectors/chunk-25JJ3PT5.js +228 -0
  23. package/dist/wallets/walletConnectors/chunk-3WVSOTC4.js +63 -0
  24. package/dist/wallets/walletConnectors/chunk-43LOEA55.js +63 -0
  25. package/dist/wallets/walletConnectors/chunk-4LVXMPGO.js +44 -0
  26. package/dist/wallets/walletConnectors/chunk-4NLOE5S3.js +63 -0
  27. package/dist/wallets/walletConnectors/chunk-5MSMALF7.js +63 -0
  28. package/dist/wallets/walletConnectors/chunk-6KOHIL7T.js +63 -0
  29. package/dist/wallets/walletConnectors/chunk-7FFIZE76.js +63 -0
  30. package/dist/wallets/walletConnectors/chunk-DP2HUTLN.js +63 -0
  31. package/dist/wallets/walletConnectors/chunk-HS2FAOAJ.js +63 -0
  32. package/dist/wallets/walletConnectors/chunk-IA4EQFSS.js +474 -0
  33. package/dist/wallets/walletConnectors/chunk-IHM7I7D5.js +63 -0
  34. package/dist/wallets/walletConnectors/chunk-NA5G3LSC.js +63 -0
  35. package/dist/wallets/walletConnectors/chunk-NASGGIUS.js +63 -0
  36. package/dist/wallets/walletConnectors/chunk-NVM3JZ4L.js +63 -0
  37. package/dist/wallets/walletConnectors/chunk-PLL7P7HY.js +63 -0
  38. package/dist/wallets/walletConnectors/chunk-RUZBOPMI.js +63 -0
  39. package/dist/wallets/walletConnectors/chunk-SMACAFVM.js +63 -0
  40. package/dist/wallets/walletConnectors/chunk-SUXK3JW6.js +280 -0
  41. package/dist/wallets/walletConnectors/chunk-XDRZSWHB.js +63 -0
  42. package/dist/wallets/walletConnectors/chunk-XKVRDEDK.js +63 -0
  43. package/dist/wallets/walletConnectors/chunk-XYAAXWWU.js +63 -0
  44. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  45. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  46. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  47. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  48. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  49. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  50. package/dist/wallets/walletConnectors/index.js +86 -86
  51. package/dist/wallets/walletConnectors/iopayWallet/iopayWallet.js +2 -2
  52. package/dist/wallets/walletConnectors/kaiaWallet/kaiaWallet.js +2 -2
  53. package/dist/wallets/walletConnectors/kaikasWallet/kaikasWallet.js +2 -2
  54. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  55. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  56. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  57. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  58. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  59. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  60. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  61. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  62. package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +2 -2
  63. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  64. package/package.json +12 -11
  65. package/LICENSE +0 -9
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  abcConnector
4
- } from "../chunk-BHMMHU7Y.js";
4
+ } from "../chunk-CNHVIXPV.js";
5
+ import "../chunk-73B7HWCT.js";
5
6
  import "../chunk-P2E4LSYH.js";
6
7
  import "../chunk-G2LI5MVX.js";
7
- import "../chunk-73B7HWCT.js";
8
8
  import "../chunk-W23N7VC4.js";
9
9
  import "../chunk-VETRBBA2.js";
10
10
  import "../chunk-5UEBEMEE.js";
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  abcSolanaWallet
4
- } from "../chunk-OEB7MRS5.js";
5
- import "../chunk-AEQOPQL6.js";
4
+ } from "../chunk-2GIBC7XF.js";
6
5
  import "../chunk-MY5YIDOB.js";
6
+ import "../chunk-AEQOPQL6.js";
7
7
  import "../chunk-P2E4LSYH.js";
8
8
  import "../chunk-G2LI5MVX.js";
9
9
  import "../chunk-W23N7VC4.js";
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  abcWallet
4
- } from "../chunk-RSZS2RMC.js";
5
- import "../chunk-BHMMHU7Y.js";
4
+ } from "../chunk-5OFAP55G.js";
5
+ import "../chunk-CNHVIXPV.js";
6
+ import "../chunk-73B7HWCT.js";
6
7
  import "../chunk-P2E4LSYH.js";
7
8
  import "../chunk-G2LI5MVX.js";
8
- import "../chunk-73B7HWCT.js";
9
9
  import "../chunk-W23N7VC4.js";
10
10
  import "../chunk-VETRBBA2.js";
11
11
  import "../chunk-5UEBEMEE.js";
@@ -2,16 +2,16 @@
2
2
  import {
3
3
  AbcWaasApiClient,
4
4
  createAbcWaasApiClient
5
- } from "../../chunk-GXHCAEWR.js";
5
+ } from "../../chunk-SMACAFVM.js";
6
6
  import {
7
- TransactionApi
8
- } from "../../chunk-KD2OAMDA.js";
9
- import {
10
- AuthApi
11
- } from "../../chunk-W7R3JGSC.js";
7
+ WalletApi
8
+ } from "../../chunk-JBRW4UTW.js";
12
9
  import {
13
10
  BitcoinApi
14
11
  } from "../../chunk-SPR4W5TG.js";
12
+ import {
13
+ AuthApi
14
+ } from "../../chunk-W7R3JGSC.js";
15
15
  import {
16
16
  SigningApi
17
17
  } from "../../chunk-4UGXLYKP.js";
@@ -19,8 +19,8 @@ import {
19
19
  SolanaApi
20
20
  } from "../../chunk-DMRM7XAS.js";
21
21
  import {
22
- WalletApi
23
- } from "../../chunk-JBRW4UTW.js";
22
+ TransactionApi
23
+ } from "../../chunk-KD2OAMDA.js";
24
24
  import {
25
25
  BaseApiClient
26
26
  } from "../../chunk-IOLHAU7H.js";
@@ -2,24 +2,21 @@
2
2
  import {
3
3
  AbcWaasApiClient,
4
4
  createAbcWaasApiClient
5
- } from "../chunk-GXHCAEWR.js";
6
- import "../chunk-KD2OAMDA.js";
5
+ } from "../chunk-SMACAFVM.js";
6
+ import "../chunk-JBRW4UTW.js";
7
7
  import {
8
8
  generateMpcWallets,
9
9
  recoverMpcWallets,
10
10
  validateMpcWallets
11
11
  } from "../chunk-WTYSUOKN.js";
12
- import "../chunk-W7R3JGSC.js";
13
12
  import {
14
13
  BitcoinApi
15
14
  } from "../chunk-SPR4W5TG.js";
15
+ import "../chunk-W7R3JGSC.js";
16
16
  import "../chunk-4UGXLYKP.js";
17
17
  import "../chunk-DMRM7XAS.js";
18
- import "../chunk-JBRW4UTW.js";
18
+ import "../chunk-KD2OAMDA.js";
19
19
  import "../chunk-IOLHAU7H.js";
20
- import {
21
- abcSolanaWallet
22
- } from "../chunk-OEB7MRS5.js";
23
20
  import {
24
21
  AbcBitcoinConnector,
25
22
  createAbcBitcoinConnector
@@ -33,20 +30,28 @@ import {
33
30
  AbcSolProvider
34
31
  } from "../chunk-X5LRFFBP.js";
35
32
  import {
36
- AbcSolanaConnector,
37
- createAbcSolanaConnector
38
- } from "../chunk-AEQOPQL6.js";
33
+ abcSolanaWallet
34
+ } from "../chunk-2GIBC7XF.js";
39
35
  import {
40
36
  AbcSolanaProvider,
41
37
  SOLANA_NETWORKS,
42
38
  createAbcSolanaProvider
43
39
  } from "../chunk-MY5YIDOB.js";
40
+ import {
41
+ AbcSolanaConnector,
42
+ createAbcSolanaConnector
43
+ } from "../chunk-AEQOPQL6.js";
44
44
  import {
45
45
  abcWallet
46
- } from "../chunk-RSZS2RMC.js";
46
+ } from "../chunk-5OFAP55G.js";
47
47
  import {
48
48
  abcConnector
49
- } from "../chunk-BHMMHU7Y.js";
49
+ } from "../chunk-CNHVIXPV.js";
50
+ import {
51
+ AbcEvmProvider,
52
+ createAbcEvmProvider,
53
+ createAbcProvider
54
+ } from "../chunk-73B7HWCT.js";
50
55
  import {
51
56
  AbcWaasClient,
52
57
  createAbcWaasClient
@@ -54,11 +59,6 @@ import {
54
59
  import {
55
60
  secure_default
56
61
  } from "../chunk-G2LI5MVX.js";
57
- import {
58
- AbcEvmProvider,
59
- createAbcEvmProvider,
60
- createAbcProvider
61
- } from "../chunk-73B7HWCT.js";
62
62
  import {
63
63
  calculateExpiryTimestamp,
64
64
  clearAuthState,
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  berasigWallet
4
- } from "../chunk-UZWMFUJU.js";
5
- import "../chunk-PODFK4OS.js";
4
+ } from "../chunk-KM55XFBI.js";
6
5
  import "../chunk-MBBGZGXF.js";
6
+ import "../chunk-PODFK4OS.js";
7
7
  export {
8
8
  berasigWallet
9
9
  };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  bifrostWallet
4
- } from "../chunk-WXXI4WBF.js";
4
+ } from "../chunk-B6DM7J4N.js";
5
5
  import "../chunk-RETKWSKD.js";
6
- import "../chunk-PODFK4OS.js";
7
6
  import "../chunk-MBBGZGXF.js";
7
+ import "../chunk-PODFK4OS.js";
8
8
  export {
9
9
  bifrostWallet
10
10
  };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  binanceWallet
4
- } from "../chunk-TUDZHFVC.js";
4
+ } from "../chunk-4T3UOJYR.js";
5
5
  import "../chunk-RETKWSKD.js";
6
- import "../chunk-PODFK4OS.js";
7
6
  import "../chunk-MBBGZGXF.js";
7
+ import "../chunk-PODFK4OS.js";
8
8
  export {
9
9
  binanceWallet
10
10
  };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  bitgetWallet
4
- } from "../chunk-ITLTDJ3D.js";
4
+ } from "../chunk-CULIWWLV.js";
5
5
  import "../chunk-RETKWSKD.js";
6
- import "../chunk-PODFK4OS.js";
7
6
  import "../chunk-MBBGZGXF.js";
7
+ import "../chunk-PODFK4OS.js";
8
8
  export {
9
9
  bitgetWallet
10
10
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  bybitWallet
4
- } from "../chunk-DW37ROR6.js";
5
- import "../chunk-PODFK4OS.js";
4
+ } from "../chunk-WSLFMQIG.js";
6
5
  import "../chunk-MBBGZGXF.js";
6
+ import "../chunk-PODFK4OS.js";
7
7
  export {
8
8
  bybitWallet
9
9
  };
@@ -0,0 +1,228 @@
1
+ "use client";
2
+ import {
3
+ createAbcEvmProvider
4
+ } from "./chunk-XYPR4BAF.js";
5
+ import {
6
+ createAbcWaasClient
7
+ } from "./chunk-DAZZIITX.js";
8
+ import {
9
+ clearAuthState,
10
+ clearEncryptedTokens,
11
+ loadAuthState,
12
+ saveAuthState
13
+ } from "./chunk-W2VDZD74.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,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-SPR4W5TG.js";
11
+ import {
12
+ SigningApi
13
+ } from "./chunk-4UGXLYKP.js";
14
+ import {
15
+ TransactionApi
16
+ } from "./chunk-KD2OAMDA.js";
17
+ import {
18
+ SolanaApi
19
+ } from "./chunk-DMRM7XAS.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,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-SPR4W5TG.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,44 @@
1
+ "use client";
2
+ import {
3
+ abcConnector
4
+ } from "./chunk-25JJ3PT5.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
+ };
@@ -0,0 +1,63 @@
1
+ "use client";
2
+ import {
3
+ BitcoinApi
4
+ } from "./chunk-SPR4W5TG.js";
5
+ import {
6
+ AuthApi
7
+ } from "./chunk-W7R3JGSC.js";
8
+ import {
9
+ SigningApi
10
+ } from "./chunk-4UGXLYKP.js";
11
+ import {
12
+ SolanaApi
13
+ } from "./chunk-DMRM7XAS.js";
14
+ import {
15
+ TransactionApi
16
+ } from "./chunk-KD2OAMDA.js";
17
+ import {
18
+ WalletApi
19
+ } from "./chunk-JBRW4UTW.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
+ };