improve transaction parsing
sign() should return a transaction object