getOffchainMessageEncoder
Returns an encoder that you can use to encode an OffchainMessage to a byte array appropriate for inclusion in an OffchainMessageEnvelope.
Returns
VariableSizeEncoder<OffchainMessage>
Remarks
If the offchain message version is known ahead of time, use one of the encoders specific to that version so as not to bundle more code than you need.