@@ -111,6 +111,10 @@ type WalletKitClient interface {
111111 EstimateFeeRate (ctx context.Context ,
112112 confTarget int32 ) (chainfee.SatPerKWeight , error )
113113
114+ // MinRelayFee returns the current minimum relay fee based on our chain
115+ // backend in sat/kw.
116+ MinRelayFee (ctx context.Context ) (chainfee.SatPerKWeight , error )
117+
114118 // ListSweeps returns a list of sweep transaction ids known to our node.
115119 // Note that this function only looks up transaction ids, and does not
116120 // query our wallet for the full set of transactions. If startHeight is
@@ -540,6 +544,25 @@ func (m *walletKitClient) EstimateFeeRate(ctx context.Context, confTarget int32)
540544 return chainfee .SatPerKWeight (resp .SatPerKw ), nil
541545}
542546
547+ // MinRelayFee returns the current minimum relay fee based on our chain backend
548+ // in sat/kw.
549+ func (m * walletKitClient ) MinRelayFee (
550+ ctx context.Context ) (chainfee.SatPerKWeight , error ) {
551+
552+ rpcCtx , cancel := context .WithTimeout (ctx , m .timeout )
553+ defer cancel ()
554+
555+ rpcCtx = m .walletKitMac .WithMacaroonAuth (rpcCtx )
556+ resp , err := m .client .EstimateFee (rpcCtx , & walletrpc.EstimateFeeRequest {
557+ ConfTarget : 6 ,
558+ })
559+ if err != nil {
560+ return 0 , err
561+ }
562+
563+ return chainfee .SatPerKWeight (resp .MinRelayFeeSatPerKw ), nil
564+ }
565+
543566// ListSweeps returns a list of sweep transaction ids known to our node.
544567// Note that this function only looks up transaction ids (Verbose=false), and
545568// does not query our wallet for the full set of transactions.
0 commit comments