/****************************************************************************** * * (C) 2022 AhnLab Blockchain Company, Inc. All rights reserved. * Any part of this source code can not be copied with any method without * prior written permission from the author or authorized person. * ******************************************************************************/ /// import 'reflect-metadata'; import EventEmitter from 'events'; import { AddAccountDto, RequestAccountData, UserModel } from '../../main/accounts/interface'; import { AccountRestApi } from '../../infra/rest-api/accounts'; import { MpcService } from '../mpc'; import { Account, User, Wallet } from '../../schema/model'; export declare class AccountService extends EventEmitter { private accountRestApi; keyGenResult: any; _requestAccountData: RequestAccountData; constructor(accountRestApi: AccountRestApi); createMpcBaseAccount: (data: AddAccountDto, mpcService: MpcService, dispatch: any) => Promise; initializeWalletAfterKeyGen({ user, wallet }: { user: User; wallet: Wallet; }): void; changeActiveAccount(account: Account, mpcService?: MpcService): void; userRegistered: () => Promise; /** update eth balance and return it as ether unit */ updateEthBalance: () => Promise; updateUser: (updatedUser: UserModel) => void; updateUserTwoFactorEnabled: (value: { twoFactorEnabled: boolean; twoFactorFreezeEndTime?: number; twoFactorResetRetryCount?: number; twoFactorRetryFreezeEndTime?: number; }) => void; lock: () => void; addConnectedDomain: (domainName: string, iconUrl: string) => void; addAccountToConnectedDomain: ({ aaid, domainName }: { aaid: number; domainName: string; }) => Promise; unlock: () => Promise; filterUserForUpdatingRedux: (user: UserModel) => { EncPV?: string; uid?: string; wid?: number; email?: string; abcUid?: string; accounts?: { id?: number; sid?: string; ethAddress?: string; pubkey?: string; icon?: string; name?: string; signer?: string; }[]; favorites?: { id?: string; chainId?: number; address?: string; nickname?: string; created?: string; }[]; autoconfirms?: { contractAddress?: string; chainId?: number; funcHash?: string; funcName?: string; domainName?: string; created?: string; }[]; twoFactorEnabled?: boolean; twoFactorFreezeEndTime?: number; twoFactorResetRetryCount?: number; twoFactorRetryFreezeEndTime?: number; tempTwoFactorSecret?: string; twoFactorSecret?: string; twoFAResetCode?: string; }; getActiveAddress: () => void; getAllAccounts: () => void; syncUser: () => Promise; updateConnectedDomains: ({ account }: { account: Account; }) => void; isUnlocked: () => Promise; getConnectedAccountsForDapp(domainName: string): void; setRequestAccountData(val: any): void; getRequestAccountData(): RequestAccountData; getAccountById(accountId: number): void; getTotalAssetPrice(): Promise; }