How to fund a bidirectional channel in Lightning Network by two participants? (Edited)
1) Peer A sends msg to Peer B


Unsigned Funding TX template including:
// Input A (unsigned, just outpoint)
// Output A (change)


2) Peer B sends msg to Peer A


Completed unsigned Funding TX template, which adds:
// Input B (unsigned, just outpoint)
// Output B (change)
// 2-of-2 Multi-sig Output (still requires sig A, sig B)
Signature for Peer A's first commitment Transaction (Unsigned funding TX is completed, so TXID is non-malleable for witness transactions. Commitment TX's can therefore be signed without risk of being invalidate by parent malleability).


3) Peer A sends msg to Peer B


Signature for Peer B's first commitment Transaction. 
Now both commitment Transactions (for A and B) are signed.


4) Peer B sends msg to Peer A


B's Signature for funding transaction.
Now A has complete Funding TX after signing itself.


Caveat: If Peer A fails to respond after step 4, Peer B must double-spend its funding input to prevent future interference.