func (s *PayToWitnessV0PubKeyHashScript) GetScriptVersion() ScriptVersion {
	return WITNESS_V0
}
GetScriptVersion -- used to get the version of this script.
package xcore
import (
	"github.com/keyfuse/tokucore/xvm"
)
type PayToWitnessV0PubKeyHashScript struct {
	hash []byte
}
func NewPayToWitnessV0PubKeyHashScript(pubkeyHash []byte) Script {
	return &PayToWitnessV0PubKeyHashScript{
		hash: pubkeyHash,
	}
}
func (s *PayToWitnessV0PubKeyHashScript) GetAddress() Address {
	return NewPayToWitnessV0PubKeyHashAddress(s.hash)
}
func (s *PayToWitnessV0PubKeyHashScript) GetRawLockingScriptBytes() ([]byte, error) {
	return xvm.NewScriptBuilder().
		AddOp(xvm.OP_0).
		AddData(s.hash).
		Script()
}
func (s *PayToWitnessV0PubKeyHashScript) GetFinalLockingScriptBytes(redeem []byte) ([]byte, error) {
	scriptInstance := NewPayToPubKeyHashScript(s.hash)
	return scriptInstance.GetRawLockingScriptBytes()
}
func (s *PayToWitnessV0PubKeyHashScript) GetRawUnlockingScriptBytes(signs []PubKeySign, redeem []byte) ([]byte, error) {
	builder := xvm.NewScriptBuilder()
	return builder.AddData(signs[0].Signature).AddData(signs[0].PubKey).Script()
}
func (s *PayToWitnessV0PubKeyHashScript) GetWitnessUnlockingScriptBytes(signs []PubKeySign, redeem []byte) ([][]byte, error) {
	var witness [][]byte
	witness = append(witness, signs[0].Signature)
	witness = append(witness, signs[0].PubKey)
	return witness, nil
}
func (s *PayToWitnessV0PubKeyHashScript) GetWitnessScriptCode(redeem []byte) ([]byte, error) {
	scriptInstance := NewPayToPubKeyHashScript(s.hash)
	return scriptInstance.GetRawLockingScriptBytes()
}