@talken/talkenkit 2.3.6 → 2.3.7
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/components/ChainIndicator/ChainIndicator.css.d.ts +4 -0
- package/dist/components/ChainIndicator/ChainIndicator.d.ts +53 -0
- package/dist/components/ChainIndicator/index.d.ts +2 -0
- package/dist/components/ChainSelector/ChainSelector.css.d.ts +5 -0
- package/dist/components/ChainSelector/ChainSelector.d.ts +38 -0
- package/dist/components/ChainSelector/index.d.ts +2 -0
- package/dist/components/ConnectButton/ConnectButtonRenderer.d.ts +9 -0
- package/dist/components/ConnectOptions/DesktopOptions.d.ts +5 -1
- package/dist/components/ConnectOptions/MultiChainConnectOptions.d.ts +31 -0
- package/dist/components/ConnectOptions/index.d.ts +3 -0
- package/dist/components/ModalSelection/ModalSelection.d.ts +2 -1
- package/dist/components/ProfileDetails/ProfileDetails.d.ts +1 -2
- package/dist/components/RainbowKitProvider/RainbowKitProvider.d.ts +8 -1
- package/dist/components/SolanaWalletList/SolanaWalletList.css.d.ts +7 -0
- package/dist/components/SolanaWalletList/SolanaWalletList.d.ts +32 -0
- package/dist/components/SolanaWalletList/index.d.ts +2 -0
- package/dist/contexts/MultiChainContext.d.ts +68 -0
- package/dist/contexts/index.d.ts +7 -0
- package/dist/index.css +105 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1432 -834
- package/dist/solana/SolanaWalletProvider.d.ts +38 -0
- package/dist/solana/config.d.ts +57 -0
- package/dist/solana/index.d.ts +11 -0
- package/dist/solana/utils/detection.d.ts +27 -0
- package/dist/solana/wallets/backpackWallet.d.ts +19 -0
- package/dist/solana/wallets/index.d.ts +8 -0
- package/dist/solana/wallets/phantomSolanaWallet.d.ts +17 -0
- package/dist/solana/wallets/solflareWallet.d.ts +17 -0
- package/dist/types/solana.d.ts +97 -0
- package/dist/wallets/recentSolanaWalletIds.d.ts +16 -0
- package/dist/wallets/walletConnectors/abcWallet/api/index.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/index.js +2 -2
- package/dist/wallets/walletConnectors/chunk-3SVPZCA6.js +71 -0
- package/dist/wallets/walletConnectors/chunk-5QEUEPNY.js +94 -0
- package/dist/wallets/walletConnectors/chunk-B6JLYR3I.js +66 -0
- package/dist/wallets/walletConnectors/chunk-HKWBR5B7.js +102 -0
- package/dist/wallets/walletConnectors/chunk-K4APJ4PE.js +96 -0
- package/dist/wallets/walletConnectors/chunk-LJ2B47VF.js +108 -0
- package/dist/wallets/walletConnectors/chunk-LXINMUQC.js +186 -0
- package/dist/wallets/walletConnectors/chunk-MORUEOYX.js +76 -0
- package/dist/wallets/walletConnectors/chunk-MQTXA63X.js +27 -0
- package/dist/wallets/walletConnectors/chunk-PMZJGS7X.js +73 -0
- package/dist/wallets/walletConnectors/chunk-WZZVA3LW.js +101 -0
- package/dist/wallets/walletConnectors/chunk-XEIKWKH7.js +63 -0
- package/dist/wallets/walletConnectors/chunk-XOQNQKZE.js +98 -0
- package/dist/wallets/walletConnectors/chunk-ZAGAF6PO.js +63 -0
- package/dist/wallets/walletConnectors/chunk-ZJ6OFFD5.js +95 -0
- package/dist/wallets/walletConnectors/index.js +9 -9
- package/package.json +6 -1
- package/dist/wallets/walletConnectors/chunk-2J66VMY5.js +0 -152
- package/dist/wallets/walletConnectors/chunk-2J6LHJAF.js +0 -228
- package/dist/wallets/walletConnectors/chunk-2ZPGPZCP.js +0 -228
- package/dist/wallets/walletConnectors/chunk-3DPCIDW6.js +0 -1730
- package/dist/wallets/walletConnectors/chunk-4HKJ53H3.js +0 -1742
- package/dist/wallets/walletConnectors/chunk-5EARL7FN.js +0 -39
- package/dist/wallets/walletConnectors/chunk-6JKWIEGA.js +0 -228
- package/dist/wallets/walletConnectors/chunk-7L33BY4P.js +0 -44
- package/dist/wallets/walletConnectors/chunk-7SXCH5TL.js +0 -1752
- package/dist/wallets/walletConnectors/chunk-7UZBDZZZ.js +0 -599
- package/dist/wallets/walletConnectors/chunk-BRM4ZVXZ.js +0 -44
- package/dist/wallets/walletConnectors/chunk-BUDWZAL7.js +0 -44
- package/dist/wallets/walletConnectors/chunk-CSWWNAYR.js +0 -44
- package/dist/wallets/walletConnectors/chunk-E4N7SPPU.js +0 -39
- package/dist/wallets/walletConnectors/chunk-ENU7XLF5.js +0 -44
- package/dist/wallets/walletConnectors/chunk-ESRU5KCF.js +0 -151
- package/dist/wallets/walletConnectors/chunk-FF7ZIXKD.js +0 -39
- package/dist/wallets/walletConnectors/chunk-FJCL2YPU.js +0 -1737
- package/dist/wallets/walletConnectors/chunk-FSU3WBH3.js +0 -63
- package/dist/wallets/walletConnectors/chunk-G2IHR6PW.js +0 -63
- package/dist/wallets/walletConnectors/chunk-HD6YCICR.js +0 -228
- package/dist/wallets/walletConnectors/chunk-HDYBRMYW.js +0 -194
- package/dist/wallets/walletConnectors/chunk-HIZCIW5L.js +0 -228
- package/dist/wallets/walletConnectors/chunk-JRNBDHFL.js +0 -44
- package/dist/wallets/walletConnectors/chunk-KIQDE4N6.js +0 -39
- package/dist/wallets/walletConnectors/chunk-KOT7JYJR.js +0 -39
- package/dist/wallets/walletConnectors/chunk-KRAIITU7.js +0 -39
- package/dist/wallets/walletConnectors/chunk-KZOSE2PI.js +0 -228
- package/dist/wallets/walletConnectors/chunk-L7I5I4CZ.js +0 -44
- package/dist/wallets/walletConnectors/chunk-LNZJLKFB.js +0 -39
- package/dist/wallets/walletConnectors/chunk-LV765WZL.js +0 -1748
- package/dist/wallets/walletConnectors/chunk-MSI2BPP5.js +0 -1722
- package/dist/wallets/walletConnectors/chunk-MX2IY5CD.js +0 -44
- package/dist/wallets/walletConnectors/chunk-NLX2EV7O.js +0 -44
- package/dist/wallets/walletConnectors/chunk-NVAZ3B3V.js +0 -228
- package/dist/wallets/walletConnectors/chunk-OEWU3ZMN.js +0 -39
- package/dist/wallets/walletConnectors/chunk-P2MTINFI.js +0 -280
- package/dist/wallets/walletConnectors/chunk-PNMSIVVT.js +0 -44
- package/dist/wallets/walletConnectors/chunk-PZNYT2HC.js +0 -1722
- package/dist/wallets/walletConnectors/chunk-QPAE4SDS.js +0 -39
- package/dist/wallets/walletConnectors/chunk-QZRNNI3E.js +0 -39
- package/dist/wallets/walletConnectors/chunk-R4UYVU5X.js +0 -1721
- package/dist/wallets/walletConnectors/chunk-R6JCHV55.js +0 -39
- package/dist/wallets/walletConnectors/chunk-RLBGBBIO.js +0 -309
- package/dist/wallets/walletConnectors/chunk-RWIZ25FJ.js +0 -1684
- package/dist/wallets/walletConnectors/chunk-TUUNSVKZ.js +0 -345
- package/dist/wallets/walletConnectors/chunk-U2CUEL35.js +0 -240
- package/dist/wallets/walletConnectors/chunk-V6NRLREB.js +0 -44
- package/dist/wallets/walletConnectors/chunk-VM7AEC7H.js +0 -39
- package/dist/wallets/walletConnectors/chunk-VPNKJ7PB.js +0 -1674
- package/dist/wallets/walletConnectors/chunk-W2VDZD74.js +0 -478
- package/dist/wallets/walletConnectors/chunk-WAO3KL5U.js +0 -285
- package/dist/wallets/walletConnectors/chunk-WPHTIILX.js +0 -228
- package/dist/wallets/walletConnectors/chunk-WR7HSVMH.js +0 -228
- package/dist/wallets/walletConnectors/chunk-WSCJY2QD.js +0 -228
- package/dist/wallets/walletConnectors/chunk-X3JQB5QL.js +0 -44
- package/dist/wallets/walletConnectors/chunk-X4CDP7L7.js +0 -228
- package/dist/wallets/walletConnectors/chunk-XETOVXYM.js +0 -228
- package/dist/wallets/walletConnectors/chunk-XYPR4BAF.js +0 -436
- package/dist/wallets/walletConnectors/chunk-YZBFKVTX.js +0 -1675
- package/dist/wallets/walletConnectors/chunk-Z2ZRPTPX.js +0 -1726
- package/dist/wallets/walletConnectors/{chunk-47TQ23J4.js → chunk-6TLWAEJV.js} +8 -8
- package/dist/wallets/walletConnectors/{chunk-LTBQU2GW.js → chunk-74ALNZG4.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-66SCJ77O.js → chunk-CM5OGUJV.js} +6 -6
- package/dist/wallets/walletConnectors/{chunk-VCBVYFLJ.js → chunk-NLKL4KD2.js} +8 -8
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-MBBGZGXF.js";
|
|
6
|
+
import {
|
|
7
|
+
isAndroid
|
|
8
|
+
} from "./chunk-RETKWSKD.js";
|
|
9
|
+
import {
|
|
10
|
+
getWalletConnectConnector
|
|
11
|
+
} from "./chunk-PODFK4OS.js";
|
|
12
|
+
|
|
13
|
+
// src/wallets/walletConnectors/bitgetWallet/bitgetWallet.ts
|
|
14
|
+
var bitgetWallet = ({
|
|
15
|
+
projectId,
|
|
16
|
+
walletConnectParameters
|
|
17
|
+
}) => {
|
|
18
|
+
const isBitKeepInjected = hasInjectedProvider({
|
|
19
|
+
namespace: "bitkeep.ethereum",
|
|
20
|
+
flag: "isBitKeep"
|
|
21
|
+
});
|
|
22
|
+
const shouldUseWalletConnect = !isBitKeepInjected;
|
|
23
|
+
return {
|
|
24
|
+
id: "bitget",
|
|
25
|
+
name: "Bitget Wallet",
|
|
26
|
+
rdns: "com.bitget.web3",
|
|
27
|
+
iconUrl: async () => (await import("./bitgetWallet-CLYTW54T.js")).default,
|
|
28
|
+
iconAccent: "#f6851a",
|
|
29
|
+
iconBackground: "#fff",
|
|
30
|
+
installed: !shouldUseWalletConnect ? isBitKeepInjected : void 0,
|
|
31
|
+
downloadUrls: {
|
|
32
|
+
android: "https://web3.bitget.com/en/wallet-download?type=0",
|
|
33
|
+
ios: "https://apps.apple.com/app/bitkeep/id1395301115",
|
|
34
|
+
mobile: "https://web3.bitget.com/en/wallet-download?type=2",
|
|
35
|
+
qrCode: "https://web3.bitget.com/en/wallet-download",
|
|
36
|
+
chrome: "https://chrome.google.com/webstore/detail/bitkeep-crypto-nft-wallet/jiidiaalihmmhddjgbnbgdfflelocpak",
|
|
37
|
+
browserExtension: "https://web3.bitget.com/en/wallet-download"
|
|
38
|
+
},
|
|
39
|
+
extension: {
|
|
40
|
+
instructions: {
|
|
41
|
+
learnMoreUrl: "https://web3.bitget.com/en/academy",
|
|
42
|
+
steps: [
|
|
43
|
+
{
|
|
44
|
+
description: "wallet_connectors.bitget.extension.step1.description",
|
|
45
|
+
step: "install",
|
|
46
|
+
title: "wallet_connectors.bitget.extension.step1.title"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
description: "wallet_connectors.bitget.extension.step2.description",
|
|
50
|
+
step: "create",
|
|
51
|
+
title: "wallet_connectors.bitget.extension.step2.title"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
description: "wallet_connectors.bitget.extension.step3.description",
|
|
55
|
+
step: "refresh",
|
|
56
|
+
title: "wallet_connectors.bitget.extension.step3.description"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
mobile: {
|
|
62
|
+
getUri: shouldUseWalletConnect ? (uri) => {
|
|
63
|
+
return isAndroid() ? uri : `bitkeep://wc?uri=${encodeURIComponent(uri)}`;
|
|
64
|
+
} : void 0
|
|
65
|
+
},
|
|
66
|
+
qrCode: shouldUseWalletConnect ? {
|
|
67
|
+
getUri: (uri) => uri,
|
|
68
|
+
instructions: {
|
|
69
|
+
learnMoreUrl: "https://web3.bitget.com/en/academy",
|
|
70
|
+
steps: [
|
|
71
|
+
{
|
|
72
|
+
description: "wallet_connectors.bitget.qr_code.step1.description",
|
|
73
|
+
step: "install",
|
|
74
|
+
title: "wallet_connectors.bitget.qr_code.step1.title"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
description: "wallet_connectors.bitget.qr_code.step2.description",
|
|
78
|
+
step: "create",
|
|
79
|
+
title: "wallet_connectors.bitget.qr_code.step2.title"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
description: "wallet_connectors.bitget.qr_code.step3.description",
|
|
83
|
+
step: "scan",
|
|
84
|
+
title: "wallet_connectors.bitget.qr_code.step3.title"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
} : void 0,
|
|
89
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
90
|
+
projectId,
|
|
91
|
+
walletConnectParameters
|
|
92
|
+
}) : getInjectedConnector({
|
|
93
|
+
namespace: "bitkeep.ethereum",
|
|
94
|
+
flag: "isBitKeep"
|
|
95
|
+
})
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export {
|
|
100
|
+
bitgetWallet
|
|
101
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
SigningApi
|
|
4
|
+
} from "./chunk-4UGXLYKP.js";
|
|
5
|
+
import {
|
|
6
|
+
SolanaApi
|
|
7
|
+
} from "./chunk-DMRM7XAS.js";
|
|
8
|
+
import {
|
|
9
|
+
AuthApi
|
|
10
|
+
} from "./chunk-W7R3JGSC.js";
|
|
11
|
+
import {
|
|
12
|
+
BitcoinApi
|
|
13
|
+
} from "./chunk-BXCOGV3N.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
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-MBBGZGXF.js";
|
|
6
|
+
import {
|
|
7
|
+
isAndroid
|
|
8
|
+
} from "./chunk-RETKWSKD.js";
|
|
9
|
+
import {
|
|
10
|
+
getWalletConnectConnector
|
|
11
|
+
} from "./chunk-PODFK4OS.js";
|
|
12
|
+
|
|
13
|
+
// src/wallets/walletConnectors/frontierWallet/frontierWallet.ts
|
|
14
|
+
var frontierWallet = ({
|
|
15
|
+
projectId,
|
|
16
|
+
walletConnectParameters
|
|
17
|
+
}) => {
|
|
18
|
+
const isFrontierInjected = hasInjectedProvider({
|
|
19
|
+
namespace: "frontier.ethereum",
|
|
20
|
+
flag: "isFrontier"
|
|
21
|
+
});
|
|
22
|
+
const shouldUseWalletConnect = !isFrontierInjected;
|
|
23
|
+
return {
|
|
24
|
+
id: "frontier",
|
|
25
|
+
name: "Frontier Wallet",
|
|
26
|
+
rdns: "xyz.frontier.wallet",
|
|
27
|
+
installed: isFrontierInjected,
|
|
28
|
+
iconUrl: async () => (await import("./frontierWallet-HNIG7QYQ.js")).default,
|
|
29
|
+
iconBackground: "#CC703C",
|
|
30
|
+
downloadUrls: {
|
|
31
|
+
android: "https://play.google.com/store/apps/details?id=com.frontierwallet",
|
|
32
|
+
ios: "https://apps.apple.com/us/app/frontier-crypto-defi-wallet/id1482380988",
|
|
33
|
+
qrCode: "https://www.frontier.xyz/download",
|
|
34
|
+
chrome: "https://chrome.google.com/webstore/detail/frontier-wallet/kppfdiipphfccemcignhifpjkapfbihd",
|
|
35
|
+
browserExtension: "https://www.frontier.xyz/download"
|
|
36
|
+
},
|
|
37
|
+
mobile: {
|
|
38
|
+
getUri: shouldUseWalletConnect ? (uri) => {
|
|
39
|
+
return isAndroid() ? `frontier://wc?uri=${encodeURIComponent(uri)}` : uri;
|
|
40
|
+
} : void 0
|
|
41
|
+
},
|
|
42
|
+
qrCode: shouldUseWalletConnect ? {
|
|
43
|
+
getUri: (uri) => {
|
|
44
|
+
return isAndroid() ? `frontier://wc?uri=${encodeURIComponent(uri)}` : uri;
|
|
45
|
+
},
|
|
46
|
+
instructions: {
|
|
47
|
+
learnMoreUrl: "https://help.frontier.xyz/en/",
|
|
48
|
+
steps: [
|
|
49
|
+
{
|
|
50
|
+
description: "wallet_connectors.im_token.qr_code.step1.description",
|
|
51
|
+
step: "install",
|
|
52
|
+
title: "wallet_connectors.im_token.qr_code.step1.title"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
description: "wallet_connectors.im_token.qr_code.step2.description",
|
|
56
|
+
step: "create",
|
|
57
|
+
title: "wallet_connectors.im_token.qr_code.step2.title"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
description: "wallet_connectors.im_token.qr_code.step3.description",
|
|
61
|
+
step: "scan",
|
|
62
|
+
title: "wallet_connectors.im_token.qr_code.step3.title"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
} : void 0,
|
|
67
|
+
extension: {
|
|
68
|
+
instructions: {
|
|
69
|
+
learnMoreUrl: "https://help.frontier.xyz/en/articles/6967236-setting-up-frontier-on-your-device",
|
|
70
|
+
steps: [
|
|
71
|
+
{
|
|
72
|
+
description: "wallet_connectors.frontier.extension.step1.description",
|
|
73
|
+
step: "install",
|
|
74
|
+
title: "wallet_connectors.frontier.extension.step1.title"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
description: "wallet_connectors.frontier.extension.step2.description",
|
|
78
|
+
step: "create",
|
|
79
|
+
title: "wallet_connectors.frontier.extension.step2.title"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
description: "wallet_connectors.frontier.extension.step3.description",
|
|
83
|
+
step: "refresh",
|
|
84
|
+
title: "wallet_connectors.frontier.extension.step3.title"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({ projectId, walletConnectParameters }) : getInjectedConnector({
|
|
90
|
+
namespace: "frontier.ethereum",
|
|
91
|
+
flag: "isFrontier"
|
|
92
|
+
})
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export {
|
|
97
|
+
frontierWallet
|
|
98
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
SolanaApi
|
|
4
|
+
} from "./chunk-DMRM7XAS.js";
|
|
5
|
+
import {
|
|
6
|
+
AuthApi
|
|
7
|
+
} from "./chunk-W7R3JGSC.js";
|
|
8
|
+
import {
|
|
9
|
+
BitcoinApi
|
|
10
|
+
} from "./chunk-BXCOGV3N.js";
|
|
11
|
+
import {
|
|
12
|
+
SigningApi
|
|
13
|
+
} from "./chunk-4UGXLYKP.js";
|
|
14
|
+
import {
|
|
15
|
+
WalletApi
|
|
16
|
+
} from "./chunk-JBRW4UTW.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,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-MBBGZGXF.js";
|
|
6
|
+
import {
|
|
7
|
+
isMobile
|
|
8
|
+
} from "./chunk-RETKWSKD.js";
|
|
9
|
+
import {
|
|
10
|
+
getWalletConnectConnector
|
|
11
|
+
} from "./chunk-PODFK4OS.js";
|
|
12
|
+
|
|
13
|
+
// src/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.ts
|
|
14
|
+
var tokenPocketWallet = ({
|
|
15
|
+
projectId,
|
|
16
|
+
walletConnectParameters
|
|
17
|
+
}) => {
|
|
18
|
+
const isTokenPocketInjected = hasInjectedProvider({ flag: "isTokenPocket" });
|
|
19
|
+
const shouldUseWalletConnect = !isTokenPocketInjected;
|
|
20
|
+
const getUri = (uri) => {
|
|
21
|
+
return isMobile() ? `tpoutside://wc?uri=${encodeURIComponent(uri)}` : uri;
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
id: "tokenPocket",
|
|
25
|
+
name: "TokenPocket",
|
|
26
|
+
rdns: "pro.tokenpocket",
|
|
27
|
+
iconUrl: async () => (await import("./tokenPocketWallet-BVMBOYTC.js")).default,
|
|
28
|
+
iconBackground: "#2980FE",
|
|
29
|
+
installed: !shouldUseWalletConnect ? isTokenPocketInjected : void 0,
|
|
30
|
+
downloadUrls: {
|
|
31
|
+
chrome: "https://chrome.google.com/webstore/detail/tokenpocket/mfgccjchihfkkindfppnaooecgfneiii",
|
|
32
|
+
browserExtension: "https://extension.tokenpocket.pro/",
|
|
33
|
+
android: "https://play.google.com/store/apps/details?id=vip.mytokenpocket",
|
|
34
|
+
ios: "https://apps.apple.com/us/app/tp-global-wallet/id6444625622",
|
|
35
|
+
qrCode: "https://tokenpocket.pro/en/download/app",
|
|
36
|
+
mobile: "https://tokenpocket.pro/en/download/app"
|
|
37
|
+
},
|
|
38
|
+
mobile: {
|
|
39
|
+
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
40
|
+
},
|
|
41
|
+
qrCode: shouldUseWalletConnect ? {
|
|
42
|
+
getUri,
|
|
43
|
+
instructions: {
|
|
44
|
+
learnMoreUrl: "https://help.tokenpocket.pro/en/",
|
|
45
|
+
steps: [
|
|
46
|
+
{
|
|
47
|
+
description: "wallet_connectors.token_pocket.qr_code.step1.description",
|
|
48
|
+
step: "install",
|
|
49
|
+
title: "wallet_connectors.token_pocket.qr_code.step1.title"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
description: "wallet_connectors.token_pocket.qr_code.step2.description",
|
|
53
|
+
step: "create",
|
|
54
|
+
title: "wallet_connectors.token_pocket.qr_code.step2.title"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
description: "wallet_connectors.token_pocket.qr_code.step3.description",
|
|
58
|
+
step: "scan",
|
|
59
|
+
title: "wallet_connectors.token_pocket.qr_code.step3.title"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
} : void 0,
|
|
64
|
+
extension: {
|
|
65
|
+
instructions: {
|
|
66
|
+
learnMoreUrl: "https://help.tokenpocket.pro/en/extension-wallet/faq/installation-tutorial",
|
|
67
|
+
steps: [
|
|
68
|
+
{
|
|
69
|
+
description: "wallet_connectors.token_pocket.extension.step1.description",
|
|
70
|
+
step: "install",
|
|
71
|
+
title: "wallet_connectors.token_pocket.extension.step1.title"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
description: "wallet_connectors.token_pocket.extension.step2.description",
|
|
75
|
+
step: "create",
|
|
76
|
+
title: "wallet_connectors.token_pocket.extension.step2.title"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
description: "wallet_connectors.token_pocket.extension.step3.description",
|
|
80
|
+
step: "refresh",
|
|
81
|
+
title: "wallet_connectors.token_pocket.extension.step3.title"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
87
|
+
projectId,
|
|
88
|
+
walletConnectParameters
|
|
89
|
+
}) : getInjectedConnector({ flag: "isTokenPocket" })
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export {
|
|
94
|
+
tokenPocketWallet
|
|
95
|
+
};
|
|
@@ -27,12 +27,12 @@ import {
|
|
|
27
27
|
import {
|
|
28
28
|
xdefiWallet
|
|
29
29
|
} from "./chunk-26RJNF7V.js";
|
|
30
|
-
import {
|
|
31
|
-
zealWallet
|
|
32
|
-
} from "./chunk-DVLTKWTZ.js";
|
|
33
30
|
import {
|
|
34
31
|
zerionWallet
|
|
35
32
|
} from "./chunk-CCZUA25H.js";
|
|
33
|
+
import {
|
|
34
|
+
zealWallet
|
|
35
|
+
} from "./chunk-DVLTKWTZ.js";
|
|
36
36
|
import {
|
|
37
37
|
safeheronWallet
|
|
38
38
|
} from "./chunk-PHF4VWKP.js";
|
|
@@ -177,24 +177,24 @@ import {
|
|
|
177
177
|
import {
|
|
178
178
|
compassWallet
|
|
179
179
|
} from "./chunk-3OO564GS.js";
|
|
180
|
+
import {
|
|
181
|
+
berasigWallet
|
|
182
|
+
} from "./chunk-UZWMFUJU.js";
|
|
180
183
|
import {
|
|
181
184
|
argentWallet
|
|
182
185
|
} from "./chunk-XT2WYPN5.js";
|
|
183
186
|
import {
|
|
184
187
|
bestWallet
|
|
185
188
|
} from "./chunk-OPAPBEA5.js";
|
|
186
|
-
import {
|
|
187
|
-
berasigWallet
|
|
188
|
-
} from "./chunk-UZWMFUJU.js";
|
|
189
189
|
import {
|
|
190
190
|
bifrostWallet
|
|
191
191
|
} from "./chunk-WXXI4WBF.js";
|
|
192
|
-
import {
|
|
193
|
-
binanceWallet
|
|
194
|
-
} from "./chunk-TUDZHFVC.js";
|
|
195
192
|
import {
|
|
196
193
|
bitgetWallet
|
|
197
194
|
} from "./chunk-ITLTDJ3D.js";
|
|
195
|
+
import {
|
|
196
|
+
binanceWallet
|
|
197
|
+
} from "./chunk-TUDZHFVC.js";
|
|
198
198
|
import "./chunk-RETKWSKD.js";
|
|
199
199
|
import "./chunk-PODFK4OS.js";
|
|
200
200
|
import {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@talken/talkenkit",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.7",
|
|
4
4
|
"description": "The best way to connect a wallet",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -69,6 +69,11 @@
|
|
|
69
69
|
"vitest": "2.0.5"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
+
"@solana/wallet-adapter-base": "^0.9.23",
|
|
73
|
+
"@solana/wallet-adapter-react": "^0.15.35",
|
|
74
|
+
"@solana/wallet-adapter-wallets": "^0.19.32",
|
|
75
|
+
"@solana/wallet-standard": "^1.1.4",
|
|
76
|
+
"@solana/wallet-standard-features": "^1.3.0",
|
|
72
77
|
"@solana/web3.js": "^1.95.8",
|
|
73
78
|
"@vanilla-extract/css": "1.17.3",
|
|
74
79
|
"@vanilla-extract/dynamic": "2.1.4",
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
BaseApiClient
|
|
4
|
-
} from "./chunk-WAO3KL5U.js";
|
|
5
|
-
import {
|
|
6
|
-
createAbcError
|
|
7
|
-
} from "./chunk-W2VDZD74.js";
|
|
8
|
-
|
|
9
|
-
// src/wallets/walletConnectors/abcWallet/api/SolanaApi.ts
|
|
10
|
-
var SolanaApi = class extends BaseApiClient {
|
|
11
|
-
/**
|
|
12
|
-
* Generate Solana wallet (Ed25519)
|
|
13
|
-
* Uses V3 API with Ed25519 curve
|
|
14
|
-
*
|
|
15
|
-
* @param pin - Hashed PIN (SHA-256)
|
|
16
|
-
* @param isRecover - Whether to recover existing wallet (default: false)
|
|
17
|
-
* @returns Solana wallet information
|
|
18
|
-
*/
|
|
19
|
-
async generateSolanaWallet(pin, isRecover = false) {
|
|
20
|
-
const endpoint = `/v3/wallet/${isRecover ? "recover" : "generate"}`;
|
|
21
|
-
console.log(
|
|
22
|
-
`[SolanaApi] \u{1F527} ${isRecover ? "Recovering" : "Generating"} Solana wallet...`
|
|
23
|
-
);
|
|
24
|
-
const response = await this.request(endpoint, {
|
|
25
|
-
method: "POST",
|
|
26
|
-
contentType: "json",
|
|
27
|
-
body: {
|
|
28
|
-
curve: "ed25519",
|
|
29
|
-
password: pin,
|
|
30
|
-
network: "solana"
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
if (response.status !== "success" || !response.result) {
|
|
34
|
-
console.error("[SolanaApi] \u274C Operation failed:", response);
|
|
35
|
-
throw createAbcError(
|
|
36
|
-
"WALLET_NOT_FOUND" /* WALLET_NOT_FOUND */,
|
|
37
|
-
`Failed to ${isRecover ? "recover" : "generate"} Solana wallet`,
|
|
38
|
-
response
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
const result = response.result;
|
|
42
|
-
const address = this.deriveAddressFromPublicKey(result.public_key);
|
|
43
|
-
console.log("[SolanaApi] \u2705 Wallet ready:", address);
|
|
44
|
-
return {
|
|
45
|
-
uid: result.uid || "",
|
|
46
|
-
sessionId: result.share_id,
|
|
47
|
-
shareId: result.share_id,
|
|
48
|
-
publicKey: result.public_key,
|
|
49
|
-
address,
|
|
50
|
-
keyId: result.key_id || result.share_id,
|
|
51
|
-
encryptedShare: result.encrypted_share || ""
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Recover Solana wallet (alias for generateSolanaWallet with isRecover=true)
|
|
56
|
-
*
|
|
57
|
-
* @param pin - Hashed PIN (SHA-256)
|
|
58
|
-
* @returns Recovered Solana wallet information
|
|
59
|
-
*/
|
|
60
|
-
async recoverSolanaWallet(pin) {
|
|
61
|
-
return this.generateSolanaWallet(pin, true);
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Derive Solana address from Ed25519 public key
|
|
65
|
-
* Converts hex public key to base58-encoded Solana address
|
|
66
|
-
*
|
|
67
|
-
* @param publicKey - Ed25519 public key (hex)
|
|
68
|
-
* @returns Solana address (base58)
|
|
69
|
-
*/
|
|
70
|
-
deriveAddressFromPublicKey(publicKey) {
|
|
71
|
-
const cleanKey = publicKey.startsWith("0x") ? publicKey.slice(2) : publicKey;
|
|
72
|
-
return cleanKey;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Sign Solana transaction with Ed25519
|
|
76
|
-
*/
|
|
77
|
-
async signSolanaTransaction(params) {
|
|
78
|
-
const response = await this.request("/v3/wallet/sign", {
|
|
79
|
-
method: "POST",
|
|
80
|
-
contentType: "json",
|
|
81
|
-
body: {
|
|
82
|
-
uid: params.uid,
|
|
83
|
-
share_id: params.shareId,
|
|
84
|
-
message: params.message,
|
|
85
|
-
password: params.pin
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
if (response.status !== "success" || !response.result?.signature) {
|
|
89
|
-
throw createAbcError(
|
|
90
|
-
"SIGNATURE_FAILED" /* SIGNATURE_FAILED */,
|
|
91
|
-
"Failed to sign Solana transaction",
|
|
92
|
-
response
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
return {
|
|
96
|
-
signature: response.result.signature
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Sign Solana message with Ed25519
|
|
101
|
-
*/
|
|
102
|
-
async signSolanaMessage(params) {
|
|
103
|
-
const response = await this.request("/v3/wallet/sign", {
|
|
104
|
-
method: "POST",
|
|
105
|
-
contentType: "json",
|
|
106
|
-
body: {
|
|
107
|
-
uid: params.uid,
|
|
108
|
-
share_id: params.shareId,
|
|
109
|
-
message: params.message,
|
|
110
|
-
password: params.pin
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
if (response.status !== "success" || !response.result?.signature) {
|
|
114
|
-
throw createAbcError(
|
|
115
|
-
"SIGNATURE_FAILED" /* SIGNATURE_FAILED */,
|
|
116
|
-
"Failed to sign Solana message",
|
|
117
|
-
response
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
return {
|
|
121
|
-
signature: response.result.signature
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Send Solana transaction
|
|
126
|
-
*/
|
|
127
|
-
async sendSolanaTransaction(params) {
|
|
128
|
-
const response = await this.request("/wapi/v2/solana/tx/sendTransaction", {
|
|
129
|
-
method: "POST",
|
|
130
|
-
contentType: "json",
|
|
131
|
-
body: {
|
|
132
|
-
network: params.network,
|
|
133
|
-
serializedTX: params.serializedTX,
|
|
134
|
-
signatures: params.signatures
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
if (response.status !== "success" || !response.result?.data) {
|
|
138
|
-
throw createAbcError(
|
|
139
|
-
"NETWORK_ERROR" /* NETWORK_ERROR */,
|
|
140
|
-
"Failed to send Solana transaction",
|
|
141
|
-
response
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
return {
|
|
145
|
-
txHash: response.result.data
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export {
|
|
151
|
-
SolanaApi
|
|
152
|
-
};
|