IncomingPaymentPacket

object IncomingPaymentPacket

Functions

decrypt
Link copied to clipboard
common
fun decrypt(add: UpdateAddHtlc, privateKey: PrivateKey): Either<FailureMessage, PaymentOnion.FinalPayload>

Decrypt the onion packet of a received htlc. We expect to be the final recipient, and we validate that the HTLC fields match the onion fields (this prevents intermediate nodes from sending an invalid amount or expiry).

decryptOnion
Link copied to clipboard
common
fun decryptOnion(paymentHash: ByteVector32, packet: OnionRoutingPacket, packetLength: Int, privateKey: PrivateKey): Either<FailureMessage, PaymentOnion.FinalPayload>