feat(KEEP-143): add kh read, kh plugin, kh chain, and remove auth wall#42
Merged
feat(KEEP-143): add kh read, kh plugin, kh chain, and remove auth wall#42
Conversation
…lic commands - Add kh read for direct contract reads via public RPC (no auth needed) - Add kh chain list/ls for listing supported chains - Add RPC resolver with config > env > platform fallback chain - Add rpc map to config.yml for persistent custom RPC endpoints - Fix auth wall: commands work on fresh install without login - Template list supports search/filter by query
ff9a5a3 to
8d42178
Compare
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.
Summary
Removes the auth wall for public commands and adds new developer utilities. No login required for exploring plugins, chains, templates, or reading contract state.
New commands
kh read(alias:kh call) - Direct contract reads via public RPC, no auth needed:kh chain list(alias:kh ch ls) - List supported chains without auth:kh plugin(renamed fromprotocol) - Browse plugins and integrations without auth:Backward-compat aliases
kh protocol,kh prstill work.Template search - Filter templates by keyword:
Auth wall removal
kh auth loginrequired to exploreRPC configuration
Resolution order for
kh read:--rpc-urlflagKH_RPC_URLenv var~/.config/kh/config.ymlrpc.<chainId>(persistent per-chain)defaultPrimaryRpcfrom /api/chains (cached 1hr)defaultFallbackRpcConfig additions
rpcmap for persistent custom RPC endpointsdefault_orgfield (for future KH_ORG env var support)Test plan
go build ./...passesgo vet ./...passesgo test ./...passes (28 packages, 0 failures)kh read 0xA0b8...48 "decimals()" --chain 1returns 6 (USDC)kh read 0xC02a...c2 "totalSupply()" --chain 1returns WETH supplykh ch lslists chains without authkh plugin lslists all integrations without authkh plugin g aaveshows 7 actionskh tp ls monitorfilters templateskh pr lsbackward compat alias workskh read 0xdAC17F...0e "totalSupply()" --chain 1returns USDT supply (known: returns empty due to proxy contract, same as cast)