From 5cc2db80e48f09211e201dda72d8d5da20ed5244 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Tue, 16 Mar 2021 12:36:49 -0500 Subject: [PATCH] txscript: Remove unused payToSchnorrPubKeyScript. This removes payToSchnorrPubKeyScript since it is no longer used by anything in the package and is now available via the PaymentScript method of the relevant stdaddr address. --- txscript/standard.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/txscript/standard.go b/txscript/standard.go index 52dca4ad..c5c83a27 100644 --- a/txscript/standard.go +++ b/txscript/standard.go @@ -796,15 +796,6 @@ func payToEdwardsPubKeyScript(serializedPubKey []byte) ([]byte, error) { AddOp(OP_CHECKSIGALT).Script() } -// payToSchnorrPubKeyScript creates a new script to pay a transaction output -// to a secp256k1 public key, but to be signed by Schnorr type signature. It -// is expected that the input is a valid pubkey. -func payToSchnorrPubKeyScript(serializedPubKey []byte) ([]byte, error) { - schnorrData := []byte{byte(dcrec.STSchnorrSecp256k1)} - return NewScriptBuilder().AddData(serializedPubKey).AddData(schnorrData). - AddOp(OP_CHECKSIGALT).Script() -} - // GenerateSStxAddrPush generates an OP_RETURN push for SSGen payment addresses in // an SStx. func GenerateSStxAddrPush(addr dcrutil.Address, amount dcrutil.Amount, limits uint16) ([]byte, error) {