Expand description

Network sphinx packet encoding and onion packet construction as described in BOLT-4, based on Secp256k1 curve. The lightning-network-specific part of BOLT-4 is implemented in LNP Core library and not here.

Structs

Sphinx hop information
Onion packet encompassing sphinx data with outer information.
Cyphered raw sphinx packet as it is sent over the wire

Enums

Errors during Sphinx payload encoding
Onion packet with optional decoded hop-specific payload.

Traits

Sphinx is abstracted from a specific encoding used by a packed payload: it may be BOLT-4 lightning, strict encoding or any other encoding. Specific payload types must implement this trait to provide Internet2 crate with a proper encoding implementation.