add a mempool client for fee estimation

This commit is contained in:
Jesse de Wit
2023-02-02 15:38:23 +01:00
parent 43e045f7ff
commit 17a3dc1d94
2 changed files with 111 additions and 0 deletions

21
chain/fee_estimator.go Normal file
View File

@@ -0,0 +1,21 @@
package chain
import "context"
type FeeStrategy int
const (
FeeStrategyFastest FeeStrategy = 0
FeeStrategyHalfHour FeeStrategy = 1
FeeStrategyHour FeeStrategy = 2
FeeStrategyEconomy FeeStrategy = 3
FeeStrategyMinimum FeeStrategy = 4
)
type FeeEstimation struct {
SatPerVByte float64
}
type FeeEstimator interface {
EstimateFeeRate(context.Context, FeeStrategy) (*FeeEstimation, error)
}