Adding assumeCosts to the transaction api.


I needed to assumeCosts for my API usage. So I added it. 

I also fixed two broken unit tests and added my own tests.

Let me know if this works for you.