Example #1
0
        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);
        }
Example #2
0
        public static Key GetPrivateKey(this SegWitCoin coin, string passphrase)
        {
            var adr = (PubKeyHashAddress)coin.SegWitAddress;

            return(new Key(adr.KeyMaterial.PlaintextBytes));
        }