@ecency/sdk 1.0.17 → 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.
Files changed (65) hide show
  1. package/dist/config.d.ts +8 -0
  2. package/dist/ecency-sdk.es.js +173 -112
  3. package/dist/index.d.ts +3 -0
  4. package/dist/modules/accounts/index.d.ts +1 -0
  5. package/dist/modules/accounts/mutations/index.d.ts +1 -0
  6. package/dist/modules/accounts/mutations/use-account-update.d.ts +1 -0
  7. package/dist/modules/accounts/queries/get-account-full-query-options.d.ts +353 -0
  8. package/dist/modules/accounts/queries/index.d.ts +1 -0
  9. package/dist/modules/accounts/queries/search-accounts-by-username-query-options.d.ts +8 -0
  10. package/dist/modules/accounts/types/account-follow-stats.d.ts +5 -0
  11. package/dist/modules/accounts/types/account-reputation.d.ts +4 -0
  12. package/dist/modules/accounts/types/index.d.ts +2 -0
  13. package/dist/modules/core/entities/index.d.ts +1 -0
  14. package/dist/modules/core/entities/user.d.ts +8 -0
  15. package/dist/modules/core/index.d.ts +3 -0
  16. package/dist/modules/core/mutations/index.d.ts +1 -0
  17. package/dist/modules/core/mutations/use-broadcast-mutation.d.ts +3 -0
  18. package/dist/modules/core/queries-manager.d.ts +21 -0
  19. package/dist/modules/core/storage.d.ts +5 -0
  20. package/dist/modules/core/utils/decoder-encoder.d.ts +2 -0
  21. package/dist/modules/core/utils/index.d.ts +1 -0
  22. package/dist/modules/hive-engine/index.d.ts +1 -0
  23. package/dist/modules/hive-engine/queries/index.d.ts +1 -0
  24. package/dist/modules/hive-engine/queries/use-get-hive-engine-tokens-list-query-options.d.ts +8 -0
  25. package/dist/modules/hive-engine/types/hive-engine-list-response.d.ts +18 -0
  26. package/dist/modules/hive-engine/types/index.d.ts +1 -0
  27. package/dist/modules/keychain/index.d.ts +2 -0
  28. package/dist/modules/keychain/keychain.d.ts +9 -0
  29. package/dist/modules/operations/index.d.ts +1 -0
  30. package/dist/modules/operations/mutations/index.d.ts +3 -0
  31. package/dist/modules/operations/mutations/sign-operation-by-hivesigner.d.ts +4 -0
  32. package/dist/modules/operations/mutations/sign-operation-by-key.d.ts +5 -0
  33. package/dist/modules/operations/mutations/sign-operation-by-keychain.d.ts +5 -0
  34. package/dist/modules/wallets/enums/ecency-wallet-basic-tokens.d.ts +8 -0
  35. package/dist/modules/wallets/enums/ecency-wallet-currency.d.ts +9 -0
  36. package/dist/modules/wallets/enums/index.d.ts +2 -0
  37. package/dist/modules/wallets/functions/get-keys-from-seed.d.ts +3 -0
  38. package/dist/modules/wallets/functions/index.d.ts +1 -0
  39. package/dist/modules/wallets/index.d.ts +5 -0
  40. package/dist/modules/wallets/mutations/index.d.ts +4 -0
  41. package/dist/modules/wallets/mutations/private-api/check-wallet-existence.d.ts +7 -0
  42. package/dist/modules/wallets/mutations/private-api/create-account-with-wallets.d.ts +7 -0
  43. package/dist/modules/wallets/mutations/private-api/index.d.ts +2 -0
  44. package/dist/modules/wallets/mutations/private-api-namespace.d.ts +2 -0
  45. package/dist/modules/wallets/mutations/save-wallet-information-to-metadata.d.ts +5 -0
  46. package/dist/modules/wallets/mutations/use-import-wallet.d.ts +10 -0
  47. package/dist/modules/wallets/mutations/use-wallet-create.d.ts +6 -0
  48. package/dist/modules/wallets/queries/get-account-points-query-options.d.ts +9 -0
  49. package/dist/modules/wallets/queries/index.d.ts +6 -0
  50. package/dist/modules/wallets/queries/use-coingecko-price-query.d.ts +2 -0
  51. package/dist/modules/wallets/queries/use-get-account-wallet-list-query.d.ts +2 -0
  52. package/dist/modules/wallets/queries/use-get-all-tokens-list-query.d.ts +2 -0
  53. package/dist/modules/wallets/queries/use-get-external-wallet-query.d.ts +10 -0
  54. package/dist/modules/wallets/queries/use-hive-keys-query.d.ts +2 -0
  55. package/dist/modules/wallets/queries/use-seed-phrase.d.ts +1 -0
  56. package/dist/modules/wallets/types/account-points-response.d.ts +4 -0
  57. package/dist/modules/wallets/types/ecency-create-wallet-information.d.ts +9 -0
  58. package/dist/modules/wallets/types/ecency-hive-keys.d.ts +12 -0
  59. package/dist/modules/wallets/types/index.d.ts +3 -0
  60. package/dist/modules/wallets/utils/delay.d.ts +1 -0
  61. package/dist/modules/wallets/utils/get-wallet.d.ts +3 -0
  62. package/dist/modules/wallets/utils/index.d.ts +3 -0
  63. package/dist/modules/wallets/utils/mnemonic-to-seed-bip-39.d.ts +1 -0
  64. package/package.json +5 -5
  65. package/dist/ecency-sdk.es.d.ts +0 -136
