Esempio n. 1
0
 public static VerificationContract CreateRingSignatureContract(StealthKey.StealthPubKeys account)
 {
     return(new VerificationContract
     {
         ContractType = KeyType.Stealth,
         Script = CreateRingSignatureRedeemScript(account.PayloadPubKey, account.ViewPubKey),
         ParameterList = new[] { ContractParameterType.Signature },
         PublicKeyHash = account.GetPublicKeyHash(),
         stealthKey = account
     });
 }
Esempio n. 2
0
 public void Deserialize(BinaryReader reader)
 {
     ContractType  = (KeyType)reader.ReadVarInt();
     PublicKeyHash = reader.ReadSerializable <UInt160>();
     ParameterList = reader.ReadVarBytes().Select(p => (ContractParameterType)p).ToArray();
     Script        = reader.ReadVarBytes();
     if (ContractType == KeyType.Anonymous)
     {
         paymentAddress = reader.ReadSerializable <PaymentAddress>();
     }
     if (ContractType == KeyType.Stealth)
     {
         stealthKey = reader.ReadSerializable <StealthKey.StealthPubKeys>();
     }
 }
Esempio n. 3
0
 public StealthPubKeys ToStelathPubKeys()
 {
     StealthPubKeys key = new StealthPubKeys(PayloadPubKey, ViewPubKey);
     return key;
 }