Beispiel #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());
        }
Beispiel #2
0
        public IEnumerable <Op> ToOps()
        {
            ScriptReader reader = new ScriptReader(_Script);

            return(reader.ToEnumerable());
        }