add test coverage via istanbul
fix transaction processing for wallets
port message to common.js style and add tests