added new transaction API. added initial tests.