Skip to main content

estimateFee

HardKAS SDK


HardKAS SDK / tx-builder/src / estimateFee

Function: estimateFee()

estimateFee(request): FeeEstimationResult

Defined in: packages/tx-builder/src/fee-estimator.ts:76

Parameters​

request​

FeeEstimationRequest

Returns​

FeeEstimationResult

Deprecated​

Since M10-C. estimateFee implements a HardKAS "conservative" +10% heuristic over the pinned SDK mass, on top of a hardcoded DEFAULT_MINIMUM_RELAY_RATE_SOMPI_PER_MASS = 100n. Upstream Generator.estimate() (via estimateTransactionsUpstream in kaspa-wallet-adapter.ts) is exact — no +10% padding, and it reads the network params from the SDK. Use that for anything you plan to submit.

This function will continue to work through M10 for backward compatibility but SHOULD NOT be used in new code.