@talken/talkenkit 2.3.9 → 2.3.11

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 (61) hide show
  1. package/dist/__private__/index.d.ts +2 -2
  2. package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthFlow.d.ts +83 -0
  3. package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthSections.css.d.ts +8 -0
  4. package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthSections.d.ts +25 -0
  5. package/dist/components/ConnectOptions/AbcWaasAuth/hooks/useAbcWaasAuth.d.ts +65 -0
  6. package/dist/components/ConnectOptions/AbcWaasAuth/hooks/useAbcWaasSocial.d.ts +58 -0
  7. package/dist/components/ConnectOptions/AbcWaasAuth/hooks/useUserTypeDetection.d.ts +0 -0
  8. package/dist/components/ConnectOptions/AbcWaasAuth/index.d.ts +6 -0
  9. package/dist/components/ConnectOptions/AbcWaasAuth/types.d.ts +29 -0
  10. package/dist/components/ConnectOptions/ConnectDetails.d.ts +1 -1
  11. package/dist/components/ConnectOptions/ConnectOptionsModal.css.d.ts +4 -0
  12. package/dist/components/ConnectOptions/ConnectOptionsModal.d.ts +26 -0
  13. package/dist/components/ConnectOptions/ExternalWallets/EthereumWallet/EthereumWalletList.d.ts +35 -0
  14. package/dist/components/ConnectOptions/ExternalWallets/EthereumWallet/index.d.ts +6 -0
  15. package/dist/components/ConnectOptions/ExternalWallets/Popular/PopularWalletList.d.ts +37 -0
  16. package/dist/components/ConnectOptions/ExternalWallets/Popular/index.d.ts +6 -0
  17. package/dist/components/ConnectOptions/ExternalWallets/SolanaWallet/SolanaWalletList.d.ts +37 -0
  18. package/dist/components/ConnectOptions/ExternalWallets/SolanaWallet/index.d.ts +6 -0
  19. package/dist/components/ConnectOptions/ExternalWallets/WalletList.d.ts +94 -0
  20. package/dist/components/ConnectOptions/ExternalWallets/hooks/useWalletConnection.d.ts +78 -0
  21. package/dist/components/ConnectOptions/ExternalWallets/index.d.ts +12 -0
  22. package/dist/components/ConnectOptions/ExternalWallets/shared/index.d.ts +7 -0
  23. package/dist/components/ConnectOptions/ExternalWallets/shared/types.d.ts +136 -0
  24. package/dist/components/ConnectOptions/ExternalWallets/shared/utils.d.ts +68 -0
  25. package/dist/components/ConnectOptions/PinAuth/PinAuthFlow.d.ts +127 -0
  26. package/dist/components/ConnectOptions/PinAuth/hooks/index.d.ts +10 -0
  27. package/dist/components/ConnectOptions/PinAuth/hooks/usePinCreation.d.ts +92 -0
  28. package/dist/components/ConnectOptions/PinAuth/hooks/usePinVerification.d.ts +114 -0
  29. package/dist/components/ConnectOptions/PinAuth/hooks/useWalletGeneration.d.ts +93 -0
  30. package/dist/components/ConnectOptions/PinAuth/index.d.ts +23 -0
  31. package/dist/index.css +27 -298
  32. package/dist/index.d.ts +0 -4
  33. package/dist/index.js +5525 -6410
  34. package/dist/wallets/walletConnectors/abcWallet/abcBitcoinProvider.js +1 -1
  35. package/dist/wallets/walletConnectors/abcWallet/api/index.js +7 -7
  36. package/dist/wallets/walletConnectors/abcWallet/index.js +7 -7
  37. package/dist/wallets/walletConnectors/chunk-24SQ562R.js +63 -0
  38. package/dist/wallets/walletConnectors/chunk-25JJ3PT5.js +228 -0
  39. package/dist/wallets/walletConnectors/chunk-3UNSJDAS.js +63 -0
  40. package/dist/wallets/walletConnectors/chunk-4LVXMPGO.js +44 -0
  41. package/dist/wallets/walletConnectors/chunk-6KUCZXJE.js +63 -0
  42. package/dist/wallets/walletConnectors/{chunk-34WMJDUY.js → chunk-75W4VLFA.js} +8 -7
  43. package/dist/wallets/walletConnectors/chunk-ASUECF4H.js +63 -0
  44. package/dist/wallets/walletConnectors/chunk-DP2HUTLN.js +63 -0
  45. package/dist/wallets/walletConnectors/chunk-GLPRLW3S.js +63 -0
  46. package/dist/wallets/walletConnectors/chunk-GOPPX56D.js +63 -0
  47. package/dist/wallets/walletConnectors/chunk-I5V7LWJH.js +63 -0
  48. package/dist/wallets/walletConnectors/chunk-J4HQCVKX.js +63 -0
  49. package/dist/wallets/walletConnectors/chunk-PDWD3ZCR.js +63 -0
  50. package/dist/wallets/walletConnectors/chunk-PHD5KHRQ.js +63 -0
  51. package/dist/wallets/walletConnectors/chunk-PQJWUKUD.js +63 -0
  52. package/dist/wallets/walletConnectors/chunk-PZJYVPGG.js +63 -0
  53. package/dist/wallets/walletConnectors/chunk-Q5B5ICDI.js +63 -0
  54. package/dist/wallets/walletConnectors/chunk-RYXFFAB2.js +63 -0
  55. package/dist/wallets/walletConnectors/chunk-SMACAFVM.js +63 -0
  56. package/dist/wallets/walletConnectors/chunk-VXUJQQDI.js +63 -0
  57. package/dist/wallets/walletConnectors/chunk-WCPI7IUU.js +63 -0
  58. package/dist/wallets/walletConnectors/chunk-Z3WO2EBZ.js +63 -0
  59. package/dist/wallets/walletConnectors/chunk-ZADNKI5I.js +63 -0
  60. package/dist/wallets/walletConnectors/index.js +71 -71
  61. package/package.json +1 -1
