/****************************************************************************** * * (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 { AbcGetUrgentNoticeResponse } from '../../schema/account'; import { Account, User, Wallet } from '../../schema/model'; import { CurrencyType } from '../preference/interface'; import { AddFavoriteDtoForTwoFa } from '../rules/interface'; import { AppAccount, AssetModel, ConnectedDomainModel, GasFeeModel, IncomingTxModel, NetworkModel, SuggestedTokenModel, TxModel } from '../transactions/interface'; export interface AppModel { user?: UserModel; wallet?: Wallet; activeAccount?: AppAccount; connectedDomains?: ConnectedDomainModel[]; assets?: AssetModel[]; mpcToken?: string; currentNetwork?: NetworkModel; locked?: boolean; suggestedTokens?: SuggestedTokenModel[]; networks?: NetworkModel[]; ledger?: { accounts: AppAccount[]; }; addFavoriteDtoForTwoFa?: AddFavoriteDtoForTwoFa; gasFee?: GasFeeModel; mainAssetBlockNumbersForIncomingTxs?: BlockNumbersForIncomingTxsModel; tokenBlockNumbersForIncomingTxs?: BlockNumbersForIncomingTxsModel; esTxs?: IncomingTxModel[]; pendingTxs?: TxModel[]; tokenTxs?: IncomingTxModel[]; unapproveddMsgs?: { [key: string]: any; }; errors?: any[]; mainnetChainIds?: number[]; abcAuth?: AbcAuth; exchangeRates?: { [key: string]: { usd: number; krw: number; jpy: number; }; }; approval?: ApprovalModel; ledgerTransportType?: string; currLang?: string; isDeveloperMode?: boolean; ledgerSignPrep?: any; currencyType?: CurrencyType; useSelectedNonceTx?: boolean; totalAssetsValue?: totalAssetsValue; reload?: boolean; activeControllerConnections?: number; injectKlaytnProvider?: boolean; injectEthereumProvider?: boolean; hiddenUrgentNotice?: Partial; } export interface totalAssetsValue { usd: string; krw: string; } export interface GenereateKeyDto { uid: string; wid: number; password: string; start_datetime?: string; end_datetime?: string; purpose?: string; dsa_mode?: string; curve_name?: string; share_mode?: number; jwt?: string; mpcToken: string; } export interface UpdateAccountNameDto { signer: string; accountId: number; accountName: string; address: string; } export interface GenereateKeyResult { OurPubKey: string; PVEncStr: string; Sid: string; UCPubKey: string; Uid: string; Wid: number; } export interface RegisterUserResult { accessToken: string; mpcToken: string; addr?: string; user?: UserModel; expiresIn: string; } export interface UserModel extends User { EncPV?: string; } export interface ConnectAccountDto { domainName: string; address: string; iconUrl: string; } export interface GetConnectAccountPageData { address: string; balance: string; domainName: string; iconUrl: string; } export interface RequestAccountData { domainName?: string; res?: Function; address?: string; iconUrl?: string; resolve?: Function; reject?: Function; } export interface GetLedgerAccountsWithBalanceResult { added: boolean; address: string; balance: string; index: number; } export interface UnapprovedPersonalMsgModel { id: number; msgParams: { [key: string]: string; data: string; from: string; }; status: string; time: number; type: string; } export interface UnapprovedTypedMsgModel { id: number; msgParams: { [key: string]: any; }; status: string; time: number; type: string; } export interface BlockNumbersForIncomingTxsModel { [key: string]: { [key: string]: string; }; } export interface AbcAuth { accessToken: string; tokenType: string; expiresIn: number; refreshToken: string; } export interface ApprovalModel { type: string; origin: string; id: string; requestData: T; } export interface RestAddAccountDto { address: string; accountId: number; accountName: string; accessToken: string; } export interface AddAccountDto { accountName: string; password: string; email: string; } export interface AddNetworkDto { name: string; rpcUrl: string; chainId: number; existingRpcUrl?: string; symbol?: string; blockExplorerUrl?: string; } export interface TransactionModel { chainId: number; nonce: number; gasPrice: string; gas: number; to: string; value: string; data: string; isDapp: boolean; funcName?: string; send?: boolean; origin?: string; created: Date; } export interface IncomingTxResult { value: string; confirmations: string; from: string; gas: string; gasPrice: string; gasUsed: string; hash: string; nonce: string; to: string; } export interface SaveKeyGenResultDto { pubKey: string; address: string; ucPubkey: string; accountName: string; uid: string; wid: number; email: string; iss: string; } export interface GetChallengeMessageRes { hashMessage: string; } export interface UnLockDto { password: string; keep?: boolean; } export interface SelfSignDto { password: string; EncPV: string; hashMessage: string; } export interface SelfSignRes { r: string; s: string; } export interface GetNewSessionJwtRes { accessToken: string; expiresIn: string; } export interface VerifyPasswordDto { password: string; } export interface VerifySelfSign { r: string; s: string; aaid: number; hashMessage: string; } export interface RecoverDto { password: string; mnemonic?: string; sid: string; uid?: string; wid?: number; mpcToken: string; } export interface RecoverResult { OurPubKey: string; PVEncStr: string; Sid: string; UCPubKey: string; Uid: string; Wid: number; } export interface UnlockDto { r: string; s: string; hashMessage: string; address: string; sid: string; } export interface RecoverSIDResult { json: string; r: string; s: string; } export interface VerifyRecoverServiceDto { json: string; r: string; s: string; } export interface MpcAddAccountResult { AccountID: number; EthAddress: string; NewPVEncStr: string; } export interface SendCipherDto { uid: string; wid: number; accToken: string; mpcToken: string; confirmCode: string; password: string; } export interface CheckPasswordDto { password: string; EncPV: string; } export interface VerifyTwoFactorResult { verified: boolean; } export interface ChangeActiveAccountDto { account: Account; }