Skip to content

feat: implement dynamic network configuration and environment variable support#44

Open
KarenZita01 wants to merge 3 commits into
sceptejas:masterfrom
KarenZita01:improve-error-handling-and-validation
Open

feat: implement dynamic network configuration and environment variable support#44
KarenZita01 wants to merge 3 commits into
sceptejas:masterfrom
KarenZita01:improve-error-handling-and-validation

Conversation

@KarenZita01

Copy link
Copy Markdown

What was built/improved:
Environment Variable Integration: Introduced python-dotenv to manage sensitive Stellar secret keys and Horizon URLs externally.

Network Agnosticism: Refactored the core payment logic to use a dynamic NETWORK_PASSPHRASE, enabling the CLI to work on both Testnet and Mainnet via a single config change.

Security Guardrails: Added a .env.example file and updated .gitignore to ensure developers do not accidentally commit private keys to version control.

Technical Depth & Impact:
Security First: Moving the SECRET_KEY from a hardcoded string in the script to an environment variable is a mandatory security upgrade for any blockchain-facing tool.

Operational Flexibility: Previously, the SDK was locked to the Testnet. This contribution allows power users to deploy payments on the Mainnet by simply setting STELLAR_NETWORK=PUBLIC in their environment.

Code Maintainability: By decoupling configuration from business logic, the SDK is now easier to test and containerize for automated payment scripts.

- Add custom exception classes for better error categorization
- Enhance input validation with decimal precision support
- Add comprehensive logging throughout the application
- Improve Stellar secret key validation
- Add amount limits and precision validation
- Update tests to cover new functionality
- Better error messages and debugging information
- Fix case sensitivity issue between Readme.md and README.md
- Remove duplicate installation section that was causing conflicts
- Ensure proper file naming for cross-platform compatibility
@2411015047-afk

Copy link
Copy Markdown

Hi! I can help implement the dynamic network configuration and environment variable support for your Stray SDK.

I have experience with:

  • Python SDK for Stellar (python-stellar-sdk, stellar-sdk)
  • Environment variable management with python-dotenv for production deployments
  • Network-agnostic architecture for testnet/mainnet/futurenet

Let me know if you'd like paid help with this — I can deliver within a few days. Feel free to reach out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants