func IsPubkey(pops []ParsedOpcode) bool {
	return len(pops) == 2 &&
		(len(pops[0].Data) == 33 || len(pops[0].Data) == 65) &&
		pops[1].Opcode.Value == txscript.OP_CHECKSIG
}
IsPubkey returns true if the script passed is a pay-to-pubkey transaction,
false otherwise.
package address
import (
	"errors"
	"fmt"
	"github.com/btcsuite/btcd/txscript"
)
type ScriptClass byte
const (
	NonStandardTy         ScriptClass = iota  
	PubKeyTy                                  
	PubKeyHashTy                              
	WitnessV0PubKeyHashTy                     
	ScriptHashTy                              
	WitnessV0ScriptHashTy                     
	MultiSigTy                                
	NullDataTy                                
)
const (
	MaxDataCarrierSize = 80
)
func ParseScript(script []byte) ([]ParsedOpcode, error) {
	return parseScriptTemplate(script, &opcodeArray)
}
func TypeOfScript(pops []ParsedOpcode) ScriptClass {
	if IsPubkey(pops) {
		return PubKeyTy
	} else if IsPubkeyHash(pops) {
		return PubKeyHashTy
	} else if IsWitnessPubKeyHash(pops) {
		return WitnessV0PubKeyHashTy
	} else if IsScriptHash(pops) {
		return ScriptHashTy
	} else if IsWitnessScriptHash(pops) {
		return WitnessV0ScriptHashTy
	} else if IsMultiSig(pops) {
		return MultiSigTy
	} else if isNullData(pops) {
		return NullDataTy
	}
	return NonStandardTy
}