Skip to content

feat(tempo): offer OUSD first in server currency defaults - #265

Merged
brendanjryan merged 3 commits into
mainfrom
centaur/ousd-first-currency-defaults-1790721797
Sep 30, 2026
Merged

brendanjryan merged 3 commits into
mainfrom
centaur/ousd-first-currency-defaults-1790721797

Conversation

@decofe

@decofe decofe commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Motivation

Offer OUSD first with USDC.e on mainnet and pathUSD on Moderato, while keeping gas-token selection independent of the payment currency.

Summary

  • Add ordered tempo(currencies=...), TempoMethod.currencies, OUSD, and default_currencies_for_chain().
  • Expand default server charge/compose responses into one challenge per accepted currency.
  • Add local sponsor fee_token and allowed_fee_tokens; select balances sufficient for the gas budget. Unsponsored OUSD payments also select a funded supported gas token.

Public interface migration:

# Before: one accepted token.
method = tempo(intents={"charge": ChargeIntent()}, recipient=recipient, currency=USDC)

# After: ordered offers; omit currencies for network defaults.
method = tempo(
    intents={"charge": ChargeIntent()},
    recipient=recipient,
    currencies=[OUSD, USDC],
)

# An unpaid multi-currency response is ComposedChallenges, not Challenge.
result = await server.charge(None, "0.10")
offers = result.challenges if isinstance(result, ComposedChallenges) else [result]

Key design considerations

  • currency= remains supported but deprecated for servers; a per-request currency override still produces one Challenge. Consumers must handle ComposedChallenges when multiple currencies are accepted.
  • Explicit lists replace defaults; invalid/empty lists and simultaneous singular/plural configuration are rejected. Deduplication preserves order.
  • fee_token requires a local fee_payer and must satisfy its allowlist. Default gas tokens are pathUSD then USDC.e on mainnet, pathUSD on Moderato; OUSD is not implicitly allowed for gas.
  • Explicit client currency selection remains available; default offer ordering does not imply balance-aware payment selection or swaps. Stripe's Tempo rail retains its single supported deposit currency.

Co-authored-by: decofe <256792747+decofe@users.noreply.github.com>
@decofe
decofe force-pushed the centaur/ousd-first-currency-defaults-1790721797 branch from 14dbe36 to 361470e Compare September 29, 2026 23:28
@brendanjryan

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T00:04:31.700154Z 361470e Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 361470ea0a

ℹ️ 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".

Comment thread src/mpp/methods/tempo/_defaults.py
Comment thread src/mpp/methods/tempo/intents.py
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​pyjwt@​2.13.0 ⏵ 2.15.1100 +1100 +75100100100

View full report

@brendanjryan
brendanjryan merged commit 08234f3 into main Sep 30, 2026
18 checks passed
@brendanjryan
brendanjryan deleted the centaur/ousd-first-currency-defaults-1790721797 branch September 30, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants