public static Coin ToCoin(this SegWitCoin segWitCoin) { var outpoint = new OutPoint(segWitCoin.UtxoTxHash, segWitCoin.UtxoTxN); var txOut = new TxOut(segWitCoin.UtxoValue, segWitCoin.SegWitAddress.GetScriptPubKey()); var coin = new Coin(outpoint, txOut); return(coin); }
public static Key GetPrivateKey(this SegWitCoin coin, string passphrase) { var adr = (PubKeyHashAddress)coin.SegWitAddress; return(new Key(adr.KeyMaterial.PlaintextBytes)); }