@@ -0,0 +1,8 @@
1
+ import { Client } from '@hiveio/dhive';
2
+ export declare const CONFIG: {
3
+ privateApiHost: string;
4
+ storage: Storage;
5
+ storagePrefix: string;
6
+ hiveClient: Client;
7
+ heliusApiKey: any;
8
+ };
@@ -1,48 +1,48 @@
1
- import { useCallback as k } from "react";
2
- import { useQuery as h, useQueryClient as f, useMutation as l } from "@tanstack/react-query";
3
- import { BtcWallet as A } from "@okxweb3/coin-bitcoin";
4
- import { EthWallet as K } from "@okxweb3/coin-ethereum";
5
- import { TrxWallet as R } from "@okxweb3/coin-tron";
6
- import { TonWallet as C } from "@okxweb3/coin-ton";
7
- import { SolWallet as N } from "@okxweb3/coin-solana";
8
- import { AtomWallet as x } from "@okxweb3/coin-cosmos";
9
- import { AptosWallet as D } from "@okxweb3/coin-aptos";
10
- import _, { mnemonicToSeedSync as j } from "bip39";
11
- import { Client as B, PrivateKey as p, cryptoUtils as H } from "@hiveio/dhive";
12
- import { LRUCache as E } from "lru-cache";
13
- import g 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 || {});
15
- function F(t) {
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
+ import { TrxWallet as C } from "@okxweb3/coin-tron";
6
+ import { TonWallet as N } from "@okxweb3/coin-ton";
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
16
  return new Promise((e) => setTimeout(e, t));
17
17
  }
