-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Labels
Description
Description
Allow the CLI to pass API keys or bearer tokens to the Horizon/RPC providers.
Requirements and Context
- Background: Many production RPC providers (NowNodes, BlockDaemon) require authentication.
- Success Criteria (Done):
ERST_RPC_TOKENused in headers.--rpc-tokenflag supported.
Suggested Execution
- Fork/Branch:
feature/rpc-auth - Implementation:
- Update
rpc.Clientto include a customhttp.RoundTripper. - Inject the
AuthorizationorX-API-Keyheader into every request.
- Update
Test and Commit
- Testing:
- Use a mock server to verify the presence of the authentication header.
- PR Inclusions:
- Updated
Clientinitialization. - Config/Flag support for tokens.
- Updated
Example Commit Message
feat(rpc): support api keys and bearer tokens
Guidelines
- Must-haves: Do not log the token value in Debug logs.
Reactions are currently unavailable