@@ -3,7 +3,7 @@ import {
3
3
  AbcBitcoinProvider,
4
4
  BITCOIN_NETWORKS,
5
5
  BitcoinProviderError
6
- } from "../chunk-34WMJDUY.js";
6
+ } from "../chunk-75W4VLFA.js";
7
7
  export {
8
8
  AbcBitcoinProvider,
9
9
  BITCOIN_NETWORKS,
@@ -2,25 +2,25 @@
2
2
  import {
3
3
  AbcWaasApiClient,
4
4
  createAbcWaasApiClient
5
- } from "../../chunk-3WVSOTC4.js";
6
- import {
7
- WalletApi
8
- } from "../../chunk-JBRW4UTW.js";
5
+ } from "../../chunk-ZADNKI5I.js";
9
6
  import {
10
7
  AuthApi
11
8
  } from "../../chunk-W7R3JGSC.js";
9
+ import {
10
+ WalletApi
11
+ } from "../../chunk-JBRW4UTW.js";
12
12
  import {
13
13
  BitcoinApi
14
14
  } from "../../chunk-SPR4W5TG.js";
15
15
  import {
16
16
  SigningApi
17
17
  } from "../../chunk-4UGXLYKP.js";
18
- import {
19
- TransactionApi
20
- } from "../../chunk-KD2OAMDA.js";
21
18
  import {
22
19
  SolanaApi
23
20
  } from "../../chunk-DMRM7XAS.js";
21
+ import {
22
+ TransactionApi
23
+ } from "../../chunk-KD2OAMDA.js";
24
24
  import {
25
25
  BaseApiClient
26
26
  } from "../../chunk-IOLHAU7H.js";
@@ -1,21 +1,21 @@
1
1
  "use client";
2
- import {
3
- AbcWaasApiClient,
4
- createAbcWaasApiClient
5
- } from "../chunk-3WVSOTC4.js";
6
- import "../chunk-JBRW4UTW.js";
7
2
  import {
8
3
  generateMpcWallets,
9
4
  recoverMpcWallets,
10
5
  validateMpcWallets
11
6
  } from "../chunk-WTYSUOKN.js";
7
+ import {
8
+ AbcWaasApiClient,
9
+ createAbcWaasApiClient
10
+ } from "../chunk-ZADNKI5I.js";
12
11
  import "../chunk-W7R3JGSC.js";
12
+ import "../chunk-JBRW4UTW.js";
13
13
  import {
14
14
  BitcoinApi
15
15
  } from "../chunk-SPR4W5TG.js";
16
16
  import "../chunk-4UGXLYKP.js";
17
- import "../chunk-KD2OAMDA.js";
18
17
  import "../chunk-DMRM7XAS.js";
