UNPKG

@gear-js/react-hooks

Version:
19 lines (18 loc) 615 B
import { HexString } from '@gear-js/api'; import { InjectedAccountWithMeta } from '@polkadot/extension-inject/types'; import { Signer } from '@polkadot/types/types'; import { WALLET_STATUS } from './consts'; type WalletStatus = (typeof WALLET_STATUS)[keyof typeof WALLET_STATUS]; type Account = InjectedAccountWithMeta & { decodedAddress: HexString; signer: Signer; }; type Wallet = { id: string; status: WalletStatus; version?: string; accounts?: Account[]; connect: () => Promise<void>; }; type Wallets = Record<string, Wallet>; export type { WalletStatus, Account, Wallet, Wallets };