Пример #1
0
        public bool IsFrom(PubKey pubKey)
        {
            var template = new PayToPubkeyHashTemplate();
            var result   = template.ExtractScriptSigParameters(ScriptSig);

            return(result != null && result.PublicKey == pubKey);
        }
Пример #2
0
        public PubKey GetSourcePubKey()
        {
            var template = new PayToPubkeyHashTemplate();
            var result   = template.ExtractScriptSigParameters(this);

            return(result == null ? null : result.PublicKey);
        }
Пример #3
0
        /// <summary>
        /// Extract P2SH or P2PH id from scriptSig
        /// </summary>
        /// <returns></returns>
        public TxDestination GetSigner()
        {
            var pubKey = _PayToPubkeyHash.ExtractScriptSigParameters(this);

            if (pubKey != null)
            {
                return(pubKey.PublicKey.ID);
            }
            var p2sh = _PayToScriptHash.ExtractScriptSigParameters(this);

            if (p2sh != null)
            {
                return(p2sh.RedeemScript.ID);
            }
            return(null);
        }
Пример #4
0
 public bool IsFrom(PubKey pubKey)
 {
     var template = new PayToPubkeyHashTemplate();
     var result = template.ExtractScriptSigParameters(ScriptSig);
     return result != null && result.PublicKey == pubKey;
 }
Пример #5
0
 public PubKey GetSourcePubKey()
 {
     var template = new PayToPubkeyHashTemplate();
     var result = template.ExtractScriptSigParameters(this);
     return result == null ? null : result.PublicKey;
 }