import { ContractExecutionError, TransactionRevertedWithoutReasonError, TransactionRevertInstructionError, TransactionRevertWithCustomError, InvalidResponseError, TransactionPollingTimeoutError } from 'web3-errors'; import { FormatType, ETH_DATA_FORMAT, DataFormat, Bytes, ContractAbi, HexString, Numbers, Transaction, TransactionReceipt, TransactionWithFromAndToLocalWalletIndex, TransactionWithFromLocalWalletIndex, TransactionWithToLocalWalletIndex } from 'web3-types'; import { Schema } from 'web3-validator'; export type InternalTransaction = FormatType; export type SendTransactionEventsBase = { sending: FormatType; sent: FormatType; transactionHash: FormatType; receipt: FormatType; confirmation: { confirmations: FormatType; receipt: FormatType; latestBlockHash: FormatType; }; error: TransactionRevertedWithoutReasonError> | TransactionRevertInstructionError> | TransactionRevertWithCustomError> | TransactionPollingTimeoutError | InvalidResponseError | ContractExecutionError; }; export type SendTransactionEvents = SendTransactionEventsBase; export type SendSignedTransactionEvents = SendTransactionEventsBase; export interface SendTransactionOptions { ignoreGasPricing?: boolean; transactionResolver?: (receipt: TransactionReceipt) => ResolveType; contractAbi?: ContractAbi; checkRevertBeforeSending?: boolean; ignoreFillingGasLimit?: boolean; } export interface SendSignedTransactionOptions { transactionResolver?: (receipt: TransactionReceipt) => ResolveType; contractAbi?: ContractAbi; checkRevertBeforeSending?: boolean; } export interface RevertReason { reason: string; signature?: HexString; data?: HexString; } export interface RevertReasonWithCustomError extends RevertReason { customErrorName: string; customErrorDecodedSignature: string; customErrorArguments: Record; } export type TransactionMiddlewareData = Transaction | TransactionWithFromLocalWalletIndex | TransactionWithToLocalWalletIndex | TransactionWithFromAndToLocalWalletIndex; export interface TransactionMiddleware { processTransaction(transaction: TransactionMiddlewareData, options?: { [key: string]: unknown; }): Promise; } export type CustomTransactionSchema = { type: string; properties: Record; };