public WitScript GenerateWitScript(TaprootSignature signature) { if (signature == null) { throw new ArgumentNullException(nameof(signature)); } return(new Script(Op.GetPushOp(signature.ToBytes()))); }
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))); }