@safe-global/safe-react-hooks
Version:
A collection of React Hooks that facilitates the interaction of React apps with Safe Smart Accounts
20 lines (19 loc) • 1.01 kB
TypeScript
import { ConfigParam, SafeConfigWithSigner } from '../../types/index.js';
import { useAddOwner } from './useAddOwner.js';
import { useRemoveOwner } from './useRemoveOwner.js';
import { useSwapOwner } from './useSwapOwner.js';
export type UseUpdateOwnersParams = ConfigParam<SafeConfigWithSigner>;
export type UseUpdateOwnersReturnType = {
add: ReturnType<typeof useAddOwner>;
remove: ReturnType<typeof useRemoveOwner>;
swap: ReturnType<typeof useSwapOwner>;
};
export { type AddOwnerVariables } from './useAddOwner.js';
export { type RemoveOwnerVariables } from './useRemoveOwner.js';
export { type SwapOwnerVariables } from './useSwapOwner.js';
/**
* Hook to manage the owners of the Safe account. It provides methods to add a new owner,
* remove an existing one, and to swap an existing owner in favor of a new one.
* @returns Object wrapping the hooks to update, remove or swap owners.
*/
export declare function useUpdateOwners(params?: UseUpdateOwnersParams): UseUpdateOwnersReturnType;