New msgtx generation

I'm not sure ErrInvalidValue is appropriate here.