UNPKG

@funkit/connect

Version:

Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.

10 lines (9 loc) 413 B
import type { Dnum } from 'dnum'; /** * Compute a gas cost estimate in wei as an 18-decimal Dnum. * * @param gasPriceWei - Current gas price in wei (e.g. from `getGasPrice`) * @param gasUnits - Conservative gas-unit buffer reserved for the checkout tx * @returns Gas estimate as a Dnum: [gasUnits * gasPriceWei, 18] */ export declare function getGasEstimateWei(gasPriceWei: bigint, gasUnits: bigint): Dnum;