wrap

fun wrap(packet: ByteArray, sharedSecret: ByteVector32): ByteArray

Wrap the given packet in an additional layer of onion encryption for the previous hop.

Return

an encrypted failure packet that can be sent to the destination node.

Parameters

packet

failure packet.

sharedSecret

destination node's shared secret.