wallet: settler client with CAPPED settler.transfer - #28
Merged
Conversation
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
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
The new
wallet.settler.transfermoved funds to any pubkey with no spend-cap enforcement (the wallet's per-day cap only coveredPay). This closes that gap:SettlerTransferthroughcheckSpendCapLocked/recordSpendLockedexactly likePay— 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 undercapMu; the settler client is bounded (3s dial / 8s call).key.signcap granttarget: settler-transfer(USDC 100/day, matching x402-auth / evm-eip3009) so the daemon grant broker authorizes the signing andParseSpendCapsFromManifestenforces it.TestSettlerTransferHonorsSpendCap; full suite green.🤖 Generated with Claude Code