@talken/talkenkit 2.5.8 → 2.6.0

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.
@@ -3,8 +3,8 @@ import {
3
3
  abcWallet
4
4
  } from "./chunk-SQY7HBRK.js";
5
5
  import {
6
- zealWallet
7
- } from "./chunk-NPZ2IXNP.js";
6
+ zerionWallet
7
+ } from "./chunk-55PYSSYF.js";
8
8
  import "./chunk-IIXEHCZU.js";
9
9
  import "./chunk-5ERWBR7D.js";
10
10
  import "./chunk-R6ZE7JAZ.js";
@@ -18,38 +18,38 @@ import "./chunk-4P3SPC44.js";
18
18
  import "./chunk-36BJXEBA.js";
19
19
  import "./chunk-6KRX73ED.js";
20
20
  import {
21
- trustWallet
22
- } from "./chunk-PK5F7QCO.js";
23
- import {
24
- uniswapWallet
25
- } from "./chunk-DLDZUVTB.js";
26
- import {
27
- safeheronWallet
28
- } from "./chunk-GFZKT4IO.js";
21
+ talismanWallet
22
+ } from "./chunk-CV5HJWQX.js";
29
23
  import {
30
24
  valoraWallet
31
25
  } from "./chunk-CVUEWUDI.js";
26
+ import {
27
+ tokenaryWallet
28
+ } from "./chunk-AGYNSAGV.js";
29
+ import {
30
+ trustWallet
31
+ } from "./chunk-PK5F7QCO.js";
32
32
  import {
33
33
  walletConnectWallet
34
34
  } from "./chunk-KU5R3WAJ.js";
35
+ import {
36
+ xdefiWallet
37
+ } from "./chunk-LAXV47ZW.js";
35
38
  import {
36
39
  wigwamWallet
37
40
  } from "./chunk-XHES3UIX.js";
38
41
  import {
39
- xdefiWallet
40
- } from "./chunk-LAXV47ZW.js";
42
+ zealWallet
43
+ } from "./chunk-NPZ2IXNP.js";
41
44
  import {
42
- zerionWallet
43
- } from "./chunk-55PYSSYF.js";
45
+ safeheronWallet
46
+ } from "./chunk-GFZKT4IO.js";
44
47
  import {
45
- safeWallet
46
- } from "./chunk-Z2QCE6O6.js";
48
+ rabbyWallet
49
+ } from "./chunk-I232AKC4.js";
47
50
  import {
48
51
  seifWallet
49
52
  } from "./chunk-4MX42IPK.js";
50
- import {
51
- safepalWallet
52
- } from "./chunk-6UT4SIPZ.js";
53
53
  import {
54
54
  subWallet
55
55
  } from "./chunk-AM4YPUW3.js";
@@ -57,14 +57,17 @@ import {
57
57
  tahoWallet
58
58
  } from "./chunk-ETH7KTEX.js";
59
59
  import {
60
- talismanWallet
61
- } from "./chunk-CV5HJWQX.js";
60
+ safepalWallet
61
+ } from "./chunk-6UT4SIPZ.js";
62
62
  import {
63
63
  tokenPocketWallet
64
64
  } from "./chunk-D24ZTR45.js";
65
65
  import {
66
- tokenaryWallet
67
- } from "./chunk-AGYNSAGV.js";
66
+ uniswapWallet
67
+ } from "./chunk-DLDZUVTB.js";
68
+ import {
69
+ oneInchWallet
70
+ } from "./chunk-OJT577AY.js";
68
71
  import {
69
72
  oneKeyWallet
70
73
  } from "./chunk-WQX4JNSR.js";
@@ -72,26 +75,26 @@ import {
72
75
  paraSwapWallet
73
76
  } from "./chunk-FF7ZXD5C.js";
74
77
  import {
75
- kresusWallet
76
- } from "./chunk-CM3VR7OM.js";
78
+ phantomWallet
79
+ } from "./chunk-M3L6IDTW.js";
77
80
  import {
78
81
  rainbowWallet
79
82
  } from "./chunk-C5JYYN5C.js";
80
83
  import {
81
84
  ramperWallet
82
85
  } from "./chunk-VAAADMXX.js";
