DotNetLightning


Sphinx Module

Module to work with sphinx encryption. Which is used in lightning network p2p onion routing. see bolt04 for more detail.

Usually you want to use high-level wrapper in DotNetLightning.Peer for e.g. 3-way handshake and establishing the connection.

Types

Type Description

ErrorPacket

PacketAndSecrets

ParsedPacket

Functions and values

Function or value Description

ERROR_PACKET_LENGTH

Full Usage: ERROR_PACKET_LENGTH

Returns: int
Returns: int

MAX_ERROR_PAYLOAD_LENGTH

Full Usage: MAX_ERROR_PAYLOAD_LENGTH

Returns: int
Returns: int

MacLength

Full Usage: MacLength

Returns: int
Returns: int

MaxHops

Full Usage: MaxHops

Returns: int
Returns: int

PACKET_LENGTH

Full Usage: PACKET_LENGTH

Returns: int
Returns: int

PayloadLength

Full Usage: PayloadLength

Returns: int
Returns: int

VERSION

Full Usage: VERSION

Returns: byte
Returns: byte

forwardErrorPacket (packet, ss)

Full Usage: forwardErrorPacket (packet, ss)

Parameters:
    packet : byte array
    ss : byte array

Returns: byte[]
packet : byte array
ss : byte array
Returns: byte[]

parsePacket nodePrivateKey ad rawPacket

Full Usage: parsePacket nodePrivateKey ad rawPacket

Parameters:
    nodePrivateKey : Key
    ad : byte array
    rawPacket : byte array

Returns: Result<ParsedPacket, CryptoError>
nodePrivateKey : Key
ad : byte array
rawPacket : byte array
Returns: Result<ParsedPacket, CryptoError>