decryptPayload

fun decryptPayload(privateKey: PrivateKey, blindingEphemeralKey: PublicKey, encryptedPayload: ByteVector): Pair<ByteVector, PublicKey>

Decrypt the encrypted payload (usually found in the onion) that contains instructions to locate the next node.

Return

a tuple (decrypted payload, unblinding ephemeral key for the next node)

Parameters

privateKey

this node's private key.

blindingEphemeralKey

unblinding ephemeral key.

encryptedPayload

encrypted payload for this node.