#372: Implementation of txn method

Review, please. (I hope I made the push right this time)