CltvExpiryDelta

data class CltvExpiryDelta(underlying: Int) : Comparable<CltvExpiryDelta>

Channels advertise a cltv expiry delta that should be used when routing through them. This value needs to be converted to a [fr.acinq.lightning.CltvExpiry] to be used in OP_CLTV.

CltvExpiryDelta can also be used when working with OP_CSV which is by design a delta.

Parameters

underlying

the cltv expiry delta value.

Constructors

CltvExpiryDelta
Link copied to clipboard
common
fun CltvExpiryDelta(underlying: Int)

Functions

compareTo
Link copied to clipboard
common
open operator override fun compareTo(other: CltvExpiryDelta): Int
minus
Link copied to clipboard
common
operator fun minus(other: CltvExpiryDelta): CltvExpiryDelta
plus
Link copied to clipboard
common
operator fun plus(other: CltvExpiryDelta): CltvExpiryDelta
operator fun plus(other: Int): CltvExpiryDelta
toCltvExpiry
Link copied to clipboard
common
fun toCltvExpiry(blockHeight: Long): CltvExpiry

Adds the current block height to the given delta to obtain an absolute expiry.

toInt
Link copied to clipboard
common
fun toInt(): Int
toLong
Link copied to clipboard
common
fun toLong(): Long