feat: add unified EVM session payment method#225
Open
clayclaw wants to merge 3 commits intotempoxyz:mainfrom
Open
feat: add unified EVM session payment method#225clayclaw wants to merge 3 commits intotempoxyz:mainfrom
clayclaw wants to merge 3 commits intotempoxyz:mainfrom
Conversation
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 the
sessionintent for theevmpayment method, defining unidirectional streaming payment channels for incremental, voucher-based payments on any EVM-compatible chain. Adapts the streaming payment channel mechanism from the Tempo session spec (draft-tempo-session) for general EVM use, with EVM-specific transaction formats, gas models, and domain separators.amount(price per unit, base units),currency(ERC-20 address),recipient(payee address), withmethodDetailsforchainId,escrowContract,feePayer, optionalsplitsopen,topUp,voucher,close) with EIP-712 voucher signatures for off-chain cumulative paymentsPayment-ReceiptwithacceptedCumulative,spent, optionalreference(tx hash on settlement)This is an initial draft, we are actively developing the underlying functionality and will continue refining the spec as implementation progresses. Feedback and discussion are welcome.
Context
This is the second intent defined for the
evmpayment method (afterchargein #213). The session intent follows the Tempo session spec (draft-tempo-session) as the reference design, extending it to work across any EVM-compatible chain.Design decisions
open,openWithAuthorization,settle,topUp,topUpWithAuthorization,close,requestClose,withdraw— covers the full channel lifecycle with both client-funded and server-submitted paths.openWithAuthorization/topUpWithAuthorizationvia EIP-3009feePayer: true, client signs off-chaintransferWithAuthorization; server calls the escrow contract and pays gas. Client never needs native token. Requires EIP-3009 token support.open()+ ERC-4337 support for client-broadcast pathfeePayer: false, client callsapprove() + open()directly or via an EntryPoint-mediated UserOperation. Smart wallets can batch both in a single UserOp.channelIdviakeccak256(payer, payee, token, salt, authorizedSigner, escrow, chainId)topUp(or initialopen) with a voucher update in a single HTTP round-trip — reduces latency when approaching deposit limits.splitRecipients[]+splitBps[]settle()/close()."EVM Payment Channel""Tempo Stream Channel"— the only semantic difference in the voucher signing scheme. Prevents cross-deployment replay.New File
specs/methods/evm/draft-evm-session-00.mdAI Disclosure
This spec was drafted with AI assistance (Claude). All content has been reviewed for technical accuracy, RFC compliance, and alignment with STYLE.md / CONTRIBUTING.md.