@talken/talkenkit 2.5.2 → 2.5.3
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.
- package/README.md +8 -28
- package/dist/{AbcCredentialManager-5W3B7GI4.js → AbcCredentialManager-DDHLW2IH.js} +1 -1
- package/dist/AbcCredentialManager-JV4ZBMKF.js +7 -0
- package/dist/TalkenApiSingleton-TECFDCT4.js +9 -0
- package/dist/{abcWallet-HRNBHY5Q.js → abcWallet-2BVT5XFX.js} +2 -2
- package/dist/abcWallet-BFCI4NEM.js +162 -0
- package/dist/{chunk-PN6K4CMZ.js → chunk-ALBABQ53.js} +1 -4
- package/dist/chunk-DNEDHHS4.js +379 -0
- package/dist/chunk-KOK5ZBR4.js +5447 -0
- package/dist/chunk-R6ZE7JAZ.js +15 -0
- package/dist/{chunk-VCQZZ6SN.js → chunk-WPRIYR63.js} +192 -80
- package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthFlow.d.ts +6 -32
- package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthSections.d.ts +0 -9
- package/dist/components/ConnectOptions/AbcWaasAuth/hooks/useAbcWaasAuth.d.ts +3 -12
- package/dist/components/ConnectOptions/AbcWaasAuth/types.d.ts +1 -8
- package/dist/components/ConnectOptions/PinAuth/PinAuthFlow.d.ts +6 -4
- package/dist/components/ProfileDetails/ProfileDetails.d.ts +5 -5
- package/dist/hooks/useMultiChainBalances.d.ts +9 -0
- package/dist/index.js +1344 -1423
- package/dist/wallets/walletConnectors/abcWallet/AbcCredentialManager.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/AbcEvmAutoConnector.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/abcAccessKeyProvider.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinConnector.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcBitcoinProvider.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +7 -7
- package/dist/wallets/walletConnectors/abcWallet/abcProvider.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.js +7 -7
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaWalletAdapter.js +44 -44
- package/dist/wallets/walletConnectors/abcWallet/abcTronProvider.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +8 -8
- package/dist/wallets/walletConnectors/abcWallet/api/ConfigApi.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.d.ts +44 -0
- package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/api/TokenApi.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/api/WalletscanApi.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/api/index.js +6 -6
- package/dist/wallets/walletConnectors/abcWallet/constants.d.ts +3 -0
- package/dist/wallets/walletConnectors/abcWallet/constants.js +5 -3
- package/dist/wallets/walletConnectors/abcWallet/index.js +31 -31
- package/dist/wallets/walletConnectors/abcWallet/sessionUtils.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/types.d.ts +4 -0
- package/dist/wallets/walletConnectors/abcWallet/utils.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/walletGeneration.js +3 -3
- package/dist/wallets/walletConnectors/berasigWallet/berasigWallet.js +2 -2
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/binanceWallet/binanceWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/{chunk-4JZPP3S7.js → chunk-2N244XPQ.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-QKK3OPQA.js → chunk-36BJXEBA.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-FKI5AZVH.js → chunk-3K3KYVRN.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-URS2KVYK.js → chunk-5DK36WJ2.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-5ERWBR7D.js +977 -0
- package/dist/wallets/walletConnectors/chunk-6KRX73ED.js +230 -0
- package/dist/wallets/walletConnectors/{chunk-H2AZTZMM.js → chunk-6L5G54IX.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-6WF4SXLB.js +156 -0
- package/dist/wallets/walletConnectors/{chunk-PF65YS3T.js → chunk-A66MTFML.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-LIGH2LEU.js → chunk-ACLPF2UW.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-NP5PWUVU.js → chunk-BHEVY4QY.js} +2 -48
- package/dist/wallets/walletConnectors/{chunk-YKFI6ZGM.js → chunk-BXH3GDX5.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-RGYZNNB6.js → chunk-C4ADBB6M.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-MIX4TRKO.js → chunk-CABLJOMU.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-RX2VOIUB.js → chunk-DPTDOCWL.js} +1 -4
- package/dist/wallets/walletConnectors/{chunk-IPH3SIC3.js → chunk-DW36LXIV.js} +8 -7
- package/dist/wallets/walletConnectors/chunk-EBTKWCIS.js +224 -0
- package/dist/wallets/walletConnectors/{chunk-25ZDAJ3L.js → chunk-EZS3GXZN.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-JBOKTW2Q.js → chunk-FBJ5H6PM.js} +19 -79
- package/dist/wallets/walletConnectors/chunk-IM7DEERX.js +585 -0
- package/dist/wallets/walletConnectors/{chunk-ASYCOXE6.js → chunk-J3YPHDHM.js} +2 -48
- package/dist/wallets/walletConnectors/chunk-JADQLTFW.js +194 -0
- package/dist/wallets/walletConnectors/{chunk-L6FCF3FH.js → chunk-L3HWFGTN.js} +2 -2
- package/dist/wallets/walletConnectors/chunk-L6WDO3ZN.js +445 -0
- package/dist/wallets/walletConnectors/chunk-MO2AXXLI.js +30 -0
- package/dist/wallets/walletConnectors/{chunk-BRXYKYKT.js → chunk-NLA45GHJ.js} +17 -77
- package/dist/wallets/walletConnectors/{chunk-TVZHPWFR.js → chunk-NU3ITJNK.js} +736 -94
- package/dist/wallets/walletConnectors/{chunk-HWRZGGGN.js → chunk-NULM3THX.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-OMOYFHBT.js +1485 -0
- package/dist/wallets/walletConnectors/{chunk-2A5XTST5.js → chunk-OOCL4OPQ.js} +29 -11
- package/dist/wallets/walletConnectors/chunk-PVPSVCVQ.js +96 -0
- package/dist/wallets/walletConnectors/chunk-VBNZ7HA3.js +241 -0
- package/dist/wallets/walletConnectors/chunk-VDWJ3NQ5.js +52 -0
- package/dist/wallets/walletConnectors/chunk-VLHDGDFH.js +273 -0
- package/dist/wallets/walletConnectors/{chunk-WKP53WWR.js → chunk-VMCIDCO5.js} +4 -7
- package/dist/wallets/walletConnectors/{chunk-4PDTJS5L.js → chunk-VNL7XEWF.js} +4 -7
- package/dist/wallets/walletConnectors/chunk-YV6IZWGE.js +393 -0
- package/dist/wallets/walletConnectors/{chunk-645DT4TS.js → chunk-ZLH3W5PQ.js} +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +61 -61
- package/dist/wallets/walletConnectors/iopayWallet/iopayWallet.js +2 -2
- package/dist/wallets/walletConnectors/kaiaWallet/kaiaWallet.js +2 -2
- package/dist/wallets/walletConnectors/kaikasWallet/kaikasWallet.js +2 -2
- package/dist/wallets/walletConnectors/klipWallet/klipWallet.js +2 -2
- package/dist/wallets/walletConnectors/klipWallet-TBZJ5GGT.js +7 -0
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +12 -11
- package/LICENSE +0 -9
- package/dist/wallets/walletConnectors/klipWallet-PPTYYB5G.js +0 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
loadAuthState
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-EBTKWCIS.js";
|
|
5
5
|
import "../chunk-4P3SPC44.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-6KRX73ED.js";
|
|
7
7
|
|
|
8
8
|
// src/wallets/walletConnectors/abcWallet/AbcEvmAutoConnector.tsx
|
|
9
9
|
import { useEffect, useRef } from "react";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
AbcAccessKeyProvider
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-2N244XPQ.js";
|
|
5
5
|
import "../chunk-OASBABPG.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-EBTKWCIS.js";
|
|
7
7
|
import "../chunk-4P3SPC44.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-6KRX73ED.js";
|
|
9
9
|
export {
|
|
10
10
|
AbcAccessKeyProvider
|
|
11
11
|
};
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
AbcBitcoinConnector,
|
|
4
4
|
createAbcBitcoinConnector
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-VLHDGDFH.js";
|
|
6
6
|
import "../chunk-O4AU63LK.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-EBTKWCIS.js";
|
|
8
8
|
import "../chunk-4P3SPC44.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-6KRX73ED.js";
|
|
10
10
|
export {
|
|
11
11
|
AbcBitcoinConnector,
|
|
12
12
|
createAbcBitcoinConnector
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
AbcBitcoinProvider,
|
|
4
4
|
BITCOIN_NETWORKS,
|
|
5
5
|
BitcoinProviderError
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-C4ADBB6M.js";
|
|
7
|
+
import "../chunk-36BJXEBA.js";
|
|
8
|
+
import "../chunk-6KRX73ED.js";
|
|
9
9
|
export {
|
|
10
10
|
AbcBitcoinProvider,
|
|
11
11
|
BITCOIN_NETWORKS,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
abcConnector
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-OOCL4OPQ.js";
|
|
5
|
+
import "../chunk-5ERWBR7D.js";
|
|
5
6
|
import "../chunk-R6ZE7JAZ.js";
|
|
6
7
|
import "../chunk-GFWUFYT2.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-2N244XPQ.js";
|
|
8
9
|
import "../chunk-O4AU63LK.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-L3HWFGTN.js";
|
|
10
11
|
import "../chunk-OASBABPG.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-NP5PWUVU.js";
|
|
12
|
+
import "../chunk-EBTKWCIS.js";
|
|
13
13
|
import "../chunk-4P3SPC44.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-36BJXEBA.js";
|
|
15
|
+
import "../chunk-6KRX73ED.js";
|
|
16
16
|
export {
|
|
17
17
|
abcConnector
|
|
18
18
|
};
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
AbcEvmProvider,
|
|
4
4
|
createAbcEvmProvider,
|
|
5
5
|
createAbcProvider
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-L3HWFGTN.js";
|
|
7
7
|
import "../chunk-OASBABPG.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-EBTKWCIS.js";
|
|
9
9
|
import "../chunk-4P3SPC44.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-36BJXEBA.js";
|
|
11
|
+
import "../chunk-6KRX73ED.js";
|
|
12
12
|
export {
|
|
13
13
|
AbcEvmProvider,
|
|
14
14
|
createAbcEvmProvider,
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
AbcSolanaProvider,
|
|
4
4
|
SolanaProviderError
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-ZLH3W5PQ.js";
|
|
6
6
|
import "../chunk-JGXJY3SB.js";
|
|
7
7
|
import "../chunk-YPM7FC4M.js";
|
|
8
8
|
import "../chunk-OTLZVWY7.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-VBNZ7HA3.js";
|
|
10
|
+
import "../chunk-3K3KYVRN.js";
|
|
11
|
+
import "../chunk-EZS3GXZN.js";
|
|
12
|
+
import "../chunk-5ERWBR7D.js";
|
|
13
13
|
import "../chunk-4P3SPC44.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-36BJXEBA.js";
|
|
15
|
+
import "../chunk-6KRX73ED.js";
|
|
16
16
|
export {
|
|
17
17
|
AbcSolanaProvider,
|
|
18
18
|
SolanaProviderError
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getTalkenApiClient
|
|
4
|
+
} from "../chunk-R6ZE7JAZ.js";
|
|
2
5
|
import {
|
|
3
6
|
resolveTalkenApiUrl
|
|
4
7
|
} from "../chunk-GFWUFYT2.js";
|
|
5
|
-
import {
|
|
6
|
-
createTalkenApiClient
|
|
7
|
-
} from "../chunk-NP5PWUVU.js";
|
|
8
|
-
import "../chunk-4P3SPC44.js";
|
|
9
8
|
import {
|
|
10
9
|
getCredentialManager
|
|
11
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-36BJXEBA.js";
|
|
12
11
|
import {
|
|
13
12
|
STORAGE_PREFIX
|
|
14
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-6KRX73ED.js";
|
|
15
14
|
|
|
16
15
|
// src/wallets/walletConnectors/abcWallet/abcSolanaWalletAdapter.ts
|
|
17
16
|
import {
|
|
@@ -206,11 +205,7 @@ var AbcSolanaWalletAdapter = class extends BaseMessageSignerWalletAdapter {
|
|
|
206
205
|
disableBuiltInAuth: config.disableBuiltInAuth ?? true
|
|
207
206
|
// Default: true (TalkenKit integration mode)
|
|
208
207
|
};
|
|
209
|
-
this._talkenApi =
|
|
210
|
-
baseUrl: this._config.talkenApiUrl,
|
|
211
|
-
debug: this._config.environment === "development",
|
|
212
|
-
environment: this._config.environment
|
|
213
|
-
});
|
|
208
|
+
this._talkenApi = getTalkenApiClient();
|
|
214
209
|
this._injectStyles();
|
|
215
210
|
if (typeof window !== "undefined") {
|
|
216
211
|
this._handleStorageUpdate = this._handleStorageUpdate.bind(this);
|
|
@@ -260,46 +255,51 @@ var AbcSolanaWalletAdapter = class extends BaseMessageSignerWalletAdapter {
|
|
|
260
255
|
if (authState) {
|
|
261
256
|
try {
|
|
262
257
|
const authData = JSON.parse(authState);
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
258
|
+
const hasAccessKey = !!localStorage.getItem(
|
|
259
|
+
"talken_api_access_key_raw"
|
|
260
|
+
);
|
|
261
|
+
if (authData.solanaWallet && (this._talkenApi.isAuthenticated() || hasAccessKey)) {
|
|
262
|
+
const wallet = authData.solanaWallet;
|
|
263
|
+
const keyId = wallet.keyId || wallet.key_id;
|
|
264
|
+
const encryptedShare = wallet.encryptedShare || wallet.encrypted_share;
|
|
265
|
+
const secretStore = wallet.secretStore || wallet.secret_store;
|
|
266
|
+
if (!keyId || !encryptedShare) {
|
|
267
|
+
this._connecting = false;
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
const normalizedWallet = {
|
|
271
|
+
...wallet,
|
|
272
|
+
keyId,
|
|
273
|
+
encryptedShare,
|
|
274
|
+
secretStore: secretStore || ""
|
|
275
|
+
};
|
|
276
|
+
if (!this._talkenApi.isAccessKeyMode() && authData.accessToken) {
|
|
279
277
|
this._talkenApi.setTokens(
|
|
280
278
|
authData.accessToken,
|
|
281
279
|
authData.refreshToken,
|
|
282
280
|
authData.expiresAt
|
|
283
281
|
);
|
|
284
|
-
this._wallet = normalizedWallet;
|
|
285
|
-
const addressOrPubkey = normalizedWallet.address || normalizedWallet.publicKey;
|
|
286
|
-
try {
|
|
287
|
-
this._publicKey = new PublicKey(addressOrPubkey);
|
|
288
|
-
} catch (_error) {
|
|
289
|
-
const hexKey = addressOrPubkey.startsWith("0x") ? addressOrPubkey.slice(2) : addressOrPubkey;
|
|
290
|
-
const bytes = new Uint8Array(Buffer.from(hexKey, "hex"));
|
|
291
|
-
this._publicKey = new PublicKey(bytes);
|
|
292
|
-
}
|
|
293
|
-
this._connecting = false;
|
|
294
|
-
const displayAddress2 = this._publicKey.toBase58();
|
|
295
|
-
console.log(
|
|
296
|
-
`[AbcSolanaWalletAdapter] \u2705 Wallet connected: ${displayAddress2.slice(0, 6)}...${displayAddress2.slice(-6)}`
|
|
297
|
-
);
|
|
298
|
-
this.emit("connect", this._publicKey);
|
|
299
|
-
return;
|
|
300
282
|
}
|
|
283
|
+
this._wallet = normalizedWallet;
|
|
284
|
+
const addressOrPubkey = normalizedWallet.address || normalizedWallet.publicKey;
|
|
285
|
+
try {
|
|
286
|
+
this._publicKey = new PublicKey(addressOrPubkey);
|
|
287
|
+
} catch (_error) {
|
|
288
|
+
const hexKey = addressOrPubkey.startsWith("0x") ? addressOrPubkey.slice(2) : addressOrPubkey;
|
|
289
|
+
const bytes = new Uint8Array(Buffer.from(hexKey, "hex"));
|
|
290
|
+
this._publicKey = new PublicKey(bytes);
|
|
291
|
+
}
|
|
292
|
+
this._connecting = false;
|
|
293
|
+
const displayAddress2 = this._publicKey.toBase58();
|
|
294
|
+
console.log(
|
|
295
|
+
`[AbcSolanaWalletAdapter] \u2705 Wallet connected: ${displayAddress2.slice(0, 6)}...${displayAddress2.slice(-6)}`
|
|
296
|
+
);
|
|
297
|
+
this.emit("connect", this._publicKey);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
if (!this._talkenApi.isAccessKeyMode() && !hasAccessKey) {
|
|
301
301
|
console.log(
|
|
302
|
-
"[AbcSolanaWalletAdapter]
|
|
302
|
+
"[AbcSolanaWalletAdapter] Not authenticated, clearing session"
|
|
303
303
|
);
|
|
304
304
|
localStorage.removeItem(`${STORAGE_PREFIX}auth_state`);
|
|
305
305
|
}
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
AbcTronProvider,
|
|
4
4
|
TRON_NETWORKS,
|
|
5
5
|
TronProviderError
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-5DK36WJ2.js";
|
|
7
|
+
import "../chunk-36BJXEBA.js";
|
|
8
|
+
import "../chunk-6KRX73ED.js";
|
|
9
9
|
export {
|
|
10
10
|
AbcTronProvider,
|
|
11
11
|
TRON_NETWORKS,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
abcWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-DW36LXIV.js";
|
|
5
|
+
import "../chunk-OOCL4OPQ.js";
|
|
6
|
+
import "../chunk-5ERWBR7D.js";
|
|
6
7
|
import "../chunk-R6ZE7JAZ.js";
|
|
7
8
|
import "../chunk-GFWUFYT2.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-2N244XPQ.js";
|
|
9
10
|
import "../chunk-O4AU63LK.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-L3HWFGTN.js";
|
|
11
12
|
import "../chunk-OASBABPG.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-NP5PWUVU.js";
|
|
13
|
+
import "../chunk-EBTKWCIS.js";
|
|
14
14
|
import "../chunk-4P3SPC44.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-36BJXEBA.js";
|
|
16
|
+
import "../chunk-6KRX73ED.js";
|
|
17
17
|
export {
|
|
18
18
|
abcWallet
|
|
19
19
|
};
|
|
@@ -63,6 +63,32 @@ declare class TalkenAuthModule {
|
|
|
63
63
|
* POST /wallet/auth { action: 'token.refresh', refreshToken }
|
|
64
64
|
*/
|
|
65
65
|
refresh(): Promise<TalkenAuthResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* Server-side unified onboarding: email + OTP → access key + wallets.
|
|
68
|
+
* POST /wallet/auth { action: 'ensure-user', email, otpCode, accessKeyName }
|
|
69
|
+
*/
|
|
70
|
+
ensureUser(email: string, otpCode: string, accessKeyName?: string): Promise<{
|
|
71
|
+
accessKey: string;
|
|
72
|
+
email: string;
|
|
73
|
+
evmAddress: string;
|
|
74
|
+
addresses: Record<string, string | null>;
|
|
75
|
+
isNewUser: boolean;
|
|
76
|
+
}>;
|
|
77
|
+
/**
|
|
78
|
+
* Create an Access Key for delegated authentication
|
|
79
|
+
* POST /agent/access-keys { name, pin, refreshToken, email, ttlSeconds }
|
|
80
|
+
*/
|
|
81
|
+
createAccessKey(params: {
|
|
82
|
+
name: string;
|
|
83
|
+
pin: string;
|
|
84
|
+
refreshToken: string;
|
|
85
|
+
email: string;
|
|
86
|
+
ttlSeconds?: number;
|
|
87
|
+
}): Promise<{
|
|
88
|
+
accessKey: string;
|
|
89
|
+
keyId: string;
|
|
90
|
+
expiresAt: string;
|
|
91
|
+
}>;
|
|
66
92
|
/**
|
|
67
93
|
* Logout (clear local session only — no server endpoint)
|
|
68
94
|
*/
|
|
@@ -349,6 +375,7 @@ export declare class TalkenApiClient {
|
|
|
349
375
|
private accessToken;
|
|
350
376
|
private refreshToken_;
|
|
351
377
|
private expiresAt;
|
|
378
|
+
private accessKeyRaw;
|
|
352
379
|
private isRefreshing;
|
|
353
380
|
private refreshPromise;
|
|
354
381
|
readonly auth: TalkenAuthModule;
|
|
@@ -364,6 +391,23 @@ export declare class TalkenApiClient {
|
|
|
364
391
|
handleAuthResponse(response: TalkenAuthResponse): void;
|
|
365
392
|
/** @internal Clear all session data */
|
|
366
393
|
clearSession(): void;
|
|
394
|
+
/** All known access key prefixes (any environment). */
|
|
395
|
+
private static readonly KNOWN_AK_PREFIXES;
|
|
396
|
+
/** Validate access key format: talken_<env>_<publicId>.<secret> */
|
|
397
|
+
static isValidAccessKeyFormat(key: string): boolean;
|
|
398
|
+
/**
|
|
399
|
+
* Set Access Key and switch to Access Key mode.
|
|
400
|
+
* Accepts any known env prefix (talken_live_, talken_stg_, talken_dev_, talken_local_).
|
|
401
|
+
*/
|
|
402
|
+
setAccessKey(key: string): void;
|
|
403
|
+
/**
|
|
404
|
+
* Clear Access Key
|
|
405
|
+
*/
|
|
406
|
+
clearAccessKey(): void;
|
|
407
|
+
/**
|
|
408
|
+
* Check if running in Access Key mode
|
|
409
|
+
*/
|
|
410
|
+
isAccessKeyMode(): boolean;
|
|
367
411
|
/**
|
|
368
412
|
* Check if user is authenticated (has valid access token)
|
|
369
413
|
*/
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
TalkenApiClient,
|
|
4
4
|
createTalkenApiClient
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-5ERWBR7D.js";
|
|
6
6
|
import "../../chunk-4P3SPC44.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-36BJXEBA.js";
|
|
8
|
+
import "../../chunk-6KRX73ED.js";
|
|
9
9
|
export {
|
|
10
10
|
TalkenApiClient,
|
|
11
11
|
createTalkenApiClient
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
WalletscanApi
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-VBNZ7HA3.js";
|
|
5
|
+
import "../../chunk-3K3KYVRN.js";
|
|
6
|
+
import "../../chunk-6KRX73ED.js";
|
|
7
7
|
export {
|
|
8
8
|
WalletscanApi
|
|
9
9
|
};
|
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
} from "../../chunk-OTLZVWY7.js";
|
|
9
9
|
import {
|
|
10
10
|
WalletscanApi
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-VBNZ7HA3.js";
|
|
12
12
|
import {
|
|
13
13
|
TokenApi
|
|
14
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-3K3KYVRN.js";
|
|
15
15
|
import {
|
|
16
16
|
ConfigApi
|
|
17
|
-
} from "../../chunk-
|
|
17
|
+
} from "../../chunk-EZS3GXZN.js";
|
|
18
18
|
import {
|
|
19
19
|
TalkenApiClient,
|
|
20
20
|
createTalkenApiClient
|
|
21
|
-
} from "../../chunk-
|
|
21
|
+
} from "../../chunk-5ERWBR7D.js";
|
|
22
22
|
import "../../chunk-4P3SPC44.js";
|
|
23
|
-
import "../../chunk-
|
|
24
|
-
import "../../chunk-
|
|
23
|
+
import "../../chunk-36BJXEBA.js";
|
|
24
|
+
import "../../chunk-6KRX73ED.js";
|
|
25
25
|
export {
|
|
26
26
|
ConfigApi,
|
|
27
27
|
GasApi,
|
|
@@ -228,4 +228,7 @@ export declare const TALKEN_API_ENDPOINTS: {
|
|
|
228
228
|
readonly RELAYER_FEE_ESTIMATE: "/relayer/estimate-fee";
|
|
229
229
|
readonly CONFIG_TX_STATUS: "/config/tx-status";
|
|
230
230
|
readonly TOKENS_BALANCES: "/tokens/balances";
|
|
231
|
+
readonly ACCESS_KEYS: "/agent/access-keys";
|
|
231
232
|
};
|
|
233
|
+
/** Read access key from localStorage (env-specific key only, no legacy fallback). */
|
|
234
|
+
export declare function loadTgAccessKey(): string | null;
|
|
@@ -21,8 +21,9 @@ import {
|
|
|
21
21
|
STORAGE_VERSION,
|
|
22
22
|
SUCCESS_MESSAGES,
|
|
23
23
|
TALKEN_API_ENDPOINTS,
|
|
24
|
-
TOKEN_EXPIRY
|
|
25
|
-
|
|
24
|
+
TOKEN_EXPIRY,
|
|
25
|
+
loadTgAccessKey
|
|
26
|
+
} from "../chunk-6KRX73ED.js";
|
|
26
27
|
export {
|
|
27
28
|
ABC_EVENTS,
|
|
28
29
|
ABC_FEATURES,
|
|
@@ -45,5 +46,6 @@ export {
|
|
|
45
46
|
STORAGE_VERSION,
|
|
46
47
|
SUCCESS_MESSAGES,
|
|
47
48
|
TALKEN_API_ENDPOINTS,
|
|
48
|
-
TOKEN_EXPIRY
|
|
49
|
+
TOKEN_EXPIRY,
|
|
50
|
+
loadTgAccessKey
|
|
49
51
|
};
|
|
@@ -5,30 +5,16 @@ import {
|
|
|
5
5
|
fetchWithSessionCheck,
|
|
6
6
|
handleUnauthorizedResponse,
|
|
7
7
|
refreshAccessToken
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-PVPSVCVQ.js";
|
|
9
9
|
import {
|
|
10
10
|
generateMpcWallets,
|
|
11
11
|
recoverMpcWallets,
|
|
12
12
|
validateMpcWallets
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import {
|
|
15
|
-
AbcTronProvider,
|
|
16
|
-
TRON_NETWORKS,
|
|
17
|
-
TronProviderError
|
|
18
|
-
} from "../chunk-URS2KVYK.js";
|
|
19
|
-
import {
|
|
20
|
-
AbcBitcoinConnector,
|
|
21
|
-
createAbcBitcoinConnector
|
|
22
|
-
} from "../chunk-YKFI6ZGM.js";
|
|
23
|
-
import {
|
|
24
|
-
AbcBitcoinProvider,
|
|
25
|
-
BITCOIN_NETWORKS,
|
|
26
|
-
BitcoinProviderError
|
|
27
|
-
} from "../chunk-RGYZNNB6.js";
|
|
13
|
+
} from "../chunk-6L5G54IX.js";
|
|
28
14
|
import {
|
|
29
15
|
AbcSolanaProvider,
|
|
30
16
|
SolanaProviderError
|
|
31
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-ZLH3W5PQ.js";
|
|
32
18
|
import "../chunk-JGXJY3SB.js";
|
|
33
19
|
import {
|
|
34
20
|
GasApi
|
|
@@ -38,22 +24,40 @@ import {
|
|
|
38
24
|
} from "../chunk-OTLZVWY7.js";
|
|
39
25
|
import {
|
|
40
26
|
WalletscanApi
|
|
41
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-VBNZ7HA3.js";
|
|
42
28
|
import {
|
|
43
29
|
TokenApi
|
|
44
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-3K3KYVRN.js";
|
|
45
31
|
import {
|
|
46
32
|
ConfigApi
|
|
47
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-EZS3GXZN.js";
|
|
34
|
+
import {
|
|
35
|
+
AbcTronProvider,
|
|
36
|
+
TRON_NETWORKS,
|
|
37
|
+
TronProviderError
|
|
38
|
+
} from "../chunk-5DK36WJ2.js";
|
|
39
|
+
import {
|
|
40
|
+
AbcBitcoinConnector,
|
|
41
|
+
createAbcBitcoinConnector
|
|
42
|
+
} from "../chunk-VLHDGDFH.js";
|
|
43
|
+
import {
|
|
44
|
+
AbcBitcoinProvider,
|
|
45
|
+
BITCOIN_NETWORKS,
|
|
46
|
+
BitcoinProviderError
|
|
47
|
+
} from "../chunk-C4ADBB6M.js";
|
|
48
48
|
import {
|
|
49
49
|
abcWallet
|
|
50
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-DW36LXIV.js";
|
|
51
51
|
import {
|
|
52
52
|
abcConnector
|
|
53
|
-
} from "../chunk-
|
|
53
|
+
} from "../chunk-OOCL4OPQ.js";
|
|
54
|
+
import {
|
|
55
|
+
TalkenApiClient,
|
|
56
|
+
createTalkenApiClient
|
|
57
|
+
} from "../chunk-5ERWBR7D.js";
|
|
54
58
|
import "../chunk-R6ZE7JAZ.js";
|
|
55
59
|
import "../chunk-GFWUFYT2.js";
|
|
56
|
-
import "../chunk-
|
|
60
|
+
import "../chunk-2N244XPQ.js";
|
|
57
61
|
import {
|
|
58
62
|
BitcoinNetwork,
|
|
59
63
|
SolanaNetwork,
|
|
@@ -67,7 +71,7 @@ import {
|
|
|
67
71
|
AbcEvmProvider,
|
|
68
72
|
createAbcEvmProvider,
|
|
69
73
|
createAbcProvider
|
|
70
|
-
} from "../chunk-
|
|
74
|
+
} from "../chunk-L3HWFGTN.js";
|
|
71
75
|
import "../chunk-OASBABPG.js";
|
|
72
76
|
import {
|
|
73
77
|
calculateExpiryTimestamp,
|
|
@@ -86,11 +90,7 @@ import {
|
|
|
86
90
|
saveToStorage,
|
|
87
91
|
validateEmail,
|
|
88
92
|
validatePin
|
|
89
|
-
} from "../chunk-
|
|
90
|
-
import {
|
|
91
|
-
TalkenApiClient,
|
|
92
|
-
createTalkenApiClient
|
|
93
|
-
} from "../chunk-NP5PWUVU.js";
|
|
93
|
+
} from "../chunk-EBTKWCIS.js";
|
|
94
94
|
import {
|
|
95
95
|
AbcError,
|
|
96
96
|
AbcErrorCode,
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
} from "../chunk-4P3SPC44.js";
|
|
99
99
|
import {
|
|
100
100
|
getCredentialManager
|
|
101
|
-
} from "../chunk-
|
|
101
|
+
} from "../chunk-36BJXEBA.js";
|
|
102
102
|
import {
|
|
103
103
|
ABC_EVENTS,
|
|
104
104
|
ABC_FEATURES,
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
STORAGE_VERSION,
|
|
121
121
|
SUCCESS_MESSAGES,
|
|
122
122
|
TOKEN_EXPIRY
|
|
123
|
-
} from "../chunk-
|
|
123
|
+
} from "../chunk-6KRX73ED.js";
|
|
124
124
|
export {
|
|
125
125
|
ABC_EVENTS,
|
|
126
126
|
ABC_FEATURES,
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
fetchWithSessionCheck,
|
|
6
6
|
handleUnauthorizedResponse,
|
|
7
7
|
refreshAccessToken
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-PVPSVCVQ.js";
|
|
9
|
+
import "../chunk-6KRX73ED.js";
|
|
10
10
|
export {
|
|
11
11
|
SessionExpiredError,
|
|
12
12
|
dispatchSessionExpired,
|
|
@@ -179,6 +179,10 @@ export interface AbcAuthState {
|
|
|
179
179
|
refreshToken: string | null;
|
|
180
180
|
/** Token expiration timestamp */
|
|
181
181
|
expiresAt: number | null;
|
|
182
|
+
/** Whether using Access Key mode (server handles token refresh) */
|
|
183
|
+
accessKeyMode?: boolean;
|
|
184
|
+
/** Access Key expiration timestamp (ISO string) */
|
|
185
|
+
accessKeyExpiresAt?: string;
|
|
182
186
|
}
|
|
183
187
|
/**
|
|
184
188
|
* Login method parameters
|
|
@@ -16,9 +16,9 @@ import {
|
|
|
16
16
|
saveToStorage,
|
|
17
17
|
validateEmail,
|
|
18
18
|
validatePin
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-EBTKWCIS.js";
|
|
20
20
|
import "../chunk-4P3SPC44.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-6KRX73ED.js";
|
|
22
22
|
export {
|
|
23
23
|
calculateExpiryTimestamp,
|
|
24
24
|
clearAuthState,
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
generateMpcWallets,
|
|
4
4
|
recoverMpcWallets,
|
|
5
5
|
validateMpcWallets
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-6L5G54IX.js";
|
|
7
7
|
import "../chunk-O4AU63LK.js";
|
|
8
8
|
import "../chunk-4P3SPC44.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-36BJXEBA.js";
|
|
10
|
+
import "../chunk-6KRX73ED.js";
|
|
11
11
|
export {
|
|
12
12
|
generateMpcWallets,
|
|
13
13
|
recoverMpcWallets,
|