UNPKG

@shogun-sdk/money-legos

Version:

Shogun Money Legos: clients and types for quotes, memes, prices, balances, fees, validations, etc.

26 lines 1.19 kB
import { Connection, VersionedTransaction } from '@solana/web3.js'; import type { EVMPublicClient } from '../types/client.js'; import type { QuoteTypes } from '../types/index.js'; export interface ICollectedFees { totalTxCost: bigint; gasLimit?: bigint; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; estimatedFees?: bigint; bridgeFee?: bigint; } export interface ISolanaFeeEstimation { fees: bigint; preBalances?: Record<string, bigint>; postBalances?: Record<string, bigint>; } export declare class FeeService { estimateSolanaTransactionFees(provider: Connection, transactions: VersionedTransaction[]): Promise<ISolanaFeeEstimation>; static getConstSolanaBridgeCostFee: (quote: QuoteTypes) => bigint; checkHasSufficientBalanceForGas(senderAddress: string, srcNetwork: number, quote: QuoteTypes, setSuggestedSlippage: (slippage: number) => void, priorityFee?: bigint, getErrorFallback?: (estimatedFees: bigint, network: number) => string, userDefinedFeeGwei?: number): Promise<{ fees: ICollectedFees; error?: string; provider: EVMPublicClient | Connection | null; }>; } //# sourceMappingURL=FeeService.d.ts.map