Skip to main content

A Python SDK for interacting with Soroban Domains on the Stellar network

Project description

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

pip install stellar-domains-sdk

Quick Start

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stellar_domains_sdk-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

stellar_domains_sdk-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file stellar_domains_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: stellar_domains_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for stellar_domains_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4bcef69f4477629f3a921b4f24d4d07457060e0ecffdb37c45da80b2d4c265e2
MD5 a8c5c77c49ab9d4f6ce134e21feebe4d
BLAKE2b-256 c75238278d4be8f2b6950aeb3c0244887e892560c60f23cfdd08372e409776ae

See more details on using hashes here.

File details

Details for the file stellar_domains_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for stellar_domains_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ad6477ad38859b95b0d5c3e4d0fd1f95b29a0a7de52f5b356397344524f6d92
MD5 08e1f99ff29eb4271e96f2bf465f19aa
BLAKE2b-256 e315330540358c2c64201cefcf5eba743492ca4550443e02e211a124b7d67418

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page