import { ChainedFunctionifyTuple, HasMapStore, IObject } from "../common"; import { ChainGetter } from "../chain"; import { AccountSetBase, AccountSetBaseSuper, AccountSetOpts } from "./base"; import { UnionToIntersection } from "utility-types"; import { Keplr } from "@keplr-wallet/types"; export interface IAccountStore { getAccount(chainId: string): AccountSetBase & T; hasAccount(chainId: string): boolean; } export interface IAccountStoreWithInjects> { getAccount(chainId: string): AccountSetBase & UnionToIntersection; hasAccount(chainId: string): boolean; } export declare class AccountStore, AccountSetReturn = AccountSetBase & UnionToIntersection> extends HasMapStore { protected readonly eventListener: { addEventListener: (type: string, fn: () => unknown) => void; removeEventListener: (type: string, fn: () => unknown) => void; }; protected readonly chainGetter: ChainGetter; protected readonly getKeplr: () => Promise; protected readonly storeOptsCreator: (chainId: string) => AccountSetOpts; protected accountSetCreators: ChainedFunctionifyTuple; constructor(eventListener: { addEventListener: (type: string, fn: () => unknown) => void; removeEventListener: (type: string, fn: () => unknown) => void; }, chainGetter: ChainGetter, getKeplr: () => Promise, storeOptsCreator: (chainId: string) => AccountSetOpts, ...accountSetCreators: ChainedFunctionifyTuple); getAccount(chainId: string): AccountSetReturn; hasAccount(chainId: string): boolean; }