Table of Contents

Interface IUtxoMemoryRepository

Namespace
NLightning.Domain.Bitcoin.Interfaces
Assembly
NLightning.Domain.dll
public interface IUtxoMemoryRepository

Methods

Add(UtxoModel)

void Add(UtxoModel utxoModel)

Parameters

utxoModel UtxoModel

ConfirmSpendOnChannel(ChannelId)

void ConfirmSpendOnChannel(ChannelId channelId)

Parameters

channelId ChannelId

GetConfirmedBalance(uint)

LightningMoney GetConfirmedBalance(uint currentBlockHeight)

Parameters

currentBlockHeight uint

Returns

LightningMoney

GetLockedBalance()

LightningMoney GetLockedBalance()

Returns

LightningMoney

GetLockedUtxosForChannel(ChannelId)

List<UtxoModel> GetLockedUtxosForChannel(ChannelId channelId)

Parameters

channelId ChannelId

Returns

List<UtxoModel>

GetUnconfirmedBalance(uint)

LightningMoney GetUnconfirmedBalance(uint currentBlockHeight)

Parameters

currentBlockHeight uint

Returns

LightningMoney

Load(List<UtxoModel>)

void Load(List<UtxoModel> utxoSet)

Parameters

utxoSet List<UtxoModel>

LockUtxosToSpendOnChannel(LightningMoney, ChannelId)

List<UtxoModel> LockUtxosToSpendOnChannel(LightningMoney requestFundingAmount, ChannelId channelId)

Parameters

requestFundingAmount LightningMoney
channelId ChannelId

Returns

List<UtxoModel>

ReturnUtxosNotSpentOnChannel(ChannelId)

List<UtxoModel> ReturnUtxosNotSpentOnChannel(ChannelId channelId)

Parameters

channelId ChannelId

Returns

List<UtxoModel>

Spend(UtxoModel)

void Spend(UtxoModel utxoModel)

Parameters

utxoModel UtxoModel

TryGetUtxo(TxId, uint, out UtxoModel)

bool TryGetUtxo(TxId txId, uint index, out UtxoModel utxoModel)

Parameters

txId TxId
index uint
utxoModel UtxoModel

Returns

bool

UpgradeChannelIdOnLockedUtxos(ChannelId, ChannelId)

void UpgradeChannelIdOnLockedUtxos(ChannelId oldChannelId, ChannelId newChannelId)

Parameters

oldChannelId ChannelId
newChannelId ChannelId