New reference implementation on NBitcoin

New reference implementation on NBitcoin