@ecency/wallets 1.2.23 → 1.3.0

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 (89) hide show
  1. package/dist/ecency-sdk.es.js +1888 -257
  2. package/dist/modules/assets/hive/consts/hive-account-operation-groups.d.ts +2 -0
  3. package/dist/modules/assets/hive/consts/index.d.ts +1 -0
  4. package/dist/modules/assets/hive/index.d.ts +2 -0
  5. package/dist/modules/assets/hive/mutations/delegate.d.ts +13 -0
  6. package/dist/modules/assets/hive/mutations/index.d.ts +6 -0
  7. package/dist/modules/assets/hive/mutations/power-down.d.ts +11 -0
  8. package/dist/modules/assets/hive/mutations/power-up.d.ts +13 -0
  9. package/dist/modules/assets/hive/mutations/transfer-to-savings.d.ts +13 -0
  10. package/dist/modules/assets/hive/mutations/transfer.d.ts +12 -0
  11. package/dist/modules/assets/hive/mutations/withdraw-route.d.ts +13 -0
  12. package/dist/modules/assets/hive/queries/get-hbd-asset-general-info-query-options.d.ts +76 -0
  13. package/dist/modules/assets/hive/queries/get-hbd-asset-transactions-query-options.d.ts +9 -0
  14. package/dist/modules/assets/hive/queries/get-hive-asset-general-info-query-options.d.ts +28 -0
  15. package/dist/modules/assets/hive/queries/get-hive-asset-metric-query-options.d.ts +43 -0
  16. package/dist/modules/assets/hive/queries/get-hive-asset-transactions-query-options.d.ts +9 -0
  17. package/dist/modules/assets/hive/queries/get-hive-asset-withdrawal-routes-query-options.d.ts +9 -0
  18. package/dist/modules/assets/hive/queries/get-hive-power-asset-general-info-query-options.d.ts +76 -0
  19. package/dist/modules/assets/hive/queries/get-hive-power-asset-transactions-query-options.d.ts +9 -0
  20. package/dist/modules/assets/hive/queries/index.d.ts +8 -0
  21. package/dist/modules/assets/hive/types/hive-market-metric.d.ts +19 -0
  22. package/dist/modules/assets/hive/types/hive-operation-group.d.ts +1 -0
  23. package/dist/modules/assets/hive/types/hive-transaction.d.ts +198 -0
  24. package/dist/modules/assets/hive/types/hive-withdraw-route.d.ts +7 -0
  25. package/dist/modules/assets/hive/types/index.d.ts +4 -0
  26. package/dist/modules/assets/hive-engine/index.d.ts +3 -0
  27. package/dist/modules/assets/hive-engine/mutations/delegate.d.ts +12 -0
  28. package/dist/modules/assets/hive-engine/mutations/index.d.ts +5 -0
  29. package/dist/modules/assets/hive-engine/mutations/stake.d.ts +12 -0
  30. package/dist/modules/assets/hive-engine/mutations/transfer.d.ts +13 -0
  31. package/dist/modules/assets/hive-engine/mutations/undelegate.d.ts +12 -0
  32. package/dist/modules/assets/hive-engine/mutations/unstake.d.ts +12 -0
  33. package/dist/modules/assets/hive-engine/queries/get-hive-engine-token-general-info-query-options.d.ts +32 -0
  34. package/dist/modules/assets/hive-engine/queries/get-hive-engine-token-metrics-query-options.d.ts +9 -0
  35. package/dist/modules/assets/hive-engine/queries/get-hive-engine-token-transactions-query-options.d.ts +9 -0
  36. package/dist/modules/assets/hive-engine/queries/get-hive-engine-tokens-balances-query-options.d.ts +9 -0
  37. package/dist/modules/assets/hive-engine/queries/get-hive-engine-tokens-market-query-options.d.ts +9 -0
  38. package/dist/modules/assets/hive-engine/queries/get-hive-engine-tokens-metadata-query-options.d.ts +9 -0
  39. package/dist/modules/assets/hive-engine/queries/index.d.ts +6 -0
  40. package/dist/modules/assets/hive-engine/types/hive-engine-list-response.d.ts +13 -0
  41. package/dist/modules/assets/hive-engine/types/hive-engine-metric.d.ts +9 -0
  42. package/dist/modules/assets/hive-engine/types/hive-engine-token-balance.d.ts +10 -0
  43. package/dist/modules/assets/hive-engine/types/hive-engine-token-metadata-response.d.ts +16 -0
  44. package/dist/modules/assets/hive-engine/types/hive-engine-transaction.d.ts +14 -0
  45. package/dist/modules/assets/hive-engine/types/index.d.ts +6 -0
  46. package/dist/modules/assets/index.d.ts +5 -0
  47. package/dist/modules/assets/points/mutations/gift.d.ts +14 -0
  48. package/dist/modules/assets/points/mutations/index.d.ts +1 -0
  49. package/dist/modules/assets/points/queries/get-points-asset-general-info-query-options.d.ts +28 -0
  50. package/dist/modules/assets/points/queries/get-points-asset-transactions-query-options.d.ts +41 -0
  51. package/dist/modules/assets/points/queries/index.d.ts +2 -0
  52. package/dist/modules/assets/points/types/index.d.ts +2 -0
  53. package/dist/modules/assets/points/types/point-transaction-type.d.ts +15 -0
  54. package/dist/modules/assets/points/types/point-transaction.d.ts +10 -0
  55. package/dist/modules/assets/spk/index.d.ts +2 -0
  56. package/dist/modules/assets/spk/mutations/index.d.ts +4 -0
  57. package/dist/modules/assets/spk/mutations/lock.d.ts +12 -0
  58. package/dist/modules/assets/spk/mutations/power-up.d.ts +12 -0
  59. package/dist/modules/assets/spk/mutations/transfer.d.ts +14 -0
  60. package/dist/modules/assets/spk/queries/get-larynx-asset-general-info-query-options.d.ts +56 -0
  61. package/dist/modules/assets/spk/queries/get-larynx-power-asset-general-info-query-options.d.ts +76 -0
  62. package/dist/modules/assets/spk/queries/get-spk-asset-general-info-query-options.d.ts +28 -0
  63. package/dist/modules/assets/spk/queries/get-spk-markets-query-options.d.ts +33 -0
  64. package/dist/modules/assets/spk/queries/get-spk-wallet-query-options.d.ts +9 -0
  65. package/dist/modules/assets/spk/queries/index.d.ts +4 -0
  66. package/dist/modules/assets/types/asset-operation.d.ts +17 -0
  67. package/dist/modules/assets/types/general-asset-info.d.ts +12 -0
  68. package/dist/modules/assets/types/general-asset-transaction.d.ts +13 -0
  69. package/dist/modules/assets/types/hive-based-asset-sign-type.d.ts +1 -0
  70. package/dist/modules/assets/types/index.d.ts +5 -0
  71. package/dist/modules/assets/types/spk-wallet.d.ts +60 -0
  72. package/dist/modules/assets/utils/index.d.ts +4 -0
  73. package/dist/modules/assets/utils/is-empty-date.d.ts +1 -0
  74. package/dist/modules/assets/utils/parse-asset.d.ts +17 -0
  75. package/dist/modules/assets/utils/reward-spk.d.ts +2 -0
  76. package/dist/modules/assets/utils/vests-to-hp.d.ts +1 -0
  77. package/dist/modules/wallets/consts/hive-engine-tokens.d.ts +1 -0
  78. package/dist/modules/wallets/consts/index.d.ts +1 -0
  79. package/dist/modules/wallets/mutations/change-assets-list.d.ts +1 -0
  80. package/dist/modules/wallets/mutations/index.d.ts +2 -0
  81. package/dist/modules/wallets/mutations/wallet-operation.d.ts +2 -0
  82. package/dist/modules/wallets/queries/get-account-wallet-asset-info-query-options.d.ts +13 -0
  83. package/dist/modules/wallets/queries/get-all-tokens-list-query-options.d.ts +26 -0
  84. package/dist/modules/wallets/queries/get-tokens-operations-query-options.d.ts +9 -0
  85. package/dist/modules/wallets/queries/index.d.ts +4 -2
  86. package/dist/modules/wallets/queries/use-get-account-wallet-list-query.d.ts +3 -4
  87. package/package.json +3 -2
  88. package/dist/modules/wallets/queries/get-account-points-query-options.d.ts +0 -9
  89. package/dist/modules/wallets/queries/use-get-all-tokens-list-query.d.ts +0 -6
