Beispiel #1
0
        private IEnumerable <UInt160> GetScriptHashesForVerifying_Validator(StateDescriptor descriptor)
        {
            switch (descriptor.Field)
            {
            case "Registered":
                yield return(Contract.CreateSignatureRedeemScript(ECPoint.DecodePoint(descriptor.Key, ECCurve.Secp256r1)).ToScriptHash());

                break;

            default:
                throw new InvalidOperationException();
            }
        }
Beispiel #2
0
        private IEnumerable <UInt160> GetScriptHashesForVerifying_Account(StateDescriptor descriptor)
        {
            switch (descriptor.Field)
            {
            case "Votes":
                yield return(new UInt160(descriptor.Key));

                break;

            default:
                throw new InvalidOperationException();
            }
        }