Peer
@ObsoleteCoroutinesApi
Content copied to clipboard
The peer we establish a connection to. This object contains the TCP socket, a flow of the channels with that peer, and watches the events on those channels and processes the relevant actions. The dialogue with the peer is done in coroutines.
Parameters
node Params
Low level, Lightning related parameters that our node will use in relation to this Peer.
wallet Params
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.
socket Builder
Builds the TCP socket used to connect to the Peer.
init Tlv Stream
Optional stream of TLV for the Init message we send to this Peer after connection. Empty by default.
Constructors
Peer
Link copied to clipboard
fun Peer(nodeParams: NodeParams, walletParams: WalletParams, watcher: ElectrumWatcher, db: Databases, socketBuilder: TcpSocket.Builder?, scope: CoroutineScope, initTlvStream: TlvStream<InitTlv> = TlvStream.empty())
Content copied to clipboard
Types
Functions
disconnect
Link copied to clipboard
fun disconnect()
Content copied to clipboard
open Listener Event Subscription
Link copied to clipboard
register Fcm Token
Link copied to clipboard
send To Peer
Link copied to clipboard
Properties
bootChannelsFlow
Link copied to clipboard
channels
Link copied to clipboard
channelsFlow
Link copied to clipboard
connectionState
Link copied to clipboard
coroutineContext
Link copied to clipboard
currentTipFlow
Link copied to clipboard
nodeParams
Link copied to clipboard
onChainFeeratesFlow
Link copied to clipboard
outputLightningMessages
Link copied to clipboard
remoteNodeId
Link copied to clipboard
socketBuilder
Link copied to clipboard
walletParams
Link copied to clipboard
watcher
Link copied to clipboard