@ecency/wallets 1.3.5 → 1.3.6

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.
@@ -1,5 +1,5 @@
1
- import { CONFIG as y, getQueryClient as i, getDynamicPropsQueryOptions as H, getAccountFullQueryOptions as b, Keychain as q, useBroadcastMutation as ce, EcencyAnalytics as X, getAccessToken as ue, useAccountUpdate as le } from "@ecency/sdk";
2
- import { useQuery as N, queryOptions as h, infiniteQueryOptions as R, useQueryClient as M, useMutation as K } from "@tanstack/react-query";
1
+ import { CONFIG as y, getQueryClient as i, getDynamicPropsQueryOptions as K, getAccountFullQueryOptions as b, Keychain as q, useBroadcastMutation as ce, EcencyAnalytics as X, getAccessToken as ue, useAccountUpdate as le } from "@ecency/sdk";
2
+ import { useQuery as N, queryOptions as h, infiniteQueryOptions as R, useQueryClient as M, useMutation as H } from "@tanstack/react-query";
3
3
  import fe from "bip39";
4
4
  import { LRUCache as ye } from "lru-cache";
5
5
  import { PrivateKey as I, utils as T } from "@hiveio/dhive";
@@ -54,12 +54,12 @@ function _t(e, t) {
54
54
  `https://tonapi.io/v1/blockchain/getAccount?account=${t}`
55
55
  )).json()).balance / 1e9;
56
56
  case f.APT:
