chaingate
Version:
A complete TypeScript library for connecting to and making transactions on different blockchains
29 lines (28 loc) • 1.46 kB
TypeScript
import { Address } from '../../../../Wallet/entities/Address';
import { FeeLevel } from '../../FeeLevel';
import { Transaction } from '../../Transaction';
import { EvmFee, type FeeType } from './EvmFee';
import { PrivateKeyProvider } from '../../Transports';
import { EvmBroadcastedTransaction } from './EvmBroadcastedTransaction';
import type { EvmCurrencyInfo } from '../../../CurrencyInfo';
import type { CurrencyAmount } from '../../../CurrencyUtils';
import { EvmCurrencyUtils } from '../../../CurrencyUtils/abstract/EvmCurrencyUtils';
export declare class EvmTransaction<CI extends EvmCurrencyInfo> extends Transaction<CI> {
protected _suggestedFees: Record<FeeLevel, EvmFee<CI>>;
private readonly utils;
private readonly privateKeyProvider;
readonly data: string;
constructor(utils: EvmCurrencyUtils<CI>, fromAddress: Address, toAddress: Address, amount: CurrencyAmount<CI>, data: string, privateKeyProvider: PrivateKeyProvider);
broadcast(fee: FeeLevel | EvmFee<CI>): Promise<EvmBroadcastedTransaction<CI>>;
private createBaseTransaction;
private estimateGasLimit;
private isInsufficientAmountError;
private createTransactionWithFees;
protected buildSuggestedFees(): Promise<Record<FeeLevel, EvmFee<CI>>>;
private getEstimatedGas;
private processFeeLevels;
private calculateFeeAmount;
private createFeeInstance;
fee(fee: FeeType<CI>): Promise<EvmFee<CI>>;
private calculateFeeFromType;
}