Skip to content

feat: support BlockRun account API keys - #13

Open
KillerQueen-Z wants to merge 1 commit into
BlockRunAI:mainfrom
KillerQueen-Z:feat/account-api-key
Open

feat: support BlockRun account API keys#13
KillerQueen-Z wants to merge 1 commit into
BlockRunAI:mainfrom
KillerQueen-Z:feat/account-api-key

Conversation

@KillerQueen-Z

Copy link
Copy Markdown
Collaborator

Franklin Trading previously required an x402 wallet for every BlockRun request, so setting BLOCKRUN_API_KEY neither 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 older data envelope.

Validation:

  • npm test — 392 passed
  • npm run test:strategies — 3 passed
  • npm run build
  • npm pack --dry-run --cache /tmp/franklin-trading-npm-cache
  • npm run test:api-key:e2e with a temporary live key — catalog, model SSE, and Exa answer/citations passed
  • Real CLI one-shot returned the exact expected model output
  • Secret scan and git diff --check passed

Live 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.

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