feat(python): add extra.minDeposit hint for EVM batch-settlement - #22
Closed
PhilBot402 wants to merge 3 commits into
Closed
PhilBot402 wants to merge 3 commits into
PhilBot402 wants to merge 3 commits into
Conversation
Pass the already-resolved atomic spendControls cap to scheme create_payment_payload via PaymentPayloadContext.max_amount_per_payment (omitted when uncapped) so capital-locking schemes can reuse client policy without re-resolving it. Co-authored-by: phdargen <phdargen@users.noreply.github.com>
Servers always announce extra.minDeposit on 402 responses (SDK default 10 × amount). Clients size deposits from a valid hint, else amount × deposit_multiplier, clamped to spend_cap × deposit_multiplier. Servers may opt in to enforce_min_deposit (default off). Co-authored-by: phdargen <phdargen@users.noreply.github.com>
Show the client spend-cap deposit ceiling and the optional server extra.minDeposit override in the Python batch-settlement examples. Co-authored-by: phdargen <phdargen@users.noreply.github.com>
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.
Port of x402-foundation#3372 from TypeScript to Python SDK.
Python batch-settlement now matches the TypeScript behavior from that PR.
x402Clientforwards the resolved atomic spend cap onPaymentPayloadContext.max_amount_per_payment. Servers always announceextra.minDepositon 402 responses (SDK default10 × amount, optional Money or atomic override) and may opt in toenforce_min_deposit. Clients size deposits from a valid hint, otherwiseamount × deposit_multiplier, clamped tospend_cap × deposit_multiplier. Uncapped payments leave deposits uncapped. Tracks x402-foundation#3405.AI disclosure: Automated by @phdargen. Use your own judgement