Table of Contents

Class ChannelKeySetDbRepository

Namespace
NLightning.Infrastructure.Repositories.Database.Channel
Assembly
NLightning.Infrastructure.Repositories.dll
public class ChannelKeySetDbRepository : BaseDbRepository<ChannelKeySetEntity>, IChannelKeySetDbRepository
Inheritance
ChannelKeySetDbRepository
Implements
Inherited Members

Constructors

ChannelKeySetDbRepository(NLightningDbContext)

public ChannelKeySetDbRepository(NLightningDbContext context)

Parameters

context NLightningDbContext

Methods

Add(ChannelId, bool, ChannelKeySetModel)

Adds a new channel key set

public void Add(ChannelId channelId, bool isLocal, ChannelKeySetModel keySet)

Parameters

channelId ChannelId

Channel ID

isLocal bool

True if this is the local key set, false for remote

keySet ChannelKeySetModel

DeleteAsync(ChannelId, bool)

Deletes a channel key set

public Task DeleteAsync(ChannelId channelId, bool isLocal)

Parameters

channelId ChannelId

Channel ID

isLocal bool

True if this is the local key set, false for remote

Returns

Task

GetByIdAsync(ChannelId, bool)

Gets a channel key set

public Task<ChannelKeySetModel?> GetByIdAsync(ChannelId channelId, bool isLocal)

Parameters

channelId ChannelId

Channel ID

isLocal bool

True if this is the local key set, false for remote

Returns

Task<ChannelKeySetModel>

Channel key set or null if not found

Update(ChannelId, bool, ChannelKeySetModel)

Updates an existing channel key set

public void Update(ChannelId channelId, bool isLocal, ChannelKeySetModel keySet)

Parameters

channelId ChannelId

Channel ID

isLocal bool

True if this is the local key set, false for remote

keySet ChannelKeySetModel