Пример #1
0
        public override string ToString()
        {
            // by default StringBuilder capacity is 16 (too small)
            // 300 is enough for P2PKH
            var builder = new StringBuilder(300);
            var reader  = new ScriptReader(_script);

            Op op;

            while ((op = reader.Read()) != null)
            {
                builder.Append(" ");
                builder.Append(op);
            }

            return(builder.ToString().Trim());
        }
Пример #2
0
        public IEnumerable <Op> ToOps()
        {
            var reader = new ScriptReader(_script);

            return(reader.ToEnumerable());
        }