@@ -0,0 +1,5 @@
1
+ export * from './general-asset-info';
2
+ export * from './spk-wallet';
3
+ export * from './asset-operation';
4
+ export * from './general-asset-transaction';
5
+ export * from './hive-based-asset-sign-type';
@@ -0,0 +1,60 @@
1
+ export interface SpkApiWallet {
2
+ balance: number;
3
+ claim: number;
4
+ drop: {
5
+ availible: {
6
+ amount: number;
7
+ precision: number;
8
+ token: string;
9
+ };
10
+ last_claim: number;
11
+ total_claims: number;
12
+ };
13
+ poweredUp: number;
14
+ granted: {
15
+ t: number;
16
+ [key: string]: number;
17
+ };
18
+ granting: {
19
+ t: number;
20
+ [key: string]: number;
21
+ };
22
+ heldCollateral: number;
23
+ contracts: unknown[];
24
+ up: unknown;
25
+ down: unknown;
26
+ power_downs: {
27
+ [key: string]: string;
28
+ };
29
+ gov_downs: unknown;
30
+ gov: number;
31
+ spk: number;
32
+ spk_block: number;
33
+ tick: string;
34
+ node: string;
35
+ head_block: number;
36
+ behind: number;
37
+ VERSION: string;
38
+ pow: number;
39
+ }
40
+ export interface SpkMarkets {
41
+ head_block: number;
42
+ markets: {
43
+ node: {
44
+ [key: string]: {
45
+ lastGood: number;
46
+ report: {
47
+ block: number;
48
+ };
49
+ };
50
+ };
51
+ };
52
+ stats: any;
53
+ }
54
+ export interface TransformedSpkMarkets {
55
+ list: {
56
+ name: string;
57
+ status: string;
58
+ }[];
59
+ raw: SpkMarkets;
60
+ }
@@ -0,0 +1,4 @@
1
+ export * from './parse-asset';
2
+ export * from './is-empty-date';
3
+ export * from './vests-to-hp';
4
+ export * from './reward-spk';
@@ -0,0 +1 @@
1
+ export declare function isEmptyDate(s: string | undefined): boolean;
@@ -0,0 +1,17 @@
1
+ import { SMTAsset } from '@hiveio/dhive';
2
+ export declare enum Symbol {
3
+ HIVE = "HIVE",
4
+ HBD = "HBD",
5
+ VESTS = "VESTS",
6
+ SPK = "SPK"
7
+ }
8
+ export declare enum NaiMap {
9
+ "@@000000021" = "HIVE",
10
+ "@@000000013" = "HBD",
11
+ "@@000000037" = "VESTS"
12
+ }
13
+ export interface Asset {
14
+ amount: number;
15
+ symbol: Symbol;
16
+ }
17
+ export declare function parseAsset(sval: string | SMTAsset): Asset;
@@ -0,0 +1,2 @@
1
+ import { SpkApiWallet } from '../types';
2
+ export declare function rewardSpk(data: SpkApiWallet, sstats: any): number;
@@ -0,0 +1 @@
1
+ export declare function vestsToHp(vests: number, hivePerMVests: number): number;
@@ -0,0 +1 @@
1
+ export declare const HiveEngineTokens: string[];
@@ -0,0 +1 @@
1
+ export * from './hive-engine-tokens';
@@ -0,0 +1 @@
1
+ export declare function useChangeAssetsList(username: string): import('@tanstack/react-query').UseMutationResult<string[], Error, string[], unknown>;
@@ -2,3 +2,5 @@ export * from './use-wallet-create';
2
2
  export * from './private-api-namespace';
