generateFiller

fun generateFiller(keyType: String, sharedSecrets: List<ByteVector32>, payloads: List<ByteArray>, packetLength: Int): ByteArray

Generate a deterministic filler to prevent intermediate nodes from knowing their position in the route. See https://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md#filler-generation

Return

filler bytes.

Parameters

keyType

type of key used (depends on the onion we're building).

sharedSecrets

shared secrets for all the hops.

payloads

payloads for all the hops.

packetLength

length of the onion-encrypted payload (1300 for payment onions, 400 for trampoline onions).