18
+ import "../chunk-KD2OAMDA.js";
19
19
  import "../chunk-IOLHAU7H.js";
20
20
  import {
21
21
  abcSolanaWallet
@@ -28,7 +28,7 @@ import {
28
28
  AbcBitcoinProvider,
29
29
  BITCOIN_NETWORKS,
30
30
  BitcoinProviderError
31
- } from "../chunk-34WMJDUY.js";
31
+ } from "../chunk-75W4VLFA.js";
32
32
  import {
33
33
  AbcSolProvider
34
34
  } from "../chunk-X5LRFFBP.js";
@@ -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
+ 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
+ BitcoinApi
19
+ } from "./chunk-SPR4W5TG.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
+ 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
+ SigningApi
7
+ } from "./chunk-4UGXLYKP.js";
8
+ import {
9
+ AuthApi
10
+ } from "./chunk-W7R3JGSC.js";
11
+ import {
12
+ BitcoinApi
13
+ } from "./chunk-SPR4W5TG.js";
14
+ import {
15
+ SolanaApi
16
+ } from "./chunk-DMRM7XAS.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
+ TransactionApi
4
+ } from "./chunk-HDYBRMYW.js";
5
+ import {
6
+ BitcoinApi
7
+ } from "./chunk-IA4EQFSS.js";
8
+ import {
9
+ SigningApi
10
+ } from "./chunk-TUUNSVKZ.js";
11
+ import {
12
+ AuthApi
13
+ } from "./chunk-RLBGBBIO.js";
14
+ import {
15
+ SolanaApi
16
+ } from "./chunk-2J66VMY5.js";
17
+ import {
18
+ WalletApi
19
+ } from "./chunk-ESRU5KCF.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
+ };
@@ -386,18 +386,19 @@ var AbcBitcoinProvider = class extends EventEmitter {
386
386
  this.clearUtxoCache();
387
387
  return txHash;
388
388
  } catch (error) {
389
- console.error("[BitcoinProvider] \u274C Transaction failed:", error.message);
390
- if (error.message?.includes("insufficient")) {
389
+ if (error.message?.includes("cancelled") || error.message?.includes("rejected")) {
390
+ console.log("[BitcoinProvider] \u2139\uFE0F User cancelled transaction");
391
391
  throw new BitcoinProviderError(
392
- BitcoinErrorCode.INSUFFICIENT_FUNDS,
393
- "Insufficient BTC balance",
392
+ BitcoinErrorCode.USER_REJECTED,
393
+ "User rejected transaction",
394
394
  error
395
395
  );
396
396
  }
397
- if (error.message?.includes("cancelled") || error.message?.includes("rejected")) {
397
+ console.error("[BitcoinProvider] \u274C Transaction failed:", error.message);
398
+ if (error.message?.includes("insufficient")) {
398
399
  throw new BitcoinProviderError(
399
- BitcoinErrorCode.USER_REJECTED,
400
- "User rejected transaction",
400
+ BitcoinErrorCode.INSUFFICIENT_FUNDS,
401
+ "Insufficient BTC balance",
401
402
  error
402
403
  );
403
404
  }
@@ -0,0 +1,63 @@
1
+ "use client";
2
+ import {
3
+ SolanaApi
4
+ } from "./chunk-2J66VMY5.js";
5
+ import {
6
+ AuthApi
7
+ } from "./chunk-RLBGBBIO.js";
8
+ import {
9
+ BitcoinApi
10
+ } from "./chunk-IA4EQFSS.js";
11
+ import {
12
+ SigningApi
13
+ } from "./chunk-TUUNSVKZ.js";
14
+ import {
15
+ TransactionApi
16
+ } from "./chunk-HDYBRMYW.js";
17
+ import {
18
+ WalletApi
19
+ } from "./chunk-ESRU5KCF.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-ESRU5KCF.js";
5
+ import {
6
+ AuthApi
7
+ } from "./chunk-RLBGBBIO.js";
8
+ import {
9
+ BitcoinApi
10
+ } from "./chunk-IA4EQFSS.js";
11
+ import {
12
+ SolanaApi
13
+ } from "./chunk-2J66VMY5.js";
14
+ import {
15
+ TransactionApi
16
+ } from "./chunk-HDYBRMYW.js";
17
+ import {
18
+ SigningApi
19
+ } from "./chunk-TUUNSVKZ.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
+ };