@ecency/sdk 1.1.12 → 1.1.13

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.
@@ -2,3 +2,7 @@ export * from './use-account-update';
2
2
  export * from './use-account-relations-update';
3
3
  export * from './bookmarks';
4
4
  export * from './favourites';
5
+ export * from './use-account-update-key-auths';
6
+ export * from './use-account-update-password';
7
+ export * from './use-account-revoke-posting';
8
+ export * from './use-account-update-recovery';
@@ -0,0 +1,10 @@
1
+ import { PrivateKey } from '@hiveio/dhive';
2
+ import { useMutation } from '@tanstack/react-query';
3
+ type SignType = "key" | "keychain" | "hivesigner";
4
+ interface CommonPayload {
5
+ accountName: string;
6
+ type: SignType;
7
+ key?: PrivateKey;
8
+ }
9
+ export declare function useAccountRevokePosting(username: string | undefined, options: Pick<Parameters<typeof useMutation>[0], "onSuccess" | "onError">): import('@tanstack/react-query').UseMutationResult<any, unknown, CommonPayload, unknown>;
10
+ export {};
@@ -0,0 +1,15 @@
1
+ import { PrivateKey } from '@hiveio/dhive';
2
+ import { useMutation } from '@tanstack/react-query';
3
+ interface Keys {
4
+ owner: PrivateKey;
5
+ active: PrivateKey;
6
+ posting: PrivateKey;
7
+ memo_key: PrivateKey;
8
+ }
9
+ interface Payload {
10
+ keepCurrent?: boolean;
11
+ currentKey: PrivateKey;
12
+ keys: Keys[];
13
+ }
14
+ export declare function useAccountUpdateKeyAuths(username: string, options?: Pick<Parameters<typeof useMutation>[0], "onSuccess" | "onError">): import('@tanstack/react-query').UseMutationResult<import('@hiveio/dhive').TransactionConfirmation, unknown, Payload, unknown>;
15
+ export {};
@@ -0,0 +1,12 @@
1
+ import { useMutation } from '@tanstack/react-query';
2
+ interface Payload {
3
+ newPassword: string;
4
+ currentPassword: string;
5
+ keepCurrent?: boolean;
6
+ }
7
+ /**
8
+ * Only native Hive and custom passwords could be updated here
9
+ * Seed based password cannot be updated here, it will be in an account always for now
10
+ */
11
+ export declare function useAccountUpdatePassword(username: string, options?: Pick<Parameters<typeof useMutation>[0], "onSuccess" | "onError">): import('@tanstack/react-query').UseMutationResult<import('@hiveio/dhive').TransactionConfirmation, unknown, Payload, unknown>;
12
+ export {};
@@ -0,0 +1,11 @@
1
+ import { PrivateKey } from '@hiveio/dhive';
2
+ import { useMutation } from '@tanstack/react-query';
3
+ type SignType = "key" | "keychain" | "hivesigner" | "ecency";
4
+ interface CommonPayload {
5
+ accountName: string;
6
+ type: SignType;
7
+ key?: PrivateKey;
8
+ email?: string;
9
+ }
10
+ export declare function useAccountUpdateRecovery(username: string | undefined, options: Pick<Parameters<typeof useMutation>[0], "onSuccess" | "onError">): import('@tanstack/react-query').UseMutationResult<unknown, unknown, CommonPayload, unknown>;
11
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { AccountFollowStats } from '../types';
2
- export declare function getAccountFullQueryOptions(username: string): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<{
2
+ export declare function getAccountFullQueryOptions(username: string | undefined): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<{
3
3
  name: any;
4
4
  owner: any;
5
5
  active: any;
@@ -117,7 +117,7 @@ export declare function getAccountFullQueryOptions(username: string): import('@t
117
117
  meta: Record<string, any>;
118
118
  }[];
119
119
  };
120
- }, string[]>, "queryFn"> & {
120
+ }, (string | undefined)[]>, "queryFn"> & {
121
121
  queryFn?: import('@tanstack/query-core').QueryFunction<{
122
122
  name: any;
123
123
  owner: any;
@@ -177,9 +177,9 @@ export declare function getAccountFullQueryOptions(username: string): import('@t
177
177
  meta: Record<string, any>;
178
178
  }[];
179
179
  };
180
- }, string[], never> | undefined;
180
+ }, (string | undefined)[], never> | undefined;
181
181
  } & {
182
- queryKey: string[] & {
182
+ queryKey: (string | undefined)[] & {
183
183
  [dataTagSymbol]: {
184
184
  name: any;
185
185
  owner: any;
@@ -0,0 +1,8 @@
1
+ export declare function getAccountPendingRecoveryQueryOptions(username: string | undefined): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<any, Error, any, (string | undefined)[]>, "queryFn"> & {
2
+ queryFn?: import('@tanstack/query-core').QueryFunction<any, (string | undefined)[], never> | undefined;
3
+ } & {
4
+ queryKey: (string | undefined)[] & {
5
+ [dataTagSymbol]: any;
6
+ [dataTagErrorSymbol]: Error;
7
+ };
8
+ };
@@ -0,0 +1,9 @@
1
+ import { GetRecoveriesEmailResponse } from '../types';
2
+ export declare function getAccountRecoveriesQueryOptions(username: string | undefined): import('@tanstack/query-core').OmitKeyof<import('@tanstack/react-query').UseQueryOptions<GetRecoveriesEmailResponse[], Error, GetRecoveriesEmailResponse[], (string | undefined)[]>, "queryFn"> & {
3
+ queryFn?: import('@tanstack/query-core').QueryFunction<GetRecoveriesEmailResponse[], (string | undefined)[], never> | undefined;
4
+ } & {
5
+ queryKey: (string | undefined)[] & {
6
+ [dataTagSymbol]: GetRecoveriesEmailResponse[];
7
+ [dataTagErrorSymbol]: Error;
8
+ };
9
+ };
@@ -5,3 +5,5 @@ export * from './get-relationship-between-accounts-query-options';
5
5
  export * from './get-account-subscriptions-query-options';
6
6
  export * from './get-active-account-bookmarks-query-options';
7
7
  export * from './get-active-account-favourites-query-options';
8
+ export * from './get-account-recoveries-query-options';
9
+ export * from './get-account-pending-recovery-query-options';
@@ -0,0 +1,8 @@
1
+ export interface Recoveries {
2
+ username: string;
3
+ email: string;
4
+ publicKeys: Record<string, number>;
5
+ }
6
+ export interface GetRecoveriesEmailResponse extends Recoveries {
7
+ _id: string;
8
+ }
@@ -5,3 +5,4 @@ export * from './account-relationship';
5
5
  export * from './account-bookmark';
6
6
  export * from './account-favourite';
7
7
  export * from './account-profile';
8
+ export * from './account-recovery';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ecency/sdk",
3
3
  "private": false,
4
- "version": "1.1.12",
4
+ "version": "1.1.13",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "./dist/ecency-sdk.umd.js",