stellar-domains-sdk


Namestellar-domains-sdk JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryA Python SDK for interacting with Soroban Domains on the Stellar network
upload_time2024-10-09 19:10:26
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT
keywords stellar blockchain domains soroban sdk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

# 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-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/c7/52/38278d4be8f2b6950aeb3c0244887e892560c60f23cfdd08372e409776ae/stellar_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\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": "e315330540358c2c64201cefcf5eba743492ca4550443e02e211a124b7d67418",
                "md5": "08e1f99ff29eb4271e96f2bf465f19aa",
                "sha256": "9ad6477ad38859b95b0d5c3e4d0fd1f95b29a0a7de52f5b356397344524f6d92"
            },
            "downloads": -1,
            "filename": "stellar_domains_sdk-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "08e1f99ff29eb4271e96f2bf465f19aa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5387,
            "upload_time": "2024-10-09T19:10:24",
            "upload_time_iso_8601": "2024-10-09T19:10:24.031022Z",
            "url": "https://files.pythonhosted.org/packages/e3/15/330540358c2c64201cefcf5eba743492ca4550443e02e211a124b7d67418/stellar_domains_sdk-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c75238278d4be8f2b6950aeb3c0244887e892560c60f23cfdd08372e409776ae",
                "md5": "a8c5c77c49ab9d4f6ce134e21feebe4d",
                "sha256": "4bcef69f4477629f3a921b4f24d4d07457060e0ecffdb37c45da80b2d4c265e2"
            },
            "downloads": -1,
            "filename": "stellar_domains_sdk-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a8c5c77c49ab9d4f6ce134e21feebe4d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4405,
            "upload_time": "2024-10-09T19:10:26",
            "upload_time_iso_8601": "2024-10-09T19:10:26.809788Z",
            "url": "https://files.pythonhosted.org/packages/c7/52/38278d4be8f2b6950aeb3c0244887e892560c60f23cfdd08372e409776ae/stellar_domains_sdk-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-09 19:10:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "matejmecka",
    "github_project": "stellar-python-domains-sdk#readme",
    "github_not_found": true,
    "lcname": "stellar-domains-sdk"
}
        
Elapsed time: 0.30797s