83
- import {
84
- rabbyWallet
85
- } from "./chunk-I232AKC4.js";
86
86
  import {
87
87
  roninWallet
88
88
  } from "./chunk-TP7VE6CR.js";
89
89
  import {
90
- phantomWallet
91
- } from "./chunk-M3L6IDTW.js";
90
+ safeWallet
91
+ } from "./chunk-Z2QCE6O6.js";
92
92
  import {
93
93
  ledgerWallet
94
94
  } from "./chunk-BF3VSNPL.js";
95
+ import {
96
+ magicEdenWallet
97
+ } from "./chunk-6MKGDGZC.js";
95
98
  import {
96
99
  metaMaskWallet
97
100
  } from "./chunk-YYWOGELV.js";
@@ -110,12 +113,12 @@ import {
110
113
  import {
111
114
  omniWallet
112
115
  } from "./chunk-RGPO7AY3.js";
113
- import {
114
- oneInchWallet
115
- } from "./chunk-OJT577AY.js";
116
116
  import {
117
117
  imTokenWallet
118
118
  } from "./chunk-EHE2536P.js";
119
+ import {
120
+ injectedWallet
121
+ } from "./chunk-DWN4FQRW.js";
119
122
  import {
120
123
  iopayWallet
121
124
  } from "./chunk-4KTCNBEZ.js";
@@ -128,15 +131,12 @@ import {
128
131
  import {
129
132
  klipWallet
130
133
  } from "./chunk-WDL3NM5W.js";
131
- import {
132
- injectedWallet
133
- } from "./chunk-DWN4FQRW.js";
134
134
  import {
135
135
  krakenWallet
136
136
  } from "./chunk-CYOZFCR6.js";
137
137
  import {
138
- magicEdenWallet
139
- } from "./chunk-6MKGDGZC.js";
138
+ kresusWallet
139
+ } from "./chunk-CM3VR7OM.js";
140
140
  import {
141
141
  coreWallet
142
142
  } from "./chunk-EV4S6LIH.js";
@@ -161,24 +161,24 @@ import {
161
161
  import {
162
162
  gateWallet
163
163
  } from "./chunk-S25DFPKE.js";
164
- import {
165
- bitverseWallet
166
- } from "./chunk-6HCSSBZY.js";
167
164
  import {
168
165
  bloomWallet
169
166
  } from "./chunk-3KPCADAF.js";
170
167
  import {
171
- braveWallet
172
- } from "./chunk-7AOQK5GH.js";
168
+ bitverseWallet
169
+ } from "./chunk-6HCSSBZY.js";
173
170
  import {
174
171
  bybitWallet
175
172
  } from "./chunk-2AJYFWBT.js";
176
173
  import {
177
- coin98Wallet
178
- } from "./chunk-RN23EOYO.js";
174
+ braveWallet
175
+ } from "./chunk-7AOQK5GH.js";
179
176
  import {
180
177
  clvWallet
181
178
  } from "./chunk-QHXBBEB2.js";
179
+ import {
180
+ coin98Wallet
181
+ } from "./chunk-RN23EOYO.js";
182
182
  import {
183
183
  coinbaseWallet
184
184
  } from "./chunk-PNEDRY6O.js";
@@ -188,9 +188,6 @@ import {
188
188
  import {
189
189
  berasigWallet
190
190
  } from "./chunk-6WB5NVHI.js";
191
- import {
192
- bestWallet
193
- } from "./chunk-OPAPBEA5.js";
194
191
  import {
195
192
  argentWallet
196
193
  } from "./chunk-XT2WYPN5.js";
@@ -198,11 +195,14 @@ import {
198
195
  bifrostWallet
199
196
  } from "./chunk-KOZORVBW.js";
200
197
  import {
201
- binanceWallet
202
- } from "./chunk-LGGIEH7O.js";
198
+ bestWallet
199
+ } from "./chunk-OPAPBEA5.js";
203
200
  import {
204
201
  bitgetWallet
205
202
  } from "./chunk-DKEP5NZT.js";
203
+ import {
204
+ binanceWallet
205
+ } from "./chunk-LGGIEH7O.js";
206
206
  import "./chunk-RETKWSKD.js";
207
207
  import "./chunk-PODFK4OS.js";
