@ecency/sdk 1.1.15 → 1.1.16

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