@hyperlane-xyz/sdk
Version:
The official SDK for the Hyperlane Network
50 lines • 2.39 kB
TypeScript
import { Address, HexString, Numberish } from '@hyperlane-xyz/utils';
import { ChainMetadata } from '../metadata/chainMetadataTypes.js';
import { CosmJsProvider, CosmJsTransaction, CosmJsWasmProvider, CosmJsWasmTransaction, EthersV5Provider, EthersV5Transaction, SolanaWeb3Provider, SolanaWeb3Transaction, TypedProvider, TypedTransaction, ViemProvider, ViemTransaction } from './ProviderType.js';
export interface TransactionFeeEstimate {
gasUnits: number | bigint;
gasPrice: number | bigint;
fee: number | bigint;
}
export declare function estimateTransactionFeeEthersV5({ transaction, provider, sender, }: {
transaction: EthersV5Transaction;
provider: EthersV5Provider;
sender: Address;
}): Promise<TransactionFeeEstimate>;
export declare function estimateTransactionFeeEthersV5ForGasUnits({ provider, gasUnits, }: {
provider: EthersV5Provider['provider'];
gasUnits: bigint;
}): Promise<TransactionFeeEstimate>;
export declare function estimateTransactionFeeViem({ transaction, provider, sender, }: {
transaction: ViemTransaction;
provider: ViemProvider;
sender: Address;
}): Promise<TransactionFeeEstimate>;
export declare function estimateTransactionFeeSolanaWeb3({ provider, transaction, }: {
transaction: SolanaWeb3Transaction;
provider: SolanaWeb3Provider;
}): Promise<TransactionFeeEstimate>;
export declare function estimateTransactionFeeCosmJs({ transaction, provider, estimatedGasPrice, sender, senderPubKey, memo, }: {
transaction: CosmJsTransaction;
provider: CosmJsProvider;
estimatedGasPrice: Numberish;
sender: Address;
senderPubKey: HexString;
memo?: string;
}): Promise<TransactionFeeEstimate>;
export declare function estimateTransactionFeeCosmJsWasm({ transaction, provider, estimatedGasPrice, sender, senderPubKey, memo, }: {
transaction: CosmJsWasmTransaction;
provider: CosmJsWasmProvider;
estimatedGasPrice: Numberish;
sender: Address;
senderPubKey: HexString;
memo?: string;
}): Promise<TransactionFeeEstimate>;
export declare function estimateTransactionFee({ transaction, provider, chainMetadata, sender, senderPubKey, }: {
transaction: TypedTransaction;
provider: TypedProvider;
chainMetadata: ChainMetadata;
sender: Address;
senderPubKey?: HexString;
}): Promise<TransactionFeeEstimate>;
//# sourceMappingURL=transactionFeeEstimators.d.ts.map