Transaction codec for protobuf