# Use All Domains

The `Use All Domains` tool, part of AgentiPy, provides functionalities for interacting with various Solana domain name services. It allows users to resolve domain names to wallet addresses, find domains owned by a particular wallet, and discover available Top-Level Domains (TLDs). These operations are routed through an Agentipy proxy service.

## Functionality

This tool is implemented in the `AllDomainsManager` class. It uses an Agentipy proxy service (`agent.base_proxy_url`) for its operations, sending encrypted private keys with requests. An OpenAI API key also seems to be part of the payload to the proxy.

### Key Methods:

* `resolve_all_domains(agent: SolanaAgentKit, domain: str) -> Optional[str]`:
  * Resolves a given `domain` name (e.g., "user.sol", "user.bonk") to its underlying wallet address or other relevant record. The exact type of resolution might depend on the domain service.
  * Returns the resolved address or identifier as a string, or `None` if resolution fails.
* `get_owned_domains_for_tld(agent: SolanaAgentKit, tld: str) -> Optional[List[str]]`:
  * Retrieves a list of domain names owned by the agent's wallet for a specific Top-Level Domain `tld` (e.g., "sol", "abc").
  * Returns a list of domain strings or `None`.
* `get_all_domains_tlds(agent: SolanaAgentKit) -> Optional[List[str]]`:
  * Fetches a list of all available TLDs that the AllDomains service supports.
  * Returns a list of TLD strings or `None`.
* `get_owned_all_domains(agent: SolanaAgentKit, owner: str) -> Optional[List[str]]`:
  * Retrieves all domain names across various TLDs owned by a specific `owner` public key.
  * Returns a list of domain strings or `None`.

##

**Important Considerations:**

* **Proxy Service:** This tool relies on an Agentipy proxy service. The availability, authentication, and terms of use for this proxy are critical.
* **Domain Service Coverage:** The range of supported TLDs and domain services depends on the capabilities of the AllDomains service integrated with the proxy.
* **API Keys:** The use of `agent.openai_api_key` in the payload to the proxy suggests it might be used for some purpose by the proxy service.

## Source Code

You can find the source code for this tool on GitHub: <https://github.com/niceberginc/agentipy/blob/main/agentipy/tools/use_alldomains.py>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.agentipy.fun/tools/use-all-domains.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
