export interface SerializableTransactionReceipt { to: string; from: string; contractAddress: string; transactionIndex: number; blockHash: string; transactionHash: string; blockNumber: number; status?: number; } interface TxInterface { addedTime?: number; receipt?: SerializableTransactionReceipt; lastCheckedBlockNumber?: number; } export interface TransactionDetails extends TxInterface { chainId: number; hash: string; approval?: { tokenAddress: string; spender: string; }; summary?: string; claim?: { recipient: string; }; confirmedTime?: number; blockNumber?: number; from?: string; } export declare function shouldCheck(lastBlockNumber: number, tx: TxInterface): boolean; export interface ProviderLike { getTransactionReceipt: (hash: string) => Promise; } export interface TransactionsUpdaterProps { /** * 在交易确认的时候调用 */ onTransactionConfirm: (response: TransactionDetails) => void; /** * 在检查交易未被确认的时候调用 */ onTransactionChecked: (response: TransactionDetails) => void; /** * 在检查交易记录发送错误的时候调用 */ onTransactionError: (error: Error) => void; /** * { [hash]: tx } 类型的交易记录 */ transactions: Record; /** * 最新的区块高度 */ lastBlockNumber?: number; } export default function TransactionUpdater({ onTransactionConfirm, onTransactionChecked, onTransactionError, transactions, lastBlockNumber, }: TransactionsUpdaterProps): null; export {};