code: func ParsePkScript(pkScript []byte) (PkScript, error) {
  	var outputScript PkScript
  	scriptClass, _, _, err := ExtractPkScriptAddrs(
  		pkScript, &chaincfg.MainNetParams,
  	)
  	if err != nil {
  		return outputScript, fmt.Errorf("unable to parse script type: "+
  			"%v", err)
  	}
  
  	if !isSupportedScriptType(scriptClass) {
  		return outputScript, ErrUnsupportedScriptType
  	}
  
  	outputScript.class = scriptClass
  	copy(outputScript.script[:], pkScript)
  
  	return outputScript, nil
  }
docs: // ParsePkScript parses an output script into the PkScript struct.
  // ErrUnsupportedScriptType is returned when attempting to parse an unsupported
  // script type.