Skip to content

wallet: settler client with CAPPED settler.transfer - #28

Merged
TeoSlayer merged 3 commits into
mainfrom
feat/settler-client-capped-transfer
Jul 23, 2026
Merged

wallet: settler client with CAPPED settler.transfer#28
TeoSlayer merged 3 commits into
mainfrom
feat/settler-client-capped-transfer

Conversation

@TeoSlayer

Copy link
Copy Markdown
Contributor

The new wallet.settler.transfer moved funds to any pubkey with no spend-cap enforcement (the wallet's per-day cap only covered Pay). This closes that gap:

  • Routes SettlerTransfer through checkSpendCapLocked/recordSpendLocked exactly like Pay — the per-asset rolling-window cap is checked before the transfer; the spend is recorded only on success (a failed transfer consumes no budget). Held under capMu; the settler client is bounded (3s dial / 8s call).
  • Adds a manifest key.sign cap grant target: settler-transfer (USDC 100/day, matching x402-auth / evm-eip3009) so the daemon grant broker authorizes the signing and ParseSpendCapsFromManifest enforces it.
  • Existing USDC caps unchanged (no tamper). Adds TestSettlerTransferHonorsSpendCap; full suite green.

🤖 Generated with Claude Code

teovl and others added 3 commits June 21, 2026 19:51
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d-cap

The wallet.settler.transfer path moved funds to any pubkey with NO spend-cap
enforcement (the wallet's per-day cap only covered Pay). This routes
SettlerTransfer through checkSpendCapLocked/recordSpendLocked exactly like Pay:
the per-asset rolling-window cap is checked before the transfer and the spend is
recorded only on success (a failed transfer consumes no budget).

Also adds a manifest key.sign cap grant scoped to target 'settler-transfer'
(USDC 100/day, matching x402-auth / evm-eip3009) so the daemon grant broker
authorizes the transfer signing and ParseSpendCapsFromManifest picks it up.
Adds TestSettlerTransferHonorsSpendCap; updates the shipped-manifest caps test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…apped-transfer

# Conflicts:
#	go.mod
#	go.sum
@TeoSlayer
TeoSlayer merged commit eb1bd01 into main Jul 23, 2026
2 checks passed
@TeoSlayer
TeoSlayer deleted the feat/settler-client-capped-transfer branch July 23, 2026 21:23
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 7.04698% with 277 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/settlerclient/client.go 0.00% 144 Missing ⚠️
pkg/walletipc/dispatcher_settler.go 3.44% 84 Missing ⚠️
cmd/wallet/main.go 20.00% 19 Missing and 1 partial ⚠️
pkg/wallet/hooks_settler.go 37.50% 19 Missing and 1 partial ⚠️
pkg/settlerclient/nonce.go 0.00% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

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