@gear-js/react-hooks
Version:
React hooks used across Gear applications
17 lines (16 loc) • 532 B
TypeScript
import { ProviderProps } from '../../types';
import { Account, Wallets } from './types';
type Value = {
wallets: Wallets | undefined;
account: Account | undefined;
isAnyWallet: boolean;
isAccountReady: boolean;
login: (account: Account) => void;
logout: () => void;
};
declare const useAccount: () => Value;
type Props = ProviderProps & {
appName: string;
};
declare function AccountProvider({ appName, children }: Props): import("react/jsx-runtime").JSX.Element;
export { AccountProvider, useAccount };