Helpers to handle incoming payment packets.
- Companion:
- class
- Source:
- PaymentPacket.scala
Type members
Classlikes
We must relay the payment to a direct peer.
We must relay the payment to a direct peer.
- Source:
- PaymentPacket.scala
We must relay the payment to a remote node.
We must relay the payment to a remote node.
- Source:
- PaymentPacket.scala
Inherited types
The names of the product elements
The names of the product elements
- Inherited from:
- Mirror
- Source:
- Mirror.scala
Value members
Concrete methods
Decrypt the onion packet of a received htlc. If we are the final recipient, we validate that the HTLC fields match the onion fields (this prevents intermediate nodes from sending an invalid amount or expiry).
Decrypt the onion packet of a received htlc. If we are the final recipient, we validate that the HTLC fields match the onion fields (this prevents intermediate nodes from sending an invalid amount or expiry).
NB: we can't fully validate RelayPackets because it requires knowing the channel/route we'll be using, which we don't know yet. Such validation is the responsibility of downstream components.
- Value parameters:
- add
incoming htlc
- privateKey
this node's private key
- Returns:
whether the payment is to be relayed or if our node is the final recipient (or an error).
- Source:
- PaymentPacket.scala