feat: production alignment — schemes, Path2, rmcp MCP parity - #55
Merged
Conversation
- Add sealed BatchSettlementScheme and AuthCaptureScheme markers. - SVM Path 2: opt-in smart-wallet verification with layout fallthrough, TransferChecked outcome matching, and Path1/Path2 split. - r402-mcp: PaymentWrapper + pay_and_call with foundation meta keys (no longer a stub). - Document remaining CPI plumbing and follow-up schemes.
Replace the Value-shell MCP crate with an rmcp 3.x based transport that matches foundation Go/TS constants (payment code 402) and mcp.md dual structuredContent+text payment-required results. PaymentWrapper and X402McpClient follow go/mcp control flow. Add find_matching_requirements in r402-core (scheme/network/amount/asset/payTo).
Complete V2 MCP transport parity: ResourceServer orchestration in r402-core, dual-format payment-required/settlement-failure (R5), PaymentWrapper control flow matching go/mcp/server.go, and X402McpClient with PaymentSigner/hooks matching go/mcp/client.go. Update docs and remove placeholder labels from the crate catalog.
Match workspace Facilitator mock style: return ready futures instead of async fn bodies without await. Unblocks `just clippy` / CI -D warnings.
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
Production-alignment slice (ex-chain-breadth), now including full V2 MCP transport on the official Rust MCP SDK.
Delivered
batch-settlement/auth-capturesealed markers inr402-core.enable_smart_wallet_verification(default false, matches TS). Path 1 layout failures fall through to outcome-basedTransferCheckedmatching. CPI inner-instruction extraction remains follow-up.find_matching_requirements— GoFindMatchingRequirementssemantics (scheme/network/amount/asset/payTo).ResourceServer— shared verify/settle orchestration used by MCP (HTTP can share later).r402-mcprewrite on officialrmcp3.x (breaking vs placeholder shell):MCP_PAYMENT_REQUIRED_CODE = 402i32, meta keys).mcp.mddualstructuredContent+content[0].text; R5 settlement failure same format.PaymentWrapperports Goserver.go(tool-level 402, not transport errors).X402McpClient+McpToolCaller/PaymentSigner+ hooks (V2-only; no V1 fallback).Intentional gaps vs foundation
-32042.McpClientError::StillRequired(stricter than Go).Explicit follow-ups
RpcSimulateTransactionResult.inner_instructionsfor CPI-only wallets.batch-settlement/auth-captureimplementations.PaymentSigneradapter over registered scheme clients /r402-httpsigning surface.Test plan
cargo test -p r402-core --libcargo test -p r402-mcp --features fullcargo clippy -p r402-core -p r402-mcp --features full --all-targets -- -D warnings