Repository navigation
feat: allow environment overrides for default Solana endpoints - #66
Open
ClancyBreach wants to merge 1 commit into
Open
ClancyBreach wants to merge 1 commit into
ClancyBreach wants to merge 1 commit into
Conversation
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.
Allow deployments to configure the existing default Solana/Pyth RPC hosts without editing SDK source, using these six environment variables:
DEVNET_ENDPOINTTESTNET_ENDPOINTMAINNET_ENDPOINTPYTHNET_ENDPOINTPYTHTEST_CROSSCHAIN_ENDPOINTPYTHTEST_CONFORMANCE_ENDPOINTPrecedence is explicit constructor argument → environment variable → existing built-in default. Values are hosts with an optional port; HTTP/WebSocket URLs retain their existing HTTPS/WSS derivation. Empty or syntactically invalid values fall back to the built-in host. Variables are read once at import time. Existing constructor signatures and explicit URL behavior are unchanged.
Validation: all 126 tests passed on Python 3.11, including 43 new endpoint cases; the same 43 cases also passed on Python 3.9. CI fatal-error lint selection, strict lint for the new test file, and
git diff --checkpassed. Local Windows tests allowed loopback for asyncio and used locally installed timezone data; no real RPC requests or blockchain transactions were performed.Related to #63