Adds protocol information to individual transactions

This PR adds the protocol to individual transactions, making transactions much more self-contained. (It should be possible to completely construct a request only from a transaction).