decode

fun decode(wire: ByteArray): Grant?

The grant wire holds, or null when it is not exactly a kuilt/grant v1 layout followed by a 64-byte signature: another tag or version, a field of the wrong size, a point that is not compressed, an unknown scope tag, a room id that is not UTF-8, a non-empty parent, or notAfter not after issuedAt.

Checks the layout only. Whether the signature is good is isSignedByIssuer's question.