57
- const S = (await (await fetch(
57
+ const O = (await (await fetch(
58
58
  `https://fullnode.mainnet.aptoslabs.com/v1/accounts/${t}/resources`
59
59
  )).json()).find(
60
60
  (ie) => ie.type.includes("coin::CoinStore")
61
61
  );
62
- return S ? parseInt(S.data.coin.value) / 1e8 : 0;
62
+ return O ? parseInt(O.data.coin.value) / 1e8 : 0;
63
63
  case f.ATOM:
64
64
  return +(await (await fetch(
65
65
  `https://rest.cosmos.directory/cosmoshub/auth/accounts/${t}`
@@ -172,10 +172,10 @@ function p(e) {
172
172
  function kt(e) {
173
173
  return e === void 0 ? !0 : parseInt(e.split("-")[0], 10) < 1980;
174
174
  }
175
- function J(e, t) {
175
+ function $(e, t) {
176
176
  return e / 1e6 * t;
177
177
  }
178
- function Se(e, t) {
178
+ function Oe(e, t) {
179
179
  let n = 0, r = 0, s = 0, a = 0, o = e.head_block - e.spk_block;
180
180
  if (e.spk_block) {
181
181
  if (o < 28800)
@@ -194,17 +194,17 @@ function Se(e, t) {
194
194
  return (l * (1 + _ / 365) - l) * w;
195
195
  }
196
196
  }
197
- function O(e) {
197
+ function S(e) {
198
198
  return h({
199
199
  queryKey: ["assets", "hive", "general-info", e],
200
200
  staleTime: 6e4,
201
201
  refetchInterval: 9e4,
202
202
  queryFn: async () => {
203
- await i().prefetchQuery(H()), await i().prefetchQuery(
203
+ await i().prefetchQuery(K()), await i().prefetchQuery(
204
204
  b(e)
205
205
  );
206
206
  const t = i().getQueryData(
207
- H().queryKey
207
+ K().queryKey
208
208
  ), n = i().getQueryData(
209
209
  b(e).queryKey
210
210
  );
@@ -217,7 +217,7 @@ function O(e) {
217
217
  }
218
218
  });
219
219
  }
220
- function Oe(e) {
220
+ function Se(e) {
221
221
  let l = 9.5 - (e.headBlock - 7e6) / 25e4 * 0.01;
222
222
  l < 0.95 && (l = 0.95);
223
223
  const w = e.vestingRewardPercent / 1e4, _ = e.virtualSupply, v = e.totalVestingFund;
@@ -229,11 +229,11 @@ function ne(e) {
229
229
  staleTime: 6e4,
230
230
  refetchInterval: 9e4,
231
231
  queryFn: async () => {
232
- await i().prefetchQuery(H()), await i().prefetchQuery(
232
+ await i().prefetchQuery(K()), await i().prefetchQuery(
233
233
  b(e)
234
234
  );
235
235
  const t = i().getQueryData(
236
- H().queryKey
236
+ K().queryKey
237
237
  ), n = i().getQueryData(
238
238
  b(e).queryKey
239
239
  );
@@ -246,25 +246,25 @@ function ne(e) {
246
246
  name: "HP",
247
247
  title: "Hive Power",
248
248
  price: t ? t.base / t.quote : 0,
249
- accountBalance: +J(
249
+ accountBalance: +$(
250
250
  p(n.vesting_shares).amount,
251
251
  // parseAsset(accountData.delegated_vesting_shares).amount +
252
252
  // parseAsset(accountData.received_vesting_shares).amount -
253
253
  // nextVestingSharesWithdrawal,
254
254
  t.hivePerMVests
255
255
  ).toFixed(3),
256
- apr: Oe(t),
256
+ apr: Se(t),
257
257
  parts: [
258
258
  {
259
259
  name: "delegating",
260
- balance: +J(
260
+ balance: +$(
261
261
  p(n.delegated_vesting_shares).amount,
262
262
  t.hivePerMVests
263
263
  ).toFixed(3)
264
264
  },
265
265
  {
266
266
  name: "received",
267
- balance: +J(
267
+ balance: +$(
268
268
  p(n.received_vesting_shares).amount,
269
269
  t.hivePerMVests
270
270
  ).toFixed(3)
@@ -280,13 +280,13 @@ function Te(e) {
280
280
  staleTime: 6e4,
281
281
  refetchInterval: 9e4,
282
282
  queryFn: async () => {
283
- await i().prefetchQuery(H()), await i().prefetchQuery(
283
+ await i().prefetchQuery(K()), await i().prefetchQuery(
284
284
  b(e)
285
285
  );
286
286
  const t = i().getQueryData(
287
287
  b(e).queryKey
288
288
  ), n = i().getQueryData(
289
- H().queryKey
289
+ K().queryKey
290
290
  );
291
291
  return t ? {
292
292
  name: "HBD",
@@ -555,7 +555,7 @@ function qt(e = 86400) {
555
555
  ]
556
556
  });
557
557
  }
558
- function St(e) {
558
+ function Ot(e) {
559
559
  return h({
560
560
  queryKey: ["assets", "hive", "withdrawal-routes", e],
561
561
  queryFn: () => y.hiveClient.database.call("get_withdraw_routes", [
@@ -564,6 +564,33 @@ function St(e) {
564
564
  ])
565
565
  });
566
566
  }
567
+ function St(e, t = 50) {
568
+ return h({
569
+ queryKey: ["assets", "hive-power", "delegates", e],
570
+ enabled: !!e,
571
+ queryFn: () => y.hiveClient.database.call("get_vesting_delegations", [
572
+ e,
573
+ "",
574
+ t
575
+ ])
576
+ });
577
+ }
578
+ function Tt(e) {
579
+ return h({
580
+ queryKey: ["assets", "hive-power", "delegatings", e],
581
+ queryFn: async () => (await (await fetch(
582
+ y.privateApiHost + `/private-api/received-vesting/${e}`,
583
+ {
584
+ headers: {
585
+ "Content-Type": "application/json"
586
+ }
587
+ }
588
+ )).json()).list,
589
+ select: (t) => t.sort(
590
+ (n, r) => p(r.vesting_shares).amount - p(n.vesting_shares).amount
591
+ )
592
+ });
593
+ }
567
594
  async function V(e) {
568
595
  const n = p(e.amount).symbol;
569
596
  if (e.type === "key" && "key" in e) {
@@ -662,7 +689,7 @@ async function Ne(e) {
662
689
  }
663
690
  );
664
691
  }
665
- async function Ke(e) {
692
+ async function He(e) {
666
693
  if (e.type === "key" && "key" in e) {
667
694
  const { key: t, type: n, ...r } = e;
668
695
  return y.hiveClient.broadcast.sendOperations(
@@ -680,7 +707,7 @@ async function Ke(e) {
680
707
  }
681
708
  );
682
709
  }
683
- async function He(e) {
710
+ async function Ke(e) {
684
711
  if (e.type === "key" && "key" in e) {
685
712
  const { key: r, type: s, ...a } = e;
686
713
  return y.hiveClient.broadcast.sendOperations(
@@ -727,7 +754,7 @@ function ae(e) {
727
754
  return;
728
755
  }
729
756
  }
730
- function Ot(e, t) {
757
+ function At(e, t) {
731
758
  const { data: n } = N(b(e)), r = M();
732
759
  return ce(
733
760
  ["assets", "hive", "claim-rewards", n == null ? void 0 : n.name],
@@ -911,14 +938,14 @@ function Ee(e) {
911
938
  refetchInterval: 9e4,
912
939
  queryFn: async () => {
913
940
  await i().prefetchQuery(D(e)), await i().prefetchQuery(Q()), await i().prefetchQuery(
914
- O(e)
941
+ S(e)
915
942
  );
916
943
  const t = i().getQueryData(
917
944
  D(e).queryKey
918
945
  ), n = i().getQueryData(
919
946
  Q().queryKey
920
947
  ), r = i().getQueryData(
921
- O(e).queryKey
948
+ S(e).queryKey
922
949
  );
923
950
  if (!t || !n)
924
951
  return {
@@ -950,14 +977,14 @@ function Re(e) {
950
977
  refetchInterval: 9e4,
951
978
  queryFn: async () => {
952
979
  await i().prefetchQuery(D(e)), await i().prefetchQuery(Q()), await i().prefetchQuery(
953
- O(e)
980
+ S(e)
954
981
  );
955
982
  const t = i().getQueryData(
956
983
  D(e).queryKey
957
984
  ), n = i().getQueryData(
958
985
  Q().queryKey
959
986
  ), r = i().getQueryData(
960
- O(e).queryKey
987
+ S(e).queryKey
961
988
  );
962
989
  if (!t || !n)
963
990
  return {
@@ -969,7 +996,7 @@ function Re(e) {
969
996
  const s = +j(
970
997
  (t.gov + t.spk) / 1e3 * +t.tick * ((r == null ? void 0 : r.price) ?? 0)
971
998
  ), a = +j(
972
- (t.spk + Se(
999
+ (t.spk + Oe(
973
1000
  t,
974
1001
  n.raw.stats || {
975
1002
  spk_rate_lgov: "0.001",
@@ -1002,14 +1029,14 @@ function Ie(e) {
1002
1029
  queryFn: async () => {
1003
1030
  var o, c;
1004
1031
  await i().prefetchQuery(D(e)), await i().prefetchQuery(Q()), await i().prefetchQuery(
1005
- O(e)
1032
+ S(e)
1006
1033
  );
1007
1034
  const t = i().getQueryData(
1008
1035
  D(e).queryKey
1009
1036
  ), n = i().getQueryData(
1010
1037
  Q().queryKey
1011
1038
  ), r = i().getQueryData(
1012
- O(e).queryKey
1039
+ S(e).queryKey
1013
1040
  );
1014
1041
  if (!t || !n)
1015
1042
  return {
@@ -1154,7 +1181,7 @@ function Fe(e, t) {
1154
1181
  throw new Error(
1155
1182
  "[SDK][Wallets] – hive engine token or username missed"
1156
1183
  );
1157
- const n = O(e);
1184
+ const n = S(e);
1158
1185
  await i().prefetchQuery(n);
1159
1186
  const r = i().getQueryData(
1160
1187
  n.queryKey
@@ -1164,7 +1191,7 @@ function Fe(e, t) {
1164
1191
  await i().prefetchQuery(o);
1165
1192
  const c = i().getQueryData(o.queryKey), l = je();
1166
1193
  await i().prefetchQuery(l);
1167
- const w = i().getQueryData(l.queryKey), _ = a == null ? void 0 : a.find((S) => S.symbol === t), v = c == null ? void 0 : c.find((S) => S.symbol === t), P = w == null ? void 0 : w.find((S) => S.symbol === t), k = +((P == null ? void 0 : P.lastPrice) ?? "0");
1194
+ const w = i().getQueryData(l.queryKey), _ = a == null ? void 0 : a.find((O) => O.symbol === t), v = c == null ? void 0 : c.find((O) => O.symbol === t), P = w == null ? void 0 : w.find((O) => O.symbol === t), k = +((P == null ? void 0 : P.lastPrice) ?? "0");
1168
1195
  return {
1169
1196
  name: t,
1170
1197
  title: (_ == null ? void 0 : _.name) ?? "",
@@ -1175,7 +1202,7 @@ function Fe(e, t) {
1175
1202
  }
1176
1203
  });
1177
1204
  }
1178
- function Tt(e, t, n = 20) {
1205
+ function Nt(e, t, n = 20) {
1179
1206
  return R({
1180
1207
  queryKey: ["assets", "hive-engine", t, "transactions", e],
1181
1208
  enabled: !!t && !!e,
@@ -1196,7 +1223,7 @@ function Tt(e, t, n = 20) {
1196
1223
  }
1197
1224
  });
1198
1225
  }
1199
- function At(e, t = "daily") {
1226
+ function Ht(e, t = "daily") {
1200
1227
  return h({
1201
1228
  queryKey: ["assets", "hive-engine", e],
1202
1229
  staleTime: 6e4,
@@ -1400,7 +1427,7 @@ async function Me(e) {
1400
1427
  }
1401
1428
  );
1402
1429
  }
1403
- async function Je(e) {
1430
+ async function $e(e) {
1404
1431
  const n = p(e.amount).amount.toString();
1405
1432
  if (e.type === "key" && "key" in e) {
1406
1433
  const { key: r, type: s, ...a } = e, o = {
@@ -1463,7 +1490,7 @@ async function Je(e) {
1463
1490
  }
1464
1491
  );
1465
1492
  }
1466
- async function $e(e) {
1493
+ async function Je(e) {
1467
1494
  const n = p(e.amount).amount.toString();
1468
1495
  if (e.type === "key" && "key" in e) {
1469
1496
  const { key: r, type: s, ...a } = e, o = {
@@ -1529,7 +1556,7 @@ async function $e(e) {
1529
1556
  }
1530
1557
  );
1531
1558
  }
1532
- function $(e) {
1559
+ function J(e) {
1533
1560
  return h({
1534
1561
  queryKey: ["assets", "points", e],
1535
1562
  queryFn: async () => {
@@ -1564,9 +1591,9 @@ function xe(e) {
1564
1591
  staleTime: 6e4,
1565
1592
  refetchInterval: 9e4,
1566
1593
  queryFn: async () => {
1567
- await i().prefetchQuery($(e));
1594
+ await i().prefetchQuery(J(e));
1568
1595
  const t = i().getQueryData(
1569
- $(e).queryKey
1596
+ J(e).queryKey
1570
1597
  );
1571
1598
  return {
1572
1599
  name: "POINTS",
@@ -1577,7 +1604,7 @@ function xe(e) {
1577
1604
  }
1578
1605
  });
1579
1606
  }
1580
- function Nt(e, t) {
1607
+ function Kt(e, t) {
1581
1608
  return h({
1582
1609
  queryKey: ["assets", "points", "transactions", e, t],
1583
1610
  queryFn: async () => (await (await fetch(
@@ -1602,12 +1629,12 @@ function Nt(e, t) {
1602
1629
  }))
1603
1630
  });
1604
1631
  }
1605
- function Kt(e, t, n) {
1632
+ function Qt(e, t, n) {
1606
1633
  const { mutateAsync: r } = X.useRecordActivity(
1607
1634
  e,
1608
1635
  "points-claimed"
1609
1636
  );
1610
- return K({
1637
+ return H({
1611
1638
  mutationFn: async () => {
1612
1639
  if (!e)
1613
1640
  throw new Error(
@@ -1624,7 +1651,7 @@ function Kt(e, t, n) {
1624
1651
  onError: n,
1625
1652
  onSuccess: () => {
1626
1653
  r(), y.queryClient.setQueryData(
1627
- $(e).queryKey,
1654
+ J(e).queryKey,
1628
1655
  (s) => s && {
1629
1656
  points: (parseFloat(s.points) + parseFloat(s.uPoints)).toFixed(3),
1630
1657
  uPoints: "0"
@@ -1667,7 +1694,7 @@ async function Ue({
1667
1694
  );
1668
1695
  }
1669
1696
  var Ve = /* @__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))(Ve || {});
1670
- function Ht(e) {
1697
+ function Dt(e) {
1671
1698
  return h({
1672
1699
  queryKey: ["ecency-wallets", "all-tokens-list", e],
1673
1700
  queryFn: async () => {
@@ -1732,7 +1759,7 @@ function We(e, t, n = { refetch: !1 }) {
1732
1759
  queryKey: ["ecency-wallets", "asset-info", e, t],
1733
1760
  queryFn: async () => {
1734
1761
  if (t === "HIVE")
1735
- return r(O(e));
1762
+ return r(S(e));
1736
1763
  if (t === "HP")
1737
1764
  return r(ne(e));
1738
1765
  if (t === "HBD")
@@ -1755,7 +1782,7 @@ function We(e, t, n = { refetch: !1 }) {
1755
1782
  }
1756
1783
  });
1757
1784
  }
1758
- function Qt(e, t, n = !1) {
1785
+ function Ct(e, t, n = !1) {
1759
1786
  return h({
1760
1787
  queryKey: ["wallets", "token-operations", e, t, n],
1761
1788
  queryFn: async () => {
@@ -1836,8 +1863,8 @@ const Ye = {
1836
1863
  [f.ATOM]: "m/44'/118'/0'/0/0"
1837
1864
  // Cosmos (BIP44)
1838
1865
  };
1839
- function Dt(e, t) {
1840
- const { data: n } = z(e), r = M(), s = K({
1866
+ function Et(e, t) {
1867
+ const { data: n } = z(e), r = M(), s = H({
1841
1868
  mutationKey: ["ecency-wallets", "create-wallet", e, t],
1842
1869
  mutationFn: async () => {
1843
1870
  if (!n)
@@ -1878,7 +1905,7 @@ function Xe(e) {
1878
1905
  const { data: t } = N({
1879
1906
  queryKey: ["ecency-wallets", "wallets", e]
1880
1907
  }), { data: n } = qe(e);
1881
- return K({
1908
+ return H({
1882
1909
  mutationKey: ["ecency-wallets", "create-account-with-wallets", e],
1883
1910
  mutationFn: ({ currency: r, address: s }) => fetch(y.privateApiHost + "/private-api/wallets-add", {
1884
1911
  method: "POST",
@@ -1907,7 +1934,7 @@ function Xe(e) {
1907
1934
  });
1908
1935
  }
1909
1936
  function oe() {
1910
- return K({
1937
+ return H({
1911
1938
  mutationKey: ["ecency-wallets", "check-wallet-existence"],
1912
1939
  mutationFn: async ({ address: e, currency: t }) => (await (await fetch(
1913
1940
  y.privateApiHost + "/private-api/wallets-exist",
@@ -1924,7 +1951,7 @@ function oe() {
1924
1951
  )).json()).length === 0
1925
1952
  });
1926
1953
  }
1927
- const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1954
+ const Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1928
1955
  __proto__: null,
1929
1956
  useCheckWalletExistence: oe,
1930
1957
  useCreateAccountWithWallets: Xe
@@ -1955,9 +1982,9 @@ async function Ze(e, t, n) {
1955
1982
  }
1956
1983
  return [];
1957
1984
  }
1958
- function Et(e, t) {
1985
+ function It(e, t) {
1959
1986
  const n = M(), { mutateAsync: r } = oe();
1960
- return K({
1987
+ return H({
1961
1988
  mutationKey: ["ecency-wallets", "import-wallet", e, t],
1962
1989
  mutationFn: async ({ privateKeyOrSeed: s }) => {
1963
1990
  const a = ae(t);
@@ -2012,9 +2039,9 @@ function Y(e, t = !1) {
2012
2039
  A.groupByProp("symbol")
2013
2040
  ) : {};
2014
2041
  }
2015
- function Rt(e) {
2042
+ function jt(e) {
2016
2043
  const t = M(), { data: n } = N(b(e)), { mutateAsync: r } = le(e);
2017
- return K({
2044
+ return H({
2018
2045
  mutationKey: ["ecency-wallets", "save-wallet-to-metadata", n],
2019
2046
  mutationFn: async (s) => {
2020
2047
  var _;
@@ -2056,9 +2083,9 @@ const et = {
2056
2083
  [u.TransferToSavings]: G
2057
2084
  },
2058
2085
  HP: {
2059
- [u.PowerDown]: Ke,
2086
+ [u.PowerDown]: He,
2060
2087
  [u.Delegate]: Ne,
2061
- [u.WithdrawRoutes]: He
2088
+ [u.WithdrawRoutes]: Ke
2062
2089
  },
2063
2090
  POINTS: {
2064
2091
  [u.Gift]: Ue
@@ -2071,18 +2098,18 @@ const et = {
2071
2098
  [u.PowerUp]: Ce
2072
2099
  }
2073
2100
  }, tt = {
2074
- [u.Transfer]: $e,
2101
+ [u.Transfer]: Je,
2075
2102
  [u.Stake]: Me,
2076
- [u.Unstake]: Je,
2103
+ [u.Unstake]: $e,
2077
2104
  [u.Delegate]: Le,
2078
2105
  [u.Undelegate]: Be
2079
2106
  };
2080
- function It(e, t, n) {
2107
+ function Ft(e, t, n) {
2081
2108
  const { mutateAsync: r } = X.useRecordActivity(
2082
2109
  e,
2083
2110
  n
2084
2111
  );
2085
- return K({
2112
+ return H({
2086
2113
  mutationKey: ["ecency-wallets", t, n],
2087
2114
  mutationFn: async (s) => {
2088
2115
  const a = et[t][n];
@@ -2118,7 +2145,7 @@ export {
2118
2145
  u as AssetOperation,
2119
2146
  g as EcencyWalletBasicTokens,
2120
2147
  f as EcencyWalletCurrency,
2121
- Ct as EcencyWalletsPrivateApi,
2148
+ Rt as EcencyWalletsPrivateApi,
2122
2149
  te as NaiMap,
2123
2150
  Ve as PointTransactionType,
2124
2151
  ee as Symbol,
@@ -2126,54 +2153,56 @@ export {
2126
2153
  Ne as delegateHive,
2127
2154
  We as getAccountWalletAssetInfoQueryOptions,
2128
2155
  Ge as getAccountWalletListQueryOptions,
2129
- Ht as getAllTokensListQueryOptions,
2156
+ Dt as getAllTokensListQueryOptions,
2130
2157
  Te as getHbdAssetGeneralInfoQueryOptions,
2131
2158
  Pt as getHbdAssetTransactionsQueryOptions,
2132
- O as getHiveAssetGeneralInfoQueryOptions,
2159
+ S as getHiveAssetGeneralInfoQueryOptions,
2133
2160
  qt as getHiveAssetMetricQueryOptions,
2134
2161
  re as getHiveAssetTransactionsQueryOptions,
2135
- St as getHiveAssetWithdrawalRoutesQueryOptions,
2162
+ Ot as getHiveAssetWithdrawalRoutesQueryOptions,
2136
2163
  Fe as getHiveEngineTokenGeneralInfoQueryOptions,
2137
- Tt as getHiveEngineTokenTransactionsQueryOptions,
2164
+ Nt as getHiveEngineTokenTransactionsQueryOptions,
2138
2165
  U as getHiveEngineTokensBalancesQueryOptions,
2139
2166
  je as getHiveEngineTokensMarketQueryOptions,
2140
2167
  L as getHiveEngineTokensMetadataQueryOptions,
2141
- At as getHiveEngineTokensMetricsQueryOptions,
2168
+ Ht as getHiveEngineTokensMetricsQueryOptions,
2142
2169
  ne as getHivePowerAssetGeneralInfoQueryOptions,
2143
2170
  bt as getHivePowerAssetTransactionsQueryOptions,
2171
+ St as getHivePowerDelegatesInfiniteQueryOptions,
2172
+ Tt as getHivePowerDelegatingsQueryOptions,
2144
2173
  Ee as getLarynxAssetGeneralInfoQueryOptions,
2145
2174
  Ie as getLarynxPowerAssetGeneralInfoQueryOptions,
2146
2175
  xe as getPointsAssetGeneralInfoQueryOptions,
2147
- Nt as getPointsAssetTransactionsQueryOptions,
2148
- $ as getPointsQueryOptions,
2176
+ Kt as getPointsAssetTransactionsQueryOptions,
2177
+ J as getPointsQueryOptions,
2149
2178
  Re as getSpkAssetGeneralInfoQueryOptions,
2150
2179
  Q as getSpkMarketsQueryOptions,
2151
- Qt as getTokenOperationsQueryOptions,
2180
+ Ct as getTokenOperationsQueryOptions,
2152
2181
  kt as isEmptyDate,
2153
2182
  De as lockLarynx,
2154
2183
  p as parseAsset,
2155
- Ke as powerDownHive,
2184
+ He as powerDownHive,
2156
2185
  Ae as powerUpHive,
2157
2186
  Ce as powerUpLarynx,
2158
- Se as rewardSpk,
2187
+ Oe as rewardSpk,
2159
2188
  Me as stakeEngineToken,
2160
- $e as transferEngineToken,
2189
+ Je as transferEngineToken,
2161
2190
  V as transferHive,
2162
2191
  Ue as transferPoint,
2163
2192
  Qe as transferSpk,
2164
2193
  G as transferToSavingsHive,
2165
2194
  Be as undelegateEngineToken,
2166
- Je as unstakeEngineToken,
2167
- Kt as useClaimPoints,
2168
- Ot as useClaimRewards,
2195
+ $e as unstakeEngineToken,
2196
+ Qt as useClaimPoints,
2197
+ At as useClaimRewards,
2169
2198
  vt as useCoinGeckoPriceQuery,
2170
2199
  _t as useGetExternalWalletBalanceQuery,
2171
2200
  qe as useHiveKeysQuery,
2172
- Et as useImportWallet,
2173
- Rt as useSaveWalletInformationToMetadata,
2201
+ It as useImportWallet,
2202
+ jt as useSaveWalletInformationToMetadata,
2174
2203
  z as useSeedPhrase,
2175
- Dt as useWalletCreate,
2176
- It as useWalletOperation,
2177
- J as vestsToHp,
2178
- He as withdrawVestingRouteHive
2204
+ Et as useWalletCreate,
2205
+ Ft as useWalletOperation,
2206
+ $ as vestsToHp,
2207
+ Ke as withdrawVestingRouteHive
2179
2208
  };
@@ -0,0 +1,9 @@
1
+ import { DelegatedVestingShare } from '../types';
2
+ export declare function getHivePowerDelegatesInfiniteQueryOptions(username: string, limit?: number): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<DelegatedVestingShare[], Error, DelegatedVestingShare[], string[]>, "queryFn"> & {
3
+ queryFn?: import('@tanstack/query-core').QueryFunction<DelegatedVestingShare[], string[], never> | undefined;
4
+ } & {
5
+ queryKey: string[] & {
6
+ [dataTagSymbol]: DelegatedVestingShare[];
7
+ [dataTagErrorSymbol]: Error;
8
+ };
9
+ };
@@ -0,0 +1,9 @@
1
+ import { ReceivedVestingShare } from '../types';
2
+ export declare function getHivePowerDelegatingsQueryOptions(username: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<ReceivedVestingShare[], Error, ReceivedVestingShare[], string[]>, "queryFn"> & {
3
+ queryFn?: import('@tanstack/query-core').QueryFunction<ReceivedVestingShare[], string[], never> | undefined;
4
+ } & {
5
+ queryKey: string[] & {
6
+ [dataTagSymbol]: ReceivedVestingShare[];
7
+ [dataTagErrorSymbol]: Error;
8
+ };
9
+ };
@@ -6,3 +6,5 @@ export * from './get-hive-power-asset-transactions-query-options';
6
6
  export * from './get-hbd-asset-transactions-query-options';
7
7
  export * from './get-hive-asset-metric-query-options';
8
8
  export * from './get-hive-asset-withdrawal-routes-query-options.ts';
9
+ export * from './get-hive-power-delegates-query-options.ts';
10
+ export * from './get-hive-power-delegatings-query-options.ts';
@@ -0,0 +1,7 @@
1
+ export interface DelegatedVestingShare {
2
+ id: number;
3
+ delegatee: string;
4
+ delegator: string;
5
+ min_delegation_time: string;
6
+ vesting_shares: string;
7
+ }
@@ -1,4 +1,6 @@
1
1
  export * from './hive-operation-group';
2
2
  export * from './hive-transaction';
3
3
  export * from './hive-market-metric';
4
- export * from './hive-withdraw-route.ts';
4
+ export * from './hive-withdraw-route';
5
+ export * from './delegated-vesting-share';
6
+ export * from './received-vesting-share';
@@ -0,0 +1,6 @@
1
+ export interface ReceivedVestingShare {
2
+ delegatee: string;
3
+ delegator: string;
4
+ timestamp: string;
5
+ vesting_shares: string;
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ecency/wallets",
3
3
  "private": false,
4
- "version": "1.3.5",
4
+ "version": "1.3.6",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "./dist/ecency-sdk.umd.js",