18
18
  function T(t) {
19
19
  switch (t) {
20
20
  case o.BTC:
21
- return new A();
21
+ return new R();
22
22
  case o.ETH:
23
- return new K();
23
+ return new H();
24
24
  case o.TRON:
25
- return new R();
26
- case o.TON:
27
25
  return new C();
28
- case o.SOL:
26
+ case o.TON:
29
27
  return new N();
28
+ case o.SOL:
29
+ return new j();
30
30
  case o.ATOM:
31
- return new x();
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 gt(t) {
39
- return j(t).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 B(
45
+ hiveClient: new F(
46
46
  [
47
47
  "https://api.hive.blog",
48
48
  "https://api.deathwing.me",
@@ -65,7 +65,7 @@ const u = {
65
65
  heliusApiKey: "fb1e2935-f911-4b1d-8e1c-3863f6879d42"
66
66
  };
67
67
  function Tt(t, e) {
68
- return h({
68
+ return m({
69
69
  queryKey: ["ecency-wallets", "external-wallet-balance", t, e],
70
70
  queryFn: async () => {
71
71
  switch (t) {
@@ -80,7 +80,7 @@ function Tt(t, e) {
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({
@@ -106,7 +106,7 @@ function Tt(t, e) {
106
106
  const y = (await (await fetch(
107
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
111
  return y ? parseInt(y.data.coin.value) / 1e8 : 0;
112
112
  case o.ATOM:
@@ -117,13 +117,13 @@ function Tt(t, e) {
117
117
  }
118
118
  });
119
119
  }
120
- function b(t) {
121
- return h({
120
+ function S(t) {
121
+ return m({
122
122
  queryKey: ["ecency-wallets", "seed", t],
123
123
  queryFn: async () => _.generateMnemonic(128)
124
124
  });
125
125
  }
126
- const W = {
126
+ const J = {
127
127
  max: 500,
128
128
  // how long to live in ms
129
129
  ttl: 1e3 * 60 * 5,
@@ -131,12 +131,12 @@ const W = {
131
131
  allowStale: !1,
132
132
  updateAgeOnGet: !1,
133
133
  updateAgeOnHas: !1
134
- }, v = new E(W), w = Symbol("undefined"), L = (t, e) => v.set(t, e === void 0 ? w : e), M = (t) => {
135
- const e = v.get(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
136
  return e === w ? void 0 : e;
137
137
  };
138
- function bt(t) {
139
- return h({
138
+ function St(t) {
139
+ return m({
140
140
  queryKey: ["ecency-wallets", "coingecko-price", t],
141
141
  queryFn: async () => {
142
142
  let e = t;
@@ -156,7 +156,7 @@ function bt(t) {
156
156
  default:
157
157
  e = t;
158
158
  }
159
- let n = M("gecko"), a;
159
+ let n = B("gecko"), a;
160
160
  if (n)
161
161
  a = n;
162
162
  else {
@@ -172,21 +172,21 @@ function bt(t) {
172
172
  })
173
173
  }
174
174
  )).json();
175
- L("gecko", i === void 0 ? w : 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
179
  enabled: !!t
180
180
  });
181
181
  }
182
- function q(t) {
183
- const { data: e } = b(t);
184
- return h({
182
+ function E(t) {
183
+ const { data: e } = S(t);
184
+ return m({
185
185
  queryKey: ["ecencу-wallets", "hive-keys", t, e],
186
186
  queryFn: async () => {
187
187
  if (!e)
188
188
  throw new Error("[Ecency][Wallets] - no seed to create Hive account");
189
- const n = p.fromLogin(t, e, "owner"), a = p.fromLogin(t, e, "active"), s = p.fromLogin(t, e, "posting"), r = p.fromLogin(t, e, "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
191
  username: t,
192
192
  owner: n.toString(),
@@ -201,7 +201,65 @@ function q(t) {
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,24 +275,24 @@ const I = {
217
275
  [o.ATOM]: "m/44'/118'/0'/0/0"
218
276
  // Cosmos (BIP44)
219
277
  };
220
- function vt(t, e) {
221
- const { data: n } = b(t), a = f(), s = l({
278
+ function Kt(t, e) {
279
+ const { data: n } = S(t), a = b(), s = u({
222
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
284
  const i = T(e), c = await (i == null ? void 0 : i.getDerivedPrivateKey({
227
285
  mnemonic: n,
228
- hdPath: I[e]
286
+ hdPath: G[e]
229
287
  }));
230
- await F(1e3);
231
- const m = await (i == null ? void 0 : i.getNewAddress({
288
+ await Q(1e3);
289
+ const h = await (i == null ? void 0 : i.getNewAddress({
232
290
  privateKey: c
233
291
  }));
234
292
  return {
235
293
  privateKey: c,
236
- address: m.address,
237
- publicKey: m.publicKey,
294
+ address: h.address,
295
+ publicKey: h.publicKey,
238
296
  username: t,
239
297
  currency: e
240
298
  };
@@ -245,20 +303,20 @@ function vt(t, e) {
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(t) {
256
- const { data: e } = h({
313
+ function W(t) {
314
+ const { data: e } = m({
257
315
  queryKey: ["ecency-wallets", "wallets", t]
258
- }), { data: n } = q(t);
259
- return l({
316
+ }), { data: n } = E(t);
317
+ return u({
260
318
  mutationKey: ["ecency-wallets", "create-account-with-wallets", t],
261
- mutationFn: ({ currency: a, address: s }) => fetch(u.privateApiHost + "/private-api/wallets-add", {
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"
@@ -284,11 +342,11 @@ function J(t) {
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
348
  mutationFn: async ({ address: t, currency: e }) => (await (await fetch(
291
- u.privateApiHost + "/private-api/wallets-exist",
349
+ p.privateApiHost + "/private-api/wallets-exist",
292
350
  {
293
351
  method: "POST",
294
352
  headers: {
@@ -302,11 +360,11 @@ function P() {
302
360
  )).json()).length === 0
303
361
  });
304
362
  }
305
- const Pt = /* @__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" })), Q = {
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,8 +375,8 @@ const Pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
317
375
  // Disabled
318
376
  [o.ATOM]: ["m/84'/118'/0'/0'/0"]
319
377
  };
320
- async function $(t, e, n) {
321
- for (const a of Q[n] || [])
378
+ async function V(t, e, n) {
379
+ for (const a of U[n] || [])
322
380
  try {
323
381
  const s = await e.getDerivedPrivateKey({
324
382
  mnemonic: t,
@@ -333,17 +391,17 @@ async function $(t, e, n) {
333
391
  }
334
392
  return [];
335
393
  }
336
- function St(t, e) {
337
- const n = f(), { mutateAsync: a } = P();
338
- return l({
394
+ function Rt(t, e) {
395
+ const n = b(), { mutateAsync: a } = A();
396
+ return u({
339
397
  mutationKey: ["ecency-wallets", "import-wallet", t, e],
340
398
  mutationFn: async ({ privateKeyOrSeed: s }) => {
341
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
- let c, m = s;
346
- if (i ? [m, c] = await $(
403
+ let c, h = s;
404
+ if (i ? [h, c] = await V(
347
405
  s,
348
406
  r,
349
407
  e
@@ -361,7 +419,7 @@ function St(t, e) {
361
419
  "This wallet has already in use by Hive account. Please, try another one"
362
420
  );
363
421
  return {
364
- privateKey: m,
422
+ privateKey: h,
365
423
  address: c,
366
424
  publicKey: ""
367
425
  };
@@ -381,41 +439,41 @@ function St(t, e) {
381
439
  }
382
440
  });
383
441
  }
384
- function G(t) {
442
+ function z(t) {
385
443
  let e = atob(t);
386
444
  if (e[0] === "{")
387
445
  return JSON.parse(e);
388
446
  }
389
- const d = (t) => {
447
+ const f = (t) => {
390
448
  try {
391
- const e = u.storage.getItem(
392
- u.storagePrefix + "_user_" + t
449
+ const e = p.storage.getItem(
450
+ p.storagePrefix + "_user_" + t
393
451
  );
394
- return G(JSON.parse(e));
452
+ return z(JSON.parse(e));
395
453
  } catch (e) {
396
454
  console.error(e);
397
455
  return;
398
456
  }
399
- }, U = (t) => d(t) && d(t).accessToken, V = (t) => d(t) && d(t).postingKey;
400
- function z(t = [], e, n) {
401
- return l({
457
+ }, X = (t) => f(t) && f(t).accessToken, Y = (t) => f(t) && f(t).postingKey;
458
+ function Z(t = [], e, n) {
459
+ return u({
402
460
  mutationKey: [...t, e],
403
461
  mutationFn: async (a) => {
404
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 = V(e);
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 = U(e);
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,8 +482,8 @@ function z(t = [], e, n) {
424
482
  }
425
483
  });
426
484
  }
427
- function X(t) {
428
- return z(
485
+ function tt(t) {
486
+ return Z(
429
487
  ["accounts", "update"],
430
488
  t,
431
489
  (e) => [
@@ -443,9 +501,9 @@ function X(t) {
443
501
  ]
444
502
  );
445
503
  }
446
- function Ot(t) {
447
- const { mutateAsync: e } = X(t);
448
- return l({
504
+ function Ht(t) {
505
+ const { mutateAsync: e } = tt(t);
506
+ return u({
449
507
  mutationKey: ["ecency-wallets", "save-wallet-to-metadata", t],
450
508
  mutationFn: ({
451
509
  wallets: n
@@ -460,8 +518,8 @@ function Ot(t) {
460
518
  )
461
519
  });
462
520
  }
463
- function kt(t) {
464
- return l({
521
+ function Ct(t) {
522
+ return u({
465
523
  mutationKey: ["operations", "sign", t],
466
524
  mutationFn: ({
467
525
  operation: e,
@@ -470,14 +528,14 @@ function kt(t) {
470
528
  if (!t)
471
529
  throw new Error("[Operations][Sign] – cannot sign op with anon user");
472
530
  let a;
473
- return n.split(" ").length === 12 ? a = p.fromLogin(t, n, "active") : H.isWif(n) ? a = p.fromString(n) : a = p.from(n), u.hiveClient.broadcast.sendOperations(
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(
474
532
  [e],
475
533
  a
476
534
  );
477
535
  }
478
536
  });
479
537
  }
480
- const Y = (t, e, n, a = null) => new Promise((s, r) => {
538
+ const et = (t, e, n, a = null) => new Promise((s, r) => {
481
539
  var i;
482
540
  (i = window.hive_keychain) == null || i.requestBroadcast(
483
541
  t,
@@ -489,40 +547,43 @@ const Y = (t, e, n, a = null) => new Promise((s, r) => {
489
547
  a
490
548
  );
491
549
  });
492
- function At(t, e = "Active") {
493
- return l({
550
+ function Nt(t, e = "Active") {
551
+ return u({
494
552
  mutationKey: ["operations", "sign-keychain", t],
495
553
  mutationFn: ({ operation: n }) => {
496
554
  if (!t)
497
555
  throw new Error(
498
556
  "[SDK][Keychain] – cannot sign operation with anon user"
499
557
  );
500
- return Y(t, [n], e);
558
+ return et(t, [n], e);
501
559
  }
502
560
  });
503
561
  }
504
- function Kt(t = "/") {
505
- return l({
562
+ function jt(t = "/") {
563
+ return u({
506
564
  mutationKey: ["operations", "sign-hivesigner", t],
507
- mutationFn: async ({ operation: e }) => g.sendOperation(e, { callback: t }, () => {
565
+ mutationFn: async ({ operation: e }) => P.sendOperation(e, { callback: t }, () => {
508
566
  })
509
567
  });
510
568
  }
511
569
  export {
570
+ d as EcencyWalletBasicTokens,
512
571
  o as EcencyWalletCurrency,
513
- Pt as EcencyWalletsPrivateApi,
514
- F as delay,
572
+ kt as EcencyWalletsPrivateApi,
573
+ Q as delay,
574
+ Ot as getAccountPointsQueryOptions,
515
575
  T as getWallet,
516
- gt as mnemonicToSeedBip39,
517
- X as useAccountUpdate,
518
- bt as useCoinGeckoPriceQuery,
576
+ Pt as mnemonicToSeedBip39,
577
+ tt as useAccountUpdate,
578
+ St as useCoinGeckoPriceQuery,
579
+ At as useGetAllTokensListQuery,
519
580
  Tt as useGetExternalWalletBalanceQuery,
520
- q as useHiveKeysQuery,
521
- St as useImportWallet,
522
- Ot as useSaveWalletInformationToMetadata,
523
- b as useSeedPhrase,
524
- Kt as useSignOperationByHivesigner,
525
- kt as useSignOperationByKey,
526
- At as useSignOperationByKeychain,
527
- vt as useWalletCreate
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
528
589
  };
@@ -0,0 +1,3 @@
1
+ export * from './modules/wallets';
2
+ export * from './modules/accounts';
3
+ export * from './modules/operations';
@@ -0,0 +1 @@
1
+ export * from './mutations';
@@ -0,0 +1 @@
1
+ export * from './use-account-update';
@@ -0,0 +1 @@
1
+ export declare function useAccountUpdate(username: string): import('@tanstack/react-query').UseMutationResult<any, Error, any, unknown>;