Skip to content

x402: optional qscli topup --x402 (lazy deps, env-only key, hidden subcommand) #7

Description

@raullenchai

Goal

Optional, low-key qscli subcommand to fund a key over x402 (USDC on Base) —
so an autonomous/headless agent can self-provision inference credit without a
human opening a card. Mirrors the website's low-key treatment (see the x402 docs
page and backend #257): available to the agent/headless crowd, invisible to the
mainstream CLI user.

This is a fast-follow, not MVP. Anyone can already script the top-up today
with the standalone reference client (x402/deploy/pay.py pattern) against
POST https://pay.quicksilverpro.io/x402/topup/{1,5,10}. A CLI subcommand is a
convenience, not a gap.

Scope

  • qscli topup --x402 [--amount 1|5|10] (or qscli x402 buy <amount>): runs
    the 402 → sign → retry handshake and prints/stores the minted key.
  • Lazy dependency: put x402 + eth_account behind an extra —
    pip install quicksilverpro[x402] — and import them inside the
    subcommand only. The default install must not pull crypto deps or grow.
  • Key handling (security-critical): read the payer wallet key from an env
    var only (e.g. QSP_X402_WALLET_KEY). Never persist it, never write it
    to config, never log it. This is the biggest risk surface — design first.
  • Low-key surface: keep it out of the top-level --help for mainstream
    users (or gate visibility); no USDC/crypto wording in the default UX. Same
    anti-scam framing the website uses.
  • On success, offer to write the returned sk-... into the usual CLI key
    config (the standard flow), so subsequent calls "just work".
  • Docs: one section, link to https://quicksilverpro.io/docs/x402/.

Why gated / not now

  • x402 top-up is niche today; most CLI users configure a key from the dashboard.
  • Bundling a wallet/crypto surface into a mainstream LLM CLI risks the exact
    "looks scammy" perception we deliberately avoid on the site.
  • Decide whether to build after the ecosystem listing lands (ecosystem: add QuickSilver Pro (Services/Endpoints) coinbase/x402#281)
    and we see real agent traffic on the x402 endpoint.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions