code: func checkAddressValidity(addrs []string, params *chaincfg.Params) error {
  	for _, addr := range addrs {
  		_, err := btcutil.DecodeAddress(addr, params)
  		if err != nil {
  			return &btcjson.RPCError{
  				Code: btcjson.ErrRPCInvalidAddressOrKey,
  				Message: fmt.Sprintf("Invalid address or key: %v",
  					addr),
  			}
  		}
  	}
  	return nil
  }
docs: // checkAddressValidity checks the validity of each address in the passed
  // string slice. It does this by attempting to decode each address using the
  // current active network parameters. If any single address fails to decode
  // properly, the function returns an error. Otherwise, nil is returned.