@ecency/sdk 1.0.18 → 1.0.20

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";
5
- import { TrxWallet as C } from "@okxweb3/coin-tron";
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 C } from "@okxweb3/coin-ethereum";
5
+ import { TrxWallet as H } 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) {
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 L, { mnemonicToSeedSync as _ } from "bip39";
11
+ import { Client as F, PrivateKey as l, cryptoUtils as B } from "@hiveio/dhive";
12
+ import { LRUCache as E } from "lru-cache";
13
+ import T from "hivesigner";
14
+ var a = /* @__PURE__ */ ((e) => (e.BTC = "BTC", e.ETH = "ETH", e.APT = "APT", e.ATOM = "ATOM", e.TON = "TON", e.TRON = "TRX", e.SOL = "SOL", e))(a || {}), h = /* @__PURE__ */ ((e) => (e.Points = "POINTS", e.HivePower = "HP", e.Hive = "HIVE", e.HiveDollar = "HBD", e.Spk = "SPK", e))(h || {});
15
+ function q(e) {
16
16
  return new Promise((t) => setTimeout(t, e));
17
17
  }
18
- function T(e) {
18
+ function P(e) {
19
19
  switch (e) {
20
- case o.BTC:
21
- return new K();
22
- case o.ETH:
20
+ case a.BTC:
23
21
  return new R();
24
- case o.TRON:
22
+ case a.ETH:
25
23
  return new C();
26
- case o.TON:
24
+ case a.TRON:
25
+ return new H();
26
+ case a.TON:
27
27
  return new N();
28
- case o.SOL:
29
- return new _();
30
- case o.ATOM:
31
- return new B();
32
- case o.APT:
28
+ case a.SOL:
29
+ return new j();
30
+ case a.ATOM:
33
31
  return new D();
32
+ case a.APT:
33
+ return new x();
34
34
  default:
35
35
  return;
36
36
  }
37
37
  }
38
38
  function Te(e) {
39
- return H(e).toString("hex");
39
+ return _(e).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,23 +64,23 @@ const u = {
64
64
  ),
65
65
  heliusApiKey: "fb1e2935-f911-4b1d-8e1c-3863f6879d42"
66
66
  };
67
- function be(e, t) {
67
+ function Pe(e, t) {
68
68
  return m({
69
69
  queryKey: ["ecency-wallets", "external-wallet-balance", e, t],
70
70
  queryFn: async () => {
71
71
  switch (e) {
72
- case o.BTC:
73
- const a = await (await fetch(
72
+ case a.BTC:
73
+ const o = await (await fetch(
74
74
  `https://mempool.space/api/address/${t}`
75
75
  )).json();
76
- return (a.chain_stats.funded_txo_sum - a.chain_stats.spent_txo_sum) / 1e8;
77
- case o.ETH:
76
+ return (o.chain_stats.funded_txo_sum - o.chain_stats.spent_txo_sum) / 1e8;
77
+ case a.ETH:
78
78
  return +(await (await fetch(
79
79
  `https://api.ethplorer.io/getAddressInfo/${t}?apiKey=freekey`
80
80
  )).json()).ETH.balance;
81
- case o.SOL:
81
+ case a.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({
@@ -94,22 +94,22 @@ function be(e, t) {
94
94
  }
95
95
  }
96
96
  )).json()).result.value / 1e9;
97
- case o.TRON:
97
+ case a.TRON:
98
98
  return (await (await fetch(
99
99
  `https://api.trongrid.io/v1/accounts/${t}`
100
100
  )).json()).data[0].balance / 1e6;
101
- case o.TON:
101
+ case a.TON:
102
102
  return (await (await fetch(
103
103
  `https://tonapi.io/v1/blockchain/getAccount?account=${t}`
104
104
  )).json()).balance / 1e9;
105
- case o.APT:
105
+ case a.APT:
106
106
  const f = (await (await fetch(
107
107
  `https://fullnode.mainnet.aptoslabs.com/v1/accounts/${t}/resources`
108
108
  )).json()).find(
109
- (O) => O.type.includes("coin::CoinStore")
109
+ (K) => K.type.includes("coin::CoinStore")
110
110
  );
111
111
  return f ? parseInt(f.data.coin.value) / 1e8 : 0;
112
- case o.ATOM:
112
+ case a.ATOM:
113
113
  return +(await (await fetch(
114
114
  `https://rest.cosmos.directory/cosmoshub/auth/accounts/${t}`
115
115
  )).json()).result.value.coins[0].amount / 1e6;
@@ -117,13 +117,13 @@ function be(e, t) {
117
117
  }
118
118
  });
119
119
  }
120
- function b(e) {
120
+ function S(e) {
121
121
  return m({
122
122
  queryKey: ["ecency-wallets", "seed", e],
123
- queryFn: async () => j.generateMnemonic(128)
123
+ queryFn: async () => L.generateMnemonic(128)
124
124
  });
125
125
  }
126
- const q = {
126
+ const M = {
127
127
  max: 500,
128
128
  // how long to live in ms
129
129
  ttl: 1e3 * 60 * 5,
@@ -131,34 +131,34 @@ 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);
134
+ }, O = new E(M), y = Symbol("undefined"), W = (e, t) => O.set(e, t === void 0 ? y : t), Q = (e) => {
135
+ const t = O.get(e);
136
136
  return t === y ? void 0 : t;
137
137
  };
138
- function ve(e) {
138
+ function Se(e) {
139
139
  return m({
140
140
  queryKey: ["ecency-wallets", "coingecko-price", e],
141
141
  queryFn: async () => {
142
142
  let t = e;
143
143
  switch (e) {
144
- case o.BTC:
144
+ case a.BTC:
145
145
  t = "binance-wrapped-btc";
146
146
  break;
147
- case o.ETH:
147
+ case a.ETH:
148
148
  t = "ethereum";
149
149
  break;
150
- case o.SOL:
150
+ case a.SOL:
151
151
  t = "solana";
152
152
  break;
153
- case o.TON:
153
+ case a.TON:
154
154
  t = "trx";
155
155
  break;
156
156
  default:
157
157
  t = e;
158
158
  }
159
- let n = L("gecko"), a;
159
+ let n = Q("gecko"), o;
160
160
  if (n)
161
- a = n;
161
+ o = n;
162
162
  else {
163
163
  const i = await (await fetch(
164
164
  "https://api.coingecko.com/api/v3/simple/price",
@@ -172,100 +172,166 @@ function ve(e) {
172
172
  })
173
173
  }
174
174
  )).json();
175
- M("gecko", i === void 0 ? y : i), a = i;
175
+ W("gecko", i === void 0 ? y : i), o = i;
176
176
  }
177
- return 1 / +a[Object.keys(a)[0]].usd;
177
+ return 1 / +o[Object.keys(o)[0]].usd;
178
178
  },
179
179
  enabled: !!e
180
180
  });
181
181
  }
182
- function Q(e) {
183
- const { data: t } = b(e);
182
+ function I(e) {
183
+ const { data: t } = S(e);
184
184
  return m({
185
185
  queryKey: ["ecencу-wallets", "hive-keys", e, t],
186
186
  queryFn: async () => {
187
187
  if (!t)
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(e, t, "owner"), o = l.fromLogin(e, t, "active"), s = l.fromLogin(e, t, "posting"), r = l.fromLogin(e, t, "memo");
190
190
  return {
191
191
  username: e,
192
192
  owner: n.toString(),
193
- active: a.toString(),
193
+ active: o.toString(),
194
194
  posting: s.toString(),
195
195
  memo: r.toString(),
196
196
  ownerPubkey: n.createPublic().toString(),
197
- activePubkey: a.createPublic().toString(),
197
+ activePubkey: o.createPublic().toString(),
198
198
  postingPubkey: s.createPublic().toString(),
199
199
  memoPubkey: r.createPublic().toString()
200
200
  };
201
201
  }
202
202
  });
203
203
  }
204
- const I = {
205
- [o.BTC]: "m/44'/0'/0'/0/0",
204
+ function Oe(e, t) {
205
+ return v({
206
+ queryKey: ["ecency-wallets", "points", e, t],
207
+ queryFn: async () => await (await fetch(
208
+ `${p.privateApiHost}/private-api/points`,
209
+ {
210
+ method: "POST",
211
+ body: JSON.stringify({
212
+ username: e.replace("@", "")
213
+ })
214
+ }
215
+ )).json(),
216
+ staleTime: 3e4,
217
+ refetchOnMount: !0,
218
+ enabled: !!e
219
+ });
220
+ }
221
+ function J(e, t) {
222
+ return v({
223
+ queryKey: ["hive-engine", "tokens-list", e, t],
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: t,
236
+ account: e
237
+ }
238
+ },
239
+ id: 1
240
+ }),
241
+ headers: { "Content-type": "application/json" }
242
+ }
243
+ )).json()).result
244
+ });
245
+ }
246
+ function Ae(e) {
247
+ const { data: t } = m(J());
248
+ return g(
249
+ () => {
250
+ var n;
251
+ return {
252
+ basic: [
253
+ h.Points,
254
+ h.Hive,
255
+ h.HivePower,
256
+ h.HiveDollar,
257
+ h.Spk
258
+ ].filter((o) => o.toLowerCase().includes(e.toLowerCase())),
259
+ external: Object.values(a).filter(
260
+ (o) => o.toLowerCase().includes(e.toLowerCase())
261
+ ),
262
+ layer2: ((n = t == null ? void 0 : t.map(({ symbol: o }) => o)) == null ? void 0 : n.filter(
263
+ (o) => o.toLowerCase().includes(e.toLowerCase())
264
+ )) ?? []
265
+ };
266
+ },
267
+ [t, e]
268
+ );
269
+ }
270
+ const $ = {
271
+ [a.BTC]: "m/44'/0'/0'/0/0",
206
272
  // Bitcoin (BIP44)
207
- [o.ETH]: "m/44'/60'/0'/0/0",
273
+ [a.ETH]: "m/44'/60'/0'/0/0",
208
274
  // Ethereum (BIP44)
209
- [o.SOL]: "m/44'/501'/0'/0'",
275
+ [a.SOL]: "m/44'/501'/0'/0'",
210
276
  // Solana (BIP44)
211
- [o.TON]: "m/44'/607'/0'",
277
+ [a.TON]: "m/44'/607'/0'",
212
278
  // TON (BIP44)
213
- [o.TRON]: "m/44'/195'/0'/0/0",
279
+ [a.TRON]: "m/44'/195'/0'/0/0",
214
280
  // Tron (BIP44)
215
- [o.APT]: "m/44'/637'/0'/0'/0'",
281
+ [a.APT]: "m/44'/637'/0'/0'/0'",
216
282
  // Aptos (BIP44)
217
- [o.ATOM]: "m/44'/118'/0'/0/0"
283
+ [a.ATOM]: "m/44'/118'/0'/0/0"
218
284
  // Cosmos (BIP44)
219
285
  };
