@ecency/sdk 1.0.18 → 1.0.19

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,48 +1,48 @@
1
- import { useCallback as k } from "react";
2
- import { useQuery as m, useQueryClient as w, useMutation as l, queryOptions as A } from "@tanstack/react-query";
3
- import { BtcWallet as K } from "@okxweb3/coin-bitcoin";
4
- import { EthWallet as R } from "@okxweb3/coin-ethereum";
1
+ import { useCallback as g } from "react";
2
+ import { useQuery as m, queryOptions as v, useQueryClient as b, useMutation as u } from "@tanstack/react-query";
3
+ import { BtcWallet as R } from "@okxweb3/coin-bitcoin";
4
+ import { EthWallet as H } from "@okxweb3/coin-ethereum";
5
5
  import { TrxWallet as C } from "@okxweb3/coin-tron";
6
6
  import { TonWallet as N } from "@okxweb3/coin-ton";
7
- import { SolWallet as _ } from "@okxweb3/coin-solana";
8
- import { AtomWallet as B } from "@okxweb3/coin-cosmos";
9
- import { AptosWallet as D } from "@okxweb3/coin-aptos";
10
- import j, { mnemonicToSeedSync as H } from "bip39";
11
- import { Client as x, PrivateKey as p, cryptoUtils as E } from "@hiveio/dhive";
12
- import { LRUCache as F } from "lru-cache";
13
- import g from "hivesigner";
14
- var o = /* @__PURE__ */ ((e) => (e.BTC = "BTC", e.ETH = "ETH", e.APT = "APT", e.ATOM = "ATOM", e.TON = "TON", e.TRON = "TRX", e.SOL = "SOL", e))(o || {});
15
- function W(e) {
16
- return new Promise((t) => setTimeout(t, e));
7
+ import { SolWallet as j } from "@okxweb3/coin-solana";
8
+ import { AtomWallet as D } from "@okxweb3/coin-cosmos";
9
+ import { AptosWallet as x } from "@okxweb3/coin-aptos";
10
+ import _, { mnemonicToSeedSync as q } from "bip39";
11
+ import { Client as F, PrivateKey as l, cryptoUtils as L } from "@hiveio/dhive";
12
+ import { LRUCache as M } from "lru-cache";
13
+ import P from "hivesigner";
14
+ var o = /* @__PURE__ */ ((t) => (t.BTC = "BTC", t.ETH = "ETH", t.APT = "APT", t.ATOM = "ATOM", t.TON = "TON", t.TRON = "TRX", t.SOL = "SOL", t))(o || {}), d = /* @__PURE__ */ ((t) => (t[t.Points = 0] = "Points", t[t.HivePower = 1] = "HivePower", t[t.Hive = 2] = "Hive", t[t.HiveDollar = 3] = "HiveDollar", t[t.Leo = 4] = "Leo", t[t.Spk = 5] = "Spk", t))(d || {});
15
+ function Q(t) {
16
+ return new Promise((e) => setTimeout(e, t));
17
17
  }
18
- function T(e) {
19
- switch (e) {
18
+ function T(t) {
19
+ switch (t) {
20
20
  case o.BTC:
21
- return new K();
22
- case o.ETH:
23
21
  return new R();
22
+ case o.ETH:
23
+ return new H();
24
24
  case o.TRON:
25
25
  return new C();
26
26
  case o.TON:
27
27
  return new N();
28
28
  case o.SOL:
29
- return new _();
29
+ return new j();
30
30
  case o.ATOM:
31
- return new B();
32
- case o.APT:
33
31
  return new D();
32
+ case o.APT:
33
+ return new x();
34
34
  default:
35
35
  return;
36
36
  }
37
37
  }
38
- function Te(e) {
39
- return H(e).toString("hex");
38
+ function Pt(t) {
39
+ return q(t).toString("hex");
40
40
  }
41
- const u = {
41
+ const p = {
42
42
  privateApiHost: "https://ecency.com",
43
43
  storage: localStorage,
44
44
  storagePrefix: "ecency",
45
- hiveClient: new x(
45
+ hiveClient: new F(
46
46
  [
47
47
  "https://api.hive.blog",
48
48
  "https://api.deathwing.me",
@@ -64,30 +64,30 @@ const u = {
64
64
  ),
65
65
  heliusApiKey: "fb1e2935-f911-4b1d-8e1c-3863f6879d42"
66
66
  };
67
- function be(e, t) {
67
+ function Tt(t, e) {
68
68
  return m({
69
- queryKey: ["ecency-wallets", "external-wallet-balance", e, t],
69
+ queryKey: ["ecency-wallets", "external-wallet-balance", t, e],
70
70
  queryFn: async () => {
71
- switch (e) {
71
+ switch (t) {
72
72
  case o.BTC:
73
73
  const a = await (await fetch(
74
- `https://mempool.space/api/address/${t}`
74
+ `https://mempool.space/api/address/${e}`
75
75
  )).json();
76
76
  return (a.chain_stats.funded_txo_sum - a.chain_stats.spent_txo_sum) / 1e8;
77
77
  case o.ETH:
78
78
  return +(await (await fetch(
79
- `https://api.ethplorer.io/getAddressInfo/${t}?apiKey=freekey`
79
+ `https://api.ethplorer.io/getAddressInfo/${e}?apiKey=freekey`
80
80
  )).json()).ETH.balance;
81
81
  case o.SOL:
82
82
  return (await (await fetch(
83
- `https://rpc.helius.xyz/?api-key=${u.heliusApiKey}`,
83
+ `https://rpc.helius.xyz/?api-key=${p.heliusApiKey}`,
84
84
  {
85
85
  method: "POST",
86
86
  body: JSON.stringify({
87
87
  jsonrpc: "2.0",
88
88
  id: "1",
89
89
  method: "getBalance",
90
- params: [t]
90
+ params: [e]
91
91
  }),
92
92
  headers: {
93
93
  "Content-Type": "application/json"
@@ -96,34 +96,34 @@ function be(e, t) {
96
96
  )).json()).result.value / 1e9;
97
97
  case o.TRON:
98
98
  return (await (await fetch(
99
- `https://api.trongrid.io/v1/accounts/${t}`
99
+ `https://api.trongrid.io/v1/accounts/${e}`
100
100
  )).json()).data[0].balance / 1e6;
101
101
  case o.TON:
102
102
  return (await (await fetch(
103
- `https://tonapi.io/v1/blockchain/getAccount?account=${t}`
103
+ `https://tonapi.io/v1/blockchain/getAccount?account=${e}`
104
104
  )).json()).balance / 1e9;
105
105
  case o.APT:
106
- const f = (await (await fetch(
107
- `https://fullnode.mainnet.aptoslabs.com/v1/accounts/${t}/resources`
106
+ const y = (await (await fetch(
107
+ `https://fullnode.mainnet.aptoslabs.com/v1/accounts/${e}/resources`
108
108
  )).json()).find(
109
- (O) => O.type.includes("coin::CoinStore")
109
+ (k) => k.type.includes("coin::CoinStore")
110
110
  );
111
- return f ? parseInt(f.data.coin.value) / 1e8 : 0;
111
+ return y ? parseInt(y.data.coin.value) / 1e8 : 0;
112
112
  case o.ATOM:
113
113
  return +(await (await fetch(
114
- `https://rest.cosmos.directory/cosmoshub/auth/accounts/${t}`
114
+ `https://rest.cosmos.directory/cosmoshub/auth/accounts/${e}`
115
115
  )).json()).result.value.coins[0].amount / 1e6;
116
116
  }
117
117
  }
118
118
  });
119
119
  }
120
- function b(e) {
120
+ function S(t) {
121
121
  return m({
122
- queryKey: ["ecency-wallets", "seed", e],
123
- queryFn: async () => j.generateMnemonic(128)
122
+ queryKey: ["ecency-wallets", "seed", t],
123
+ queryFn: async () => _.generateMnemonic(128)
124
124
  });
125
125
  }
126
- const q = {
126
+ const J = {
127
127
  max: 500,
128
128
  // how long to live in ms
129
129
  ttl: 1e3 * 60 * 5,
@@ -131,32 +131,32 @@ const q = {
131
131
  allowStale: !1,
132
132
  updateAgeOnGet: !1,
133
133
  updateAgeOnHas: !1
134
- }, v = new F(q), y = Symbol("undefined"), M = (e, t) => v.set(e, t === void 0 ? y : t), L = (e) => {
135
- const t = v.get(e);
136
- return t === y ? void 0 : t;
134
+ }, O = new M(J), w = Symbol("undefined"), $ = (t, e) => O.set(t, e === void 0 ? w : e), B = (t) => {
135
+ const e = O.get(t);
136
+ return e === w ? void 0 : e;
137
137
  };
138
- function ve(e) {
138
+ function St(t) {
139
139
  return m({
140
- queryKey: ["ecency-wallets", "coingecko-price", e],
140
+ queryKey: ["ecency-wallets", "coingecko-price", t],
141
141
  queryFn: async () => {
142
- let t = e;
143
- switch (e) {
142
+ let e = t;
143
+ switch (t) {
144
144
  case o.BTC:
145
- t = "binance-wrapped-btc";
145
+ e = "binance-wrapped-btc";
146
146
  break;
147
147
  case o.ETH:
148
- t = "ethereum";
148
+ e = "ethereum";
149
149
  break;
150
150
  case o.SOL:
151
- t = "solana";
151
+ e = "solana";
152
152
  break;
153
153
  case o.TON:
154
- t = "trx";
154
+ e = "trx";
155
155
  break;
156
156
  default:
157
- t = e;
157
+ e = t;
158
158
  }
159
- let n = L("gecko"), a;
159
+ let n = B("gecko"), a;
160
160
  if (n)
161
161
  a = n;
162
162
  else {
@@ -166,29 +166,29 @@ function ve(e) {
166
166
  method: "POST",
167
167
  body: JSON.stringify({
168
168
  params: {
169
- ids: [t],
169
+ ids: [e],
170
170
  vs_currencies: "usd"
171
171
  }
172
172
  })
173
173
  }
174
174
  )).json();
175
- M("gecko", i === void 0 ? y : i), a = i;
175
+ $("gecko", i === void 0 ? w : i), a = i;
176
176
  }
177
177
  return 1 / +a[Object.keys(a)[0]].usd;
178
178
  },
179
- enabled: !!e
179
+ enabled: !!t
180
180
  });
181
181
  }
182
- function Q(e) {
183
- const { data: t } = b(e);
182
+ function E(t) {
183
+ const { data: e } = S(t);
184
184
  return m({
185
- queryKey: ["ecencу-wallets", "hive-keys", e, t],
185
+ queryKey: ["ecencу-wallets", "hive-keys", t, e],
186
186
  queryFn: async () => {
187
- if (!t)
187
+ if (!e)
188
188
  throw new Error("[Ecency][Wallets] - no seed to create Hive account");
189
- const n = p.fromLogin(e, t, "owner"), a = p.fromLogin(e, t, "active"), s = p.fromLogin(e, t, "posting"), r = p.fromLogin(e, t, "memo");
189
+ const n = l.fromLogin(t, e, "owner"), a = l.fromLogin(t, e, "active"), s = l.fromLogin(t, e, "posting"), r = l.fromLogin(t, e, "memo");
190
190
  return {
191
- username: e,
191
+ username: t,
192
192
  owner: n.toString(),
193
193
  active: a.toString(),
194
194
  posting: s.toString(),
@@ -201,7 +201,65 @@ function Q(e) {
201
201
  }
202
202
  });
203
203
  }
204
- const I = {
204
+ function Ot(t, e) {
205
+ return v({
206
+ queryKey: ["ecency-wallets", "points", t, e],
207
+ queryFn: async () => await (await fetch(
208
+ `${p.privateApiHost}/private-api/points`,
209
+ {
210
+ method: "POST",
211
+ body: JSON.stringify({
212
+ username: t.replace("@", "")
213
+ })
214
+ }
215
+ )).json(),
216
+ staleTime: 3e4,
217
+ refetchOnMount: !0,
218
+ enabled: !!t
219
+ });
220
+ }
221
+ function I(t, e) {
222
+ return v({
223
+ queryKey: ["hive-engine", "tokens-list", t, e],
224
+ queryFn: async () => (await (await fetch(
225
+ `${p.privateApiHost}/private-api/engine-api`,
226
+ {
227
+ method: "POST",
228
+ body: JSON.stringify({
229
+ jsonrpc: "2.0",
230
+ method: "find",
231
+ params: {
232
+ contract: "market",
233
+ table: "metrics",
234
+ query: {
235
+ symbol: e,
236
+ account: t
237
+ }
238
+ },
239
+ id: 1
240
+ }),
241
+ headers: { "Content-type": "application/json" }
242
+ }
243
+ )).json()).result
244
+ });
245
+ }
246
+ function At() {
247
+ const { data: t } = m(I());
248
+ return g(
249
+ () => [
250
+ d.Points,
251
+ d.Hive,
252
+ d.HivePower,
253
+ d.HiveDollar,
254
+ d.Leo,
255
+ d.Spk,
256
+ ...Object.keys(o),
257
+ ...(t == null ? void 0 : t.map(({ symbol: e }) => e)) ?? []
258
+ ],
259
+ [t]
260
+ );
261
+ }
262
+ const G = {
205
263
  [o.BTC]: "m/44'/0'/0'/0/0",
206
264
  // Bitcoin (BIP44)
207
265
  [o.ETH]: "m/44'/60'/0'/0/0",
@@ -217,17 +275,17 @@ const I = {
217
275
  [o.ATOM]: "m/44'/118'/0'/0/0"
218
276
  // Cosmos (BIP44)
219
277
  };
220
- function Pe(e, t) {
221
- const { data: n } = b(e), a = w(), s = l({
222
- mutationKey: ["ecency-wallets", "create-wallet", e, t],
278
+ function Kt(t, e) {
279
+ const { data: n } = S(t), a = b(), s = u({
280
+ mutationKey: ["ecency-wallets", "create-wallet", t, e],
223
281
  mutationFn: async () => {
224
282
  if (!n)
225
283
  throw new Error("[Ecency][Wallets] - No seed to create a wallet");
226
- const i = T(t), c = await (i == null ? void 0 : i.getDerivedPrivateKey({
284
+ const i = T(e), c = await (i == null ? void 0 : i.getDerivedPrivateKey({
227
285
  mnemonic: n,
228
- hdPath: I[t]
286
+ hdPath: G[e]
229
287
  }));
230
- await W(1e3);
288
+ await Q(1e3);
231
289
  const h = await (i == null ? void 0 : i.getNewAddress({
232
290
  privateKey: c
233
291
  }));
@@ -235,8 +293,8 @@ function Pe(e, t) {
235
293
  privateKey: c,
236
294
  address: h.address,
237
295
  publicKey: h.publicKey,
238
- username: e,
239
- currency: t
296
+ username: t,
297
+ currency: e
240
298
  };
241
299
  },
242
300
  onSuccess: (i) => {
@@ -245,26 +303,26 @@ function Pe(e, t) {
245
303
  (c) => new Map(c ? Array.from(c.entries()) : []).set(i.currency, i)
246
304
  );
247
305
  }
248
- }), r = k(() => {
306
+ }), r = g(() => {
249
307
  }, []);
250
308
  return {
251
309
  createWallet: s,
252
310
  importWallet: r
253
311
  };
254
312
  }
255
- function J(e) {
256
- const { data: t } = m({
257
- queryKey: ["ecency-wallets", "wallets", e]
258
- }), { data: n } = Q(e);
259
- return l({
260
- mutationKey: ["ecency-wallets", "create-account-with-wallets", e],
261
- mutationFn: ({ currency: a, address: s }) => fetch(u.privateApiHost + "/private-api/wallets-add", {
313
+ function W(t) {
314
+ const { data: e } = m({
315
+ queryKey: ["ecency-wallets", "wallets", t]
316
+ }), { data: n } = E(t);
317
+ return u({
318
+ mutationKey: ["ecency-wallets", "create-account-with-wallets", t],
319
+ mutationFn: ({ currency: a, address: s }) => fetch(p.privateApiHost + "/private-api/wallets-add", {
262
320
  method: "POST",
263
321
  headers: {
264
322
  "Content-Type": "application/json"
265
323
  },
266
324
  body: JSON.stringify({
267
- username: e,
325
+ username: t,
268
326
  token: a,
269
327
  address: s,
270
328
  meta: {
@@ -272,7 +330,7 @@ function J(e) {
272
330
  activePublicKey: n == null ? void 0 : n.activePubkey,
273
331
  postingPublicKey: n == null ? void 0 : n.postingPubkey,
274
332
  memoPublicKey: n == null ? void 0 : n.memoPubkey,
275
- ...Array.from((t == null ? void 0 : t.entries()) ?? []).reduce(
333
+ ...Array.from((e == null ? void 0 : e.entries()) ?? []).reduce(
276
334
  (r, [i, c]) => ({
277
335
  ...r,
278
336
  [i]: c.address
@@ -284,29 +342,29 @@ function J(e) {
284
342
  })
285
343
  });
286
344
  }
287
- function P() {
288
- return l({
345
+ function A() {
346
+ return u({
289
347
  mutationKey: ["ecency-wallets", "check-wallet-existence"],
290
- mutationFn: async ({ address: e, currency: t }) => (await (await fetch(
291
- u.privateApiHost + "/private-api/wallets-exist",
348
+ mutationFn: async ({ address: t, currency: e }) => (await (await fetch(
349
+ p.privateApiHost + "/private-api/wallets-exist",
292
350
  {
293
351
  method: "POST",
294
352
  headers: {
295
353
  "Content-Type": "application/json"
296
354
  },
297
355
  body: JSON.stringify({
298
- address: e,
299
- token: t
356
+ address: t,
357
+ token: e
300
358
  })
301
359
  }
302
360
  )).json()).length === 0
303
361
  });
304
362
  }
305
- const Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
363
+ const kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
306
364
  __proto__: null,
307
- useCheckWalletExistence: P,
308
- useCreateAccountWithWallets: J
309
- }, Symbol.toStringTag, { value: "Module" })), $ = {
365
+ useCheckWalletExistence: A,
366
+ useCreateAccountWithWallets: W
367
+ }, Symbol.toStringTag, { value: "Module" })), U = {
310
368
  [o.BTC]: ["m/84'/0'/0'/0/0"],
311
369
  [o.ETH]: ["m/84'/60'/0'/0/0"],
312
370
  // its not working for Trust, Exodus, todo: check others below
@@ -317,13 +375,13 @@ const Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
317
375
  // Disabled
318
376
  [o.ATOM]: ["m/84'/118'/0'/0'/0"]
319
377
  };
320
- async function G(e, t, n) {
321
- for (const a of $[n] || [])
378
+ async function V(t, e, n) {
379
+ for (const a of U[n] || [])
322
380
  try {
323
- const s = await t.getDerivedPrivateKey({
324
- mnemonic: e,
381
+ const s = await e.getDerivedPrivateKey({
382
+ mnemonic: t,
325
383
  hdPath: a
326
- }), r = await t.getNewAddress({
384
+ }), r = await e.getNewAddress({
327
385
  privateKey: s,
328
386
  addressType: n === o.BTC ? "segwit_native" : void 0
329
387
  });
@@ -333,20 +391,20 @@ async function G(e, t, n) {
333
391
  }
334
392
  return [];
335
393
  }
336
- function Oe(e, t) {
337
- const n = w(), { mutateAsync: a } = P();
338
- return l({
339
- mutationKey: ["ecency-wallets", "import-wallet", e, t],
394
+ function Rt(t, e) {
395
+ const n = b(), { mutateAsync: a } = A();
396
+ return u({
397
+ mutationKey: ["ecency-wallets", "import-wallet", t, e],
340
398
  mutationFn: async ({ privateKeyOrSeed: s }) => {
341
- const r = T(t);
399
+ const r = T(e);
342
400
  if (!r)
343
401
  throw new Error("Cannot find token for this currency");
344
402
  const i = s.split(" ").length === 12;
345
403
  let c, h = s;
346
- if (i ? [h, c] = await G(
404
+ if (i ? [h, c] = await V(
347
405
  s,
348
406
  r,
349
- t
407
+ e
350
408
  ) : c = (await r.getNewAddress({
351
409
  privateKey: s
352
410
  })).address, !c || !s)
@@ -355,7 +413,7 @@ function Oe(e, t) {
355
413
  );
356
414
  if (!await a({
357
415
  address: c,
358
- currency: t
416
+ currency: e
359
417
  }))
360
418
  throw new Error(
361
419
  "This wallet has already in use by Hive account. Please, try another one"
@@ -368,54 +426,54 @@ function Oe(e, t) {
368
426
  },
369
427
  onSuccess: ({ privateKey: s, publicKey: r, address: i }) => {
370
428
  n.setQueryData(
371
- ["ecency-wallets", "wallets", e],
372
- (c) => new Map(c ? Array.from(c.entries()) : []).set(t, {
429
+ ["ecency-wallets", "wallets", t],
430
+ (c) => new Map(c ? Array.from(c.entries()) : []).set(e, {
373
431
  privateKey: s,
374
432
  publicKey: r,
375
433
  address: i,
376
- username: e,
377
- currency: t,
434
+ username: t,
435
+ currency: e,
378
436
  custom: !0
379
437
  })
380
438
  );
381
439
  }
382
440
  });
383
441
  }
384
- function U(e) {
385
- let t = atob(e);
386
- if (t[0] === "{")
387
- return JSON.parse(t);
442
+ function z(t) {
443
+ let e = atob(t);
444
+ if (e[0] === "{")
445
+ return JSON.parse(e);
388
446
  }
389
- const d = (e) => {
447
+ const f = (t) => {
390
448
  try {
391
- const t = u.storage.getItem(
392
- u.storagePrefix + "_user_" + e
449
+ const e = p.storage.getItem(
450
+ p.storagePrefix + "_user_" + t
393
451
  );
394
- return U(JSON.parse(t));
395
- } catch (t) {
396
- console.error(t);
452
+ return z(JSON.parse(e));
453
+ } catch (e) {
454
+ console.error(e);
397
455
  return;
398
456
  }
399
- }, V = (e) => d(e) && d(e).accessToken, z = (e) => d(e) && d(e).postingKey;
400
- function X(e = [], t, n) {
401
- return l({
402
- mutationKey: [...e, t],
457
+ }, X = (t) => f(t) && f(t).accessToken, Y = (t) => f(t) && f(t).postingKey;
458
+ function Z(t = [], e, n) {
459
+ return u({
460
+ mutationKey: [...t, e],
403
461
  mutationFn: async (a) => {
404
- if (!t)
462
+ if (!e)
405
463
  throw new Error(
406
464
  "[Core][Broadcast] Attempted to call broadcast API with anon user"
407
465
  );
408
- const s = z(t);
466
+ const s = Y(e);
409
467
  if (s) {
410
- const i = p.fromString(s);
411
- return u.hiveClient.broadcast.sendOperations(
468
+ const i = l.fromString(s);
469
+ return p.hiveClient.broadcast.sendOperations(
412
470
  n(a),
413
471
  i
414
472
  );
415
473
  }
416
- let r = V(t);
474
+ let r = X(e);
417
475
  if (r)
418
- return (await new g.Client({
476
+ return (await new P.Client({
419
477
  accessToken: r
420
478
  }).broadcast(n(a))).result;
421
479
  throw new Error(
@@ -424,18 +482,18 @@ function X(e = [], t, n) {
424
482
  }
425
483
  });
426
484
  }
427
- function Y(e) {
428
- return X(
485
+ function tt(t) {
486
+ return Z(
429
487
  ["accounts", "update"],
430
- e,
431
- (t) => [
488
+ t,
489
+ (e) => [
432
490
  [
433
491
  "account_update2",
434
492
  {
435
- account: e,
493
+ account: t,
436
494
  json_metadata: "",
437
495
  posting_json_metadata: JSON.stringify({
438
- profile: { ...t, version: 2 }
496
+ profile: { ...e, version: 2 }
439
497
  }),
440
498
  extensions: []
441
499
  }
@@ -443,25 +501,13 @@ function Y(e) {
443
501
  ]
444
502
  );
445
503
  }
446
- function ke(e, t = 5, n = []) {
447
- return A({
448
- queryKey: ["accounts", "search", e, n],
449
- enabled: !!e,
450
- queryFn: async () => (await u.hiveClient.database.call(
451
- "lookup_accounts",
452
- [e, t]
453
- )).filter(
454
- (s) => n.length > 0 ? !n.includes(s) : !0
455
- )
456
- });
457
- }
458
- function Ae(e) {
459
- const { mutateAsync: t } = Y(e);
460
- return l({
461
- mutationKey: ["ecency-wallets", "save-wallet-to-metadata", e],
504
+ function Ht(t) {
505
+ const { mutateAsync: e } = tt(t);
506
+ return u({
507
+ mutationKey: ["ecency-wallets", "save-wallet-to-metadata", t],
462
508
  mutationFn: ({
463
509
  wallets: n
464
- }) => t(
510
+ }) => e(
465
511
  Array.from(n.entries() ?? []).reduce(
466
512
  (a, [s, r]) => ({
467
513
  ...a,
@@ -472,28 +518,28 @@ function Ae(e) {
472
518
  )
473
519
  });
474
520
  }
475
- function Ke(e) {
476
- return l({
477
- mutationKey: ["operations", "sign", e],
521
+ function Ct(t) {
522
+ return u({
523
+ mutationKey: ["operations", "sign", t],
478
524
  mutationFn: ({
479
- operation: t,
525
+ operation: e,
480
526
  keyOrSeed: n
481
527
  }) => {
482
- if (!e)
528
+ if (!t)
483
529
  throw new Error("[Operations][Sign] – cannot sign op with anon user");
484
530
  let a;
485
- return n.split(" ").length === 12 ? a = p.fromLogin(e, n, "active") : E.isWif(n) ? a = p.fromString(n) : a = p.from(n), u.hiveClient.broadcast.sendOperations(
486
- [t],
531
+ return n.split(" ").length === 12 ? a = l.fromLogin(t, n, "active") : L.isWif(n) ? a = l.fromString(n) : a = l.from(n), p.hiveClient.broadcast.sendOperations(
532
+ [e],
487
533
  a
488
534
  );
489
535
  }
490
536
  });
491
537
  }
492
- const Z = (e, t, n, a = null) => new Promise((s, r) => {
538
+ const et = (t, e, n, a = null) => new Promise((s, r) => {
493
539
  var i;
494
540
  (i = window.hive_keychain) == null || i.requestBroadcast(
495
- e,
496
541
  t,
542
+ e,
497
543
  n,
498
544
  (c) => {
499
545
  c.success || r({ message: "Operation cancelled" }), s(c);
@@ -501,41 +547,43 @@ const Z = (e, t, n, a = null) => new Promise((s, r) => {
501
547
  a
502
548
  );
503
549
  });
504
- function Re(e, t = "Active") {
505
- return l({
506
- mutationKey: ["operations", "sign-keychain", e],
550
+ function Nt(t, e = "Active") {
551
+ return u({
552
+ mutationKey: ["operations", "sign-keychain", t],
507
553
  mutationFn: ({ operation: n }) => {
508
- if (!e)
554
+ if (!t)
509
555
  throw new Error(
510
556
  "[SDK][Keychain] – cannot sign operation with anon user"
511
557
  );
512
- return Z(e, [n], t);
558
+ return et(t, [n], e);
513
559
  }
514
560
  });
515
561
  }
516
- function Ce(e = "/") {
517
- return l({
518
- mutationKey: ["operations", "sign-hivesigner", e],
519
- mutationFn: async ({ operation: t }) => g.sendOperation(t, { callback: e }, () => {
562
+ function jt(t = "/") {
563
+ return u({
564
+ mutationKey: ["operations", "sign-hivesigner", t],
565
+ mutationFn: async ({ operation: e }) => P.sendOperation(e, { callback: t }, () => {
520
566
  })
521
567
  });
522
568
  }
523
569
  export {
570
+ d as EcencyWalletBasicTokens,
524
571
  o as EcencyWalletCurrency,
525
- Se as EcencyWalletsPrivateApi,
526
- W as delay,
527
- ke as getSearchAccountsByUsernameQueryOptions,
572
+ kt as EcencyWalletsPrivateApi,
573
+ Q as delay,
574
+ Ot as getAccountPointsQueryOptions,
528
575
  T as getWallet,
529
- Te as mnemonicToSeedBip39,
530
- Y as useAccountUpdate,
531
- ve as useCoinGeckoPriceQuery,
532
- be as useGetExternalWalletBalanceQuery,
533
- Q as useHiveKeysQuery,
534
- Oe as useImportWallet,
535
- Ae as useSaveWalletInformationToMetadata,
536
- b as useSeedPhrase,
537
- Ce as useSignOperationByHivesigner,
538
- Ke as useSignOperationByKey,
539
- Re as useSignOperationByKeychain,
540
- Pe as useWalletCreate
576
+ Pt as mnemonicToSeedBip39,
577
+ tt as useAccountUpdate,
578
+ St as useCoinGeckoPriceQuery,
579
+ At as useGetAllTokensListQuery,
580
+ Tt as useGetExternalWalletBalanceQuery,
581
+ E as useHiveKeysQuery,
582
+ Rt as useImportWallet,
583
+ Ht as useSaveWalletInformationToMetadata,
584
+ S as useSeedPhrase,
585
+ jt as useSignOperationByHivesigner,
586
+ Ct as useSignOperationByKey,
587
+ Nt as useSignOperationByKeychain,
588
+ Kt as useWalletCreate
541
589
  };
@@ -1,2 +1 @@
1
1
  export * from './mutations';
2
- export * from './queries';
@@ -0,0 +1,353 @@
1
+ import { AccountFollowStats } from '../types';
2
+ export declare function getAccountFullQueryOptions(username: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<{
3
+ follow_stats: AccountFollowStats | undefined;
4
+ reputation: number;
5
+ profile: any;
6
+ length: number;
7
+ toString(): string;
8
+ toLocaleString(): string;
9
+ toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
10
+ pop(): import('@hiveio/dhive').ExtendedAccount | undefined;
11
+ push(...items: import('@hiveio/dhive').ExtendedAccount[]): number;
12
+ concat(...items: ConcatArray<import('@hiveio/dhive').ExtendedAccount>[]): import('@hiveio/dhive').ExtendedAccount[];
13
+ concat(...items: (import('@hiveio/dhive').ExtendedAccount | ConcatArray<import('@hiveio/dhive').ExtendedAccount>)[]): import('@hiveio/dhive').ExtendedAccount[];
14
+ join(separator?: string): string;
15
+ reverse(): import('@hiveio/dhive').ExtendedAccount[];
16
+ shift(): import('@hiveio/dhive').ExtendedAccount | undefined;
17
+ slice(start?: number, end?: number): import('@hiveio/dhive').ExtendedAccount[];
18
+ sort(compareFn?: ((a: import('@hiveio/dhive').ExtendedAccount, b: import('@hiveio/dhive').ExtendedAccount) => number) | undefined): import('@hiveio/dhive').ExtendedAccount[];
19
+ splice(start: number, deleteCount?: number): import('@hiveio/dhive').ExtendedAccount[];
20
+ splice(start: number, deleteCount: number, ...items: import('@hiveio/dhive').ExtendedAccount[]): import('@hiveio/dhive').ExtendedAccount[];
21
+ unshift(...items: import('@hiveio/dhive').ExtendedAccount[]): number;
22
+ indexOf(searchElement: import('@hiveio/dhive').ExtendedAccount, fromIndex?: number): number;
23
+ lastIndexOf(searchElement: import('@hiveio/dhive').ExtendedAccount, fromIndex?: number): number;
24
+ every<S extends import('@hiveio/dhive').ExtendedAccount>(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => value is S, thisArg?: any): this is S[];
25
+ every(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): boolean;
26
+ some(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): boolean;
27
+ forEach(callbackfn: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => void, thisArg?: any): void;
28
+ map<U>(callbackfn: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U, thisArg?: any): U[];
29
+ filter<S extends import('@hiveio/dhive').ExtendedAccount>(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => value is S, thisArg?: any): S[];
30
+ filter(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): import('@hiveio/dhive').ExtendedAccount[];
31
+ reduce(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
32
+ reduce(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount, initialValue: import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
33
+ reduce<U>(callbackfn: (previousValue: U, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U, initialValue: U): U;
34
+ reduceRight(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
35
+ reduceRight(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount, initialValue: import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
36
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U, initialValue: U): U;
37
+ find<S extends import('@hiveio/dhive').ExtendedAccount>(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, obj: import('@hiveio/dhive').ExtendedAccount[]) => value is S, thisArg?: any): S | undefined;
38
+ find(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, obj: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): import('@hiveio/dhive').ExtendedAccount | undefined;
39
+ findIndex(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, obj: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): number;
40
+ fill(value: import('@hiveio/dhive').ExtendedAccount, start?: number, end?: number): import('@hiveio/dhive').ExtendedAccount[];
41
+ copyWithin(target: number, start: number, end?: number): import('@hiveio/dhive').ExtendedAccount[];
42
+ entries(): ArrayIterator<[number, import('@hiveio/dhive').ExtendedAccount]>;
43
+ keys(): ArrayIterator<number>;
44
+ values(): ArrayIterator<import('@hiveio/dhive').ExtendedAccount>;
45
+ includes(searchElement: import('@hiveio/dhive').ExtendedAccount, fromIndex?: number): boolean;
46
+ flatMap<U, This = undefined>(callback: (this: This, value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U | readonly U[], thisArg?: This | undefined): U[];
47
+ flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
48
+ [Symbol.iterator](): ArrayIterator<import('@hiveio/dhive').ExtendedAccount>;
49
+ [Symbol.unscopables]: {
50
+ [x: number]: boolean | undefined;
51
+ length?: boolean | undefined;
52
+ toString?: boolean | undefined;
53
+ toLocaleString?: boolean | undefined;
54
+ pop?: boolean | undefined;
55
+ push?: boolean | undefined;
56
+ concat?: boolean | undefined;
57
+ join?: boolean | undefined;
58
+ reverse?: boolean | undefined;
59
+ shift?: boolean | undefined;
60
+ slice?: boolean | undefined;
61
+ sort?: boolean | undefined;
62
+ splice?: boolean | undefined;
63
+ unshift?: boolean | undefined;
64
+ indexOf?: boolean | undefined;
65
+ lastIndexOf?: boolean | undefined;
66
+ every?: boolean | undefined;
67
+ some?: boolean | undefined;
68
+ forEach?: boolean | undefined;
69
+ map?: boolean | undefined;
70
+ filter?: boolean | undefined;
71
+ reduce?: boolean | undefined;
72
+ reduceRight?: boolean | undefined;
73
+ find?: boolean | undefined;
74
+ findIndex?: boolean | undefined;
75
+ fill?: boolean | undefined;
76
+ copyWithin?: boolean | undefined;
77
+ entries?: boolean | undefined;
78
+ keys?: boolean | undefined;
79
+ values?: boolean | undefined;
80
+ includes?: boolean | undefined;
81
+ flatMap?: boolean | undefined;
82
+ flat?: boolean | undefined;
83
+ [Symbol.iterator]?: boolean | undefined;
84
+ readonly [Symbol.unscopables]?: boolean | undefined;
85
+ at?: boolean | undefined;
86
+ };
87
+ at(index: number): import('@hiveio/dhive').ExtendedAccount | undefined;
88
+ }, Error, {
89
+ follow_stats: AccountFollowStats | undefined;
90
+ reputation: number;
91
+ profile: any;
92
+ length: number;
93
+ toString(): string;
94
+ toLocaleString(): string;
95
+ toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
96
+ pop(): import('@hiveio/dhive').ExtendedAccount | undefined;
97
+ push(...items: import('@hiveio/dhive').ExtendedAccount[]): number;
98
+ concat(...items: ConcatArray<import('@hiveio/dhive').ExtendedAccount>[]): import('@hiveio/dhive').ExtendedAccount[];
99
+ concat(...items: (import('@hiveio/dhive').ExtendedAccount | ConcatArray<import('@hiveio/dhive').ExtendedAccount>)[]): import('@hiveio/dhive').ExtendedAccount[];
100
+ join(separator?: string): string;
101
+ reverse(): import('@hiveio/dhive').ExtendedAccount[];
102
+ shift(): import('@hiveio/dhive').ExtendedAccount | undefined;
103
+ slice(start?: number, end?: number): import('@hiveio/dhive').ExtendedAccount[];
104
+ sort(compareFn?: ((a: import('@hiveio/dhive').ExtendedAccount, b: import('@hiveio/dhive').ExtendedAccount) => number) | undefined): import('@hiveio/dhive').ExtendedAccount[];
105
+ splice(start: number, deleteCount?: number): import('@hiveio/dhive').ExtendedAccount[];
106
+ splice(start: number, deleteCount: number, ...items: import('@hiveio/dhive').ExtendedAccount[]): import('@hiveio/dhive').ExtendedAccount[];
107
+ unshift(...items: import('@hiveio/dhive').ExtendedAccount[]): number;
108
+ indexOf(searchElement: import('@hiveio/dhive').ExtendedAccount, fromIndex?: number): number;
109
+ lastIndexOf(searchElement: import('@hiveio/dhive').ExtendedAccount, fromIndex?: number): number;
110
+ every<S extends import('@hiveio/dhive').ExtendedAccount>(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => value is S, thisArg?: any): this is S[];
111
+ every(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): boolean;
112
+ some(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): boolean;
113
+ forEach(callbackfn: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => void, thisArg?: any): void;
114
+ map<U>(callbackfn: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U, thisArg?: any): U[];
115
+ filter<S extends import('@hiveio/dhive').ExtendedAccount>(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => value is S, thisArg?: any): S[];
116
+ filter(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): import('@hiveio/dhive').ExtendedAccount[];
117
+ reduce(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
118
+ reduce(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount, initialValue: import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
119
+ reduce<U>(callbackfn: (previousValue: U, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U, initialValue: U): U;
120
+ reduceRight(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
121
+ reduceRight(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount, initialValue: import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
122
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U, initialValue: U): U;
123
+ find<S extends import('@hiveio/dhive').ExtendedAccount>(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, obj: import('@hiveio/dhive').ExtendedAccount[]) => value is S, thisArg?: any): S | undefined;
124
+ find(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, obj: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): import('@hiveio/dhive').ExtendedAccount | undefined;
125
+ findIndex(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, obj: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): number;
126
+ fill(value: import('@hiveio/dhive').ExtendedAccount, start?: number, end?: number): import('@hiveio/dhive').ExtendedAccount[];
127
+ copyWithin(target: number, start: number, end?: number): import('@hiveio/dhive').ExtendedAccount[];
128
+ entries(): ArrayIterator<[number, import('@hiveio/dhive').ExtendedAccount]>;
129
+ keys(): ArrayIterator<number>;
130
+ values(): ArrayIterator<import('@hiveio/dhive').ExtendedAccount>;
131
+ includes(searchElement: import('@hiveio/dhive').ExtendedAccount, fromIndex?: number): boolean;
132
+ flatMap<U, This = undefined>(callback: (this: This, value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U | readonly U[], thisArg?: This | undefined): U[];
133
+ flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
134
+ [Symbol.iterator](): ArrayIterator<import('@hiveio/dhive').ExtendedAccount>;
135
+ [Symbol.unscopables]: {
136
+ [x: number]: boolean | undefined;
137
+ length?: boolean | undefined;
138
+ toString?: boolean | undefined;
139
+ toLocaleString?: boolean | undefined;
140
+ pop?: boolean | undefined;
141
+ push?: boolean | undefined;
142
+ concat?: boolean | undefined;
143
+ join?: boolean | undefined;
144
+ reverse?: boolean | undefined;
145
+ shift?: boolean | undefined;
146
+ slice?: boolean | undefined;
147
+ sort?: boolean | undefined;
148
+ splice?: boolean | undefined;
149
+ unshift?: boolean | undefined;
150
+ indexOf?: boolean | undefined;
151
+ lastIndexOf?: boolean | undefined;
152
+ every?: boolean | undefined;
153
+ some?: boolean | undefined;
154
+ forEach?: boolean | undefined;
155
+ map?: boolean | undefined;
156
+ filter?: boolean | undefined;
157
+ reduce?: boolean | undefined;
158
+ reduceRight?: boolean | undefined;
159
+ find?: boolean | undefined;
160
+ findIndex?: boolean | undefined;
161
+ fill?: boolean | undefined;
162
+ copyWithin?: boolean | undefined;
163
+ entries?: boolean | undefined;
164
+ keys?: boolean | undefined;
165
+ values?: boolean | undefined;
166
+ includes?: boolean | undefined;
167
+ flatMap?: boolean | undefined;
168
+ flat?: boolean | undefined;
169
+ [Symbol.iterator]?: boolean | undefined;
170
+ readonly [Symbol.unscopables]?: boolean | undefined;
171
+ at?: boolean | undefined;
172
+ };
173
+ at(index: number): import('@hiveio/dhive').ExtendedAccount | undefined;
174
+ }, string[]>, "queryFn"> & {
175
+ queryFn?: import('@tanstack/query-core').QueryFunction<{
176
+ follow_stats: AccountFollowStats | undefined;
177
+ reputation: number;
178
+ profile: any;
179
+ length: number;
180
+ toString(): string;
181
+ toLocaleString(): string;
182
+ toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
183
+ pop(): import('@hiveio/dhive').ExtendedAccount | undefined;
184
+ push(...items: import('@hiveio/dhive').ExtendedAccount[]): number;
185
+ concat(...items: ConcatArray<import('@hiveio/dhive').ExtendedAccount>[]): import('@hiveio/dhive').ExtendedAccount[];
186
+ concat(...items: (import('@hiveio/dhive').ExtendedAccount | ConcatArray<import('@hiveio/dhive').ExtendedAccount>)[]): import('@hiveio/dhive').ExtendedAccount[];
187
+ join(separator?: string): string;
188
+ reverse(): import('@hiveio/dhive').ExtendedAccount[];
189
+ shift(): import('@hiveio/dhive').ExtendedAccount | undefined;
190
+ slice(start?: number, end?: number): import('@hiveio/dhive').ExtendedAccount[];
191
+ sort(compareFn?: ((a: import('@hiveio/dhive').ExtendedAccount, b: import('@hiveio/dhive').ExtendedAccount) => number) | undefined): import('@hiveio/dhive').ExtendedAccount[];
192
+ splice(start: number, deleteCount?: number): import('@hiveio/dhive').ExtendedAccount[];
193
+ splice(start: number, deleteCount: number, ...items: import('@hiveio/dhive').ExtendedAccount[]): import('@hiveio/dhive').ExtendedAccount[];
194
+ unshift(...items: import('@hiveio/dhive').ExtendedAccount[]): number;
195
+ indexOf(searchElement: import('@hiveio/dhive').ExtendedAccount, fromIndex?: number): number;
196
+ lastIndexOf(searchElement: import('@hiveio/dhive').ExtendedAccount, fromIndex?: number): number;
197
+ every<S extends import('@hiveio/dhive').ExtendedAccount>(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => value is S, thisArg?: any): this is S[];
198
+ every(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): boolean;
199
+ some(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): boolean;
200
+ forEach(callbackfn: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => void, thisArg?: any): void;
201
+ map<U>(callbackfn: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U, thisArg?: any): U[];
202
+ filter<S extends import('@hiveio/dhive').ExtendedAccount>(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => value is S, thisArg?: any): S[];
203
+ filter(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): import('@hiveio/dhive').ExtendedAccount[];
204
+ reduce(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
205
+ reduce(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount, initialValue: import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
206
+ reduce<U>(callbackfn: (previousValue: U, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U, initialValue: U): U;
207
+ reduceRight(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
208
+ reduceRight(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount, initialValue: import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
209
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U, initialValue: U): U;
210
+ find<S extends import('@hiveio/dhive').ExtendedAccount>(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, obj: import('@hiveio/dhive').ExtendedAccount[]) => value is S, thisArg?: any): S | undefined;
211
+ find(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, obj: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): import('@hiveio/dhive').ExtendedAccount | undefined;
212
+ findIndex(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, obj: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): number;
213
+ fill(value: import('@hiveio/dhive').ExtendedAccount, start?: number, end?: number): import('@hiveio/dhive').ExtendedAccount[];
214
+ copyWithin(target: number, start: number, end?: number): import('@hiveio/dhive').ExtendedAccount[];
215
+ entries(): ArrayIterator<[number, import('@hiveio/dhive').ExtendedAccount]>;
216
+ keys(): ArrayIterator<number>;
217
+ values(): ArrayIterator<import('@hiveio/dhive').ExtendedAccount>;
218
+ includes(searchElement: import('@hiveio/dhive').ExtendedAccount, fromIndex?: number): boolean;
219
+ flatMap<U, This = undefined>(callback: (this: This, value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U | readonly U[], thisArg?: This | undefined): U[];
220
+ flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
221
+ [Symbol.iterator](): ArrayIterator<import('@hiveio/dhive').ExtendedAccount>;
222
+ [Symbol.unscopables]: {
223
+ [x: number]: boolean | undefined;
224
+ length?: boolean | undefined;
225
+ toString?: boolean | undefined;
226
+ toLocaleString?: boolean | undefined;
227
+ pop?: boolean | undefined;
228
+ push?: boolean | undefined;
229
+ concat?: boolean | undefined;
230
+ join?: boolean | undefined;
231
+ reverse?: boolean | undefined;
232
+ shift?: boolean | undefined;
233
+ slice?: boolean | undefined;
234
+ sort?: boolean | undefined;
235
+ splice?: boolean | undefined;
236
+ unshift?: boolean | undefined;
237
+ indexOf?: boolean | undefined;
238
+ lastIndexOf?: boolean | undefined;
239
+ every?: boolean | undefined;
240
+ some?: boolean | undefined;
241
+ forEach?: boolean | undefined;
242
+ map?: boolean | undefined;
243
+ filter?: boolean | undefined;
244
+ reduce?: boolean | undefined;
245
+ reduceRight?: boolean | undefined;
246
+ find?: boolean | undefined;
247
+ findIndex?: boolean | undefined;
248
+ fill?: boolean | undefined;
249
+ copyWithin?: boolean | undefined;
250
+ entries?: boolean | undefined;
251
+ keys?: boolean | undefined;
252
+ values?: boolean | undefined;
253
+ includes?: boolean | undefined;
254
+ flatMap?: boolean | undefined;
255
+ flat?: boolean | undefined;
256
+ [Symbol.iterator]?: boolean | undefined;
257
+ readonly [Symbol.unscopables]?: boolean | undefined;
258
+ at?: boolean | undefined;
259
+ };
260
+ at(index: number): import('@hiveio/dhive').ExtendedAccount | undefined;
261
+ }, string[], never> | undefined;
262
+ } & {
263
+ queryKey: string[] & {
264
+ [dataTagSymbol]: {
265
+ follow_stats: AccountFollowStats | undefined;
266
+ reputation: number;
267
+ profile: any;
268
+ length: number;
269
+ toString(): string;
270
+ toLocaleString(): string;
271
+ toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
272
+ pop(): import('@hiveio/dhive').ExtendedAccount | undefined;
273
+ push(...items: import('@hiveio/dhive').ExtendedAccount[]): number;
274
+ concat(...items: ConcatArray<import('@hiveio/dhive').ExtendedAccount>[]): import('@hiveio/dhive').ExtendedAccount[];
275
+ concat(...items: (import('@hiveio/dhive').ExtendedAccount | ConcatArray<import('@hiveio/dhive').ExtendedAccount>)[]): import('@hiveio/dhive').ExtendedAccount[];
276
+ join(separator?: string): string;
277
+ reverse(): import('@hiveio/dhive').ExtendedAccount[];
278
+ shift(): import('@hiveio/dhive').ExtendedAccount | undefined;
279
+ slice(start?: number, end?: number): import('@hiveio/dhive').ExtendedAccount[];
280
+ sort(compareFn?: ((a: import('@hiveio/dhive').ExtendedAccount, b: import('@hiveio/dhive').ExtendedAccount) => number) | undefined): import('@hiveio/dhive').ExtendedAccount[];
281
+ splice(start: number, deleteCount?: number): import('@hiveio/dhive').ExtendedAccount[];
282
+ splice(start: number, deleteCount: number, ...items: import('@hiveio/dhive').ExtendedAccount[]): import('@hiveio/dhive').ExtendedAccount[];
283
+ unshift(...items: import('@hiveio/dhive').ExtendedAccount[]): number;
284
+ indexOf(searchElement: import('@hiveio/dhive').ExtendedAccount, fromIndex?: number): number;
285
+ lastIndexOf(searchElement: import('@hiveio/dhive').ExtendedAccount, fromIndex?: number): number;
286
+ every<S extends import('@hiveio/dhive').ExtendedAccount>(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => value is S, thisArg?: any): this is S[];
287
+ every(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): boolean;
288
+ some(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): boolean;
289
+ forEach(callbackfn: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => void, thisArg?: any): void;
290
+ map<U>(callbackfn: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U, thisArg?: any): U[];
291
+ filter<S extends import('@hiveio/dhive').ExtendedAccount>(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => value is S, thisArg?: any): S[];
292
+ filter(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): import('@hiveio/dhive').ExtendedAccount[];
293
+ reduce(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
294
+ reduce(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount, initialValue: import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
295
+ reduce<U>(callbackfn: (previousValue: U, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U, initialValue: U): U;
296
+ reduceRight(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
297
+ reduceRight(callbackfn: (previousValue: import('@hiveio/dhive').ExtendedAccount, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => import('@hiveio/dhive').ExtendedAccount, initialValue: import('@hiveio/dhive').ExtendedAccount): import('@hiveio/dhive').ExtendedAccount;
298
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: import('@hiveio/dhive').ExtendedAccount, currentIndex: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U, initialValue: U): U;
299
+ find<S extends import('@hiveio/dhive').ExtendedAccount>(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, obj: import('@hiveio/dhive').ExtendedAccount[]) => value is S, thisArg?: any): S | undefined;
300
+ find(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, obj: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): import('@hiveio/dhive').ExtendedAccount | undefined;
301
+ findIndex(predicate: (value: import('@hiveio/dhive').ExtendedAccount, index: number, obj: import('@hiveio/dhive').ExtendedAccount[]) => unknown, thisArg?: any): number;
302
+ fill(value: import('@hiveio/dhive').ExtendedAccount, start?: number, end?: number): import('@hiveio/dhive').ExtendedAccount[];
303
+ copyWithin(target: number, start: number, end?: number): import('@hiveio/dhive').ExtendedAccount[];
304
+ entries(): ArrayIterator<[number, import('@hiveio/dhive').ExtendedAccount]>;
305
+ keys(): ArrayIterator<number>;
306
+ values(): ArrayIterator<import('@hiveio/dhive').ExtendedAccount>;
307
+ includes(searchElement: import('@hiveio/dhive').ExtendedAccount, fromIndex?: number): boolean;
308
+ flatMap<U, This = undefined>(callback: (this: This, value: import('@hiveio/dhive').ExtendedAccount, index: number, array: import('@hiveio/dhive').ExtendedAccount[]) => U | readonly U[], thisArg?: This | undefined): U[];
309
+ flat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];
310
+ [Symbol.iterator](): ArrayIterator<import('@hiveio/dhive').ExtendedAccount>;
311
+ [Symbol.unscopables]: {
312
+ [x: number]: boolean | undefined;
313
+ length?: boolean | undefined;
314
+ toString?: boolean | undefined;
315
+ toLocaleString?: boolean | undefined;
316
+ pop?: boolean | undefined;
317
+ push?: boolean | undefined;
318
+ concat?: boolean | undefined;
319
+ join?: boolean | undefined;
320
+ reverse?: boolean | undefined;
321
+ shift?: boolean | undefined;
322
+ slice?: boolean | undefined;
323
+ sort?: boolean | undefined;
324
+ splice?: boolean | undefined;
325
+ unshift?: boolean | undefined;
326
+ indexOf?: boolean | undefined;
327
+ lastIndexOf?: boolean | undefined;
328
+ every?: boolean | undefined;
329
+ some?: boolean | undefined;
330
+ forEach?: boolean | undefined;
331
+ map?: boolean | undefined;
332
+ filter?: boolean | undefined;
333
+ reduce?: boolean | undefined;
334
+ reduceRight?: boolean | undefined;
335
+ find?: boolean | undefined;
336
+ findIndex?: boolean | undefined;
337
+ fill?: boolean | undefined;
338
+ copyWithin?: boolean | undefined;
339
+ entries?: boolean | undefined;
340
+ keys?: boolean | undefined;
341
+ values?: boolean | undefined;
342
+ includes?: boolean | undefined;
343
+ flatMap?: boolean | undefined;
344
+ flat?: boolean | undefined;
345
+ [Symbol.iterator]?: boolean | undefined;
346
+ readonly [Symbol.unscopables]?: boolean | undefined;
347
+ at?: boolean | undefined;
348
+ };
349
+ at(index: number): import('@hiveio/dhive').ExtendedAccount | undefined;
350
+ };
351
+ [dataTagErrorSymbol]: Error;
352
+ };
353
+ };
@@ -1 +1 @@
1
- export * from './search-accounts-by-username-query-options';
1
+ export * from './get-account-full-query-options';
@@ -0,0 +1,5 @@
1
+ export interface AccountFollowStats {
2
+ follower_count: number;
3
+ following_count: number;
4
+ account: string;
5
+ }
@@ -0,0 +1,4 @@
1
+ export interface AccountReputation {
2
+ account: string;
3
+ reputation: number;
4
+ }
@@ -0,0 +1,2 @@
1
+ export * from './account-follow-stats';
2
+ export * from './account-reputation';
@@ -0,0 +1,21 @@
1
+ import { InfiniteData, QueryClient, QueryKey, UseInfiniteQueryOptions, UseQueryOptions } from '@tanstack/react-query';
2
+ export declare function makeQueryClient(): QueryClient;
3
+ export declare const getQueryClient: () => QueryClient;
4
+ export declare namespace EcencyQueriesManager {
5
+ function getQueryData<T>(queryKey: QueryKey): T | undefined;
6
+ function getInfiniteQueryData<T>(queryKey: QueryKey): InfiniteData<T, unknown> | undefined;
7
+ function prefetchQuery<T>(options: UseQueryOptions<T>): Promise<T | undefined>;
8
+ function prefetchInfiniteQuery<T, P>(options: UseInfiniteQueryOptions<T, Error, InfiniteData<T>, T, QueryKey, P>): Promise<InfiniteData<T, unknown> | undefined>;
9
+ function generateClientServerQuery<T>(options: UseQueryOptions<T>): {
10
+ prefetch: () => Promise<T | undefined>;
11
+ getData: () => T | undefined;
12
+ useClientQuery: () => import("@tanstack/react-query").UseQueryResult<T, Error>;
13
+ fetchAndGet: () => Promise<T>;
14
+ };
15
+ function generateClientServerInfiniteQuery<T, P>(options: UseInfiniteQueryOptions<T, Error, InfiniteData<T>, T, QueryKey, P>): {
16
+ prefetch: () => Promise<InfiniteData<T, unknown> | undefined>;
17
+ getData: () => InfiniteData<T, unknown> | undefined;
18
+ useClientQuery: () => import("@tanstack/react-query").UseInfiniteQueryResult<InfiniteData<T, unknown>, Error>;
19
+ fetchAndGet: () => Promise<InfiniteData<T, P>>;
20
+ };
21
+ }
@@ -0,0 +1 @@
1
+ export * from './queries';
@@ -0,0 +1 @@
1
+ export * from './use-get-hive-engine-tokens-list-query-options';
@@ -0,0 +1,8 @@
1
+ export declare function getHiveEngineTokensListQueryOptions(username?: string, symbol?: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<import('../types').HiveEngineListResponseItem[], Error, import('../types').HiveEngineListResponseItem[], (string | undefined)[]>, "queryFn"> & {
2
+ queryFn?: import('@tanstack/query-core').QueryFunction<import('../types').HiveEngineListResponseItem[], (string | undefined)[], never> | undefined;
3
+ } & {
4
+ queryKey: (string | undefined)[] & {
5
+ [dataTagSymbol]: import('../types').HiveEngineListResponseItem[];
6
+ [dataTagErrorSymbol]: Error;
7
+ };
8
+ };
@@ -0,0 +1,18 @@
1
+ export interface HiveEngineListResponseItem {
2
+ _id: number;
3
+ symbol: string;
4
+ volume: string;
5
+ volumeExpiration: number;
6
+ lastPrice: string;
7
+ lowestAsk: string;
8
+ highestBid: string;
9
+ lastDayPrice: string;
10
+ lastDayPriceExpiration: number;
11
+ priceChangeHive: string;
12
+ priceChangePercent: string;
13
+ }
14
+ export interface HiveEngineListResponse {
15
+ jsonrpc: string;
16
+ id: number;
17
+ result: HiveEngineListResponseItem[];
18
+ }
@@ -0,0 +1 @@
1
+ export * from './hive-engine-list-response';
@@ -0,0 +1,8 @@
1
+ export declare enum EcencyWalletBasicTokens {
2
+ Points = 0,
3
+ HivePower = 1,
4
+ Hive = 2,
5
+ HiveDollar = 3,
6
+ Leo = 4,
7
+ Spk = 5
8
+ }
@@ -1 +1,2 @@
1
1
  export * from './ecency-wallet-currency';
2
+ export * from './ecency-wallet-basic-tokens';
@@ -0,0 +1,9 @@
1
+ import { AccountPointsResponse } from '../types';
2
+ export declare function getAccountPointsQueryOptions(username?: string, filter?: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<AccountPointsResponse, Error, AccountPointsResponse, (string | undefined)[]>, "queryFn"> & {
3
+ queryFn?: import('@tanstack/query-core').QueryFunction<AccountPointsResponse, (string | undefined)[], never> | undefined;
4
+ } & {
5
+ queryKey: (string | undefined)[] & {
6
+ [dataTagSymbol]: AccountPointsResponse;
7
+ [dataTagErrorSymbol]: Error;
8
+ };
9
+ };
@@ -2,3 +2,5 @@ export * from './use-get-external-wallet-query';
2
2
  export * from './use-seed-phrase';
3
3
  export * from './use-coingecko-price-query';
4
4
  export * from './use-hive-keys-query';
5
+ export * from './get-account-points-query-options';
6
+ export * from './use-get-all-tokens-list-query';
@@ -0,0 +1,2 @@
1
+ import { EcencyWalletBasicTokens } from '../enums';
2
+ export declare function useGetAccountWalletListQuery(username: string): import('@tanstack/react-query').UseQueryResult<EcencyWalletBasicTokens[], Error>;
@@ -0,0 +1,2 @@
1
+ import { EcencyWalletBasicTokens } from '../enums';
2
+ export declare function useGetAllTokensListQuery(): () => (string | EcencyWalletBasicTokens)[];
@@ -0,0 +1,4 @@
1
+ export interface AccountPointsResponse {
2
+ points: string;
3
+ unclaimed_points: string;
4
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './ecency-create-wallet-information';
2
2
  export * from './ecency-hive-keys';
3
+ export * from './account-points-response';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ecency/sdk",
3
3
  "private": false,
4
- "version": "1.0.18",
4
+ "version": "1.0.19",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "./dist/ecency-sdk.umd.js",