AllDomains Integration
Manage and resolve domains across multiple TLDs on Solana
Comprehensive integration with AllDomains service for managing and resolving domains across multiple TLDs on Solana. Supports domain resolution, ownership lookup, and TLD management.
Domain Resolution
Multi-TLD support
Owner lookup
Main domain resolution
Reverse resolution
Domain Management
Owned domains lookup
TLD enumeration
Domain registration
Copy
// Resolve any domain
const owner = await agent.methods.resolveAllDomains("mydomain.blink");
// Get owned domains
const domains = await agent.methods.getOwnedAllDomains(
new PublicKey("owner-address")
);
// Get main domain
const mainDomain = await agent.methods.getMainAllDomainsDomain(
new PublicKey("owner-address")
);
Copy
// Get all available TLDs
const tlds = await agent.methods.getAllDomainsTLDs();
// Get owned domains for specific TLD
const domainsByTld = await agent.methods.getOwnedDomainsForTLD("bonk");
Copy
"Resolve mydomain.blink to a wallet address"
"Find all domains owned by this wallet"
"Get the main domain for address ABC..."
"List all available TLDs"
Copy
{
"domain": "mydomain.blink"
}
Copy
{
"owner": "7nxQB..."
}
Copy
{
"address": "7nxQB..."
}
Copy
{
status: "success",
message: "Domain resolved successfully",
owner: "7nxQB..."
}
Copy
{
status: "success",
message: "Owned domains fetched successfully",
domains: ["domain1.blink", "domain2.bonk"]
}
Copy
{
status: "success",
message: "TLDs fetched successfully",
tlds: [".blink", ".bonk", ".abc"]
}
Copy
interface ResolutionParams {
domain: string; // Full domain with TLD
connection: Connection; // RPC connection
}
// Features
- Multi-TLD support
- Error recovery
- Owner validation
- Case sensitivity
Copy
interface OwnerLookupParams {
owner: PublicKey; // Wallet address
connection: Connection; // RPC connection
}
// Features
- Domain enumeration
- TLD filtering
- Error handling
- Batch processing
Copy
try {
const owner = await agent.methods.resolveAllDomains(domain);
} catch (error) {
if (error.message.includes("undefined")) {
// Handle domain not found
} else if (error.message.includes("invalid")) {
// Handle invalid domain format
}
}
Domain Resolution
Validate domain format
Handle missing domains
Implement caching
Check TLD support
Owner Lookup
Batch requests
Cache results
Filter inactive domains
Validate addresses
TLD Management
Monitor new TLDs
Update regularly
Check availability
Handle migrations
Performance
Cache common lookups
Batch operations
Monitor RPC usage
Handle timeouts
Resolution
Invalid formats
Unsupported TLDs
Network errors
Stale data
Owner Lookup
Missing domains
Invalid addresses
Timeout issues
RPC errors
TLD Issues
New TLDs
Deprecated TLDs
Format changes
Migration issues
.blink
.bonk
.abc
.glow
.backpack
Resolution Flow
Copy
// Step by step resolution const parser = new TldParser(connection); const owner = await parser.getOwnerFromDomainTld(domain);
Ownership Verification
Copy
const domains = await parser.getParsedAllUserDomains(owner); const isOwner = domains.some(d => d.domain === domain);
Main Domain
Copy
const mainDomain = await parser.getFavoriteDomain(owner);
resolveAllDomains
: Domain resolutiongetOwnedAllDomains
: Domain ownershipgetAllDomainsTLDs
: TLD managementgetMainAllDomainsDomain
: Primary domains
Last updated