Table of Contents

Class UtxoMemoryRepository

Namespace
NLightning.Infrastructure.Repositories.Memory
Assembly
NLightning.Infrastructure.Repositories.dll
public class UtxoMemoryRepository : IUtxoMemoryRepository
Inheritance
UtxoMemoryRepository
Implements
Inherited Members

Methods

Add(UtxoModel)

public void Add(UtxoModel utxoModel)

Parameters

utxoModel UtxoModel

ConfirmSpendOnChannel(ChannelId)

public void ConfirmSpendOnChannel(ChannelId channelId)

Parameters

channelId ChannelId

GetConfirmedBalance(uint)

public LightningMoney GetConfirmedBalance(uint currentBlockHeight)

Parameters

currentBlockHeight uint

Returns

LightningMoney

GetLockedBalance()

public LightningMoney GetLockedBalance()

Returns

LightningMoney

GetLockedUtxosForChannel(ChannelId)

public List<UtxoModel> GetLockedUtxosForChannel(ChannelId channelId)

Parameters

channelId ChannelId

Returns

List<UtxoModel>

GetUnconfirmedBalance(uint)

public LightningMoney GetUnconfirmedBalance(uint currentBlockHeight)

Parameters

currentBlockHeight uint

Returns

LightningMoney

Load(List<UtxoModel>)

public void Load(List<UtxoModel> utxoSet)

Parameters

utxoSet List<UtxoModel>

LockUtxosToSpendOnChannel(LightningMoney, ChannelId)

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

Parameters

requestFundingAmount LightningMoney
channelId ChannelId

Returns

List<UtxoModel>

ReturnUtxosNotSpentOnChannel(ChannelId)

public List<UtxoModel> ReturnUtxosNotSpentOnChannel(ChannelId channelId)

Parameters

channelId ChannelId

Returns

List<UtxoModel>

Spend(UtxoModel)

public void Spend(UtxoModel utxoModel)

Parameters

utxoModel UtxoModel

TryGetUtxo(TxId, uint, out UtxoModel)

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

Parameters

txId TxId
index uint
utxoModel UtxoModel

Returns

bool

UpgradeChannelIdOnLockedUtxos(ChannelId, ChannelId)

public void UpgradeChannelIdOnLockedUtxos(ChannelId oldChannelId, ChannelId newChannelId)

Parameters

oldChannelId ChannelId
newChannelId ChannelId