decode

fun decode(input: ByteArray): LightningMessage?

Parameters

input

a single, complete message (typically received over the transport layer). There is a very strong assumption that framing has been taken care of and that there are no missing or extra bytes. Whatever we don't read will simply be ignored, as per the BOLTs.