Peer

fun Peer(nodeParams: NodeParams, walletParams: WalletParams, watcher: ElectrumWatcher, db: Databases, socketBuilder: TcpSocket.Builder?, scope: CoroutineScope, initTlvStream: TlvStream<InitTlv> = TlvStream.empty())

Parameters

nodeParams

Low level, Lightning related parameters that our node will use in relation to this Peer.

walletParams

High level parameters for our node. It especially contains the Peer's NodeUri.

watcher

Watches events from the Electrum client and publishes transactions and events.

db

Wraps the various databases persisting the channels and payments data related to the Peer.

socketBuilder

Builds the TCP socket used to connect to the Peer.

initTlvStream

Optional stream of TLV for the Init message we send to this Peer after connection. Empty by default.