@talken/talkenkit 2.4.14 → 2.4.15
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/index.js +3 -69
- package/dist/solana/SolanaWalletProvider.d.ts +1 -1
- package/dist/solana/config.d.ts +1 -1
- package/dist/wallets/walletConnectors/abcWallet/api/index.js +4 -4
- package/dist/wallets/walletConnectors/abcWallet/index.js +2 -2
- package/dist/wallets/walletConnectors/chunk-DNYWTUT5.js +63 -0
- package/dist/wallets/walletConnectors/index.js +53 -53
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3178,7 +3178,7 @@ function AbcSolanaAutoConnector() {
|
|
|
3178
3178
|
function SolanaWalletProvider({
|
|
3179
3179
|
children,
|
|
3180
3180
|
wallets: customWallets,
|
|
3181
|
-
autoConnect =
|
|
3181
|
+
autoConnect = true,
|
|
3182
3182
|
endpoint,
|
|
3183
3183
|
abcWalletConfig
|
|
3184
3184
|
}) {
|
|
@@ -3474,7 +3474,7 @@ function setRainbowKitVersion({ version }) {
|
|
|
3474
3474
|
}
|
|
3475
3475
|
function useFingerprint() {
|
|
3476
3476
|
const fingerprint = useCallback5(() => {
|
|
3477
|
-
setRainbowKitVersion({ version: "2.4.
|
|
3477
|
+
setRainbowKitVersion({ version: "2.4.15" });
|
|
3478
3478
|
}, []);
|
|
3479
3479
|
useEffect14(() => {
|
|
3480
3480
|
fingerprint();
|
|
@@ -12419,7 +12419,7 @@ function getSolanaConfig(options = {}) {
|
|
|
12419
12419
|
network = "mainnet-beta",
|
|
12420
12420
|
wallets = ["phantom"],
|
|
12421
12421
|
rpcEndpoint,
|
|
12422
|
-
autoConnect =
|
|
12422
|
+
autoConnect = true
|
|
12423
12423
|
} = options;
|
|
12424
12424
|
return {
|
|
12425
12425
|
network,
|
|
@@ -12772,11 +12772,6 @@ function useSolanaWallet() {
|
|
|
12772
12772
|
[]
|
|
12773
12773
|
);
|
|
12774
12774
|
const externalWallet = useWallet5();
|
|
12775
|
-
const [windowSolanaState, setWindowSolanaState] = useState35({
|
|
12776
|
-
connected: false,
|
|
12777
|
-
publicKey: null,
|
|
12778
|
-
walletName: null
|
|
12779
|
-
});
|
|
12780
12775
|
const [abcWallet, setAbcWallet] = useState35({
|
|
12781
12776
|
address: null,
|
|
12782
12777
|
publicKey: null,
|
|
@@ -12856,58 +12851,6 @@ function useSolanaWallet() {
|
|
|
12856
12851
|
useEffect31(() => {
|
|
12857
12852
|
refreshAbcWallet();
|
|
12858
12853
|
}, [evmConnected, connector?.id]);
|
|
12859
|
-
useEffect31(() => {
|
|
12860
|
-
if (typeof window === "undefined")
|
|
12861
|
-
return;
|
|
12862
|
-
const checkWindowSolana = () => {
|
|
12863
|
-
const solana2 = window.solana;
|
|
12864
|
-
if (solana2) {
|
|
12865
|
-
const connected = solana2.isConnected === true;
|
|
12866
|
-
const publicKey = solana2.publicKey?.toString() || null;
|
|
12867
|
-
const walletName2 = solana2.isPhantom ? "Phantom" : solana2.isSolflare ? "Solflare" : solana2.isBackpack ? "Backpack" : "External Wallet";
|
|
12868
|
-
setWindowSolanaState((prev) => {
|
|
12869
|
-
if (prev.connected !== connected || prev.publicKey !== publicKey || prev.walletName !== walletName2) {
|
|
12870
|
-
if (connected && publicKey && !abcWallet.isConnected && externalWallet && !externalWallet.connected && externalWallet.publicKey?.toString() !== publicKey) {
|
|
12871
|
-
console.warn(
|
|
12872
|
-
"[TalkenKit] Detected external Solana wallet via window.solana but wallet-adapter context is not connected.",
|
|
12873
|
-
"This usually means you have duplicate WalletProvider wrappers.",
|
|
12874
|
-
"Remove manual ConnectionProvider/WalletProvider when using TalkenKitProvider with solanaConfig."
|
|
12875
|
-
);
|
|
12876
|
-
}
|
|
12877
|
-
return { connected, publicKey, walletName: walletName2 };
|
|
12878
|
-
}
|
|
12879
|
-
return prev;
|
|
12880
|
-
});
|
|
12881
|
-
} else {
|
|
12882
|
-
setWindowSolanaState({
|
|
12883
|
-
connected: false,
|
|
12884
|
-
publicKey: null,
|
|
12885
|
-
walletName: null
|
|
12886
|
-
});
|
|
12887
|
-
}
|
|
12888
|
-
};
|
|
12889
|
-
checkWindowSolana();
|
|
12890
|
-
const interval = setInterval(checkWindowSolana, 1e3);
|
|
12891
|
-
const solana = window.solana;
|
|
12892
|
-
if (solana) {
|
|
12893
|
-
solana.on?.("connect", checkWindowSolana);
|
|
12894
|
-
solana.on?.("disconnect", checkWindowSolana);
|
|
12895
|
-
solana.on?.("accountChanged", checkWindowSolana);
|
|
12896
|
-
}
|
|
12897
|
-
return () => {
|
|
12898
|
-
clearInterval(interval);
|
|
12899
|
-
const solana2 = window.solana;
|
|
12900
|
-
if (solana2) {
|
|
12901
|
-
solana2.off?.("connect", checkWindowSolana);
|
|
12902
|
-
solana2.off?.("disconnect", checkWindowSolana);
|
|
12903
|
-
solana2.off?.("accountChanged", checkWindowSolana);
|
|
12904
|
-
}
|
|
12905
|
-
};
|
|
12906
|
-
}, [
|
|
12907
|
-
externalWallet.connected,
|
|
12908
|
-
abcWallet.isConnected,
|
|
12909
|
-
externalWallet.publicKey
|
|
12910
|
-
]);
|
|
12911
12854
|
const activeWallet = abcWallet.isConnected ? {
|
|
12912
12855
|
...abcWallet,
|
|
12913
12856
|
type: "abc",
|
|
@@ -12920,15 +12863,6 @@ function useSolanaWallet() {
|
|
|
12920
12863
|
type: "external",
|
|
12921
12864
|
walletName: externalWallet.wallet?.adapter.name || "External Wallet",
|
|
12922
12865
|
provider: null
|
|
12923
|
-
} : windowSolanaState.connected ? {
|
|
12924
|
-
// Fallback to window.solana (for misconfigured providers)
|
|
12925
|
-
address: windowSolanaState.publicKey,
|
|
12926
|
-
publicKey: windowSolanaState.publicKey,
|
|
12927
|
-
network: process.env.NEXT_PUBLIC_ENVIRONMENT === "production" ? "solana" : "solana_devnet",
|
|
12928
|
-
isConnected: true,
|
|
12929
|
-
type: "external",
|
|
12930
|
-
walletName: windowSolanaState.walletName || "External Wallet",
|
|
12931
|
-
provider: null
|
|
12932
12866
|
} : {
|
|
12933
12867
|
address: null,
|
|
12934
12868
|
publicKey: null,
|
|
@@ -20,7 +20,7 @@ export interface SolanaWalletProviderProps {
|
|
|
20
20
|
/**
|
|
21
21
|
* Auto-connect to previously connected external wallet (Phantom, Solflare, etc.)
|
|
22
22
|
* Note: ABC Wallet always auto-connects when session exists
|
|
23
|
-
* @default
|
|
23
|
+
* @default true
|
|
24
24
|
*/
|
|
25
25
|
autoConnect?: boolean;
|
|
26
26
|
/**
|
package/dist/solana/config.d.ts
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
AbcWaasApiClient,
|
|
4
4
|
createAbcWaasApiClient
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import {
|
|
7
|
-
WalletApi
|
|
8
|
-
} from "../../chunk-V33I7JGZ.js";
|
|
5
|
+
} from "../../chunk-DNYWTUT5.js";
|
|
9
6
|
import {
|
|
10
7
|
TransactionApi
|
|
11
8
|
} from "../../chunk-DJKN2MCI.js";
|
|
9
|
+
import {
|
|
10
|
+
WalletApi
|
|
11
|
+
} from "../../chunk-V33I7JGZ.js";
|
|
12
12
|
import {
|
|
13
13
|
AuthApi
|
|
14
14
|
} from "../../chunk-ZNBWRE3K.js";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
AbcWaasApiClient,
|
|
4
4
|
createAbcWaasApiClient
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-V33I7JGZ.js";
|
|
5
|
+
} from "../chunk-DNYWTUT5.js";
|
|
7
6
|
import "../chunk-DJKN2MCI.js";
|
|
7
|
+
import "../chunk-V33I7JGZ.js";
|
|
8
8
|
import {
|
|
9
9
|
generateMpcWallets,
|
|
10
10
|
recoverMpcWallets,
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
TransactionApi
|
|
4
|
+
} from "./chunk-DJKN2MCI.js";
|
|
5
|
+
import {
|
|
6
|
+
WalletApi
|
|
7
|
+
} from "./chunk-V33I7JGZ.js";
|
|
8
|
+
import {
|
|
9
|
+
AuthApi
|
|
10
|
+
} from "./chunk-ZNBWRE3K.js";
|
|
11
|
+
import {
|
|
12
|
+
BitcoinApi
|
|
13
|
+
} from "./chunk-V4Q3GNBX.js";
|
|
14
|
+
import {
|
|
15
|
+
SigningApi
|
|
16
|
+
} from "./chunk-7VZDITAJ.js";
|
|
17
|
+
import {
|
|
18
|
+
SolanaApi
|
|
19
|
+
} from "./chunk-D3USECVX.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
|
+
};
|
|
@@ -12,14 +12,14 @@ import "./chunk-5RSS3SRV.js";
|
|
|
12
12
|
import "./chunk-RQIUWXDF.js";
|
|
13
13
|
import "./chunk-VETRBBA2.js";
|
|
14
14
|
import {
|
|
15
|
-
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
uniswapWallet
|
|
19
|
-
} from "./chunk-DLDZUVTB.js";
|
|
15
|
+
trustWallet
|
|
16
|
+
} from "./chunk-EM6BREIH.js";
|
|
20
17
|
import {
|
|
21
18
|
valoraWallet
|
|
22
19
|
} from "./chunk-CVUEWUDI.js";
|
|
20
|
+
import {
|
|
21
|
+
uniswapWallet
|
|
22
|
+
} from "./chunk-DLDZUVTB.js";
|
|
23
23
|
import {
|
|
24
24
|
walletConnectWallet
|
|
25
25
|
} from "./chunk-KU5R3WAJ.js";
|
|
@@ -41,15 +41,12 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
safepalWallet
|
|
43
43
|
} from "./chunk-LRYS2XBT.js";
|
|
44
|
-
import {
|
|
45
|
-
seifWallet
|
|
46
|
-
} from "./chunk-Y3E6EZ7J.js";
|
|
47
44
|
import {
|
|
48
45
|
subWallet
|
|
49
46
|
} from "./chunk-OWSLCYOF.js";
|
|
50
47
|
import {
|
|
51
|
-
|
|
52
|
-
} from "./chunk-
|
|
48
|
+
seifWallet
|
|
49
|
+
} from "./chunk-Y3E6EZ7J.js";
|
|
53
50
|
import {
|
|
54
51
|
tahoWallet
|
|
55
52
|
} from "./chunk-UXRQQZ2M.js";
|
|
@@ -57,47 +54,50 @@ import {
|
|
|
57
54
|
tokenPocketWallet
|
|
58
55
|
} from "./chunk-RCZCJUTR.js";
|
|
59
56
|
import {
|
|
60
|
-
|
|
61
|
-
} from "./chunk-
|
|
57
|
+
talismanWallet
|
|
58
|
+
} from "./chunk-B4IG5R5M.js";
|
|
59
|
+
import {
|
|
60
|
+
tokenaryWallet
|
|
61
|
+
} from "./chunk-U24COF36.js";
|
|
62
62
|
import {
|
|
63
63
|
oneKeyWallet
|
|
64
64
|
} from "./chunk-6UGYPEQE.js";
|
|
65
65
|
import {
|
|
66
66
|
paraSwapWallet
|
|
67
67
|
} from "./chunk-FF7ZXD5C.js";
|
|
68
|
-
import {
|
|
69
|
-
rabbyWallet
|
|
70
|
-
} from "./chunk-3RMYBZQG.js";
|
|
71
68
|
import {
|
|
72
69
|
phantomWallet
|
|
73
70
|
} from "./chunk-DMQ4RXIY.js";
|
|
74
71
|
import {
|
|
75
|
-
|
|
76
|
-
} from "./chunk-
|
|
72
|
+
rabbyWallet
|
|
73
|
+
} from "./chunk-3RMYBZQG.js";
|
|
77
74
|
import {
|
|
78
75
|
rainbowWallet
|
|
79
76
|
} from "./chunk-6C3GUS6I.js";
|
|
77
|
+
import {
|
|
78
|
+
ramperWallet
|
|
79
|
+
} from "./chunk-OX3PQBV2.js";
|
|
80
80
|
import {
|
|
81
81
|
roninWallet
|
|
82
82
|
} from "./chunk-DSTY7YNG.js";
|
|
83
83
|
import {
|
|
84
84
|
safeWallet
|
|
85
85
|
} from "./chunk-Z2QCE6O6.js";
|
|
86
|
-
import {
|
|
87
|
-
metaMaskWallet
|
|
88
|
-
} from "./chunk-VUMT22HL.js";
|
|
89
86
|
import {
|
|
90
87
|
magicEdenWallet
|
|
91
88
|
} from "./chunk-WB7EEKPS.js";
|
|
89
|
+
import {
|
|
90
|
+
metaMaskWallet
|
|
91
|
+
} from "./chunk-VUMT22HL.js";
|
|
92
92
|
import {
|
|
93
93
|
mewWallet
|
|
94
94
|
} from "./chunk-ZRY6ILYP.js";
|
|
95
|
-
import {
|
|
96
|
-
oktoWallet
|
|
97
|
-
} from "./chunk-7SSXG35M.js";
|
|
98
95
|
import {
|
|
99
96
|
nestWallet
|
|
100
97
|
} from "./chunk-NN4KGG3I.js";
|
|
98
|
+
import {
|
|
99
|
+
oktoWallet
|
|
100
|
+
} from "./chunk-7SSXG35M.js";
|
|
101
101
|
import {
|
|
102
102
|
okxWallet
|
|
103
103
|
} from "./chunk-GF7RKBNV.js";
|
|
@@ -107,27 +107,27 @@ import {
|
|
|
107
107
|
import {
|
|
108
108
|
oneInchWallet
|
|
109
109
|
} from "./chunk-OJT577AY.js";
|
|
110
|
-
import {
|
|
111
|
-
injectedWallet
|
|
112
|
-
} from "./chunk-GDGRUMZB.js";
|
|
113
110
|
import {
|
|
114
111
|
imTokenWallet
|
|
115
112
|
} from "./chunk-EHE2536P.js";
|
|
116
113
|
import {
|
|
117
|
-
|
|
118
|
-
} from "./chunk-
|
|
114
|
+
injectedWallet
|
|
115
|
+
} from "./chunk-GDGRUMZB.js";
|
|
119
116
|
import {
|
|
120
117
|
kaiaWallet
|
|
121
118
|
} from "./chunk-KE6RMEB7.js";
|
|
119
|
+
import {
|
|
120
|
+
iopayWallet
|
|
121
|
+
} from "./chunk-A2XAHJNR.js";
|
|
122
122
|
import {
|
|
123
123
|
kaikasWallet
|
|
124
124
|
} from "./chunk-MUJPEDFF.js";
|
|
125
|
-
import {
|
|
126
|
-
kresusWallet
|
|
127
|
-
} from "./chunk-CM3VR7OM.js";
|
|
128
125
|
import {
|
|
129
126
|
krakenWallet
|
|
130
127
|
} from "./chunk-CYOZFCR6.js";
|
|
128
|
+
import {
|
|
129
|
+
kresusWallet
|
|
130
|
+
} from "./chunk-CM3VR7OM.js";
|
|
131
131
|
import {
|
|
132
132
|
ledgerWallet
|
|
133
133
|
} from "./chunk-BF3VSNPL.js";
|
|
@@ -137,30 +137,30 @@ import {
|
|
|
137
137
|
import {
|
|
138
138
|
dawnWallet
|
|
139
139
|
} from "./chunk-YMP3W2MO.js";
|
|
140
|
-
import {
|
|
141
|
-
enkryptWallet
|
|
142
|
-
} from "./chunk-5QHPQU7J.js";
|
|
143
140
|
import {
|
|
144
141
|
desigWallet
|
|
145
142
|
} from "./chunk-DVXPOWEC.js";
|
|
146
143
|
import {
|
|
147
|
-
|
|
148
|
-
} from "./chunk-
|
|
144
|
+
enkryptWallet
|
|
145
|
+
} from "./chunk-5QHPQU7J.js";
|
|
149
146
|
import {
|
|
150
147
|
foxWallet
|
|
151
148
|
} from "./chunk-E4UMOJTY.js";
|
|
149
|
+
import {
|
|
150
|
+
frameWallet
|
|
151
|
+
} from "./chunk-CP45RGL4.js";
|
|
152
152
|
import {
|
|
153
153
|
frontierWallet
|
|
154
154
|
} from "./chunk-NHZMJSPE.js";
|
|
155
155
|
import {
|
|
156
156
|
gateWallet
|
|
157
157
|
} from "./chunk-PKSDTWUF.js";
|
|
158
|
-
import {
|
|
159
|
-
bitverseWallet
|
|
160
|
-
} from "./chunk-6HCSSBZY.js";
|
|
161
158
|
import {
|
|
162
159
|
bloomWallet
|
|
163
160
|
} from "./chunk-3KPCADAF.js";
|
|
161
|
+
import {
|
|
162
|
+
bitverseWallet
|
|
163
|
+
} from "./chunk-6HCSSBZY.js";
|
|
164
164
|
import {
|
|
165
165
|
braveWallet
|
|
166
166
|
} from "./chunk-EYN3CVFM.js";
|
|
@@ -173,35 +173,35 @@ import {
|
|
|
173
173
|
import {
|
|
174
174
|
coin98Wallet
|
|
175
175
|
} from "./chunk-ZFVYS64S.js";
|
|
176
|
-
import {
|
|
177
|
-
coinbaseWallet
|
|
178
|
-
} from "./chunk-PNEDRY6O.js";
|
|
179
176
|
import {
|
|
180
177
|
compassWallet
|
|
181
178
|
} from "./chunk-3OO564GS.js";
|
|
182
179
|
import {
|
|
183
|
-
|
|
184
|
-
} from "./chunk-
|
|
185
|
-
import {
|
|
186
|
-
berasigWallet
|
|
187
|
-
} from "./chunk-UZWMFUJU.js";
|
|
180
|
+
coinbaseWallet
|
|
181
|
+
} from "./chunk-PNEDRY6O.js";
|
|
188
182
|
import {
|
|
189
183
|
argentWallet
|
|
190
184
|
} from "./chunk-XT2WYPN5.js";
|
|
191
185
|
import {
|
|
192
|
-
|
|
193
|
-
} from "./chunk-
|
|
186
|
+
berasigWallet
|
|
187
|
+
} from "./chunk-UZWMFUJU.js";
|
|
194
188
|
import {
|
|
195
|
-
|
|
196
|
-
} from "./chunk-
|
|
189
|
+
bestWallet
|
|
190
|
+
} from "./chunk-OPAPBEA5.js";
|
|
191
|
+
import {
|
|
192
|
+
bifrostWallet
|
|
193
|
+
} from "./chunk-WXXI4WBF.js";
|
|
197
194
|
import {
|
|
198
195
|
bitgetWallet
|
|
199
196
|
} from "./chunk-ITLTDJ3D.js";
|
|
200
197
|
import {
|
|
201
|
-
|
|
202
|
-
} from "./chunk-
|
|
198
|
+
binanceWallet
|
|
199
|
+
} from "./chunk-TUDZHFVC.js";
|
|
203
200
|
import "./chunk-RETKWSKD.js";
|
|
204
201
|
import "./chunk-PODFK4OS.js";
|
|
202
|
+
import {
|
|
203
|
+
bitskiWallet
|
|
204
|
+
} from "./chunk-DZB25PZ7.js";
|
|
205
205
|
import "./chunk-MBBGZGXF.js";
|
|
206
206
|
export {
|
|
207
207
|
abcWallet,
|