| Copyright | (c) 2025 Jared Tobin |
|---|---|
| License | MIT |
| Maintainer | Jared Tobin <jared@ppad.tech> |
| Safe Haskell | None |
| Language | Haskell2010 |
Lightning.Protocol.BOLT4.Process
Contents
Description
Onion packet processing for BOLT4.
Synopsis
Processing
Arguments
| :: ByteString | 32-byte secret key of this node |
| -> OnionPacket | incoming onion packet |
| -> ByteString | associated data (payment hash) |
| -> Either RejectReason ProcessResult |
Process an incoming onion packet.
Takes the receiving node's private key, the incoming packet, and associated data (typically the payment hash).
Returns either a rejection reason or the processing result (forward to next hop or receive at final destination).
Rejection reasons
data RejectReason Source #
Reasons for rejecting a packet.
Constructors
| InvalidVersion !Word8 | Version byte is not 0x00 |
| InvalidEphemeralKey | Malformed public key |
| HmacMismatch | HMAC verification failed |
| InvalidPayload !String | Malformed hop payload |