-
public interface FeeRateInterfaceRepresents fee rate.
This is an integer type representing fee rate in sat/kwu. It provides protection against mixing up the types as well as basic formatting features.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classFeeRateInterface.Companion
-
Method Summary
Modifier and Type Method Description abstract AmountfeeVb(ULong vb)Calculates fee in satoshis by multiplying this fee rate by weight, in virtual bytes, returning Noneif overflow occurred.abstract AmountfeeWu(ULong wu)Calculates fee by multiplying this fee rate by weight, in weight units, returning Noneif overflow occurred.abstract ULongtoSatPerKwu()Returns raw fee rate. abstract ULongtoSatPerVbCeil()Converts to sat/vB rounding up. abstract ULongtoSatPerVbFloor()Converts to sat/vB rounding down. -
-
Method Detail
-
feeVb
abstract Amount feeVb(ULong vb)
Calculates fee in satoshis by multiplying this fee rate by weight, in virtual bytes, returning
Noneif overflow occurred.This is equivalent to converting vb to weight using Weight::from_vb and then calling Self::fee_wu(weight).
-
feeWu
abstract Amount feeWu(ULong wu)
Calculates fee by multiplying this fee rate by weight, in weight units, returning
Noneif overflow occurred.This is equivalent to Self::checked_mul_by_weight().
-
toSatPerKwu
abstract ULong toSatPerKwu()
Returns raw fee rate.
-
toSatPerVbCeil
abstract ULong toSatPerVbCeil()
Converts to sat/vB rounding up.
-
toSatPerVbFloor
abstract ULong toSatPerVbFloor()
Converts to sat/vB rounding down.
-
-
-
-