Package fr.acinq.lightning.io

Types

BytesReceived
Link copied to clipboard
common
data class BytesReceived(data: ByteArray) : PeerEvent
ChannelClosing
Link copied to clipboard
common
data class ChannelClosing(channelId: ByteVector32) : PeerListenerEvent
CheckPaymentsTimeout
Link copied to clipboard
common
object CheckPaymentsTimeout : PaymentEvent
Disconnected
Link copied to clipboard
common
object Disconnected : PeerEvent
IosTcpSocket
Link copied to clipboard
native
class IosTcpSocket(socket: <ERROR CLASS>) : TcpSocket
JvmTcpSocket
Link copied to clipboard
class JvmTcpSocket(socket: Socket) : TcpSocket
LightningSession
Link copied to clipboard
common
class LightningSession(enc: CipherState, dec: CipherState, ck: ByteArray)
NativeSocketException
Link copied to clipboard
native
sealed class NativeSocketException
PaymentEvent
Link copied to clipboard
common
sealed class PaymentEvent : PeerEvent
PaymentNotSent
Link copied to clipboard
common
data class PaymentNotSent(request: SendPayment, reason: OutgoingPaymentFailure) : PeerListenerEvent
PaymentProgress
Link copied to clipboard
common
data class PaymentProgress(request: SendPayment, fees: MilliSatoshi) : PeerListenerEvent
PaymentReceived
Link copied to clipboard
common
data class PaymentReceived(incomingPayment: IncomingPayment, received: IncomingPayment.Received) : PeerListenerEvent
PaymentRequestGenerated
Link copied to clipboard
common
data class PaymentRequestGenerated(receivePayment: ReceivePayment, request: String) : PeerListenerEvent
PaymentSent
Link copied to clipboard
common
data class PaymentSent(request: SendPayment, payment: OutgoingPayment) : PeerListenerEvent
PayToOpenResponseEvent
Link copied to clipboard
common
data class PayToOpenResponseEvent(payToOpenResponse: PayToOpenResponse) : PeerEvent
Peer
Link copied to clipboard
common
@ObsoleteCoroutinesApi
class Peer(nodeParams: NodeParams, walletParams: WalletParams, watcher: ElectrumWatcher, db: Databases, socketBuilder: TcpSocket.Builder?, scope: CoroutineScope, initTlvStream: TlvStream<InitTlv>) : CoroutineScope

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.

PeerChannels
Link copied to clipboard
common
object PeerChannels
PeerEvent
Link copied to clipboard
common
sealed class PeerEvent
PeerListenerEvent
Link copied to clipboard
common
sealed class PeerListenerEvent
PhoenixAndroidLegacyInfoEvent
Link copied to clipboard
common
data class PhoenixAndroidLegacyInfoEvent(info: PhoenixAndroidLegacyInfo) : PeerListenerEvent
PurgeExpiredPayments
Link copied to clipboard
common
data class PurgeExpiredPayments(fromCreatedAt: Long, toCreatedAt: Long) : PaymentEvent
ReceivePayment
Link copied to clipboard
common
data class ReceivePayment(paymentPreimage: ByteVector32, amount: MilliSatoshi?, description: String, expirySeconds: Long?, result: CompletableDeferred<PaymentRequest>) : PaymentEvent
SendPayment
Link copied to clipboard
common
data class SendPayment(paymentId: UUID, amount: MilliSatoshi, recipient: PublicKey, details: OutgoingPayment.Details.Normal, trampolineFeesOverride: List<TrampolineFees>?) : PaymentEvent
SendPhoenixAndroidLegacyMigrate
Link copied to clipboard
common
data class SendPhoenixAndroidLegacyMigrate(newNodeId: PublicKey) : PeerEvent
SendSwapInRequest
Link copied to clipboard
common
object SendSwapInRequest : PeerEvent
SwapInConfirmedEvent
Link copied to clipboard
common
data class SwapInConfirmedEvent(swapInConfirmed: SwapInConfirmed) : PeerListenerEvent
SwapInPendingEvent
Link copied to clipboard
common
data class SwapInPendingEvent(swapInPending: SwapInPending) : PeerListenerEvent
SwapInResponseEvent
Link copied to clipboard
common
data class SwapInResponseEvent(swapInResponse: SwapInResponse) : PeerListenerEvent
TcpSocket
Link copied to clipboard
common
interface TcpSocket
WatchReceived
Link copied to clipboard
common
data class WatchReceived(watch: WatchEvent) : PeerEvent
WrappedChannelEvent
Link copied to clipboard
common
data class WrappedChannelEvent(channelId: ByteVector32, channelEvent: ChannelEvent) : PeerEvent

Functions

linesFlow
Link copied to clipboard
common
fun TcpSocket.linesFlow(): Flow<String>
receiveFully
Link copied to clipboard
common
suspend fun TcpSocket.receiveFully(size: Int): ByteArray