public bool IsFrom(PubKey pubKey) { var template = new PayToPubkeyHashTemplate(); var result = template.ExtractScriptSigParameters(ScriptSig); return(result != null && result.PublicKey == pubKey); }
public PubKey GetSourcePubKey() { var template = new PayToPubkeyHashTemplate(); var result = template.ExtractScriptSigParameters(this); return(result == null ? null : result.PublicKey); }
/// <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); }
public bool IsFrom(PubKey pubKey) { var template = new PayToPubkeyHashTemplate(); var result = template.ExtractScriptSigParameters(ScriptSig); return result != null && result.PublicKey == pubKey; }
public PubKey GetSourcePubKey() { var template = new PayToPubkeyHashTemplate(); var result = template.ExtractScriptSigParameters(this); return result == null ? null : result.PublicKey; }