Table of Contents

Class PaymentTrackingService

Namespace
NArk.Core.Services
Assembly
NArk.Core.dll

Hosted service that subscribes to protocol events (VTXOs and intents) and automatically updates payment and payment request statuses. Registered via NArk.Storage.EfCore.Hosting.StorageServiceCollectionExtensions.AddArkPaymentTracking.

public class PaymentTrackingService : IHostedService, IDisposable
Inheritance
PaymentTrackingService
Implements
Inherited Members

Constructors

PaymentTrackingService(IPaymentStorage, IPaymentRequestStorage, IVtxoStorage, IIntentStorage, ILogger<PaymentTrackingService>)

Hosted service that subscribes to protocol events (VTXOs and intents) and automatically updates payment and payment request statuses. Registered via NArk.Storage.EfCore.Hosting.StorageServiceCollectionExtensions.AddArkPaymentTracking.

public PaymentTrackingService(IPaymentStorage paymentStorage, IPaymentRequestStorage paymentRequestStorage, IVtxoStorage vtxoStorage, IIntentStorage intentStorage, ILogger<PaymentTrackingService> logger)

Parameters

paymentStorage IPaymentStorage
paymentRequestStorage IPaymentRequestStorage
vtxoStorage IVtxoStorage
intentStorage IIntentStorage
logger ILogger<PaymentTrackingService>

Methods

Dispose()

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

public void Dispose()

StartAsync(CancellationToken)

Triggered when the application host is ready to start the service.

public Task StartAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Indicates that the start process has been aborted.

Returns

Task

A Task that represents the asynchronous Start operation.

StopAsync(CancellationToken)

Triggered when the application host is performing a graceful shutdown.

public Task StopAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Indicates that the shutdown process should no longer be graceful.

Returns

Task

A Task that represents the asynchronous Stop operation.