added a addTransaction() method and type hinting for setTransactions()

I think this would increase code robustness in this particular case.