func (s *stack) PopByteArray() ([]byte, error) {
	return s.nipN(0)
}
PopByteArray pops the value off the top of the stack and returns it.

Stack transformation: [... x1 x2 x3] -> [... x1 x2]
package txscript
import (
	"encoding/hex"
	"fmt"
)
func asBool(t []byte) bool {
	for i := range t {
		if t[i] != 0 {
			if i == len(t)-1 && t[i] == 0x80 {
				return false
			}
			return true
		}
	}
	return false
}
func fromBool(v bool) []byte {
	if v {
		return []byte{1}
	}
	return nil
}
type stack struct {
	stk               [][]byte
	verifyMinimalData bool
}
func (s *stack) Depth() int32 {
	return int32(len(s.stk))
}
func (s *stack) PushByteArray(so []byte) {
	s.stk = append(s.stk, so)
}
func (s *stack) PushInt(val scriptNum) {
	s.PushByteArray(val.Bytes())
}
func (s *stack) PushBool(val bool) {
	s.PushByteArray(fromBool(val))
}