TransferFeeEstimator

A pure, deterministic preview of the fees a two-output Amulet transfer would be charged — "Fee: ~X CC" before sending. No I/O: feed it ScanClient.amuletRulesConfig and a round price from ScanClient.openMiningRounds.

Types

Link copied to clipboard
data class Estimate(val feeCc: BigDecimal, val feeUsd: BigDecimal, val createFeesUsd: BigDecimal, val transferFeeUsd: BigDecimal)

The estimated fees of one transfer, total and by component.

Functions

Link copied to clipboard
fun estimate(schedule: TransferFeeSchedule, amuletPriceUsd: BigDecimal, amountCc: BigDecimal, outputCount: Int = 2): TransferFeeEstimator.Estimate

Estimates the fee for sending amountCc with outputCount created outputs, converted at amuletPriceUsd.