Skip to content

Add Sui payment method (charge intent)#195

Open
funkiirabu wants to merge 1 commit intotempoxyz:mainfrom
funkiirabu:add-sui-charge-method
Open

Add Sui payment method (charge intent)#195
funkiirabu wants to merge 1 commit intotempoxyz:mainfrom
funkiirabu:add-sui-charge-method

Conversation

@funkiirabu
Copy link
Copy Markdown

@funkiirabu funkiirabu commented Mar 19, 2026

Summary

Adds the sui payment method specification for the charge intent.

  • Request schema: amount (base units), currency (Sui coin type), recipient (Sui address)
  • Credential: client-broadcast model — client executes the coin transfer on-chain and submits the transaction digest
  • Verification: server calls sui_getTransactionBlock with showBalanceChanges: true and verifies the transfer matches the challenge parameters
  • Receipt: method: "sui", reference: <digest>, status: "success"

Reference implementation

  • npm: @t2000/mpp-sui
  • Live gateway: mpp.t2000.ai (proxies OpenAI, Anthropic, fal.ai, Firecrawl — all accepting Sui USDC payments)

Design decisions

Decision Rationale
Client-broadcast (digest) only Sui has ~400ms finality; no benefit to server-broadcast. Simpler than supporting both models.
currency = full Move type path Unambiguous token identification. Consistent with Sui SDK conventions.
Retry with backoff on RPC lookup Sui RPC nodes may lag a few seconds behind finality. Proven necessary in production.

Context

Following the conversation with to add Sui is the third blockchain (after Tempo and Solana) to have an MPP payment method spec.

AI-assisted: This PR was drafted with AI assistance. All content has been reviewed for correctness against the working implementation.

https://x.com/brendan_j_ryan/status/2034441501842010590?s=20

Made with Cursor

Defines the `sui` charge intent for the Payment HTTP Authentication
Scheme. Covers request schema (amount, currency, recipient), credential
schema (transaction digest), balance-change verification procedure,
and receipt generation for Sui coin transfers.

Reference implementation: @t2000/mpp-sui (npm)

Made-with: Cursor
@funkiirabu funkiirabu force-pushed the add-sui-charge-method branch from c02293f to 9e93149 Compare March 19, 2026 02:23
@brendanjryan
Copy link
Copy Markdown
Collaborator

@funkiirabu

Thanks for submitting! Are you officially representing sui or have endorsement on this PR from the maintainers of canton? we would like to ensure that payment method specs can be owned by the ultimate operators of the payment method

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