@gear-js/react-hooks
Version:
React hooks used across Gear applications
19 lines (18 loc) • 767 B
TypeScript
import { Unsubcall } from '@polkadot/extension-inject/types';
import { Account, Wallet, Wallets } from './types';
declare const getLoggedInAccount: (_wallets: Wallets) => Account | undefined;
declare const getWallets: (origin: string, onAccountsChange: (_id: string, value: Account[]) => void, onWalletConnect: (_id: string, _wallet: Wallet) => void, registerUnsub: (unsub: Unsubcall) => void) => Promise<{
[k: string]: {
id: string;
version: string | undefined;
status: "connected";
accounts: Account[];
connect: () => Promise<never>;
} | {
id: string;
version: string | undefined;
status: "injected";
connect: () => Promise<void>;
};
}>;
export { getWallets, getLoggedInAccount };