docs: add production patterns for x402 and MPP - #13
Closed
DarkMagician256 wants to merge 1 commit into
Closed
Conversation
Add real-world production patterns to x402.md and mpp.md based on experience running both protocols in production on Stellar: x402.md: - Multi-route price table with per-endpoint pricing - Graceful degradation when payment config is missing - Payment receipt logging pattern mpp.md: - Combining charge + channel modes in the same server - Per-route pricing with middleware factories - Recipient key auto-resolution for containerized deployments - Discovery endpoint pattern for client intent negotiation Also add x402/MPP example prompts to README.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
aristidesstaffieri
added a commit
that referenced
this pull request
Jul 13, 2026
Addresses the agent stress-test feedback on #55: repay full-close recipe (dToken round-up, #10/#1205 failure modes, buffer-first), min_collateral semantics (#1224, c_factor-adjusted, oracle decimals), --send=no on all reads + archived-state RestoreFootprint caveat, reward_zone() as the pool-discovery method (factory events are past RPC retention), the borrow-rate curve with exact scales (ir_mod 7dp [0.1,10], status enum, q4w_pct 7dp, get_tokens order), BLND trustline prerequisite for claims (#13), getting assets from XLM (borrow or path payment; two testnet USDCs), tx-new-vs-invoke submit semantics, resource-fee and timeout remediation notes, testnet-first env blocks, and a verified public mainnet RPC endpoint list in the standards skill (the CLI's built-in mainnet alias has no RPC URL). rank-backstops.sh now derives the backstop per network and fails loudly instead of printing nothing off-mainnet; verified against testnet and mainnet.
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.
Summary
Adds production-ready patterns to
x402.mdandmpp.mdbased on running both protocols in production on Stellar. These patterns address gaps in the current documentation that developers encounter when moving from examples to real deployments.x402.md additions:
paymentMiddlewareFromConfigSTELLAR_RECIPIENTis not configured (prevents crashes in CI/dev)mpp.md additions:
/infopattern so clients can negotiate available intentsREADME.md:
Context
These patterns come from operating x402 + MPP in production on Stellar since before the x402 Foundation launch (April 2, 2026). The auto-resolution pattern in particular addresses a real-world issue we hit in containerized deployments on Railway.
Test plan
🤖 Generated with Claude Code