/****************************************************************************** * * (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 { DappTxInput, NetworkModel, TxModel, TxParams, TxType, TX_SOURCE } from '../../main/transactions/interface'; import EventEmitter from 'events'; import { MpcService } from '../mpc'; import { AccountService } from '../accounts'; import { Account } from '../../schema/model'; import { MutexService } from './mutex'; export interface ProcessingTx { txId: string; txParams: TxParams; originTxId: string; txSource: TX_SOURCE; account: Account; autoconfirm: any; network: NetworkModel; resolve: Function; dappInfo: DappTxInput; nonce: number; txType: TxType; dappResolve: Function; dappReject: Function; releaseLock: Function; } export declare class TransactionService extends EventEmitter { private accountService; _processingTxs: Map; constructor(accountService: AccountService); syncIncomingTxs: (account: Account) => void; setEtherTxs: (etherscanUrl: string, account?: Account) => Promise; setKlaytnTxs: ({ address, aaid, chainId, blockExplorerUrl, }: { address: string; aaid: number; chainId: number; blockExplorerUrl: string; }) => Promise; updateTxStatus: ({ id, change, history, mutexService }: { id: any; change: any; history: any; mutexService: any; }, activeAccount?: Account) => Promise; getTxCategory: ({ data, to }: { data: any; to: any; }) => void; savePendingTx: (dto: any, mutexService: MutexService) => Promise; txSubmitted({ originTxId, txId, txParams, hash, mutexService }: { originTxId: any; txId: any; txParams: any; hash: any; mutexService: any; }): Promise; signMpcTx({ txParams, account, mpcService, autoconfirm, txType, }: { txType: TxType; autoconfirm: any; txParams: any; account: Account; mpcService: MpcService; }): Promise; getMpcJwtForSign({ autoconfirm, txType, txParams }: { autoconfirm: any; txType: any; txParams: any; }, mpcToken?: string): Promise; setProcessingTxs(txId: string, data: ProcessingTx): void; getProcessingTx(txId: string): ProcessingTx; deleteProcessingTx(txId: string): void; }