import { Address, Chain, PublicClient, TransactionSerializable, Transport } from 'viem'; import { IUITransaction } from '@dynamic-labs/types'; import { Eip1559FeeFeed } from '../Eip1559FeeFeed'; export type NonNativeTransaction = { nonNativeValue?: bigint; nonNativeAddress?: string; nonNativeDecimal?: number; feeTokenAddress?: string; feeTokenSymbol?: string; }; type ViemUiTransactionProps = { account: Address; transaction: TransactionSerializable & NonNativeTransaction; onSubmit: (transaction: TransactionSerializable & NonNativeTransaction) => Promise; publicClient: PublicClient; }; export interface IUIEvmTransaction { nonNativeValue: bigint | undefined; nonNativeAddress: string | undefined; nonNativeDecimal: number | undefined; formatNonNativeToken: (value: bigint, decimals: number) => string; parseNonNativeToken: (input: string, decimals: number) => bigint; } export declare class ViemUiTransaction extends Eip1559FeeFeed implements IUITransaction, IUIEvmTransaction { chain: string; receipt: string | undefined; private transaction; private address; protected publicClient: PublicClient; private onSubmit; constructor({ transaction, onSubmit, publicClient, account, }: ViemUiTransactionProps); nativePrice?: number | undefined; validateAddressFormat: (address: string) => boolean; parse: (input: string) => bigint; parseNonNativeToken: (amount: string, decimals: number) => bigint; format: (value: bigint, { precision }?: import("@dynamic-labs/types").IUITransactionFormatOptions) => string; formatNonNativeToken: (value: bigint, decimals: number) => string; get to(): Address | undefined; set to(toAddress: Address | undefined); get from(): `0x${string}`; get value(): bigint | undefined; set value(value: bigint | undefined); get nonNativeValue(): bigint | undefined; set nonNativeValue(value: bigint | undefined); get nonNativeAddress(): string | undefined; set nonNativeAddress(value: string | undefined); get nonNativeDecimal(): number | undefined; set nonNativeDecimal(value: number | undefined); get feeTokenAddress(): string | undefined; set feeTokenAddress(value: string | undefined); get feeTokenSymbol(): string | undefined; set feeTokenSymbol(value: string | undefined); get data(): `0x${string}` | undefined; submit(): Promise; getBalance(): Promise; estimateGas(): Promise; private convertBigIntToHex; getTransactionRecipient(): `0x${string}` | undefined; /** * Whether the transaction is gas sponsored. * Returns false by default for EVM transactions. * Can be overridden for chains like Tempo where fees are paid differently. */ isGasSponsored: () => boolean; estimateL1Fee(): Promise; set maxFeePerGas(value: bigint); set maxPriorityFeePerGas(value: bigint); } export {};