Table of Contents

Class FeeService

Namespace
NLightning.Common.Services
Assembly
NLightning.Common.dll
public class FeeService : IFeeService, IDisposable
Inheritance
FeeService
Implements
Inherited Members

Constructors

FeeService(HttpClient)

public FeeService(HttpClient httpClient)

Parameters

httpClient HttpClient

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetCachedFeeRatePerKw()

Gets the current cached fee rate without checking API

public LightningMoney GetCachedFeeRatePerKw()

Returns

LightningMoney

GetFeeRatePerKwAsync(CancellationToken)

Gets the current fee rate in satoshis per kiloweight (sat/kW)

public Task<LightningMoney> GetFeeRatePerKwAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<LightningMoney>

RefreshFeeRateAsync(CancellationToken)

Forces a refresh of the fee rate from the API

public Task RefreshFeeRateAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

StartBackgroundRefreshAsync(CancellationToken)

Starts a background task to periodically refresh the fee rate

public Task StartBackgroundRefreshAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task