feat: implement dynamic network configuration and environment variable support#44
Open
KarenZita01 wants to merge 3 commits into
Open
Conversation
- 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
|
Hi! I can help implement the dynamic network configuration and environment variable support for your Stray SDK. I have experience with:
Let me know if you'd like paid help with this — I can deliver within a few days. Feel free to reach out! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.