feat: support BlockRun account API keys - #13
Open
KillerQueen-Z wants to merge 1 commit into
Open
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.
Franklin Trading previously required an x402 wallet for every BlockRun request, so setting
BLOCKRUN_API_KEYneither authenticated model/data calls nor prevented wallet signing after an account quota response.This adds account API support across the agent, subagents, local proxy, model catalog, Exa, prediction markets, DeFiLlama, RPC, generic BlockRun calls, and BlockRun-backed trading data. Account requests are restricted to trusted BlockRun origins, strip payment credentials, redact account errors, and never fall back to x402 signing. Trading semantics stay explicit: the API key pays for BlockRun services, while live exchange/on-chain actions still use a separate Solana-first or Base transaction wallet.
The README now links registration, API-key creation, and credit top-up. It documents account versus transaction-wallet responsibilities and lists Solana before Base. This also fixes an existing Exa compatibility bug found by live testing: the account API returns top-level
answer/citations, while Franklin Trading only accepted the olderdataenvelope.Validation:
npm test— 392 passednpm run test:strategies— 3 passednpm run buildnpm pack --dry-run --cache /tmp/franklin-trading-npm-cachenpm run test:api-key:e2ewith a temporary live key — catalog, model SSE, and Exa answer/citations passedgit diff --checkpassedLive API observation: the production account API currently returns HTTP 502 for the BlockRun crypto and stock market-data routes. The client authentication and no-wallet-signing behavior are covered locally; model, catalog, and Exa account paths pass live. The market-data 502 needs production gateway follow-up and is not hidden by this PR.