Skip to content

Add Hedera charge intent#251

Merged
brendanjryan merged 5 commits into
tempoxyz:mainfrom
tomrowbo:add-hedera-method
May 14, 2026
Merged

Add Hedera charge intent#251
brendanjryan merged 5 commits into
tempoxyz:mainfrom
tomrowbo:add-hedera-method

Conversation

@tomrowbo

@tomrowbo tomrowbo commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Native charge intent for Hedera (draft-hedera-charge-00). One-time payments via native Hedera TransferTransaction with Attribution memo (challenge-bound, Tempo-compatible byte layout).

Session intent is in a separate PR per reviewer request.

Highlights

  • Push mode (type="hash"): client broadcasts native TransferTransaction, server verifies via Mirror Node REST API
  • Pull mode (type="transaction"): client signs + serializes, server broadcasts
  • Attribution memo: same 32-byte layout as Tempo (TAG + VERSION + SERVER_ID + CLIENT_ID + NONCE) — ensures cross-ecosystem compatibility
  • Splits: atomic multi-recipient (up to 9) via Hedera's native multi-party transfers
  • Fee delegation: documented as future extension (Hedera natively supports feePayerAccountId)

Reference implementation

Hedera ecosystem support

Lindsay Walker (Hedera AI PM) and the Hedera AI Studio team are aware of this work and actively engaged — they are reviewing the Agent Kit plugin (hashgraph/hedera-agent-kit-js#760) and have provided feedback on the implementation. Happy to connect them for long-term maintenance questions.

Checklist

  • Follows STYLE.md conventions (RFC 2119 keywords, 72-char lines, IETF structure)
  • Uses method template structure (request schema, credential schema, verification, settlement, security, IANA)
  • Cross-references core spec (draft-httpauth-payment-00) and charge intent (draft-payment-intent-charge-00)
  • Security considerations address: replay protection, transport security, client verification, front-running
  • CI fixed (duplicate anchor resolved)
  • Split into charge-only per reviewer request (session in separate PR)

First native Machine Payments Protocol method for Hedera.

Charge intent (draft-hedera-charge-00):
- Native Hedera TransferTransaction with Attribution memo
- Push mode (type="hash") + pull mode (type="transaction")
- Challenge-bound replay protection (same 32-byte memo as Tempo)
- Verification via Mirror Node REST API
- Splits (atomic multi-recipient, up to 9)

Session intent (draft-hedera-session-00):
- HederaStreamChannel.sol escrow (ERC-20 payment channels)
- EIP-712 cumulative voucher signatures
- Open, voucher, topUp, close, requestClose, withdraw
- SSE transport for metered streaming (LLM token billing)
- 15-minute close grace period

Reference implementation: https://github.com/tomrowbo/mppx-hedera
npm: mppx-hedera@0.2.1
Deployed contracts (both Sourcify-verified):
  Testnet: 0x401b6dc30221823361E4876f5C502e37249D84C3 (296)
  Mainnet: 0x401b6dc30221823361E4876f5C502e37249D84C3 (295)
@brendanjryan

brendanjryan commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Hi! Are you actively pushing this forward?

If so, can you fix CI and ensure your spec is clean before review?

Renamed subsection "Encoding" to "Memo Encoding" with explicit
anchor {#memo-encoding} to avoid collision with top-level
"Encoding Conventions" section {#encoding}.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomrowbo

Copy link
Copy Markdown
Contributor Author

Hi! Are you actively pushing this forward?

If so, can you fix CI and ensure your spec is clean before review?

Hey! Yes, actively pushing. Just fixed the CI — was a duplicate section anchor. Should be green now. Let me know if there's anything else needed on the spec.

@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown

Spec Preview

Spec Changed Artifacts
draft-card-charge-00 - HTML · TXT · XML · PDF
draft-evm-charge-00 - HTML · TXT · XML · PDF
draft-hedera-charge-00 New HTML · TXT · XML · PDF
draft-httpauth-payment-00 - HTML · TXT · XML · PDF
draft-lightning-charge-00 - HTML · TXT · XML · PDF
draft-lightning-session-00 - HTML · TXT · XML · PDF
draft-payment-discovery-00 - HTML · TXT · XML · PDF
draft-payment-intent-charge-00 - HTML · TXT · XML · PDF
draft-payment-transport-mcp-00 - HTML · TXT · XML · PDF
draft-solana-charge-00 - HTML · TXT · XML · PDF
draft-stellar-charge-00 - HTML · TXT · XML · PDF
draft-stripe-charge-00 - HTML · TXT · XML · PDF
draft-tempo-charge-00 - HTML · TXT · XML · PDF
draft-tempo-session-00 - HTML · TXT · XML · PDF

Browse preview release assets

@brendanjryan

Copy link
Copy Markdown
Collaborator

Thanks! Gave a brief skim

Two asks:

  1. Can you split the charge and session proposal into two separate PRs? Charge is well defined and easy to review, but the session scope is much broader.

  2. Has any other developer / representative of Hadera looked at this? Who would be the long-term maintainers of this spec?


Every Hedera charge transaction MUST include an Attribution
memo in the transaction's native memo field. The memo
provides challenge binding (replay protection) and server

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

client is anonymous, all 10 bytes MUST be zero.

NONCE (bytes 25-31)
: The first 7 bytes of `keccak256(challengeId)`, where

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

Session spec moved to a dedicated PR per reviewer request.
This PR now covers charge intent only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomrowbo tomrowbo changed the title Add Hedera payment method: charge + session intents Add Hedera charge intent May 12, 2026
@tomrowbo tomrowbo mentioned this pull request May 12, 2026
4 tasks
@tomrowbo

tomrowbo commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

Done — split into two PRs:

On the Hedera side: Lindsay Walker (Hedera AI PM) and the AI Studio team are actively engaged — they're reviewing the Agent Kit plugin integration (hashgraph/hedera-agent-kit-js#760) and have provided implementation feedback. Happy to connect them here for long-term maintenance questions if that would help.

@walkerlj0

Copy link
Copy Markdown

Hello, I am the product manager of AI Studio at Hedera Hashgraph. We will maintain and make PRs to this if we make and changes and updates to our plugins. Please let us know if there is anything we ever need to do by raising an issue in the AI Studio JS SDK repo

@brendanjryan

brendanjryan commented May 14, 2026

Copy link
Copy Markdown
Collaborator

incredible -- thank you both! Doing a final review now

@brendanjryan brendanjryan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

one comment on co-authors but otherwise this looks great!

author:
- name: Tom Rowbotham
ins: T. Rowbotham
email: tom@xeno.money

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can you add https://github.com/walkerlj0 as a co-author?

generally we want to have more than one author for proposals

This requests a transfer of 0.50 USDC on Hedera
testnet (chain ID 296). Note that `decimals` is not
present in the wire format; it is only used during
request construction by the mppx schema transform.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

## Mirror Node Lag {#mirror-node-lag}

Hedera achieves consensus in approximately 3-5 seconds,
but the Mirror Node REST API may take an additional 3-5

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

helpful context -- thank you!


# Acknowledgements

The author thanks the Tempo team for the MPP attribution

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🙇

@tomrowbo tomrowbo force-pushed the add-hedera-method branch from 334f0ad to f8072fb Compare May 14, 2026 10:22
@tomrowbo

Copy link
Copy Markdown
Contributor Author

Added Lindsay as co-author — updated on both the charge (#251) and session (#258) PRs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomrowbo tomrowbo force-pushed the add-hedera-method branch from f8072fb to b7a0d8b Compare May 14, 2026 21:15
@brendanjryan brendanjryan merged commit 217dfdd into tempoxyz:main May 14, 2026
4 checks passed
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.

3 participants