208
208
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talken/talkenkit",
3
- "version": "2.5.8",
3
+ "version": "2.6.0",
4
4
  "description": "The best way to connect a wallet 🌈 🧰",
5
5
  "files": [
6
6
  "dist",
@@ -1,96 +0,0 @@
1
- "use client";
2
- import {
3
- STORAGE_PREFIX
4
- } from "./chunk-6KRX73ED.js";
5
-
6
- // src/wallets/walletConnectors/abcWallet/sessionUtils.ts
7
- import { getTalkenApiClient } from "@talken/talkenkit";
8
- var SessionExpiredError = class extends Error {
9
- constructor(message = "Session expired. Please reconnect your wallet.") {
10
- super(message);
11
- this.name = "SessionExpiredError";
12
- }
13
- };
14
- function dispatchSessionExpired() {
15
- if (typeof window !== "undefined") {
16
- console.warn("[SessionUtils] \u{1F6A8} dispatchSessionExpired called from:");
17
- console.trace();
18
- window.dispatchEvent(new CustomEvent("talkenkit:session_expired"));
19
- }
20
- }
21
- function handleUnauthorizedResponse(response) {
22
- if (response.status === 401) {
23
- dispatchSessionExpired();
24
- throw new SessionExpiredError(
25
- "Session expired. Please reconnect your wallet."
26
- );
27
- }
28
- }
29
- async function fetchWithSessionCheck(url, options) {
30
- const response = await fetch(url, options);
31
- if (!response.ok && response.status === 401) {
32
- const errorText = await response.text();
33
- console.error("[ABC WaaS] \u274C Unauthorized (401):", errorText);
34
- dispatchSessionExpired();
35
- throw new SessionExpiredError(
36
- "Session expired. Please reconnect your wallet."
37
- );
38
- }
39
- return response;
40
- }
41
- async function refreshAccessToken(pinCallback) {
42
- if (pinCallback) {
43
- await pinCallback();
44
- }
45
- const api = getTalkenApiClient();
46
- if (!api) {
47
- console.warn(
48
- "[SessionUtils] TalkenApiClient not initialized - opening connect modal"
49
- );
50
- dispatchSessionExpired();
51
- await new Promise((resolve) => setTimeout(resolve, 100));
52
- throw new SessionExpiredError(
53
- "Session expired. Please reconnect your wallet."
54
- );
55
- }
56
- const refreshToken = api.getRefreshToken() || localStorage.getItem(`${STORAGE_PREFIX}refresh_token`);
57
- if (!refreshToken) {
58
- console.warn("[SessionUtils] No refresh token - opening connect modal");
59
- dispatchSessionExpired();
60
- await new Promise((resolve) => setTimeout(resolve, 100));
61
- throw new SessionExpiredError(
62
- "Session expired. Please reconnect your wallet."
63
- );
64
- }
65
- try {
66
- const res = await api.auth.refresh();
67
- const expiresAt = Date.now() + res.expiresIn * 1e3;
68
- api.setTokens(res.accessToken, res.refreshToken || refreshToken, expiresAt);
69
- localStorage.setItem(`${STORAGE_PREFIX}access_token`, res.accessToken);
70
- if (res.refreshToken) {
71
- localStorage.setItem(`${STORAGE_PREFIX}refresh_token`, res.refreshToken);
72
- }
73
- localStorage.setItem(`${STORAGE_PREFIX}expires_at`, String(expiresAt));
74
- console.log(
75
- "[SessionUtils] \u2705 Token refreshed - expires in:",
76
- (res.expiresIn / 60 / 60).toFixed(2),
77
- "hours"
78
- );
79
- return res.accessToken;
80
- } catch (error) {
81
- console.error("[SessionUtils] Token refresh failed:", error);
82
- dispatchSessionExpired();
83
- await new Promise((resolve) => setTimeout(resolve, 100));
84
- throw new SessionExpiredError(
85
- "Session expired. Please reconnect your wallet."
86
- );
87
- }
88
- }
89
-
90
- export {
91
- SessionExpiredError,
92
- dispatchSessionExpired,
93
- handleUnauthorizedResponse,
94
- fetchWithSessionCheck,
95
- refreshAccessToken
96
- };