@talken/talkenkit 2.8.1 → 2.8.2
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/{abcWallet-TMP56C3B.js → abcWallet-7ZZXHG7O.js} +1 -1
- package/dist/{chunk-WEQ3DKBC.js → chunk-HX6JUKSS.js} +0 -6
- package/dist/gasless/types.d.ts +33 -2
- package/dist/gasless/utils/fiatFormatter.d.ts +32 -0
- package/dist/index.js +158 -8
- package/dist/wallets/walletConnectors/abcWallet/AbstractChainProvider.js +2 -2
- 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 +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcSolanaProvider.js +6 -6
- package/dist/wallets/walletConnectors/abcWallet/abcTronProvider.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +8 -8
- package/dist/wallets/walletConnectors/abcWallet/abcXrplProvider.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/api/TalkenApiClient.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/api/index.js +3 -3
- package/dist/wallets/walletConnectors/abcWallet/index.js +12 -12
- package/dist/wallets/walletConnectors/chunk-3LAMBKQL.js +345 -0
- package/dist/wallets/walletConnectors/chunk-55MPPI65.js +492 -0
- package/dist/wallets/walletConnectors/{chunk-24AEUYOZ.js → chunk-63H3LXPW.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-I7QLXYSA.js → chunk-6BDKSA22.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-73ENA2TK.js → chunk-7DLZKN46.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-EQ4EX5IN.js +340 -0
- package/dist/wallets/walletConnectors/chunk-EULIVR7N.js +370 -0
- package/dist/wallets/walletConnectors/{chunk-DKWXI7IR.js → chunk-HM73RD2O.js} +0 -6
- package/dist/wallets/walletConnectors/{chunk-2DROHKQL.js → chunk-KCB4MMIZ.js} +2 -2
- package/dist/wallets/walletConnectors/chunk-LIN3ZO63.js +378 -0
- package/dist/wallets/walletConnectors/{chunk-L7ZETI2T.js → chunk-M4YGDOD5.js} +1 -1
- package/dist/wallets/walletConnectors/chunk-OUVRAKVV.js +3050 -0
- package/dist/wallets/walletConnectors/chunk-SKVKZ5FY.js +132 -0
- package/dist/wallets/walletConnectors/{chunk-R3SLVZUQ.js → chunk-VEJS7JOC.js} +2 -2
- package/dist/wallets/walletConnectors/index.js +52 -52
- package/package.json +1 -1
- package/dist/wallets/walletConnectors/{chunk-PYIAXFRD.js → chunk-BF4HTXWH.js} +5 -5
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getTalkenApiClient
|
|
4
|
+
} from "./chunk-R6ZE7JAZ.js";
|
|
5
|
+
import {
|
|
6
|
+
ProviderError,
|
|
7
|
+
ProviderErrorCode
|
|
8
|
+
} from "./chunk-YXWHHI4S.js";
|
|
9
|
+
import {
|
|
10
|
+
EventEmitter
|
|
11
|
+
} from "./chunk-CBKU2ERC.js";
|
|
12
|
+
|
|
13
|
+
// src/wallets/walletConnectors/abcWallet/AbstractChainProvider.ts
|
|
14
|
+
import {
|
|
15
|
+
getShowPendingTransaction,
|
|
16
|
+
getUpdateTransactionResult
|
|
17
|
+
} from "@talken/talkenkit";
|
|
18
|
+
var AbstractChainProvider = class extends EventEmitter {
|
|
19
|
+
constructor(talkenApi) {
|
|
20
|
+
super();
|
|
21
|
+
this.wallet = null;
|
|
22
|
+
this.connected = false;
|
|
23
|
+
this.talkenApi = talkenApi;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Set wallet and emit connection events.
|
|
27
|
+
* Subclasses can override to emit chain-specific events (e.g., chainChanged for EVM).
|
|
28
|
+
*/
|
|
29
|
+
setWallet(wallet) {
|
|
30
|
+
const previousAddress = this.wallet?.address;
|
|
31
|
+
this.wallet = wallet;
|
|
32
|
+
this.connected = true;
|
|
33
|
+
if (previousAddress !== wallet.address) {
|
|
34
|
+
this.emit("accountsChanged", [wallet.address]);
|
|
35
|
+
}
|
|
36
|
+
this.onWalletSet(wallet);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Hook for subclasses to emit chain-specific events on wallet set.
|
|
40
|
+
* Called after wallet is assigned and accountsChanged is emitted.
|
|
41
|
+
*/
|
|
42
|
+
onWalletSet(_wallet) {
|
|
43
|
+
}
|
|
44
|
+
/** Clear wallet and emit disconnect events. */
|
|
45
|
+
clearWallet() {
|
|
46
|
+
this.wallet = null;
|
|
47
|
+
this.connected = false;
|
|
48
|
+
this.emit("disconnect", {
|
|
49
|
+
code: ProviderErrorCode.DISCONNECTED,
|
|
50
|
+
message: "User disconnected"
|
|
51
|
+
});
|
|
52
|
+
this.emit("accountsChanged", []);
|
|
53
|
+
}
|
|
54
|
+
/** Whether a wallet is connected. */
|
|
55
|
+
isConnected() {
|
|
56
|
+
return this.connected && this.wallet !== null;
|
|
57
|
+
}
|
|
58
|
+
/** Set request interceptor for sign confirmation UI. */
|
|
59
|
+
setRequestInterceptor(interceptor) {
|
|
60
|
+
this.requestInterceptor = interceptor;
|
|
61
|
+
}
|
|
62
|
+
/** Set TalkenApiClient instance. */
|
|
63
|
+
setTalkenApi(talkenApi) {
|
|
64
|
+
this.talkenApi = talkenApi;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get TalkenApiClient or throw if not initialized.
|
|
68
|
+
* Falls back to the global singleton.
|
|
69
|
+
*/
|
|
70
|
+
getTalkenApiClientOrThrow() {
|
|
71
|
+
const api = this.talkenApi || getTalkenApiClient();
|
|
72
|
+
if (!api) {
|
|
73
|
+
throw new ProviderError(
|
|
74
|
+
ProviderErrorCode.INTERNAL_ERROR,
|
|
75
|
+
"TalkenApiClient not initialized"
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
return api;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Show pending transaction UI via singleton callback.
|
|
82
|
+
* Subclasses call this before sending a transaction.
|
|
83
|
+
*/
|
|
84
|
+
showPendingTx(params) {
|
|
85
|
+
const showPending = getShowPendingTransaction();
|
|
86
|
+
if (showPending) {
|
|
87
|
+
showPending({
|
|
88
|
+
txHash: "",
|
|
89
|
+
network: params.network,
|
|
90
|
+
chain: params.chain,
|
|
91
|
+
explorerUrl: void 0
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Update transaction result UI via singleton callback.
|
|
97
|
+
* Subclasses call this after a transaction is confirmed.
|
|
98
|
+
*/
|
|
99
|
+
updateTxResult(params) {
|
|
100
|
+
const updateResult = getUpdateTransactionResult();
|
|
101
|
+
if (updateResult) {
|
|
102
|
+
updateResult({
|
|
103
|
+
txHash: params.txHash,
|
|
104
|
+
network: params.network,
|
|
105
|
+
chain: params.chain,
|
|
106
|
+
receipt: params.receipt ?? null,
|
|
107
|
+
explorerUrl: params.explorerUrl,
|
|
108
|
+
...params.gasless && { gasless: params.gasless }
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Update transaction result UI with failure state.
|
|
114
|
+
* Subclasses call this in catch blocks to close the pending modal.
|
|
115
|
+
*/
|
|
116
|
+
failTxResult(params) {
|
|
117
|
+
const updateResult = getUpdateTransactionResult();
|
|
118
|
+
if (updateResult) {
|
|
119
|
+
updateResult({
|
|
120
|
+
txHash: "",
|
|
121
|
+
network: params.network,
|
|
122
|
+
chain: params.chain,
|
|
123
|
+
receipt: { status: 0, blockNumber: null, gasUsed: null },
|
|
124
|
+
errorMessage: params.errorMessage
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export {
|
|
131
|
+
AbstractChainProvider
|
|
132
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
abcConnector
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6BDKSA22.js";
|
|
5
5
|
import {
|
|
6
6
|
createTalkenApiClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EULIVR7N.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveTalkenApiUrl
|
|
10
10
|
} from "./chunk-GFWUFYT2.js";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
abcWallet
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-63H3LXPW.js";
|
|
5
|
+
import "./chunk-KCB4MMIZ.js";
|
|
6
|
+
import "./chunk-OUVRAKVV.js";
|
|
7
|
+
import "./chunk-BF4HTXWH.js";
|
|
8
8
|
import "./chunk-XDNFWX2X.js";
|
|
9
9
|
import "./chunk-4Y7YP4IR.js";
|
|
10
10
|
import "./chunk-ICGK5DGY.js";
|
|
11
|
-
import "./chunk-TYJR3KGY.js";
|
|
12
11
|
import "./chunk-3NWM24MH.js";
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-TYJR3KGY.js";
|
|
14
13
|
import "./chunk-2LH53QET.js";
|
|
14
|
+
import "./chunk-2LOET2LX.js";
|
|
15
15
|
import "./chunk-ZOBSRU6L.js";
|
|
16
16
|
import "./chunk-GFWUFYT2.js";
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./chunk-
|
|
18
|
+
paraSwapWallet
|
|
19
|
+
} from "./chunk-FF7ZXD5C.js";
|
|
20
20
|
import "./chunk-YNE2UX2Z.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-SKVKZ5FY.js";
|
|
22
22
|
import "./chunk-R6ZE7JAZ.js";
|
|
23
|
-
import "./chunk-CBKU2ERC.js";
|
|
24
23
|
import "./chunk-YXWHHI4S.js";
|
|
24
|
+
import "./chunk-CBKU2ERC.js";
|
|
25
25
|
import "./chunk-KXPCOVNY.js";
|
|
26
26
|
import "./chunk-2DFJ6LEN.js";
|
|
27
27
|
import "./chunk-VVXSRRXI.js";
|
|
@@ -33,6 +33,9 @@ import "./chunk-BUAWEYGV.js";
|
|
|
33
33
|
import "./chunk-RKQS3OQG.js";
|
|
34
34
|
import "./chunk-NEMEHJ72.js";
|
|
35
35
|
import "./chunk-3Z5DO42M.js";
|
|
36
|
+
import {
|
|
37
|
+
trustWallet
|
|
38
|
+
} from "./chunk-PK5F7QCO.js";
|
|
36
39
|
import {
|
|
37
40
|
uniswapWallet
|
|
38
41
|
} from "./chunk-DLDZUVTB.js";
|
|
@@ -55,8 +58,8 @@ import {
|
|
|
55
58
|
zerionWallet
|
|
56
59
|
} from "./chunk-55PYSSYF.js";
|
|
57
60
|
import {
|
|
58
|
-
|
|
59
|
-
} from "./chunk-
|
|
61
|
+
safeWallet
|
|
62
|
+
} from "./chunk-Z2QCE6O6.js";
|
|
60
63
|
import {
|
|
61
64
|
safepalWallet
|
|
62
65
|
} from "./chunk-6UT4SIPZ.js";
|
|
@@ -79,11 +82,11 @@ import {
|
|
|
79
82
|
tokenaryWallet
|
|
80
83
|
} from "./chunk-AGYNSAGV.js";
|
|
81
84
|
import {
|
|
82
|
-
|
|
83
|
-
} from "./chunk-
|
|
85
|
+
omniWallet
|
|
86
|
+
} from "./chunk-RGPO7AY3.js";
|
|
84
87
|
import {
|
|
85
|
-
|
|
86
|
-
} from "./chunk-
|
|
88
|
+
oneKeyWallet
|
|
89
|
+
} from "./chunk-WQX4JNSR.js";
|
|
87
90
|
import {
|
|
88
91
|
phantomWallet
|
|
89
92
|
} from "./chunk-M3L6IDTW.js";
|
|
@@ -99,15 +102,18 @@ import {
|
|
|
99
102
|
import {
|
|
100
103
|
roninWallet
|
|
101
104
|
} from "./chunk-TP7VE6CR.js";
|
|
102
|
-
import {
|
|
103
|
-
safeWallet
|
|
104
|
-
} from "./chunk-Z2QCE6O6.js";
|
|
105
105
|
import {
|
|
106
106
|
safeheronWallet
|
|
107
107
|
} from "./chunk-GFZKT4IO.js";
|
|
108
108
|
import {
|
|
109
|
-
|
|
110
|
-
} from "./chunk-
|
|
109
|
+
ledgerWallet
|
|
110
|
+
} from "./chunk-BF3VSNPL.js";
|
|
111
|
+
import {
|
|
112
|
+
magicEdenWallet
|
|
113
|
+
} from "./chunk-6MKGDGZC.js";
|
|
114
|
+
import {
|
|
115
|
+
metaMaskWallet
|
|
116
|
+
} from "./chunk-YYWOGELV.js";
|
|
111
117
|
import {
|
|
112
118
|
mewWallet
|
|
113
119
|
} from "./chunk-T4UIU4M2.js";
|
|
@@ -120,18 +126,18 @@ import {
|
|
|
120
126
|
import {
|
|
121
127
|
okxWallet
|
|
122
128
|
} from "./chunk-N4US77B2.js";
|
|
123
|
-
import {
|
|
124
|
-
omniWallet
|
|
125
|
-
} from "./chunk-RGPO7AY3.js";
|
|
126
129
|
import {
|
|
127
130
|
oneInchWallet
|
|
128
131
|
} from "./chunk-OJT577AY.js";
|
|
129
132
|
import {
|
|
130
|
-
|
|
131
|
-
} from "./chunk-
|
|
133
|
+
coin98Wallet
|
|
134
|
+
} from "./chunk-RN23EOYO.js";
|
|
132
135
|
import {
|
|
133
|
-
|
|
134
|
-
} from "./chunk-
|
|
136
|
+
injectedWallet
|
|
137
|
+
} from "./chunk-DWN4FQRW.js";
|
|
138
|
+
import {
|
|
139
|
+
iopayWallet
|
|
140
|
+
} from "./chunk-4KTCNBEZ.js";
|
|
135
141
|
import {
|
|
136
142
|
kaiaWallet
|
|
137
143
|
} from "./chunk-X3BXCZPF.js";
|
|
@@ -141,18 +147,12 @@ import {
|
|
|
141
147
|
import {
|
|
142
148
|
klipWallet
|
|
143
149
|
} from "./chunk-WDL3NM5W.js";
|
|
150
|
+
import {
|
|
151
|
+
krakenWallet
|
|
152
|
+
} from "./chunk-CYOZFCR6.js";
|
|
144
153
|
import {
|
|
145
154
|
kresusWallet
|
|
146
155
|
} from "./chunk-CM3VR7OM.js";
|
|
147
|
-
import {
|
|
148
|
-
ledgerWallet
|
|
149
|
-
} from "./chunk-BF3VSNPL.js";
|
|
150
|
-
import {
|
|
151
|
-
magicEdenWallet
|
|
152
|
-
} from "./chunk-6MKGDGZC.js";
|
|
153
|
-
import {
|
|
154
|
-
metaMaskWallet
|
|
155
|
-
} from "./chunk-YYWOGELV.js";
|
|
156
156
|
import {
|
|
157
157
|
dawnWallet
|
|
158
158
|
} from "./chunk-GYKXFIR2.js";
|
|
@@ -180,21 +180,21 @@ import {
|
|
|
180
180
|
import {
|
|
181
181
|
bitverseWallet
|
|
182
182
|
} from "./chunk-6HCSSBZY.js";
|
|
183
|
-
import {
|
|
184
|
-
bloomWallet
|
|
185
|
-
} from "./chunk-3KPCADAF.js";
|
|
186
|
-
import {
|
|
187
|
-
bybitWallet
|
|
188
|
-
} from "./chunk-2AJYFWBT.js";
|
|
189
183
|
import {
|
|
190
184
|
braveWallet
|
|
191
185
|
} from "./chunk-7AOQK5GH.js";
|
|
186
|
+
import {
|
|
187
|
+
bloomWallet
|
|
188
|
+
} from "./chunk-3KPCADAF.js";
|
|
192
189
|
import {
|
|
193
190
|
clvWallet
|
|
194
191
|
} from "./chunk-QHXBBEB2.js";
|
|
195
192
|
import {
|
|
196
|
-
|
|
197
|
-
} from "./chunk-
|
|
193
|
+
bybitWallet
|
|
194
|
+
} from "./chunk-2AJYFWBT.js";
|
|
195
|
+
import {
|
|
196
|
+
coinbaseWallet
|
|
197
|
+
} from "./chunk-PNEDRY6O.js";
|
|
198
198
|
import {
|
|
199
199
|
compassWallet
|
|
200
200
|
} from "./chunk-DK4AJRIP.js";
|
|
@@ -207,23 +207,23 @@ import {
|
|
|
207
207
|
import {
|
|
208
208
|
berasigWallet
|
|
209
209
|
} from "./chunk-6WB5NVHI.js";
|
|
210
|
+
import {
|
|
211
|
+
bestWallet
|
|
212
|
+
} from "./chunk-OPAPBEA5.js";
|
|
210
213
|
import {
|
|
211
214
|
bifrostWallet
|
|
212
215
|
} from "./chunk-KOZORVBW.js";
|
|
213
216
|
import {
|
|
214
|
-
|
|
215
|
-
} from "./chunk-
|
|
217
|
+
binanceWallet
|
|
218
|
+
} from "./chunk-LGGIEH7O.js";
|
|
216
219
|
import {
|
|
217
220
|
bitgetWallet
|
|
218
221
|
} from "./chunk-DKEP5NZT.js";
|
|
222
|
+
import "./chunk-RETKWSKD.js";
|
|
223
|
+
import "./chunk-PODFK4OS.js";
|
|
219
224
|
import {
|
|
220
225
|
bitskiWallet
|
|
221
226
|
} from "./chunk-QIR4GIBB.js";
|
|
222
|
-
import {
|
|
223
|
-
binanceWallet
|
|
224
|
-
} from "./chunk-LGGIEH7O.js";
|
|
225
|
-
import "./chunk-RETKWSKD.js";
|
|
226
|
-
import "./chunk-PODFK4OS.js";
|
|
227
227
|
import "./chunk-PONHGUSY.js";
|
|
228
228
|
export {
|
|
229
229
|
abcWallet,
|
package/package.json
CHANGED
|
@@ -8,18 +8,18 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
TalkenEvmModule
|
|
10
10
|
} from "./chunk-ICGK5DGY.js";
|
|
11
|
-
import {
|
|
12
|
-
TalkenTronModule
|
|
13
|
-
} from "./chunk-TYJR3KGY.js";
|
|
14
11
|
import {
|
|
15
12
|
TalkenSolanaModule
|
|
16
13
|
} from "./chunk-3NWM24MH.js";
|
|
17
14
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./chunk-
|
|
15
|
+
TalkenTronModule
|
|
16
|
+
} from "./chunk-TYJR3KGY.js";
|
|
20
17
|
import {
|
|
21
18
|
TalkenWalletscanModule
|
|
22
19
|
} from "./chunk-2LH53QET.js";
|
|
20
|
+
import {
|
|
21
|
+
TalkenWalletModule
|
|
22
|
+
} from "./chunk-2LOET2LX.js";
|
|
23
23
|
import {
|
|
24
24
|
TalkenXrpModule
|
|
25
25
|
} from "./chunk-ZOBSRU6L.js";
|