@ecency/sdk 1.0.36 → 1.0.38

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,12 +1,12 @@
1
- var b = Object.defineProperty;
2
- var Q = (e, t, n) => t in e ? b(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var w = (e, t, n) => Q(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { QueryClient as C, useMutation as l, useQuery as K, useInfiniteQuery as S, queryOptions as y, infiniteQueryOptions as _ } from "@tanstack/react-query";
5
- import { Client as k, PrivateKey as h, cryptoUtils as T } from "@hiveio/dhive";
6
- import g from "hivesigner";
7
- class j {
1
+ var K = Object.defineProperty;
2
+ var b = (e, t, n) => t in e ? K(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var m = (e, t, n) => b(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { QueryClient as q, useMutation as p, useQuery as Q, useInfiniteQuery as _, queryOptions as c, infiniteQueryOptions as T } from "@tanstack/react-query";
5
+ import { Client as k, PrivateKey as h, cryptoUtils as j, RCAPI as A } from "@hiveio/dhive";
6
+ import w from "hivesigner";
7
+ class F {
8
8
  constructor() {
9
- w(this, "length", 0);
9
+ m(this, "length", 0);
10
10
  }
11
11
  clear() {
12
12
  throw new Error("Method not implemented.");
@@ -26,7 +26,7 @@ class j {
26
26
  }
27
27
  const o = {
28
28
  privateApiHost: "https://ecency.com",
29
- storage: typeof window > "u" ? new j() : window.localStorage,
29
+ storage: typeof window > "u" ? new F() : window.localStorage,
30
30
  storagePrefix: "ecency",
31
31
  hiveClient: new k(
32
32
  [
@@ -49,52 +49,52 @@ const o = {
49
49
  }
50
50
  ),
51
51
  heliusApiKey: void 0,
52
- queryClient: new C(),
52
+ queryClient: new q(),
53
53
  plausibleHost: "https://pl.ecency.com"
54
54
  };
55
- var v;
55
+ var O;
56
56
  ((e) => {
57
57
  function t(n) {
58
58
  o.queryClient = n;
59
59
  }
60
60
  e.setQueryClient = t;
61
- })(v || (v = {}));
62
- function A(e) {
61
+ })(O || (O = {}));
62
+ function D(e) {
63
63
  let t = atob(e);
64
64
  if (t[0] === "{")
65
65
  return JSON.parse(t);
66
66
  }
67
- const p = (e) => {
67
+ const l = (e) => {
68
68
  try {
69
69
  const t = o.storage.getItem(
70
70
  o.storagePrefix + "_user_" + e
71
71
  );
72
- return A(JSON.parse(t));
72
+ return D(JSON.parse(t));
73
73
  } catch (t) {
74
74
  console.error(t);
75
75
  return;
76
76
  }
77
- }, O = (e) => p(e) && p(e).accessToken, D = (e) => p(e) && p(e).postingKey, W = (e) => p(e) && p(e).refreshToken;
78
- function I(e = [], t, n) {
79
- return l({
77
+ }, f = (e) => l(e) && l(e).accessToken, I = (e) => l(e) && l(e).postingKey, $ = (e) => l(e) && l(e).refreshToken;
78
+ function P(e = [], t, n) {
79
+ return p({
80
80
  mutationKey: [...e, t],
81
81
  mutationFn: async (r) => {
82
82
  if (!t)
83
83
  throw new Error(
84
84
  "[Core][Broadcast] Attempted to call broadcast API with anon user"
85
85
  );
86
- const a = D(t);
86
+ const a = I(t);
87
87
  if (a) {
88
- const u = h.fromString(a);
88
+ const y = h.fromString(a);
89
89
  return o.hiveClient.broadcast.sendOperations(
90
90
  n(r),
91
- u
91
+ y
92
92
  );
93
93
  }
94
- let c = O(t);
95
- if (c)
96
- return (await new g.Client({
97
- accessToken: c
94
+ let u = f(t);
95
+ if (u)
96
+ return (await new w.Client({
97
+ accessToken: u
98
98
  }).broadcast(n(r))).result;
99
99
  throw new Error(
100
100
  "[SDK][Broadcast] – cannot broadcast w/o posting key or token"
@@ -102,8 +102,8 @@ function I(e = [], t, n) {
102
102
  }
103
103
  });
104
104
  }
105
- function $() {
106
- return new C({
105
+ function G() {
106
+ return new q({
107
107
  defaultOptions: {
108
108
  queries: {
109
109
  // With SSR, we usually want to set some default staleTime
@@ -116,7 +116,7 @@ function $() {
116
116
  });
117
117
  }
118
118
  const s = () => o.queryClient;
119
- var m;
119
+ var C;
120
120
  ((e) => {
121
121
  function t(i) {
122
122
  return s().getQueryData(i);
@@ -134,27 +134,27 @@ var m;
134
134
  return await s().prefetchInfiniteQuery(i), n(i.queryKey);
135
135
  }
136
136
  e.prefetchInfiniteQuery = a;
137
- function c(i) {
137
+ function u(i) {
138
138
  return {
139
139
  prefetch: () => r(i),
140
140
  getData: () => t(i.queryKey),
141
- useClientQuery: () => K(i),
141
+ useClientQuery: () => Q(i),
142
142
  fetchAndGet: () => s().fetchQuery(i)
143
143
  };
144
144
  }
145
- e.generateClientServerQuery = c;
146
- function u(i) {
145
+ e.generateClientServerQuery = u;
146
+ function y(i) {
147
147
  return {
148
148
  prefetch: () => a(i),
149
149
  getData: () => n(i.queryKey),
150
- useClientQuery: () => S(i),
150
+ useClientQuery: () => _(i),
151
151
  fetchAndGet: () => s().fetchInfiniteQuery(i)
152
152
  };
153
153
  }
154
- e.generateClientServerInfiniteQuery = u;
155
- })(m || (m = {}));
156
- function G(e) {
157
- return I(
154
+ e.generateClientServerInfiniteQuery = y;
155
+ })(C || (C = {}));
156
+ function V(e) {
157
+ return P(
158
158
  ["accounts", "update"],
159
159
  e,
160
160
  ({
@@ -176,8 +176,8 @@ function G(e) {
176
176
  ]
177
177
  );
178
178
  }
179
- function R(e) {
180
- return y({
179
+ function L(e) {
180
+ return c({
181
181
  queryKey: ["get-account-full", e],
182
182
  queryFn: async () => {
183
183
  if (!e)
@@ -213,8 +213,8 @@ function R(e) {
213
213
  staleTime: 6e4
214
214
  });
215
215
  }
216
- function V(e, t = 5, n = []) {
217
- return y({
216
+ function X(e, t = 5, n = []) {
217
+ return c({
218
218
  queryKey: ["accounts", "search", e, n],
219
219
  enabled: !!e,
220
220
  queryFn: async () => (await o.hiveClient.database.call(
@@ -225,8 +225,8 @@ function V(e, t = 5, n = []) {
225
225
  )
226
226
  });
227
227
  }
228
- function L(e) {
229
- return y({
228
+ function Y(e) {
229
+ return c({
230
230
  queryKey: ["accounts", "check-wallet-pending", e],
231
231
  queryFn: async () => await (await fetch(
232
232
  o.privateApiHost + "/private-api/wallets-chkuser",
@@ -244,8 +244,8 @@ function L(e) {
244
244
  refetchOnMount: !0
245
245
  });
246
246
  }
247
- function X(e) {
248
- return l({
247
+ function Z(e) {
248
+ return p({
249
249
  mutationKey: ["operations", "sign", e],
250
250
  mutationFn: ({
251
251
  operation: t,
@@ -254,14 +254,14 @@ function X(e) {
254
254
  if (!e)
255
255
  throw new Error("[Operations][Sign] – cannot sign op with anon user");
256
256
  let r;
257
- return n.split(" ").length === 12 ? r = h.fromLogin(e, n, "active") : T.isWif(n) ? r = h.fromString(n) : r = h.from(n), o.hiveClient.broadcast.sendOperations(
257
+ return n.split(" ").length === 12 ? r = h.fromLogin(e, n, "active") : j.isWif(n) ? r = h.fromString(n) : r = h.from(n), o.hiveClient.broadcast.sendOperations(
258
258
  [t],
259
259
  r
260
260
  );
261
261
  }
262
262
  });
263
263
  }
264
- function F() {
264
+ function N() {
265
265
  return new Promise((e) => {
266
266
  var t;
267
267
  (t = window.hive_keychain) == null || t.requestHandshake(() => {
@@ -269,43 +269,43 @@ function F() {
269
269
  });
270
270
  });
271
271
  }
272
- const q = (e, t, n, r = null) => new Promise((a, c) => {
273
- var u;
274
- (u = window.hive_keychain) == null || u.requestBroadcast(
272
+ const S = (e, t, n, r = null) => new Promise((a, u) => {
273
+ var y;
274
+ (y = window.hive_keychain) == null || y.requestBroadcast(
275
275
  e,
276
276
  t,
277
277
  n,
278
278
  (i) => {
279
- i.success || c({ message: "Operation cancelled" }), a(i);
279
+ i.success || u({ message: "Operation cancelled" }), a(i);
280
280
  },
281
281
  r
282
282
  );
283
- }), Y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
283
+ }), ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
284
284
  __proto__: null,
285
- broadcast: q,
286
- handshake: F
285
+ broadcast: S,
286
+ handshake: N
287
287
  }, Symbol.toStringTag, { value: "Module" }));
288
- function Z(e, t = "Active") {
289
- return l({
288
+ function te(e, t = "Active") {
289
+ return p({
290
290
  mutationKey: ["operations", "sign-keychain", e],
291
291
  mutationFn: ({ operation: n }) => {
292
292
  if (!e)
293
293
  throw new Error(
294
294
  "[SDK][Keychain] – cannot sign operation with anon user"
295
295
  );
296
- return q(e, [n], t);
296
+ return S(e, [n], t);
297
297
  }
298
298
  });
299
299
  }
300
- function ee(e = "/") {
301
- return l({
300
+ function ne(e = "/") {
301
+ return p({
302
302
  mutationKey: ["operations", "sign-hivesigner", e],
303
- mutationFn: async ({ operation: t }) => g.sendOperation(t, { callback: e }, () => {
303
+ mutationFn: async ({ operation: t }) => w.sendOperation(t, { callback: e }, () => {
304
304
  })
305
305
  });
306
306
  }
307
- function te(e, t) {
308
- return y({
307
+ function re(e, t) {
308
+ return c({
309
309
  queryKey: ["hive-engine", "tokens-list", e, t],
310
310
  queryFn: async () => (await (await fetch(
311
311
  `${o.privateApiHost}/private-api/engine-api`,
@@ -329,8 +329,8 @@ function te(e, t) {
329
329
  )).json()).result
330
330
  });
331
331
  }
332
- function ne(e = 20) {
333
- return _({
332
+ function ie(e = 20) {
333
+ return T({
334
334
  queryKey: ["posts", "trending-tags"],
335
335
  queryFn: async ({ pageParam: { afterTag: t } }) => o.hiveClient.database.call("get_trending_tags", [t, e]).then(
336
336
  (n) => n.filter((r) => r.name !== "").filter((r) => !r.name.startsWith("hive-")).map((r) => r.name)
@@ -343,8 +343,103 @@ function ne(e = 20) {
343
343
  refetchOnMount: !0
344
344
  });
345
345
  }
346
- function P(e, t) {
347
- return l({
346
+ function v(e) {
347
+ return c({
348
+ queryKey: ["posts", "fragments", e],
349
+ queryFn: async () => (await fetch(
350
+ o.privateApiHost + "/private-api/fragments",
351
+ {
352
+ method: "POST",
353
+ body: JSON.stringify({
354
+ code: f(e)
355
+ }),
356
+ headers: {
357
+ "Content-Type": "application/json"
358
+ }
359
+ }
360
+ )).json(),
361
+ enabled: !!e
362
+ });
363
+ }
364
+ function oe(e) {
365
+ return p({
366
+ mutationKey: ["posts", "add-fragment", e],
367
+ mutationFn: async ({ title: t, body: n }) => (await fetch(
368
+ o.privateApiHost + "/private-api/fragments-add",
369
+ {
370
+ method: "POST",
371
+ body: JSON.stringify({
372
+ code: f(e),
373
+ title: t,
374
+ body: n
375
+ }),
376
+ headers: {
377
+ "Content-Type": "application/json"
378
+ }
379
+ }
380
+ )).json(),
381
+ onSuccess(t) {
382
+ s().setQueryData(
383
+ v(e).queryKey,
384
+ (n) => [t, ...n ?? []]
385
+ );
386
+ }
387
+ });
388
+ }
389
+ function ae(e, t) {
390
+ return p({
391
+ mutationKey: ["posts", "edit-fragment", e, t],
392
+ mutationFn: async ({ title: n, body: r }) => (await fetch(
393
+ o.privateApiHost + "/private-api/fragments-update",
394
+ {
395
+ method: "POST",
396
+ body: JSON.stringify({
397
+ code: f(e),
398
+ id: t,
399
+ title: n,
400
+ body: r
401
+ }),
402
+ headers: {
403
+ "Content-Type": "application/json"
404
+ }
405
+ }
406
+ )).json(),
407
+ onSuccess(n) {
408
+ s().setQueryData(
409
+ v(e).queryKey,
410
+ (r) => {
411
+ if (!r)
412
+ return [];
413
+ const a = r.findIndex(({ id: u }) => u === t);
414
+ return a >= 0 && (r[a] = n), [...r];
415
+ }
416
+ );
417
+ }
418
+ });
419
+ }
420
+ function se(e, t) {
421
+ return p({
422
+ mutationKey: ["posts", "remove-fragment", e],
423
+ mutationFn: async () => fetch(o.privateApiHost + "/private-api/fragments-delete", {
424
+ method: "POST",
425
+ body: JSON.stringify({
426
+ code: f(e),
427
+ id: t
428
+ }),
429
+ headers: {
430
+ "Content-Type": "application/json"
431
+ }
432
+ }),
433
+ onSuccess() {
434
+ s().setQueryData(
435
+ v(e).queryKey,
436
+ (n) => [...n ?? []].filter(({ id: r }) => r !== t)
437
+ );
438
+ }
439
+ });
440
+ }
441
+ function H(e, t) {
442
+ return p({
348
443
  mutationKey: ["analytics", t],
349
444
  mutationFn: async () => {
350
445
  if (!t)
@@ -366,30 +461,30 @@ function P(e, t) {
366
461
  }
367
462
  });
368
463
  }
369
- const re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
464
+ const ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
370
465
  __proto__: null,
371
- useRecordActivity: P
466
+ useRecordActivity: H
372
467
  }, Symbol.toStringTag, { value: "Module" }));
373
- function M(e, t) {
374
- return y({
468
+ function J(e, t) {
469
+ return c({
375
470
  queryKey: ["integrations", "hivesigner", "decode-memo", e],
376
471
  queryFn: async () => {
377
- const n = O(e);
472
+ const n = f(e);
378
473
  if (n)
379
- return new g.Client({
474
+ return new w.Client({
380
475
  accessToken: n
381
476
  }).decode(t);
382
477
  }
383
478
  });
384
479
  }
385
- const N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
480
+ const M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
386
481
  __proto__: null,
387
- getDecodeMemoQueryOptions: M
482
+ getDecodeMemoQueryOptions: J
388
483
  }, Symbol.toStringTag, { value: "Module" })), B = {
389
- queries: N
484
+ queries: M
390
485
  };
391
- function d(e) {
392
- return y({
486
+ function g(e) {
487
+ return c({
393
488
  queryKey: ["integrations", "3speak", "authenticate", e],
394
489
  enabled: !!e,
395
490
  queryFn: async () => {
@@ -414,16 +509,16 @@ function d(e) {
414
509
  }
415
510
  });
416
511
  }
417
- function H(e) {
418
- return y({
512
+ function x(e) {
513
+ return c({
419
514
  queryKey: ["integrations", "3speak", "videos", e],
420
515
  enabled: !!e,
421
516
  queryFn: async () => {
422
517
  await s().prefetchQuery(
423
- d(e)
518
+ g(e)
424
519
  );
425
520
  const t = s().getQueryData(
426
- d(e).queryKey
521
+ g(e).queryKey
427
522
  );
428
523
  return await (await fetch(
429
524
  "https://studio.3speak.tv/mobile/api/my-videos",
@@ -439,33 +534,56 @@ function H(e) {
439
534
  }
440
535
  const E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
441
536
  __proto__: null,
442
- getAccountTokenQueryOptions: d,
443
- getAccountVideosQueryOptions: H
444
- }, Symbol.toStringTag, { value: "Module" })), ie = {
537
+ getAccountTokenQueryOptions: g,
538
+ getAccountVideosQueryOptions: x
539
+ }, Symbol.toStringTag, { value: "Module" })), ue = {
445
540
  queries: E
446
541
  };
542
+ function pe() {
543
+ return c({
544
+ queryKey: ["resource-credits", "stats"],
545
+ queryFn: async () => (await o.hiveClient.call(
546
+ "rc_api",
547
+ "get_rc_stats",
548
+ {}
549
+ )).rc_stats
550
+ });
551
+ }
552
+ function ye(e) {
553
+ return c({
554
+ queryKey: ["resource-credits", "account", e],
555
+ queryFn: async () => new A(o.hiveClient).findRCAccounts([e]),
556
+ enabled: !!e
557
+ });
558
+ }
447
559
  export {
448
560
  o as CONFIG,
449
- v as ConfigManager,
450
- re as EcencyAnalytics,
451
- m as EcencyQueriesManager,
561
+ O as ConfigManager,
562
+ ce as EcencyAnalytics,
563
+ C as EcencyQueriesManager,
452
564
  B as HiveSignerIntegration,
453
- Y as Keychain,
454
- ie as ThreeSpeakIntegration,
455
- L as checkUsernameWalletsPendingQueryOptions,
456
- O as getAccessToken,
457
- R as getAccountFullQueryOptions,
458
- te as getHiveEngineTokensListQueryOptions,
459
- D as getPostingKey,
565
+ ee as Keychain,
566
+ ue as ThreeSpeakIntegration,
567
+ Y as checkUsernameWalletsPendingQueryOptions,
568
+ f as getAccessToken,
569
+ L as getAccountFullQueryOptions,
570
+ ye as getAccountRcQueryOptions,
571
+ v as getFragmentsQueryOptions,
572
+ re as getHiveEngineTokensListQueryOptions,
573
+ I as getPostingKey,
460
574
  s as getQueryClient,
461
- W as getRefreshToken,
462
- V as getSearchAccountsByUsernameQueryOptions,
463
- ne as getTrendingTagsQueryOptions,
464
- p as getUser,
465
- $ as makeQueryClient,
466
- G as useAccountUpdate,
467
- I as useBroadcastMutation,
468
- ee as useSignOperationByHivesigner,
469
- X as useSignOperationByKey,
470
- Z as useSignOperationByKeychain
575
+ pe as getRcStatsQueryOptions,
576
+ $ as getRefreshToken,
577
+ X as getSearchAccountsByUsernameQueryOptions,
578
+ ie as getTrendingTagsQueryOptions,
579
+ l as getUser,
580
+ G as makeQueryClient,
581
+ V as useAccountUpdate,
582
+ oe as useAddFragment,
583
+ P as useBroadcastMutation,
584
+ ae as useEditFragment,
585
+ se as useRemoveFragment,
586
+ ne as useSignOperationByHivesigner,
587
+ Z as useSignOperationByKey,
588
+ te as useSignOperationByKeychain
471
589
  };
package/dist/index.d.ts CHANGED
@@ -6,3 +6,4 @@ export * from './modules/keychain';
6
6
  export * from './modules/posts';
7
7
  export * from './modules/analytics';
8
8
  export * from './modules/integrations';
9
+ export * from './modules/resource-credits';
@@ -1,2 +1,3 @@
1
1
  export * from './queries';
2
2
  export * from './types';
3
+ export * from './mutations';
@@ -0,0 +1,5 @@
1
+ import { Fragment } from '../types';
2
+ export declare function useAddFragment(username: string): import('@tanstack/react-query').UseMutationResult<Fragment, Error, {
3
+ title: string;
4
+ body: string;
5
+ }, unknown>;
@@ -0,0 +1,5 @@
1
+ import { Fragment } from '../types';
2
+ export declare function useEditFragment(username: string, fragmentId: string): import('@tanstack/react-query').UseMutationResult<Fragment, Error, {
3
+ title: string;
4
+ body: string;
5
+ }, unknown>;
@@ -0,0 +1,3 @@
1
+ export * from './add-fragment';
2
+ export * from './edit-fragment';
3
+ export * from './remove-fragment';
@@ -0,0 +1 @@
1
+ export declare function useRemoveFragment(username: string, fragmentId: string): import('@tanstack/react-query').UseMutationResult<Response, Error, void, unknown>;
@@ -0,0 +1,9 @@
1
+ import { Fragment } from '../types';
2
+ export declare function getFragmentsQueryOptions(username: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<Fragment[], Error, Fragment[], string[]>, "queryFn"> & {
3
+ queryFn?: import('@tanstack/query-core').QueryFunction<Fragment[], string[], never> | undefined;
4
+ } & {
5
+ queryKey: string[] & {
6
+ [dataTagSymbol]: Fragment[];
7
+ [dataTagErrorSymbol]: Error;
8
+ };
9
+ };
@@ -1 +1,2 @@
1
1
  export * from './get-trending-tags-query-options';
2
+ export * from './get-fragments-query-options';
@@ -0,0 +1,7 @@
1
+ export interface Fragment {
2
+ id: string;
3
+ title: string;
4
+ body: string;
5
+ created: string;
6
+ modified: string;
7
+ }
@@ -1 +1,2 @@
1
1
  export * from './trending-tag';
2
+ export * from './fragment';
@@ -0,0 +1,2 @@
1
+ export * from './queries';
2
+ export * from './types';
@@ -0,0 +1,8 @@
1
+ export declare function getAccountRcQueryOptions(username: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('@hiveio/dhive/lib/chain/rc').RCAccount[], Error, import('@hiveio/dhive/lib/chain/rc').RCAccount[], string[]>, "queryFn"> & {
2
+ queryFn?: import('@tanstack/query-core').QueryFunction<import('@hiveio/dhive/lib/chain/rc').RCAccount[], string[], never> | undefined;
3
+ } & {
4
+ queryKey: string[] & {
5
+ [dataTagSymbol]: import('@hiveio/dhive/lib/chain/rc').RCAccount[];
6
+ [dataTagErrorSymbol]: Error;
7
+ };
8
+ };
@@ -0,0 +1,8 @@
1
+ export declare function getRcStatsQueryOptions(): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<any, Error, any, string[]>, "queryFn"> & {
2
+ queryFn?: import('@tanstack/query-core').QueryFunction<any, string[], never> | undefined;
3
+ } & {
4
+ queryKey: string[] & {
5
+ [dataTagSymbol]: any;
6
+ [dataTagErrorSymbol]: Error;
7
+ };
8
+ };
@@ -0,0 +1,2 @@
1
+ export * from './get-rc-stats-query-options';
2
+ export * from './get-account-rc-query-options';
@@ -0,0 +1 @@
1
+ export * from './stats';
@@ -0,0 +1,67 @@
1
+ export interface RcStats {
2
+ block: number;
3
+ budget: number[];
4
+ comment: number;
5
+ ops: Ops;
6
+ payers: Payer[];
7
+ pool: number[];
8
+ regen: number;
9
+ share: number[];
10
+ stamp: string;
11
+ transfer: number;
12
+ vote: number;
13
+ }
14
+ interface Ops {
15
+ account_create_operation: OperationCost;
16
+ account_update2_operation: OperationCost;
17
+ account_update_operation: OperationCost;
18
+ account_witness_proxy_operation: OperationCost;
19
+ account_witness_vote_operation: OperationCost;
20
+ cancel_transfer_from_savings_operation: OperationCost;
21
+ change_recovery_account_operation: OperationCost;
22
+ claim_account_operation: OperationCost;
23
+ claim_reward_balance_operation: OperationCost;
24
+ collateralized_convert_operation: OperationCost;
25
+ comment_operation: OperationCost;
26
+ comment_options_operation: OperationCost;
27
+ convert_operation: OperationCost;
28
+ create_claimed_account_operation: OperationCost;
29
+ custom_json_operation: OperationCost;
30
+ delegate_vesting_shares_operation: OperationCost;
31
+ delete_comment_operation: OperationCost;
32
+ feed_publish_operation: OperationCost;
33
+ limit_order_cancel_operation: OperationCost;
34
+ limit_order_create_operation: OperationCost;
35
+ multiop: OperationCost;
36
+ recover_account_operation: OperationCost;
37
+ recurrent_transfer_operation: OperationCost;
38
+ request_account_recovery_operation: OperationCost;
39
+ set_withdraw_vesting_route_operation: OperationCost;
40
+ transfer_from_savings_operation: OperationCost;
41
+ transfer_operation: OperationCost;
42
+ transfer_to_savings_operation: OperationCost;
43
+ transfer_to_vesting_operation: OperationCost;
44
+ update_proposal_votes_operation: OperationCost;
45
+ vote_operation: OperationCost;
46
+ withdraw_vesting_operation: OperationCost;
47
+ witness_set_properties_operation: OperationCost;
48
+ witness_update_operation: OperationCost;
49
+ }
50
+ interface OperationCost {
51
+ avg_cost: number;
52
+ count: number;
53
+ }
54
+ export interface Payer {
55
+ cant_afford?: CantAfford;
56
+ count: number;
57
+ lt10?: number;
58
+ lt20?: number;
59
+ lt5?: number;
60
+ rank: number;
61
+ }
62
+ export interface CantAfford {
63
+ comment: number;
64
+ transfer: number;
65
+ vote: number;
66
+ }
67
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ecency/sdk",
3
3
  "private": false,
4
- "version": "1.0.36",
4
+ "version": "1.0.38",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "./dist/ecency-sdk.umd.js",