NodeParams

data class NodeParams(keyManager: KeyManager, alias: String, features: Features, dustLimit: Satoshi, maxRemoteDustLimit: Satoshi, onChainFeeConf: OnChainFeeConf, maxHtlcValueInFlightMsat: Long, maxAcceptedHtlcs: Int, expiryDeltaBlocks: CltvExpiryDelta, fulfillSafetyBeforeTimeoutBlocks: CltvExpiryDelta, checkHtlcTimeoutAfterStartupDelaySeconds: Int, htlcMinimum: MilliSatoshi, toRemoteDelayBlocks: CltvExpiryDelta, maxToLocalDelayBlocks: CltvExpiryDelta, minDepthBlocks: Int, feeBase: MilliSatoshi, feeProportionalMillionth: Int, reserveToFundingRatio: Double, maxReserveToFundingRatio: Double, revocationTimeoutSeconds: Long, authTimeoutSeconds: Long, initTimeoutSeconds: Long, pingIntervalSeconds: Long, pingTimeoutSeconds: Long, pingDisconnect: Boolean, autoReconnect: Boolean, initialRandomReconnectDelaySeconds: Long, maxReconnectIntervalSeconds: Long, chainHash: ByteVector32, channelFlags: Byte, paymentRequestExpirySeconds: Long, multiPartPaymentExpirySeconds: Long, minFundingSatoshis: Satoshi, maxFundingSatoshis: Satoshi, maxPaymentAttempts: Int, enableTrampolinePayment: Boolean)

Parameters

keyManager

derive private keys and secrets from your seed.

alias

name of the lightning node.

features

features supported by the lightning node.

dustLimit

threshold below which outputs will not be generated in commitment or HTLC transactions (i.e. HTLCs below this amount plus HTLC transaction fees are not enforceable on-chain).

maxRemoteDustLimit

maximum dust limit we let our peer use for his commitment (in theory it should always be 546 sats).

onChainFeeConf

on-chain feerates that will be applied to various transactions.

maxHtlcValueInFlightMsat

cap on the total value of pending HTLCs in a channel: this lets us limit our exposure to HTLCs risk.

maxAcceptedHtlcs

cap on the number of pending HTLCs in a channel: this lets us limit our exposure to HTLCs risk.

expiryDeltaBlocks

cltv-expiry-delta used in our channel_update: since our channels are private and we don't relay payments, this will be basically ignored.

fulfillSafetyBeforeTimeoutBlocks

number of blocks necessary to react to a malicious peer that doesn't acknowledge and sign our HTLC preimages.

checkHtlcTimeoutAfterStartupDelaySeconds

delay in seconds before we check for timed out HTLCs in our channels after a wallet restart.

htlcMinimum

minimum accepted htlc value.

toRemoteDelayBlocks

number of blocks our peer will have to wait before they get their main output back in case they force-close a channel.

maxToLocalDelayBlocks

maximum number of blocks we will have to wait before we get our main output back in case we force-close a channel.

minDepthBlocks

minimum depth of a transaction before we consider it safely confirmed.

feeBase

base fee used in our channel_update: since our channels are private and we don't relay payments, this will be basically ignored.

feeProportionalMillionth

proportional fee used in our channel_update: since our channels are private and we don't relay payments, this will be basically ignored.

reserveToFundingRatio

size of the channel reserve we required from our peer.

maxReserveToFundingRatio

maximum size of the channel reserve our peer can require from us.

revocationTimeoutSeconds

delay after which we disconnect from our peer if they don't send us a revocation after a new commitment is signed.

authTimeoutSeconds

timeout for the connection authentication phase.

initTimeoutSeconds

timeout for the connection initialization phase.

pingIntervalSeconds

delay between ping messages.

pingTimeoutSeconds

timeout when waiting for a response to our ping.

pingDisconnect

disconnect when a peer doesn't respond to our ping.

autoReconnect

automatically reconnect to our peers.

initialRandomReconnectDelaySeconds

delay before which we reconnect to our peers (will be randomized based on this value).

maxReconnectIntervalSeconds

maximum delay between reconnection attempts.

chainHash

bitcoin chain we're interested in (testnet or mainnet).

channelFlags

channel flags used to temporarily enable or disable channels.

paymentRequestExpirySeconds

our Bolt 11 invoices will only be valid for this duration.

multiPartPaymentExpirySeconds

number of seconds we will wait to receive all parts of a multi-part payment.

minFundingSatoshis

minimum channel size.

maxFundingSatoshis

maximum channel size.

maxPaymentAttempts

maximum number of retries when attempting an outgoing payment.

enableTrampolinePayment

enable trampoline payments.

Constructors

