import { BufferString, NetworkType, PrivateKeyString, UpdateAccountNameOptions, UserAccount, UserAccountID } from '@neo-one/client-common'; import { Observable } from 'rxjs'; import { KeyStore } from '../LocalUserAccountProvider'; export interface LockedWallet { readonly type: 'locked'; readonly userAccount: UserAccount; readonly nep2: string; } export interface UnlockedWallet { readonly type: 'unlocked'; readonly userAccount: UserAccount; readonly privateKey: PrivateKeyString; readonly nep2?: string | undefined; } export declare type LocalWallet = LockedWallet | UnlockedWallet; export declare type Wallets = { readonly [Network in string]?: { readonly [Address in string]?: LocalWallet; }; }; export interface LocalStore { readonly getWallets: () => Promise; readonly getWalletsSync?: () => readonly LocalWallet[]; readonly saveWallet: (wallet: LocalWallet) => Promise; readonly deleteWallet: (account: LocalWallet) => Promise; } export declare class LocalKeyStore implements KeyStore { readonly currentUserAccount$: Observable; readonly userAccounts$: Observable; readonly wallets$: Observable; private readonly currentAccountInternal$; private readonly accountsInternal$; private readonly walletsInternal$; private readonly store; private readonly initPromise; constructor(store: LocalStore); getCurrentUserAccount(): UserAccount | undefined; getUserAccounts(): readonly UserAccount[]; get wallets(): readonly LocalWallet[]; sign({ account, message, }: { readonly account: UserAccountID; readonly message: string; }): Promise; selectUserAccount(id?: UserAccountID): Promise; updateUserAccountName({ id, name }: UpdateAccountNameOptions): Promise; getWallet({ address, network }: UserAccountID): LocalWallet; getWallet$({ address, network }: UserAccountID): Observable; addUserAccount({ network, privateKey: privateKeyIn, name, password, nep2: nep2In, }: { readonly network: NetworkType; readonly privateKey?: BufferString; readonly name?: string; readonly password?: string; readonly nep2?: string; }): Promise; deleteUserAccount(id: UserAccountID): Promise; unlockWallet({ id, password, }: { readonly id: UserAccountID; readonly password: string; }): Promise; lockWallet(id: UserAccountID): Promise; private init; private initWithWallets; private getPrivateKey; private updateWallet; private newCurrentAccount; private capture; private get walletsObj(); private get currentAccount(); }