5. (optional) Encode the Transaction(s)ΒΆ

If the same machine is creating Transactions and Batches there is no need to serialize those Transactions for transmission. However, in the use case where Transactions are being batched externally, they must be encoded before transmitting to the batcher. Since the batcher is likely something you have control over, any encoding scheme could technically be used, but Sawtooth does provide a TransactionList Protobuf for this purpose. Simply wrap a set of Transactions in the transactions property of a TransactionList, and then serialize it.