# Stellar Domains SDK
A Python SDK for interacting with Soroban Domains on the Stellar network. This package provides a simple interface to interact with domain names on the Stellar blockchain.
## Installation
```bash
pip install stellar-domains-sdk
```
## Quick Start
```python
from stellar_domains_sdk import SorobanDomainsSDK, SorobanDomainsSDKParams
from stellar_domains_sdk.exceptions import Domain404Error
# Initialize the SDK
params = SorobanDomainsSDKParams(
rpc_url="https://soroban-testnet.stellar.org",
contract_id="your_contract_id",
network_passphrase="testnet",
simulation_account="your_account",
default_fee=100
)
sdk = SorobanDomainsSDK(params)
# Search for a domain
try:
result = sdk.search_domain("example.xlm")
print(f"Domain owner: {result['value']['owner']}")
except Domain404Error:
print("Domain not found")
```
## Features
- Domain name parsing and searching
- Support for both main domains and subdomains
- Full integration with Soroban smart contracts
- Comprehensive error handling
- Type hints for better IDE support
## API Reference
### SorobanDomainsSDKParams
Parameters for initializing the SDK:
- `rpc_url`: Soroban RPC endpoint URL
- `contract_id`: The contract ID for the domains contract
- `network_passphrase`: Network passphrase ("testnet" or "public")
- `simulation_account`: Account used for simulating transactions
- `default_fee`: Default fee for transactions
- `default_timeout`: Optional timeout value for transactions
### SorobanDomainsSDK Methods
#### search_domain(domain: str, sub_domain: Optional[str] = None)
Searches for a domain or subdomain on the Stellar network.
Returns a dictionary containing domain information:
- For main domains: owner address, expiration date, collateral amount, etc.
- For subdomains: parent domain, address, snapshot data
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the MIT License - see the LICENSE file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "stellar-python-domains-sdk",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "stellar, blockchain, domains, soroban, sdk",
"author": null,
"author_email": "Matej Plavevski <matej.plavevski+pypi@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/4b/02/dc5fdd8a41c517bd9573e77d9901f4164f07020f887d40ef7f424e09597f/stellar_python_domains_sdk-0.1.0.tar.gz",
"platform": null,
"description": "# Stellar Domains SDK\n\nA Python SDK for interacting with Soroban Domains on the Stellar network. This package provides a simple interface to interact with domain names on the Stellar blockchain.\n\n## Installation\n\n```bash\npip install stellar-domains-sdk\n```\n\n## Quick Start\n\n```python\nfrom stellar_domains_sdk import SorobanDomainsSDK, SorobanDomainsSDKParams\nfrom stellar_domains_sdk.exceptions import Domain404Error\n\n# Initialize the SDK\nparams = SorobanDomainsSDKParams(\n rpc_url=\"https://soroban-testnet.stellar.org\",\n contract_id=\"your_contract_id\",\n network_passphrase=\"testnet\",\n simulation_account=\"your_account\",\n default_fee=100\n)\n\nsdk = SorobanDomainsSDK(params)\n\n# Search for a domain\ntry:\n result = sdk.search_domain(\"example.xlm\")\n print(f\"Domain owner: {result['value']['owner']}\")\nexcept Domain404Error:\n print(\"Domain not found\")\n```\n\n## Features\n\n- Domain name parsing and searching\n- Support for both main domains and subdomains\n- Full integration with Soroban smart contracts\n- Comprehensive error handling\n- Type hints for better IDE support\n\n## API Reference\n\n### SorobanDomainsSDKParams\n\nParameters for initializing the SDK:\n\n- `rpc_url`: Soroban RPC endpoint URL\n- `contract_id`: The contract ID for the domains contract\n- `network_passphrase`: Network passphrase (\"testnet\" or \"public\")\n- `simulation_account`: Account used for simulating transactions\n- `default_fee`: Default fee for transactions\n- `default_timeout`: Optional timeout value for transactions\n\n### SorobanDomainsSDK Methods\n\n#### search_domain(domain: str, sub_domain: Optional[str] = None)\n\nSearches for a domain or subdomain on the Stellar network.\n\nReturns a dictionary containing domain information:\n- For main domains: owner address, expiration date, collateral amount, etc.\n- For subdomains: parent domain, address, snapshot data\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python SDK for interacting with Soroban Domains on the Stellar network",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://github.com/matejmecka/stellar-python-domains-sdk#readme",
"Homepage": "https://github.com/matejmecka/stellar-python-domains-sdk",
"Repository": "https://github.com/matejmecka/stellar-python-domains-sdk.git"
},
"split_keywords": [
"stellar",
" blockchain",
" domains",
" soroban",
" sdk"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8789c5e43941ee657290870c375208d3fe3701a8e89d9d55e2bd530c06061b2e",
"md5": "e378e25fbd9b56d4ce7bb1fb69745b1f",
"sha256": "89d1bb38b59d6ee1dd638a4bc7c4333251854a6b0df273d989c8c0eab4589f3e"
},
"downloads": -1,
"filename": "stellar_python_domains_sdk-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e378e25fbd9b56d4ce7bb1fb69745b1f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 6330,
"upload_time": "2024-10-09T19:10:25",
"upload_time_iso_8601": "2024-10-09T19:10:25.827825Z",
"url": "https://files.pythonhosted.org/packages/87/89/c5e43941ee657290870c375208d3fe3701a8e89d9d55e2bd530c06061b2e/stellar_python_domains_sdk-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4b02dc5fdd8a41c517bd9573e77d9901f4164f07020f887d40ef7f424e09597f",
"md5": "fa7f704b21b10f01ae8aceac32bbb8d9",
"sha256": "72de21ba3b24e9b4c31626cb0bcef842e4738d0008d38a781de27dc108bcc7b9"
},
"downloads": -1,
"filename": "stellar_python_domains_sdk-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "fa7f704b21b10f01ae8aceac32bbb8d9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 5380,
"upload_time": "2024-10-09T19:10:29",
"upload_time_iso_8601": "2024-10-09T19:10:29.580946Z",
"url": "https://files.pythonhosted.org/packages/4b/02/dc5fdd8a41c517bd9573e77d9901f4164f07020f887d40ef7f424e09597f/stellar_python_domains_sdk-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-09 19:10:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "matejmecka",
"github_project": "stellar-python-domains-sdk#readme",
"github_not_found": true,
"lcname": "stellar-python-domains-sdk"
}