create
fun create(sharedSecret: ByteVector32, failure: FailureMessage): ByteArray
Content copied to clipboard
Create a failure packet that will be returned to the sender. Each intermediate hop will add a layer of encryption and forward to the previous hop. Note that malicious intermediate hops may drop the packet or alter it (which breaks the mac).
Return
a failure packet that can be sent to the destination node.
Parameters
shared Secret
destination node's shared secret that was computed when the original onion for the HTLC was created or forwarded: see OnionPacket.create() and OnionPacket.wrap().
failure
failure message.