@ecency/sdk 1.1.19 → 1.1.21

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,7 +1,7 @@
1
1
  var V = Object.defineProperty;
2
2
  var W = (e, t, n) => t in e ? V(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var T = (e, t, n) => W(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { QueryClient as F, useMutation as d, useQuery as k, useInfiniteQuery as z, queryOptions as p, useQueryClient as P, infiniteQueryOptions as $ } from "@tanstack/react-query";
4
+ import { QueryClient as F, useMutation as d, useQuery as S, useInfiniteQuery as z, queryOptions as p, useQueryClient as P, infiniteQueryOptions as $ } from "@tanstack/react-query";
5
5
  import { Client as R, PrivateKey as _, cryptoUtils as L, RCAPI as X } from "@hiveio/dhive";
6
6
  import K from "hivesigner";
7
7
  import * as f from "remeda";
@@ -50,10 +50,6 @@ const c = {
50
50
  }
51
51
  ),
52
52
  heliusApiKey: void 0,
53
- bitqueryApiUrl: "https://graphql.bitquery.io",
54
- bitqueryApiKey: void 0,
55
- chainstackApiUrl: "https://api.chainstack.com/v1",
56
- chainstackApiKey: void 0,
57
53
  queryClient: new F(),
58
54
  plausibleHost: "https://pl.ecency.com",
59
55
  spkNode: "https://spk.good-karma.xyz"
@@ -237,7 +233,7 @@ var Q;
237
233
  return {
238
234
  prefetch: () => o(i),
239
235
  getData: () => t(i.queryKey),
240
- useClientQuery: () => k(i),
236
+ useClientQuery: () => S(i),
241
237
  fetchAndGet: () => y().fetchQuery(i)
242
238
  };
243
239
  }
@@ -272,7 +268,7 @@ function we() {
272
268
  ), o = await c.hiveClient.database.call(
273
269
  "get_reward_fund",
274
270
  ["post"]
275
- ), r = m(e.total_vesting_fund_hive).amount / m(e.total_vesting_shares).amount * 1e6, a = m(t.current_median_history.base).amount, s = m(t.current_median_history.quote).amount, i = parseFloat(o.recent_claims), u = m(o.reward_balance).amount, h = e.hbd_print_rate, S = e.hbd_interest_rate, O = e.head_block_number, N = m(
271
+ ), r = m(e.total_vesting_fund_hive).amount / m(e.total_vesting_shares).amount * 1e6, a = m(t.current_median_history.base).amount, s = m(t.current_median_history.quote).amount, i = parseFloat(o.recent_claims), u = m(o.reward_balance).amount, h = e.hbd_print_rate, k = e.hbd_interest_rate, O = e.head_block_number, N = m(
276
272
  e.total_vesting_fund_hive
277
273
  ).amount, I = m(
278
274
  e.total_vesting_shares
@@ -284,7 +280,7 @@ function we() {
284
280
  fundRecentClaims: i,
285
281
  fundRewardBalance: u,
286
282
  hbdPrintRate: h,
287
- hbdInterestRate: S,
283
+ hbdInterestRate: k,
288
284
  headBlock: O,
289
285
  totalVestingFund: N,
290
286
  totalVestingShares: I,
@@ -382,7 +378,7 @@ function be(e, t = 5, n = []) {
382
378
  )
383
379
  });
384
380
  }
