Batch payment example, implementation, and tests#75
Merged
Conversation
b4c2f1c to
0cf9472
Compare
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.
Adds support for batch payments - payments that are more than the price of a single tool call. This allows the server to effectively request pre-payment for multiple tool calls in advance.
This is implemented via a new
minimumPaymentfield onatxpExpress, which is the smallest payment that will be asked of callers. If not provided, the caller will always be asked to pay exactly the amount inrequirePayment. IfminimumPaymentis larger, the user will be asked to pay that instead. To prevent footguns, this is limited to $1 at a maximum.A new
/examples/batch-paymentexample is included.