Table of Contents

Interface IChannelKeySetDbRepository

Namespace
NLightning.Domain.Channels.Interfaces
Assembly
NLightning.Domain.dll

Repository interface for managing channel key sets

public interface IChannelKeySetDbRepository

Methods

Add(ChannelId, bool, ChannelKeySetModel)

Adds a new channel key set

void Add(ChannelId channelId, bool isLocal, ChannelKeySetModel keySetModel)

Parameters

channelId ChannelId

Channel ID

isLocal bool

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

keySetModel ChannelKeySetModel

The key set to add

DeleteAsync(ChannelId, bool)

Deletes a channel key set

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

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

void Update(ChannelId channelId, bool isLocal, ChannelKeySetModel keySetModel)

Parameters

channelId ChannelId

Channel ID

isLocal bool

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

keySetModel ChannelKeySetModel

The updated key set