385
- function ke(e) {
381
+ function Se(e) {
386
382
  return p({
387
383
  queryKey: ["accounts", "check-wallet-pending", e],
388
384
  queryFn: async () => await (await fetch(
@@ -414,7 +410,7 @@ function re(e, t) {
414
410
  )
415
411
  });
416
412
  }
417
- function Se(e) {
413
+ function ke(e) {
418
414
  return p({
419
415
  queryKey: ["accounts", "subscriptions", e],
420
416
  enabled: !!e,
@@ -514,7 +510,7 @@ function D({
514
510
  return t && t.length > 0 && (o.tokens = t), o.tokens = ie(o.tokens), o;
515
511
  }
516
512
  function Ae(e) {
517
- const t = P(), { data: n } = k(b(e));
513
+ const t = P(), { data: n } = S(b(e));
518
514
  return ne(
519
515
  ["accounts", "update", n == null ? void 0 : n.name],
520
516
  e,
@@ -708,7 +704,7 @@ function se(e, t) {
708
704
  );
709
705
  }
710
706
  function ae(e, t) {
711
- const { data: n } = k(b(e));
707
+ const { data: n } = S(b(e));
712
708
  return d({
713
709
  mutationKey: ["accounts", "keys-update", e],
714
710
  mutationFn: async ({ keys: o, keepCurrent: r = !1, currentKey: a }) => {
@@ -721,7 +717,7 @@ function ae(e, t) {
721
717
  return u.key_auths = se(
722
718
  r ? u.key_auths : [],
723
719
  o.map(
724
- (h, S) => [h[i].createPublic().toString(), S + 1]
720
+ (h, k) => [h[i].createPublic().toString(), k + 1]
725
721
  )
726
722
  ), u;
727
723
  };
@@ -741,7 +737,7 @@ function ae(e, t) {
741
737
  });
742
738
  }
743
739
  function Pe(e, t) {
744
- const { data: n } = k(b(e)), { mutateAsync: o } = ae(e);
740
+ const { data: n } = S(b(e)), { mutateAsync: o } = ae(e);
745
741
  return d({
746
742
  mutationKey: ["accounts", "password-update", e],
747
743
  mutationFn: async ({
@@ -775,7 +771,7 @@ function Pe(e, t) {
775
771
  });
776
772
  }
777
773
  function Ee(e, t) {
778
- const n = P(), { data: o } = k(b(e));
774
+ const n = P(), { data: o } = S(b(e));
779
775
  return d({
780
776
  mutationKey: ["accounts", "revoke-posting", o == null ? void 0 : o.name],
781
777
  mutationFn: async ({ accountName: r, type: a, key: s }) => {
@@ -822,12 +818,12 @@ function Ee(e, t) {
822
818
  (i = t.onSuccess) == null || i.call(t, r, a, s), n.setQueryData(
823
819
  b(e).queryKey,
824
820
  (u) => {
825
- var h, S;
821
+ var h, k;
826
822
  return {
827
823
  ...u,
828
824
  posting: {
829
825
  ...u == null ? void 0 : u.posting,
830
- account_auths: ((S = (h = u == null ? void 0 : u.posting) == null ? void 0 : h.account_auths) == null ? void 0 : S.filter(
826
+ account_auths: ((k = (h = u == null ? void 0 : u.posting) == null ? void 0 : h.account_auths) == null ? void 0 : k.filter(
831
827
  ([O]) => O !== a.accountName
832
828
  )) ?? []
833
829
  }
@@ -838,7 +834,7 @@ function Ee(e, t) {
838
834
  });
839
835
  }
840
836
  function Be(e, t) {
841
- const { data: n } = k(b(e));
837
+ const { data: n } = S(b(e));
842
838
  return d({
843
839
  mutationKey: ["accounts", "recovery", n == null ? void 0 : n.name],
844
840
  mutationFn: async ({ accountName: o, type: r, key: a, email: s }) => {
@@ -893,7 +889,7 @@ function Be(e, t) {
893
889
  });
894
890
  }
895
891
  function He(e, t) {
896
- const { data: n } = k(b(e));
892
+ const { data: n } = S(b(e));
897
893
  return d({
898
894
  mutationKey: ["accounts", "revoke-key", n == null ? void 0 : n.name],
899
895
  mutationFn: async ({ currentKey: o, revokingKey: r }) => {
@@ -1386,14 +1382,14 @@ export {
1386
1382
  g as ROLES,
1387
1383
  $e as ThreeSpeakIntegration,
1388
1384
  oe as broadcastJson,
1389
- ke as checkUsernameWalletsPendingQueryOptions,
1385
+ Se as checkUsernameWalletsPendingQueryOptions,
1390
1386
  se as dedupeAndSortKeyAuths,
1391
1387
  l as getAccessToken,
1392
1388
  b as getAccountFullQueryOptions,
1393
1389
  qe as getAccountPendingRecoveryQueryOptions,
1394
1390
  Xe as getAccountRcQueryOptions,
1395
1391
  Oe as getAccountRecoveriesQueryOptions,
1396
- Se as getAccountSubscriptionsQueryOptions,
1392
+ ke as getAccountSubscriptionsQueryOptions,
1397
1393
  Ke as getActiveAccountBookmarksQueryOptions,
1398
1394
  Ce as getActiveAccountFavouritesQueryOptions,
1399
1395
  Ie as getChainPropertiesQueryOptions,
@@ -6,10 +6,6 @@ export declare const CONFIG: {
6
6
  storagePrefix: string;
7
7
  hiveClient: Client;
8
8
  heliusApiKey: any;
9
- bitqueryApiUrl: string;
10
- bitqueryApiKey: any;
11
- chainstackApiUrl: string;
12
- chainstackApiKey: any;
13
9
  queryClient: QueryClient;
14
10
  plausibleHost: string;
15
11
  spkNode: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ecency/sdk",
3
3
  "private": false,
4
- "version": "1.1.19",
4
+ "version": "1.1.21",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "./dist/ecency-sdk.umd.js",