Skip to content

fix(fund): Arc deposits go through the Circle agent wallet; drop the raw-key env - #195

Merged
SELAT-DEV merged 1 commit into
mainfrom
fix/arc-fund-via-circle-cli
Sep 18, 2026
Merged

SELAT-DEV merged 1 commit into
mainfrom
fix/arc-fund-via-circle-cli

Conversation

@SELAT-DEV

Copy link
Copy Markdown
Contributor

What

selat fund --chain arc stops resolving SELAT_PRIVATE_KEY + ARC_RPC_URL and passing them to setup.mjs. Arc takes the same path as every other chain: agent wallet, 0.5 USDC floor, empty-wallet QR offer, spending-policy line.

  • resolveArcDepositEnv and every isArc branch removed from lib/commands/fund.mjs; the depositEnv spawn override is gone.
  • circleChainCode("arc")"ARC" (was null, which is what kept the balance/QR branches off).
  • depositAmountError loses its Arc exemption — the CLI floor applies everywhere.
  • url-safety.mjs header no longer lists the Arc RPC as a destination.

Why

Circle CLI 1.1.1 lists ARC and accepts it as a gateway deposit --method direct source. Companion to SELAT-AI/selat-discovery#172, which removes the raw-key deposit on the skill side. Closes the last local-key path across the stack (selat-pay 0.12.0, selat-cli 0.17.4 already dropped --raw-key signing).

Tests

  • test/fund-arc.test.mjs (env resolution) deleted; its unrelated --method-without-value guard moves to test/fund-method-flag.test.mjs.
  • fund-unified-balance / per-chain-policy tests that pinned "Arc has no Circle chain code" now pin "ARC" and use Solana as the no-code example.
  • npm test: 576/576 (8 raw-key env tests removed).

Verified live (no funds moved)

SELAT_SKILL_PATH → the discovery branch, CIRCLE_BIN → a stub that proxies reads to the real CLI and refuses gateway deposit / wallet fund / services pay:
selat fund --chain arc --amount 1 --yes read the agent wallet's on-chain USDC on ARC through the real CLI ($0.00), and fell into the standard two-step funding offer with --chain ARC.

Sequencing

Merge after selat-discovery#172 releases and bump the @selat-ai/selat-discovery floor to that version in the same release — the packaged 0.25.1 still has cmdDepositArc and would refuse without a raw key. Merging earlier only affects --chain arc.

🤖 Generated with Claude Code

…raw-key env

`selat fund --chain arc` no longer resolves SELAT_PRIVATE_KEY + ARC_RPC_URL
and hands them to setup.mjs. Circle CLI 1.1.1 lists ARC and accepts it as
a `gateway deposit --method direct` source, so Arc takes the same path as
every other chain: agent wallet, 0.5 USDC floor, empty-wallet QR offer,
spending-policy line. resolveArcDepositEnv and every isArc branch are
removed; circleChainCode("arc") now returns "ARC".

Tests: fund-arc.test.mjs (env resolution) deleted; its unrelated
--method-flag guard moves to fund-method-flag.test.mjs. Two tests that
pinned "Arc has no Circle chain code" now pin the opposite. 576/576.

Verified live against the selat-discovery branch (SELAT_SKILL_PATH) with
a Circle stub that refuses money calls: the Arc balance read went through
the real CLI on ARC and the flow fell into the standard two-step funding
offer with --chain ARC. No funds moved.

Pairs with SELAT-AI/selat-discovery (Arc via Circle CLI, gateway-rawkey
removed). Needs that release as the @selat-ai/selat-discovery floor —
the packaged 0.25.1 still has the raw-key branch and would refuse.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@SELAT-DEV
SELAT-DEV merged commit d1793b1 into main Sep 18, 2026
1 check passed
SELAT-DEV added a commit that referenced this pull request Sep 18, 2026
@selat-ai/selat-discovery floor ^0.25.0 -> ^0.26.1 (Arc deposits via the
Circle CLI, raw-key path removed, Circle CLI floor 1.1.1). Carries #195
(fund: Arc through the agent wallet) and #196 (Circle CLI >= 1.1.1;
init auto-upgrades, doctor reports).

Co-authored-by: Karen Sheng <ksherlocked@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

2 participants