feat(tempo): add split payments for charge#231
Open
brendanjryan wants to merge 10 commits intomainfrom
Open
Conversation
7e70a6c to
d56bda9
Compare
d56bda9 to
b944184
Compare
commit: |
commit: |
499b36f to
cce70a1
Compare
👁️ Cyclops Security Review🧭 Auditing · mode=
⚙️ Controls
|
👁️ Cyclops Security Review🧭 Auditing · mode=
⚙️ Controls
📜 3 events🔍 |
This was referenced Mar 27, 2026
tmm
reviewed
Mar 27, 2026
Comment on lines
+1
to
+3
| --- | ||
| 'mppx': minor | ||
| --- |
Member
There was a problem hiding this comment.
unless this is a breaking change, would use patch since we are pre-v1
Suggested change
| --- | |
| 'mppx': minor | |
| --- | |
| --- | |
| 'mppx': patch | |
| --- |
.changeset/quiet-cooks-smile.md
Outdated
| 'mppx': minor | ||
| --- | ||
|
|
||
| Add split-payment support to Tempo charge requests, including client transaction construction and stricter server verification for split transfers. |
Member
There was a problem hiding this comment.
Suggested change
| Add split-payment support to Tempo charge requests, including client transaction construction and stricter server verification for split transfers. | |
| Added split-payment support to Tempo charge requests, including client transaction construction and stricter server verification for split transfers. |
src/tempo/client/Charge.ts
Outdated
| * Allowlist of expected split recipient addresses. When set, the client | ||
| * rejects any challenge whose split recipients are not in this list. | ||
| */ | ||
| expectedRecipients?: readonly string[] | undefined |
src/tempo/internal/charge.ts
Outdated
| export type Split = { | ||
| amount: string | ||
| memo?: string | undefined | ||
| recipient: string |
src/tempo/internal/charge.ts
Outdated
| export type Transfer = { | ||
| amount: string | ||
| memo?: string | undefined | ||
| recipient: string |
src/tempo/internal/charge.ts
Outdated
| export function getTransfers(request: { | ||
| amount: string | ||
| methodDetails?: { memo?: string | undefined; splits?: readonly Split[] | undefined } | ||
| recipient: string |
- order-insensitive matching for both calldata and logs - hash path uses log-only verification (spec conformance) - bind validBefore to min(now+25s, challenge.expires) - add expectedRecipients allowlist for client-side split validation - allow transferWithMemo on memo-less split entries - enforce exact call count only for fee-payer transactions - sort by specificity (memo-required first) to prevent greedy matching - try/catch in decodeTransferCall for malformed calldata resilience - remove dead assertTransferLog and unused imports
Prevents cross-route credential replay where a credential issued for a no-splits (or no-memo) route is accepted on a route that requires splits or a specific memo. The methodDetails fields memo and splits now participate in the scope comparison alongside amount, currency, and recipient.
a4f66d6 to
a1ec1a9
Compare
a1ec1a9 to
6fe20f0
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.
Summary
splitssupport to Tempo charge request validation and wire serializationtransactionandhashcredentials on the serverSpec: tempoxyz/mpp-specs#203