Adding mergeTxs function to merge multiple transaction inputs