Ejemplo n.º 1
0
 /// <summary>
 ///     Creates a new script key instance.
 ///     Since, CashAddr allows lower-case or upper-case addresses,
 ///     str argument is expected to store user supplied value instead of addr.ToString().
 /// </summary>
 /// <param name="str"></param>
 /// <param name="addr"></param>
 internal BitcoinScriptAddress(string str, BchAddr.BchAddrData addr)
     : base(str, addr.Network)
 {
     _addr = addr;
     Hash  = new ScriptId(_addr.Hash);
 }
Ejemplo n.º 2
0
 public BitcoinScriptAddress(string str, Network expectedNetwork = null)
     : base(Validate(str, ref expectedNetwork), expectedNetwork)
 {
     _addr = ParseAddress(str, expectedNetwork);
     Hash  = new ScriptId(_addr.Hash);
 }
Ejemplo n.º 3
0
 public BitcoinScriptAddress(ScriptId scriptId, Network expectedNetwork = null)
     : this(EncodeAddress(scriptId, expectedNetwork), expectedNetwork)
 {
 }
Ejemplo n.º 4
0
        public PayToScriptHashSigParameters ExtractScriptSigParameters(Script scriptSig, ScriptId expectedScriptId)
        {
            if (expectedScriptId == null)
            {
                return(ExtractScriptSigParameters(scriptSig, null as Script));
            }

            return(ExtractScriptSigParameters(scriptSig, expectedScriptId.ScriptPubKey));
        }