decode

Decode bytes as a TapAdmitMessage, or null if they are not a prefixed admit frame (an application/replication frame) or fail to decode (malformed).

"Malformed" includes a frame that decodes structurally but violates a wire invariant — a Challenge whose nonce is not Challenge.NONCE_BYTES wide throws out of the constructor kotlinx-serialization calls, and is dropped here like any other garbage. Use isAdmitFrame to tell the two nulls apart when that matters.