@ecency/wallets 1.3.1 → 1.3.4

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.
@@ -15,7 +15,7 @@ export declare function getPointsAssetTransactionsQueryOptions(username: string
15
15
  asset: string;
16
16
  }[];
17
17
  id: number;
18
- }[], (string | undefined)[]>, "queryFn"> & {
18
+ }[], (string | PointTransactionType | undefined)[]>, "queryFn"> & {
19
19
  queryFn?: import('@tanstack/query-core').QueryFunction<{
20
20
  created: Date;
21
21
  type: PointTransactionType;
@@ -24,9 +24,9 @@ export declare function getPointsAssetTransactionsQueryOptions(username: string
24
24
  asset: string;
25
25
  }[];
26
26
  id: number;
27
- }[], (string | undefined)[], never> | undefined;
27
+ }[], (string | PointTransactionType | undefined)[], never> | undefined;
28
28
  } & {
29
- queryKey: (string | undefined)[] & {
29
+ queryKey: (string | PointTransactionType | undefined)[] & {
30
30
  [dataTagSymbol]: {
31
31
  created: Date;
32
32
  type: PointTransactionType;
@@ -2,5 +2,4 @@ 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
5
  export * from './wallet-operation';
@@ -1,6 +1,5 @@
1
- import { EcencyWalletCurrency } from '../../enums';
2
1
  interface Payload {
3
- currency: EcencyWalletCurrency;
2
+ currency: string;
4
3
  address: string;
5
4
  }
6
5
  export declare function useCreateAccountWithWallets(username: string): import('@tanstack/react-query').UseMutationResult<Response, Error, Payload, unknown>;
@@ -1,5 +1,8 @@
1
- import { EcencyWalletCurrency } from '../enums';
2
- import { EcencyCreateWalletInformation } from '../types';
3
- export declare function useSaveWalletInformationToMetadata(username: string): import('@tanstack/react-query').UseMutationResult<any, Error, {
4
- wallets: Map<EcencyWalletCurrency, EcencyCreateWalletInformation>;
5
- }, unknown>;
1
+ import { EcencyTokenMetadata } from '../types';
2
+ /**
3
+ * Saving of token(s) metadata to Hive profile
4
+ * It may contains: external wallets(see EcencyWalletCurrency), Hive tokens arrangement
5
+ *
6
+ * Basically, this mutation is a convenient wrapper for update profile operation
7
+ */
8
+ export declare function useSaveWalletInformationToMetadata(username: string): import('@tanstack/react-query').UseMutationResult<unknown, Error, EcencyTokenMetadata[], unknown>;
@@ -2,6 +2,11 @@ import { EcencyWalletCurrency } from '../enums';
2
2
  interface Payload {
3
3
  privateKeyOrSeed: string;
4
4
  }
5
+ /**
6
+ * This mutation uses for importing an existing wallet, validation and saving logically in application
7
+ *
8
+ * Keep attention: this mutation doesn't save wallet to somewhere in a server
9
+ */
5
10
  export declare function useImportWallet(username: string, currency: EcencyWalletCurrency): import('@tanstack/react-query').UseMutationResult<{
6
11
  privateKey: string;
7
12
  address: any;
@@ -1,6 +1,11 @@
1
- import { EcencyCreateWalletInformation } from '../types';
2
1
  import { EcencyWalletCurrency } from '../enums';
2
+ import { EcencyTokenMetadata } from '../types';
3
+ /**
4
+ * Uses for creating wallet logically in the application
5
+ *
6
+ * Keep attention: this mutation doesn't save wallet to somewhere in a server
7
+ */
3
8
  export declare function useWalletCreate(username: string, currency: EcencyWalletCurrency): {
4
- createWallet: import('@tanstack/react-query').UseMutationResult<EcencyCreateWalletInformation, Error, void, unknown>;
9
+ createWallet: import('@tanstack/react-query').UseMutationResult<EcencyTokenMetadata, Error, void, unknown>;
5
10
  importWallet: () => void;
6
11
  };
@@ -1,24 +1,28 @@
1
1
  import { HiveEngineTokenMetadataResponse } from '../../assets/hive-engine/types';
2
- import { EcencyWalletCurrency } from '../enums';
2
+ import { EcencyWalletBasicTokens, EcencyWalletCurrency } from '../enums';
3
3
  export declare function getAllTokensListQueryOptions(query: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<{
4
- basic: string[];
4
+ basic: EcencyWalletBasicTokens[];
5
5
  external: EcencyWalletCurrency[];
6
+ spk: string[];
6
7
  layer2: HiveEngineTokenMetadataResponse[] | undefined;
7
8
  }, Error, {
8
- basic: string[];
9
+ basic: EcencyWalletBasicTokens[];
9
10
  external: EcencyWalletCurrency[];
11
+ spk: string[];
10
12
  layer2: HiveEngineTokenMetadataResponse[] | undefined;
11
13
  }, string[]>, "queryFn"> & {
12
14
  queryFn?: import('@tanstack/query-core').QueryFunction<{
13
- basic: string[];
15
+ basic: EcencyWalletBasicTokens[];
14
16
  external: EcencyWalletCurrency[];
17
+ spk: string[];
15
18
  layer2: HiveEngineTokenMetadataResponse[] | undefined;
16
19
  }, string[], never> | undefined;
17
20
  } & {
18
21
  queryKey: string[] & {
19
22
  [dataTagSymbol]: {
20
- basic: string[];
23
+ basic: EcencyWalletBasicTokens[];
21
24
  external: EcencyWalletCurrency[];
25
+ spk: string[];
22
26
  layer2: HiveEngineTokenMetadataResponse[] | undefined;
23
27
  };
24
28
  [dataTagErrorSymbol]: Error;
@@ -1,8 +1,8 @@
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;
1
+ export declare function getAccountWalletListQueryOptions(username: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<string[], Error, string[], string[]>, "queryFn"> & {
2
+ queryFn?: import('@tanstack/query-core').QueryFunction<string[], string[], never> | undefined;
3
3
  } & {
4
4
  queryKey: string[] & {
5
- [dataTagSymbol]: any;
5
+ [dataTagSymbol]: string[];
6
6
  [dataTagErrorSymbol]: Error;
7
7
  };
8
8
  };
@@ -1,9 +1,13 @@
1
- import { EcencyWalletCurrency } from '../enums';
2
- export interface EcencyCreateWalletInformation {
3
- address: string;
4
- privateKey: string;
5
- publicKey: string;
6
- username: string;
7
- currency: EcencyWalletCurrency;
1
+ export interface EcencyTokenMetadata {
2
+ address?: string;
3
+ privateKey?: string;
4
+ publicKey?: string;
5
+ username?: string;
6
+ currency?: string;
8
7
  custom?: boolean;
8
+ type: string;
9
+ /**
10
+ * Represents showing of the token in the Ecency wallet
11
+ */
12
+ show?: boolean;
9
13
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ecency/wallets",
3
3
  "private": false,
4
- "version": "1.3.1",
4
+ "version": "1.3.4",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "./dist/ecency-sdk.umd.js",
@@ -17,7 +17,7 @@
17
17
  "preview": "vite preview"
18
18
  },
19
19
  "devDependencies": {
20
- "@ecency/sdk": "^1.1.0",
20
+ "@ecency/sdk": "^1.1.3",
21
21
  "@hiveio/dhive": "^1.3.2",
22
22
  "@tanstack/react-query": "^5.74.4",
23
23
  "@types/node": "^22.13.8",
@@ -25,13 +25,14 @@
25
25
  "@vitejs/plugin-react": "^4.3.4",
26
26
  "dayjs": "^1.11.10",
27
27
  "eslint": "^9.21.0",
28
+ "hivesigner": "3.3.4",
28
29
  "lru-cache": "^11.0.2",
29
30
  "prettier": "^3.5.2",
30
31
  "react": "^19.0.0",
32
+ "remeda": "^2.30.0",
31
33
  "vite": "^6.2.0",
32
34
  "vite-plugin-dts": "4.5.3",
33
- "vite-plugin-node-polyfills": "^0.23.0",
34
- "hivesigner": "3.3.4"
35
+ "vite-plugin-node-polyfills": "^0.23.0"
35
36
  },
36
37
  "dependencies": {
37
38
  "@okxweb3/coin-aptos": "^1.2.0",
@@ -1 +0,0 @@
1
- export declare function useChangeAssetsList(username: string): import('@tanstack/react-query').UseMutationResult<string[], Error, string[], unknown>;