Domain Resolution API
Integrate .bagel domains into your wallet or application
bagel Domain Resolution API
The bagel Domain Resolution API provides a simple way for wallets and applications to resolve .bagel
domains to retrieve the corresponding viewing and spending public keys needed for stealth transactions.
API Endpoint
This API allows any wallet or application to easily integrate support for bagel's privacy features without implementing the full SDK.
Usage
HTTP Request
Where :domain
is the bagel domain to resolve (e.g., alice.bagel
).
Response Format
A successful response will return JSON with the following structure:
The response includes:
stealthAddress
: The resolved bagel domain's stealthAddressdomain
: domain name
Error Response
If the domain cannot be resolved, the API will return an error:
Integration Example
Here's how to integrate the bagel Domain Resolution API into your wallet or application:
Best Practices
- Error Handling: Always implement proper error handling for failed domain resolution
- Caching: Consider caching resolved domains for a short period to reduce API calls
- User Feedback: Provide clear feedback to users during the resolution process
- Validation: Validate bagel domains before sending them to the API
- Rate Limiting: Implement reasonable rate limiting for API calls
CORS Support
The bagel Domain Resolution API supports Cross-Origin Resource Sharing (CORS), allowing it to be used directly from browser-based applications.
API Status
You can check the API status by making a simple request:
A successful response will return:
By integrating this simple API, your wallet or application can offer bagel's privacy features to users with minimal development effort.