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 }); }
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>(); } }
public StealthPubKeys ToStelathPubKeys() { StealthPubKeys key = new StealthPubKeys(PayloadPubKey, ViewPubKey); return key; }