Interface FeeCalculator

All Known Implementing Classes:
TestnetFeeCalculator

public interface FeeCalculator
Interface for transaction fee calculation.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bitcoinj.base.Coin
    Calculate the fee for an almost-complete transaction.
  • Method Details

    • calculateFee

      org.bitcoinj.base.Coin calculateFee(SigningRequest proposedTx)
      Calculate the fee for an almost-complete transaction. The proposed transaction should contain all inputs and outputs. Typically, this means having a change output with a value of Coin.ZERO. After calculating the correct fee the change output should be updated with the correct amount.
      Parameters:
      proposedTx - A nearly-complete proposed transaction.
      Returns:
      A recommended fee for this transaction.