Esempio n. 1
0
 public KeyPair(Key key, IPubKey pubKey)
 {
     if (key is null)
     {
         throw new ArgumentNullException(nameof(key));
     }
     if (pubKey is null)
     {
         throw new ArgumentNullException(nameof(pubKey));
     }
     PubKey = pubKey;
     Key    = key;
 }
Esempio n. 2
0
        public override bool IsCompatibleKey(IPubKey publicKey, Script scriptPubKey)
        {
            if (!(publicKey is PubKey pk))
            {
                return(false);
            }
            var multiSigParams = PayToMultiSigTemplate.Instance.ExtractScriptPubKeyParameters(scriptPubKey);

            if (multiSigParams == null)
            {
                return(false);
            }
            return(multiSigParams.PubKeys.Any(p => p == pk));
        }
 public override bool IsCompatibleKey(IPubKey publicKey, Script scriptPubKey)
 {
     return(false);
 }
 public override bool IsCompatibleKey(IPubKey publicKey, Script scriptPubKey)
 {
     return(publicKey is PubKey pk && pk.Hash.ScriptPubKey == scriptPubKey);
 }
Esempio n. 5
0
 public abstract bool IsCompatibleKey(IPubKey publicKey, Script scriptPubKey);