220
- function Pe(e, t) {
221
- const { data: n } = b(e), a = w(), s = l({
286
+ function ke(e, t) {
287
+ const { data: n } = S(e), o = b(), s = u({
222
288
  mutationKey: ["ecency-wallets", "create-wallet", e, t],
223
289
  mutationFn: async () => {
224
290
  if (!n)
225
291
  throw new Error("[Ecency][Wallets] - No seed to create a wallet");
226
- const i = T(t), c = await (i == null ? void 0 : i.getDerivedPrivateKey({
292
+ const i = P(t), c = await (i == null ? void 0 : i.getDerivedPrivateKey({
227
293
  mnemonic: n,
228
- hdPath: I[t]
294
+ hdPath: $[t]
229
295
  }));
230
- await W(1e3);
231
- const h = await (i == null ? void 0 : i.getNewAddress({
296
+ await q(1e3);
297
+ const d = await (i == null ? void 0 : i.getNewAddress({
232
298
  privateKey: c
233
299
  }));
234
300
  return {
235
301
  privateKey: c,
236
- address: h.address,
237
- publicKey: h.publicKey,
302
+ address: d.address,
303
+ publicKey: d.publicKey,
238
304
  username: e,
239
305
  currency: t
240
306
  };
241
307
  },
242
308
  onSuccess: (i) => {
243
- a.setQueryData(
309
+ o.setQueryData(
244
310
  ["ecency-wallets", "wallets", i.username],
245
311
  (c) => new Map(c ? Array.from(c.entries()) : []).set(i.currency, i)
246
312
  );
247
313
  }
248
- }), r = k(() => {
314
+ }), r = g(() => {
249
315
  }, []);
250
316
  return {
251
317
  createWallet: s,
252
318
  importWallet: r
253
319
  };
254
320
  }
255
- function J(e) {
321
+ function G(e) {
256
322
  const { data: t } = m({
257
323
  queryKey: ["ecency-wallets", "wallets", e]
258
- }), { data: n } = Q(e);
259
- return l({
324
+ }), { data: n } = I(e);
325
+ return u({
260
326
  mutationKey: ["ecency-wallets", "create-account-with-wallets", e],
261
- mutationFn: ({ currency: a, address: s }) => fetch(u.privateApiHost + "/private-api/wallets-add", {
327
+ mutationFn: ({ currency: o, address: s }) => fetch(p.privateApiHost + "/private-api/wallets-add", {
262
328
  method: "POST",
263
329
  headers: {
264
330
  "Content-Type": "application/json"
265
331
  },
266
332
  body: JSON.stringify({
267
333
  username: e,
268
- token: a,
334
+ token: o,
269
335
  address: s,
270
336
  meta: {
271
337
  ownerPublicKey: n == null ? void 0 : n.ownerPubkey,
@@ -284,11 +350,11 @@ function J(e) {
284
350
  })
285
351
  });
286
352
  }
287
- function P() {
288
- return l({
353
+ function A() {
354
+ return u({
289
355
  mutationKey: ["ecency-wallets", "check-wallet-existence"],
290
356
  mutationFn: async ({ address: e, currency: t }) => (await (await fetch(
291
- u.privateApiHost + "/private-api/wallets-exist",
357
+ p.privateApiHost + "/private-api/wallets-exist",
292
358
  {
293
359
  method: "POST",
294
360
  headers: {
@@ -302,30 +368,30 @@ function P() {
302
368
  )).json()).length === 0
303
369
  });
304
370
  }
305
- const Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
371
+ const Ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
306
372
  __proto__: null,
307
- useCheckWalletExistence: P,
308
- useCreateAccountWithWallets: J
309
- }, Symbol.toStringTag, { value: "Module" })), $ = {
310
- [o.BTC]: ["m/84'/0'/0'/0/0"],
311
- [o.ETH]: ["m/84'/60'/0'/0/0"],
373
+ useCheckWalletExistence: A,
374
+ useCreateAccountWithWallets: G
375
+ }, Symbol.toStringTag, { value: "Module" })), V = {
376
+ [a.BTC]: ["m/84'/0'/0'/0/0"],
377
+ [a.ETH]: ["m/84'/60'/0'/0/0"],
312
378
  // its not working for Trust, Exodus, todo: check others below
313
- [o.SOL]: ["m/84'/501'/0'/0/0"],
314
- [o.TRON]: ["m/44'/195'/0'/0'/0'"],
315
- [o.APT]: ["m/84'/637'/0'/0/0"],
316
- [o.TON]: [],
379
+ [a.SOL]: ["m/84'/501'/0'/0/0"],
380
+ [a.TRON]: ["m/44'/195'/0'/0'/0'"],
381
+ [a.APT]: ["m/84'/637'/0'/0/0"],
382
+ [a.TON]: [],
317
383
  // Disabled
318
- [o.ATOM]: ["m/84'/118'/0'/0'/0"]
384
+ [a.ATOM]: ["m/84'/118'/0'/0'/0"]
319
385
  };
320
- async function G(e, t, n) {
321
- for (const a of $[n] || [])
386
+ async function U(e, t, n) {
387
+ for (const o of V[n] || [])
322
388
  try {
323
389
  const s = await t.getDerivedPrivateKey({
324
390
  mnemonic: e,
325
- hdPath: a
391
+ hdPath: o
326
392
  }), r = await t.getNewAddress({
327
393
  privateKey: s,
328
- addressType: n === o.BTC ? "segwit_native" : void 0
394
+ addressType: n === a.BTC ? "segwit_native" : void 0
329
395
  });
330
396
  return [s.toString(), r.address];
331
397
  } catch {
@@ -333,17 +399,17 @@ async function G(e, t, n) {
333
399
  }
334
400
  return [];
335
401
  }
336
- function Oe(e, t) {
337
- const n = w(), { mutateAsync: a } = P();
338
- return l({
402
+ function Re(e, t) {
403
+ const n = b(), { mutateAsync: o } = A();
404
+ return u({
339
405
  mutationKey: ["ecency-wallets", "import-wallet", e, t],
340
406
  mutationFn: async ({ privateKeyOrSeed: s }) => {
341
- const r = T(t);
407
+ const r = P(t);
342
408
  if (!r)
343
409
  throw new Error("Cannot find token for this currency");
344
410
  const i = s.split(" ").length === 12;
345
- let c, h = s;
346
- if (i ? [h, c] = await G(
411
+ let c, d = s;
412
+ if (i ? [d, c] = await U(
347
413
  s,
348
414
  r,
349
415
  t
@@ -353,7 +419,7 @@ function Oe(e, t) {
353
419
  throw new Error(
354
420
  "Private key/seed phrase isn't matching with public key or token"
355
421
  );
356
- if (!await a({
422
+ if (!await o({
357
423
  address: c,
358
424
  currency: t
359
425
  }))
@@ -361,7 +427,7 @@ function Oe(e, t) {
361
427
  "This wallet has already in use by Hive account. Please, try another one"
362
428
  );
363
429
  return {
364
- privateKey: h,
430
+ privateKey: d,
365
431
  address: c,
366
432
  publicKey: ""
367
433
  };
@@ -381,51 +447,51 @@ function Oe(e, t) {
381
447
  }
382
448
  });
383
449
  }
384
- function U(e) {
450
+ function z(e) {
385
451
  let t = atob(e);
386
452
  if (t[0] === "{")
387
453
  return JSON.parse(t);
388
454
  }
389
- const d = (e) => {
455
+ const w = (e) => {
390
456
  try {
391
- const t = u.storage.getItem(
392
- u.storagePrefix + "_user_" + e
457
+ const t = p.storage.getItem(
458
+ p.storagePrefix + "_user_" + e
393
459
  );
394
- return U(JSON.parse(t));
460
+ return z(JSON.parse(t));
395
461
  } catch (t) {
396
462
  console.error(t);
397
463
  return;
398
464
  }
399
- }, V = (e) => d(e) && d(e).accessToken, z = (e) => d(e) && d(e).postingKey;
400
- function X(e = [], t, n) {
401
- return l({
465
+ }, X = (e) => w(e) && w(e).accessToken, Y = (e) => w(e) && w(e).postingKey;
466
+ function Z(e = [], t, n) {
467
+ return u({
402
468
  mutationKey: [...e, t],
403
- mutationFn: async (a) => {
469
+ mutationFn: async (o) => {
404
470
  if (!t)
405
471
  throw new Error(
406
472
  "[Core][Broadcast] Attempted to call broadcast API with anon user"
407
473
  );
408
- const s = z(t);
474
+ const s = Y(t);
409
475
  if (s) {
410
- const i = p.fromString(s);
411
- return u.hiveClient.broadcast.sendOperations(
412
- n(a),
476
+ const i = l.fromString(s);
477
+ return p.hiveClient.broadcast.sendOperations(
478
+ n(o),
413
479
  i
414
480
  );
415
481
  }
416
- let r = V(t);
482
+ let r = X(t);
417
483
  if (r)
418
- return (await new g.Client({
484
+ return (await new T.Client({
419
485
  accessToken: r
420
- }).broadcast(n(a))).result;
486
+ }).broadcast(n(o))).result;
421
487
  throw new Error(
422
488
  "[SDK][Broadcast] – cannot broadcast w/o posting key or token"
423
489
  );
424
490
  }
425
491
  });
426
492
  }
427
- function Y(e) {
428
- return X(
493
+ function ee(e) {
494
+ return Z(
429
495
  ["accounts", "update"],
430
496
  e,
431
497
  (t) => [
@@ -443,28 +509,16 @@ function Y(e) {
443
509
  ]
444
510
  );
445
511
  }
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({
512
+ function Ce(e) {
513
+ const { mutateAsync: t } = ee(e);
514
+ return u({
461
515
  mutationKey: ["ecency-wallets", "save-wallet-to-metadata", e],
462
516
  mutationFn: ({
463
517
  wallets: n
464
518
  }) => t(
465
519
  Array.from(n.entries() ?? []).reduce(
466
- (a, [s, r]) => ({
467
- ...a,
520
+ (o, [s, r]) => ({
521
+ ...o,
468
522
  [s]: r.address
469
523
  }),
470
524
  {}
@@ -472,8 +526,8 @@ function Ae(e) {
472
526
  )
473
527
  });
474
528
  }
475
- function Ke(e) {
476
- return l({
529
+ function He(e) {
530
+ return u({
477
531
  mutationKey: ["operations", "sign", e],
478
532
  mutationFn: ({
479
533
  operation: t,
@@ -481,15 +535,15 @@ function Ke(e) {
481
535
  }) => {
482
536
  if (!e)
483
537
  throw new Error("[Operations][Sign] – cannot sign op with anon user");
484
- 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(
538
+ let o;
539
+ return n.split(" ").length === 12 ? o = l.fromLogin(e, n, "active") : B.isWif(n) ? o = l.fromString(n) : o = l.from(n), p.hiveClient.broadcast.sendOperations(
486
540
  [t],
487
- a
541
+ o
488
542
  );
489
543
  }
490
544
  });
491
545
  }
492
- const Z = (e, t, n, a = null) => new Promise((s, r) => {
546
+ const te = (e, t, n, o = null) => new Promise((s, r) => {
493
547
  var i;
494
548
  (i = window.hive_keychain) == null || i.requestBroadcast(
495
549
  e,
@@ -498,44 +552,46 @@ const Z = (e, t, n, a = null) => new Promise((s, r) => {
498
552
  (c) => {
499
553
  c.success || r({ message: "Operation cancelled" }), s(c);
500
554
  },
501
- a
555
+ o
502
556
  );
503
557
  });
504
- function Re(e, t = "Active") {
505
- return l({
558
+ function Ne(e, t = "Active") {
559
+ return u({
506
560
  mutationKey: ["operations", "sign-keychain", e],
507
561
  mutationFn: ({ operation: n }) => {
508
562
  if (!e)
509
563
  throw new Error(
510
564
  "[SDK][Keychain] – cannot sign operation with anon user"
511
565
  );
512
- return Z(e, [n], t);
566
+ return te(e, [n], t);
513
567
  }
514
568
  });
515
569
  }
516
- function Ce(e = "/") {
517
- return l({
570
+ function je(e = "/") {
571
+ return u({
518
572
  mutationKey: ["operations", "sign-hivesigner", e],
519
- mutationFn: async ({ operation: t }) => g.sendOperation(t, { callback: e }, () => {
573
+ mutationFn: async ({ operation: t }) => T.sendOperation(t, { callback: e }, () => {
520
574
  })
521
575
  });
522
576
  }
523
577
  export {
524
- o as EcencyWalletCurrency,
525
- Se as EcencyWalletsPrivateApi,
526
- W as delay,
527
- ke as getSearchAccountsByUsernameQueryOptions,
528
- T as getWallet,
578
+ h as EcencyWalletBasicTokens,
579
+ a as EcencyWalletCurrency,
580
+ Ke as EcencyWalletsPrivateApi,
581
+ q as delay,
582
+ Oe as getAccountPointsQueryOptions,
583
+ P as getWallet,
529
584
  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
585
+ ee as useAccountUpdate,
586
+ Se as useCoinGeckoPriceQuery,
587
+ Ae as useGetAllTokensListQuery,
588
+ Pe as useGetExternalWalletBalanceQuery,
589
+ I as useHiveKeysQuery,
590
+ Re as useImportWallet,
591
+ Ce as useSaveWalletInformationToMetadata,
592
+ S as useSeedPhrase,
593
+ je as useSignOperationByHivesigner,
594
+ He as useSignOperationByKey,
595
+ Ne as useSignOperationByKeychain,
596
+ ke as useWalletCreate
541
597
  };
@@ -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,7 @@
1
+ export declare enum EcencyWalletBasicTokens {
2
+ Points = "POINTS",
3
+ HivePower = "HP",
4
+ Hive = "HIVE",
5
+ HiveDollar = "HBD",
6
+ Spk = "SPK"
7
+ }
@@ -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,6 @@
1
+ import { EcencyWalletBasicTokens, EcencyWalletCurrency } from '../enums';
2
+ export declare function useGetAllTokensListQuery(query: string): () => {
3
+ basic: EcencyWalletBasicTokens[];
4
+ external: EcencyWalletCurrency[];
5
+ layer2: string[];
6
+ };
@@ -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.20",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "./dist/ecency-sdk.umd.js",