docs: add generic session intent#280
Conversation
Spec Preview
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d24a35e06
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| All payment methods implementing the "session" intent MUST support these | ||
| shared fields. Payment methods MAY require additional fields in | ||
| `methodDetails` or elevate OPTIONAL shared fields to REQUIRED in their | ||
| method specification. |
There was a problem hiding this comment.
Allow method-specific request fields used by methods
After this commit, the Lightning and Tempo session drafts are changed to reference this generic intent, but their request schemas still define method-specific top-level fields (depositInvoice/paymentHash in specs/methods/lightning/draft-lightning-session-00.md lines 321-328 and suggestedDeposit in specs/methods/tempo/draft-tempo-session-00.md line 517). Requiring additional fields to live only in methodDetails makes those existing method documents non-conformant and can lead clients to encode incompatible requests; either allow method specs to define top-level extensions or move the existing fields under methodDetails.
Useful? React with 👍 / 👎.
| | `intent` | string | The string `"session"` | | ||
| | `reference` | string | Stable method-defined session reference | |
There was a problem hiding this comment.
Align Tempo receipts with mandatory session reference
This mandatory reference conflicts with the Tempo session spec that this commit now points at the generic intent: its Receipt section says an optional txHash serves as the core reference and is absent for off-chain voucher updates (specs/methods/tempo/draft-tempo-session-00.md lines 1367-1369). Those successful paid-service/lifecycle responses would be required by this draft to include a stable session reference, so implementers cannot satisfy both specs until Tempo is updated to emit something like channelId as reference or this requirement is relaxed.
Useful? React with 👍 / 👎.
Summary
Add a generic session intent spec with minimal shared request fields, lifecycle semantics, transport guidance, receipts, errors, and security considerations
Over the last few months since launch of MPP and specifically the session intent, we have seen a lot of interest in expanding this to new payment methods, including blockchains and cards. A shared intent will help implementors maintain parity with the core control flows while allowing individual payment methods to extend with their own functionality and invariants.
In addition, this PR aligns the two existing session intents, Tempo and Lightning, specs to reference the generic session intent instead of re-registering it