3
3
  export * from './use-import-wallet';
4
4
  export * from './save-wallet-information-to-metadata';
5
+ export * from './change-assets-list';
6
+ export * from './wallet-operation';
@@ -0,0 +1,2 @@
1
+ import { AssetOperation } from '../../assets';
2
+ export declare function useWalletOperation(username: string, asset: string, operation: AssetOperation): import('@tanstack/react-query').UseMutationResult<any, Error, Record<string, unknown>, unknown>;
@@ -0,0 +1,13 @@
1
+ import { GeneralAssetInfo } from '../../assets';
2
+ interface Options {
3
+ refetch: boolean;
4
+ }
5
+ export declare function getAccountWalletAssetInfoQueryOptions(username: string, asset: string, options?: Options): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<GeneralAssetInfo | undefined, Error, GeneralAssetInfo | undefined, string[]>, "queryFn"> & {
6
+ queryFn?: import('@tanstack/query-core').QueryFunction<GeneralAssetInfo | undefined, string[], never> | undefined;
7
+ } & {
8
+ queryKey: string[] & {
9
+ [dataTagSymbol]: GeneralAssetInfo | undefined;
10
+ [dataTagErrorSymbol]: Error;
11
+ };
12
+ };
13
+ export {};
@@ -0,0 +1,26 @@
1
+ import { HiveEngineTokenMetadataResponse } from '../../assets/hive-engine/types';
2
+ import { EcencyWalletCurrency } from '../enums';
3
+ export declare function getAllTokensListQueryOptions(query: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<{
4
+ basic: string[];
5
+ external: EcencyWalletCurrency[];
6
+ layer2: HiveEngineTokenMetadataResponse[] | undefined;
7
+ }, Error, {
8
+ basic: string[];
9
+ external: EcencyWalletCurrency[];
10
+ layer2: HiveEngineTokenMetadataResponse[] | undefined;
11
+ }, string[]>, "queryFn"> & {
12
+ queryFn?: import('@tanstack/query-core').QueryFunction<{
13
+ basic: string[];
14
+ external: EcencyWalletCurrency[];
15
+ layer2: HiveEngineTokenMetadataResponse[] | undefined;
16
+ }, string[], never> | undefined;
17
+ } & {
18
+ queryKey: string[] & {
19
+ [dataTagSymbol]: {
20
+ basic: string[];
21
+ external: EcencyWalletCurrency[];
22
+ layer2: HiveEngineTokenMetadataResponse[] | undefined;
23
+ };
24
+ [dataTagErrorSymbol]: Error;
25
+ };
26
+ };
@@ -0,0 +1,9 @@
1
+ import { AssetOperation } from '../../assets';
2
+ export declare function getTokenOperationsQueryOptions(token: string, username: string, isForOwner?: boolean): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<AssetOperation[], Error, AssetOperation[], (string | boolean)[]>, "queryFn"> & {
3
+ queryFn?: import('@tanstack/query-core').QueryFunction<AssetOperation[], (string | boolean)[], never> | undefined;
4
+ } & {
5
+ queryKey: (string | boolean)[] & {
6
+ [dataTagSymbol]: AssetOperation[];
7
+ [dataTagErrorSymbol]: Error;
8
+ };
9
+ };
@@ -2,5 +2,7 @@ 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';
5
+ export * from './get-all-tokens-list-query-options';
6
+ export * from './use-get-account-wallet-list-query';
7
+ export * from './get-account-wallet-asset-info-query-options';
8
+ export * from './get-tokens-operations-query-options';
@@ -1,9 +1,8 @@
1
- import { EcencyWalletBasicTokens } from '../enums';
2
- export declare function getAccountWalletListQueryOptions(username: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<EcencyWalletBasicTokens[], Error, EcencyWalletBasicTokens[], string[]>, "queryFn"> & {
3
- queryFn?: import('@tanstack/query-core').QueryFunction<EcencyWalletBasicTokens[], string[], never> | undefined;
1
+ export declare function getAccountWalletListQueryOptions(username: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<any, Error, any, string[]>, "queryFn"> & {
2
+ queryFn?: import('@tanstack/query-core').QueryFunction<any, string[], never> | undefined;
4
3
  } & {
5
4
  queryKey: string[] & {
6
- [dataTagSymbol]: EcencyWalletBasicTokens[];
5
+ [dataTagSymbol]: any;
7
6
  [dataTagErrorSymbol]: Error;
8
7
  };
9
8
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ecency/wallets",
3
3
  "private": false,
4
- "version": "1.2.23",
4
+ "version": "1.3.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "./dist/ecency-sdk.umd.js",
@@ -17,12 +17,13 @@
17
17
  "preview": "vite preview"
18
18
  },
19
19
  "devDependencies": {
20
- "@ecency/sdk": "^1.0.40",
20
+ "@ecency/sdk": "^1.1.0",
21
21
  "@hiveio/dhive": "^1.3.2",
22
22
  "@tanstack/react-query": "^5.74.4",
23
23
  "@types/node": "^22.13.8",
24
24
  "@types/react": "^19.0.10",
25
25
  "@vitejs/plugin-react": "^4.3.4",
26
+ "date-fns": "4.1.0",
26
27
  "eslint": "^9.21.0",
27
28
  "lru-cache": "^11.0.2",
28
29
  "prettier": "^3.5.2",
@@ -1,9 +0,0 @@
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
- };
@@ -1,6 +0,0 @@
1
- import { EcencyWalletBasicTokens, EcencyWalletCurrency } from '../enums';
2
- export declare function useGetAllTokensListQuery(query: string): {
3
- basic: EcencyWalletBasicTokens[];
4
- external: EcencyWalletCurrency[];
5
- layer2: string[];
6
- };