code: func (s PkScript) Address(chainParams *chaincfg.Params) (btcutil.Address, error) {
  	_, addrs, _, err := ExtractPkScriptAddrs(s.Script(), chainParams)
  	if err != nil {
  		return nil, fmt.Errorf("unable to parse address: %v", err)
  	}
  
  	return addrs[0], nil
  }
docs: // Address encodes the script into an address for the given chain.