Skip to content

fix(providers): inject api keys and correct capabilities - #173

Merged
Gaubee merged 2 commits into
mainfrom
fix/provider-envkeys
Jan 6, 2026
Merged

Gaubee merged 2 commits into
mainfrom
fix/provider-envkeys

Conversation

@Gaubee

@Gaubee Gaubee commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

Fixes provider capability detection and error propagation; injects API keys via API_KEYS for dynamic access (TRONGRID_API_KEY/ETHERSCAN_API_KEY); adds provider capability tests.

Gaubee added 2 commits January 6, 2026 18:15
- Add api-key-picker.ts: picks one random key from comma-separated list
- Key is locked per service (etherscan:chainId, trongrid:chainId) at startup
- Update EtherscanProvider to use pickApiKey for balance and tx history
- Update TronRpcProvider to support both apiKey and apiKeyEnv with random pick
- Add 11 unit tests for api-key-picker
@Gaubee
Gaubee merged commit 407f8b0 into main Jan 6, 2026
5 checks passed
@Gaubee
Gaubee deleted the fix/provider-envkeys branch January 6, 2026 14:11
@Gaubee Gaubee self-assigned this Jan 6, 2026
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.

1 participant