UNPKG

@safe-global/safe-react-hooks

Version:

A collection of React Hooks that facilitates the interaction of React apps with Safe Smart Accounts

16 lines 665 B
import { usePublicClientQuery } from '../../hooks/usePublicClientQuery.js'; import { QueryKey } from '../../constants.js'; /** * Hook to get the connected Safe's owners. * @param params Parameters to customize the hook behavior. * @param params.config SafeConfig to use instead of the one provided by `SafeProvider`. * @returns Query result object containing the connected Safe's owners. */ export function useOwners(params = {}) { return usePublicClientQuery({ ...params, querySafeClientFn: (safeClient) => safeClient.getOwners().then((owners) => owners), queryKey: [QueryKey.Owners] }); } //# sourceMappingURL=useOwners.js.map