Пример #1
0
 public WitScript GenerateWitScript(TaprootSignature signature)
 {
     if (signature == null)
     {
         throw new ArgumentNullException(nameof(signature));
     }
     return(new Script(Op.GetPushOp(signature.ToBytes())));
 }
Пример #2
0
        public WitScript GenerateWitScript(TaprootSignature signature, byte[] annex)
        {
            if (signature == null)
            {
                throw new ArgumentNullException(nameof(signature));
            }
            if (annex == null)
            {
                return(GenerateWitScript(signature));
            }
            if (!CheckAnnex(annex))
            {
                throw new ArgumentException("The first byte of annex must be 0x50", "annex");
            }

            return(new Script(Op.GetPushOp(signature.ToBytes()), Op.GetPushOp(annex)));
        }