All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.fr.acinq.lightning.db.ChannelsDb.kt Maven / Gradle / Ivy

package fr.acinq.lightning.db

import fr.acinq.bitcoin.ByteVector32
import fr.acinq.lightning.CltvExpiry
import fr.acinq.lightning.channel.states.PersistedChannelState

interface ChannelsDb {
    suspend fun addOrUpdateChannel(state: PersistedChannelState)

    suspend fun removeChannel(channelId: ByteVector32)

    suspend fun listLocalChannels(): List

    suspend fun addHtlcInfo(channelId: ByteVector32, commitmentNumber: Long, paymentHash: ByteVector32, cltvExpiry: CltvExpiry)

    suspend fun listHtlcInfos(channelId: ByteVector32, commitmentNumber: Long): List>

    fun close()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy