@ecency/wallets 1.3.1 → 1.3.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/ecency-sdk.es.js +490 -464
- package/dist/modules/assets/points/queries/get-points-asset-transactions-query-options.d.ts +3 -3
- package/dist/modules/wallets/mutations/index.d.ts +0 -1
- package/dist/modules/wallets/mutations/private-api/create-account-with-wallets.d.ts +1 -2
- package/dist/modules/wallets/mutations/save-wallet-information-to-metadata.d.ts +8 -5
- package/dist/modules/wallets/mutations/use-import-wallet.d.ts +5 -0
- package/dist/modules/wallets/mutations/use-wallet-create.d.ts +7 -2
- package/dist/modules/wallets/queries/get-all-tokens-list-query-options.d.ts +9 -5
- package/dist/modules/wallets/queries/use-get-account-wallet-list-query.d.ts +3 -3
- package/dist/modules/wallets/types/ecency-create-wallet-information.d.ts +11 -7
- package/package.json +5 -4
- package/dist/modules/wallets/mutations/change-assets-list.d.ts +0 -1
package/dist/ecency-sdk.es.js
CHANGED
|
@@ -1,59 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useQuery as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { SolWallet as ue } from "@okxweb3/coin-solana";
|
|
8
|
-
import { AtomWallet as le } from "@okxweb3/coin-cosmos";
|
|
9
|
-
import { AptosWallet as fe } from "@okxweb3/coin-aptos";
|
|
10
|
-
import me from "bip39";
|
|
11
|
-
import { CONFIG as l, getQueryClient as i, getDynamicPropsQueryOptions as N, getAccountFullQueryOptions as T, Keychain as b, EcencyAnalytics as W, getAccessToken as ye, useAccountUpdate as pe } from "@ecency/sdk";
|
|
12
|
-
import { LRUCache as he } from "lru-cache";
|
|
13
|
-
import { PrivateKey as C, utils as A } from "@hiveio/dhive";
|
|
14
|
-
import Q from "dayjs";
|
|
1
|
+
import { CONFIG as y, getQueryClient as i, getDynamicPropsQueryOptions as H, getAccountFullQueryOptions as S, Keychain as P, EcencyAnalytics as X, getAccessToken as oe, useAccountUpdate as ie } from "@ecency/sdk";
|
|
2
|
+
import { useQuery as D, queryOptions as h, infiniteQueryOptions as R, useMutation as N, useQueryClient as $ } from "@tanstack/react-query";
|
|
3
|
+
import ce from "bip39";
|
|
4
|
+
import { LRUCache as ue } from "lru-cache";
|
|
5
|
+
import { PrivateKey as I, utils as T } from "@hiveio/dhive";
|
|
6
|
+
import C from "dayjs";
|
|
15
7
|
import d from "hivesigner";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
case m.TON:
|
|
29
|
-
return new ce();
|
|
30
|
-
case m.SOL:
|
|
31
|
-
return new ue();
|
|
32
|
-
case m.ATOM:
|
|
33
|
-
return new le();
|
|
34
|
-
case m.APT:
|
|
35
|
-
return new fe();
|
|
36
|
-
default:
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function gt(e, t) {
|
|
41
|
-
return E({
|
|
8
|
+
import { BtcWallet as le } from "@okxweb3/coin-bitcoin";
|
|
9
|
+
import { EthWallet as fe } from "@okxweb3/coin-ethereum";
|
|
10
|
+
import { TrxWallet as ye } from "@okxweb3/coin-tron";
|
|
11
|
+
import { TonWallet as me } from "@okxweb3/coin-ton";
|
|
12
|
+
import { SolWallet as pe } from "@okxweb3/coin-solana";
|
|
13
|
+
import { AtomWallet as he } from "@okxweb3/coin-cosmos";
|
|
14
|
+
import { AptosWallet as ge } from "@okxweb3/coin-aptos";
|
|
15
|
+
import { useCallback as we } from "react";
|
|
16
|
+
import * as A from "remeda";
|
|
17
|
+
var f = /* @__PURE__ */ ((e) => (e.BTC = "BTC", e.ETH = "ETH", e.APT = "APT", e.ATOM = "ATOM", e.TON = "TON", e.TRON = "TRX", e.SOL = "SOL", e))(f || {}), g = /* @__PURE__ */ ((e) => (e.Points = "POINTS", e.HivePower = "HP", e.Hive = "HIVE", e.HiveDollar = "HBD", e.Spk = "SPK", e))(g || {});
|
|
18
|
+
function dt(e, t) {
|
|
19
|
+
return D({
|
|
42
20
|
queryKey: ["ecency-wallets", "external-wallet-balance", e, t],
|
|
43
21
|
queryFn: async () => {
|
|
44
22
|
switch (e) {
|
|
45
|
-
case
|
|
23
|
+
case f.BTC:
|
|
46
24
|
const r = await (await fetch(
|
|
47
25
|
`https://mempool.space/api/address/${t}`
|
|
48
26
|
)).json();
|
|
49
27
|
return (r.chain_stats.funded_txo_sum - r.chain_stats.spent_txo_sum) / 1e8;
|
|
50
|
-
case
|
|
28
|
+
case f.ETH:
|
|
51
29
|
return +(await (await fetch(
|
|
52
30
|
`https://api.ethplorer.io/getAddressInfo/${t}?apiKey=freekey`
|
|
53
31
|
)).json()).ETH.balance;
|
|
54
|
-
case
|
|
32
|
+
case f.SOL:
|
|
55
33
|
return (await (await fetch(
|
|
56
|
-
`https://rpc.helius.xyz/?api-key=${
|
|
34
|
+
`https://rpc.helius.xyz/?api-key=${y.heliusApiKey}`,
|
|
57
35
|
{
|
|
58
36
|
method: "POST",
|
|
59
37
|
body: JSON.stringify({
|
|
@@ -67,22 +45,22 @@ function gt(e, t) {
|
|
|
67
45
|
}
|
|
68
46
|
}
|
|
69
47
|
)).json()).result.value / 1e9;
|
|
70
|
-
case
|
|
48
|
+
case f.TRON:
|
|
71
49
|
return (await (await fetch(
|
|
72
50
|
`https://api.trongrid.io/v1/accounts/${t}`
|
|
73
51
|
)).json()).data[0].balance / 1e6;
|
|
74
|
-
case
|
|
52
|
+
case f.TON:
|
|
75
53
|
return (await (await fetch(
|
|
76
54
|
`https://tonapi.io/v1/blockchain/getAccount?account=${t}`
|
|
77
55
|
)).json()).balance / 1e9;
|
|
78
|
-
case
|
|
79
|
-
const
|
|
56
|
+
case f.APT:
|
|
57
|
+
const q = (await (await fetch(
|
|
80
58
|
`https://fullnode.mainnet.aptoslabs.com/v1/accounts/${t}/resources`
|
|
81
59
|
)).json()).find(
|
|
82
|
-
(
|
|
60
|
+
(ae) => ae.type.includes("coin::CoinStore")
|
|
83
61
|
);
|
|
84
|
-
return
|
|
85
|
-
case
|
|
62
|
+
return q ? parseInt(q.data.coin.value) / 1e8 : 0;
|
|
63
|
+
case f.ATOM:
|
|
86
64
|
return +(await (await fetch(
|
|
87
65
|
`https://rest.cosmos.directory/cosmoshub/auth/accounts/${t}`
|
|
88
66
|
)).json()).result.value.coins[0].amount / 1e6;
|
|
@@ -90,13 +68,13 @@ function gt(e, t) {
|
|
|
90
68
|
}
|
|
91
69
|
});
|
|
92
70
|
}
|
|
93
|
-
function
|
|
94
|
-
return
|
|
71
|
+
function z(e) {
|
|
72
|
+
return D({
|
|
95
73
|
queryKey: ["ecency-wallets", "seed", e],
|
|
96
|
-
queryFn: async () =>
|
|
74
|
+
queryFn: async () => ce.generateMnemonic(128)
|
|
97
75
|
});
|
|
98
76
|
}
|
|
99
|
-
const
|
|
77
|
+
const de = {
|
|
100
78
|
max: 500,
|
|
101
79
|
// how long to live in ms
|
|
102
80
|
ttl: 1e3 * 60 * 5,
|
|
@@ -104,32 +82,32 @@ const we = {
|
|
|
104
82
|
allowStale: !1,
|
|
105
83
|
updateAgeOnGet: !1,
|
|
106
84
|
updateAgeOnHas: !1
|
|
107
|
-
},
|
|
108
|
-
const t =
|
|
109
|
-
return t ===
|
|
85
|
+
}, Z = new ue(de), x = Symbol("undefined"), _e = (e, t) => Z.set(e, t === void 0 ? x : t), ve = (e) => {
|
|
86
|
+
const t = Z.get(e);
|
|
87
|
+
return t === x ? void 0 : t;
|
|
110
88
|
};
|
|
111
|
-
function
|
|
112
|
-
return
|
|
89
|
+
function _t(e) {
|
|
90
|
+
return D({
|
|
113
91
|
queryKey: ["ecency-wallets", "coingecko-price", e],
|
|
114
92
|
queryFn: async () => {
|
|
115
93
|
let t = e;
|
|
116
94
|
switch (e) {
|
|
117
|
-
case
|
|
95
|
+
case f.BTC:
|
|
118
96
|
t = "binance-wrapped-btc";
|
|
119
97
|
break;
|
|
120
|
-
case
|
|
98
|
+
case f.ETH:
|
|
121
99
|
t = "ethereum";
|
|
122
100
|
break;
|
|
123
|
-
case
|
|
101
|
+
case f.SOL:
|
|
124
102
|
t = "solana";
|
|
125
103
|
break;
|
|
126
|
-
case
|
|
104
|
+
case f.TON:
|
|
127
105
|
t = "trx";
|
|
128
106
|
break;
|
|
129
107
|
default:
|
|
130
108
|
t = e;
|
|
131
109
|
}
|
|
132
|
-
let n =
|
|
110
|
+
let n = ve("gecko"), r;
|
|
133
111
|
if (n)
|
|
134
112
|
r = n;
|
|
135
113
|
else {
|
|
@@ -145,22 +123,22 @@ function wt(e) {
|
|
|
145
123
|
})
|
|
146
124
|
}
|
|
147
125
|
)).json();
|
|
148
|
-
|
|
126
|
+
_e("gecko", o === void 0 ? x : o), r = o;
|
|
149
127
|
}
|
|
150
128
|
return 1 / +r[Object.keys(r)[0]].usd;
|
|
151
129
|
},
|
|
152
130
|
enabled: !!e
|
|
153
131
|
});
|
|
154
132
|
}
|
|
155
|
-
function
|
|
156
|
-
const { data: t } =
|
|
157
|
-
return
|
|
133
|
+
function ke(e) {
|
|
134
|
+
const { data: t } = z(e);
|
|
135
|
+
return D({
|
|
158
136
|
queryKey: ["ecencу-wallets", "hive-keys", e, t],
|
|
159
137
|
staleTime: 1 / 0,
|
|
160
138
|
queryFn: async () => {
|
|
161
139
|
if (!t)
|
|
162
140
|
throw new Error("[Ecency][Wallets] - no seed to create Hive account");
|
|
163
|
-
const n =
|
|
141
|
+
const n = I.fromLogin(e, t, "owner"), r = I.fromLogin(e, t, "active"), s = I.fromLogin(e, t, "posting"), a = I.fromLogin(e, t, "memo");
|
|
164
142
|
return {
|
|
165
143
|
username: e,
|
|
166
144
|
owner: n.toString(),
|
|
@@ -175,29 +153,29 @@ function ve(e) {
|
|
|
175
153
|
}
|
|
176
154
|
});
|
|
177
155
|
}
|
|
178
|
-
var
|
|
156
|
+
var ee = /* @__PURE__ */ ((e) => (e.HIVE = "HIVE", e.HBD = "HBD", e.VESTS = "VESTS", e.SPK = "SPK", e))(ee || {}), te = /* @__PURE__ */ ((e) => (e["@@000000021"] = "HIVE", e["@@000000013"] = "HBD", e["@@000000037"] = "VESTS", e))(te || {});
|
|
179
157
|
function p(e) {
|
|
180
158
|
if (typeof e == "string") {
|
|
181
159
|
const t = e.split(" ");
|
|
182
160
|
return {
|
|
183
161
|
amount: parseFloat(t[0]),
|
|
184
162
|
// @ts-ignore
|
|
185
|
-
symbol:
|
|
163
|
+
symbol: ee[t[1]]
|
|
186
164
|
};
|
|
187
165
|
} else
|
|
188
166
|
return {
|
|
189
167
|
amount: parseFloat(e.amount.toString()) / Math.pow(10, e.precision),
|
|
190
168
|
// @ts-ignore
|
|
191
|
-
symbol:
|
|
169
|
+
symbol: te[e.nai]
|
|
192
170
|
};
|
|
193
171
|
}
|
|
194
|
-
function
|
|
172
|
+
function vt(e) {
|
|
195
173
|
return e === void 0 ? !0 : parseInt(e.split("-")[0], 10) < 1980;
|
|
196
174
|
}
|
|
197
|
-
function
|
|
175
|
+
function M(e, t) {
|
|
198
176
|
return e / 1e6 * t;
|
|
199
177
|
}
|
|
200
|
-
function
|
|
178
|
+
function be(e, t) {
|
|
201
179
|
let n = 0, r = 0, s = 0, a = 0, o = e.head_block - e.spk_block;
|
|
202
180
|
if (e.spk_block) {
|
|
203
181
|
if (o < 28800)
|
|
@@ -208,27 +186,27 @@ function ke(e, t) {
|
|
|
208
186
|
a,
|
|
209
187
|
t.spk_rate_ldel
|
|
210
188
|
);
|
|
211
|
-
const
|
|
212
|
-
return
|
|
189
|
+
const l = n + r + s;
|
|
190
|
+
return l || 0;
|
|
213
191
|
}
|
|
214
192
|
} else return 0;
|
|
215
|
-
function c(
|
|
216
|
-
return (
|
|
193
|
+
function c(l, w, _) {
|
|
194
|
+
return (l * (1 + _ / 365) - l) * w;
|
|
217
195
|
}
|
|
218
196
|
}
|
|
219
|
-
function
|
|
197
|
+
function O(e) {
|
|
220
198
|
return h({
|
|
221
199
|
queryKey: ["assets", "hive", "general-info", e],
|
|
222
200
|
staleTime: 6e4,
|
|
223
201
|
refetchInterval: 9e4,
|
|
224
202
|
queryFn: async () => {
|
|
225
|
-
await i().prefetchQuery(
|
|
226
|
-
|
|
203
|
+
await i().prefetchQuery(H()), await i().prefetchQuery(
|
|
204
|
+
S(e)
|
|
227
205
|
);
|
|
228
206
|
const t = i().getQueryData(
|
|
229
|
-
|
|
207
|
+
H().queryKey
|
|
230
208
|
), n = i().getQueryData(
|
|
231
|
-
|
|
209
|
+
S(e).queryKey
|
|
232
210
|
);
|
|
233
211
|
return {
|
|
234
212
|
name: "HIVE",
|
|
@@ -239,25 +217,25 @@ function q(e) {
|
|
|
239
217
|
}
|
|
240
218
|
});
|
|
241
219
|
}
|
|
242
|
-
function be(e) {
|
|
243
|
-
let f = 9.5 - (e.headBlock - 7e6) / 25e4 * 0.01;
|
|
244
|
-
f < 0.95 && (f = 0.95);
|
|
245
|
-
const g = e.vestingRewardPercent / 1e4, _ = e.virtualSupply, v = e.totalVestingFund;
|
|
246
|
-
return (_ * f * g / v).toFixed(3);
|
|
247
|
-
}
|
|
248
220
|
function Pe(e) {
|
|
221
|
+
let l = 9.5 - (e.headBlock - 7e6) / 25e4 * 0.01;
|
|
222
|
+
l < 0.95 && (l = 0.95);
|
|
223
|
+
const w = e.vestingRewardPercent / 1e4, _ = e.virtualSupply, v = e.totalVestingFund;
|
|
224
|
+
return (_ * l * w / v).toFixed(3);
|
|
225
|
+
}
|
|
226
|
+
function qe(e) {
|
|
249
227
|
return h({
|
|
250
228
|
queryKey: ["assets", "hive-power", "general-info", e],
|
|
251
229
|
staleTime: 6e4,
|
|
252
230
|
refetchInterval: 9e4,
|
|
253
231
|
queryFn: async () => {
|
|
254
|
-
await i().prefetchQuery(
|
|
255
|
-
|
|
232
|
+
await i().prefetchQuery(H()), await i().prefetchQuery(
|
|
233
|
+
S(e)
|
|
256
234
|
);
|
|
257
235
|
const t = i().getQueryData(
|
|
258
|
-
|
|
236
|
+
H().queryKey
|
|
259
237
|
), n = i().getQueryData(
|
|
260
|
-
|
|
238
|
+
S(e).queryKey
|
|
261
239
|
);
|
|
262
240
|
return !t || !n ? {
|
|
263
241
|
name: "HP",
|
|
@@ -268,25 +246,25 @@ function Pe(e) {
|
|
|
268
246
|
name: "HP",
|
|
269
247
|
title: "Hive Power",
|
|
270
248
|
price: t ? t.base / t.quote : 0,
|
|
271
|
-
accountBalance: +
|
|
249
|
+
accountBalance: +M(
|
|
272
250
|
p(n.vesting_shares).amount,
|
|
273
251
|
// parseAsset(accountData.delegated_vesting_shares).amount +
|
|
274
252
|
// parseAsset(accountData.received_vesting_shares).amount -
|
|
275
253
|
// nextVestingSharesWithdrawal,
|
|
276
254
|
t.hivePerMVests
|
|
277
255
|
).toFixed(3),
|
|
278
|
-
apr:
|
|
256
|
+
apr: Pe(t),
|
|
279
257
|
parts: [
|
|
280
258
|
{
|
|
281
259
|
name: "delegating",
|
|
282
|
-
balance: +
|
|
260
|
+
balance: +M(
|
|
283
261
|
p(n.delegated_vesting_shares).amount,
|
|
284
262
|
t.hivePerMVests
|
|
285
263
|
).toFixed(3)
|
|
286
264
|
},
|
|
287
265
|
{
|
|
288
266
|
name: "received",
|
|
289
|
-
balance: +
|
|
267
|
+
balance: +M(
|
|
290
268
|
p(n.received_vesting_shares).amount,
|
|
291
269
|
t.hivePerMVests
|
|
292
270
|
).toFixed(3)
|
|
@@ -296,19 +274,19 @@ function Pe(e) {
|
|
|
296
274
|
}
|
|
297
275
|
});
|
|
298
276
|
}
|
|
299
|
-
function
|
|
277
|
+
function Se(e) {
|
|
300
278
|
return h({
|
|
301
279
|
queryKey: ["assets", "hbd", "general-info", e],
|
|
302
280
|
staleTime: 6e4,
|
|
303
281
|
refetchInterval: 9e4,
|
|
304
282
|
queryFn: async () => {
|
|
305
|
-
await i().prefetchQuery(
|
|
306
|
-
|
|
283
|
+
await i().prefetchQuery(H()), await i().prefetchQuery(
|
|
284
|
+
S(e)
|
|
307
285
|
);
|
|
308
286
|
const t = i().getQueryData(
|
|
309
|
-
|
|
287
|
+
S(e).queryKey
|
|
310
288
|
), n = i().getQueryData(
|
|
311
|
-
|
|
289
|
+
H().queryKey
|
|
312
290
|
);
|
|
313
291
|
return t ? {
|
|
314
292
|
name: "HBD",
|
|
@@ -335,47 +313,47 @@ function qe(e) {
|
|
|
335
313
|
}
|
|
336
314
|
});
|
|
337
315
|
}
|
|
338
|
-
const
|
|
316
|
+
const m = T.operationOrders, E = {
|
|
339
317
|
transfers: [
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
318
|
+
m.transfer,
|
|
319
|
+
m.transfer_to_savings,
|
|
320
|
+
m.transfer_from_savings,
|
|
321
|
+
m.cancel_transfer_from_savings,
|
|
322
|
+
m.recurrent_transfer,
|
|
323
|
+
m.fill_recurrent_transfer,
|
|
324
|
+
m.escrow_transfer,
|
|
325
|
+
m.fill_recurrent_transfer
|
|
348
326
|
],
|
|
349
327
|
"market-orders": [
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
328
|
+
m.fill_convert_request,
|
|
329
|
+
m.fill_order,
|
|
330
|
+
m.fill_collateralized_convert_request,
|
|
331
|
+
m.limit_order_create2,
|
|
332
|
+
m.limit_order_create,
|
|
333
|
+
m.limit_order_cancel
|
|
356
334
|
],
|
|
357
|
-
interests: [
|
|
335
|
+
interests: [m.interest],
|
|
358
336
|
"stake-operations": [
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
337
|
+
m.return_vesting_delegation,
|
|
338
|
+
m.withdraw_vesting,
|
|
339
|
+
m.transfer_to_vesting,
|
|
340
|
+
m.set_withdraw_vesting_route,
|
|
341
|
+
m.update_proposal_votes,
|
|
342
|
+
m.fill_vesting_withdraw,
|
|
343
|
+
m.account_witness_proxy,
|
|
344
|
+
m.delegate_vesting_shares
|
|
367
345
|
],
|
|
368
346
|
rewards: [
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
347
|
+
m.author_reward,
|
|
348
|
+
m.curation_reward,
|
|
349
|
+
m.producer_reward,
|
|
350
|
+
m.claim_reward_balance,
|
|
351
|
+
m.comment_benefactor_reward,
|
|
352
|
+
m.liquidity_reward,
|
|
353
|
+
m.proposal_pay
|
|
376
354
|
]
|
|
377
355
|
};
|
|
378
|
-
function
|
|
356
|
+
function ne(e, t = 20, n) {
|
|
379
357
|
return R({
|
|
380
358
|
queryKey: ["assets", "hive", "transactions", e, t, n],
|
|
381
359
|
initialData: { pages: [], pageParams: [] },
|
|
@@ -388,34 +366,34 @@ function te(e, t = 20, n) {
|
|
|
388
366
|
let s = [];
|
|
389
367
|
switch (n) {
|
|
390
368
|
case "transfers":
|
|
391
|
-
s =
|
|
392
|
-
|
|
369
|
+
s = T.makeBitMaskFilter(
|
|
370
|
+
E.transfers
|
|
393
371
|
);
|
|
394
372
|
break;
|
|
395
373
|
case "market-orders":
|
|
396
|
-
s =
|
|
397
|
-
|
|
374
|
+
s = T.makeBitMaskFilter(
|
|
375
|
+
E["market-orders"]
|
|
398
376
|
);
|
|
399
377
|
break;
|
|
400
378
|
case "interests":
|
|
401
|
-
s =
|
|
402
|
-
|
|
379
|
+
s = T.makeBitMaskFilter(
|
|
380
|
+
E.interests
|
|
403
381
|
);
|
|
404
382
|
break;
|
|
405
383
|
case "stake-operations":
|
|
406
|
-
s =
|
|
407
|
-
|
|
384
|
+
s = T.makeBitMaskFilter(
|
|
385
|
+
E["stake-operations"]
|
|
408
386
|
);
|
|
409
387
|
break;
|
|
410
388
|
case "rewards":
|
|
411
|
-
s =
|
|
412
|
-
|
|
389
|
+
s = T.makeBitMaskFilter(
|
|
390
|
+
E.rewards
|
|
413
391
|
);
|
|
414
392
|
break;
|
|
415
393
|
default:
|
|
416
|
-
s =
|
|
394
|
+
s = T.makeBitMaskFilter([]);
|
|
417
395
|
}
|
|
418
|
-
return (await
|
|
396
|
+
return (await y.hiveClient.call(
|
|
419
397
|
"condenser_api",
|
|
420
398
|
"get_account_history",
|
|
421
399
|
[e, r, t, ...s]
|
|
@@ -443,8 +421,8 @@ function te(e, t = 20, n) {
|
|
|
443
421
|
case "recurrent_transfer":
|
|
444
422
|
return ["HIVE"].includes(o.amount);
|
|
445
423
|
case "fill_recurrent_transfer":
|
|
446
|
-
const
|
|
447
|
-
return ["HIVE"].includes(
|
|
424
|
+
const l = p(o.amount);
|
|
425
|
+
return ["HIVE"].includes(l.symbol);
|
|
448
426
|
case "claim_reward_balance":
|
|
449
427
|
return p(
|
|
450
428
|
o.reward_hive
|
|
@@ -470,9 +448,9 @@ function te(e, t = 20, n) {
|
|
|
470
448
|
})
|
|
471
449
|
});
|
|
472
450
|
}
|
|
473
|
-
function
|
|
451
|
+
function kt(e, t = 20, n) {
|
|
474
452
|
return R({
|
|
475
|
-
...
|
|
453
|
+
...ne(e, t, n),
|
|
476
454
|
queryKey: ["assets", "hive-power", "transactions", e, t, n],
|
|
477
455
|
select: ({ pages: r, pageParams: s }) => ({
|
|
478
456
|
pageParams: s,
|
|
@@ -494,8 +472,8 @@ function _t(e, t = 20, n) {
|
|
|
494
472
|
case "recurrent_transfer":
|
|
495
473
|
return ["VESTS", "HP"].includes(o.amount);
|
|
496
474
|
case "fill_recurrent_transfer":
|
|
497
|
-
const
|
|
498
|
-
return ["VESTS", "HP"].includes(
|
|
475
|
+
const w = p(o.amount);
|
|
476
|
+
return ["VESTS", "HP"].includes(w.symbol);
|
|
499
477
|
case "curation_reward":
|
|
500
478
|
case "withdraw_vesting":
|
|
501
479
|
case "delegate_vesting_shares":
|
|
@@ -512,9 +490,9 @@ function _t(e, t = 20, n) {
|
|
|
512
490
|
})
|
|
513
491
|
});
|
|
514
492
|
}
|
|
515
|
-
function
|
|
493
|
+
function bt(e, t = 20, n) {
|
|
516
494
|
return R({
|
|
517
|
-
...
|
|
495
|
+
...ne(e, t, n),
|
|
518
496
|
queryKey: ["assets", "hbd", "transactions", e, t, n],
|
|
519
497
|
select: ({ pages: r, pageParams: s }) => ({
|
|
520
498
|
pageParams: s,
|
|
@@ -534,8 +512,8 @@ function vt(e, t = 20, n) {
|
|
|
534
512
|
case "recurrent_transfer":
|
|
535
513
|
return ["HBD"].includes(o.amount);
|
|
536
514
|
case "fill_recurrent_transfer":
|
|
537
|
-
const
|
|
538
|
-
return ["HBD"].includes(
|
|
515
|
+
const w = p(o.amount);
|
|
516
|
+
return ["HBD"].includes(w.symbol);
|
|
539
517
|
case "comment_reward":
|
|
540
518
|
case "effective_comment_vote":
|
|
541
519
|
return !0;
|
|
@@ -547,16 +525,16 @@ function vt(e, t = 20, n) {
|
|
|
547
525
|
})
|
|
548
526
|
});
|
|
549
527
|
}
|
|
550
|
-
function
|
|
528
|
+
function Pt(e = 86400) {
|
|
551
529
|
return R({
|
|
552
530
|
queryKey: ["assets", "hive", "metrics", e],
|
|
553
|
-
queryFn: async ({ pageParam: [t, n] }) => (await
|
|
531
|
+
queryFn: async ({ pageParam: [t, n] }) => (await y.hiveClient.call(
|
|
554
532
|
"condenser_api",
|
|
555
533
|
"get_market_history",
|
|
556
534
|
[
|
|
557
535
|
e,
|
|
558
|
-
|
|
559
|
-
|
|
536
|
+
C(t).format("YYYY-MM-DDTHH:mm:ss"),
|
|
537
|
+
C(n).format("YYYY-MM-DDTHH:mm:ss")
|
|
560
538
|
]
|
|
561
539
|
)).map(({ hive: s, non_hive: a, open: o }) => ({
|
|
562
540
|
close: a.close / s.close,
|
|
@@ -568,29 +546,29 @@ function kt(e = 86400) {
|
|
|
568
546
|
})),
|
|
569
547
|
initialPageParam: [
|
|
570
548
|
// Fetch at least 8 hours or given interval
|
|
571
|
-
|
|
549
|
+
C().subtract(Math.max(100 * e, 28800), "second").toDate(),
|
|
572
550
|
/* @__PURE__ */ new Date()
|
|
573
551
|
],
|
|
574
552
|
getNextPageParam: (t, n, [r]) => [
|
|
575
|
-
|
|
576
|
-
|
|
553
|
+
C(r.getTime()).subtract(Math.max(100 * e, 28800), "second").toDate(),
|
|
554
|
+
C(r.getTime()).subtract(e, "second").toDate()
|
|
577
555
|
]
|
|
578
556
|
});
|
|
579
557
|
}
|
|
580
|
-
function
|
|
558
|
+
function qt(e) {
|
|
581
559
|
return h({
|
|
582
560
|
queryKey: ["assets", "hive", "withdrawal-routes", e],
|
|
583
|
-
queryFn: () =>
|
|
561
|
+
queryFn: () => y.hiveClient.database.call("get_withdraw_routes", [
|
|
584
562
|
e,
|
|
585
563
|
"outgoing"
|
|
586
564
|
])
|
|
587
565
|
});
|
|
588
566
|
}
|
|
589
|
-
async function
|
|
567
|
+
async function V(e) {
|
|
590
568
|
const n = p(e.amount).symbol;
|
|
591
569
|
if (e.type === "key" && "key" in e) {
|
|
592
570
|
const { key: r, type: s, ...a } = e;
|
|
593
|
-
return
|
|
571
|
+
return y.hiveClient.broadcast.transfer(
|
|
594
572
|
{
|
|
595
573
|
from: a.from,
|
|
596
574
|
to: a.to,
|
|
@@ -630,14 +608,14 @@ async function x(e) {
|
|
|
630
608
|
}
|
|
631
609
|
);
|
|
632
610
|
}
|
|
633
|
-
async function
|
|
611
|
+
async function G(e) {
|
|
634
612
|
if (e.type === "key" && "key" in e) {
|
|
635
613
|
const { key: t, type: n, ...r } = e;
|
|
636
|
-
return
|
|
614
|
+
return y.hiveClient.broadcast.sendOperations(
|
|
637
615
|
[["transfer_to_savings", r]],
|
|
638
616
|
t
|
|
639
617
|
);
|
|
640
|
-
} else return e.type === "keychain" ?
|
|
618
|
+
} else return e.type === "keychain" ? P.broadcast(
|
|
641
619
|
e.from,
|
|
642
620
|
[["transfer_to_savings", e]],
|
|
643
621
|
"Active"
|
|
@@ -651,11 +629,11 @@ async function U(e) {
|
|
|
651
629
|
async function Oe(e) {
|
|
652
630
|
if (e.type === "key" && "key" in e) {
|
|
653
631
|
const { key: t, type: n, ...r } = e;
|
|
654
|
-
return
|
|
632
|
+
return y.hiveClient.broadcast.sendOperations(
|
|
655
633
|
[["transfer_to_vesting", r]],
|
|
656
634
|
t
|
|
657
635
|
);
|
|
658
|
-
} else return e.type === "keychain" ?
|
|
636
|
+
} else return e.type === "keychain" ? P.broadcast(
|
|
659
637
|
e.from,
|
|
660
638
|
[["transfer_to_vesting", e]],
|
|
661
639
|
"Active"
|
|
@@ -666,14 +644,14 @@ async function Oe(e) {
|
|
|
666
644
|
}
|
|
667
645
|
);
|
|
668
646
|
}
|
|
669
|
-
async function
|
|
647
|
+
async function Te(e) {
|
|
670
648
|
if (e.type === "key" && "key" in e) {
|
|
671
649
|
const { key: t, type: n, ...r } = e;
|
|
672
|
-
return
|
|
650
|
+
return y.hiveClient.broadcast.sendOperations(
|
|
673
651
|
[["delegate_vesting_shares", r]],
|
|
674
652
|
t
|
|
675
653
|
);
|
|
676
|
-
} else return e.type === "keychain" ?
|
|
654
|
+
} else return e.type === "keychain" ? P.broadcast(
|
|
677
655
|
e.from,
|
|
678
656
|
[["delegate_vesting_shares", e]],
|
|
679
657
|
"Active"
|
|
@@ -687,11 +665,11 @@ async function Se(e) {
|
|
|
687
665
|
async function Ae(e) {
|
|
688
666
|
if (e.type === "key" && "key" in e) {
|
|
689
667
|
const { key: t, type: n, ...r } = e;
|
|
690
|
-
return
|
|
668
|
+
return y.hiveClient.broadcast.sendOperations(
|
|
691
669
|
[["withdraw_vesting", r]],
|
|
692
670
|
t
|
|
693
671
|
);
|
|
694
|
-
} else return e.type === "keychain" ?
|
|
672
|
+
} else return e.type === "keychain" ? P.broadcast(
|
|
695
673
|
e.from,
|
|
696
674
|
[["withdraw_vesting", e]],
|
|
697
675
|
"Active"
|
|
@@ -705,14 +683,14 @@ async function Ae(e) {
|
|
|
705
683
|
async function Ne(e) {
|
|
706
684
|
if (e.type === "key" && "key" in e) {
|
|
707
685
|
const { key: r, type: s, ...a } = e;
|
|
708
|
-
return
|
|
686
|
+
return y.hiveClient.broadcast.sendOperations(
|
|
709
687
|
[["set_withdraw_vesting_route", a]],
|
|
710
688
|
r
|
|
711
689
|
);
|
|
712
690
|
}
|
|
713
691
|
if (e.type === "keychain") {
|
|
714
692
|
const { type: r, ...s } = e;
|
|
715
|
-
return
|
|
693
|
+
return P.broadcast(
|
|
716
694
|
s.from_account,
|
|
717
695
|
[["set_withdraw_vesting_route", s]],
|
|
718
696
|
"Active"
|
|
@@ -727,7 +705,7 @@ async function Ne(e) {
|
|
|
727
705
|
);
|
|
728
706
|
}
|
|
729
707
|
var u = /* @__PURE__ */ ((e) => (e.Transfer = "transfer", e.TransferToSavings = "transfer-saving", e.Delegate = "delegate", e.PowerUp = "power-up", e.PowerDown = "power-down", e.WithdrawRoutes = "withdraw-saving", e.Swap = "swap", e.Gift = "gift", e.Promote = "promote", e.Claim = "claim", e.Buy = "buy", e.LockLiquidity = "lock", e.Stake = "stake", e.Unstake = "unstake", e.Undelegate = "undelegate", e))(u || {});
|
|
730
|
-
async function
|
|
708
|
+
async function He(e) {
|
|
731
709
|
const t = JSON.stringify({
|
|
732
710
|
to: e.to,
|
|
733
711
|
amount: +e.amount * 1e3,
|
|
@@ -740,10 +718,10 @@ async function Te(e) {
|
|
|
740
718
|
};
|
|
741
719
|
if (e.type === "key" && "key" in e) {
|
|
742
720
|
const { key: r } = e;
|
|
743
|
-
return
|
|
721
|
+
return y.hiveClient.broadcast.json(n, r);
|
|
744
722
|
} else {
|
|
745
723
|
if (e.type === "keychain")
|
|
746
|
-
return
|
|
724
|
+
return P.customJson(
|
|
747
725
|
e.from,
|
|
748
726
|
e.id,
|
|
749
727
|
"Active",
|
|
@@ -770,7 +748,7 @@ async function Te(e) {
|
|
|
770
748
|
}
|
|
771
749
|
}
|
|
772
750
|
}
|
|
773
|
-
const
|
|
751
|
+
const Ke = async (e) => {
|
|
774
752
|
const t = JSON.stringify({ amount: +e.amount * 1e3 }), n = {
|
|
775
753
|
id: e.mode === "lock" ? "spkcc_gov_up" : "spkcc_gov_down",
|
|
776
754
|
json: t,
|
|
@@ -779,10 +757,10 @@ const He = async (e) => {
|
|
|
779
757
|
};
|
|
780
758
|
if (e.type === "key" && "key" in e) {
|
|
781
759
|
const { key: r } = e;
|
|
782
|
-
return
|
|
760
|
+
return y.hiveClient.broadcast.json(n, r);
|
|
783
761
|
} else {
|
|
784
762
|
if (e.type === "keychain")
|
|
785
|
-
return
|
|
763
|
+
return P.customJson(
|
|
786
764
|
e.from,
|
|
787
765
|
n.id,
|
|
788
766
|
"Active",
|
|
@@ -805,7 +783,7 @@ const He = async (e) => {
|
|
|
805
783
|
}
|
|
806
784
|
}
|
|
807
785
|
};
|
|
808
|
-
async function
|
|
786
|
+
async function Qe(e) {
|
|
809
787
|
const t = JSON.stringify({ amount: +e.amount * 1e3 }), n = {
|
|
810
788
|
id: `spkcc_power_${e.mode}`,
|
|
811
789
|
json: t,
|
|
@@ -814,10 +792,10 @@ async function Ke(e) {
|
|
|
814
792
|
};
|
|
815
793
|
if (e.type === "key" && "key" in e) {
|
|
816
794
|
const { key: r } = e;
|
|
817
|
-
return
|
|
795
|
+
return y.hiveClient.broadcast.json(n, r);
|
|
818
796
|
} else {
|
|
819
797
|
if (e.type === "keychain")
|
|
820
|
-
return
|
|
798
|
+
return P.customJson(
|
|
821
799
|
e.from,
|
|
822
800
|
`spkcc_power_${e.mode}`,
|
|
823
801
|
"Active",
|
|
@@ -840,13 +818,13 @@ async function Ke(e) {
|
|
|
840
818
|
}
|
|
841
819
|
}
|
|
842
820
|
}
|
|
843
|
-
function
|
|
821
|
+
function K() {
|
|
844
822
|
return h({
|
|
845
823
|
queryKey: ["assets", "spk", "markets"],
|
|
846
824
|
staleTime: 6e4,
|
|
847
825
|
refetchInterval: 9e4,
|
|
848
826
|
queryFn: async () => {
|
|
849
|
-
const t = await (await fetch(`${
|
|
827
|
+
const t = await (await fetch(`${y.spkNode}/markets`)).json();
|
|
850
828
|
return {
|
|
851
829
|
list: Object.entries(t.markets.node).map(([n, r]) => ({
|
|
852
830
|
name: n,
|
|
@@ -857,33 +835,33 @@ function H() {
|
|
|
857
835
|
}
|
|
858
836
|
});
|
|
859
837
|
}
|
|
860
|
-
function
|
|
838
|
+
function Q(e) {
|
|
861
839
|
return h({
|
|
862
840
|
queryKey: ["assets", "spk", "wallet", e],
|
|
863
|
-
queryFn: async () => (await fetch(
|
|
841
|
+
queryFn: async () => (await fetch(y.spkNode + `/@${e}`)).json(),
|
|
864
842
|
enabled: !!e,
|
|
865
843
|
staleTime: 6e4,
|
|
866
844
|
refetchInterval: 9e4
|
|
867
845
|
});
|
|
868
846
|
}
|
|
869
|
-
function
|
|
847
|
+
function W(e) {
|
|
870
848
|
return e.toFixed(3);
|
|
871
849
|
}
|
|
872
|
-
function
|
|
850
|
+
function De(e) {
|
|
873
851
|
return h({
|
|
874
852
|
queryKey: ["assets", "larynx", "general-info", e],
|
|
875
853
|
staleTime: 6e4,
|
|
876
854
|
refetchInterval: 9e4,
|
|
877
855
|
queryFn: async () => {
|
|
878
|
-
await i().prefetchQuery(
|
|
879
|
-
|
|
856
|
+
await i().prefetchQuery(Q(e)), await i().prefetchQuery(K()), await i().prefetchQuery(
|
|
857
|
+
O(e)
|
|
880
858
|
);
|
|
881
859
|
const t = i().getQueryData(
|
|
882
|
-
|
|
860
|
+
Q(e).queryKey
|
|
883
861
|
), n = i().getQueryData(
|
|
884
|
-
|
|
862
|
+
K().queryKey
|
|
885
863
|
), r = i().getQueryData(
|
|
886
|
-
|
|
864
|
+
O(e).queryKey
|
|
887
865
|
);
|
|
888
866
|
if (!t || !n)
|
|
889
867
|
return {
|
|
@@ -892,9 +870,9 @@ function Qe(e) {
|
|
|
892
870
|
price: 1,
|
|
893
871
|
accountBalance: 0
|
|
894
872
|
};
|
|
895
|
-
const s = +
|
|
873
|
+
const s = +W(
|
|
896
874
|
t.balance / 1e3 * +t.tick * ((r == null ? void 0 : r.price) ?? 0)
|
|
897
|
-
), a = +
|
|
875
|
+
), a = +W(t.balance / 1e3);
|
|
898
876
|
return {
|
|
899
877
|
name: "LARYNX",
|
|
900
878
|
layer: "SPK",
|
|
@@ -905,24 +883,24 @@ function Qe(e) {
|
|
|
905
883
|
}
|
|
906
884
|
});
|
|
907
885
|
}
|
|
908
|
-
function
|
|
886
|
+
function j(e) {
|
|
909
887
|
return e.toFixed(3);
|
|
910
888
|
}
|
|
911
|
-
function
|
|
889
|
+
function Ce(e) {
|
|
912
890
|
return h({
|
|
913
891
|
queryKey: ["assets", "spk", "general-info", e],
|
|
914
892
|
staleTime: 6e4,
|
|
915
893
|
refetchInterval: 9e4,
|
|
916
894
|
queryFn: async () => {
|
|
917
|
-
await i().prefetchQuery(
|
|
918
|
-
|
|
895
|
+
await i().prefetchQuery(Q(e)), await i().prefetchQuery(K()), await i().prefetchQuery(
|
|
896
|
+
O(e)
|
|
919
897
|
);
|
|
920
898
|
const t = i().getQueryData(
|
|
921
|
-
|
|
899
|
+
Q(e).queryKey
|
|
922
900
|
), n = i().getQueryData(
|
|
923
|
-
|
|
901
|
+
K().queryKey
|
|
924
902
|
), r = i().getQueryData(
|
|
925
|
-
|
|
903
|
+
O(e).queryKey
|
|
926
904
|
);
|
|
927
905
|
if (!t || !n)
|
|
928
906
|
return {
|
|
@@ -931,17 +909,17 @@ function De(e) {
|
|
|
931
909
|
price: 1,
|
|
932
910
|
accountBalance: 0
|
|
933
911
|
};
|
|
934
|
-
const s = +
|
|
912
|
+
const s = +j(
|
|
935
913
|
(t.gov + t.spk) / 1e3 * +t.tick * ((r == null ? void 0 : r.price) ?? 0)
|
|
936
|
-
), a = +
|
|
937
|
-
(t.spk +
|
|
914
|
+
), a = +j(
|
|
915
|
+
(t.spk + be(
|
|
938
916
|
t,
|
|
939
917
|
n.raw.stats || {
|
|
940
918
|
spk_rate_lgov: "0.001",
|
|
941
|
-
spk_rate_lpow:
|
|
919
|
+
spk_rate_lpow: j(
|
|
942
920
|
parseFloat(n.raw.stats.spk_rate_lpow) * 100
|
|
943
921
|
),
|
|
944
|
-
spk_rate_ldel:
|
|
922
|
+
spk_rate_ldel: j(
|
|
945
923
|
parseFloat(n.raw.stats.spk_rate_ldel) * 100
|
|
946
924
|
)
|
|
947
925
|
}
|
|
@@ -956,7 +934,7 @@ function De(e) {
|
|
|
956
934
|
}
|
|
957
935
|
});
|
|
958
936
|
}
|
|
959
|
-
function
|
|
937
|
+
function F(e) {
|
|
960
938
|
return e.toFixed(3);
|
|
961
939
|
}
|
|
962
940
|
function Ee(e) {
|
|
@@ -966,15 +944,15 @@ function Ee(e) {
|
|
|
966
944
|
refetchInterval: 9e4,
|
|
967
945
|
queryFn: async () => {
|
|
968
946
|
var o, c;
|
|
969
|
-
await i().prefetchQuery(
|
|
970
|
-
|
|
947
|
+
await i().prefetchQuery(Q(e)), await i().prefetchQuery(K()), await i().prefetchQuery(
|
|
948
|
+
O(e)
|
|
971
949
|
);
|
|
972
950
|
const t = i().getQueryData(
|
|
973
|
-
|
|
951
|
+
Q(e).queryKey
|
|
974
952
|
), n = i().getQueryData(
|
|
975
|
-
|
|
953
|
+
K().queryKey
|
|
976
954
|
), r = i().getQueryData(
|
|
977
|
-
|
|
955
|
+
O(e).queryKey
|
|
978
956
|
);
|
|
979
957
|
if (!t || !n)
|
|
980
958
|
return {
|
|
@@ -983,9 +961,9 @@ function Ee(e) {
|
|
|
983
961
|
price: 1,
|
|
984
962
|
accountBalance: 0
|
|
985
963
|
};
|
|
986
|
-
const s = +
|
|
964
|
+
const s = +F(
|
|
987
965
|
t.poweredUp / 1e3 * +t.tick * ((r == null ? void 0 : r.price) ?? 0)
|
|
988
|
-
), a = +
|
|
966
|
+
), a = +F(t.poweredUp / 1e3);
|
|
989
967
|
return {
|
|
990
968
|
name: "LP",
|
|
991
969
|
title: "LARYNX Power",
|
|
@@ -995,24 +973,24 @@ function Ee(e) {
|
|
|
995
973
|
parts: [
|
|
996
974
|
{
|
|
997
975
|
name: "delegating",
|
|
998
|
-
balance: (o = t.granting) != null && o.t ? +
|
|
976
|
+
balance: (o = t.granting) != null && o.t ? +F(t.granting.t / 1e3) : 0
|
|
999
977
|
},
|
|
1000
978
|
{
|
|
1001
979
|
name: "recieved",
|
|
1002
|
-
balance: (c = t.granted) != null && c.t ? +
|
|
980
|
+
balance: (c = t.granted) != null && c.t ? +F(t.granted.t / 1e3) : 0
|
|
1003
981
|
}
|
|
1004
982
|
]
|
|
1005
983
|
};
|
|
1006
984
|
}
|
|
1007
985
|
});
|
|
1008
986
|
}
|
|
1009
|
-
function
|
|
987
|
+
function L(e) {
|
|
1010
988
|
return h({
|
|
1011
989
|
queryKey: ["assets", "hive-engine", "metadata-list", e],
|
|
1012
990
|
staleTime: 6e4,
|
|
1013
991
|
refetchInterval: 9e4,
|
|
1014
992
|
queryFn: async () => (await (await fetch(
|
|
1015
|
-
`${
|
|
993
|
+
`${y.privateApiHost}/private-api/engine-api`,
|
|
1016
994
|
{
|
|
1017
995
|
method: "POST",
|
|
1018
996
|
body: JSON.stringify({
|
|
@@ -1032,7 +1010,7 @@ function F(e) {
|
|
|
1032
1010
|
)).json()).result
|
|
1033
1011
|
});
|
|
1034
1012
|
}
|
|
1035
|
-
const
|
|
1013
|
+
const B = [
|
|
1036
1014
|
"LEO",
|
|
1037
1015
|
"ARCHON",
|
|
1038
1016
|
"WAIV",
|
|
@@ -1058,13 +1036,13 @@ const L = [
|
|
|
1058
1036
|
"SPORTS",
|
|
1059
1037
|
"CURE"
|
|
1060
1038
|
];
|
|
1061
|
-
function
|
|
1039
|
+
function U(e) {
|
|
1062
1040
|
return h({
|
|
1063
1041
|
queryKey: ["assets", "hive-engine", "balances", e],
|
|
1064
1042
|
staleTime: 6e4,
|
|
1065
1043
|
refetchInterval: 9e4,
|
|
1066
1044
|
queryFn: async () => (await (await fetch(
|
|
1067
|
-
`${
|
|
1045
|
+
`${y.privateApiHost}/private-api/engine-api`,
|
|
1068
1046
|
{
|
|
1069
1047
|
method: "POST",
|
|
1070
1048
|
body: JSON.stringify({
|
|
@@ -1090,7 +1068,7 @@ function Re() {
|
|
|
1090
1068
|
staleTime: 6e4,
|
|
1091
1069
|
refetchInterval: 9e4,
|
|
1092
1070
|
queryFn: async () => (await (await fetch(
|
|
1093
|
-
`${
|
|
1071
|
+
`${y.privateApiHost}/private-api/engine-api`,
|
|
1094
1072
|
{
|
|
1095
1073
|
method: "POST",
|
|
1096
1074
|
body: JSON.stringify({
|
|
@@ -1108,7 +1086,7 @@ function Re() {
|
|
|
1108
1086
|
)).json()).result
|
|
1109
1087
|
});
|
|
1110
1088
|
}
|
|
1111
|
-
function
|
|
1089
|
+
function Ie(e, t) {
|
|
1112
1090
|
return h({
|
|
1113
1091
|
queryKey: ["assets", "hive-engine", t, "general-info", e],
|
|
1114
1092
|
enabled: !!t && !!e,
|
|
@@ -1119,17 +1097,17 @@ function Ce(e, t) {
|
|
|
1119
1097
|
throw new Error(
|
|
1120
1098
|
"[SDK][Wallets] – hive engine token or username missed"
|
|
1121
1099
|
);
|
|
1122
|
-
const n =
|
|
1100
|
+
const n = O(e);
|
|
1123
1101
|
await i().prefetchQuery(n);
|
|
1124
1102
|
const r = i().getQueryData(
|
|
1125
1103
|
n.queryKey
|
|
1126
|
-
), s =
|
|
1104
|
+
), s = L(B);
|
|
1127
1105
|
await i().prefetchQuery(s);
|
|
1128
|
-
const a = i().getQueryData(s.queryKey), o =
|
|
1106
|
+
const a = i().getQueryData(s.queryKey), o = U(e);
|
|
1129
1107
|
await i().prefetchQuery(o);
|
|
1130
|
-
const c = i().getQueryData(o.queryKey),
|
|
1131
|
-
await i().prefetchQuery(
|
|
1132
|
-
const
|
|
1108
|
+
const c = i().getQueryData(o.queryKey), l = Re();
|
|
1109
|
+
await i().prefetchQuery(l);
|
|
1110
|
+
const w = i().getQueryData(l.queryKey), _ = a == null ? void 0 : a.find((q) => q.symbol === t), v = c == null ? void 0 : c.find((q) => q.symbol === t), b = w == null ? void 0 : w.find((q) => q.symbol === t), k = +((b == null ? void 0 : b.lastPrice) ?? "0");
|
|
1133
1111
|
return {
|
|
1134
1112
|
name: t,
|
|
1135
1113
|
title: (_ == null ? void 0 : _.name) ?? "",
|
|
@@ -1140,7 +1118,7 @@ function Ce(e, t) {
|
|
|
1140
1118
|
}
|
|
1141
1119
|
});
|
|
1142
1120
|
}
|
|
1143
|
-
function
|
|
1121
|
+
function St(e, t, n = 20) {
|
|
1144
1122
|
return R({
|
|
1145
1123
|
queryKey: ["assets", "hive-engine", t, "transactions", e],
|
|
1146
1124
|
enabled: !!t && !!e,
|
|
@@ -1152,7 +1130,7 @@ function Pt(e, t, n = 20) {
|
|
|
1152
1130
|
"[SDK][Wallets] – hive engine token or username missed"
|
|
1153
1131
|
);
|
|
1154
1132
|
const s = new URL(
|
|
1155
|
-
`${
|
|
1133
|
+
`${y.privateApiHost}/private-api/engine-account-history`
|
|
1156
1134
|
);
|
|
1157
1135
|
return s.searchParams.set("account", e), s.searchParams.set("symbol", t), s.searchParams.set("limit", n.toString()), s.searchParams.set("offset", r.toString()), await (await fetch(s, {
|
|
1158
1136
|
method: "GET",
|
|
@@ -1161,14 +1139,14 @@ function Pt(e, t, n = 20) {
|
|
|
1161
1139
|
}
|
|
1162
1140
|
});
|
|
1163
1141
|
}
|
|
1164
|
-
function
|
|
1142
|
+
function Ot(e, t = "daily") {
|
|
1165
1143
|
return h({
|
|
1166
1144
|
queryKey: ["assets", "hive-engine", e],
|
|
1167
1145
|
staleTime: 6e4,
|
|
1168
1146
|
refetchInterval: 9e4,
|
|
1169
1147
|
queryFn: async () => {
|
|
1170
1148
|
const n = new URL(
|
|
1171
|
-
`${
|
|
1149
|
+
`${y.privateApiHost}/private-api/engine-chart-api`
|
|
1172
1150
|
);
|
|
1173
1151
|
return n.searchParams.set("symbol", e), n.searchParams.set("interval", t), await (await fetch(n, {
|
|
1174
1152
|
headers: { "Content-type": "application/json" }
|
|
@@ -1176,7 +1154,7 @@ function qt(e, t = "daily") {
|
|
|
1176
1154
|
}
|
|
1177
1155
|
});
|
|
1178
1156
|
}
|
|
1179
|
-
async function
|
|
1157
|
+
async function je(e) {
|
|
1180
1158
|
const n = p(e.amount).amount.toString();
|
|
1181
1159
|
if (e.type === "key" && "key" in e) {
|
|
1182
1160
|
const { key: r, type: s, ...a } = e, o = {
|
|
@@ -1193,7 +1171,7 @@ async function Ie(e) {
|
|
|
1193
1171
|
required_auths: [a.from],
|
|
1194
1172
|
required_posting_auths: []
|
|
1195
1173
|
};
|
|
1196
|
-
return
|
|
1174
|
+
return y.hiveClient.broadcast.json(o, r);
|
|
1197
1175
|
} else return e.type === "keychain" ? new Promise(
|
|
1198
1176
|
(r, s) => {
|
|
1199
1177
|
var a;
|
|
@@ -1239,7 +1217,7 @@ async function Ie(e) {
|
|
|
1239
1217
|
}
|
|
1240
1218
|
);
|
|
1241
1219
|
}
|
|
1242
|
-
async function
|
|
1220
|
+
async function Fe(e) {
|
|
1243
1221
|
const n = p(e.amount).amount.toString();
|
|
1244
1222
|
if (e.type === "key" && "key" in e) {
|
|
1245
1223
|
const { key: r, type: s, ...a } = e, o = {
|
|
@@ -1256,7 +1234,7 @@ async function je(e) {
|
|
|
1256
1234
|
required_auths: [a.from],
|
|
1257
1235
|
required_posting_auths: []
|
|
1258
1236
|
};
|
|
1259
|
-
return
|
|
1237
|
+
return y.hiveClient.broadcast.json(o, r);
|
|
1260
1238
|
} else return e.type === "keychain" ? new Promise(
|
|
1261
1239
|
(r, s) => {
|
|
1262
1240
|
var a;
|
|
@@ -1302,7 +1280,7 @@ async function je(e) {
|
|
|
1302
1280
|
}
|
|
1303
1281
|
);
|
|
1304
1282
|
}
|
|
1305
|
-
async function
|
|
1283
|
+
async function Le(e) {
|
|
1306
1284
|
const n = p(e.amount).amount.toString();
|
|
1307
1285
|
if (e.type === "key" && "key" in e) {
|
|
1308
1286
|
const { key: r, type: s, ...a } = e, o = {
|
|
@@ -1319,7 +1297,7 @@ async function Fe(e) {
|
|
|
1319
1297
|
required_auths: [a.from],
|
|
1320
1298
|
required_posting_auths: []
|
|
1321
1299
|
};
|
|
1322
|
-
return
|
|
1300
|
+
return y.hiveClient.broadcast.json(o, r);
|
|
1323
1301
|
} else return e.type === "keychain" ? new Promise(
|
|
1324
1302
|
(r, s) => {
|
|
1325
1303
|
var a;
|
|
@@ -1365,7 +1343,7 @@ async function Fe(e) {
|
|
|
1365
1343
|
}
|
|
1366
1344
|
);
|
|
1367
1345
|
}
|
|
1368
|
-
async function
|
|
1346
|
+
async function Be(e) {
|
|
1369
1347
|
const n = p(e.amount).amount.toString();
|
|
1370
1348
|
if (e.type === "key" && "key" in e) {
|
|
1371
1349
|
const { key: r, type: s, ...a } = e, o = {
|
|
@@ -1382,7 +1360,7 @@ async function Le(e) {
|
|
|
1382
1360
|
required_auths: [a.from],
|
|
1383
1361
|
required_posting_auths: []
|
|
1384
1362
|
};
|
|
1385
|
-
return
|
|
1363
|
+
return y.hiveClient.broadcast.json(o, r);
|
|
1386
1364
|
} else return e.type === "keychain" ? new Promise(
|
|
1387
1365
|
(r, s) => {
|
|
1388
1366
|
var a;
|
|
@@ -1428,7 +1406,7 @@ async function Le(e) {
|
|
|
1428
1406
|
}
|
|
1429
1407
|
);
|
|
1430
1408
|
}
|
|
1431
|
-
async function
|
|
1409
|
+
async function Me(e) {
|
|
1432
1410
|
const n = p(e.amount).amount.toString();
|
|
1433
1411
|
if (e.type === "key" && "key" in e) {
|
|
1434
1412
|
const { key: r, type: s, ...a } = e, o = {
|
|
@@ -1446,7 +1424,7 @@ async function Be(e) {
|
|
|
1446
1424
|
required_auths: [a.from],
|
|
1447
1425
|
required_posting_auths: []
|
|
1448
1426
|
};
|
|
1449
|
-
return
|
|
1427
|
+
return y.hiveClient.broadcast.json(o, r);
|
|
1450
1428
|
} else return e.type === "keychain" ? new Promise(
|
|
1451
1429
|
(r, s) => {
|
|
1452
1430
|
var a;
|
|
@@ -1494,7 +1472,7 @@ async function Be(e) {
|
|
|
1494
1472
|
}
|
|
1495
1473
|
);
|
|
1496
1474
|
}
|
|
1497
|
-
function
|
|
1475
|
+
function J(e) {
|
|
1498
1476
|
return h({
|
|
1499
1477
|
queryKey: ["assets", "points", e],
|
|
1500
1478
|
queryFn: async () => {
|
|
@@ -1503,7 +1481,7 @@ function M(e) {
|
|
|
1503
1481
|
"[SDK][Wallets][Assets][Points][Query] – username wasn`t provided"
|
|
1504
1482
|
);
|
|
1505
1483
|
const n = await (await fetch(
|
|
1506
|
-
|
|
1484
|
+
y.privateApiHost + "/private-api/points",
|
|
1507
1485
|
{
|
|
1508
1486
|
method: "POST",
|
|
1509
1487
|
headers: {
|
|
@@ -1523,15 +1501,15 @@ function M(e) {
|
|
|
1523
1501
|
enabled: !!e
|
|
1524
1502
|
});
|
|
1525
1503
|
}
|
|
1526
|
-
function
|
|
1504
|
+
function Je(e) {
|
|
1527
1505
|
return h({
|
|
1528
1506
|
queryKey: ["assets", "points", "general-info", e],
|
|
1529
1507
|
staleTime: 6e4,
|
|
1530
1508
|
refetchInterval: 9e4,
|
|
1531
1509
|
queryFn: async () => {
|
|
1532
|
-
await i().prefetchQuery(
|
|
1510
|
+
await i().prefetchQuery(J(e));
|
|
1533
1511
|
const t = i().getQueryData(
|
|
1534
|
-
|
|
1512
|
+
J(e).queryKey
|
|
1535
1513
|
);
|
|
1536
1514
|
return {
|
|
1537
1515
|
name: "POINTS",
|
|
@@ -1542,11 +1520,11 @@ function Me(e) {
|
|
|
1542
1520
|
}
|
|
1543
1521
|
});
|
|
1544
1522
|
}
|
|
1545
|
-
function
|
|
1523
|
+
function Tt(e, t) {
|
|
1546
1524
|
return h({
|
|
1547
|
-
queryKey: ["assets", "points", "transactions", e],
|
|
1525
|
+
queryKey: ["assets", "points", "transactions", e, t],
|
|
1548
1526
|
queryFn: async () => (await (await fetch(
|
|
1549
|
-
`${
|
|
1527
|
+
`${y.privateApiHost}/private-api/point-list`,
|
|
1550
1528
|
{
|
|
1551
1529
|
method: "POST",
|
|
1552
1530
|
body: JSON.stringify({
|
|
@@ -1567,29 +1545,29 @@ function Ot(e, t) {
|
|
|
1567
1545
|
}))
|
|
1568
1546
|
});
|
|
1569
1547
|
}
|
|
1570
|
-
function
|
|
1571
|
-
const { mutateAsync: r } =
|
|
1548
|
+
function At(e, t, n) {
|
|
1549
|
+
const { mutateAsync: r } = X.useRecordActivity(
|
|
1572
1550
|
e,
|
|
1573
1551
|
"points-claimed"
|
|
1574
1552
|
);
|
|
1575
|
-
return
|
|
1553
|
+
return N({
|
|
1576
1554
|
mutationFn: async () => {
|
|
1577
1555
|
if (!e)
|
|
1578
1556
|
throw new Error(
|
|
1579
1557
|
"[SDK][Wallets][Assets][Points][Claim] – username wasn`t provided"
|
|
1580
1558
|
);
|
|
1581
|
-
return fetch(
|
|
1559
|
+
return fetch(y.privateApiHost + "/private-api/points-claim", {
|
|
1582
1560
|
method: "POST",
|
|
1583
1561
|
headers: {
|
|
1584
1562
|
"Content-Type": "application/json"
|
|
1585
1563
|
},
|
|
1586
|
-
body: JSON.stringify({ code:
|
|
1564
|
+
body: JSON.stringify({ code: oe(e) })
|
|
1587
1565
|
});
|
|
1588
1566
|
},
|
|
1589
1567
|
onError: n,
|
|
1590
1568
|
onSuccess: () => {
|
|
1591
|
-
r(),
|
|
1592
|
-
|
|
1569
|
+
r(), y.queryClient.setQueryData(
|
|
1570
|
+
J(e).queryKey,
|
|
1593
1571
|
(s) => s && {
|
|
1594
1572
|
points: (parseFloat(s.points) + parseFloat(s.uPoints)).toFixed(3),
|
|
1595
1573
|
uPoints: "0"
|
|
@@ -1598,7 +1576,7 @@ function St(e, t, n) {
|
|
|
1598
1576
|
}
|
|
1599
1577
|
});
|
|
1600
1578
|
}
|
|
1601
|
-
async function
|
|
1579
|
+
async function $e({
|
|
1602
1580
|
from: e,
|
|
1603
1581
|
to: t,
|
|
1604
1582
|
amount: n,
|
|
@@ -1622,61 +1600,74 @@ async function Je({
|
|
|
1622
1600
|
];
|
|
1623
1601
|
if (s === "key" && "key" in a) {
|
|
1624
1602
|
const { key: c } = a;
|
|
1625
|
-
return
|
|
1603
|
+
return y.hiveClient.broadcast.sendOperations([o], c);
|
|
1626
1604
|
}
|
|
1627
|
-
return s === "keychain" ?
|
|
1605
|
+
return s === "keychain" ? P.broadcast(e, [o], "Active") : d.sendOperation(
|
|
1628
1606
|
o,
|
|
1629
1607
|
{ callback: `https://ecency.com/@${e}/wallet` },
|
|
1630
1608
|
() => {
|
|
1631
1609
|
}
|
|
1632
1610
|
);
|
|
1633
1611
|
}
|
|
1634
|
-
var
|
|
1635
|
-
function
|
|
1612
|
+
var xe = /* @__PURE__ */ ((e) => (e[e.CHECKIN = 10] = "CHECKIN", e[e.LOGIN = 20] = "LOGIN", e[e.CHECKIN_EXTRA = 30] = "CHECKIN_EXTRA", e[e.POST = 100] = "POST", e[e.COMMENT = 110] = "COMMENT", e[e.VOTE = 120] = "VOTE", e[e.REBLOG = 130] = "REBLOG", e[e.DELEGATION = 150] = "DELEGATION", e[e.REFERRAL = 160] = "REFERRAL", e[e.COMMUNITY = 170] = "COMMUNITY", e[e.TRANSFER_SENT = 998] = "TRANSFER_SENT", e[e.TRANSFER_INCOMING = 999] = "TRANSFER_INCOMING", e[e.MINTED = 991] = "MINTED", e))(xe || {});
|
|
1613
|
+
function Nt(e) {
|
|
1636
1614
|
return h({
|
|
1637
1615
|
queryKey: ["ecency-wallets", "all-tokens-list", e],
|
|
1638
1616
|
queryFn: async () => {
|
|
1639
1617
|
await i().prefetchQuery(
|
|
1640
|
-
|
|
1618
|
+
L(B)
|
|
1641
1619
|
);
|
|
1642
|
-
const t = i().getQueryData(
|
|
1620
|
+
const t = i().getQueryData(L(B).queryKey);
|
|
1643
1621
|
return {
|
|
1644
1622
|
basic: [
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
w.Spk,
|
|
1650
|
-
"LARYNX",
|
|
1651
|
-
"LP"
|
|
1623
|
+
g.Points,
|
|
1624
|
+
g.Hive,
|
|
1625
|
+
g.HivePower,
|
|
1626
|
+
g.HiveDollar
|
|
1652
1627
|
].filter((n) => n.toLowerCase().includes(e.toLowerCase())),
|
|
1653
|
-
external: Object.values(
|
|
1628
|
+
external: Object.values(f).filter(
|
|
1654
1629
|
(n) => n.toLowerCase().includes(e.toLowerCase())
|
|
1655
1630
|
),
|
|
1631
|
+
spk: [g.Spk, "LARYNX", "LP"],
|
|
1656
1632
|
layer2: t
|
|
1657
1633
|
};
|
|
1658
1634
|
}
|
|
1659
1635
|
});
|
|
1660
1636
|
}
|
|
1661
|
-
function
|
|
1637
|
+
function Ue(e) {
|
|
1662
1638
|
return h({
|
|
1663
1639
|
queryKey: ["ecency-wallets", "list", e],
|
|
1664
1640
|
enabled: !!e,
|
|
1665
1641
|
queryFn: async () => {
|
|
1666
|
-
|
|
1667
|
-
|
|
1642
|
+
var r;
|
|
1643
|
+
const t = S(e);
|
|
1644
|
+
await i().fetchQuery({
|
|
1645
|
+
queryKey: t.queryKey
|
|
1646
|
+
});
|
|
1647
|
+
const n = i().getQueryData(
|
|
1648
|
+
t.queryKey
|
|
1668
1649
|
);
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1650
|
+
if (((r = n == null ? void 0 : n.profile) == null ? void 0 : r.tokens) instanceof Array) {
|
|
1651
|
+
const s = [
|
|
1652
|
+
g.Points,
|
|
1653
|
+
g.Hive,
|
|
1654
|
+
g.HivePower,
|
|
1655
|
+
g.HiveDollar,
|
|
1656
|
+
...n.profile.tokens.map((a) => a.symbol)
|
|
1657
|
+
];
|
|
1658
|
+
return Array.from(new Set(s).values());
|
|
1659
|
+
}
|
|
1660
|
+
return [
|
|
1661
|
+
g.Points,
|
|
1662
|
+
g.Hive,
|
|
1663
|
+
g.HivePower,
|
|
1664
|
+
g.HiveDollar,
|
|
1665
|
+
g.Spk
|
|
1675
1666
|
];
|
|
1676
1667
|
}
|
|
1677
1668
|
});
|
|
1678
1669
|
}
|
|
1679
|
-
function
|
|
1670
|
+
function Ve(e, t, n = { refetch: !1 }) {
|
|
1680
1671
|
const r = async (s) => (n.refetch ? await i().fetchQuery(s) : await i().prefetchQuery(s), i().getQueryData(
|
|
1681
1672
|
s.queryKey
|
|
1682
1673
|
));
|
|
@@ -1684,22 +1675,22 @@ function Ue(e, t, n = { refetch: !1 }) {
|
|
|
1684
1675
|
queryKey: ["ecency-wallets", "asset-info", e, t],
|
|
1685
1676
|
queryFn: async () => {
|
|
1686
1677
|
if (t === "HIVE")
|
|
1687
|
-
return r(
|
|
1678
|
+
return r(O(e));
|
|
1688
1679
|
if (t === "HP")
|
|
1689
|
-
return r(Pe(e));
|
|
1690
|
-
if (t === "HBD")
|
|
1691
1680
|
return r(qe(e));
|
|
1681
|
+
if (t === "HBD")
|
|
1682
|
+
return r(Se(e));
|
|
1692
1683
|
if (t === "SPK")
|
|
1693
|
-
return r(
|
|
1684
|
+
return r(Ce(e));
|
|
1694
1685
|
if (t === "LARYNX")
|
|
1695
|
-
return r(
|
|
1686
|
+
return r(De(e));
|
|
1696
1687
|
if (t === "LP")
|
|
1697
1688
|
return r(Ee(e));
|
|
1698
1689
|
if (t === "POINTS")
|
|
1699
|
-
return r(
|
|
1700
|
-
if (
|
|
1690
|
+
return r(Je(e));
|
|
1691
|
+
if (B.includes(t))
|
|
1701
1692
|
return await r(
|
|
1702
|
-
|
|
1693
|
+
Ie(e, t)
|
|
1703
1694
|
);
|
|
1704
1695
|
throw new Error(
|
|
1705
1696
|
"[SDK][Wallets] – has requested unrecognized asset info"
|
|
@@ -1707,12 +1698,12 @@ function Ue(e, t, n = { refetch: !1 }) {
|
|
|
1707
1698
|
}
|
|
1708
1699
|
});
|
|
1709
1700
|
}
|
|
1710
|
-
function
|
|
1701
|
+
function Ht(e, t, n = !1) {
|
|
1711
1702
|
return h({
|
|
1712
1703
|
queryKey: ["wallets", "token-operations", e, t, n],
|
|
1713
1704
|
queryFn: async () => {
|
|
1714
1705
|
switch (e) {
|
|
1715
|
-
case
|
|
1706
|
+
case g.Hive:
|
|
1716
1707
|
return [
|
|
1717
1708
|
u.Transfer,
|
|
1718
1709
|
...n ? [
|
|
@@ -1721,17 +1712,17 @@ function Nt(e, t, n = !1) {
|
|
|
1721
1712
|
u.Swap
|
|
1722
1713
|
] : []
|
|
1723
1714
|
];
|
|
1724
|
-
case
|
|
1715
|
+
case g.HivePower:
|
|
1725
1716
|
return [
|
|
1726
1717
|
u.Delegate,
|
|
1727
1718
|
...n ? [u.PowerDown, u.WithdrawRoutes] : [u.PowerUp]
|
|
1728
1719
|
];
|
|
1729
|
-
case
|
|
1720
|
+
case g.HiveDollar:
|
|
1730
1721
|
return [
|
|
1731
1722
|
u.Transfer,
|
|
1732
1723
|
...n ? [u.TransferToSavings, u.Swap] : []
|
|
1733
1724
|
];
|
|
1734
|
-
case
|
|
1725
|
+
case g.Points:
|
|
1735
1726
|
return [
|
|
1736
1727
|
u.Gift,
|
|
1737
1728
|
...n ? [
|
|
@@ -1740,7 +1731,7 @@ function Nt(e, t, n = !1) {
|
|
|
1740
1731
|
u.Buy
|
|
1741
1732
|
] : []
|
|
1742
1733
|
];
|
|
1743
|
-
case
|
|
1734
|
+
case g.Spk:
|
|
1744
1735
|
return [u.Transfer];
|
|
1745
1736
|
case "LARYNX":
|
|
1746
1737
|
return [
|
|
@@ -1753,59 +1744,82 @@ function Nt(e, t, n = !1) {
|
|
|
1753
1744
|
...n ? [u.PowerDown] : []
|
|
1754
1745
|
];
|
|
1755
1746
|
}
|
|
1756
|
-
const r =
|
|
1747
|
+
const r = U(t);
|
|
1757
1748
|
await i().prefetchQuery(r);
|
|
1758
1749
|
const s = i().getQueryData(
|
|
1759
1750
|
r.queryKey
|
|
1760
|
-
), a =
|
|
1751
|
+
), a = L(
|
|
1761
1752
|
(s == null ? void 0 : s.map((k) => k.symbol)) ?? []
|
|
1762
1753
|
);
|
|
1763
1754
|
await i().prefetchQuery(a);
|
|
1764
|
-
const o = i().getQueryData(a.queryKey), c = s == null ? void 0 : s.find((k) => k.symbol === e),
|
|
1755
|
+
const o = i().getQueryData(a.queryKey), c = s == null ? void 0 : s.find((k) => k.symbol === e), l = o == null ? void 0 : o.find((k) => k.symbol === e), w = n && (l == null ? void 0 : l.delegationEnabled) && c && parseFloat(c.delegationsOut) !== parseFloat(c.balance), _ = n && parseFloat((c == null ? void 0 : c.delegationsOut) ?? "0") > 0, v = n && (l == null ? void 0 : l.stakingEnabled), b = n && parseFloat((c == null ? void 0 : c.stake) ?? "0") > 0;
|
|
1765
1756
|
return [
|
|
1766
1757
|
u.Transfer,
|
|
1767
|
-
...
|
|
1758
|
+
...w ? [u.Delegate] : [],
|
|
1768
1759
|
..._ ? [u.Undelegate] : [],
|
|
1769
1760
|
...v ? [u.Stake] : [],
|
|
1770
|
-
...
|
|
1761
|
+
...b ? [u.Unstake] : []
|
|
1771
1762
|
];
|
|
1772
1763
|
}
|
|
1773
1764
|
});
|
|
1774
1765
|
}
|
|
1775
|
-
|
|
1776
|
-
|
|
1766
|
+
function Ge(e) {
|
|
1767
|
+
return new Promise((t) => setTimeout(t, e));
|
|
1768
|
+
}
|
|
1769
|
+
function re(e) {
|
|
1770
|
+
switch (e) {
|
|
1771
|
+
case f.BTC:
|
|
1772
|
+
return new le();
|
|
1773
|
+
case f.ETH:
|
|
1774
|
+
return new fe();
|
|
1775
|
+
case f.TRON:
|
|
1776
|
+
return new ye();
|
|
1777
|
+
case f.TON:
|
|
1778
|
+
return new me();
|
|
1779
|
+
case f.SOL:
|
|
1780
|
+
return new pe();
|
|
1781
|
+
case f.ATOM:
|
|
1782
|
+
return new he();
|
|
1783
|
+
case f.APT:
|
|
1784
|
+
return new ge();
|
|
1785
|
+
default:
|
|
1786
|
+
return;
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
const We = {
|
|
1790
|
+
[f.BTC]: "m/44'/0'/0'/0/0",
|
|
1777
1791
|
// Bitcoin (BIP44)
|
|
1778
|
-
[
|
|
1792
|
+
[f.ETH]: "m/44'/60'/0'/0/0",
|
|
1779
1793
|
// Ethereum (BIP44)
|
|
1780
|
-
[
|
|
1794
|
+
[f.SOL]: "m/44'/501'/0'/0'",
|
|
1781
1795
|
// Solana (BIP44)
|
|
1782
|
-
[
|
|
1796
|
+
[f.TON]: "m/44'/607'/0'",
|
|
1783
1797
|
// TON (BIP44)
|
|
1784
|
-
[
|
|
1798
|
+
[f.TRON]: "m/44'/195'/0'/0/0",
|
|
1785
1799
|
// Tron (BIP44)
|
|
1786
|
-
[
|
|
1800
|
+
[f.APT]: "m/44'/637'/0'/0'/0'",
|
|
1787
1801
|
// Aptos (BIP44)
|
|
1788
|
-
[
|
|
1802
|
+
[f.ATOM]: "m/44'/118'/0'/0/0"
|
|
1789
1803
|
// Cosmos (BIP44)
|
|
1790
1804
|
};
|
|
1791
|
-
function
|
|
1792
|
-
const { data: n } =
|
|
1805
|
+
function Kt(e, t) {
|
|
1806
|
+
const { data: n } = z(e), r = $(), s = N({
|
|
1793
1807
|
mutationKey: ["ecency-wallets", "create-wallet", e, t],
|
|
1794
1808
|
mutationFn: async () => {
|
|
1795
1809
|
if (!n)
|
|
1796
1810
|
throw new Error("[Ecency][Wallets] - No seed to create a wallet");
|
|
1797
|
-
const o =
|
|
1811
|
+
const o = re(t), c = await (o == null ? void 0 : o.getDerivedPrivateKey({
|
|
1798
1812
|
mnemonic: n,
|
|
1799
|
-
hdPath:
|
|
1813
|
+
hdPath: We[t]
|
|
1800
1814
|
}));
|
|
1801
|
-
await
|
|
1802
|
-
const
|
|
1815
|
+
await Ge(1e3);
|
|
1816
|
+
const l = await (o == null ? void 0 : o.getNewAddress({
|
|
1803
1817
|
privateKey: c
|
|
1804
1818
|
}));
|
|
1805
1819
|
return {
|
|
1806
1820
|
privateKey: c,
|
|
1807
|
-
address:
|
|
1808
|
-
publicKey:
|
|
1821
|
+
address: l.address,
|
|
1822
|
+
publicKey: l.publicKey,
|
|
1809
1823
|
username: e,
|
|
1810
1824
|
currency: t
|
|
1811
1825
|
};
|
|
@@ -1813,23 +1827,26 @@ function Tt(e, t) {
|
|
|
1813
1827
|
onSuccess: (o) => {
|
|
1814
1828
|
r.setQueryData(
|
|
1815
1829
|
["ecency-wallets", "wallets", o.username],
|
|
1816
|
-
(c) => new Map(c ? Array.from(c.entries()) : []).set(
|
|
1830
|
+
(c) => new Map(c ? Array.from(c.entries()) : []).set(
|
|
1831
|
+
o.currency,
|
|
1832
|
+
o
|
|
1833
|
+
)
|
|
1817
1834
|
);
|
|
1818
1835
|
}
|
|
1819
|
-
}), a =
|
|
1836
|
+
}), a = we(() => {
|
|
1820
1837
|
}, []);
|
|
1821
1838
|
return {
|
|
1822
1839
|
createWallet: s,
|
|
1823
1840
|
importWallet: a
|
|
1824
1841
|
};
|
|
1825
1842
|
}
|
|
1826
|
-
function
|
|
1827
|
-
const { data: t } =
|
|
1843
|
+
function Ye(e) {
|
|
1844
|
+
const { data: t } = D({
|
|
1828
1845
|
queryKey: ["ecency-wallets", "wallets", e]
|
|
1829
|
-
}), { data: n } =
|
|
1830
|
-
return
|
|
1846
|
+
}), { data: n } = ke(e);
|
|
1847
|
+
return N({
|
|
1831
1848
|
mutationKey: ["ecency-wallets", "create-account-with-wallets", e],
|
|
1832
|
-
mutationFn: ({ currency: r, address: s }) => fetch(
|
|
1849
|
+
mutationFn: ({ currency: r, address: s }) => fetch(y.privateApiHost + "/private-api/wallets-add", {
|
|
1833
1850
|
method: "POST",
|
|
1834
1851
|
headers: {
|
|
1835
1852
|
"Content-Type": "application/json"
|
|
@@ -1855,11 +1872,11 @@ function Ge(e) {
|
|
|
1855
1872
|
})
|
|
1856
1873
|
});
|
|
1857
1874
|
}
|
|
1858
|
-
function
|
|
1859
|
-
return
|
|
1875
|
+
function se() {
|
|
1876
|
+
return N({
|
|
1860
1877
|
mutationKey: ["ecency-wallets", "check-wallet-existence"],
|
|
1861
1878
|
mutationFn: async ({ address: e, currency: t }) => (await (await fetch(
|
|
1862
|
-
|
|
1879
|
+
y.privateApiHost + "/private-api/wallets-exist",
|
|
1863
1880
|
{
|
|
1864
1881
|
method: "POST",
|
|
1865
1882
|
headers: {
|
|
@@ -1873,30 +1890,30 @@ function ne() {
|
|
|
1873
1890
|
)).json()).length === 0
|
|
1874
1891
|
});
|
|
1875
1892
|
}
|
|
1876
|
-
const
|
|
1893
|
+
const Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1877
1894
|
__proto__: null,
|
|
1878
|
-
useCheckWalletExistence:
|
|
1879
|
-
useCreateAccountWithWallets:
|
|
1880
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1881
|
-
[
|
|
1882
|
-
[
|
|
1895
|
+
useCheckWalletExistence: se,
|
|
1896
|
+
useCreateAccountWithWallets: Ye
|
|
1897
|
+
}, Symbol.toStringTag, { value: "Module" })), Xe = {
|
|
1898
|
+
[f.BTC]: ["m/84'/0'/0'/0/0"],
|
|
1899
|
+
[f.ETH]: ["m/84'/60'/0'/0/0"],
|
|
1883
1900
|
// its not working for Trust, Exodus, todo: check others below
|
|
1884
|
-
[
|
|
1885
|
-
[
|
|
1886
|
-
[
|
|
1887
|
-
[
|
|
1901
|
+
[f.SOL]: ["m/84'/501'/0'/0/0"],
|
|
1902
|
+
[f.TRON]: ["m/44'/195'/0'/0'/0'"],
|
|
1903
|
+
[f.APT]: ["m/84'/637'/0'/0/0"],
|
|
1904
|
+
[f.TON]: [],
|
|
1888
1905
|
// Disabled
|
|
1889
|
-
[
|
|
1906
|
+
[f.ATOM]: ["m/84'/118'/0'/0'/0"]
|
|
1890
1907
|
};
|
|
1891
|
-
async function
|
|
1892
|
-
for (const r of
|
|
1908
|
+
async function ze(e, t, n) {
|
|
1909
|
+
for (const r of Xe[n] || [])
|
|
1893
1910
|
try {
|
|
1894
1911
|
const s = await t.getDerivedPrivateKey({
|
|
1895
1912
|
mnemonic: e,
|
|
1896
1913
|
hdPath: r
|
|
1897
1914
|
}), a = await t.getNewAddress({
|
|
1898
1915
|
privateKey: s,
|
|
1899
|
-
addressType: n ===
|
|
1916
|
+
addressType: n === f.BTC ? "segwit_native" : void 0
|
|
1900
1917
|
});
|
|
1901
1918
|
return [s.toString(), a.address];
|
|
1902
1919
|
} catch {
|
|
@@ -1904,17 +1921,17 @@ async function Ye(e, t, n) {
|
|
|
1904
1921
|
}
|
|
1905
1922
|
return [];
|
|
1906
1923
|
}
|
|
1907
|
-
function
|
|
1908
|
-
const n =
|
|
1909
|
-
return
|
|
1924
|
+
function Dt(e, t) {
|
|
1925
|
+
const n = $(), { mutateAsync: r } = se();
|
|
1926
|
+
return N({
|
|
1910
1927
|
mutationKey: ["ecency-wallets", "import-wallet", e, t],
|
|
1911
1928
|
mutationFn: async ({ privateKeyOrSeed: s }) => {
|
|
1912
|
-
const a =
|
|
1929
|
+
const a = re(t);
|
|
1913
1930
|
if (!a)
|
|
1914
1931
|
throw new Error("Cannot find token for this currency");
|
|
1915
1932
|
const o = s.split(" ").length === 12;
|
|
1916
|
-
let c,
|
|
1917
|
-
if (o ? [
|
|
1933
|
+
let c, l = s;
|
|
1934
|
+
if (o ? [l, c] = await ze(
|
|
1918
1935
|
s,
|
|
1919
1936
|
a,
|
|
1920
1937
|
t
|
|
@@ -1932,7 +1949,7 @@ function Kt(e, t) {
|
|
|
1932
1949
|
"This wallet has already in use by Hive account. Please, try another one"
|
|
1933
1950
|
);
|
|
1934
1951
|
return {
|
|
1935
|
-
privateKey:
|
|
1952
|
+
privateKey: l,
|
|
1936
1953
|
address: c,
|
|
1937
1954
|
publicKey: ""
|
|
1938
1955
|
};
|
|
@@ -1946,102 +1963,112 @@ function Kt(e, t) {
|
|
|
1946
1963
|
address: o,
|
|
1947
1964
|
username: e,
|
|
1948
1965
|
currency: t,
|
|
1966
|
+
type: "CHAIN",
|
|
1949
1967
|
custom: !0
|
|
1950
1968
|
})
|
|
1951
1969
|
);
|
|
1952
1970
|
}
|
|
1953
1971
|
});
|
|
1954
1972
|
}
|
|
1955
|
-
function
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
profile: {},
|
|
1963
|
-
tokens: Array.from(n.entries() ?? []).map(([r, s]) => ({
|
|
1964
|
-
symbol: r,
|
|
1965
|
-
type: "CHAIN",
|
|
1966
|
-
meta: {
|
|
1967
|
-
address: s.address
|
|
1968
|
-
}
|
|
1969
|
-
}))
|
|
1970
|
-
})
|
|
1971
|
-
});
|
|
1973
|
+
function Y(e, t = !1) {
|
|
1974
|
+
return e ? A.pipe(
|
|
1975
|
+
e,
|
|
1976
|
+
A.filter(({ type: n }) => n === "CHAIN"),
|
|
1977
|
+
A.map((n) => (n.meta.show = t, n)),
|
|
1978
|
+
A.groupByProp("symbol")
|
|
1979
|
+
) : {};
|
|
1972
1980
|
}
|
|
1973
|
-
function
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1981
|
+
function Ct(e) {
|
|
1982
|
+
const t = $(), { data: n } = D(S(e)), { mutateAsync: r } = ie(e);
|
|
1983
|
+
return N({
|
|
1984
|
+
mutationKey: ["ecency-wallets", "save-wallet-to-metadata", n],
|
|
1985
|
+
mutationFn: async (s) => {
|
|
1986
|
+
var _;
|
|
1987
|
+
if (!n)
|
|
1988
|
+
throw new Error("[SDK][Wallets] – no account data to save wallets");
|
|
1989
|
+
const a = Y(
|
|
1990
|
+
(_ = n.profile) == null ? void 0 : _.tokens
|
|
1991
|
+
), o = s.map(({ currency: v, type: b, ...k }) => ({
|
|
1992
|
+
symbol: v,
|
|
1993
|
+
type: b,
|
|
1994
|
+
meta: k
|
|
1995
|
+
})) ?? [], c = Y(o, !0), l = o.filter(
|
|
1996
|
+
({ type: v }) => v !== "CHAIN"
|
|
1997
|
+
), w = A.pipe(
|
|
1998
|
+
a,
|
|
1999
|
+
A.mergeDeep(c),
|
|
2000
|
+
A.values()
|
|
2001
|
+
);
|
|
2002
|
+
return r({
|
|
2003
|
+
tokens: [
|
|
2004
|
+
...l,
|
|
2005
|
+
...w
|
|
2006
|
+
]
|
|
1983
2007
|
});
|
|
1984
|
-
}
|
|
2008
|
+
},
|
|
2009
|
+
onSuccess: () => t.invalidateQueries({
|
|
2010
|
+
queryKey: Ue(e).queryKey
|
|
2011
|
+
})
|
|
1985
2012
|
});
|
|
1986
2013
|
}
|
|
1987
|
-
const
|
|
2014
|
+
const Ze = {
|
|
1988
2015
|
HIVE: {
|
|
1989
|
-
[u.Transfer]:
|
|
1990
|
-
[u.TransferToSavings]:
|
|
2016
|
+
[u.Transfer]: V,
|
|
2017
|
+
[u.TransferToSavings]: G,
|
|
1991
2018
|
[u.PowerUp]: Oe
|
|
1992
2019
|
},
|
|
1993
2020
|
HBD: {
|
|
1994
|
-
[u.Transfer]:
|
|
1995
|
-
[u.TransferToSavings]:
|
|
2021
|
+
[u.Transfer]: V,
|
|
2022
|
+
[u.TransferToSavings]: G
|
|
1996
2023
|
},
|
|
1997
2024
|
HP: {
|
|
1998
2025
|
[u.PowerDown]: Ae,
|
|
1999
|
-
[u.Delegate]:
|
|
2026
|
+
[u.Delegate]: Te,
|
|
2000
2027
|
[u.WithdrawRoutes]: Ne
|
|
2001
2028
|
},
|
|
2002
2029
|
POINTS: {
|
|
2003
|
-
[u.Gift]:
|
|
2030
|
+
[u.Gift]: $e
|
|
2004
2031
|
},
|
|
2005
2032
|
SPK: {
|
|
2006
|
-
[u.Transfer]:
|
|
2033
|
+
[u.Transfer]: He
|
|
2007
2034
|
},
|
|
2008
2035
|
LARYNX: {
|
|
2009
|
-
[u.LockLiquidity]:
|
|
2010
|
-
[u.PowerUp]:
|
|
2036
|
+
[u.LockLiquidity]: Ke,
|
|
2037
|
+
[u.PowerUp]: Qe
|
|
2011
2038
|
}
|
|
2012
|
-
},
|
|
2013
|
-
[u.Transfer]:
|
|
2014
|
-
[u.Stake]:
|
|
2015
|
-
[u.Unstake]:
|
|
2016
|
-
[u.Delegate]:
|
|
2017
|
-
[u.Undelegate]:
|
|
2039
|
+
}, et = {
|
|
2040
|
+
[u.Transfer]: Me,
|
|
2041
|
+
[u.Stake]: Le,
|
|
2042
|
+
[u.Unstake]: Be,
|
|
2043
|
+
[u.Delegate]: je,
|
|
2044
|
+
[u.Undelegate]: Fe
|
|
2018
2045
|
};
|
|
2019
2046
|
function Et(e, t, n) {
|
|
2020
|
-
const { mutateAsync: r } =
|
|
2047
|
+
const { mutateAsync: r } = X.useRecordActivity(
|
|
2021
2048
|
e,
|
|
2022
2049
|
n
|
|
2023
2050
|
);
|
|
2024
|
-
return
|
|
2051
|
+
return N({
|
|
2025
2052
|
mutationKey: ["ecency-wallets", t, n],
|
|
2026
2053
|
mutationFn: async (s) => {
|
|
2027
|
-
const a =
|
|
2054
|
+
const a = Ze[t][n];
|
|
2028
2055
|
if (a)
|
|
2029
2056
|
return a(s);
|
|
2030
|
-
const o =
|
|
2057
|
+
const o = U(e);
|
|
2031
2058
|
await i().prefetchQuery(o);
|
|
2032
2059
|
const c = i().getQueryData(
|
|
2033
2060
|
o.queryKey
|
|
2034
2061
|
);
|
|
2035
|
-
if (c != null && c.some((
|
|
2036
|
-
const
|
|
2037
|
-
if (
|
|
2038
|
-
return
|
|
2062
|
+
if (c != null && c.some((l) => l.symbol === t)) {
|
|
2063
|
+
const l = et[n];
|
|
2064
|
+
if (l)
|
|
2065
|
+
return l({ ...s, asset: t });
|
|
2039
2066
|
}
|
|
2040
2067
|
throw new Error("[SDK][Wallets] – no operation for given asset");
|
|
2041
2068
|
},
|
|
2042
2069
|
onSuccess: () => {
|
|
2043
2070
|
r();
|
|
2044
|
-
const s =
|
|
2071
|
+
const s = Ve(e, t, {
|
|
2045
2072
|
refetch: !0
|
|
2046
2073
|
});
|
|
2047
2074
|
setTimeout(
|
|
@@ -2055,64 +2082,63 @@ function Et(e, t, n) {
|
|
|
2055
2082
|
}
|
|
2056
2083
|
export {
|
|
2057
2084
|
u as AssetOperation,
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2085
|
+
g as EcencyWalletBasicTokens,
|
|
2086
|
+
f as EcencyWalletCurrency,
|
|
2087
|
+
Qt as EcencyWalletsPrivateApi,
|
|
2088
|
+
te as NaiMap,
|
|
2089
|
+
xe as PointTransactionType,
|
|
2090
|
+
ee as Symbol,
|
|
2091
|
+
je as delegateEngineToken,
|
|
2092
|
+
Te as delegateHive,
|
|
2093
|
+
Ve as getAccountWalletAssetInfoQueryOptions,
|
|
2094
|
+
Ue as getAccountWalletListQueryOptions,
|
|
2095
|
+
Nt as getAllTokensListQueryOptions,
|
|
2096
|
+
Se as getHbdAssetGeneralInfoQueryOptions,
|
|
2097
|
+
bt as getHbdAssetTransactionsQueryOptions,
|
|
2098
|
+
O as getHiveAssetGeneralInfoQueryOptions,
|
|
2099
|
+
Pt as getHiveAssetMetricQueryOptions,
|
|
2100
|
+
ne as getHiveAssetTransactionsQueryOptions,
|
|
2101
|
+
qt as getHiveAssetWithdrawalRoutesQueryOptions,
|
|
2102
|
+
Ie as getHiveEngineTokenGeneralInfoQueryOptions,
|
|
2103
|
+
St as getHiveEngineTokenTransactionsQueryOptions,
|
|
2104
|
+
U as getHiveEngineTokensBalancesQueryOptions,
|
|
2078
2105
|
Re as getHiveEngineTokensMarketQueryOptions,
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2106
|
+
L as getHiveEngineTokensMetadataQueryOptions,
|
|
2107
|
+
Ot as getHiveEngineTokensMetricsQueryOptions,
|
|
2108
|
+
qe as getHivePowerAssetGeneralInfoQueryOptions,
|
|
2109
|
+
kt as getHivePowerAssetTransactionsQueryOptions,
|
|
2110
|
+
De as getLarynxAssetGeneralInfoQueryOptions,
|
|
2084
2111
|
Ee as getLarynxPowerAssetGeneralInfoQueryOptions,
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2112
|
+
Je as getPointsAssetGeneralInfoQueryOptions,
|
|
2113
|
+
Tt as getPointsAssetTransactionsQueryOptions,
|
|
2114
|
+
J as getPointsQueryOptions,
|
|
2115
|
+
Ce as getSpkAssetGeneralInfoQueryOptions,
|
|
2116
|
+
K as getSpkMarketsQueryOptions,
|
|
2117
|
+
Ht as getTokenOperationsQueryOptions,
|
|
2118
|
+
vt as isEmptyDate,
|
|
2119
|
+
Ke as lockLarynx,
|
|
2093
2120
|
p as parseAsset,
|
|
2094
2121
|
Ae as powerDownHive,
|
|
2095
2122
|
Oe as powerUpHive,
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
Tt as useWalletCreate,
|
|
2123
|
+
Qe as powerUpLarynx,
|
|
2124
|
+
be as rewardSpk,
|
|
2125
|
+
Le as stakeEngineToken,
|
|
2126
|
+
Me as transferEngineToken,
|
|
2127
|
+
V as transferHive,
|
|
2128
|
+
$e as transferPoint,
|
|
2129
|
+
He as transferSpk,
|
|
2130
|
+
G as transferToSavingsHive,
|
|
2131
|
+
Fe as undelegateEngineToken,
|
|
2132
|
+
Be as unstakeEngineToken,
|
|
2133
|
+
At as useClaimPoints,
|
|
2134
|
+
_t as useCoinGeckoPriceQuery,
|
|
2135
|
+
dt as useGetExternalWalletBalanceQuery,
|
|
2136
|
+
ke as useHiveKeysQuery,
|
|
2137
|
+
Dt as useImportWallet,
|
|
2138
|
+
Ct as useSaveWalletInformationToMetadata,
|
|
2139
|
+
z as useSeedPhrase,
|
|
2140
|
+
Kt as useWalletCreate,
|
|
2115
2141
|
Et as useWalletOperation,
|
|
2116
|
-
|
|
2142
|
+
M as vestsToHp,
|
|
2117
2143
|
Ne as withdrawVestingRouteHive
|
|
2118
2144
|
};
|