Пример #1
0
        public static OutputScript ParseScript(byte[] script)
        {
            PubKeyHash pubKeyHash;

            if (PubKeyHash.TryFromScript(script, out pubKeyHash))
            {
                return(pubKeyHash);
            }

            ScriptHash scriptHash;

            if (ScriptHash.TryFromScript(script, out scriptHash))
            {
                return(scriptHash);
            }

            PubKey pubKey;

            if (PubKey.TryFromScript(script, out pubKey))
            {
                return(pubKey);
            }

            return(new Unrecognized(script));
        }