toBytes method
Converts the program to bytes using Borsh serialization.
Implementation
@override
List<int> toBytes() {
final LayoutByteWriter data = LayoutByteWriter(length);
layout.encode(serialize(), data);
data.setAll(publicKeyOffset, publicKey.toBytes(false));
data.setAll(signatureOffset, signature);
data.setAll(messageDataOffset, message);
return data.toBytes();
}