MempoolTransaction

data class MempoolTransaction(val weight: Long, val fee: Long)(source)

Represents a transaction in the Bitcoin mempool.

This class contains the minimal information needed for fee estimation: the transaction's weight and the fee amount.

Example usage:

val transaction = MempoolTransaction(
weight = 565L, // Transaction weight in weight units
fee = 1000L // Fee amount in satoshis
)

// Get fee rate in sat/vB
val feeRate = transaction.getFeeRate()

Constructors

Link copied to clipboard
constructor(weight: Long, fee: Long)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val fee: Long

The transaction fee in satoshis

Link copied to clipboard

The transaction weight in weight units (WU)

Functions

Link copied to clipboard

Calculates the transaction's fee rate in sat/vB.