UNPKG

hypesdk

Version:

A powerful SDK for interacting with the Hype blockchain, featuring advanced routing and token swap capabilities

23 lines (22 loc) 985 B
import { ethers } from "ethers"; import { GasSettings } from "./types"; /** * Normalizes an amount input to a proper decimal string format * @param amount Amount as string or number * @returns Normalized amount string (e.g. "0.001" or ".001") */ export declare function normalizeAmount(amount: string | number): string; /** * Calculates gas settings based on network conditions and priority multiplier * @param feeData Current network fee data * @param priorityFeeMultiplier Multiplier for priority fee * @param gasLimit Gas limit for the transaction * @returns Gas settings object */ export declare function calculateGasSettings(feeData: ethers.FeeData, priorityFeeMultiplier?: number, gasLimit?: number): Promise<GasSettings>; /** * Logs gas settings to console * @param gasSettings Gas settings object * @param priorityFeeMultiplier Priority fee multiplier used */ export declare function logGasSettings(gasSettings: GasSettings, priorityFeeMultiplier: number): void;