@safe-global/safe-react-hooks
Version:
A collection of React Hooks that facilitates the interaction of React apps with Safe Smart Accounts
17 lines (16 loc) • 1.15 kB
TypeScript
import { UseMutateAsyncFunction, UseMutateFunction, UseMutationResult } from '@tanstack/react-query';
import { SafeClientResult } from '@safe-global/sdk-starter-kit';
import { ConfigParam, SafeConfigWithSigner, SafeClient } from '../../types/index.js';
export type RemoveOwnerVariables = Parameters<SafeClient['createRemoveOwnerTransaction']>[0];
export type UseRemoveOwnerParams = ConfigParam<SafeConfigWithSigner>;
export type UseRemoveOwnerReturnType = Omit<UseMutationResult<SafeClientResult, Error, RemoveOwnerVariables>, 'mutate' | 'mutateAsync'> & {
removeOwner: UseMutateFunction<SafeClientResult, Error, RemoveOwnerVariables, unknown>;
removeOwnerAsync: UseMutateAsyncFunction<SafeClientResult, Error, RemoveOwnerVariables, unknown>;
};
/**
* Hook to remove an owner from the connected Safe.
* @param params Parameters to customize the hook behavior.
* @param params.config SafeConfig to use instead of the one provided by `SafeProvider`.
* @returns Object containing the mutation state and the function to remove an owner.
*/
export declare function useRemoveOwner(params?: UseRemoveOwnerParams): UseRemoveOwnerReturnType;