@talken/talkenkit 2.5.2 → 2.5.4
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/dist/{AbcCredentialManager-5W3B7GI4.js → AbcCredentialManager-JV4ZBMKF.js} +1 -1
- package/dist/TalkenApiSingleton-TECFDCT4.js +9 -0
- package/dist/{abcWallet-HRNBHY5Q.js → abcWallet-QJ5BKEXW.js} +3 -2
- package/dist/{chunk-PN6K4CMZ.js → chunk-DNEDHHS4.js} +23 -1
- package/dist/chunk-R6ZE7JAZ.js +15 -0
- package/dist/{chunk-VCQZZ6SN.js → chunk-YORGXWYS.js} +218 -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 +1420 -1466
- package/dist/klipWallet-TBZJ5GGT.js +7 -0
- package/dist/wallets/walletConnectors/abcWallet/AbcCredentialManager.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/AbcEvmAutoConnector.js +2 -2
- package/dist/wallets/walletConnectors/abcWallet/abcAccessKeyProvider.d.ts +4 -0
- 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 -45
- 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/{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-ASYCOXE6.js → chunk-5ERWBR7D.js} +132 -28
- package/dist/wallets/walletConnectors/{chunk-RX2VOIUB.js → chunk-6KRX73ED.js} +25 -3
- package/dist/wallets/walletConnectors/{chunk-H2AZTZMM.js → chunk-6L5G54IX.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-RGYZNNB6.js → chunk-C4ADBB6M.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-4JZPP3S7.js → chunk-E6ZG77AF.js} +27 -1
- package/dist/wallets/walletConnectors/{chunk-PF65YS3T.js → chunk-EBTKWCIS.js} +3 -2
- package/dist/wallets/walletConnectors/{chunk-25ZDAJ3L.js → chunk-EZS3GXZN.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-WKP53WWR.js → chunk-G6SV7RAS.js} +8 -7
- package/dist/wallets/walletConnectors/chunk-HKMJ67FD.js +37 -0
- package/dist/wallets/walletConnectors/{chunk-L6FCF3FH.js → chunk-L3HWFGTN.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-LIGH2LEU.js → chunk-PVPSVCVQ.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-2A5XTST5.js → chunk-SDRE2D5I.js} +29 -11
- package/dist/wallets/walletConnectors/{chunk-HWRZGGGN.js → chunk-VBNZ7HA3.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-YKFI6ZGM.js → chunk-VLHDGDFH.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-645DT4TS.js → chunk-ZLH3W5PQ.js} +2 -2
- package/dist/wallets/walletConnectors/index.d.ts +2 -1
- package/dist/wallets/walletConnectors/index.js +57 -53
- package/dist/wallets/walletConnectors/klipWallet/klipWallet.js +3 -63
- package/dist/wallets/walletConnectors/klipWallet-TBZJ5GGT.js +7 -0
- package/package.json +1 -1
- package/dist/wallets/walletConnectors/chunk-4PDTJS5L.js +0 -57
- package/dist/wallets/walletConnectors/chunk-BRXYKYKT.js +0 -360
- package/dist/wallets/walletConnectors/chunk-IPH3SIC3.js +0 -57
- package/dist/wallets/walletConnectors/chunk-JBOKTW2Q.js +0 -360
- package/dist/wallets/walletConnectors/chunk-MIX4TRKO.js +0 -194
- package/dist/wallets/walletConnectors/chunk-NP5PWUVU.js +0 -873
- package/dist/wallets/walletConnectors/chunk-TVZHPWFR.js +0 -843
- package/dist/wallets/walletConnectors/klipWallet-PPTYYB5G.js +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/wallets/walletConnectors/klipWallet/klipWallet.svg
|
|
4
|
+
var klipWallet_default = 'data:image/svg+xml,<svg width="45" height="46" viewBox="0 0 45 46" fill="none" xmlns="http://www.w3.org/2000/svg">%0A <image width="45" height="46" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAuCAYAAAC8jpA0AAAACXBIWXMAABCcAAAQnAEmzTo0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAYRSURBVHgB7VlfiFZFFP/Nvd9+mvvFZrmkPYQmGv0BkR7Kkl4kjP5QIET04oPRQ71VFpFBSfVSRhSVCpU+VPSWKEYRRCJJEWIPRWSglJa6brr10e7e+905zb135t6ZuTP33m97SjzLsnfmzMz5nTNnzjkzC/wPifkYKx/vrxowug0IFoENAvAOuPjRibsmcu7n85r5isdBCNlkwMLPTrwxdhRtQF+7ZXpZPMu3AXS3mN4lIvEZ5EzxTdoMSn9Ia+sNNYJc39Xx+jdj6WhEQpFPeTJ45PT2xWe8oK/ZPLMCGHwuZiyVcsRirAAouypCXKBsvtm2FaidezwEX3/yrfGfVUdgaECDjzPAAihxVgCGBVj/KgVhjoBRUcDiLU0ofFfvK0CveKp/hxi+OhVADYCqbfc22217bhM/57EUz9rxR6furIDmCW3KtWSGspkKTPlvkwXrAdtUr6zREl4QP6RanaKbsfHUJYxFJP5hBf43/9YBM20su7IKmoJAnrzc0MzluW6hbXlN/kxKsGMsA+tWQGdRUw4ywtoQp94E2XTg3DvopzKqd+w+7gWMFiDQEqBPIeYYK3FpXaV7lHPQbNGmQ9TUBtyAqdVulKADSJeui8E0Bwv6+SqkKcBVcrtPxy9gOEBNFvLzlYVt4FV5VdC8HnCvG+P+m+Zh2Thh/ghT3Sqy5+L0KapTc7mq4RhiIfeH4zG++CnBqalQ1B2EJvfswEG2lW5dnuDVB3u4otfJ3ChgAfTQVKLUAXvMpAFRivE1wLPxAE9/8Df2HglAqN+lThPghaMc72zsoSusu+NAjI8OTiOSu9KUVHTTFuVBEU/zxDHaDbB2JbD5nh5e2ziGw8fP4cT5wLOeB7QN4HaxYFcs/PInfew+xKDK1LllQQYzywETYt6xr0XqwCy2PtDDuhtHsPtg4lxfUVl7aIVPWbgQVi4JEIhkeeAXXuyTC1A9YCWKeRIKYd+RWUQRiTPjHqP31LpHqv9IiCzxRFEeE+vAwVH0Z87AAyTiOwxQBSPHz0QcUcIxr8PceLTuwBbqmiDPcwNgOOsIUZ9hzQrCd1sXYNXV3JhvryGDX60MAzSRmUTKQkT9MUOgBdeRIUvTLFzAMH7ZPFzS8aXp0h2ZsYb2zR2gjSV0BVj1IlnsGNMF2oDlbyU8+3ao2cKKLJ92AKCCVVmMc9eBKyOEvKBmF2yZM7yZkWDsr8HLZLlBc6fPDpIcB7O23B/SNCD1BjNSeXrgw04oDeGI9+QIeaQP0FqnplKrcXGYAocw1c4F5xZGhQKCUaPbZwCU4JblARZ0CafOu3bDWs8WQNYW7j/yj7A24Ym7RrHu+kRYIkIUJ/JXhKkoQaza8juW32nfbNqXSPdAGdPTZj42xpplHM9vGBM9IfYcjvzKSTIuAeQIeaf/6mLbvj6euW8UOzctEvF0gOmo5mnKRQEVYVPRzcs72PnwpeiGIXrzw4z3+t4/cWyCZUVT3bWt42bozkLY8RXhm2NTuHf1CK5bEmKkE8JHlPk/HEEixumpAVJrpnRmKsLRkyEGAtyvk8Ceb2dwUDzHpLWY0/2YE7QG0xKYRoHvfwvEr3APDAQoVeWRrGjJKOOLTFisR7JKLZVNLbrhzSg74MUOBIAvwenkSOPwTsrCWAGHW+BURUpGn5rv7uM1GdAyHjlAK4v5JpURQm+bNNzVC44s6p+rY/P6tDvL6W142+75Pn67hx1W59Nt6+D68SZAH3+YNxWdFTQDUHWEiwg+8tcl7aiSEZOypT2LmQjKwt0vrP7QotW2u3guV2Wa4QrQIqCfIyoFVi+uqCzkaze5zHAPPciCv/g7rfrK2oPjkGtBlzXNQ1QHmBzrtQUs15U5gRj/sgJ6MMM/FBE29r2nVW8aLmv7FW6vjEz4aWotq6xJYsGuCuiz743/LkqEF9yVmitqoIZabLlnbNZjvZOLFLSl//6SCdigU/rj7ctfErfyF2GcVbRQwh936xWo7kb+PCatzNDnYE/2d121XV/DGcsWPzZ5g/Dx58S/9taL2WP60R0m6w0Vh3OvyHK7kH1WNPaLd/5XhIV/xEW6SBc4/QvU8FBsjyRiXwAAAABJRU5ErkJggg=="/>%0A</svg>%0A';
|
|
5
|
+
export {
|
|
6
|
+
klipWallet_default as default
|
|
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";
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* Used in Telegram Mini App and other environments where the user
|
|
10
10
|
* has a pre-authenticated access-key stored in CloudStorage/localStorage.
|
|
11
11
|
*/
|
|
12
|
+
import type { RequestInterceptor } from '../../../providers/SignConfirmationProvider';
|
|
12
13
|
import type { AbcEvmWallet } from './types';
|
|
13
14
|
declare class EventEmitter {
|
|
14
15
|
private events;
|
|
@@ -28,7 +29,10 @@ export declare class AbcAccessKeyProvider extends EventEmitter {
|
|
|
28
29
|
private connected;
|
|
29
30
|
private accessKey;
|
|
30
31
|
private apiBaseUrl;
|
|
32
|
+
private requestInterceptor?;
|
|
31
33
|
constructor(accessKey: string, apiBaseUrl?: string);
|
|
34
|
+
setRequestInterceptor(interceptor?: RequestInterceptor): void;
|
|
35
|
+
private callInterceptor;
|
|
32
36
|
setWallet(wallet: AbcEvmWallet): void;
|
|
33
37
|
clearWallet(): void;
|
|
34
38
|
isConnected(): boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
AbcAccessKeyProvider
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-E6ZG77AF.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-SDRE2D5I.js";
|
|
5
|
+
import "../chunk-5ERWBR7D.js";
|
|
5
6
|
import "../chunk-R6ZE7JAZ.js";
|
|
6
7
|
import "../chunk-GFWUFYT2.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-E6ZG77AF.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,17 @@
|
|
|
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
|
-
STORAGE_PREFIX
|
|
14
|
-
|
|
12
|
+
STORAGE_PREFIX,
|
|
13
|
+
loadTgAccessKey
|
|
14
|
+
} from "../chunk-6KRX73ED.js";
|
|
15
15
|
|
|
16
16
|
// src/wallets/walletConnectors/abcWallet/abcSolanaWalletAdapter.ts
|
|
17
17
|
import {
|
|
@@ -206,11 +206,7 @@ var AbcSolanaWalletAdapter = class extends BaseMessageSignerWalletAdapter {
|
|
|
206
206
|
disableBuiltInAuth: config.disableBuiltInAuth ?? true
|
|
207
207
|
// Default: true (TalkenKit integration mode)
|
|
208
208
|
};
|
|
209
|
-
this._talkenApi =
|
|
210
|
-
baseUrl: this._config.talkenApiUrl,
|
|
211
|
-
debug: this._config.environment === "development",
|
|
212
|
-
environment: this._config.environment
|
|
213
|
-
});
|
|
209
|
+
this._talkenApi = getTalkenApiClient();
|
|
214
210
|
this._injectStyles();
|
|
215
211
|
if (typeof window !== "undefined") {
|
|
216
212
|
this._handleStorageUpdate = this._handleStorageUpdate.bind(this);
|
|
@@ -260,46 +256,49 @@ var AbcSolanaWalletAdapter = class extends BaseMessageSignerWalletAdapter {
|
|
|
260
256
|
if (authState) {
|
|
261
257
|
try {
|
|
262
258
|
const authData = JSON.parse(authState);
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
259
|
+
const hasAccessKey = !!loadTgAccessKey();
|
|
260
|
+
if (authData.solanaWallet && (this._talkenApi.isAuthenticated() || hasAccessKey)) {
|
|
261
|
+
const wallet = authData.solanaWallet;
|
|
262
|
+
const keyId = wallet.keyId || wallet.key_id;
|
|
263
|
+
const encryptedShare = wallet.encryptedShare || wallet.encrypted_share;
|
|
264
|
+
const secretStore = wallet.secretStore || wallet.secret_store;
|
|
265
|
+
if (!keyId || !encryptedShare) {
|
|
266
|
+
this._connecting = false;
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
const normalizedWallet = {
|
|
270
|
+
...wallet,
|
|
271
|
+
keyId,
|
|
272
|
+
encryptedShare,
|
|
273
|
+
secretStore: secretStore || ""
|
|
274
|
+
};
|
|
275
|
+
if (!this._talkenApi.isAccessKeyMode() && authData.accessToken) {
|
|
279
276
|
this._talkenApi.setTokens(
|
|
280
277
|
authData.accessToken,
|
|
281
278
|
authData.refreshToken,
|
|
282
279
|
authData.expiresAt
|
|
283
280
|
);
|
|
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
281
|
}
|
|
282
|
+
this._wallet = normalizedWallet;
|
|
283
|
+
const addressOrPubkey = normalizedWallet.address || normalizedWallet.publicKey;
|
|
284
|
+
try {
|
|
285
|
+
this._publicKey = new PublicKey(addressOrPubkey);
|
|
286
|
+
} catch (_error) {
|
|
287
|
+
const hexKey = addressOrPubkey.startsWith("0x") ? addressOrPubkey.slice(2) : addressOrPubkey;
|
|
288
|
+
const bytes = new Uint8Array(Buffer.from(hexKey, "hex"));
|
|
289
|
+
this._publicKey = new PublicKey(bytes);
|
|
290
|
+
}
|
|
291
|
+
this._connecting = false;
|
|
292
|
+
const displayAddress2 = this._publicKey.toBase58();
|
|
293
|
+
console.log(
|
|
294
|
+
`[AbcSolanaWalletAdapter] \u2705 Wallet connected: ${displayAddress2.slice(0, 6)}...${displayAddress2.slice(-6)}`
|
|
295
|
+
);
|
|
296
|
+
this.emit("connect", this._publicKey);
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
if (!this._talkenApi.isAccessKeyMode() && !hasAccessKey) {
|
|
301
300
|
console.log(
|
|
302
|
-
"[AbcSolanaWalletAdapter]
|
|
301
|
+
"[AbcSolanaWalletAdapter] Not authenticated, clearing session"
|
|
303
302
|
);
|
|
304
303
|
localStorage.removeItem(`${STORAGE_PREFIX}auth_state`);
|
|
305
304
|
}
|
|
@@ -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-G6SV7RAS.js";
|
|
5
|
+
import "../chunk-SDRE2D5I.js";
|
|
6
|
+
import "../chunk-5ERWBR7D.js";
|
|
6
7
|
import "../chunk-R6ZE7JAZ.js";
|
|
7
8
|
import "../chunk-GFWUFYT2.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-E6ZG77AF.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-G6SV7RAS.js";
|
|
51
51
|
import {
|
|
52
52
|
abcConnector
|
|
53
|
-
} from "../chunk-
|
|
53
|
+
} from "../chunk-SDRE2D5I.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-E6ZG77AF.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
|