NodeParams
Link copied to clipboard
common
fun NodeParams(keyManager: KeyManager, alias: String, features: Features, dustLimit: Satoshi, maxRemoteDustLimit: Satoshi, onChainFeeConf: OnChainFeeConf, maxHtlcValueInFlightMsat: Long, maxAcceptedHtlcs: Int, expiryDeltaBlocks: CltvExpiryDelta, fulfillSafetyBeforeTimeoutBlocks: CltvExpiryDelta, checkHtlcTimeoutAfterStartupDelaySeconds: Int, htlcMinimum: MilliSatoshi, toRemoteDelayBlocks: CltvExpiryDelta, maxToLocalDelayBlocks: CltvExpiryDelta, minDepthBlocks: Int, feeBase: MilliSatoshi, feeProportionalMillionth: Int, reserveToFundingRatio: Double, maxReserveToFundingRatio: Double, revocationTimeoutSeconds: Long, authTimeoutSeconds: Long, initTimeoutSeconds: Long, pingIntervalSeconds: Long, pingTimeoutSeconds: Long, pingDisconnect: Boolean, autoReconnect: Boolean, initialRandomReconnectDelaySeconds: Long, maxReconnectIntervalSeconds: Long, chainHash: ByteVector32, channelFlags: Byte, paymentRequestExpirySeconds: Long, multiPartPaymentExpirySeconds: Long, minFundingSatoshis: Satoshi, maxFundingSatoshis: Satoshi, maxPaymentAttempts: Int, enableTrampolinePayment: Boolean)

Properties

alias
Link copied to clipboard
common
val alias: String
authTimeoutSeconds
Link copied to clipboard
common
val authTimeoutSeconds: Long
autoReconnect
Link copied to clipboard
common
val autoReconnect: Boolean
chainHash
Link copied to clipboard
common
val chainHash: ByteVector32
channelFlags
Link copied to clipboard
common
val channelFlags: Byte
common
val checkHtlcTimeoutAfterStartupDelaySeconds: Int
dustLimit
Link copied to clipboard
common
val dustLimit: Satoshi
enableTrampolinePayment
Link copied to clipboard
common
val enableTrampolinePayment: Boolean
expiryDeltaBlocks
Link copied to clipboard
common
val expiryDeltaBlocks: CltvExpiryDelta
features
Link copied to clipboard
common
val features: Features
feeBase
Link copied to clipboard
common
val feeBase: MilliSatoshi
feeProportionalMillionth
Link copied to clipboard
common
val feeProportionalMillionth: Int
fulfillSafetyBeforeTimeoutBlocks
Link copied to clipboard
common
val fulfillSafetyBeforeTimeoutBlocks: CltvExpiryDelta
htlcMinimum
Link copied to clipboard
common
val htlcMinimum: MilliSatoshi
initialRandomReconnectDelaySeconds
Link copied to clipboard
common
val initialRandomReconnectDelaySeconds: Long
initTimeoutSeconds
Link copied to clipboard
common
val initTimeoutSeconds: Long
keyManager
Link copied to clipboard
common
val keyManager: KeyManager
maxAcceptedHtlcs
Link copied to clipboard
common
val maxAcceptedHtlcs: Int
maxFundingSatoshis
Link copied to clipboard
common
val maxFundingSatoshis: Satoshi
maxHtlcValueInFlightMsat
Link copied to clipboard
common
val maxHtlcValueInFlightMsat: Long
maxPaymentAttempts
Link copied to clipboard
common
val maxPaymentAttempts: Int
maxReconnectIntervalSeconds
Link copied to clipboard
common
val maxReconnectIntervalSeconds: Long
maxRemoteDustLimit
Link copied to clipboard
common
val maxRemoteDustLimit: Satoshi
maxReserveToFundingRatio
Link copied to clipboard
common
val maxReserveToFundingRatio: Double
maxToLocalDelayBlocks
Link copied to clipboard
common
val maxToLocalDelayBlocks: CltvExpiryDelta
minDepthBlocks
Link copied to clipboard
common
val minDepthBlocks: Int
minFundingSatoshis
Link copied to clipboard
common
val minFundingSatoshis: Satoshi
multiPartPaymentExpirySeconds
Link copied to clipboard
common
val multiPartPaymentExpirySeconds: Long
nodeId
Link copied to clipboard
common
val nodeId: PublicKey
nodePrivateKey
Link copied to clipboard
common
val nodePrivateKey: PrivateKey
onChainFeeConf
Link copied to clipboard
common
val onChainFeeConf: OnChainFeeConf
paymentRequestExpirySeconds
Link copied to clipboard
common
val paymentRequestExpirySeconds: Long
pingDisconnect
Link copied to clipboard
common
val pingDisconnect: Boolean
pingIntervalSeconds
Link copied to clipboard
common
val pingIntervalSeconds: Long
pingTimeoutSeconds
Link copied to clipboard
common
val pingTimeoutSeconds: Long
reserveToFundingRatio
Link copied to clipboard
common
val reserveToFundingRatio: Double
revocationTimeoutSeconds
Link copied to clipboard
common
val revocationTimeoutSeconds: Long
toRemoteDelayBlocks
Link copied to clipboard
common
val toRemoteDelayBlocks: CltvExpiryDelta