mirror of
https://github.com/aljazceru/lspd.git
synced 2026-01-06 07:34:23 +01:00
add a mempool client for fee estimation
This commit is contained in:
21
chain/fee_estimator.go
Normal file
21
chain/fee_estimator.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user