@ecency/sdk 1.0.39 → 1.0.42

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 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";
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 v = (e, t, n) => Q(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { QueryClient as S, useMutation as p, useQuery as _, useInfiniteQuery as k, queryOptions as c, infiniteQueryOptions as T } from "@tanstack/react-query";
5
+ import { Client as j, PrivateKey as h, cryptoUtils as A, RCAPI as F } from "@hiveio/dhive";
6
6
  import w from "hivesigner";
7
- class F {
7
+ class D {
8
8
  constructor() {
9
- m(this, "length", 0);
9
+ v(this, "length", 0);
10
10
  }
11
11
  clear() {
12
12
  throw new Error("Method not implemented.");
@@ -24,11 +24,11 @@ class F {
24
24
  this[t] = n;
25
25
  }
26
26
  }
27
- const o = {
27
+ const i = {
28
28
  privateApiHost: "https://ecency.com",
29
- storage: typeof window > "u" ? new F() : window.localStorage,
29
+ storage: typeof window > "u" ? new D() : window.localStorage,
30
30
  storagePrefix: "ecency",
31
- hiveClient: new k(
31
+ hiveClient: new j(
32
32
  [
33
33
  "https://api.hive.blog",
34
34
  "https://api.deathwing.me",
@@ -49,33 +49,33 @@ const o = {
49
49
  }
50
50
  ),
51
51
  heliusApiKey: void 0,
52
- queryClient: new q(),
52
+ queryClient: new S(),
53
53
  plausibleHost: "https://pl.ecency.com"
54
54
  };
55
55
  var O;
56
56
  ((e) => {
57
57
  function t(n) {
58
- o.queryClient = n;
58
+ i.queryClient = n;
59
59
  }
60
60
  e.setQueryClient = t;
61
61
  })(O || (O = {}));
62
- function D(e) {
62
+ function P(e) {
63
63
  let t = atob(e);
64
64
  if (t[0] === "{")
65
65
  return JSON.parse(t);
66
66
  }
67
- const l = (e) => {
67
+ const f = (e) => {
68
68
  try {
69
- const t = o.storage.getItem(
70
- o.storagePrefix + "_user_" + e
69
+ const t = i.storage.getItem(
70
+ i.storagePrefix + "_user_" + e
71
71
  );
72
- return D(JSON.parse(t));
72
+ return P(JSON.parse(t));
73
73
  } catch (t) {
74
74
  console.error(t);
75
75
  return;
76
76
  }
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) {
77
+ }, y = (e) => f(e) && f(e).accessToken, I = (e) => f(e) && f(e).postingKey, W = (e) => f(e) && f(e).refreshToken;
78
+ function N(e = [], t, n) {
79
79
  return p({
80
80
  mutationKey: [...e, t],
81
81
  mutationFn: async (r) => {
@@ -85,13 +85,13 @@ function P(e = [], t, n) {
85
85
  );
86
86
  const a = I(t);
87
87
  if (a) {
88
- const y = h.fromString(a);
89
- return o.hiveClient.broadcast.sendOperations(
88
+ const l = h.fromString(a);
89
+ return i.hiveClient.broadcast.sendOperations(
90
90
  n(r),
91
- y
91
+ l
92
92
  );
93
93
  }
94
- let u = f(t);
94
+ let u = y(t);
95
95
  if (u)
96
96
  return (await new w.Client({
97
97
  accessToken: u
@@ -102,8 +102,8 @@ function P(e = [], t, n) {
102
102
  }
103
103
  });
104
104
  }
105
- function G() {
106
- return new q({
105
+ function $() {
106
+ return new S({
107
107
  defaultOptions: {
108
108
  queries: {
109
109
  // With SSR, we usually want to set some default staleTime
@@ -115,46 +115,46 @@ function G() {
115
115
  }
116
116
  });
117
117
  }
118
- const s = () => o.queryClient;
118
+ const s = () => i.queryClient;
119
119
  var C;
120
120
  ((e) => {
121
- function t(i) {
122
- return s().getQueryData(i);
121
+ function t(o) {
122
+ return s().getQueryData(o);
123
123
  }
124
124
  e.getQueryData = t;
125
- function n(i) {
126
- return s().getQueryData(i);
125
+ function n(o) {
126
+ return s().getQueryData(o);
127
127
  }
128
128
  e.getInfiniteQueryData = n;
129
- async function r(i) {
130
- return await s().prefetchQuery(i), t(i.queryKey);
129
+ async function r(o) {
130
+ return await s().prefetchQuery(o), t(o.queryKey);
131
131
  }
132
132
  e.prefetchQuery = r;
133
- async function a(i) {
134
- return await s().prefetchInfiniteQuery(i), n(i.queryKey);
133
+ async function a(o) {
134
+ return await s().prefetchInfiniteQuery(o), n(o.queryKey);
135
135
  }
136
136
  e.prefetchInfiniteQuery = a;
137
- function u(i) {
137
+ function u(o) {
138
138
  return {
139
- prefetch: () => r(i),
140
- getData: () => t(i.queryKey),
141
- useClientQuery: () => Q(i),
142
- fetchAndGet: () => s().fetchQuery(i)
139
+ prefetch: () => r(o),
140
+ getData: () => t(o.queryKey),
141
+ useClientQuery: () => _(o),
142
+ fetchAndGet: () => s().fetchQuery(o)
143
143
  };
144
144
  }
145
145
  e.generateClientServerQuery = u;
146
- function y(i) {
146
+ function l(o) {
147
147
  return {
148
- prefetch: () => a(i),
149
- getData: () => n(i.queryKey),
150
- useClientQuery: () => _(i),
151
- fetchAndGet: () => s().fetchInfiniteQuery(i)
148
+ prefetch: () => a(o),
149
+ getData: () => n(o.queryKey),
150
+ useClientQuery: () => k(o),
151
+ fetchAndGet: () => s().fetchInfiniteQuery(o)
152
152
  };
153
153
  }
154
- e.generateClientServerInfiniteQuery = y;
154
+ e.generateClientServerInfiniteQuery = l;
155
155
  })(C || (C = {}));
156
156
  function V(e) {
157
- return P(
157
+ return N(
158
158
  ["accounts", "update"],
159
159
  e,
160
160
  ({
@@ -182,19 +182,19 @@ function L(e) {
182
182
  queryFn: async () => {
183
183
  if (!e)
184
184
  throw new Error("[SDK] Username is empty");
185
- const t = await o.hiveClient.database.getAccounts([e]);
185
+ const t = await i.hiveClient.database.getAccounts([e]);
186
186
  if (!t[0])
187
187
  throw new Error("[SDK] No account with given username");
188
188
  const n = JSON.parse(t[0].posting_json_metadata).profile;
189
189
  let r;
190
190
  try {
191
- r = await o.hiveClient.database.call(
191
+ r = await i.hiveClient.database.call(
192
192
  "get_follow_count",
193
193
  [e]
194
194
  );
195
195
  } catch {
196
196
  }
197
- const a = await o.hiveClient.call(
197
+ const a = await i.hiveClient.call(
198
198
  "condenser_api",
199
199
  "get_account_reputations",
200
200
  [e, 1]
@@ -217,7 +217,7 @@ function X(e, t = 5, n = []) {
217
217
  return c({
218
218
  queryKey: ["accounts", "search", e, n],
219
219
  enabled: !!e,
220
- queryFn: async () => (await o.hiveClient.database.call(
220
+ queryFn: async () => (await i.hiveClient.database.call(
221
221
  "lookup_accounts",
222
222
  [e, t]
223
223
  )).filter(
@@ -229,7 +229,7 @@ function Y(e) {
229
229
  return c({
230
230
  queryKey: ["accounts", "check-wallet-pending", e],
231
231
  queryFn: async () => await (await fetch(
232
- o.privateApiHost + "/private-api/wallets-chkuser",
232
+ i.privateApiHost + "/private-api/wallets-chkuser",
233
233
  {
234
234
  method: "POST",
235
235
  headers: {
@@ -254,14 +254,14 @@ function Z(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") : j.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") : A.isWif(n) ? r = h.fromString(n) : r = h.from(n), i.hiveClient.broadcast.sendOperations(
258
258
  [t],
259
259
  r
260
260
  );
261
261
  }
262
262
  });
263
263
  }
264
- function N() {
264
+ function H() {
265
265
  return new Promise((e) => {
266
266
  var t;
267
267
  (t = window.hive_keychain) == null || t.requestHandshake(() => {
@@ -269,21 +269,21 @@ function N() {
269
269
  });
270
270
  });
271
271
  }
272
- const S = (e, t, n, r = null) => new Promise((a, u) => {
273
- var y;
274
- (y = window.hive_keychain) == null || y.requestBroadcast(
272
+ const q = (e, t, n, r = null) => new Promise((a, u) => {
273
+ var l;
274
+ (l = window.hive_keychain) == null || l.requestBroadcast(
275
275
  e,
276
276
  t,
277
277
  n,
278
- (i) => {
279
- i.success || u({ message: "Operation cancelled" }), a(i);
278
+ (o) => {
279
+ o.success || u({ message: "Operation cancelled" }), a(o);
280
280
  },
281
281
  r
282
282
  );
283
283
  }), ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
284
284
  __proto__: null,
285
- broadcast: S,
286
- handshake: N
285
+ broadcast: q,
286
+ handshake: H
287
287
  }, Symbol.toStringTag, { value: "Module" }));
288
288
  function te(e, t = "Active") {
289
289
  return p({
@@ -293,7 +293,7 @@ function te(e, t = "Active") {
293
293
  throw new Error(
294
294
  "[SDK][Keychain] – cannot sign operation with anon user"
295
295
  );
296
- return S(e, [n], t);
296
+ return q(e, [n], t);
297
297
  }
298
298
  });
299
299
  }
@@ -308,7 +308,7 @@ function re(e, t) {
308
308
  return c({
309
309
  queryKey: ["hive-engine", "tokens-list", e, t],
310
310
  queryFn: async () => (await (await fetch(
311
- `${o.privateApiHost}/private-api/engine-api`,
311
+ `${i.privateApiHost}/private-api/engine-api`,
312
312
  {
313
313
  method: "POST",
314
314
  body: JSON.stringify({
@@ -329,10 +329,10 @@ function re(e, t) {
329
329
  )).json()).result
330
330
  });
331
331
  }
332
- function ie(e = 20) {
332
+ function oe(e = 20) {
333
333
  return T({
334
334
  queryKey: ["posts", "trending-tags"],
335
- queryFn: async ({ pageParam: { afterTag: t } }) => o.hiveClient.database.call("get_trending_tags", [t, e]).then(
335
+ queryFn: async ({ pageParam: { afterTag: t } }) => i.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)
337
337
  ),
338
338
  initialPageParam: { afterTag: "" },
@@ -343,15 +343,15 @@ function ie(e = 20) {
343
343
  refetchOnMount: !0
344
344
  });
345
345
  }
346
- function v(e) {
346
+ function m(e) {
347
347
  return c({
348
348
  queryKey: ["posts", "fragments", e],
349
349
  queryFn: async () => (await fetch(
350
- o.privateApiHost + "/private-api/fragments",
350
+ i.privateApiHost + "/private-api/fragments",
351
351
  {
352
352
  method: "POST",
353
353
  body: JSON.stringify({
354
- code: f(e)
354
+ code: y(e)
355
355
  }),
356
356
  headers: {
357
357
  "Content-Type": "application/json"
@@ -361,15 +361,15 @@ function v(e) {
361
361
  enabled: !!e
362
362
  });
363
363
  }
364
- function oe(e) {
364
+ function ie(e) {
365
365
  return p({
366
366
  mutationKey: ["posts", "add-fragment", e],
367
367
  mutationFn: async ({ title: t, body: n }) => (await fetch(
368
- o.privateApiHost + "/private-api/fragments-add",
368
+ i.privateApiHost + "/private-api/fragments-add",
369
369
  {
370
370
  method: "POST",
371
371
  body: JSON.stringify({
372
- code: f(e),
372
+ code: y(e),
373
373
  title: t,
374
374
  body: n
375
375
  }),
@@ -380,7 +380,7 @@ function oe(e) {
380
380
  )).json(),
381
381
  onSuccess(t) {
382
382
  s().setQueryData(
383
- v(e).queryKey,
383
+ m(e).queryKey,
384
384
  (n) => [t, ...n ?? []]
385
385
  );
386
386
  }
@@ -390,11 +390,11 @@ function ae(e, t) {
390
390
  return p({
391
391
  mutationKey: ["posts", "edit-fragment", e, t],
392
392
  mutationFn: async ({ title: n, body: r }) => (await fetch(
393
- o.privateApiHost + "/private-api/fragments-update",
393
+ i.privateApiHost + "/private-api/fragments-update",
394
394
  {
395
395
  method: "POST",
396
396
  body: JSON.stringify({
397
- code: f(e),
397
+ code: y(e),
398
398
  id: t,
399
399
  title: n,
400
400
  body: r
@@ -406,7 +406,7 @@ function ae(e, t) {
406
406
  )).json(),
407
407
  onSuccess(n) {
408
408
  s().setQueryData(
409
- v(e).queryKey,
409
+ m(e).queryKey,
410
410
  (r) => {
411
411
  if (!r)
412
412
  return [];
@@ -420,10 +420,10 @@ function ae(e, t) {
420
420
  function se(e, t) {
421
421
  return p({
422
422
  mutationKey: ["posts", "remove-fragment", e],
423
- mutationFn: async () => fetch(o.privateApiHost + "/private-api/fragments-delete", {
423
+ mutationFn: async () => fetch(i.privateApiHost + "/private-api/fragments-delete", {
424
424
  method: "POST",
425
425
  body: JSON.stringify({
426
- code: f(e),
426
+ code: y(e),
427
427
  id: t
428
428
  }),
429
429
  headers: {
@@ -432,19 +432,19 @@ function se(e, t) {
432
432
  }),
433
433
  onSuccess() {
434
434
  s().setQueryData(
435
- v(e).queryKey,
435
+ m(e).queryKey,
436
436
  (n) => [...n ?? []].filter(({ id: r }) => r !== t)
437
437
  );
438
438
  }
439
439
  });
440
440
  }
441
- function H(e, t) {
441
+ function K(e, t) {
442
442
  return p({
443
443
  mutationKey: ["analytics", t],
444
444
  mutationFn: async () => {
445
445
  if (!t)
446
446
  throw new Error("[SDK][Analytics] – no activity type provided");
447
- await fetch(o.plausibleHost + "/api/event", {
447
+ await fetch(i.plausibleHost + "/api/event", {
448
448
  method: "POST",
449
449
  headers: {
450
450
  "Content-Type": "application/json"
@@ -463,13 +463,13 @@ function H(e, t) {
463
463
  }
464
464
  const ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
465
465
  __proto__: null,
466
- useRecordActivity: H
466
+ useRecordActivity: K
467
467
  }, Symbol.toStringTag, { value: "Module" }));
468
468
  function J(e, t) {
469
469
  return c({
470
470
  queryKey: ["integrations", "hivesigner", "decode-memo", e],
471
471
  queryFn: async () => {
472
- const n = f(e);
472
+ const n = y(e);
473
473
  if (n)
474
474
  return new w.Client({
475
475
  accessToken: n
@@ -477,11 +477,11 @@ function J(e, t) {
477
477
  }
478
478
  });
479
479
  }
480
- const M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
480
+ const E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
481
481
  __proto__: null,
482
482
  getDecodeMemoQueryOptions: J
483
- }, Symbol.toStringTag, { value: "Module" })), B = {
484
- queries: M
483
+ }, Symbol.toStringTag, { value: "Module" })), M = {
484
+ queries: E
485
485
  };
486
486
  function g(e) {
487
487
  return c({
@@ -497,7 +497,7 @@ function g(e) {
497
497
  "Content-Type": "application/json"
498
498
  }
499
499
  }
500
- ), n = B.queries.getDecodeMemoQueryOptions(
500
+ ), n = M.queries.getDecodeMemoQueryOptions(
501
501
  e,
502
502
  (await t.json()).memo
503
503
  );
@@ -509,7 +509,7 @@ function g(e) {
509
509
  }
510
510
  });
511
511
  }
512
- function x(e) {
512
+ function B(e) {
513
513
  return c({
514
514
  queryKey: ["integrations", "3speak", "videos", e],
515
515
  enabled: !!e,
@@ -532,17 +532,17 @@ function x(e) {
532
532
  }
533
533
  });
534
534
  }
535
- const E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
535
+ const x = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
536
536
  __proto__: null,
537
537
  getAccountTokenQueryOptions: g,
538
- getAccountVideosQueryOptions: x
538
+ getAccountVideosQueryOptions: B
539
539
  }, Symbol.toStringTag, { value: "Module" })), ue = {
540
- queries: E
540
+ queries: x
541
541
  };
542
542
  function pe() {
543
543
  return c({
544
544
  queryKey: ["resource-credits", "stats"],
545
- queryFn: async () => (await o.hiveClient.call(
545
+ queryFn: async () => (await i.hiveClient.call(
546
546
  "rc_api",
547
547
  "get_rc_stats",
548
548
  {}
@@ -552,36 +552,91 @@ function pe() {
552
552
  function ye(e) {
553
553
  return c({
554
554
  queryKey: ["resource-credits", "account", e],
555
- queryFn: async () => new A(o.hiveClient).findRCAccounts([e]),
555
+ queryFn: async () => new F(i.hiveClient).findRCAccounts([e]),
556
556
  enabled: !!e
557
557
  });
558
558
  }
559
+ function le(e, t) {
560
+ return c({
561
+ queryKey: ["games", "status-check", t, e],
562
+ enabled: !!e,
563
+ queryFn: async () => {
564
+ if (!e)
565
+ throw new Error("[SDK][Games] – anon user in status check");
566
+ return await (await fetch(
567
+ i.privateApiHost + "/private-api/get-game",
568
+ {
569
+ method: "POST",
570
+ body: JSON.stringify({
571
+ game_type: t,
572
+ code: y(e)
573
+ }),
574
+ headers: {
575
+ "Content-Type": "application/json"
576
+ }
577
+ }
578
+ )).json();
579
+ }
580
+ });
581
+ }
582
+ function fe(e, t, n) {
583
+ const { mutateAsync: r } = K(
584
+ e,
585
+ "spin-rolled"
586
+ );
587
+ return p({
588
+ mutationKey: ["games", "post", t, e],
589
+ mutationFn: async () => {
590
+ if (!e)
591
+ throw new Error("[SDK][Games] – anon user in game post");
592
+ return await (await fetch(
593
+ i.privateApiHost + "/private-api/post-game",
594
+ {
595
+ method: "POST",
596
+ body: JSON.stringify({
597
+ game_type: t,
598
+ code: y(e),
599
+ key: n
600
+ }),
601
+ headers: {
602
+ "Content-Type": "application/json"
603
+ }
604
+ }
605
+ )).json();
606
+ },
607
+ onSuccess() {
608
+ r();
609
+ }
610
+ });
611
+ }
559
612
  export {
560
- o as CONFIG,
613
+ i as CONFIG,
561
614
  O as ConfigManager,
562
615
  ce as EcencyAnalytics,
563
616
  C as EcencyQueriesManager,
564
- B as HiveSignerIntegration,
617
+ M as HiveSignerIntegration,
565
618
  ee as Keychain,
566
619
  ue as ThreeSpeakIntegration,
567
620
  Y as checkUsernameWalletsPendingQueryOptions,
568
- f as getAccessToken,
621
+ y as getAccessToken,
569
622
  L as getAccountFullQueryOptions,
570
623
  ye as getAccountRcQueryOptions,
571
- v as getFragmentsQueryOptions,
624
+ m as getFragmentsQueryOptions,
625
+ le as getGameStatusCheckQueryOptions,
572
626
  re as getHiveEngineTokensListQueryOptions,
573
627
  I as getPostingKey,
574
628
  s as getQueryClient,
575
629
  pe as getRcStatsQueryOptions,
576
- $ as getRefreshToken,
630
+ W as getRefreshToken,
577
631
  X as getSearchAccountsByUsernameQueryOptions,
578
- ie as getTrendingTagsQueryOptions,
579
- l as getUser,
580
- G as makeQueryClient,
632
+ oe as getTrendingTagsQueryOptions,
633
+ f as getUser,
634
+ $ as makeQueryClient,
581
635
  V as useAccountUpdate,
582
- oe as useAddFragment,
583
- P as useBroadcastMutation,
636
+ ie as useAddFragment,
637
+ N as useBroadcastMutation,
584
638
  ae as useEditFragment,
639
+ fe as useGameClaim,
585
640
  se as useRemoveFragment,
586
641
  ne as useSignOperationByHivesigner,
587
642
  Z as useSignOperationByKey,
package/dist/index.d.ts CHANGED
@@ -7,3 +7,4 @@ export * from './modules/posts';
7
7
  export * from './modules/analytics';
8
8
  export * from './modules/integrations';
9
9
  export * from './modules/resource-credits';
10
+ export * from './modules/games';
@@ -1,3 +1,3 @@
1
- type ActivityType = "post-created" | "post-updated" | "post-scheduled" | "draft-created" | "video-published" | "legacy-post-created" | "legacy-post-updated" | "legacy-post-scheduled" | "legacy-draft-created" | "legacy-video-published" | "perks-points-by-qr" | "perks-account-boost" | "perks-promote" | "perks-boost-plus" | "signed-up-with-wallets" | "signed-up-with-email";
1
+ type ActivityType = "post-created" | "post-updated" | "post-scheduled" | "draft-created" | "video-published" | "legacy-post-created" | "legacy-post-updated" | "legacy-post-scheduled" | "legacy-draft-created" | "legacy-video-published" | "perks-points-by-qr" | "perks-account-boost" | "perks-promote" | "perks-boost-plus" | "points-claimed" | "spin-rolled" | "signed-up-with-wallets" | "signed-up-with-email";
2
2
  export declare function useRecordActivity(username: string | undefined, activityType: ActivityType): import('@tanstack/react-query').UseMutationResult<void, Error, void, unknown>;
3
3
  export {};
@@ -0,0 +1,3 @@
1
+ export * from './queries';
2
+ export * from './types';
3
+ export * from './mutations';
@@ -0,0 +1,2 @@
1
+ import { GameClaim } from '../types';
2
+ export declare function useGameClaim(username: string | undefined, gameType: "spin", key: string): import('@tanstack/react-query').UseMutationResult<GameClaim, Error, void, unknown>;
@@ -0,0 +1 @@
1
+ export * from './game-claim';
@@ -0,0 +1,9 @@
1
+ import { GetGameStatus } from '../types';
2
+ export declare function getGameStatusCheckQueryOptions(username: string | undefined, gameType: "spin"): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<GetGameStatus, Error, GetGameStatus, (string | undefined)[]>, "queryFn"> & {
3
+ queryFn?: import('@tanstack/query-core').QueryFunction<GetGameStatus, (string | undefined)[], never> | undefined;
4
+ } & {
5
+ queryKey: (string | undefined)[] & {
6
+ [dataTagSymbol]: GetGameStatus;
7
+ [dataTagErrorSymbol]: Error;
8
+ };
9
+ };
@@ -0,0 +1 @@
1
+ export * from './game-status-check-query-options';
@@ -0,0 +1,3 @@
1
+ export interface GameClaim {
2
+ score: number;
3
+ }
@@ -0,0 +1,7 @@
1
+ export interface GetGameStatus {
2
+ key: string;
3
+ remaining: number;
4
+ status: number;
5
+ next_date: string;
6
+ wait_secs: number;
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from './get-game-status';
2
+ export * from './game-claim';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ecency/sdk",
3
3
  "private": false,
4
- "version": "1.0.39",
4
+ "version": "1.0.42",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "./dist/ecency-sdk.umd.js",